实用标准文档
图 23 MVDR算法实现DOA估计
仿真程序(8_16):
clear all clc
%% 产生阵列接收信号 N=100; M=10; K=2;
theta=[-10;40]*pi/180; SNR=[10;20];
Am=[sqrt(10.^(SNR/10))]; S=Am*ones(1,N);
S(2,:)=S(2,:).*exp(1i*2*pi*rand(1,N)); for a=1:M for b=1:K
A(a,b)=exp(-1i*(a-1)*pi*sin(theta(b))); end end
V=zeros(M,N); for m=1:M
v=wgn(1,N,0,'complex'); v=v-mean(v); v=v/std(v);
文案大全
实用标准文档
V(m,:)=v; end X=A*S+V;
%% 估计空间自相关矩阵 R=zeros(M,M); for i=1:N
R=R+X(:,i)*X(:,i)'; end R=R/N;
%% MUSIC算法·¨ [VR,D]=eig(R); [B,IX]=sort(diag(D)); G=VR(:,IX(M-K:-1:1)); Pmusic=[];
for n=-pi/2:pi/180:pi/2
a=exp(-1i*[0:M-1]'*pi*sin(n)); Pmusic=[Pmusic,1/(a'*G*G'*a)]; end %% MVDR算法 Pmvdr=[];
for n=-pi/2:pi/180:pi/2
a=exp(-1i*[0:M-1]'*pi*sin(n)); Pmvdr=[Pmvdr,1/(a'*inv(R)*a)]; end
%% RootMUSIC算法¨ syms z
pz=z.^([0:M-1]'); pz1=(z^(-1)).^([0:M-1]); fz=z^(M-1)*pz1*G*G'*pz; a=sym2poly(fz); r=roots(a); r1=abs(r); for i=1:2*K
[Y,I(i)]=min(abs(r1-1)); r1(I(i))=inf; end for i=1:2*K
theta_esti_music(i)=asin(-angle(r(I(i)))/pi)*180/pi; end
%% ESPRIT算法
S=VR(:,IX(M:-1:M-K+1)); S1=S(1:M-1,:); S2=S(2:M,:); fai=S1/S2;
文案大全
实用标准文档
[U_fai,V_fai]=eig(fai); for i=M-K:M-1
theta_esti_esprit(M-i)=asin(angle(V_fai(i,i))/pi)*180/pi; end
t=-90:90;
Pmusic_norm=10*log10(abs(Pmusic)/max(abs(Pmusic))); Pmvdr_norm=10*log10(abs(Pmvdr)/max(abs(Pmvdr))); figure(1)
plot(t,Pmusic_norm)
xlabel('空间角度/(单位度)');ylabel('归一化空间谱/dB') title('MUSIC') figure(2) plot(t,Pmvdr_norm)
xlabel('空间角度/(单位度)');ylabel('归一化空间谱/dB') title('MVDR')
文案大全