TExcelTAD
Home › Control Systems & Automation › Steady-State Error and System Type

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 50.050.0 or 48.9 ∘C48.9\,^\circ\text{C}; 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, E(s)=11+L(s)R(s)E(s) = \frac{1}{1 + L(s)}R(s). If the closed loop is stable, the final value theorem gives

ess=lim⁡t→∞e(t)=lim⁡s→0s E(s)=lim⁡s→0s R(s)1+L(s)e_{ss} = \lim_{t \to \infty} e(t) = \lim_{s \to 0} s\,E(s) = \lim_{s \to 0} \frac{s\,R(s)}{1 + L(s)}

Write the loop with its integrators shown, L(s)=K (… )sN(… )L(s) = \frac{K\,(\dots)}{s^N(\dots)} in time-constant form; NN is the system type. The three standard references give three error constants:

Reference R(s)R(s) Error constant Type 0 Type 1 Type 2
step AA A/sA/s Kp=lim⁡s→0L(s)K_p = \lim_{s \to 0} L(s) A1+Kp\frac{A}{1 + K_p} 0 0
ramp AtAt A/s2A/s^2 Kv=lim⁡s→0sL(s)K_v = \lim_{s \to 0} s L(s) ∞\infty AKv\frac{A}{K_v} 0
parabola At2/2At^2/2 A/s3A/s^3 Ka=lim⁡s→0s2L(s)K_a = \lim_{s \to 0} s^2 L(s) ∞\infty ∞\infty AKa\frac{A}{K_a}

(The position constant KpK_p here is a different quantity from the proportional gain KpK_p; the context always tells which is meant.) Each integrator in the loop removes the error for one more power of tt. 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 DD entering at the plant input, with L=CGL = CG:

Ed(s)=−G(s)1+C(s)G(s)D(s),ess=−lim⁡s→0s G(s)D(s)1+C(s)G(s)E_d(s) = -\frac{G(s)}{1 + C(s)G(s)}D(s), \qquad e_{ss} = -\lim_{s \to 0}\frac{s\,G(s)D(s)}{1 + C(s)G(s)}

For a step disturbance dd, if the plant contains an integrator but the controller does not, ess=−d/C(0)e_{ss} = -d/C(0): 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 G(s)=49.75s(0.00995s+1)G(s) = \frac{49.75}{s(0.00995 s + 1)} (rad per V), P controller Kp=1.445 V/radK_p = 1.445\ \text{V/rad} (loop gain Kv=71.9 s−1K_v = 71.9\ \text{s}^{-1}). A constant load torque is equivalent to d=−0.5 Vd = -0.5\ \text{V} at the motor input.

Find: the steady-state error for a unit step (1 rad1\ \text{rad}), for a ramp of 1 rad/s1\ \text{rad/s}, and for the load; then the same with a PI controller C=1.445+10sC = 1.445 + \frac{10}{s}.

Solve:

  • P control, type 1: step error 0; ramp error 1/Kv=1/71.9=13.9 mrad1/K_v = 1/71.9 = 13.9\ \text{mrad}; load error −d/Kp=0.5/1.445=0.346 rad-d/K_p = 0.5/1.445 = 0.346\ \text{rad} (19.8∘19.8^\circ) 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 L=49.75(1.445s+10)s2(0.00995s+1)L = \frac{49.75(1.445 s + 10)}{s^2(0.00995 s + 1)} has two poles at the origin and needs its zero well below crossover to stay well damped; the program checks stability.

Check:

python · try it yourself
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 K(s+1)(0.5s+1)\frac{K}{(s + 1)(0.5 s + 1)} is type 0. With Ki=0K_i = 0 (PD control, Kp=3K_p = 3, Kd=0.1K_d = 0.1) the loop is type 0 and the readouts show a final value of 0.75000.7500 and a steady-state error of 25.00 %25.00\,\% =11+3= \frac{1}{1 + 3}. Doubling the plant gain to K=2K = 2 only reduces it to 14.29 %14.29\,\% (11+6\frac{1}{1 + 6}). Put KiK_i back to 2 s−12\ \text{s}^{-1}: the loop is type 1 and the error is 0.00 %0.00\,\% for any plant gain, as long as the loop stays stable.

