信号与系统实验1.docx
- 文档编号:13285930
- 上传时间:2023-06-12
- 格式:DOCX
- 页数:21
- 大小:151.18KB
信号与系统实验1.docx
《信号与系统实验1.docx》由会员分享,可在线阅读,更多相关《信号与系统实验1.docx(21页珍藏版)》请在冰点文库上搜索。
信号与系统实验1
ExperimentReport
2011.1.5
EXPERIMENT1
1.ExperimentPurposes
(1).BefamiliarwiththesoftwareEnvironmentandProgrammingflowinMATLAB.
(2)Learnhowtodrawthesignalwaveformanddeterminethesignalproperties.
(3)Calculatetheconvolution,frequencyresponseandsystemoutputbyusingthefunctions:
conv,freqz,freqsandfilter.
2.ExperimentContents
(1)Drawthediscretetimesinusoidalsignalsanddeterminetheirfundamentalperiods.§1.2(d).
(2)Determinethepropertiesofdiscretetimesystem.§1.4(a),(b).
(3)Useconvreliesthepropertiesofy[n].§2.1(c)
(4)UsetheFilter,Determinethea2andb2.§2.2(c)(d)
(5)UsetheFreqz.§3.2
(6)Determinethepropertiesofthediscretetimesystem.§3.4(a)(b)(c)
(7)RealizetheusingoftheFreqs.§4.1
(8)RealizetheGibbsphenomenon.
3.ExperimentDetail
(一)§1.2(d)Drawthediscretetimesinusoidalsignalsanddeterminetheirfundamentalperiods.
(a)Description
Firstcalculatethefundamentalperiodbymathematicalmethod,thendrawthesignalwaveform,Comparetheresults.
(b)MainProgram
%清除变量,关闭图形
closeall;
clearall;
%计算信号值
n=[0:
31];
temp=pi*n/4;
x1=sin(temp).*cos(temp);
x2=cos(temp).^2;%orx2=power(cos(temp),2);%orx2=pow2(cos(temp));
x3=sin(temp).*cos(temp/2);
%绘图
subplot(3,1,1);stem(x1);title('x1[n]T=4');xlabel('n');
subplot(3,1,2);stem(x2);title('x2[n]T=4');xlabel('n');
subplot(3,1,3);stem(x3);title('x3[n]T=16');xlabel('n');
(c)Result
(d)Conclusion
Thefirstsignal’sfundamentalperiodis4.
Andsecondsignal’sfundamentalperiodis4
Thethirdsignal’sfundamentalperiodis16.
(二)§1.4Thepropertiesofdiscrete-timesystem
(A)
(a)Description
Underthehelpoftheprogramofmatlab,drawthefigures,thencomparetheresultsgettheconclusion.
(b)MainProgram
>>n=[-10:
10];
>>x1=[zeros(1,10)1zeros(1,10)];
>>x2=2*x1;
>>y1=sin(pi/2*x1);
>>y2=sin(pi/2*x2);
>>subplot(2,1,1);stem(n,y1);title('y1[n]');xlabel('n');
>>subplot(2,1,2);stem(n,y2);title('y2[n]');xlabel('n');
(c)Result
(d)Conclusion
Asthefiguresshow,wecanseethatthissystemisnotlinear.Ifit’slinear,therewillbey2=2*y1.Thereforewehaveproofedthesystemisnotlinear.
(B)
(a)Description
Withthehelpofthediscrete-timeunitstep,proofy[n]=x[n]+x[n+1]isnotcausal.
(b)MainProgram
>>n=[-5:
9];
>>x1=[zeros(1,5)ones(1,10)];
>>x2=[zeros(1,4)ones(1,11)];
>>y=x1+x2;
>>stem(n,y);title('y[n]');xlabel('n');
(c)Result
(d)Conclusion
Astheresultshows,whenn=-1,y=1.andwhenn=0,x=0.soit’snotcausal.
(三)§2.1(C)lineartime-invariantsystems
(a)Description
Giventhath[n]=n,when0<=n<=5;x[n]=0,others.Takeadvantageoftheconv,
Solvey[n]=x[n]*x[n].
(b)MainProgram
>>n=[0:
5];
>>x=[ones(1,6)];
>>h=n.*x;
>>y=conv(h,x);
>>ny=[n678910];
>>stem(ny,y)
(c)Result
(d)Conclusion
Thegivenfunctionh[n]canbeseenasaunitresponseofLTIsystem.Andthissystemiscausual.
(四)2.2(C)(D)
(a)Description:
definea3andb3;Takeadvantageoffilter,presenttheresultof
eachsystem.
(b)MainProgram
>>a=[1-0.8];
>>b=[02];
>>n=[1:
4];
>>x=[1234];
>>y=filter(b,a,x)
(c)Result
y=
02.00005.600010.4800
(d)Conclusion
Fromtheresult,wecanconcludethattheprocedureisright,andtheexperimentisreasonable.
(五)3.2
(a)Description:
definethegivensubjects,getthevalueofthesesubjects.
(b)MainProgram
>>a=[1-0.80];
>>b=[20-1];
>>N=4;
>>[H1omega1]=freqz(b,a,N)
>>[H2omega2]=freqz(b,a,N,'whole');
(c)Result
H1=
5.0000
2.8200-1.3705i
1.8293-1.4634i
0.9258-0.9732i
omega1=
0
0.7854
1.5708
2.3562
H2=
5.0000
1.8293-1.4634i
0.5556
1.8293+1.4634i
omega2=
0
1.5708
3.1416
4.7124
(d)Conclusion
Theresultsoftheexperimentarereasonable.
(六)3.4(a),(b),(c)
(a)Description
(a)
(b)MainProgram
>>n=[-20:
20];
>>x1=exp(j*(pi/4)*n);
>>x2=sin(pi*n/8+pi/16);
>>x3=(9/10).^n;
>>x4=n+1;
>>subplot(2,1,1);stem(n,real(x1));title('x1[n]real');xlabel('n');
>>subplot(2,1,2);stem(n,imag(x1));title('x1[n]image');xlabel('n');
(c)Result
(b)
(b)MainProgram
>>a=[1,-0.25];
>>b=[1,0.9];
>>n=[0:
100];
>>x1=exp(j*(pi/4)*n);
x2=sin(pi*n/8+pi/16);
x3=(9/10).^n;
x4=n+1;
>>y1=filter(b,a,x1);
>>y2=filter(b,a,x2);
>>y3=filter(b,a,x3);
>>y4=filter(b,a,x4);
>>subplot(2,1,1);stem(n,real(y1));title('y1[n]real');xlabel('n');
>>subplot(2,1,2);stem(n,imag(y1));title('y1[n]image');xlabel('n');
>>stem(n,y2);title('y2[n]');xlabel('n');
>>stem(n,y3);title('y3[n]');xlabel('n');
>>stem(n,y4);title('y4[n]');xlabel('n');
(c)Result
(c)
(b)MainProgram
>>h1=y1./x1
>>h2=y2./x2
>>h3=y3./x3
>>h4=y4./x4
>>subplot(2,1,1);stem(n,real(h1));title('h1[n]real');xlabel('n');
>>subplot(2,1,2);stem(n,imag(h1));title('h1[n]image');xlabel('n');
>>stem(n,h2);title('h2[n]');xlabel('n');
>>stem(n,h3);title('h3[n]');xlabel('n');
>>stem(n,h4);title('h4[n]');xlabel('n');
(c)Result
h1=
Columns1through9
1.00001.8132-0.8132i1.8132-1.1007i1.7623-1.1515i1.7444-1.1515i1.7412-1.1483i1.7412-1.1472i1.7414-1.1470i1.7415-1.1470i
Columns10through18
1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i
Columns19through27
1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i
Columns28through36
1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i
Columns37through45
1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i
Columns46through54
1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i
Columns55through63
1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i
Columns64through72
1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i
Columns73through81
1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i
Columns82through90
1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i
Columns91through99
1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i1.7415-1.1470i
Columns100through101
1.7415-1.1470i1.7415-1.1470i
h2=
Columns1through15
1.00001.40381.83592.15212.43802.78063.38735.9745-1.39361.19371.80082.14462.43622.78003.3871
Columns16through30
5.9744-1.39361.19371.80082.14462.43622.78003.38715.9744-1.39361.19371.80082.14462.43622.7800
Columns31through45
3.38715.9744-1.39361.19371.80082.14462.43622.78003.38715.9744-1.39361.19371.80082.14462.4362
Columns46through60
2.78003.38715.9744-1.39361.19371.80082.14462.43622.78003.38715.9744-1.39361.19371.80082.1446
Columns61through75
2.43622.78003.38715.9744-1.39361.19371.80082.14462.43622.78003.38715.9744-1.39361.19371.8008
Columns76through90
2.14462.43622.78003.38715.9744-1.39361.19371.80082.14462.43622.78003.38715.9744-1.39361.1937
Columns91through101
1.80082.14462.43622.78003.38715.9744-1.39361.19371.80082.14462.4362
h3=
Columns1through15
1.00002.27782.63272.73132.75872.76632.76842.76902.76922.76922.76922.76922.76922.76922.7692
Columns16through30
2.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.7692
Columns31through45
2.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.7692
Columns46through60
2.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.7692
Columns61through75
2.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.7692
Columns76through90
2.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.7692
Columns91through101
2.76922.76922.76922.76922.76922.76922.76922.76922.76922.76922.7692
h4=
Columns1through15
1.00001.57501.86252.02422.12482.19272.24132.27782.30622.32892.34752.36302.37612.38732.3970
Columns16through30
2.40562.41312.41982.42572.43112.43602.44042.44442.44812.45162.45472.45762.46032.46282.4652
Columns31through45
2.46742.46942.47142.47322.47492.47652.47812.47952.48092.48222.48352.48472.48582.48692.4879
Columns46through60
2.48892.48982.49072.49162.49242.49322.49402.49482.49552.49622.49682.49752.49812.49872.4993
Columns61through75
2.49982.50042.50092.50142.50192.50242.50282.50332.50372.50412.50452.50492.50532.50572.5061
Columns76through90
2.50642.50682.50712.50752.50782.50812.50842.50872.50902.50932.50962.50982.51012.51042.5106
Columns91through101
2.51092.51112.51142.51162.51182.51202.51232.51252.51272.51292.5131
(d)Conclusion
Aswecansee,theresultoftheexperimentiswhatwecanconcludefromthe
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 信号 系统 实验