Steady-State Error and System Type
After the transients have died out, does the output end up where it was told to go? For a temperature loop the answer decides whether the calibration bath is at or ; for a tracking antenna whether it points at the satellite or just behind it. The steady-state error depends on two things only: the kind of reference (step, ramp, parabola) or disturbance, and how many integrators the loop contains, and where. This lesson turns that into a table you can apply in a minute.
The final value theorem and the error constants
For unity feedback, . If the closed loop is stable, the final value theorem gives
Write the loop with its integrators shown, in time-constant form; is the system type. The three standard references give three error constants:
| Reference | Error constant | Type 0 | Type 1 | Type 2 | |
|---|---|---|---|---|---|
| step | 0 | 0 | |||
| ramp | 0 | ||||
| parabola |
(The position constant here is a different quantity from the proportional gain ; the context always tells which is meant.) Each integrator in the loop removes the error for one more power of . A type-1 loop tracks a step exactly and a ramp with a constant lag; a type-2 loop tracks a ramp exactly. The theorem requires a stable loop: an unstable loop has no steady state, whatever the formula says.
Disturbances: where the integrator sits matters
For a load disturbance entering at the plant input, with :
For a step disturbance , if the plant contains an integrator but the controller does not, : not zero, although the loop is type 1. Only integrators upstream of the disturbance, that is in the controller, reject a constant load. This is why a motor position loop with a P controller tracks a step reference perfectly but sags under a constant load torque, and why the "I" in PID earns its place.
Worked example: a position servo with and without integral action
Given: the motor position loop of Second-Order Systems: plant (rad per V), P controller (loop gain ). A constant load torque is equivalent to at the motor input.
Find: the steady-state error for a unit step (), for a ramp of , and for the load; then the same with a PI controller .
Solve:
- P control, type 1: step error 0; ramp error ; load error () with the angle lagging, a large sag.
- PI control: the loop becomes type 2 (one integrator in the plant, one in the controller): step and ramp errors 0, and the controller integrator sits upstream of the load, so the load error is 0 too.
- The price: a type-2 loop with has two poles at the origin and needs its zero well below crossover to stay well damped; the program checks stability.
Check:
import numpy as np
import control as ct
G = ct.tf([49.75], [0.00995, 1, 0])
t = np.linspace(0, 3, 300001)
for name, C in (("P ", ct.tf([1.445], [1])), ("PI", ct.tf([1.445, 10], [1, 0]))):
T = ct.feedback(C * G, 1) # r -> y
Td = ct.feedback(G, C) # d -> y
stable = bool(np.all(ct.poles(T).real < 0))
e_step = 1 - ct.step_response(T, T=t).outputs[-1]
e_ramp = t[-1] - ct.forced_response(T, t, t).outputs[-1]
e_load = -ct.step_response(-0.5 * Td, T=t).outputs[-1]
e_step, e_ramp, e_load = (round(float(x), 6) + 0.0 for x in (e_step, e_ramp, e_load)) # no "-0.0000"
print(f"{name}: stable {stable}, step error {e_step:+.4f} rad, ramp error {1e3 * e_ramp:+7.2f} mrad, "
f"load error {e_load:+.4f} rad")
print(f"Kv (P) = {1.445 * 49.75:.1f} 1/s -> ramp error 1/Kv = {1e3 / (1.445 * 49.75):.2f} mrad")P : stable True, step error +0.0000 rad, ramp error +13.91 mrad, load error +0.3460 rad
PI: stable True, step error +0.0000 rad, ramp error +0.00 mrad, load error +0.0000 rad
Kv (P) = 71.9 1/s -> ramp error 1/Kv = 13.91 mrad
In the lab: type 0 against type 1
The PID lab's plant is type 0. With (PD control, , ) the loop is type 0 and the readouts show a final value of and a steady-state error of . Doubling the plant gain to only reduces it to (). Put back to : the loop is type 1 and the error is for any plant gain, as long as the loop stays stable.
Guided lab: measure a static error on the heater
Hand calculation. The heater block under P control (, ) is type 0 with position constant : a setpoint above the room ends short (intro). With PI it should end exactly on the setpoint, within the sensor's resolution.
Simulation. Change the program to the heater plant and the two controllers; add a disturbance of (a fan) and compare the errors.
What you would measure. On the heater rig (aluminium block, resistor, MOSFET PWM from a microcontroller, supply with limit), run the P loop for 20 minutes and record the final error: expect about , since is only known to . Switch on a fan: the error grows by about under P control and returns to zero under PI after a few minutes.
Hazards and safe setup. Software limit and thermal cut-out at about , current-limited supply, block on a non-flammable base, never unattended. The fan has a finger guard.
Pitfalls
- Applying the final value theorem to an unstable loop, or to a signal with sustained oscillation.
- Counting integrators in the plant as protection against load disturbances.
- Adding integrators to reach a high type without checking phase: each costs at low frequency.
- Confusing the position error constant with the proportional gain .
Practice
- . Step error?
- . Ramp error for a ramp of slope 2?
- A type-1 plant with . Error for a unit step load at the plant input?
Answer
- , .
- , .
- : the plant's integrator does not help against the load.
Test yourself
A type-1 loop following a ramp of slope has steady-state error
- 0
- infinite
The heater under P control has loop DC gain 8. Its steady error for a 25 K step is
- 0 K
- 2.78 K
- 3.13 K
- 25 K
A motor position loop (integrator in the plant) with P control sags under a constant load torque because
- the loop is type 0
- the only integrator is downstream of the disturbance
- the motor is nonlinear
- the sensor has noise
In the PID lab with and , doubling the plant gain from 1 to 2 changes the steady-state error from 25 % to
- 0 %
- 12.5 %
- 14.29 %
- 25 %