状態方程式のステップ応答【control】
code:ss_step1.py
from control import matlab as ctmt
import matplotlib.pyplot as plt
m, c, k = 1, 1, 1
A, B, C, D = 0, 1], [-k/m, -c/m, 0],[1/m, 0, 1, 0
sys = ctmt.ss(A, B, C, D)
yout, time = ctmt.step(sys)
plt.plot(time, yout, '*-')
plt.grid()
plt.show()
https://scrapbox.io/files/6684b021b30db6001dde8e6b.png