所有信号与系统实验报告.docVIP

  • 2
  • 0
  • 约1.07万字
  • 约 26页
  • 2016-12-28 发布于未知
  • 举报
实验1 信号的频谱图 实验目的 1. 掌握周期信号的傅里叶级数展开; 2. 掌握周期信号的有限项傅里叶级数逼近; 3. 掌握周期信号的频谱分析; 4. 掌握连续非周期信号的傅立叶变换; 5. 掌握傅立叶变换的性质。 实战演练(5道题) 已知周期三角信号如下图1-5所示,试求出该信号的傅里叶级数,利用MATLAB编程实现其各次谐波的叠加,并验证其收敛性。 解: 调试程序如下: clc clear t=-2:0.001:2; omega=pi; y=-(sawtooth(pi*t,0.5)/2+0.5)+1; plot(t,y),grid on; xlabel(t),ylabel(周期三角波信号); axis([-2 2 -0.5 1.5]) n_max=[1 3 5 11 47]; N=length(n_max); for k=1:N n=1:2: n_max(k); c=n.^2; b=4./(pi*pi*c); x=b*cos(omega*n*t)+0.5; figure; plot(t,y,b); hold on; plot(t,x,r); hold off; xlabel(t),ylabel(部分和的波形); axis([-2 2 -0.5 1.5]);grid on; title([最大谐波数=,num2str(n_max(k))]) end 运行结果如下: 试用MATLAB分析上图中周期三角信号的频谱。当周期三角信号的周期和三角信号的宽度变化时,试观察其频谱的变化。 解: 调试程序如下: n=-30:30; tao=1;T=10;w1=2*pi/T; c=n.^2; x=n*pi*tao/(2*T); d=sin(x); e=d.^2; fn=8*e./(tao*c*4*pi*pi/T); subplot(412) stem(n*w1,fn),grid on; title(tao=1,T=10); hold on stem(0,0.05); tao=1;T=1;w0=2*pi/T; c=n.^2; x=n*pi*tao/(2*T); d=sin(x); e=d.^2; fn=8*e./(tao*c*4*pi*pi/T); m=round(30*w1/w0); n1=-m:m; fn=fn(30-m+1:30+m+1); subplot(411) stem(n1*w0,fn),grid on; title(tao=1,T=1); hold on stem(0, 0.5); tao=1;T=5;w2=2*pi/T; c=n.^2; x=n*pi*tao/(2*T); d=sin(x); e=d.^2; fn=8*e./(tao*c*4*pi*pi/T); m=round(30*w1/w2); n1=-m:m; fn=fn(30-m+1:30+m+1); subplot(413) stem(n1*w2,fn),grid on; title(tao=1,T=5); hold on stem(0, 0.1); tao=2;T=10;w3=2*pi/T; c=n.^2; x=n*pi*tao/(2*T); d=sin(x); e=d.^2; fn=8*e./(tao*c*4*pi*pi/T); subplot(414) stem(n*w3,fn),grid on; title(tao=2,T=10); hold on stem(0, 0.1); 运行结果如下: 从图中可以看出,脉冲宽度τ 越大,信号的频谱带宽越小;而周期越小,谱线之间间隔越大. 解: 调试程序如下: ft1=sym(sin(2*pi*(t-1))/(pi*(t-1))); ft2=sym((sin(pi*t)/(pi*t))^2); Fw1=fourier(ft1); Fw2=fourier(ft2); subplot(411); ezplot(abs(Fw1));grid on; title(f1幅度谱); phase=atan(imag(Fw1)/real(Fw1)); subplot(412); ezplot(phase);grid on; title(f1相位谱); subplot(413); ezplot(abs(Fw2));grid on; title(f2幅度谱); phase=atan(imag(Fw2)/real(Fw2)); subplot(414); ezplot(phase);grid on; title(f2相位谱); 运行结果如下: 试用MA

文档评论(0)

1亿VIP精品文档

相关文档