ENع
←Lead compensation
Lesson 41 · PID control and compensators

Lead compensation

20 min10 steps5 questionsAdvanced
About this lesson

The plant G(s) = 1/(s(s + 1)) under a plain gain can only slide its poles up and down the line σ = −0.5, so it always takes about 8 s to settle. A lead compensator, Kc(s + z)/(s + p) with the zero nearer the origin than the pole, adds angle and pulls the locus left. You will design one by hand on the root locus, with the angle rule to place its pole and the magnitude rule to set its gain, and get the same 16.3% overshoot in 2.02 s instead of 8.08 s. Then you will see why it is called lead: on the Bode plot its phase is positive, peaking at 36.9°.

You'll learn to

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

Fig 41 · Interactive
01 / 10

A loop that is too slow

Our plant is G(s) = 1/(s(s + 1)), driven by a plain gain K. With K = 1 the output overshoots 16.3%, which we like, but takes 8.08 s to settle. We want the same overshoot, four times faster.

G(s) = 1 / (s(s + 1))      poles 0, −1
controller: a gain K

closed-loop poles:  s² + s + K = 0
K = 1:  s = −0.5 ± 0.87j   (ζ = 0.5, ωn = 1)

overshoot   16.3 %
peak at     3.63 s
settles (2 %) in 8.08 s

