文档详情

信号与系统实验———实验二 连续时间系统的时域分析.doc

发布:2017-12-18约2.49千字共11页下载文档
文本预览下载声明
实验报告 连续时间系统的频域分析 班级: 电 子 学号: 姓名: 指导教师: 完成时间 2012 年 5 月 16 日 实验二 连续时间系统的时域分析 一、实验目的: 1、掌握用Matlab进行卷积运算的数值方法和解析方法,加深对卷积积分的理解。 2、学习利用Matlab实现LTI系统的冲激响应、阶跃响应和零状态响应。 二、实验内容及步骤: 编写程序Q2_1,完成与两函数的卷积运算。 解:程序如下: p=0.01; k1=0:p:2; f1=2*k1; k2=0:p:2; f2=2*k2; [f,k]=sconv(f1,f2,k1,k2,p) 仿真如图1 图1 图2 编写程序Q2_2,完成与两函数的卷积运算。 解:程序如下: p=0.01; k1=-1:p:1; f1=2*(heaviside(k1+1)-heaviside(k1-1)); k2=-2:p:2; f2=heaviside(k2+2)-heaviside(k2-2); [f,k]=sconv(f1,f2,k1,k2,p) 仿真如图3 图3 t0 = -2; t1 = 2; dt = 0.01; t = t0:dt:t1; x = 2*(heaviside(t+1)-heaviside(t-1)); h = heaviside(t+2)-heaviside(t-2); y = dt*conv(x,h); % Compute the convolution of x(t) and h(t) subplot(221) plot(t,x), grid on, title(Signal x(t)), axis([t0,t1,0,3]) subplot(222) plot(t,h), grid on, title(Signal h(t)), axis([t0,t1,0,2]) subplot(212) 图4 t = 2*t0:dt:2*t1; % Again specify the time range to be suitable to the plot(t,y), grid on, title(The convolution of x(t) and h(t)), axis([2*t0,2*t1,0,1]), xlabel(Time t sec) 图5 3、编写程序Q2_3。利用程序Q2_1,验证卷积的相关性质。 (a) 验证性质: (b) 验证性质: 4、编写程序Q2_4。某线性时不变系统的方程为 , 解:程序如下: a=[1,5,6]; b=[0,2,8] impulse(b,a) b =0 2 8 图6 impulse(b,a,10) 图7 impulse(b,a,1:0.1:2) 图8 y=impulse(b,a,0:0.2:2) y = 2.0000 1.5837 1.1949 0.8742 0.6262 0.4418 0.3082 0.2132 0.1466 0.1003 0.0683 图9 step(b,a) 图10 step(b,a,10) 图11 step(b,a,1:0.1:2) 图12 y=step(b,a,0:0.2:2) y = 0 0.3586 0.6355 0.8411 0.9900 1.0959 1.1701 1.2217 1.2573 1.2817 1.2984 (a)系统的冲激响应和阶跃响应。 (b)输入,求系统的零状态响应。 解:程序如下: a = [5 0]; %Define numerator polynomial b = [1 2 101]; %Define denominator polynomial t = linspace(0, 10, 500); %Define a time vector u = exp(-t); %Compute the cosine input function figure(1); [y, x] = lsim(a, b, u, t); %Compute the cosine input function plot(t, y, r, t, u, b
显示全部
相似文档