Course materials · Control Engineering II

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 mv̇+bv=Fm\dot v+bv=F, the input is force, and the state and output are velocity. A=−bmA=-\frac bm, B=1mB=\frac1m. For constant force, the final velocity is Fb\frac Fb and the time constant is mb\frac mb.

Increasing mass leaves the final velocity unchanged but makes the velocity change more slowly.

Checking the model against measurements

In the unit-step response y(t)=K(1−e−t/τ)y(t)=K(1-e^{-t/\tau}), KK is the steady-state value, and τ\tau 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

m=1000m=1000 kg, b=50b=50 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

Reference materials