大连理工大学本科实验报告课程名称:___信号与系统实验学院:信息与通信工程学院专业:电子信息工程班级:学号:学生姓名:2012年12月11日信号与系统实验项目列表信号的频谱图Signals Frequency Spectrum连续时间系统分析Analysis for Continuous-time System信号抽样Signal Sampling离散时间LTI系统分析Analysis for Discrete-time LTI System语音信号的调制解调Modulation and Demodulation for Audio SignalsSimulink®模拟信号的调制解调Modulation and Demodulation for Analog Signals in Simulink ®实验1信号的频谱图一、实验目的1. 掌握周期信号的傅里叶级数展开;2. 掌握周期信号的有限项傅里叶级数逼近;3. 掌握周期信号的频谱分析;4. 掌握连续非周期信号的傅立叶变换;5. 掌握傅立叶变换的性质。
二、实战演练(5道题)1.已知周期三角信号如下图1-5所示,试求出该信号的傅里叶级数,利用MA TLAB编程实现其各次谐波的叠加,并验证其收敛性。
解:调试程序如下:clccleart=-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:Nn=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运行结果如下:2. 试用MATLAB 分析上图中周期三角信号的频谱。
当周期三角信号的周期和三角信号的宽度变化时,试观察其频谱的变化。
解:调试程序如下:202024sin 8w n T nw F n ττ=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 onstem(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 onstem(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 onstem(0, 0.1);t部分和的波形最大谐波数=1tao=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 onstem(0, 0.1);运行结果如下:从图中可以看出,脉冲宽度τ 越大,信号的频谱带宽越小;而周期越小,谱线之间间隔越大.3. 试用MATLAB 命令求下列信号的傅里叶变换,并绘出其幅度谱和相位谱。
解:调试程序如下: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相位谱');运行结果如下:大连理工大学 信息与通信工程学院-6-4-20246w f1幅度谱-6-4-20246wf1相位谱-6-4-202461w -6-4-20246-101w f1相位谱w f2幅度谱wf2相位谱4. 试用MATLAB 命令求下列信号的傅里叶反变换,并绘出其时域信号图。
解:调试程序如下: clear; syms t1; syms omega; Fw1 = fourier((10/(3+j*omega))-(4/(5+j*omega))); ft1 = ifourier(Fw1,t1); syms t2;Fw2 = fourier(exp(-4*omega^2));ft2 = ifourier(Fw2,t2);subplot(211);ezplot(t1,ft1);grid on; title('f1时域信号'); subplot(212);ezplot(t2,ft2);grid on; title('f2时域信号');0.511.522.5xyf1时域信号-0.500.511.5xyf2时域信号5. 试用MATLAB 数值计算方法求门信号的傅里叶变换,并画出其频谱图。
门信号即dt = 0.005; t = -5:dt:5; y1 = [t>=-0.5]; y2 = [t>=0.5]; ft = y1 - y2; N = 2000; k = -N:N;W = 2*pi*k/((2*N+1)*dt); F = dt * ft*exp(-j*t'*W); plot(W,F), grid on; xlabel('W'), ylabel('F(W)'); axis([-20*pi 20*pi -0.3 1.2]); title('频谱图');-0.200.20.40.60.81WF (W )频谱图00.20.40.60.811.21.4timeh (t )timeh (t )*u (t )实验2 连续时间系统分析一、实验目的1 建立系统的概念;2 掌握连续时间系统的单位冲激响应的求解;3 掌握连续时间系统单位阶跃响应的求解;4 掌握连续时间系统零极点的求解;5 分析系统零极点对系统幅频特性的影响;6 分析零极点对系统稳定性的影响;7 介绍常用信号处理的MA TLAB 工具箱;二、实战演练1. 已知系统的微分方程为''324y t y t y t x t x t ,计算该系统的单位冲激响应和单位阶跃响应。
单位冲激响应:a=[1 3 2]; b=[1 4]; sys=tf(b,a); t=0:0.1:10;y=impulse(sys,t); plot(t,y);xlabel('time'); ylabel('h(t)');单位阶跃响应:a=[1 3 2]; b=[1 4]; sys=tf(b,a); t=0:0.1:10; y=step(sys,t); plot(t,y);xlabel('time'); ylabel('h(t)*u(t)');2. 实现卷积()*()f t h t ,其中 ()2[()(2)],()()tf t t th t et 。
解:调试程序如下: p=0.001; nf=0:p:2;f=2*((nf>=0)-(nf>=2)); nh=0:p:5; h=exp(-nh);t=min(nh)+min(nf):p:max(nh)+max(nf); y=conv(f,h)*p; subplot(311),stairs(nf,f); title('f(t)');axis([0 3 0 2.1]); subplot(3,1,2),stairs(nh,h); title('h(t)');axis([0 3 0 1.1]);subplot(3,1,3),plot(t,y); title('y(t)=f(t)*h(t)');axis([0 5 0 2.1]);00.51 1.52 2.5312f(t)00.51 1.52 2.530.51h(t)00.51 1.52 2.53 3.54 4.5512y(t)=f(t)*h(t)3. 已知二阶系统方程'''11()()()()c c R u t u t u t t L LC LC,对下列情况分别求单位冲激响应()h t ,并画出其波形。
解:a. 4,1,1/3R LH CFb. 2,1,1R L H C Fc. 1,1,1R L H C Fd. 0,1,1RLH CF调试代码如下: a=[1,R/L,1/(L*C)]; b=[1/(L*C)]; sys=tf(b,a); t=0:0.01:10;y=impulse(sys,t);plot(t,y); xlabel('time'); ylabel('h(t)');title('R=4,L=1,C=1/3'); axis([0 10 0 1]);运行结果如下:timeh (t )R=1,L=1,C=1timeh (t )R=0,L=1,C=14. 求下列系统的零极点。