实验三周期信号的频谱分析报告实验报告材料.doc
《实验三周期信号的频谱分析报告实验报告材料.doc》由会员分享,可在线阅读,更多相关《实验三周期信号的频谱分析报告实验报告材料.doc(20页珍藏版)》请在课桌文档上搜索。
1、word信号与系统实验报告实验三 周期信号的频谱分析一、实验目的1、掌握连续时间周期信号的傅里叶级数的物理意义和分析方法;2、观察截短傅里叶级数而产生的“Gibbs现象,了解其特点以与产生的原因;3、掌握各种典型的连续时间非周期信号的频谱特征。二、实验容实验前,必须首先阅读本实验原理,读懂所给出的全部例程序。实验开始时,先在计算机上运行这些例程序,观察所得到的信号的波形图。并结合例程序应该完成的工作,进一步分析程序中各个语句的作用,从而真正理解这些程序。实验前,一定要针对下面的实验项目做好相应的实验准备工作,包括事先编写好相应的实验程序等事项。Q3-1 编写程序Q3_1,绘制下面的信号的波形图
2、:其中,w0,要求将一个图形窗口分割成四个子图,分别绘制cos(w0t)、cos(3w0t)、cos(5w0t) 和x(t) 的波形图,给图形加title,网格线和x坐标标签,并且程序能够承受从键盘输入的和式中的项数。抄写程序Q3_1如下:clear,%Clear all variablesclose all,%Close all figure windowsdt = 0.00001; %Specify the step of time variablet = -2:dt:4; %Specify the interval of timew0=0.5*pi;x1=cos(w0.*t);x2=co
3、s(3*w0.*t);x3=cos(5*w0.*t);N=input(Type in the number of the harmonic ponents N=);x=0;for q=1:N; x=x+(sin(q*(pi/2).*cos(q*w0*t)/q;endsubplot(221)plot(t,x1)%Plot x1axis(-2 4 -2 2);grid on,title(signal cos(w0.*t)subplot(222)plot(t,x2)%Plot x2axis(-2 4 -2 2);grid on,title(signal cos(3*w0.*t)subplot(223
4、)plot(t,x3)%Plot x3axis(-2 4 -2 2)grid on,title(signal cos(5*w0.*t)执行程序Q3_1所得到的图形如下:Q3-2 给程序Program3_1增加适当的语句,并以Q3_2存盘,使之能够计算例题1中的周期方波信号的傅里叶级数的系数,并绘制出信号的幅度谱和相位谱的谱线图。通过增加适当的语句修改Program3_1而成的程序Q3_2抄写如下:% Program3_1clear, close allT = 2; dt = 0.00001; t = -2:dt:2;x1 = u(t) - u(t-1-dt); x = 0;for m = -1
5、:1 % Periodically extend x1(t) to form a periodic signalx = x + u(t-m*T) - u(t-1-m*T-dt);endw0 = 2*pi/T;N = 10; % The number of the harmonic ponentsL = 2*N+1;for k = -N: N; % Evaluate the Fourier series coefficients akak(N+1+k) = (1/T)*x1*exp(-j*k*w0*t)*dt;endphi = angle(ak); % Evaluate the phase of
6、 aksubplot(211)k = -10:10;stem (k,abs(ak),k);axis(-10,10,0,0.6);grid on;title(fudupu);subplot(212);k = -10:10stem(k,angle(ak),k);axis(-10,10,-2,2);grid on;titie(xiangweipu);xlabel(Frequency index x);执行程序Q3_2得到的图形Q3-3 反复执行程序Program3_2,每次执行该程序时,输入不同的N值,并观察所合成的周期方波信号。通过观察,你了解的吉伯斯现象的特点是:% Program3_3% Th
7、is program is used to pute the Fourier series coefficients ak of a periodic square waveclear,close allT = 2; dt = 0.00001; t = -2:dt:2;x1 = u(t)-u(t-1-dt); x = 0;for m = -1:1x = x + u(t-m*T) - u(t-1-m*T-dt); % Periodically extend x1(t) to form a periodic signalendw0 = 2*pi/T;N = input(Type in the nu
8、mber of the harmonic ponents N = :);L = 2*N+1;for k = -N:1:N;ak(N+1+k) = (1/T)*x1*exp(-j*k*w0*t)*dt;endphi = angle(ak);y=0;for q = 1:L; % Synthesiz the periodic signal y(t) from the finite Fourier seriesy = y+ak(q)*exp(j*(-(L-1)/2+q-1)*2*pi*t/T);end;subplot(221),plot(t,x), title(The original signal
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 实验 周期 信号 频谱 分析 报告 材料

链接地址:https://www.desk33.com/p-12898.html