自控原理 拉氏变化法求微分方程,设初始条件为零。 Tx✀(t)+x(t)=r(t),r(t)分

2025-03-13 23:11:50
推荐回答(1个)
回答1:

% 系统传递函数
G=tf([3 2],[1 5 6])

% (1) bode图
figure(1)
bode(G)

% (2) 零极点分布图
figure(2)
pzmap(G)

% (3) 单位阶跃响应和单位脉冲响应
figure(3)
subplot 211
step(G)
subplot 212
impulse(G)

% (4a) 拉氏逆变换法求f(t)=exp(-2*t)*u(t)的输出
figure(4)
F=laplace(sym('exp(-2*t)'))
Y=sym('(3*s+2)/(s^2+5*s+6)')*F
y=ilaplace(Y)
ezplot(y,[0 6])
axis auto
% 如果Y的拉式逆变换求不出,可用impulse求数值解
% [n,d]=numden(Y);
% impulse(tf(sym2poly(n),sym2poly(d)))

% (4b) 使用lsim函数求线性系统在任意输入下的响应
figure(5)
t=0:0.1:6;
f=exp(-2*t);
lsim(G,f,t)