⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mutal_music.m

📁 存在互耦情况下的均匀平面阵列的MUSIC估计及其校正方法
💻 M
字号:
%  the  data of signal
clear;
format long;
c=3*10.^8;%光速
L=10;%阵元数
sam=500;%取样点
N=500;
dx=1/2; %阵元间距
dy=1/2;
w1=0.93;%第一个信号的角频率
w2=0.98;%第二个信号的角频率
w3=1.03;
w4=1.08;
phase1=0;%初始相位
phase2=0;
phase3=0;
phase4=0;
singnum=4;
snr1=30;
Amp=sqrt(10^(snr1/10));%信号幅度
cx=0.3527+0.4854j;
cy=0.3527+0.4854j; %互相关系数
cxy=0.0927+0.2853j;
theta=[74,35;40,20;54,66;28,41];
%lamta=c/w1;
%len=lamta/2;


for t=1:sam
    s1(t)=Amp*(exp(-j*(2*pi*w1*0.1*t+phase1)));
    s2(t)=Amp*(exp(-j*(2*pi*w2*0.1*t+phase2)));
    s3(t)=Amp*(exp(-j*(2*pi*w3*0.1*t+phase2)));
    s4(t)=Amp*(exp(-j*(2*pi*w4*0.1*t+phase2)));
end
tt=1:sam;
%plot(tt,s1,'r--',tt,s2,'b--');

  s=[s1(1:N);s2(1:N);s3(1:N);s4(1:N)];

  %n=1:1800;
  %aa=(0.1*n)*pi/180;
  
  i=1:L;
  ax1=exp(-j*2*pi*(dx*(i-1)*cos(theta(1,1)*sin(theta(1,2)))))';%阵列上关于信号的方向向量
  ax2=exp(-j*2*pi*(dx*(i-1)*cos(theta(2,1)*sin(theta(2,2)))))';
  ax3=exp(-j*2*pi*(dx*(i-1)*cos(theta(3,1)*sin(theta(3,2)))))';
  ax4=exp(-j*2*pi*(dx*(i-1)*cos(theta(4,1)*sin(theta(4,2)))))';
  ay1=exp(-j*2*pi*(dx*(i-1)*cos(theta(1,1)*sin(theta(1,2)))))';
  ay2=exp(-j*2*pi*(dx*(i-1)*cos(theta(2,1)*sin(theta(2,2)))))';
  ay3=exp(-j*2*pi*(dx*(i-1)*cos(theta(3,1)*sin(theta(3,2)))))';
  ay4=exp(-j*2*pi*(dx*(i-1)*cos(theta(4,1)*sin(theta(4,2)))))';
  a=[kron(ay1,ax1),kron(ay2,ax2),kron(ay3,ax3),kron(ay4,ax4)];
  
  c1=toeplitz([1,cx,zeros(1,L-2)]);
  c2=toeplitz([cx,cxy,zeros(1,L-2)]);
  C1=kron(eye(L),c1);
  C2=kron((tril(ones(L),1)-tril(ones(L),-2)-eye(L)),c2);
  C=C1+C2;
  %a=[a1.';a2.'];
  J=[zeros(L-2,1),eye(L-2),zeros(L-2,1)];
  P1=J;
  P=kron(P1,J);
 noise=randn((L-2)*(L-2),N)+j*randn((L-2)*(L-2),N);%零均值、方差为 的白噪声,且与信号源不相关
 
 z=P*C*a*s+noise;%总的阵列输出向量
 
 Rz=(z*z')/N;%取z的自相关矩阵
 
 [e,v]=eig(Rz);%对Rz进行特征值分解

 es=e(:,(L-3:L));%信号子空间
 en=e(:,(1:L-4));%噪声子空间
 c=en*en';
 b=eye(L);
aaaa=zeros(L,90);
  k=1:L;
     for the1=1:90
         for the2=1:90
         ax=exp(-j*2*pi*(dx*(k-1)*cos(the1)*sin(the2)));
         ay=exp(-j*2*pi*(dx*(k-1)*cos(the1)*sin(the2)));
         %aaaa(k,h)=exp(j*2*pi*w1*ln*(k-1)*sein(0.1*h*pi/180)/c);
         ac=kron(ay',ax');


     pp=ac'*ac/(ac'*c*ac); 
     p(the1,the2)=real(pp);
 
 end
     end
[m1,n1]=max(p(:));
doa1=floor(n1/90);

doa2=n1-floor(n1/90)*90;
u=0:0.01:90-0.01;
p=10*log10(p);
plot(u,p,'r-');
grid on;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -