跳转至

一阶和二阶系统

一阶系统

一阶系统具有传递函数:

G(s)=Kτs+1

对于一个阶跃输入 u(t)=1(t)(t>0),系统的输出为:

y(t)=L1(Kτs+11s)=KKetτ

绘图如下:

Plot[{K - K Exp[-t/τ], /. {K -> 1, τ -> 1},K}, {t, 0, 5}]
图 0

import numpy as np
import matplotlib.pyplot as plt
K = 1
τ = 1
t = np.linspace(0, 5, 100)
y = K - K * np.exp(-t / τ)
plt.plot(t, y)
plt.plot(t, K * np.ones_like(t), 'r--')
plt.show()
图 1

K = 1;
tau = 1;
t = 0:0.01:5;
y = K - K * exp(-t / tau);
plot(t, y)

一阶系统通常使用阶跃响应的时间常数 τ 来描述系统的动态响应速度。时间常数越小,系统的动态响应越快。

一般来说,一阶系统可以在 t=4τ 时达到距离目标 2% 以内,在 t=5τ 时达到距离目标 0.7% 以内。

图 2

二阶系统

二阶系统具有传递函数:

G(s)=K1ωn2s2+2ζωns+1

其极点为:

p1,2=ζωn±ωnζ21

特别的,当 ζ<1 时,将会有两个共轭的复数极点,此时 p1,2=ζωn±jωn1ζ2 , 令 σ=ζωn, ωd=ωn1ζ2

对于一个阶跃输入 u(t)=1(t)(t>0),系统的输出为:

y(t)=L1(K1ωn2s2+2ζωns+11s)=KK1ζ2eσtsin(ωdt+arctan1ζ2ζ)

我们感兴趣的量有以下几个:

  1. 峰值时间 tp:系统输出第一次到达峰值的时间。 tp=πωd=πωn1ζ2
  2. 超调量 %OS=Keπζ1z2
  3. settling time ts 大概也是取 ts=4τ

绘图如下:

Plot[{K - K/Sqrt[1 - ζ^2] Exp[-σ t] Sin[ωd t + ArcTan[Sqrt[1 - ζ^2]/ζ]], /. {K -> 1, ζ -> 0.5, ωn -> 1},K}, {t, 0, 5}]
import numpy as np
import matplotlib.pyplot as plt
K = 1
ζ = 0.5
ωn = 1
σ = ζ * ωn
ωd = ωn * np.sqrt(1 - ζ ** 2)
t = np.linspace(0, 5, 100)
y = K - K / np.sqrt(1 - ζ ** 2) * np.exp(-σ * t) * np.sin(ωd * t + np.arctan(np.sqrt(1 - ζ ** 2) / ζ))
plt.plot(t, y)
plt.plot(t, K * np.ones_like(t), 'r--')
plt.show()
K = 1;
zeta = 0.5;
wn = 1;
sigma = zeta * wn;
wd = wn * sqrt(1 - zeta ^ 2);
t = 0:0.01:5;
y = K - K / sqrt(1 - zeta ^ 2) * exp(-sigma * t) .* sin(wd * t + atan(sqrt(1 - zeta ^ 2) / zeta));
plot(t, y)