![波束形成_Matlab程序_第1頁](http://file3.renrendoc.com/fileroot_temp3/2022-3/7/5f9085ec-2587-4140-9af4-7c1ad75da723/5f9085ec-2587-4140-9af4-7c1ad75da7231.gif)
![波束形成_Matlab程序_第2頁](http://file3.renrendoc.com/fileroot_temp3/2022-3/7/5f9085ec-2587-4140-9af4-7c1ad75da723/5f9085ec-2587-4140-9af4-7c1ad75da7232.gif)
![波束形成_Matlab程序_第3頁](http://file3.renrendoc.com/fileroot_temp3/2022-3/7/5f9085ec-2587-4140-9af4-7c1ad75da723/5f9085ec-2587-4140-9af4-7c1ad75da7233.gif)
![波束形成_Matlab程序_第4頁](http://file3.renrendoc.com/fileroot_temp3/2022-3/7/5f9085ec-2587-4140-9af4-7c1ad75da723/5f9085ec-2587-4140-9af4-7c1ad75da7234.gif)
![波束形成_Matlab程序_第5頁](http://file3.renrendoc.com/fileroot_temp3/2022-3/7/5f9085ec-2587-4140-9af4-7c1ad75da723/5f9085ec-2587-4140-9af4-7c1ad75da7235.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(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=45/180*pi;%來波方向 (我覺得應(yīng)該是天線陣的指向)%theta0=0;%來波方向w=exp(imag*2*pi*d_lamda*sin(theta0)*0:element_num-1');for j=1:length(theta) %(我認(rèn)為是入射角度,即來波方向,計(jì)算陣列流
2、形矩陣A) a=exp(imag*2*pi*d_lamda*sin(theta(j)*0:element_num-1'); p(j)=w'*a; %(matlab中的'默認(rèn)為共軛轉(zhuǎn)置,如果要計(jì)算轉(zhuǎn)置為w.'*a)endfigure;plot(theta,abs(p),grid onxlabel('theta/radian')ylabel('amplitude')title('8陣元均勻線陣方向圖')見張小飛的書陣列信號(hào)處理的理論和應(yīng)用2.3.4節(jié)陣列的方向圖當(dāng)來波方向?yàn)?5度時(shí),仿真圖如下:8陣元均勻線陣方向圖如下
3、,來波方向?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/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/(ele
4、ment_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,fai,'r',theta,psi,'b',theta,beta,'g'),grid onxlabel('theta');ylabel('Width in radia
5、ns')title('波束寬度與波達(dá)方向及陣元數(shù)的關(guān)系')仿真圖如下:3. 當(dāng)陣元間距 時(shí),會(huì)出現(xiàn)柵瓣,導(dǎo)致空間模糊。仿真圖如下:4. 類似于時(shí)域?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);theta0=0; %來波方向(ayy應(yīng)該是陣列指向方向)w=exp(ima*2*pi*d_lamda*sin(th
6、eta0)*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(
7、linspace(-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
8、amp0=10*randn(1); amp1=200*randn(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' %信號(hào)自相關(guān)矩陣Rnj=1/L*(j*j'+n*n')
9、; %干擾+噪聲的自相關(guān)矩陣V,D=eig(Rs,Rnj); %(Rs,Rnj)的廣義特征值和特征向量D,I=sort(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);s
10、ubplot(121)plot(theta,F);grid on;hold onplot(theta0,-50:0,'.');plot(theta1,-50: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&
11、#39;);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=zeros(1,512); %預(yù)劃分一個(gè)區(qū)域for ii=1:L; amp0=1*randn(1); %信號(hào)的幅度隨機(jī)產(chǎn)生,保證信號(hào)之間是不相關(guān)的 amp1=200*randn(1); ampn=1; jam(:,ii)=amp1*exp(ima*2*pi*0.5*s
12、in(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,1)+ima*randn(1,1);%接收信號(hào)(信號(hào)+干擾+噪聲) 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/
13、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(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 o
14、nplot(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è)置一個(gè)極限范圍仿真圖如下:7. %線性約束最小方差(LCMV)準(zhǔn)則 clc;clear all ;close all;ima=sqrt(-1);element_num=8; %陣元數(shù)d_lamda=1/2; %陣元間距與波長的關(guān)系theta=-90:0.5:90-0.3
15、; %搜索范圍theta0=0; %三個(gè)信號(hào)源的來波方向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)*0:element_num-1')+. amp2*exp(ima*2*pi*1/2*sin(
16、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*pi/180)*0:element_num-1'
17、;)C=steer1 steer2 steer3;F=1 0 1' %把三個(gè)方向都作為來波方向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,h
18、old 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è)置一個(gè)極限范圍P=10*log10(abs(p)/(max(max(abs(p);subplot(122)plot(theta,P),grid on,hold onplot(the
19、ta0,-20:0,'.')plot(theta1,-20:0,'.')plot(theta2,-20:0,'.')xlabel('theta/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; %范圍th
20、eta0=0; %來波方向theta1=20; %干擾方向theta2=60; %干擾方向L=1000; %采樣單元數(shù)for i=1:L; amp0=10*randn(1);%信號(hào)的幅度隨機(jī)產(chǎn)生,保證信號(hào)之間是不相關(guān)的 amp1=200*randn(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*ex
21、p(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);steer=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
22、(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);%此處是功率的對(duì)數(shù)形式Figure;subplot(121)plot(theta,F),grid on,hold onplot(theta0,-50:0,'.')plot(theta1,-50:0,'.')plot(theta2,-50:0,'.')xlabel(
23、9;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. %不同方法估計(jì)協(xié)方差矩陣的Capon波束形成clc;clear all;close all;ima=sqrt(-1);element_num=8; %陣
24、元數(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)*0:element_num-1'); n(:,i)=ampn*ex
25、p(ima*2*pi*randn(1)*0:element_num-1');endRx=1/L*(s+j+n)*(s+j+n)'%接收信號(hào)自相關(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');%來波方向信號(hào)Wopt_Rx=inv(Rx)*e/(e'*inv(Rx)*e);%采用接收信號(hào)的權(quán)矢量Wopt_Rnj=inv(Rnj)*e/(e'*inv(Rnj)*e);%采用干攏+噪聲信號(hào)的權(quán)矢量for j=1:l
26、ength(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,
27、-50:0,'.')xlabel('theta/0');ylabel('F(1,2)/dB');title('不同方法估計(jì)協(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=5
28、0; %干擾方向L=512; %采樣單元數(shù)Rx=zeros(element_num,element_num);%產(chǎn)生協(xié)方差矩陣for i=1:L; amp0=10*randn(1); amp1=10*randn(1); amp2=50*randn(1); namp=0.5*randn(1);%噪聲的幅度隨機(jī)產(chǎn)生,保證噪聲與信號(hào)之間是不相關(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
29、')+. namp*exp(ima*2*pi*randn(1)*0:element_num-1'); x(:,i)=amp0*exp(ima*2*pi*1/2*sin(theta0*pi/180)*0:element_num-1')+. J(:,i);%表示接收信號(hào)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
30、39;)+.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_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);%取對(duì)數(shù)的方向圖P=10*log10(abs(p)/max(max(p);%取對(duì)數(shù)的功率譜估計(jì)figure;subplot(121)plot(the
31、ta,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方向圖')subplot(122)plot(theta,P),grid on,hold onplot(theta0,-50:0,'.');plot(theta1,-50:0,'.'
32、;);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; %陣元間距與波長的關(guān)系theta=-90:0.5:90; %范圍theta0=0; %來波方向theta1=45; %干擾方向the
33、ta2=60; %干擾方向L=512; %采樣單元數(shù)for i=1:L; amp0=10*randn(1);%信號(hào)的幅度隨機(jī)產(chǎn)生,保證信號(hào)之間是不相關(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_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);%產(chǎn)生陣列信號(hào)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(t
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 【正版授權(quán)】 ISO/IEC 15045-3-1:2024 EN Information technology - Home Electronic System (HES) gateway - Part 3-1: Privacy,security,and safety - Introduction
- 手?jǐn)?shù)控機(jī)床買賣合同書
- 能源領(lǐng)域合作開發(fā)協(xié)議書
- 數(shù)據(jù)處理與分析服務(wù)合同
- 游戲行業(yè)虛擬物品交易風(fēng)險(xiǎn)協(xié)議
- 個(gè)人與公司買賣協(xié)議
- 提前終止房屋租賃合同
- 電子商務(wù)入職合同
- 國慶文藝匯演活動(dòng)方案
- 建設(shè)工程管井合同
- 酒店長包房租賃協(xié)議書范本
- 2025年幾內(nèi)亞水泥廠項(xiàng)目投資可行性報(bào)告
- 【道法】開學(xué)第一課 課件-2024-2025學(xué)年統(tǒng)編版道德與法治七年級(jí)下冊(cè)
- 口腔門診分診流程
- 2025年春新外研版(三起)英語三年級(jí)下冊(cè)課件 Unit2第1課時(shí)Startup
- 2025年上半年天津市寧河區(qū)事業(yè)單位招聘12人重點(diǎn)基礎(chǔ)提升(共500題)附帶答案詳解-1
- 心肺復(fù)蘇課件
- 2024-2030年“一帶一路”背景下中國鐵塊礦產(chǎn)業(yè)未來發(fā)展趨勢及投資策略分析報(bào)告
- 中華民族共同體概論專家講座第一講中華民族共同體基礎(chǔ)理論
- 鋼包熱修工安全技術(shù)操作規(guī)程(3篇)
- 2024年云南省公務(wù)員錄用考試《行測》真題卷及答案解析
評(píng)論
0/150
提交評(píng)論