S926 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

S9 · Lesson 26 · Loop shaping with lead and lag compensators

Designing in the frequency domain by choosing a crossover and the phase there, the lead compensator's maximum phase and where it occurs, the lag compensator's low-frequency gain and its small phase cost, and the type II compensator used in switching power supplies

In the frequency domain a design becomes a drawing exercise: decide where the loop gain should cross 0 dB (that sets the speed), make sure the phase there leaves enough margin (that sets the damping), and keep the gain high at low frequencies (that sets the accuracy). A lead compensator adds phase near crossover, a lag compensator adds gain far below it. This is how most analog loops are compensated, from servo amplifiers to the error amplifier inside every switching regulator.

  • The motor position loop G=10/(s(0.1s+1)) with a lead compensator Kc1+s/ωz1+s/(αωz).
  • With the defaults (Kc = 2.94, ωz = 13.1, α = 2.32) the loop crosses at 20 rad/s, 2.5 times faster than the plain loop's 7.9, with the same 50° phase margin.
  • The lead's phase bump peaks at αωz. Centering it on the crossover gets the most phase for the least gain.

Predict

A lead compensator with ωp/ωz = α = 10 adds the most phase at one frequency. How much?

Name it

Specifications in the frequency domain

  • Crossover ωc sets speed: rise time is roughly 1.5/ωc to 2/ωc.
  • Phase margin sets damping (lesson 25): 45 to 60° is typical.
  • Low-frequency gain sets accuracy: Kv or Kp (lesson 10), and disturbance rejection.
  • High-frequency roll-off keeps noise and unmodeled dynamics out.

Lead

Clead=Kc1+s/ωz1+s/ωp,α=ωpωz>1

adds up to ϕmax=sin−1⁡α−1α+1 at ωm=ωzωp, where its gain is Kcα (10 log α dB above Kc). For a needed phase φ, α=1+sin⁡ϕ1−sin⁡ϕ.

Design: pick ωc; find the plant's phase there and the lead φ needed for the margin (plus about 5° if a lag will be added); compute α; set ωz=ωc/α, ωp=ωcα; choose Kc so that Kcα|G(jωc)|=1.

Lag

Clag=s+ωzs+ωp,ωp<ωz

has gain ωz/ωp at DC and 1 at high frequency. With ωz about a decade below crossover, it costs only a few degrees there.

The type II compensator

A switching regulator's error amplifier is usually an integrator with one zero and one pole, C=ωI(1+s/ωz)s(1+s/ωp): the integrator gives zero steady error, and the zero–pole pair is a lead centered on the crossover. A type III compensator adds a second zero–pole pair for plants, like a voltage-mode buck converter's LC filter, that lose 180° of phase.

Worked example

Design a lead so that G=10/(s(0.1s+1)) crosses at 20 rad/s with a 50° phase margin.

Show the solution
  1. Plant at 20 rad/s. |G|=10205=0.224 (−13.0 dB), and the phase is −153.4°.
  2. Phase the lead must add. A 50° margin needs −130°, so ϕ=153.4°−130°=23.4°
  3. Lead ratio. α=1+sin⁡23.4°1−sin⁡23.4°=2.32
  4. Zero, pole and gain. Centered on 20 rad/s, with α=1.523: ωz=20/1.523=13.1rad/sωp=30.5rad/sKc=1α|G|=2.94
  5. Check. The loop crosses at 20 rad/s with PM = 50.0°.
  6. Step response. It overshoots 19% and settles in 0.32 s, against 0.81 s before, and Kv rises from 10 to 29.4.

Answer a lead with α = 2.32, its zero at 13.1 rad/s, its pole at 30.5 rad/s and Kc = 2.94, which crosses at 20 rad/s with a 50.0° phase margin.

Worked example

Add a lag to that design for five times more Kv.

Show the solution
  1. Place the lag. Put its zero a decade below crossover, at 2 rad/s, and its pole at 0.4.
  2. Its cost at crossover. At 20 rad/s it adds tan−1⁡10−tan−1⁡50=−4.6° and changes the gain by only 0.5%.
  3. New margin. PM=50.0°−4.6°=45.4°
  4. New velocity constant. Kv=29.4×5=147
  5. Step response. It now overshoots 27% and settles in 0.53 s, slower because of the lag's slow tail.
  6. A better plan. Designing the lead for 55° in the first place would have absorbed the lag's cost.

Answer a lag with its zero at 2 rad/s and pole at 0.4 rad/s raises Kv to 147, and the phase margin falls to 45.4°.

Worked example

A loop crosses over at 50 rad/s with a 55° phase margin. Integral action is added by a PI whose zero sits a decade lower, at 5 rad/s. What does it cost?

Show the solution
  1. Phase cost. At crossover the PI factor 1+ωz/(jω) has phase −tan−1⁡(5/50)=−5.7° leaving a 49.3° margin.
  2. Gain change. Its magnitude is 1+0.01, a 0.04 dB rise that barely moves the crossover.
  3. What it buys. The loop becomes type 1 and rejects constant disturbances completely.
  4. Where to put the zero. A decade below crossover is the usual compromise; at a factor of 3 the cost would be 18°.

Answer it costs 5.7° of phase margin (leaving 49.3°) and raises the gain at crossover by only 0.04 dB.

Check

A lead compensator has ωp/ωz = 5. What's the most phase it adds?

Check

A lead must add 35° at its peak. What ratio α=ωp/ωz does it need?

Check

A lead has its zero at 10 rad/s and its pole 3 times higher. Where does it add the most phase?

Write units the way you normally would: 1.5 rad/s and 1500 mrad/s are the same answer.

Check

A lead with α = 6 is centered on 40 rad/s to make G=5/(s(0.05s+1)) cross there. What Kc does that take?

Check

A lag with its zero at 1 rad/s and pole at 0.5 rad/s: how much phase does it cost at a 10 rad/s crossover?

Check

How much gain does a lead with α = 3 add at its center frequency, relative to its DC gain?

Check

A loop crosses over with a 45° phase margin, and a PI zero is placed a factor 5 below the crossover.

(a)

What phase margin remains?

(b)

How much does it raise the gain at the old crossover?

Check

A lead with pole-to-zero ratio a is centered on frequency w.

Step 1

What is its maximum phase, in degrees?

Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.

Explain why

Why is a lead compensator centered on the crossover frequency?

Practice

Keep practicing

10 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.