实验四线性时不变离散时间系统的频域分析doc.docx
- 文档编号:26895509
- 上传时间:2023-06-23
- 格式:DOCX
- 页数:23
- 大小:179.83KB
实验四线性时不变离散时间系统的频域分析doc.docx
《实验四线性时不变离散时间系统的频域分析doc.docx》由会员分享,可在线阅读,更多相关《实验四线性时不变离散时间系统的频域分析doc.docx(23页珍藏版)》请在冰豆网上搜索。
实验四线性时不变离散时间系统的频域分析doc
Name:
Chenyifan20112121006
Section:
LaboratoryExercise4
LINEAR,TIME-INVARIANTDISCRETE-TIMESYSTEMS:
FREQUENCY-DOMAINREPRESENTATIONS
4.1TRANSFERFUNCTIONANDFREQUENCYRESPONSE
Project4.1TransferFunctionAnalysis
Answers:
Q4.1ThemodifiedProgramP3_1tocomputeandplotthemagnitudeandphasespectraofamovingaveragefilterofEq.(2.13)for0
ω
2isshownbelow:
w=0:
pi/511:
2*pi;
M=input('M=');
num=ones(1,M)/M;
h=freqz(num,1,w);
subplot(2,1,1);
plot(w/pi,abs(h));grid;
title('H(e^{j\omega})幅度谱');
xlabel('\omega/\pi');ylabel('振幅');
subplot(2,1,2);
plot(w/pi,angle(h));grid;
title('相位谱H(e^{j\omega})');
xlabel('\omega/\pi');ylabel('以弧度为单位的相位');
ThisprogramwasrunforthefollowingthreedifferentvaluesofMandtheplotsofthecorrespondingfrequencyresponsesareshownbelow:
Thetypesofsymmetriesexhibitedbythemagnitudeandphasespectraaredueto-
Thetypeoffilterrepresentedbythemovingaveragefilteris
M=3
-
M=10;
M=20;
TheresultsofQuestionQ2.1cannowbeexplainedasfollows-Bythegraph,youcanseethatitrepresentsalow-passfilter.
Q4.2TheplotofthefrequencyresponseofthecausalLTIdiscrete-timesystemofQuestionQ4.2obtainedusingthemodifiedprogramisgivenbelow:
w=0:
pi/511:
pi;
num=[0.150-0.15];
den=[1-0.50.7];
h=freqz(num,den,w);
subplot(2,1,1);
plot(w/pi,abs(h));grid;
title('H(e^{j\omega})幅度谱');
xlabel('\omega/\pi');ylabel('振幅');
subplot(2,1,2);
plot(w/pi,angle(h));grid;
title('相位谱H(e^{j\omega})');
xlabel('\omega/\pi');
ylabel('以弧度为单位的相位');
Thetypeoffilterrepresentedbythistransferfunctionis-ItsaysbandpassfilterisobtainedbydiagramscanbeBPF
Q4.3TheplotofthefrequencyresponseofthecausalLTIdiscrete-timesystemofQuestionQ4.3obtainedusingthemodifiedprogramisgivenbelow:
w=0:
pi/511:
pi;
num=[0.150-0.15];
den=[0.7-0.51]
h=freqz(num,den,w);
subplot(2,1,1);
plot(w/pi,abs(h));grid;
title('H(e^{j\omega})幅度谱');
xlabel('\omega/\pi');ylabel('振幅');
subplot(2,1,2);
plot(w/pi,angle(h));grid;
title('相位谱H(e^{j\omega})');
xlabel('\omega/\pi');
ylabel('以弧度为单位的相位');
Thetypeoffilterrepresentedbythistransferfunctionis-Ocausallineartime-invariantdiscretetimesystemfrequencyresponse,determinethetypefilter
ThedifferencebetweenthetwofiltersofQuestions4.2and4.3is-Moreonthetopicoffigure,theamplitudespectrumisthesame,thephasespectrum,onthetopicthatiscontinuous,andkindsofphasejumpline,.
IshallchoosethefilterofQuestionQ4.3forthefollowingreason-theamplitudespectrumisthesame,thephasespectrum,onthetopicthatiscontinuous,andkindsofphasejumpline.
Q4.6Thepole-zeroplotsofthetwofiltersofQuestions4.2and4.3developedusingzplaneareshownbelow:
w=0:
pi/511:
pi;
num=[0.150-0.15];
den=[1-0.50.7];
h=zplane(num,den);
w=0:
pi/511:
pi;
num=[0.150-0.15];
den=[0.7-0.51];
h=zplane(num,den);
Fromtheseplotswemakethefollowingobservations:
Differentfunction,zerozeroandpolepolefigurewithdifferentrelativepositionofthecircle
4.2TYPESOFTRANSFERFUNCTIONS
Project4.2Filters
AcopyofProgramP4_1isgivenbelow:
clf;
fc=0.25;
n=[-6.5:
1:
6.5];
y=2*fc*sinc(2*fc*n);k=n+6.5;
stem(k,y);title('N=13');axis([013-0.20.6]);
xlabel('时间序号n');ylabel('振幅');grid
Answers:
Q4.7TheplotoftheimpulseresponseoftheapproximationtotheideallowpassfilterobtainedusingProgramP4_1isshownbelow:
clf;
fc=0.25;
n=[-6.5:
1:
6.5];
y=2*fc*sinc(2*fc*n);k=n+6.5;
stem(k,y);title('N=13');axis([013-0.20.6]);
xlabel('时间序号n');ylabel('振幅');grid
ThelengthoftheFIRlowpassfilteris-14
ThestatementinProgramP4_1determiningthefilterlengthis-n=[-6.5:
1:
6.5];
Theparametercontrollingthecutofffrequencyis-Fcparameterscontrolthecutofffrequency
Q4.8TherequiredmodificationstoProgramP4_1tocomputeandplottheimpulseresponseoftheFIRlowpassfilterofProject4.2withalengthof20andacutofffrequencyofωc=0.45areasindicatedbelow:
clf;
fc=0.45/(2*pi);
n=[-9.5:
1:
9.5];
y=2*fc*sinc(2*fc*n);k=n+9.5;
stem(k,y);title('N=20');axis([020-0.20.6]);
xlabel('时间序号n');ylabel('振幅');grid
Theplotgeneratedbyrunningthemodifiedprogramisgivenbelow:
Q4.9TherequiredmodificationstoProgramP4_1tocomputeandplottheimpulseresponseoftheFIRlowpassfilterofProject4.2withalengthof15andacutofffrequencyofωc=0.65areasindicatedbelow:
clf;
fc=0.65/(2*pi);
n=[-7.5:
1:
6.5];
y=2*fc*sinc(2*fc*n);k=n+7.5;
stem(k,y);title('N=15');axis([014-0.20.6]);
xlabel('时间序号n');ylabel('振幅');grid
Theplotgeneratedbyrunningthemodifiedprogramisgivenbelow:
Q4.11Aplotofthegainresponseofalength-2movingaveragefilterobtainedusingProgramP4_2isshownbelow:
unction[g,w]=gain(num,den)--gain函数
w=0:
pi/255:
pi;
h=freqz(num,den,w);
g=20*log10(abs(h));
M=2;--滑动平均低通滤波器的增益响应程序
num=ones(1,M)/M;
[g,w]=gain(num,1);
plot(w/pi,g);grid;
axis([01-500.5])
xlabel('\omega/\pi');ylabel('单位为db的增益');
title(['M=',num2str(M)])
Fromtheplotitcanbeseenthatthe3-dBcutofffrequencyisat-3dB。
Q4.12TherequiredmodificationstoProgramP4_2tocomputeandplotthegainresponseofacascadeofKlength-2movingaveragefiltersaregivenbelow:
function[g,w]=gainlink(num,den)\
w=0:
pi/255:
pi;
h=freqz(num,den,w);
H=h.*h.*h;
g=20*log10(abs(H));
wc=2*acos(2^(-1/(2*3)))
wc=0.9430
wc=0.3*pi
Theplotofthegainresponseforacascadeof3sectionsobtainedusingthemodifiedprogramisshownbelow:
Fromtheplotitcanbeseenthatthe3-dBcutofffrequencyofthecascadeisat-
\wc=0.3*pi\
Q4.19AcopyofProgramP4_3isgivenbelow:
clf;
b=[1-8.530.5-63];
num1=[b81fliplr(b)];
num2=[b8181fliplr(b)];
num3=[b0-fliplr(b)];
num4=[b81-81-fliplr(b)];
n1=0:
length(num1)-1;
n2=0:
length(num2)-1;
subplot(2,2,1);stem(n1,num1);
xlabel('时间序号n');ylabel('振幅');grid;
title('1型有限冲激响应滤波器');
subplot(2,2,2);stem(n2,num2);
xlabel('时间序号n');ylabel('振幅');grid;
title('2型有限冲激响应滤波器');
subplot(2,2,3);stem(n1,num3);
xlabel('时间序号n');ylabel('振幅');grid;
title('3型有限冲激响应滤波器');
subplot(2,2,4);stem(n2,num4);
xlabel('时间序号n');ylabel('振幅');grid;
title('4型有限冲激响应滤波器');
pause
subplot(2,2,1);zplane(num1,1);
title('1型有限冲激响应滤波器');
subplot(2,2,2);zplane(num2,1);
title('2型有限冲激响应滤波器');
subplot(2,2,3);zplane(num3,1);
title('3型有限冲激响应滤波器');
subplot(2,2,4);zplane(num4,1);
title('4型有限冲激响应滤波器');
disp('1型有限冲激响应滤波器的零点是');
disp(roots(num1));
disp('2型有限冲激响应滤波器的零点是');
disp(roots(num2));
disp('3型有限冲激响应滤波器的零点是');
disp(roots(num3));
disp('4型有限冲激响应滤波器的零点是');
disp(roots(num4));
TheplotsoftheimpulseresponsesofthefourFIRfiltersgeneratedbyrunningProgramP4_3aregivenbelow:
Fromtheplotswemakethefollowingobservations:
Filter#1isoflength_____8_____witha___80_______impulseresponseandisthereforeaType__linear-phaseFIRfilter.
Filter#2isoflength____10______witha___80_______impulseresponseandisthereforeaType__linear-phaseFIRfilter.
Filter#3isoflength______8____witha___60_______impulseresponseandisthereforeaType__linear-phaseFIRfilter.
Filter#4isoflength______10____witha___80_______impulseresponseandisthereforeaType__linear-phaseFIRfilter.
FromthezerosofthesefiltersgeneratedbyProgramP4_3weobservethat:
Filter#1haszerosatz=2.9744,2.0888,0.9790+1.4110i,0.9790-1.4110i,0.3319+0.4784i,0.3319-0.4784i,0.4787,0.3362
Filter#2haszerosatz=3.7585+1.5147i,3.7585-1.5147i,0.6733+2.6623i,0.6733-2.6623i,-1.0000,0.0893+0.3530i,0.0893-0.3530i,0.2289+0.0922i,0.2289-0.0922i
Filter#3haszerosatz=4.7627,1.6279+3.0565i,1.6279-3.0565i,-1.0000,1.0000
0.1357+0.2549i,0.1357-0.2549i,0.2100
Filter#4haszerosatz=3.4139,1.6541+1.5813i,1.6541-1.5813i,-0.0733+0.9973i,-0.0733-0.9973i,1.0000,0.3159+0.3020i,0.3159-0.3020i,0.2929
PlotsofthephaseresponseofeachofthesefiltersobtainedusingMATLABareshownbelow:
Fromtheseplotsweconcludethateachofthesefiltershave______linear____phase.
Q4.20TheplotsoftheimpulseresponsesofthefourFIRfiltersgeneratedbyrunningProgramP4_3aregivenbelow:
Fromtheplotswemakethefollowingobservations:
Filter#1isoflength_____8_____witha___80_______impulseresponseandisthereforeaType__linear-phaseFIRfilter.
Filter#2isoflength____10
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 实验 线性 不变 离散 时间 系统 分析 doc