3.5.42Guidance, Navigation & Control (GNC)

Gain margin, phase margin — stability margins

1,988 words9 min readdifficulty · medium1 backlinks

WHY do we even need margins?

Consider a closed loop with open-loop transfer function L(s)=G(s)H(s)L(s) = G(s)H(s) (controller × plant × sensor). The closed-loop transfer function is:

T(s)=G(s)1+L(s)T(s) = \frac{G(s)}{1 + L(s)}

So stability is about how close the curve L(jω)L(j\omega) passes to the critical point 1-1. Gain and phase margins are two rulers measuring that distance along two specific directions.


The two critical frequencies

Because the point 1=1(180)-1 = 1\angle(-180^\circ) needs both magnitude 1 and phase 180-180^\circ, we ask two separate questions:

  1. At the frequency where phase is already 180-180^\circ, how far below 1 is the gain?Gain Margin (GM)
  2. At the frequency where gain is already 1, how far above 180-180^\circ is the phase?Phase Margin (PM)

Deriving Gain Margin from first principles

The extra multiplicative gain kk that would push it exactly to 1-1 satisfies: kL(jωpc)=1k=1L(jωpc)k \cdot |L(j\omega_{pc})| = 1 \quad\Rightarrow\quad k = \frac{1}{|L(j\omega_{pc})|}


Deriving Phase Margin from first principles

At ωgc\omega_{gc} the phase is L(jωgc)\angle L(j\omega_{gc}) (some value like 135-135^\circ). The gap to 180-180^\circ:

PM=L(jωgc)(180)=180+L(jωgc)\text{PM} = \angle L(j\omega_{gc}) - (-180^\circ) = 180^\circ + \angle L(j\omega_{gc})

Figure — Gain margin, phase margin — stability margins

WHY these are good stability rulers (Dual Coding)

  • Nyquist view: Plot L(jω)L(j\omega) in the complex plane. GM = how much you can scale the plot outward before it swallows 1-1 (measured along the negative-real axis). PM = angle you can rotate the plot before the unit-circle intersection reaches 180-180^\circ.
  • Bode view: Two stacked plots (magnitude dB, phase deg). Draw a vertical line where phase =180=-180^\circ; GM is the distance from the magnitude curve up to 0 dB. Draw a vertical line where magnitude =0=0 dB; PM is the distance from the phase curve up to 180-180^\circ.

Rules of thumb (80/20)



Recall Feynman: explain to a 12-year-old

Imagine pushing a kid on a swing. If you push at just the right rhythm, tiny pushes build up into a huge swing — that's a loop feeding itself. A control system can accidentally do that: its own correction comes back at the wrong time and the wrong size and makes things worse and worse. Phase margin asks "how badly can my timing be off before pushes start adding up?" Gain margin asks "how much harder can I push before pushes start adding up?" Big margins = you're nowhere near making the swing go crazy. Small margins = one nudge and it's out of control.


Flashcards

What point on the complex plane defines instability for 1+L(s)1+L(s)?
1-1, i.e. magnitude 1 at angle 180-180^\circ.
Define the phase crossover frequency ωpc\omega_{pc}.
The frequency where L(jω)=180\angle L(j\omega) = -180^\circ.
Define the gain crossover frequency ωgc\omega_{gc}.
The frequency where L(jω)=1|L(j\omega)| = 1 (0 dB).
Formula for gain margin?
GM=1/L(jωpc)\text{GM} = 1/|L(j\omega_{pc})|, or 20log10L(jωpc)-20\log_{10}|L(j\omega_{pc})| dB.
Formula for phase margin?
PM=180+L(jωgc)\text{PM} = 180^\circ + \angle L(j\omega_{gc}).
At which frequency is gain margin evaluated, and why?
At phase crossover (=180°\angle=-180°), because there only extra gain is needed to reach 1-1.
At which frequency is phase margin evaluated?
At gain crossover (L=1|L|=1), because there only extra phase lag is needed to reach 180°-180°.
Typical healthy design values for GM and PM?
GM 6\gtrsim 6 dB (factor ~2), PM 30\approx 30^\circ6060^\circ.
Approximate relation between PM and damping ratio?
ζPM/100\zeta \approx \text{PM}^\circ/100.
Max time delay tolerable before instability?
τmax=PM (radians)/ωgc\tau_{max} = \text{PM (radians)}/\omega_{gc}.
Why does increasing loop gain KK reduce gain margin?
It shifts the magnitude curve up, moving L|L| closer to 1 at the phase crossover.
Is positive gain margin alone sufficient for stability?
No — you need both GM >0>0 dB and PM >0>0 (and Nyquist for tricky systems).

Connections

  • Nyquist stability criterion — the parent theorem; encirclements of 1-1.
  • Bode plots — where GM and PM are read graphically.
  • Root locus — how poles move as gain increases toward the stability limit.
  • Time delay and Padé approximation — how delay eats phase margin.
  • Damping ratio and overshoot — PM ↔ transient quality link.
  • PID controller tuning — margins as design targets in GNC loops.
  • Loop shaping — deliberately sculpting L(jω)L(j\omega) for target margins.

Concept Map

closed loop

blows up when

magnitude 1 angle -180

measured by

measured by

evaluate gain here

evaluate phase here

GM = 1 / mag L jwpc

PM = 180 + angle L jwgc

both indicate

both indicate

Open-loop L=GH

T = G / 1+L

Critical point -1

Proximity of L jw to -1

Gain Margin

Phase Margin

Phase crossover wpc, angle=-180

Gain crossover wgc, mag=1

GM greater than 1 stable

PM positive stable

Stability distance from -1

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, feedback loop tab unstable hoti hai jab signal wapas aake khud ko hi feed karne lage — bilkul swing pe bachche ko sahi timing pe push karne jaisa. Danger point complex plane pe 1-1 hai, matlab magnitude 11 aur angle 180-180^\circ. Agar loop ka response L(jω)L(j\omega) is point ko chhoo le, system marginal unstable ho jaata hai. Stability margins basically batate hain ki hum is danger point se kitne door hain.

Do rulers hain. Gain margin us frequency pe naapte hain jahan phase already 180-180^\circ ho chuka hai (phase crossover). Wahan poochte hain — gain ko aur kitna guna badha sakte hain jab tak L|L| ek ho jaaye? Formula: GM=1/L(jωpc)\text{GM}=1/|L(j\omega_{pc})|. Phase margin us frequency pe naapte hain jahan gain already ek hai (gain crossover), aur poochte hain — kitni extra phase lag daal sakte hain jab tak 180-180^\circ pahunch jaaye? Formula: PM=180+L(jωgc)\text{PM}=180^\circ + \angle L(j\omega_{gc}).

Yaad rakhne ka trick "GaP": Gain margin Phase-crossover pe, Phase margin Gain-crossover pe — matlab har margin wahan naapo jahan doosri quantity apni critical value pe ho. Common galti: log sochte hain gain badhane se system fast aur safe ho jaayega, lekin gain badhaoge to magnitude curve upar shift hoti hai, GM chhoti ho jaati hai, aur ek point ke baad system unstable. Isliye speed aur stability ke beech trade-off hota hai.

GNC (rockets, drones, autopilot) mein ye margins bahut important hain kyunki sensor delay, actuator lag, model uncertainty sab phase kha jaate hain. Design rule: PM around 3030^\circ6060^\circ aur GM kam se kam 66 dB rakho, taaki real-world disturbances mein bhi loop stable rahe aur zyada overshoot na ho.

Go deeper — visual, from zero

Test yourself — Guidance, Navigation & Control (GNC)

Connections