資源描述:
《數(shù)字信號(hào)處理仿真作業(yè)》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫。
1、作業(yè)1(1)求A=[1-a1-a2;0-(1+a2)0;0-a1-1];b=[r0a1*r0a2*r0]';x=inv(A)*b;%x=[sigma_vr1r2]';sigma_v=x(1);r1=x(2);r2=x(3);只要更改a1和a2的值,得到a1a2PPr(1)r(2)-0.1950.950.09650.0975+0.9698i0.0975-0.9698i0.1000-0.9305-1.5950.950.03230.7975+0.5604i0.7975-0.5604i0.81790.3546-1.9114
2、0.950.00380.9557+0.1914i0.9557-0.1914i0.98020.9236(2)產(chǎn)生序列data_len=1024;trials=100;n=1:data_len;a1=-1.9114;a2=0.95;sigma_v_2=0.;v=sqrt(sigma_v_2)*randn(data_len,1,trials);u0=[00];num=1;den=[1a1a2];Zi=filtic(num,den,u0);u=filter(num,den,v,Zi)un=zeros(1,1024)forh
3、=1:1024un(h)=u(h);end(2)的估計(jì)p=128;r0=xcorr(u,p,'unbiased')';r=r0(p+1:2*p+1)'stem(1:257,r0)(3)SAR(ω)、SBT(ω)、SPER(ω)SAR(ω)圖和程序如下:NF=1024;Spr=fftshift((1/NF)*abs(fft(un,NF)).^2)'Spr=Spr/max(Spr);Spr_unit=10*log10(Spr);plot(1:1024,Spr_unit);SBT(ω)圖和程序如下:M=128;r=xco
4、rr(un,M,'biased');NF=1024;BT=fftshift(fft(r,NF));BT=BT/max(BT);BT_unit=10*log10(BT);plot(1:1024,BT_unit);SPER(ω)圖和程序如下:NF=1024;Par=sigma_v_2./fftshift(abs(fft([1,a1,a2],NF)).^2);Par=Par/max(Par);Par_unit=10*log10(Par);plot(1:1024,Par_unit);作業(yè)2(1)產(chǎn)生序列closeall;c
5、lear;clc;N=1024;Pv=-10;%-10dBsnr=10;a1=10^(snr/20);n=1:N;vn=randn(1,N);un=exp(j*pi*(1.4.*n-1))+exp(j*pi*(1.8.*n-0.9))+a1*vn;figure();plot(n,un);xlabel('n');ylabel('un')title('產(chǎn)生序列un')(2)的估計(jì)form=0:500rm_e(m+1)=un(m+1:N)*un(1:N-m)'/(N-m);%r(m)估計(jì)endfigure();plot(
6、1:500,rm_e(1:500));xlabel('m');ylabel('r(m)')title('自相關(guān)圖');(3)估計(jì)四階樣本自相關(guān)矩陣M=4;fork=1:N-Mxs(:,k)=un(k+M-1:-1:k).';endR=xs*xs'/(N-M);(2)SBT(ω)L=256;r=xcorr(un,L,'biased');NF=2048;BT=fftshift(fft(r,NF));BT=BT/max(BT);BT_unit=10*log10(BT);plot(1:2048,BT_unit);SMVDR
7、(ω)NF=2048;forn=1:NFAq=exp(-j*2*pi*(n-1)/NF*(0:M-1)');Pmvdr(n)=1/(Aq'*inv(R)*Aq);endPmvdr=Pmvdr/max(Pmvdr);Pmvdr_unit=10*log10(Pmvdr);plot(1:2048,Pmvdr_unit);SAR(ω)首先估計(jì)出自相關(guān)函數(shù)值r(0),r(1)...r(16);利用Levinson-Durbin迭代算法實(shí)現(xiàn)AR模型的系數(shù)的求出;最后計(jì)算16階AR模型的功率譜。p=16;r0=xcorr(un,
8、p,'unbiased')';r=r0(p+1:2*p+1)'%stem(1:33,r0)a(1,1)=-r(2)/r(1);sigma(1)=r(1)-(abs(r(2))^2)/r(1);form=2:pk(m)=-(r(m+1)+sum(a(m-1,1:m-1).*r(m:-1:2)))/sigma(m-1);a(m,m)=k(m);fori=1:m-