Gain margin (amount of gain increase before instability) and phase margin (amount of phase lag before instability) quantify how much system uncertainty the feedback loop can tolerate. These metrics are read directly from Bode plots: gain margin at phase=-180°, phase margin at magnitude=0dB. Typical requirements are gain margin >2 (6dB) and phase margin >30-45° to ensure adequate robustness against unmodeled dynamics and parametric variations.
You know from frequency response analysis how to read a Bode plot — magnitude and phase as functions of frequency. Gain and phase margins translate that frequency-domain picture into a concrete engineering answer: how close is this feedback system to going unstable, and what kinds of modeling error or parameter drift can it absorb without losing stability?
The starting point is understanding why −180° of phase and 0 dB of gain are the critical thresholds. A feedback system is designed so that the output signal is subtracted from the reference to form an error that drives the plant. This is negative feedback. But if the loop introduces −180° of phase shift at some frequency, the signal that was supposed to subtract has been flipped — it now adds. Negative feedback has become positive feedback. If the loop gain is also 1 (0 dB) at that same frequency, the system will sustain oscillations that grow without bound. Gain margin is how far the gain is from 1 at the frequency where phase hits −180°. If the gain is 0.5 (−6 dB) at that crossover, you could double the gain before instability — that is a gain margin of 2, or 6 dB. Phase margin is how far the phase is from −180° at the frequency where gain hits 0 dB. A phase margin of 45° means an additional 45° of lag would push the system to the edge.
Both margins are read geometrically from the Bode plot. Find the phase crossover frequency (where phase = −180°) and measure how many decibels the magnitude falls short of 0 dB — that gap is the gain margin. Find the gain crossover frequency (where magnitude = 0 dB) and measure how many degrees the phase exceeds −180° in the stable direction — that gap is the phase margin. When either margin is zero, the system is marginally stable. When either is negative, the system is unstable in closed loop.
The conventional requirements — gain margin above 6 dB and phase margin between 30° and 45° — reflect engineering experience about how much a model can be wrong. Real systems have parametric variations (motor inertia changes with load), unmodeled dynamics (flexible modes, actuator delays, sensor resonances), and nonlinearities (saturation, deadzone). A system designed with tight margins may be stable in theory but oscillatory or unstable in practice when these effects manifest. A phase margin of 30° corresponds roughly to a damping ratio of about 0.3 in the closed-loop step response — enough to avoid instability but with noticeable ringing. A margin of 60° gives damping around 0.6 — well-behaved step response with modest overshoot. Robustness is not a binary property; it is a quantitative margin that the engineer chooses based on how much uncertainty exists in the plant model and how much performance degradation under uncertainty is acceptable.