![波束形成 Matlab程序[精校版本]_第1頁](http://file1.renrendoc.com/fileroot_temp2/2021-1/28/83d565e0-84e3-406f-a307-753b1f9993bc/83d565e0-84e3-406f-a307-753b1f9993bc1.gif)
![波束形成 Matlab程序[精校版本]_第2頁](http://file1.renrendoc.com/fileroot_temp2/2021-1/28/83d565e0-84e3-406f-a307-753b1f9993bc/83d565e0-84e3-406f-a307-753b1f9993bc2.gif)
![波束形成 Matlab程序[精校版本]_第3頁](http://file1.renrendoc.com/fileroot_temp2/2021-1/28/83d565e0-84e3-406f-a307-753b1f9993bc/83d565e0-84e3-406f-a307-753b1f9993bc3.gif)
![波束形成 Matlab程序[精校版本]_第4頁](http://file1.renrendoc.com/fileroot_temp2/2021-1/28/83d565e0-84e3-406f-a307-753b1f9993bc/83d565e0-84e3-406f-a307-753b1f9993bc4.gif)
![波束形成 Matlab程序[精校版本]_第5頁](http://file1.renrendoc.com/fileroot_temp2/2021-1/28/83d565e0-84e3-406f-a307-753b1f9993bc/83d565e0-84e3-406f-a307-753b1f9993bc5.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、1.均勻線陣方向圖%8陣元均勻線陣方向圖,來波方向?yàn)?度clc;clear all;close all;imag=sqrt(-1);element_num=8;%陣元數(shù)為8d_lamda=1/2;%陣元間距d與波長lamda的關(guān)系theta=linspace(-pi/2,pi/2,200);theta0=0;%來波方向w=exp(imag*2*pi*d_lamda*sin(theta0)*0:element_num-1);for j=1:length(theta) a=exp(imag*2*pi*d_lamda*sin(theta(j)*0:element_num-1); p(j)=w*a;e
2、ndfigure;plot(theta,abs(p),grid onxlabel(theta/radian)ylabel(amplitude)title(8陣元均勻線陣方向圖)當(dāng)來波方向?yàn)?5度時,仿真圖如下:8陣元均勻線陣方向圖如下,來波方向?yàn)?度,20log(dB)隨著陣元數(shù)的增加,波束寬度變窄,分辨力提高:仿真圖如下:2. 波束寬度與波達(dá)方向及陣元數(shù)的關(guān)系clcclear all close allima=sqrt(-1);element_num1=16; %陣元數(shù)element_num2=128; element_num3=1024; lamda=0.03; %波長為0.03米d=1/
3、2*lamda; %陣元間距與波長的關(guān)系theta=0:0.5:90;for j=1:length(theta); fai(j)=theta(j)*pi/180-asin(sin(theta(j)*pi/180)-lamda/(element_num1*d); psi(j)=theta(j)*pi/180-asin(sin(theta(j)*pi/180)-lamda/(element_num2*d); beta(j)=theta(j)*pi/180-asin(sin(theta(j)*pi/180)-lamda/(element_num3*d);endfigure;plot(theta,fa
4、i,r,theta,psi,b,theta,beta,g),grid onxlabel(theta);ylabel(Width in radians)title(波束寬度與波達(dá)方向及陣元數(shù)的關(guān)系)仿真圖如下:3. 當(dāng)陣元間距 時,會出現(xiàn)柵瓣,導(dǎo)致空間模糊。仿真圖如下:4. 類似于時域?yàn)V波,天線方向圖是最優(yōu)權(quán)的傅立葉變換仿真程序和仿真圖如下:clcclear all close allima=sqrt(-1);element_num=32; %陣元數(shù)source_num=1; %信源數(shù)d_lamda=1/2; %陣元間距與波長的關(guān)系theta=linspace(-pi/2,pi/2,200);t
5、heta0=0; %來波方向w=exp(ima*2*pi*d_lamda*sin(theta0)*0:element_num-1);for j=1:length(theta); a=exp(ima*2*pi*d_lamda*sin(theta(j)*0:element_num-1); p(j)=w*a; end figure;subplot(1,2,1)plot(theta,abs(p),grid onxlabel(theta/radian)ylabel(amplitude)title(按定義的方向圖)pfft=fftshift(fft(w,128);subplot(1,2,2)plot(li
6、nspace(-pi/2,pi/2,128),abs(pfft),grid onxlabel(theta/radian)ylabel(FFT_amplitude)title(最優(yōu)權(quán)的傅里葉變換)5. %最大信噪比準(zhǔn)則方向圖和功率譜clc;clear all;close all;ima=sqrt(-1);element_num=8; %陣元數(shù)為8d_lamda=1/2; %間距為半波長theta=-90:0.5:90; %范圍theta0=0; %來波方向theta1=20; %干擾方向L=512; %采樣單元數(shù)for i=1:L amp0=10*randn(1); amp1=200*randn
7、(1); ampn=1; s(:,i)=amp0*exp(ima*2*pi*1/2*sin(theta0*pi/180)*0:element_num-1); j(:,i)=amp1*exp(ima*2*pi*1/2*sin(theta1*pi/180)*0:element_num-1); n(:,i)=ampn*(randn(element_num,1)+ima*randn(element_num,1);endRs=1/L*s*s; %信號自相關(guān)矩陣Rnj=1/L*(j*j+n*n); %干擾+噪聲的自相關(guān)矩陣V,D=eig(Rs,Rnj); %(Rs,Rnj)的廣義特征值和特征向量D,I=s
8、ort(diag(D); %排序Wopt=V(:,I(8); %最優(yōu)權(quán)矢量for j=1:length(theta) a=exp(ima*2*pi*d_lamda*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(121)plot(theta,F);grid on;hold onplot(theta0,-50:0,.);plot(theta1,-50
9、:0,.)xlabel(theta/0);ylabel(F in dB);title(max-SNR 方向圖);axis(-90 90 -50 0);hold onsubplot(122)plot(theta,P,r);grid onxlabel(theta/0);ylabel(功率 in dB);title(max-SNR功率譜)仿真圖如下:6. %ASC旁瓣相消-MSE準(zhǔn)則clc;close all;clear allima=sqrt(-1);M=32; %輔助天線的數(shù)目d_lamda=.5;theta0=-30; %來波方向theta1=60; %干擾方向 L=512; %采樣單元數(shù)s=
10、zeros(1,512); %預(yù)劃分一個區(qū)域for ii=1:L; amp0=1*randn(1); %信號的幅度隨機(jī)產(chǎn)生,保證信號之間是不相關(guān)的 amp1=200*randn(1); ampn=1; jam(:,ii)=amp1*exp(ima*2*pi*0.5*sin(theta1*pi/180)*0:M-1)+ampn*(randn(M,1)+ima*randn(M,1); %干擾+噪聲 s(ii)=amp0*exp(ima*2*pi*0.5*sin(theta0*pi/180)+amp1*exp(ima*2*pi*0.5*sin(theta1*pi/180)+ampn*(randn(1
11、,1)+ima*randn(1,1);%接收信號(信號+干擾+噪聲) s0(ii)=amp0*exp(ima*2*pi*0.5*sin(theta0*pi/180);endRx=1/L*jam*jam; %噪聲自相關(guān)矩陣,相當(dāng)于X(t)r_xd=1/L*jam*s;Wopt=pinv(Rx)*r_xd;delta=s0-(s-Wopt*jam);delta1=abs(mean(delta.2)-(mean(delta).2) %方差theta=linspace(-pi/2,pi/2,200);for jj=1:length(theta) a=exp(ima*2*pi*.5*sin(theta(
12、jj)*0:M-1); f(jj)=Wopt*a;endF=20*log10(abs(f)/(max(max(abs(f);figure(1)plot(theta*180/pi,F),grid on,hold onplot(theta0,-50:0,.)plot(theta1,-50:0,.)xlabel(theta/o);ylabel(F/dB);title(MSE準(zhǔn)則下的方向圖)axis(-90 90 -50 0);%可為x軸和y軸設(shè)置一個極限范圍仿真圖如下:7. %線性約束最小方差(LCMV)準(zhǔn)則 clc;clear all ;close all;ima=sqrt(-1);element
13、_num=8; %陣元數(shù)d_lamda=1/2; %陣元間距與波長的關(guān)系theta=-90:0.5:90-0.3; %搜索范圍theta0=0; %三個信號源的來波方向theta1=30; theta2=60;L=512; %采樣單元數(shù)for i=1:L; amp0=10*randn(1); amp1=100*randn(1); amp2=10*randn(1); ampn=10; x(:,i)=amp0*exp(ima*2*pi*1/2*sin(theta0*pi/180)*0:element_num-1)+. amp1*exp(ima*2*pi*1/2*sin(theta1*pi/180)
14、*0:element_num-1)+. amp2*exp(ima*2*pi*1/2*sin(theta2*pi/180)*0:element_num-1)+. ampn*(randn(element_num,1)+ima*randn(element_num,1);endRx=1/L*x* x;steer1=exp(ima*2*pi*1/2*sin(theta0*pi/180)*0:element_num-1)steer2=exp(ima*2*pi*1/2*sin(theta1*pi/180)*0:element_num-1)steer3=exp(ima*2*pi*1/2*sin(theta2*
15、pi/180)*0:element_num-1)C=steer1 steer2 steer3;F=1 0 1; %把三個方向都作為來波方向w=inv(Rx)*C*(inv(C*inv(Rx)*C)*F;for j=1:length(theta); a=exp(ima*2*pi*d_lamda*sin(theta(j)*pi/180)*0:element_num-1); f(j)=w*a; p(j)=1/(a*inv(Rx)*a);endf=10*log10(abs(f)/(max(max(abs(f);figure(1)subplot(121)plot(theta,f),grid on,hol
16、d onplot(theta0,-20:0,.)plot(theta1,-20:0,.)plot(theta2,-20:0,.)xlabel(theta/o);ylabel(F/dB);title(Capon beamforming方向圖)axis(-90 90 -20 0);%可為x軸和y軸設(shè)置一個極限范圍P=10*log10(abs(p)/(max(max(abs(p);subplot(122)plot(theta,P),grid on,hold onplot(theta0,-20:0,.)plot(theta1,-20:0,.)plot(theta2,-20:0,.)xlabel(the
17、ta/o);ylabel(功率/dB);title(Capon beamforming功率譜)仿真圖如下:8. %Capon beamformingClc;clear all ;close all;ima=sqrt(-1);element_num=8; %陣元數(shù)d_lamda=1/2; %陣元間距與波長的關(guān)系theta=-90:0.5:90; %范圍theta0=0; %來波方向theta1=20; %干擾方向theta2=60; %干擾方向L=1000; %采樣單元數(shù)for i=1:L; amp0=10*randn(1);%信號的幅度隨機(jī)產(chǎn)生,保證信號之間是不相關(guān)的 amp1=200*ran
18、dn(1); amp2=200*randn(1); ampn=3; x(:,i)=amp0*exp(ima*2*pi*1/2*sin(theta0*pi/180)*0:element_num-1)+. amp1*exp(ima*2*pi*1/2*sin(theta1*pi/180)*0:element_num-1)+. amp2*exp(ima*2*pi*1/2*sin(theta2*pi/180)*0:element_num-1)+. ampn*(randn(element_num,1)+ima*randn(element_num,1);endRx=1/L*x* x;R=inv(Rx);st
19、eer=exp(ima*2*pi*1/2*sin(theta0*pi/180)*0:element_num-1);w=R*steer/(steer*R*steer);%Capon最優(yōu)權(quán)矢量for j=1:length(theta); a=exp(ima*2*pi*d_lamda*sin(theta(j)*pi/180)*0:element_num-1); f(j)=w*a; p(j)=1/(a*R*a);endF=20*log10(abs(f)/(max(max(abs(f);P=20*log10(abs(p)/(max(max(abs(p);%此處是功率的對數(shù)形式Figure;subplot
20、(121)plot(theta,F),grid on,hold onplot(theta0,-50:0,.)plot(theta1,-50:0,.)plot(theta2,-50:0,.)xlabel(theta/o);ylabel(F/dB);title(Capon beamforming方向圖)axis(-90 90 -50 0);subplot(122)plot(theta,P),grid onxlabel(theta/o);ylabel(功率/dB);title(Capon beamforming功率譜)仿真圖如下:9. %不同方法估計協(xié)方差矩陣的Capon波束形成clc;clear
21、all;close all;ima=sqrt(-1);element_num=8; %陣元數(shù)為8d_lamda=1/2; %間距為半波長theta=-90:0.5:90; %范圍theta0=0; %來波方向theta1=50; %干擾方向L=512;%采樣單元數(shù)for i=1:L amp0=10*randn(1); amp1=50*randn(1); ampn=0.5; s(:,i)=amp0*exp(ima*2*pi*1/2*sin(theta0*pi/180)*0:element_num-1); j(:,i)=amp1*exp(ima*2*pi*1/2*sin(theta1*pi/180
22、)*0:element_num-1); n(:,i)=ampn*exp(ima*2*pi*randn(1)*0:element_num-1);endRx=1/L*(s+j+n)*(s+j+n);%接收信號自相關(guān)矩陣Rnj=1/L*(j+n)*(j+n);%干攏+噪聲的自相關(guān)矩陣e=exp(ima*2*pi*d_lamda*sin(theta0*pi/180)*0:element_num-1);%來波方向信號Wopt_Rx=inv(Rx)*e/(e*inv(Rx)*e);%采用接收信號的權(quán)矢量Wopt_Rnj=inv(Rnj)*e/(e*inv(Rnj)*e);%采用干攏+噪聲信號的權(quán)矢量for
23、 j=1:length(theta) a=exp(ima*2*pi*d_lamda*sin(theta(j)*pi/180)*0:element_num-1); f1(j)=Wopt_Rx*a; f2(j)=Wopt_Rnj*a;endF1=20*log10(abs(f1)/max(max(abs(f1);F2=20*log10(abs(f2)/max(max(abs(f2);figure;plot(theta,F1,theta,F2,r),grid on;hold onplot(theta0,-50:0,.);plot(theta1,-50:0,.)xlabel(theta/0);ylabe
24、l(F(1,2)/dB);title(不同方法估計協(xié)方差矩陣的Capon波束形成);axis(-90 90 -50 0);仿真圖如下:10%多點(diǎn)約束的Capon波束形成和方向圖clc;clear all ;close all;ima=sqrt(-1);element_num=8; %陣元數(shù)d_lamda=1/2; %陣元間距與波長的關(guān)系theta=-90:0.3:90; %搜索范圍theta0=0; %來波方向theta1=20; %干擾方向theta2=50; %干擾方向L=512; %采樣單元數(shù)Rx=zeros(element_num,element_num);%產(chǎn)生協(xié)方差矩陣for i=
25、1:L; amp0=10*randn(1); amp1=10*randn(1); amp2=50*randn(1); namp=0.5*randn(1);%噪聲的幅度隨機(jī)產(chǎn)生,保證噪聲與信號之間是不相關(guān)的 J(:,i)=amp1*exp(ima*2*pi*1/2*sin(theta1*pi/180)*0:element_num-1)+. amp2*exp(ima*2*pi*1/2*sin(theta2*pi/180)*0:element_num-1)+. namp*exp(ima*2*pi*randn(1)*0:element_num-1); x(:,i)=amp0*exp(ima*2*pi*
26、1/2*sin(theta0*pi/180)*0:element_num-1)+. J(:,i);%表示接收信號endRx=Rx+1/L*x*x;R=inv(Rx);w=amp0*exp(ima*2*pi*1/2*sin(theta0*pi/180)*0:element_num-1)+.amp2*exp(ima*2*pi*1/2*sin(theta2*pi/180)*0:element_num-1)+.amp1*exp(ima*2*pi*1/2*sin(theta1*pi/180)*0:element_num-1);for j=1:length(theta); a=exp(ima*2*pi*d
27、_lamda*sin(theta(j)*pi/180)*0:element_num-1); f(j)=w*a; p(j)=1/(a*R*a);endF=10*log10(abs(f)/max(max(f);%取對數(shù)的方向圖P=10*log10(abs(p)/max(max(p);%取對數(shù)的功率譜估計figure;subplot(121)plot(theta,F),grid on,hold onplot(theta0,-50:0,.);plot(theta1,-50:0,.);plot(theta2,-50:0,.);xlabel(theta/o);ylabel(F/dB);title(capo
28、n beamforming方向圖)subplot(122)plot(theta,P),grid on,hold onplot(theta0,-50:0,.);plot(theta1,-50:0,.);plot(theta2,-50:0,.);xlabel(theta/o);ylabel(P/dB);title(capon beamforming功率譜)仿真圖如下:大作業(yè)%自適應(yīng)波束形成方向圖clc;clear all; close all;ima=sqrt(-1);element_num=8; %陣元數(shù)c=3e8;f=500e6;lamda=c/f;d=1/2*lamda; %陣元間距與波長的
29、關(guān)系theta=-90:0.5:90; %范圍theta0=0; %來波方向theta1=45; %干擾方向theta2=60; %干擾方向L=512; %采樣單元數(shù)for i=1:L; amp0=10*randn(1);%信號的幅度隨機(jī)產(chǎn)生,保證信號之間是不相關(guān)的 amp1=100*randn(1); amp2=100*randn(1); ampn=10; x(:,i)=amp0*exp(ima*2*pi*1/2*sin(theta0*pi/180)*0:element_num-1)+. amp1*exp(ima*2*pi*1/2*sin(theta1*pi/180)*0:element_n
30、um-1)+. amp2*exp(ima*2*pi*1/2*sin(theta2*pi/180)*0:element_num-1)+. ampn*(randn(element_num,1)+ima*randn(element_num,1);%產(chǎn)生陣列信號endRx=1/L*x* x;steer1=exp(ima*2*pi*1/2*sin(theta0*pi/180)*0:element_num-1)steer2=exp(ima*2*pi*1/2*sin(theta1*pi/180)*0:element_num-1)steer3=exp(ima*2*pi*1/2*sin(theta2*pi/180)*0
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024年激光技術(shù)工程師證書的職業(yè)定義試題及答案
- 收心考試試題及答案小學(xué)
- 專利申請的國外經(jīng)驗(yàn)借鑒試題及答案
- 文化產(chǎn)業(yè)管理考試重要概念試題及答案
- 廣州近年英語試題及答案
- 母豬疫病監(jiān)測及檢測方法試題及答案
- 夏季趣味測試題及答案
- 專利代理人考試的知識架構(gòu)試題及答案
- 激光切割的質(zhì)量標(biāo)準(zhǔn)試題及答案
- 作業(yè)員培訓(xùn)試題及答案
- 2025年共青團(tuán)應(yīng)知應(yīng)會知識考試題庫及答案
- 2025-2030中國傳感器行業(yè)市場深度調(diào)研及競爭格局與投資研究報告
- 2025年3月時事政治考題及參考答案
- 危險性較大的分部分項工程專項施工方案嚴(yán)重缺陷清單(試行)
- 公務(wù)接待考試題及答案
- 2025年上半年第二次商務(wù)部國際貿(mào)易經(jīng)濟(jì)合作研究院招聘7人重點(diǎn)基礎(chǔ)提升(共500題)附帶答案詳解
- 2025年危險化學(xué)品安全生產(chǎn)培訓(xùn)教材試題庫
- 羽毛球賽事組織與管理的
- 小學(xué)生戰(zhàn)斗機(jī)介紹課件圖片
- 第一講緒論精神病學(xué)講解
- 人教版 七年級 下冊 語文 第四單元《青春之光》課件
評論
0/150
提交評論