第1关:连续时间系统的时域分析
实验目的
(1) 深刻理解卷积运算,掌握连续线性卷积的计算方法; (2) 加深对线性时不变系统中零状态响应概念的理解,掌握其求解方法; (3) 掌握给定连续系统的冲激响应和阶跃响应。
实验原理(略)
实验内容与步骤
(1) 已知系统的微分方程为 y(2)(t)+2y(1)(t)+2y(t)=f(1)(t)+2f(t),f(t)=ϵ(t)
。计算系统的零状态响应yzs(t)
、冲激响应h(t)
和阶跃响应g(t)
答案
pkg load signal
pkg load control
td = 0.01;%%% 间隔0.01
%%%%%%%%%%%%%%%%begin%%%%%%%%%%%%%%%%
a=[1 2 2];
b=[1 2];
t=0:td:10;
f = ones(size(t));
sys=tf(b,a);
%%%%%%%%%%%%%%%end%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%begin%%%%%%%%%%%%%%%%
%% 计算零状态响应y1,冲激响应y2,阶跃响应y3
y1 = lsim(sys,f,t);
y2 = impulse(sys, t) ;
y3 = step(sys, t);
%%%%%%%%%%%%%%%end%%%%%%%%%%%%%%%%%%%%%%%
x = input('');
if x==1
disp(y1(20:25)); %显示部分值
elseif x