goal: same overshoot, settle in about 2 s
Loading figure…
or ← →
Read the lesson step by step
  1. A loop that is too slow

    Our plant is G(s) = 1/(s(s + 1)), driven by a plain gain K. With K = 1 the output overshoots 16.3%, which we like, but takes 8.08 s to settle. We want the same overshoot, four times faster.

    G(s) = 1 / (s(s + 1))      poles 0, −1
    controller: a gain K
    
    closed-loop poles:  s² + s + K = 0
    K = 1:  s = −0.5 ± 0.87j   (ζ = 0.5, ωn = 1)
    
    overshoot   16.3 %
    peak at     3.63 s
    settles (2 %) in 8.08 s
    
    goal: same overshoot, settle in about 2 s
  2. Gain alone cannot do it

    Turn K up. The poles meet at −0.5, then only climb the line σ = −0.5. The real part never moves, so the settling time stays near 8 s. At K = 16 the output overshoots 67.3% and still needs 7.33 s.

    s² + s + K = 0  →  s = −0.5 ± j√(K − 0.25)
    
    real part  −0.5 for every K > 0.25
    settling time ≈ 4 / 0.5 = 8 s, whatever K
    
    K = 16:  s = −0.5 ± 3.97j
    overshoot   67.3 %
    settles (2 %) in 7.33 s
    
    more gain: faster swings, same slow decay
  3. Where we want the poles

    Same overshoot means ζ = 0.5; four times faster means ωn = 4. So we want poles at −2 ± 3.46j. Is that point on the locus? Add the plant's angles there: 120° + 106.1° = 226.1°, not 180°. No gain can reach it.

    target  ζ = 0.5, ωn = 4
      s_d = −ζωn ± jωn√(1 − ζ²) = −2 ± 3.46j
    
    angle condition: on the locus ∠G(s) = −180°
      from the pole at 0:   120°
      from the pole at −1:  106.1°
      ∠G(s_d) = −(120 + 106.1) = −226.1°
    
    short by  226.1 − 180 = 46.1°
    the controller must ADD 46.1° there
  4. A lead compensator

    Swap the plain gain for a lead compensator: Kc(s + z)/(s + p), a zero and a pole with the zero nearer the origin (z < p). Seen from any point above the axis, the zero adds more angle than the pole takes away.

    lead compensator
      Gc(s) = Kc (s + z) / (s + p),   0 < z < p
    
    zero at −z (nearer the origin)
    pole at −p (further left)
    
    at a point s above the axis:
      ∠Gc(s) = ∠(s + z) − ∠(s + p) > 0
      the zero's angle is always the larger one
    
    why not a bare zero (PD)? its gain keeps rising
    with frequency and amplifies noise; the pole
    levels it off at p/z times the low-frequency gain
  5. Put the zero on the slow pole

    A common choice: put the zero at −1, right on the plant's slow pole. At the target it adds +106.1°, exactly cancelling that pole's angle. We still need 46.1° in total, so the lead's pole must take away 60°.

    zero at −1 (z = 1), on the plant pole at −1
      ∠(s_d + 1) = +106.1°   cancels the pole's −106.1°
    
    wanted from the lead in total:  +46.1°
      zero:  +106.1°
      pole:  106.1 − 46.1 = 60° to take away
    
    zero on a plant pole: the two cancel, so the
    loop behaves as if that pole were gone
  6. Place the pole by the angle rule

    The pole must sit where the line to the target leans at 60°: that is −4. Now the loop is Kc/(s(s + 4)), and its locus climbs the line σ = −2, straight through the target.

    pole: ∠(s_d + p) = 60°
      tan 60° = 3.46 / (p − 2)  →  p = 2 + 3.46/1.732 = 4
    
    angles at s_d now:
      −120 − 106.1 + 106.1 − 60 = −180°   ✓ on the locus
    
    loop  Kc(s + 1) / (s(s + 1)(s + 4)) = Kc / (s(s + 4))
    closed-loop poles  (s + 1)(s² + 4s + Kc) = 0
    real part −2 once Kc > 4
  7. Pick Kc by the magnitude rule

    On the locus, the gain that lands on a point is the product of the distances from the poles, divided by those from the zeros. At the target: Kc = 4 × 4 = 16. The poles now sit on −2 ± 3.46j.

    magnitude condition  |Gc(s)G(s)| = 1
      Kc = |s_d| · |s_d + 4|   (the zero and the pole at −1 cancel)
         = 4 · 4 = 16
    
    Gc(s) = 16 (s + 1) / (s + 4)
    
    closed loop: (s + 1)(s² + 4s + 16) = 0
      s = −2 ± 3.46j,  and −1 (on the zero)
    T(s) = 16 / (s² + 4s + 16):  ζ = 0.5, ωn = 4
  8. Same overshoot, four times faster

    Run the step again. The output overshoots 16.3% as before, but peaks at 0.91 s instead of 3.63 s and settles in 2.02 s instead of 8.08 s (dashed). The velocity constant rose from 1 to 4.

                  gain K = 1     lead 16(s+1)/(s+4)
    poles         −0.5 ± 0.87j   −2 ± 3.46j
    overshoot     16.3 %         16.3 %
    peak at       3.63 s         0.91 s
    settles (2 %) 8.08 s         2.02 s
    Kv = lim sL   1              16·1/4 = 4
    
    4.0 times faster, ramp error 1 → 0.25
  9. Why it is called lead

    Feed the compensator a sine wave and its output runs ahead of the input: positive phase. For (s + 1)/(s + 4) the lead peaks at 36.9° at 2 rad/s, halfway between 1 and 4 on a log scale.

    ∠Gc(jω) = atan(ω/1) − atan(ω/4)   > 0 for all ω
    
    α = z/p = 1/4,  T = 1/z = 1
    frequency of most lead  ωmax = 1/(T√α) = √(1·4) = 2 rad/s
    most lead   sin φmax = (1 − α)/(1 + α) = 0.6
                φmax = 36.9°
    
    at the complex point s_d it gave 46.1°: φmax
    only limits the jω axis, used in Bode design
  10. Check the design in Python

    Python's cmath does the angle and magnitude rules for us: it finds the missing angle, places the pole, and works out Kc. It prints 46.1°, a pole at 4 and a gain of 16.

    import cmath, math
    s = complex(-2, 2 * math.sqrt(3))   # target: zeta 0.5, wn 4
    ang = lambda z: math.degrees(cmath.phase(z))
    need = -180 + ang(s) + ang(s + 1)   # angle the lead must add
    pole_ang = ang(s + 1) - need        # zero at -1 gives ang(s + 1)
    p = -s.real + s.imag / math.tan(math.radians(pole_ang))
    Kc = abs(s) * abs(s + p)            # zero and plant pole cancel
    print(round(need, 1), round(p, 2), round(Kc, 2))
    # 46.1 4.0 16.0

Quiz Unlocks after the last step.