System Modeling · Lesson
English translation
Execution setup
The Python option uses python-control. If the module is missing, run %pip install control==0.10.2 in a Colab or Jupyter code cell.
Topics covered
Use the model to determine whether changing mass or resistance affects the transient response, the steady-state value, or both.
Overall workflow
Physical equations and units → state-space model → measured response → coefficient estimation and residuals
Choosing inputs and states from physical equations
In the cruise model , the input is force, and the state and output are velocity. , . For constant force, the final velocity is and the time constant is .
Increasing mass leaves the final velocity unchanged but makes the velocity change more slowly.
Checking the model against measurements
In the unit-step response , is the steady-state value, and is the time to reach approximately 63.2% of that value. Fit this equation to the measured response to estimate both parameters.
The first 3 s of this example capture only the rising response. Compare how much the estimated final value and time constant change when the 15 s record is also used.
Worked example
kg, N·s/m, force 500 N. The state and output are velocity [m/s].
import numpy as np
import matplotlib.pyplot as plt
import control as ctl
s = ctl.tf('s')
m=1000.; b=50.; force=500.
G=ctl.ss([[-b/m]],[[1/m]],[[1]],[[0]])
t=np.linspace(0,150,1501)
t,v=ctl.step_response(force*G,t)
plt.plot(t,v); plt.xlabel('Time [s]'); plt.ylabel('Speed [m/s]'); plt.grid()
Official documentation and data
Reference example
View more examples