西安电子科技大学-数字信号处理-试卷A答案

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

Answerto“DigitalSignalProcessing”Problem1(a).x1(n)={3,7,-2,-1,5,-8},n1=-2:3x2(n)={3,7,-2,-1,5,-8},n2=1:6x3(n)={-8,5,-1,-2,7,3},n3=-2:3[3points](b)y(n)={14,9,-3,21,-11,-17,-5,-40,0},n=-2:6[3points](c).MATLABprogram:clear,closeall;n=0:5;x=[3,7,-2,-1,5,-8];[x1,n1]=sigshift(x,n,-2);[x2,n2]=sigshift(x,n,1);[x3,n3]=sigfold(x,n);[x3,n3]=sigshift(x3,n3,3);[y1,yn1]=sigadd(2*x1,n1,x2,n2);[y1,yn1]=sigadd(y1,yn1,-x3,n3);[3points]stem(yn1,y1);title('sequenceY(n)’)Problem2(a)234562456()()4320234432234jjnnjjjjjjjjjjjXexneeeeeeeeeeee()jXeisperiodicinwithperiod2.[5points](b)Matlabprogram:clear;closeall;n=0:6;x=[4,3,2,0,2,3,4];w=[0:1:100]*pi/100;X=x*exp(-j*n'*w);magX=abs(X);phaX=angle(X);%MagnitudeResponsePlotsubplot(2,1,1);plot(w/pi,magX);grid;xlabel('frequencyinpiunits');ylabel('|X|');title('MagnitudeResponse');%Phaseresponseplotsubplot(2,1,2);plot(w/pi,phaX*180/pi);grid;xlabel('frequencyinpiunits');ylabel('Degrees');title('PhaseResponse');axis([0,1,-180,180])[5points](c)Becausethegivensequencex(n)={4,3,2,0,2,3,4}(n=0,1,2,3,4,5,6)issymmetricabout132N,thephaseresponse()jHesatisfiedthecondition()3jHesothephaseresponseisalinearfunctionin.[5points](d)sradfT300001.03.0[5points](e)Thedifferenceofamplitudeandmagnituderesponse:Firstly,theamplituderesponseisarealfunction,anditmaybebothpositiveandnegative.Themagnituderesponseisalwayspositive.Secondly,thephaseresponseassociatedwiththemagnituderesponseisadiscontinuousfunction.Whiletheassociatedwiththeamplitudeisacontinuouslinearfunction.[5points]Problem3(a)Pole-zeroplot–MATLABscript:b=[1,1,0];a=[1,0.5,-0.24];zplane(b,a)Figure:Pole-zeroplotinProblemA2Becauseallthepolesandzeroareallintheunitcircle,sothesystemisstable.[5points](b)Differenceequationrepresentation.:112()(1)/(10.50.24)hzzzz;Aftercrossmultiplyingandinversetransforming()0.5(1)0.24(2)()(2)ynynynxnxn;[5points](c)impulseresponsesequenceh(n)usingpartialfractionrepresentation:11()0.1818/(10.8)1.1818/(10.3)hzzz()(0.1818(0.8)1.1818(0.3))()nnhnun[5points](d)MATLABverification:(1)b=[1,1];a=[1,0.5,-0.24];[delta,n]=impseq(0,0,9)x=filter(b,a,delta)(2)n=[0:4];x=(-0.1818.*(-0.8).^n+1.1818.*(0.3).^n).*stepseq(0,0,9)[5points]Problem4(a)figure4.1figure4.2sequencex1(n)sequencex2(n)Theplotsofx1(n)andx2(n)isshowninfigure4.1andfigure4.2[4points](b)figure4.3Aftercalculate,wefindcircularconvolutionisequalwhenNis7or8.[4points](c)Ifcircularconvolutionisequaltolinearconvolution,theminimumNism+n-1=7.Theplotsofcircularconvolutionofx1(n)andx2(n)isshowninfigure4.3.[4points](d)MATLABprogram:clear,closeall;n=0:7;m=0:6;l=0:3;x1=[1,-1,1,-1];x2=[3,1,1,3];figure,stem(l,x1),title('sequencex1'),boxoff;figure,stem(l,x2),title('sequencex2'),boxoff;%8-pointcircularconvolutionx1_fft8=fft(x1,8);x2_fft8=fft(x2,8);y_fft8=x1_fft8.*x2_fft8;y8=real(ifft(y_fft8));figure,subplot(2,1,1),stem(n,y8),title('8-pointcircularconvolution'),axis([07-33]),boxoff;%7-pointcircularconvolutionx1_fft7=fft(x1,7);x2_fft7=fft(x2,7);y_fft7=x1_fft7.*x2_fft7;y7=real(ifft(y_fft7));subplot(2,1,2),stem(m,y7),title('7-pointcircularconvolution'),axis([07-33]),boxoff;[4points]Problem5(a)Blockdiagramsareshownasunder:1z1z1z1z1z1z1253521()xn()yn[4points]()xn()yn1z1z1z1z1z1z1253[4points](b)Theadvantageofthelinear-phaseform:1.Forfrequency-selectivefilters,linear-phasestructureisgenerallydesirabletohaveaphase-responsethatisalinearfunctionoffrequency.2.Thisstructurerequires50%fewermultiplicationsthanthedirectform.[2points]Problem6(a)weuseHammingwindowtodesignthebandpassfilterbecauseitcanprovideusattenuationexceed50dB[5points](b)MATLABverification:%%Specifications:ws1=0.3*pi;%lowerstopbandedgewp1=0.4*pi;%lowerpassbandedgewp2=0.5*pi;%upperpassbandedgews2=0.6*pi;%upperstopbandedgeRp=0.5;%passbandrippleAs=50;%stopbandattenuation%tr_width=min((wp1-ws1),(ws2-wp2));M=ceil(6.6*pi/tr_width);M=2*floor(M/2)+1,%chooseoddMn=0:M-1;w_ham=(hamming(M))';wc1=(ws1+wp1)/2;wc2=(ws2+wp2)/2;hd=ideal_lp(wc2,M)-ideal_lp(wc1,M);h=hd.*w_ham;[db,mag,pha,grd,w]=freqz_m(h,1);delta_w=pi/500;Asd=floor(-max(db([1:floor(ws1/delta_w)+1]))),%ActualAttnRpd=-min(db(ceil(wp1/delta_w)+1:floor(wp2/delta_w)+1)),%Actualpassbandripple(5)%%%FilterResponsePlotssubplot(2,2,1);stem(n,hd);title('IdealImpulseResponse:Bandpass');axis([-1,M,min(hd)-0.1,max(hd)+0.1]);xlabel('n');ylabel('hd(n)')set(gca,'XTickMode','manual','XTick',[0;M-1],'fontsize',10)subplot(2,2,2);stem(n,w_ham);title('HammingWindow');axis([-1,M,-0.1,1.1]);xlabel('n');ylabel('w_ham(n)')set(gca,'XTickMode','manual','XTick',[0;M-1],'fontsize',10)set(gca,'YTickMode','manual','YTick',[0;1],'fontsize',10)subplot(2,2,3);stem(n,h);title('ActualImpulseResponse:Bandpass');axis([-1,M,min(hd)-0.1,max(hd)+0.1]);xlabel('n');ylabel('h(n)')set(gca,'XTickMode','manual','XTick',[0;M-1],'fontsize',10)subplot(2,2,4);plot(w/pi,db);title('MagnitudeResponseindB');axis([0,1,-As-30,5]);xlabel('frequencyinpiunits');ylabel('Decibels')set(gca,'XTickMode','manual','XTick',[0;0.3;0.4;0.5;0.6;1])set(gca,'XTickLabel

1 / 6
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功