您好,欢迎访问三七文档
当前位置:首页 > 临时分类 > (完整word版)自适应波束形成与Matlab程序代码注解
11.均匀线阵方向图(1)matlab程序clc;clearall;closeall;imag=sqrt(-1);element_num=32;%阵元数为8d_lamda=1/2;%阵元间距d与波长lamda的关系theta=linspace(-pi/2,pi/2,200);theta0=0;%来波方向w=exp(imag*2*pi*d_lamda*sin(theta0)*[0:element_num-1]');forj=1:length(theta)a=exp(imag*2*pi*d_lamda*sin(theta(j))*[0:element_num-1]');p(j)=w'*a;endpatternmag=abs(p);patternmagnorm=patternmag/max(max(patternmag));patterndB=20*log10(patternmag);patterndBnorm=20*log10(patternmagnorm);figure(1)plot(theta*180/pi,patternmag);gridon;xlabel('theta/radian')ylabel('amplitude/dB')title([num2str(element_num)'阵元均匀线阵方向图','来波方向为'num2str(theta0*180/pi)'度']);holdon;figure(2)plot(theta,patterndBnorm,'r');gridon;xlabel('theta/radian')ylabel('amplitude/dB')title([num2str(element_num)'阵元均匀线阵方向图','来波方向为'num2str(theta0*180/pi)'度']);axis([-1.51.5-500]);2(2)仿真结果A.来波方向为0°-100-80-60-40-20020406080100012345678theta/radianamplitude/dB8阵元均匀线阵方向图,来波方向为0度不归一化-1.5-1-0.500.511.5-50-45-40-35-30-25-20-15-10-50theta/radianamplitude/dB8阵元均匀线阵方向图,来波方向为0度归一化3B.来波方向为45°-2-1.5-1-0.500.511.52012345678theta/radianamplitude/dB8阵元均匀线阵方向图,来波方向为0度不归一化-1.5-1-0.500.511.5-50-45-40-35-30-25-20-15-10-50theta/radianamplitude/dB8阵元均匀线阵方向图,来波方向为0度归一化4C.随着阵元数的增加,波束宽度变窄,分辨力提高,仿真图如下:-100-80-60-40-2002040608010005101520253035theta/radianamplitude/dB32阵元均匀线阵方向图来波方向为0度非归一化-1.5-1-0.500.511.5-50-45-40-35-30-25-20-15-10-50theta/radianamplitude/dB32阵元均匀线阵方向图来波方向为0度归一化5-100-80-60-40-2002040608010005101520253035theta/radianamplitude/dB32阵元均匀线阵方向图来波方向为45度不归一化-1.5-1-0.500.511.5-50-45-40-35-30-25-20-15-10-50theta/radianamplitude/dB32阵元均匀线阵方向图来波方向为45度归一化62.波束宽度与波达方向及阵元数的关系(1)matlab程序clc;clearall;closeall;imag=sqrt(-1);element_num1=16;element_num2=128;element_num3=1024;lambda=0.1;d=0.5*lambda;theta=0:0.5:90;forj=1:length(theta)fai(j)=theta(j)*pi/180-asin(sin(theta(j)*pi/180)-lambda/(element_num1*d));psi(j)=theta(j)*pi/180-asin(sin(theta(j)*pi/180)-lambda/(element_num2*d));beta(j)=theta(j)*pi/180-asin(sin(theta(j)*pi/180)-lambda/(element_num3*d));endfigureplot(theta,fai,'r',theta,psi,'b',theta,beta,'g');gridon;xlabel('theta');ylabel('widthinradians');title('波束宽度与达波方向及阵元数目的关系');legend('N=16','N=128','N=1024');(2)仿真结果010203040506070809000.10.20.30.40.50.60.7thetawidthinradians波束宽度与达波方向及阵元数目的关系N=16N=128N=1024结果73.当阵元间距/2d时,会出现栅瓣,导致空间模糊(1)仿真结果-100-80-60-40-20020406080100012345678theta/radianamplitude/dB8阵元均匀线阵方向图来波方向为0度非归一化-1.5-1-0.500.511.5-50-45-40-35-30-25-20-15-10-50theta/radianamplitude/dB8阵元均匀线阵方向图来波方向为0度归一化84.类似于时域滤波,天线方向图是最优权的傅立叶变换(1)matlab程序clc;clearall;closeall;imag=sqrt(-1);element_num=32;source_num=1;d_lambda=0.5;theta=linspace(-pi/2,pi/2,200);theta0=0;w=exp(imag*2*pi*d_lambda*sin(theta0)*[0:element_num-1]');forj=1:length(theta)a=exp(imag*2*pi*d_lambda*sin(theta(j))*[0:element_num-1]');p(j)=w'*a;endpatternmag=abs(p);patternmagnorm=patternmag/max(max(patternmag));patterndB=20*log10(patternmag);patterndBnorm=20*log10(patternmagnorm);figure(1)subplot(1,2,1);plot(theta,patterndBnorm);gridon;xlabel('theta/radian');ylabel('amplitude/dB');axis([-2.02.0-500]);subplot(1,2,2);pfft=fftshift(fft(w,256));pfftmag=abs(pfft);pfftmagnorm=pfftmag/max(max(pfftmag));pfftdB=20*log10(pfftmagnorm);pfftdBnorm=20*log10(pfftmagnorm);plot(linspace(-pi/2,pi/2,256),pfftdBnorm);gridon;xlabel('theta/radian');ylabel('FFT_amplitude/dB');axis([-2.02.0-500]);9(2)仿真结果-2-1.5-1-0.500.511.52-50-45-40-35-30-25-20-15-10-50theta/radianamplitude/dB-2-1.5-1-0.500.511.52-50-45-40-35-30-25-20-15-10-50theta/radianFFTamplitude/dB105.最大信噪比准则方向图和功率谱(1)matlab程序clc;clearall;closeall;imag=sqrt(-1);element_num=8;%阵元数为8d_lambda=0.5;%间距为半波长theta=-90:0.5:90;%扫描范围theta0=0;%来波方位theta1=20;%干扰方向L=512;%采样点数fori=1:Lamp0=10*randn(1);amp1=200*randn(1);ampn=1;s(:,i)=amp0*exp(imag*2*pi*0.5*sin(theta0*pi/180)*[0:element_num-1]');j(:,i)=amp1*exp(imag*2*pi*0.5*sin(theta1*pi/180)*[0:element_num-1]');n(:,i)=ampn*exp(randn(element_num,1)+imag*randn(element_num,1));endRs=1/L*s*s';%信号自相关矩阵Rnj=1/L*(j*j'+n*n');%干扰+噪声的自相关矩阵[V,D]=eig(Rs,Rnj);%(Rs,Rnj)的广义特征值和特征向量[D,I]=sort(diag(D));%特征向量排序Wopt=V(:,I(8));%最优权矢量forj=1:length(theta)a=exp(imag*2*pi*d_lambda*sin(theta(j)*pi/180)*[0:element_num-1]');f(j)=Wopt'*a;p(j)=a'*Rs*a+a'*Rnj*a;endF=20*log10(abs(f)/max(max(abs(f))));P=20*log10(abs(p)/max(max(abs(p))));subplot(1,2,1)plot(theta,F);gridon;holdon;plot(theta0,-80:0,'.');plot(theta1,-80:0,'.');xlabel('theta/0');ylabel('FindB');title('max-SNR方向图');axis([-9090-800]);11holdon;subplot(1,2,2);plot(theta,P,'r');gridon;xlabel('theta/0');ylabel('功率indB');title('max-SNR功率谱');gridon;axis([-9090-800]);(2)仿真结果-80-60-40-20020406080-80-70-60-50-40-30-20-100theta/0FindBmax-SNR方向图-80-60-40-20020406080-80-70-60-50-40-30-20-100theta/0功率indBmax-SNR功率谱126.ASC旁瓣相消----MSE准则(1)matlab程序clc;closeall;clearall;imag=sqrt(-1);M=32;%辅助天线数目d_lambda=0.5;%阵元间距theta0=-30;%来波方向theta1=60;%干扰方向L=512;%采样单元数s=zeros(1,512);%预划分一个区域forii=1:Lamp0=1*randn(1);%信号的幅度随机产生,保证信号之间是不相关的amp1=200*randn(1);ampn=1;jam(:,ii)=amp1*exp(imag*2*pi*d_lambda*sin(theta1*pi/180)*[0:M-1]')+ampn*(randn(M,1)+imag*randn(M,1));%干扰+噪声s(ii)=amp0*exp(imag*2*pi*d_lambda*sin(
本文标题:(完整word版)自适应波束形成与Matlab程序代码注解
链接地址:https://www.777doc.com/doc-6419064 .html