r = 1+C(s): Kp 3, Ki 0, Kd 0.1P(s) = 1/((1s+1)(0.5s+1))y-T(s) = (0.100 s + 3.000) / (0.500 s^2 + 1.600 s + 4.000)closed-loop poles: -1.60+j2.33, -1.60-j2.330.00.51.001 s2 s3 sty(t)t_s 2.04 s+11.6 %y(t)setpoint10-90 % rise

Guided lab: measure a static error on the heater

Hand calculation. The heater block under P control (Kp=2 W/KK_p = 2\ \text{W/K}, Rth=4 K/WR_\text{th} = 4\ \text{K/W}) is type 0 with position constant KpRth=8K_p R_\text{th} = 8: a setpoint 25 K25\ \text{K} above the room ends 259=2.78 K\frac{25}{9} = 2.78\ \text{K} short (intro). With PI it should end exactly on the setpoint, within the sensor's resolution.

Simulation. Change the program to the heater plant 4300s+1\frac{4}{300 s + 1} and the two controllers; add a disturbance of −2 W-2\ \text{W} (a fan) and compare the errors.

What you would measure. On the heater rig (aluminium block, 10 Ω10\ \Omega resistor, MOSFET PWM from a microcontroller, 12 V12\ \text{V} supply with 1.5 A1.5\ \text{A} limit), run the P loop for 20 minutes and record the final error: expect about 2.8 K±0.6 K2.8\ \text{K} \pm 0.6\ \text{K}, since RthR_\text{th} is only known to ±20 %\pm 20\,\%. Switch on a fan: the error grows by about 4×29=0.9 K\frac{4 \times 2}{9} = 0.9\ \text{K} 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 70 ∘C70\,^\circ\text{C}, 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 90∘90^\circ at low frequency.
  • Confusing the position error constant KpK_p with the proportional gain KpK_p.

Practice

  1. L(s)=20(s+2)(s+5)L(s) = \frac{20}{(s + 2)(s + 5)}. Step error?
  2. L(s)=50s(s+10)L(s) = \frac{50}{s(s + 10)}. Ramp error for a ramp of slope 2?
  3. A type-1 plant 1s(s+1)\frac{1}{s(s + 1)} with C=4C = 4. Error for a unit step load at the plant input?
Answer
  1. Kp=20/10=2K_p = 20/10 = 2, ess=1/3=33 %e_{ss} = 1/3 = 33\,\%.
  2. Kv=50/10=5 s−1K_v = 50/10 = 5\ \text{s}^{-1}, ess=2/5=0.4e_{ss} = 2/5 = 0.4.
  3. ess=−1/C(0)=−0.25e_{ss} = -1/C(0) = -0.25: the plant's integrator does not help against the load.

Test yourself

A type-1 loop following a ramp of slope AA has steady-state error

  1. 0
  2. A/KvA/K_v
  3. A/(1+Kp)A/(1 + K_p)
  4. infinite

The heater under P control has loop DC gain 8. Its steady error for a 25 K step is

  1. 0 K
  2. 2.78 K
  3. 3.13 K
  4. 25 K

A motor position loop (integrator in the plant) with P control sags under a constant load torque because

  1. the loop is type 0
  2. the only integrator is downstream of the disturbance
  3. the motor is nonlinear
  4. the sensor has noise

In the PID lab with Ki=0K_i = 0 and Kp=3K_p = 3, doubling the plant gain KK from 1 to 2 changes the steady-state error from 25 % to

  1. 0 %
  2. 12.5 %
  3. 14.29 %
  4. 25 %