Gain Margin⚠ unverified
Physics / Controls · Compute the linear gain margin from the gain at the phase crossover frequency
Parameters
| Input | Symbol | Unit | Default | Description |
|---|---|---|---|---|
| gain_at_phase_crossover | gainatphasecrossover | — | 1.0 | Open-loop ga |
| Output | Symbol | Unit | Description |
|---|---|---|---|
| result | GM | — | Gain margin (linear). Returns infinity when the input gain is zero |
The science & history
Understanding the Parameters
-
gain_at_phase_crossover — must be the linear magnitude (not dB). If $|G|=0.5$ at $-180^{\circ}$, $\mathrm{GM} = 2$ (about +6 dB).
-
GM — $> 1$ (positive dB) is stable for minimum-phase loops under usual Nyquist assumptions; $< 1$ means already unstable at that definition.
Derivation (Approaching a Proof)
At phase crossover the Nyquist plot sits on the negative real axis at $-|G|$. Distance to the critical point $-1$ corresponds to multiplying gain by $1/|G|$ to reach criticality — the gain margin.
History
Gain and phase margins are the practical stability margins of classical loop shaping.
Related Concepts: Phase Margin, Gain Crossover Frequency, Bode Magnitude
Notes: Registry calculator gain-margin (unverified). Linear GM, not dB. Input is precomputed
$|G|$ at phase crossover.