




版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、1.均勻線陣方向圖%8陣元均勻線陣方向圖,來(lái)波方向?yàn)?度clc;clear all;close all;imag=sqrt(-1);element_num=8;%陣元數(shù)為8d_lamda=1/2;%陣元間距d與波長(zhǎng)lamda的關(guān)系theta=linspace(-pi/2,pi/2,200);theta0=45/180*pi;%來(lái)波方向 (我覺得應(yīng)該是天線陣的指向)%theta0=0;%來(lái)波方向w=exp(imag*2*pi*d_lamda*sin(theta0)*0:element_num-1');for j=1:length(theta) %(我認(rèn)為是入射角度,即來(lái)波方向,計(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)用節(jié)陣列的方向圖當(dāng)來(lái)波方向?yàn)?5度時(shí),仿真圖如下:8陣元均勻線陣方向圖如下,來(lái)波方向
3、為0度,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; %波長(zhǎng)為0.03米d=1/2*lamda; %陣元間距與波長(zhǎng)的關(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_
4、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 radians
5、9;)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; %陣元間距與波長(zhǎng)的關(guān)系theta=linspace(-pi/2,pi/2,200);theta0=0; %來(lái)波方向(ayy應(yīng)該是陣列指向方向)w=exp(ima*2*pi*d_lamda*sin(theta0)
6、*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(linsp
7、ace(-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; %間距為半波長(zhǎng)theta=-90:0.5:90; %范圍theta0=0; %來(lái)波方向theta1=20; %干擾方向L=512; %采樣單元數(shù)for i=1:L amp0=
8、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);subplo
10、t(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、;title('max-SNR功率譜')仿真圖如下:6. %ASC旁瓣相消-MSE準(zhǔn)則clc;close all;clear allima=sqrt(-1);M=32; %輔助天線的數(shù)目d_lamda=.5;theta0=-30; %來(lái)波方向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*sin(th
12、eta1*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/L*jam
13、*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 onplot
14、(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; %陣元間距與波長(zhǎng)的關(guān)系theta=-90:0.5:90-0.3; %搜索
15、范圍theta0=0; %三個(gè)信號(hào)源的來(lái)波方向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(theta
16、2*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')C=s
17、teer1 steer2 steer3;F=1 0 1' %把三個(gè)方向都作為來(lái)波方向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,hold o
18、nplot(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(theta0,-
19、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; %陣元間距與波長(zhǎng)的關(guān)系theta=-90:0.5:90; %范圍theta0=
20、0; %來(lái)波方向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*exp(ima
21、*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(j)*p
22、i/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('the
23、ta/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; %陣元數(shù)為8d
24、_lamda=1/2; %間距為半波長(zhǎng)theta=-90:0.5:90; %范圍theta0=0; %來(lái)波方向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*exp(ima
25、*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');%來(lái)波方向信號(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:length
26、(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
27、,'.')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; %陣元間距與波長(zhǎng)的關(guān)系theta=-90:0.3:90; %搜索范圍theta0=0; %來(lái)波方向theta1=20; %干擾方向theta2=50; %干
28、擾方向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、.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(theta,F)
31、,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,'.');pl
32、ot(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; %陣元間距與波長(zhǎng)的關(guān)系theta=-90:0.5:90; %范圍theta0=0; %來(lái)波方向theta1=45; %干擾方向theta2=6
33、0; %干擾方向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. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 三年級(jí)下冊(cè)數(shù)學(xué)教案-3.1 解決問(wèn)題的策略-從條件想起丨蘇教版
- 一年級(jí)下冊(cè)數(shù)學(xué)教案-7.2 變葫蘆| 青島版(五四學(xué)制)
- Unit 3 Section A (1a-1c)教學(xué)設(shè)計(jì) 2024-2025學(xué)年人教版八年級(jí)英語(yǔ)上冊(cè)
- 2025年貴州機(jī)電職業(yè)技術(shù)學(xué)院?jiǎn)握新殬I(yè)傾向性測(cè)試題庫(kù)必考題
- 2025年嘉興南湖學(xué)院?jiǎn)握新殬I(yè)傾向性測(cè)試題庫(kù)完整版
- 物理-云南省三校2025屆高三2月高考備考聯(lián)考卷(六)試題和答案
- 2025年哈爾濱鐵道職業(yè)技術(shù)學(xué)院?jiǎn)握新殬I(yè)傾向性測(cè)試題庫(kù)必考題
- 2025屆黑龍江佳木斯一中高三上學(xué)期五調(diào)政治試題及答案
- 2025年度工傷賠償協(xié)議范本(房地產(chǎn)行業(yè))
- 2025年湖南都市職業(yè)學(xué)院?jiǎn)握新殬I(yè)技能測(cè)試題庫(kù)帶答案
- DBJ50-T-100-2022 建筑邊坡工程施工質(zhì)量驗(yàn)收標(biāo)準(zhǔn)
- 2025年中考語(yǔ)文模擬試卷(含答案解析)
- 2025年寧夏工商職業(yè)技術(shù)學(xué)院高職單招職業(yè)適應(yīng)性測(cè)試近5年??及鎱⒖碱}庫(kù)含答案解析
- 2025版校園樂(lè)器銷售代理與服務(wù)協(xié)議3篇
- DB11-T 1004-2023 房屋建筑使用安全檢查評(píng)定技術(shù)規(guī)程
- 2024-2025年天津河西區(qū)七年級(jí)上學(xué)期期末道德與法治試題(含答案)
- 《藝術(shù)與傳播》課件
- 烹飪安全知識(shí)培訓(xùn)課件
- 《智慧旅游認(rèn)知與實(shí)踐》課件-第九章 智慧旅行社
- 馬工程《刑法學(xué)(下冊(cè))》教學(xué)課件 第16章 刑法各論概述
評(píng)論
0/150
提交評(píng)論