System modelling: first- and second-order systems
Motor speed, RC circuits and temperature are described as first-order systems; a spring-mass and position control as second-order systems.
To design a controller you need an equation for how the plant responds to its input. Most real systems can be approximated as first- or second-order.
First-order system
τ·dy/dt + y = K·u
| Example | K (gain) | τ (time constant) |
|---|---|---|
| RC circuit | 1 | RC |
| DC motor speed | Speed per volt | Mechanical time constant J·R/(Kt·Ke) |
| Heater temperature | Temperature per watt | Heat capacity × thermal resistance |
With a step input it reaches 63% at τ and 99% at 5τ. One measured step response is enough to get K and τ directly.
Second-order system
d²y/dt² + 2ζωn·dy/dt + ωn²·y = ωn²·K·u
- ωn (natural frequency): how fast it moves
- ζ (damping ratio): below 1 it settles with ringing (overshoot); at 1 or more it settles without ringing
Motor position (the integral of speed), a mass on a spring, and an LC filter are second-order systems.
Getting a model in practice
- Calculate from datasheet values (motor R, L, Kt, J)
- Fit to a measured step response (system identification)
- If the two results differ a lot, suspect the measurement or the assumptions
Even a roughly correct model lets you choose initial PID gains and check them in simulation.