ENع
←Disturbance error
Lesson 21 · Steady-state error and stability

Steady-state error from disturbances

15 min10 steps5 questionsIntermediate
About this lesson

A motor holds its speed until a load torque grabs the shaft. Follow that load around a unity-feedback loop, find the error it leaves with the final value theorem, and watch four simulated loops answer one question: what removes it? More gain only shrinks it. An integrator in the plant leaves it. Only an integrator in the controller, before the load enters, drives it to zero.

You'll learn to

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

Fig 21 · Interactive
01 / 10

A motor holding its speed

A motor must hold the speed we ask for, R = 1. The controller G1 turns the error into a torque command u. The motor, the plant, is G2(s) = 1/(s + 2). G1 is a gain of 8. The speed settles at 0.800.

R       1        (step at t = 0)
G1(s)   8        (proportional)
G2(s)   1/(s + 2)

speed before any load  0.800
error from R alone     0.200 = 1/(1 + 8/2)
(the lessons on steady-state error and
 system type cover this part)
Loading figure…
or ← →
Read the lesson step by step
  1. A motor holding its speed

    A motor must hold the speed we ask for, R = 1. The controller G1 turns the error into a torque command u. The motor, the plant, is G2(s) = 1/(s + 2). G1 is a gain of 8. The speed settles at 0.800.

    R       1        (step at t = 0)
    G1(s)   8        (proportional)
    G2(s)   1/(s + 2)
    
    speed before any load  0.800
    error from R alone     0.200 = 1/(1 + 8/2)
    (the lessons on steady-state error and
     system type cover this part)
  2. A load grabs the shaft

    At t = 5 s a load torque D = 1 starts to drag on the shaft. It enters between the controller and the motor and subtracts from the torque the controller asks for. The speed sags from 0.800 to 0.700.

    t = 5 s   load D: 0 → 1
    motor sees  u − D
    speed       0.800 → 0.700
    
    A disturbance is an input nobody chose.
    It enters the loop at its own point,
    not where the reference enters.
  3. Two inputs, two errors

    The loop is linear, so the effects of R and D simply add. The error R − c splits into a part caused by R and a part caused by D. Here: 0.200 from R plus 0.100 from the load.

    E(s) = E_R(s) + E_D(s)
    
    from R     0.200   (system type, error constants)
    from D     0.100   (this lesson)
    total      0.300   = 1 − 0.700
    
    Superposition: work out each input alone,
    with the other set to zero, then add.
  4. The load's path to the error

    Set R = 0 and follow D: through the motor to the output, back through the feedback and the controller, and into the motor again. Reducing that loop gives E_D(s) = G2·D / (1 + G1·G2).

    with R = 0:
      c = G2·(u − D),   u = G1·(0 − c)
      c = −G2·D / (1 + G1·G2)
      E_D = 0 − c = G2·D / (1 + G1·G2)
    
    The load passes through G2 on its way in;
    G1 only acts on the way back round.
  5. Final value of a step load

    For a step load D(s) = D0/s, the final value theorem gives e = D0 / (1/G2(0) + G1(0)). The motor's G2(0) = 1/2, so 1/G2(0) = 2. With G1(0) = 8: e = 1/10 = 0.100.

    # P control, K = 8: speed at t = 12 s
    dt, c, w, i = 0.001, 0.0, 0.0, 0.0
    for n in range(12000):        # 12 s
        d = 1.0 if n * dt >= 5 else 0.0   # the load
        e = 1.0 - c
        u = 8 * e
        c += dt * (-2 * c + u - d)
    print(f"{c:.3f}")             # 0.700
  6. Turn the gain up

    Raise the gain to 38 and the load error drops to 1/40 = 0.025, a quarter of before. It never reaches zero: a plain gain needs some error to make the extra torque that balances the load.

    # P control, K = 38: speed at t = 12 s
    dt, c, w, i = 0.001, 0.0, 0.0, 0.0
    for n in range(12000):        # 12 s
        d = 1.0 if n * dt >= 5 else 0.0   # the load
        e = 1.0 - c
        u = 38 * e
        c += dt * (-2 * c + u - d)
    print(f"{c:.3f}")             # 0.925
    
    # torque command at the end: u = 2.850
    # (K = 8 needed only u = 2.400)
  7. An integrator in the plant

    Suppose the plant had the integrator: G2 = 1/(s(s + 2)), a motor whose output is its angle. It is type 1, so the step in R leaves no error. But 1/G2(0) = 0, so the load still leaves 1/8 = 0.125.

    # plant 1/(s(s+2)), K = 8: angle at t = 12 s
    dt, c, w, i = 0.001, 0.0, 0.0, 0.0
    for n in range(12000):        # 12 s
        d = 1.0 if n * dt >= 5 else 0.0   # the load
        e = 1.0 - c
        u = 8 * e
        c, w = c + dt * w, w + dt * (-2 * w + u - d)
    print(f"{c:.3f}")             # 0.875
    
    # before the load: 1.000 (no error from R)
    # after:  0.875
  8. Integrate in the controller

    Back to the speed motor, and add integral action: G1 = 8 + 20/s. Now G1(0) is infinite, so e = 1/(2 + ∞) = 0. The load still makes a dip, to 0.924, but the speed climbs back to exactly 1.000.

    # PI control, G1 = 8 + 20/s: speed at t = 12 s
    dt, c, w, i = 0.001, 0.0, 0.0, 0.0
    for n in range(12000):        # 12 s
        d = 1.0 if n * dt >= 5 else 0.0   # the load
        e = 1.0 - c
        u = 8 * e + 20 * i
        i += e * dt
        c += dt * (-2 * c + u - d)
    print(f"{c:.3f}")             # 1.000
  9. Why the integrator wins

    While any error is left, the integral keeps changing and so does the torque command. It can only stop when the error is zero. Then u carries the load's torque too: 2.000 before the load, 3.000 after.

    before the load   u = 2.000   (2 × speed 1.0)
    after the load    u = 3.000   (2 × 1.0 + load 1.0)
    error             0
    
    A plain gain makes u from e, so it needs
    e ≠ 0 to hold extra torque. The integral
    remembers: it holds u with e = 0.
  10. The rule to remember

    To remove the steady error from a step load, the integrator must sit before the point where the load enters, in the controller. Gain there only shrinks the error. An integrator after it, in the plant, does not help.

    steady error from a step load of 1
    
    K = 8              0.100
    K = 38             0.025
    1/s in the plant   0.125
    1/s in controller  0.000
    
    Only G1(0), the controller's gain at
    zero frequency, can drive it to zero.

Quiz Unlocks after the last step.