ENع
←Steady-state error
Lesson 19 · Steady-state error and stability

Steady-state error and the final value theorem

15 min10 steps5 questionsIntermediate
About this lesson

Ask a feedback loop for 1 and it may settle at 0.8. Follow one unity-feedback loop, a gain K driving the plant 1/((s+1)(s+2)(s+10)), through a simulated step response, then predict the leftover error in two lines with the final value theorem: e_ss = 1/(1 + G(0)). More gain shrinks the error, until at K = 440 the loop goes unstable and the theorem's answer means nothing.

You'll learn to

Tick what you feel confident about. These self-checks do not affect your lesson score.

Fig 19 · Interactive
01 / 10

Ask for 1

A unity-feedback loop: a gain K = 80 drives the plant P(s) = 1/((s+1)(s+2)(s+10)), and the output is fed straight back. At t = 0 the reference r(t) steps from 0 to 1. Does the output end up at 1?

reference   r(t) = 1 for t ≥ 0 (unit step)
controller  u = K·e,  K = 80
plant       P(s) = 1/((s+1)(s+2)(s+10))
open loop   G(s) = K·P(s)
feedback    unity: c(t) goes straight back
Loading figure…
or ← →
Read the lesson step by step
  1. Ask for 1

    A unity-feedback loop: a gain K = 80 drives the plant P(s) = 1/((s+1)(s+2)(s+10)), and the output is fed straight back. At t = 0 the reference r(t) steps from 0 to 1. Does the output end up at 1?

    reference   r(t) = 1 for t ≥ 0 (unit step)
    controller  u = K·e,  K = 80
    plant       P(s) = 1/((s+1)(s+2)(s+10))
    open loop   G(s) = K·P(s)
    feedback    unity: c(t) goes straight back
  2. The error is the gap

    The summing junction subtracts the output from the reference: e(t) = r(t) − c(t). At t = 0 the output is still 0, so the error is 1. The steady-state error, e_ss, is the value e(t) settles to as t grows.

    e(t) = r(t) − c(t)
    
    t = 0      c = 0      e = 1
    t → ∞      e → e_ss   (if it settles)
    
    In the s-domain, with unity feedback:
    E(s) = R(s) / (1 + G(s))
  3. Run the step

    Simulated: the output rises, peaks at 1.04, and settles within 2 % by 3.7 s. It settles at 0.800, not 1. The error stays at 0.200 for good. That leftover is the steady-state error.

    # simulate the loop: K = 80, P = 1/((s+1)(s+2)(s+10))
    K, dt = 80, 0.001
    x = [0.0, 0.0, 0.0]              # c, c', c''
    def f(x):
        u = K * (1 - x[0])           # u = K * e
        return [x[1], x[2], u - 13*x[2] - 32*x[1] - 20*x[0]]
    for n in range(10000):           # 10 s, Runge-Kutta 4
        k1 = f(x)
        k2 = f([v + dt/2*k for v, k in zip(x, k1)])
        k3 = f([v + dt/2*k for v, k in zip(x, k2)])
        k4 = f([v + dt*k for v, k in zip(x, k3)])
        x = [v + dt/6*(a + 2*b + 2*c + d) for v, a, b, c, d in zip(x, k1, k2, k3, k4)]
    print(f"{1 - x[0]:.3f}")         # 0.200
  4. Why a gap must remain

    The plant's DC gain is P(0) = 1/20, so holding c = 0.8 takes a drive u = 16. The controller only makes u = 80·e. The one error that gives 16 is 0.200. Zero error would mean zero drive.

    at steady state nothing changes, so s → 0:
    c = P(0)·u = u / 20
    u = K·e   = 80·e
    e = 1 − c
    
    solve: e = 1 / (1 + 80/20) = 0.200
    u = 16.0,  c = 0.800
  5. The final value theorem

    We need not simulate. The final value theorem says: if e(t) settles, its final value is the limit of s·E(s) as s goes to 0. For a step, R(s) = 1/s, so s·E(s) = 1/(1 + G(s)).

    final value theorem (FVT)
      lim e(t), t → ∞  =  lim s·E(s), s → 0
      valid only if every pole of s·E(s) is in
      the left half-plane
    
    step:  R(s) = 1/s
      s·E(s) = s · (1/s) / (1 + G(s)) = 1 / (1 + G(s))
  6. Plug in s = 0

    At s = 0 the plant gives 1/20, so G(0) = 80/20 = 4. Then e_ss = 1/(1 + 4) = 0.200, the same as the simulation, from two lines of arithmetic. G(0) is the loop's DC gain.

    K = 80
    G0 = K / 20                 # G(0) = 4.0
    print(f"{1 / (1 + G0):.3f}")  # 0.200
    
    simulation at t = 10 s:  e = 0.200
  7. Turn the gain up

    More gain, less error: K = 180 gives G(0) = 9 and e_ss = 1/10 = 0.100. The price: the output now peaks at 1.42 and takes 5.7 s to settle. Gain buys accuracy and costs damping.

    K       G(0)   e_ss    peak    2 % settle
    80      4      0.200   1.04    3.7 s
    180     9      0.100   1.42    5.7 s
    
    simulated e at 10 s, K = 180: 0.099
  8. Too much gain

    K = 440: the theorem's formula promises e_ss = 0.043. The simulation disagrees: the output swings wider and wider. Two closed-loop poles sit at 0.11 ± j5.90, in the right half-plane. There is no final value.

    K = 440
    formula      1 / (1 + 22) = 0.043   (meaningless)
    poles        0.11 ± j5.90,  -13.21
    simulation   c swings from -1.47 to 3.23
                 and keeps growing
  9. Check stability first

    The theorem only holds when the closed loop is stable. For this loop that means K below 396. A later lesson in this module, The Routh-Hurwitz test, finds that limit without solving for the poles.

    closed loop: s³ + 13s² + 32s + (20 + K) = 0
    for K > 0:  stable  ⇔  K < 396
    
    K = 80    poles -1.05 ± j2.84, -10.91   stable
    K = 440   poles 0.11 ± j5.90, -13.21   unstable
    
    Order: check stability, then use the FVT.
  10. What sets the error

    For a step, e_ss = 1/(1 + G(0)): only the loop's DC gain matters. A bigger G(0) means a smaller error, as long as the loop stays stable. A pole at s = 0 makes G(0) infinite; System type and error constants is next.

    step input, unity feedback, stable loop:
      e_ss = 1 / (1 + G(0))
    
    bigger G(0)  → smaller e_ss
    G(0) = ∞     → e_ss = 0   (integrator in the loop)
    
    python-control: control.dcgain(G) returns G(0)

Quiz Unlocks after the last step.