S9 · Lesson 25 · Gain, phase and delay margins
How far a stable loop is from instability, measured as gain margin, phase margin, delay margin and the peak sensitivity, how to read them from Bode and Nyquist plots, typical targets, and what the phase margin says about overshoot
A loop that's stable on paper may not be stable on the bench: the real plant's gain drifts with temperature, a sensor adds a little delay, an unmodeled resonance adds phase lag. Margins measure how much of each the loop can absorb before it oscillates. They're the numbers on every control design review and every power-supply datasheet that quotes a loop's phase margin, and they connect the frequency-domain picture to the overshoot you'll see on a scope.
- The Bode plot of , with the phase crossover marked at rad/s, where the phase is −180°.
- The gain margin is how far the magnitude is below 0 dB there: 30/K, so 3 (9.5 dB) at K = 10.
- The phase margin is how far the phase is above −180° where the magnitude crosses 0 dB. Lower K and both margins grow: at K = 4 the phase margin is 49° and the gain margin 7.5.
Predict
The loop with K = 10 has a 25.4° phase margin at its 1.23 rad/s crossover. How much pure time delay could it tolerate before oscillating?
A delay T takes away radians of phase at the crossover without changing the magnitude. The margin of 25.4° is 0.443 rad, so the loop can lose it all with = 0.361 s of delay.
Name it
The four margins
- Gain margin GM = , at the phase crossover where ∠L = −180°: the factor by which the gain can rise. Often quoted in decibels.
- Phase margin PM = 180° + ∠L(jω_c), at the gain crossover: the extra phase lag the loop can take.
- Delay margin = PM (in radians)/: the extra delay the loop can take.
- Modulus (stability) margin : the shortest distance from the Nyquist plot to −1. is the peak of the sensitivity , the worst-case amplification of disturbances.
On a Nyquist plot, GM is how far inside −1 the plot crosses the real axis, PM is the angle from −1 to where the plot crosses the unit circle, and is the radius of the largest circle around −1 that the plot doesn't enter. A small guarantees both of the others:
Targets
Common targets are GM ≥ 2 (6 dB), PM between 45° and 60°, and between 1.4 and 2. = 1.4 guarantees GM ≥ 3.5 and PM ≥ 41.8°; = 2 guarantees GM ≥ 2 and PM ≥ 29.0°.
Phase margin and overshoot
For the standard loop , PM = : 45° ↔ ζ = 0.42 (23% overshoot), 60° ↔ ζ = 0.61 (9%). Real loops roughly follow this.
Worked example
Find all the margins of .
Show the solution
- Phase crossover. It's at = 2.24 rad/s, where so GM = 3 (9.5 dB).
- Gain crossover. At 1.23 rad/s the phase is −154.6°:
- Delay margin.
- Sensitivity peak. The Nyquist plot passes closest to −1 at 1.40 rad/s, at distance 0.368, so Disturbances near 1.4 rad/s are amplified 2.7 times.
- Read the margins together. The gain margin looks fine, but the phase margin and show a poorly damped loop.
Answer GM = 3 (9.5 dB), PM = 25.4°, a delay margin of 0.361 s and = 2.72.
Worked example
Drop the gain to K = 4. What changes?
Show the solution
- Gain margin. The phase crossover stays at 2.24 rad/s, so or 17.5 dB.
- Phase margin. The gain crossover moves down to 0.66 rad/s, where the phase margin is 49.0°.
- Sensitivity peak. falls to 1.61.
- Step response. It overshoots 19% and settles in about 9.6 s.
- The trade. Lower gain bought damping at the cost of speed; lesson 26 shows how a lead compensator buys both.
Answer GM rises to 7.5 (17.5 dB), PM to 49.0°, and falls to 1.61, while the crossover drops to 0.66 rad/s.
Worked example
Find the margins and the sensitivity peak of .
Show the solution
- Phase margin. Crossover is at 1 rad/s, so
- Delay margin. The loop can take 1.07 s more delay:
- Gain margin. The phase reaches −180° where 0.5ω = π/2, at 3.14 rad/s, where |L| = 1/3.14: or 9.9 dB.
- Sensitivity peak. A numerical search gives = 1.59, a modulus margin of 0.63.
- Check against the bounds. That's consistent with the bounds it guarantees: GM ≥ 2.69 and PM ≥ 36.6°.
Answer PM = 61.4°, a delay margin of 1.07 s, GM = 3.14 (9.9 dB) and = 1.59.
Check
What's the gain margin of in decibels?
Check
A loop has a 45° phase margin at a 2 rad/s crossover. What's its delay margin?
Write units the way you normally would: 1.5 ms, 1500 µs and 0.0015 s are the same answer.
Check
A loop has K = 10 s⁻¹ and T = 5 ms. What's its phase margin?
Check
An integrator with a 10 ms delay in the loop, . What's the largest K before it oscillates?
Check
A loop's peak sensitivity is = 1.4. What phase margin is it guaranteed?
Check
A loop has ζ = 0.5. What's its phase margin?
Check
A loop's sensitivity peaks at = 1.4.
(a)
What gain margin is guaranteed, as a factor?
(b)
What phase margin?
Check
A loop with KT < π/2.
Step 1
Where does it cross over?
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°.
Step 2
What is its phase margin, in radians?
Step 3
Where is its phase −180°?
Step 4
What is its gain margin, as a factor?
Explain why
Why isn't a good gain margin alone enough to call a loop robust?
The gain margin only measures the distance to −1 along the negative real axis, at the one frequency where the phase is −180°. The Nyquist plot can still pass very close to −1 from another direction, for example at the gain crossover with little phase margin, and then a small change in phase, such as a little extra delay, would push it through. The loop with K = 10 above has a gain margin of 3 but only 25° of phase margin and a peak sensitivity of 2.7, so it rings and amplifies disturbances. The modulus margin, the closest approach to −1 in any direction, captures both, which is why modern designs specify .
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.