Lead and Lag Compensation
Raise the phase margin with lead compensation
This is the Bode plot of the open loop L(s) = 4·C(s)/(s(s+1)(s+2)), the same plant as F1 to F4 with added gain. The top is gain (dB), the bottom is phase (degrees); the dashed curve is before compensation (C=1), the solid is after adding a lead compensator C(s) = (1+αTs)/(1+Ts). Before compensation the phase margin is about 11°, very thin. Raising α widens the gap between the zero and the pole, so a bump rises in the phase, whose peak height is φ_max = asin((α−1)/(α+1)). Move the center frequency ω_m to place that bump at the crossover frequency where the gain passes 0 dB, and right there the phase is lifted and the phase margin grows. Tune the two knobs so the phase margin lands between 45° and 60°.
One pole, one zero, a reshaped phase
A lead compensator has the form C(s) = (1+αTs)/(1+Ts) with α>1, placing the zero at s = −1/(αT) and the pole at s = −1/T. The zero is closer to the origin than the pole and so acts first, so between the two corner frequencies the phase is lifted positive. On the Bode plot the phase tries to climb toward +90° at the zero before the pole pulls it back down, peaking at ω_m = 1/(T√α), the geometric mean of the two corners. That peak depends only on the ratio α: φ_max = asin((α−1)/(α+1)). The larger α, the taller the bump, but at that same ω_m the compensator gain also rises by a factor of √α. So lead compensation is a trade: you borrow phase and give back high-frequency gain.
Lag is the mirror image
A lag compensator has the same form but with α<1, so the pole is closer to the origin than the zero. This time the phase dips slightly negative, and in return the gain falls by a factor of 1/α going from low to high frequency. Turned around, that means the gain at low frequencies is raised by 1/α relative to high frequencies. So a lag compensator improves steady-state accuracy: a larger DC gain shrinks the steady-state error we saw in F5. The cost of the phase dip is avoided by placing both corners well below the crossover frequency, where the dip has already returned to zero and barely touches the phase margin at crossover. If lead, like the derivative term, adds phase and speed, lag, like the integral term, adds low-frequency gain and cuts error. Using both together is lead-lag compensation.
Compensators built from circuits, and their limits
The appeal of a compensator is that one pole and one zero is all it takes, so it turns straight into a circuit with an op-amp and a few resistors and capacitors. A lead compensator is close to a differentiator, but its pole caps the high-frequency gain, easing the problem of a pure derivative amplifying noise without bound. In fact the practical form of a PID is exactly lead-lag compensation: the integral term is a pole at the origin (the extreme of lag), and the derivative term with a filter is a lead compensator. So the two say the same thing in different languages. Choosing three gains in the time domain is PID tuning; placing poles and zeros in the frequency domain to shape the Bode plot is compensator design. The limits are clear too. Lead raises the high-frequency gain and so is sensitive to noise and saturation; lag adds a slow pole and so lengthens the settling time. So borrow phase with lead and fill in accuracy with lag, using each only as much as truly needed, which is the craft of design.
Back to the first screen
We added a lead compensator to an open loop that had only 11° of margin. Raising α built a bump in the phase, and placing the center frequency ω_m at the crossover frequency where the gain passes 0 dB lifted the phase far from −180° right there, so the phase margin climbed to a healthy value. With just one pole and one zero the compensator pulled up the phase of the Bode plot exactly where we wanted. Where lead borrowed phase to add speed and stability, lag adds low-frequency gain to fill in accuracy. The phase margin we only read off in F3, we have now made for ourselves by designing a compensator.
We said a lag compensator cuts the steady-state error by raising the low-frequency gain, but what exactly sets that error? The next unit, steady-state error, shows how the number of poles the open loop has at the origin, the system type (type 0, 1, 2), decides the final error to a step, a ramp, and a parabola input. The position error constant Kp, the velocity error constant Kv, and the acceleration error constant Ka each appear as the reciprocal of that error, and a single pole at the origin drives the error to one kind of input all the way to zero. What the lag compensator did by raising the DC gain, and what the integral term did by adding a pole at the origin, are organized here into a single table.