数字信号处理实验报告5.docx
- 文档编号:26571500
- 上传时间:2023-06-20
- 格式:DOCX
- 页数:18
- 大小:81.30KB
数字信号处理实验报告5.docx
《数字信号处理实验报告5.docx》由会员分享,可在线阅读,更多相关《数字信号处理实验报告5.docx(18页珍藏版)》请在冰豆网上搜索。
数字信号处理实验报告5
Name:
Yangbo20112121010
Section:
LaboratoryExercise4
LINEAR,TIME-INVARIANTDISCRETE-TIMESYSTEMS:
FREQUENCY-DOMAINREPRESENTATIONS
4.1TRANSFERFUNCTIONANDFREQUENCYRESPONSE
Project4.1TransferFunctionAnalysis
Answers:
Q4.1ThemodifiedProgramP2_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:
M=5
M=20
Thetypesofsymmetriesexhibitedbythemagnitudeandphasespectraaredueto-
Thetypeoffilterrepresentedbythemovingaveragefilteris–LPF
Q4.2TheplotofthefrequencyresponseofthecausalLTIdiscrete-timesystemofQuestionQ4.2obtainedusingthemodifiedprogramisgivenbelow:
w=0:
pi/511:
pi;
num=[0.15 0 -0.15];
den=[1 -0.5 0.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–BPF
Q4.3TheplotofthefrequencyresponseofthecausalLTIdiscrete-timesystemofQuestionQ4.3obtainedusingthemodifiedprogramisgivenbelow:
w=0:
pi/511:
pi;
num=[0.15 0 -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-BPF
ThedifferencebetweenthetwofiltersofQuestions4.2and4.3is–
Ontheamplitudespectrumisthesame,thetopicofthephasespectrumiscontinuous,andkindsofphasejumpline,
IshallchoosethefilterofQuestionQ4.2
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:
ThelengthoftheFIRlowpassfilteris14
ThestatementinProgramP4_1determiningthefilterlengthisn=[-6.5:
1:
6.5];
Theparametercontrollingthecutofffrequencyisfc
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([0 20 -0.2 0.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([0 14 -0.2 0.6]);
xlabel('时间序号n');ylabel('振幅');grid
Theplotgeneratedbyrunningthemodifiedprogramisgivenbelow:
Q4.11Aplotofthegainresponseofalength-2movingaveragefilterobtainedusingProgramP4_2isshownbelow:
function [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([0 1 -50 0.5])
xlabel('\omega/\pi');ylabel('单位为db的增益');
title(['M= ',num2str(M)])
Fromtheplotitcanbeseenthatthe3-dBcutofffrequencyisatPI/2
Q4.12TherequiredmodificationstoProgramP4_2tocomputeandplotthegainresponseofacascadeofKlength-2movingaveragefiltersaregivenbelow:
function [g,w]=gainlink(num,den) –gainlink函数
w=0:
pi/255:
pi;
h=freqz(num,den,w);
H=h.*h.*h;
g=20*log10(abs(H));
M=2;
num=ones(1,M)/M;
[g,w]=gainlink(num,1);
plot(w/pi,g);grid;
axis([0 1 -50 0.5])
xlabel('\omega/\pi');ylabel('单位为db的增益');
title(['M= ',num2str(M)])
Theplotofthegainresponseforacascadeof3sectionsobtainedusingthemodifiedprogramisshownbelow:
Fromtheplotitcanbeseenthatthe3-dBcutofffrequencyofthecascadeisat0.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
Q4.20TheplotsoftheimpulseresponsesofthefourFIRfiltersgeneratedbyrunningProgramP4_3aregivenbelow:
Fromtheplotswemakethefollowingobservations:
Filter#1isoflength_____8_____witha___80_______impulseresponseandisthereforeaType__linear-phaseFIRfilter.
Filter#2isoflength____10______witha___80_______impulseresponseandisthereforeaType__linear-phaseFIRfilter.
Filter#3isoflength_____8_____witha_____5_____impulseresponseandisthereforeaType__linear-phaseFIRfilter.
Filter#4isoflength____10______witha____80______impulseresponseandisthereforeaType__linear-phaseFIRfilter.
FromthezerosofthesefiltersgeneratedbyProgramP4_3weobservethat:
Filter#1haszerosatz=2.3273+2.0140i,2.3273-2.0140i,-1.2659+2.0135i,-1.2659-2.0135i,-0.2238+0.3559i,-0.2238-0.3559i,0.2457+0.2126i,0.2457-0.2126i
Filter#2haszerosatz=2.5270+2.0392i,2.5270-2.0392i,-1.0101+2.1930i.-1.0101-2.1930i,-1.0000,-0.1733+0.3762i,-0.1733-0.3762i,0.2397+0.1934i,0.2397-0.1934i
Filter#3haszerosatz=-1.0000,0.2602+1.2263i,0.2602-1.2263i,1.0000,0.6576+0.7534i,0.6576-0.7534i,0.1655+0.7803i,0.1655-0.7803i
Filter#4haszerosatz=2.0841+2.0565i,2.0841-2.0565i,-1.5032+1.9960i,-1.5032-1.9960i,1.0000,-0.2408+0.3197i,-0.2408-0.3197i,0.2431+0.2399i,0.2431-0.2399i
4.3STABILITYTEST
AcopyofProgramP4_4isgivenbelow:
clf;
den=input(‘分母系数=’);
ki=poly2rc(den);
disp(‘稳定性测试参数是’);
disp(ki);
Answers:
Q4.23Thepole-zeroplotsofH1(z)andH2(z)obtainedusingzplaneareshownbelow:
Fromtheabovepole-zeroplotsweobservethat-
Q4.24UsingProgramP4_4wetestedthestabilityofH1(z)andarriveatthefollowingstabilitytestparameters{ki}:
FromtheseparametersweconcludethatH1(z)is_____stable________.
UsingProgramP4_4wetestedthestabilityofH2(z)andarriveatthefollowingstabilitytestparameters{ki}:
FromtheseparametersweconcludethatH2(z)is_____stable________.
Q4.25UsingProgramP4_4wetestedtherootlocationsofD(z)andarriveatthefollowingstabilityt
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 数字信号 处理 实验 报告