This page is the drill hall for stability margins . The parent note built the two rulers — gain margin (GM) and phase margin (PM) — from the critical point − 1 . Here we throw every kind of case at those rulers so that no exam question, no sign, no degenerate loop can surprise you.
Before we start, three reminders in plain words so nobody is lost from line one:
Definition The vocabulary we will keep using
s — the Laplace variable. Think of it as a stand-in for "frequency behaviour." A transfer function L ( s ) is a formula in s . To ask "how does the loop respond to a pure oscillation at frequency ω ?", we set s = j ω , where j = − 1 turns the algebra into a rotating wave. So L ( j ω ) is just L ( s ) evaluated on the oscillation axis.
L ( j ω ) — the open-loop response : a complex number with a size ∣ L ∣ (how much the loop amplifies) and an angle ∠ L (how much it delays the wave, in degrees).
ω g c — gain crossover : the ω where the size equals 1 .
ω p c — phase crossover : the ω where the angle equals − 18 0 ∘ .
GM = 1/∣ L ( j ω p c ) ∣ and PM = 18 0 ∘ + ∠ L ( j ω g c ) .
Every question this topic can ask is one of these cells. Each worked example below is tagged with the cell(s) it covers.
Cell
What makes it distinct
Example
A. Clean GM
Loop has a real phase crossover; compute GM
Ex 1
B. Clean PM
Loop crosses $
L
C. Both margins together
Same loop, find GM and PM
Ex 3
D. Infinite GM (degenerate)
Phase never reaches − 18 0 ∘ ⟹ GM = ∞
Ex 4
E. Negative margin (unstable)
Gain pushed too high ⟹ GM < 0 dB, PM < 0
Ex 5
F. Time-delay twist
Delay eats phase margin; find τ ma x
Ex 6
G. Design / word problem
Choose K to hit a target PM (link to overshoot)
Ex 7
H. Exam trap
Conditionally stable / sign confusion
Ex 8
Worked example Ex 1 — Cell A: clean gain margin
Statement. For L ( s ) = s ( s + 1 ) ( s + 2 ) 4 , find the gain margin in dB.
Forecast: Guess — is GM here bigger or smaller than Worked Example 1 in the parent (where K = 1 gave GM = 6 )? Write your guess before reading on.
Find ω p c (where ∠ L = − 18 0 ∘ ).
∠ L = − 9 0 ∘ − arctan ω − arctan ( ω /2 ) . Setting = − 18 0 ∘ gives arctan ω + arctan ( ω /2 ) = 9 0 ∘ .
Why this step? GM must be read exactly where the phase already sits at the danger angle — only extra size is then needed to reach − 1 .
The tangent of a sum blows up (to ∞ ) when the two arctans add to 9 0 ∘ ; using tan ( a + b ) = 1 − t a n a t a n b t a n a + t a n b , the denominator 1 − ω ⋅ 2 ω = 0 , so ω p c = 2 .
Size there. ∣ L ∣ = ω ω 2 + 1 ω 2 + 4 4 . At ω = 2 : denominator = 2 ⋅ 3 ⋅ 6 = 6 , so ∣ L ∣ = 6 4 = 3 2 .
Why this step? ∣ L ∣ at ω p c is the one number GM depends on.
GM = ∣ L ∣ 1 = 2 3 = 1.5 , i.e. 20 log 10 1.5 ≈ 3.52 dB.
Why this step? We invert ∣ L ∣ because GM is the factor you can multiply the gain by before ∣ L ∣ reaches 1 at the danger phase: if ∣ L ∣ = 3 2 , multiplying by 2 3 lands it exactly on 1 (i.e. on − 1 ). Bigger ∣ L ∣ ⟹ closer to disaster ⟹ smaller GM, which is exactly what dividing does.
Verify: The gain went up 4 × vs the parent's K = 1 (GM 6 ). Multiplying K scales ∣ L ∣ up, so GM must divide by 4 : 6/4 = 1.5 . ✓ Matches — and it is smaller, as bigger gain shrinks GM.
Worked example Ex 2 — Cell B: clean phase margin
Statement. For L ( s ) = s ( s + 1 ) 1 , find the phase margin (repeat of parent Ex 2 but we verify by figure).
Forecast: The parent got PM ≈ 51. 8 ∘ . Is that "healthy"? Guess a yes/no.
Gain crossover. ∣ L ∣ = ω ω 2 + 1 1 = 1 ⇒ ω 4 + ω 2 − 1 = 0 . Let u = ω 2 : u = 2 − 1 + 5 ≈ 0.618 , so ω g c = 0.618 ≈ 0.786 .
Why this step? PM is read where the size is exactly 1 ; only extra phase lag is then needed to reach − 18 0 ∘ .
Phase there. ∠ L = − 9 0 ∘ − arctan ( 0.786 ) = − 9 0 ∘ − 38. 2 ∘ = − 128. 2 ∘ .
PM = 18 0 ∘ + ( − 128. 2 ∘ ) = 51. 8 ∘ .
Look at the figure: the loop curve crosses the unit circle (size = 1 ) at the amber dot; the amber wedge from that ray back to the − 18 0 ∘ axis is the phase margin.
Verify: tan ( 38. 2 ∘ ) = 0.787 ≈ ω g c . ✓ And 3 0 ∘ –6 0 ∘ is healthy, so yes. ✓
Worked example Ex 3 — Cell C: both margins on one loop
Statement. For L ( s ) = s ( s + 1 ) ( s + 2 ) 2 , find both GM (dB) and PM.
Forecast: With K = 2 (double the parent's K = 1 ), guess whether both margins are still positive.
GM. Same ω p c = 2 (phase does not depend on K ). ∣ L ∣ = 6 2 = 3 1 , so GM = 3 = 20 log 10 3 ≈ 9.54 dB.
Why this step? K only slides the size curve; the danger frequency is unchanged.
PM — find ω g c . Solve ∣ L ∣ = ω ω 2 + 1 ω 2 + 4 2 = 1 . Numerically ω g c ≈ 0.749 .
Why this step? Size= 1 is where PM lives.
Phase there. ∠ L = − 9 0 ∘ − arctan ( 0.749 ) − arctan ( 0.749/2 ) = − 9 0 ∘ − 36.8 3 ∘ − 20.5 3 ∘ = − 147.3 6 ∘ .
PM = 18 0 ∘ − 147.3 6 ∘ = 32. 6 ∘ .
Verify: Both positive ⟹ stable, consistent with GM = 3 > 1 . Sanity on step 2: plug ω = 0.749 into ∣ L ∣ ⟹ ≈ 1.00 . ✓ (See Bode plots to read these two numbers straight off the two stacked graphs.)
Worked example Ex 4 — Cell D: infinite gain margin (degenerate)
Statement. For the first-order loop L ( s ) = s + 1 5 , find GM and PM.
Forecast: How much extra gain before instability? Guess "some finite factor" vs "unlimited."
Phase range. ∠ L = − arctan ω . As ω : 0 → ∞ , ∠ L goes from 0 ∘ down toward − 9 0 ∘ but never reaches − 18 0 ∘ .
Why this step? GM lives at − 18 0 ∘ — if the phase never gets there, there is no ω p c .
GM = ∞ (or "∞ dB"): no finite gain multiple can ever push a curve that stops at − 9 0 ∘ onto the negative-real axis − 1 .
PM. Size ∣ L ∣ = ω 2 + 1 5 = 1 ⇒ ω 2 + 1 = 25 ⇒ ω g c = 24 ≈ 4.899 . Phase = − arctan ( 4.899 ) = − 78.4 6 ∘ . PM = 18 0 ∘ − 78.4 6 ∘ = 101. 5 ∘ .
Verify: A single pole can never make a simple loop unstable by gain alone — classic result, GM = ∞ . ✓ PM huge (> 9 0 ∘ ) ⟹ extremely damped, matches Root locus staying in the left half-plane for all K . ✓
Worked example Ex 5 — Cell E: negative margin (already unstable)
Statement. Take Ex 1's plant but crank the gain: L ( s ) = s ( s + 1 ) ( s + 2 ) 12 . Find GM and PM; is the loop stable?
Forecast: We know K = 6 is the exact edge (parent Ex 1: GM = 6 at K = 1 ). We chose K = 12 . Guess the sign of GM.
GM. ω p c = 2 unchanged. ∣ L ∣ = 6 12 = 2 , so GM = 2 1 = 0.5 = 20 log 10 0.5 ≈ − 6.02 dB.
Why this step? GM < 1 (negative dB) is the algebraic signature of instability: the curve has already swallowed − 1 .
PM. Solve ∣ L ∣ = 1 : ω ω 2 + 1 ω 2 + 4 12 = 1 ⇒ ω g c ≈ 1.96 . Phase = − 9 0 ∘ − arctan ( 1.96 ) − arctan ( 0.98 ) = − 9 0 ∘ − 62.9 7 ∘ − 44.4 2 ∘ = − 197. 4 ∘ . PM = 18 0 ∘ − 197. 4 ∘ ≈ − 17. 4 ∘ .
Why this step? Negative PM confirms the phase has already crossed the danger angle before the gain drops to 1 .
Verdict. GM < 0 dB and PM < 0 ⟹ unstable .
Verify: Critical gain is K = 6 (GM= 1 ). We used 12 = 2 × 6 , so GM must be 1/2 . ✓ Both margins negative ⟹ the Nyquist stability criterion would show − 1 encircled. ✓
Worked example Ex 6 — Cell F: the time-delay twist
Statement. The stable loop L ( s ) = s ( s + 1 ) 1 (Ex 2: PM = 51. 8 ∘ , ω g c = 0.786 ) gets a transport delay τ (e.g. a communication lag). What is the largest τ that keeps it stable?
Forecast: Delay adds only phase lag, no size change. Guess whether τ ma x is a fraction of a second or several seconds.
What a delay does. A delay e − s τ has size 1 (never touches the magnitude curve) but adds phase − ω τ radians.
Why this step? Because size is untouched, ω g c stays 0.786 — the extra lag simply eats into PM there.
Eat all the margin. Instability at the moment the added lag equals the whole PM:
τ ma x = ω g c PM in radians .
PM = 51. 8 ∘ = 51.8 × 180 π = 0.9040 rad.
Compute. τ ma x = 0.786 0.9040 = 1.150 s.
The figure shows the amber PM wedge being nibbled away by the delay's growing lag until it vanishes.
Verify: Units: rad/s rad = s . ✓ Numeric: 0.786 × 1.150 = 0.904 rad = 51. 8 ∘ of extra lag = exactly the PM. ✓ See Time delay and Padé approximation for approximating e − s τ as a rational function.
Worked example Ex 7 — Cell G: design / word problem (choose the gain)
Statement. A satellite reaction-wheel loop is modelled L ( s ) = s ( s + 2 ) K . Mission spec: PM = 4 5 ∘ (for a well-damped, low-overshoot response). Find K .
Forecast: There is a handy rule (justified below) that PM in degrees divided by 100 estimates the damping ratio ζ , so PM = 4 5 ∘ targets ζ ≈ 0.45 . Guess whether the required K is above or below 4 .
Impose PM = 4 5 ∘ . PM = 18 0 ∘ + ∠ L ( j ω g c ) = 4 5 ∘ ⇒ ∠ L ( j ω g c ) = − 13 5 ∘ .
∠ L = − 9 0 ∘ − arctan ( ω /2 ) = − 13 5 ∘ ⇒ arctan ( ω /2 ) = 4 5 ∘ ⇒ ω g c = 2 .
Why this step? Phase does not depend on K , so the target angle fixes ω g c first.
Impose size = 1 at that ω g c . ∣ L ∣ = ω ω 2 + 4 K = 1 at ω = 2 : 2 ⋅ 8 K = 1 ⇒ K = 2 8 = 4 2 ≈ 5.657 .
Why this step? Now use K (the only free knob) to slide the size curve so unity gain lands exactly at ω g c = 2 .
ζ ≈ PM ∘ /100 " come from?
The damping ratio ζ (see Damping ratio and overshoot ) measures how oscillatory a second-order response is: ζ = 0 rings forever, ζ = 1 is just-non-oscillatory. For a standard second-order loop there is an exact formula linking PM to ζ ; over the useful range PM ≲ 6 0 ∘ that curve is nearly a straight line through the origin with slope about 1/100 per degree, giving the pocket rule ζ ≈ PM ∘ /100 . It is an approximation , not a law — good enough to pick a gain, then confirm by simulation.
Verify: Check PM at K = 5.657 : ω g c = 2 , phase = − 9 0 ∘ − arctan ( 1 ) = − 13 5 ∘ , PM = 4 5 ∘ . ✓ Expected overshoot from ζ ≈ 0.45 is roughly 20% (see Damping ratio and overshoot ); to trim overshoot without losing speed, reshape with PID controller tuning or Loop shaping . K ≈ 5.66 > 4 , matching the forecast direction.
Worked example Ex 8 — Cell H: the exam trap (sign / "which frequency" confusion)
Statement. A student writes: "For L ( s ) = s ( s + 1 ) ( s + 2 ) 10 , ∠ L ( j ω g c ) = − 15 0 ∘ , therefore PM = − 15 0 ∘ and the system is unstable." Find the true PM and expose the error.
Forecast: Guess whether − 15 0 ∘ of phase means a positive or negative PM.
Spot the trap. PM is not the phase itself; it is the gap to − 18 0 ∘ : PM = 18 0 ∘ + ∠ L ( j ω g c ) .
Why this step? The most common mistake (parent's Mistake #4) is reading ∠ L as PM.
Correct value. PM = 18 0 ∘ + ( − 15 0 ∘ ) = + 3 0 ∘ . Positive ⟹ stable (barely; ringing likely).
Second trap — which frequency? If the student had used ω p c (where ∠ = − 18 0 ∘ ) to read PM, they'd get 0 ∘ wrongly. Remember the mnemonic "GaP" : margin is measured where the other quantity hits its critical value.
Verify: 180 + ( − 150 ) = 30 > 0 ⟹ stable, contradicting the student. ✓ A − 15 0 ∘ phase is less lag than the − 18 0 ∘ danger point, so there must still be positive margin — geometry confirms the algebra.
Recall Rapid self-test
Which margin do you read at the phase crossover? ::: Gain margin (GM = 1/∣ L ( j ω p c ) ∣ ).
A first-order loop s + 1 K has what gain margin? ::: Infinite — phase never reaches − 18 0 ∘ .
A delay adds size or phase? ::: Only phase, − ω τ ; size stays 1 .
If PM ≈ − 17. 4 ∘ and GM = − 6 dB, is the loop stable? ::: No — both negative means already unstable.
To hit PM = 4 5 ∘ you first fix which quantity? ::: The gain-crossover frequency, from the target phase (phase is independent of K ).
Student says PM = ∠ L ( j ω g c ) . Fix? ::: PM = 18 0 ∘ + ∠ L ( j ω g c ) — the gap, not the angle.
"GaP" — G M at P hase crossover, P M at G ain crossover. Add 180 to the angle to get PM. Delay eats phase, never size.