← Index

How to read margins from a Bode plot

Phase margin MF (margen de fase) and gain margin MG (margen de ganancia). The motor from the exam and the oven from FR-03 p. 7. Under the Bode plot there is a small closed-loop (lazo cerrado) step response (respuesta al escalón), so you can see what the margins mean in time.

Plant
K

Top: magnitude |L| (magnitud) of the loop function L (función de lazo). Bottom: phase ∠L (fase). Thick blue = selected K, thin grey = the other K values (the phase is the same for every K). Green = phase margin, red = gain margin.

Wcp (|L| = 0 dB)
MF = Pm
Wcg (phase = −180°)
MG = Gm
K max

Link: closed-loop step response (respuesta al escalón) for this K

Small MF = big overshoot (sobreoscilación) and oscillation. MG < 0 = the curve runs off the chart (the axis is fixed). Dashed line = final value.

Special cases (click “Show”, it sets the chart and the step)

What you seeWhat it means
Magnitude never crosses 0 dB (all below the line)Wcp does not exist → MF = ∞
Phase never crosses −180° (only gets close)Wcg does not exist → MG = ∞, stable for every K
At −180° the magnitude is exactly 0 dBMG = 0 dB, MF = 0° → edge, oscillates forever
At −180° the magnitude is ABOVE 0 dBMG < 0 dB, MF < 0° → unstable

The same in MATLAB with one command

margin(L) draws both plots and writes Gm (MG) and Pm (MF) in the title.
[Gm, Pm, Wcg, Wcp] = margin(L) gives the numbers. Gm is a ratio (“times”), in dB: mag2db(Gm). Inf = ∞.
Several K on one plot: bode(50*G, 125*G, 1000*G). Step response: step(feedback(K*G,1)).

Sources: FR-03 p. 7 (oven, D = 1 stable, D = 12 unstable), pp. 9–11 (MG, MF, Ms). Practical exam 1 (18/11/2025), apartado 1.3.