Calculator · Dynamics & Control
Gain and Phase Margin Calculator
The transfer function you enter is treated explicitly as the LOOP transfer function L(s) of a unity negative-feedback loop. Every crossover found in the frequency range is reported — the calculator never assumes there is only one.
Loop transfer function L(s)
L(s) = (10) / (s^3 + 3s^2 + 2s)
Headline margins
| Phase margin (most conservative candidate) | -13° at ω = 1.802 rad/s |
|---|---|
| Gain margin (most conservative candidate) | -4.437 dB at ω = 1.414 rad/s |
| Gain crossovers found | 1 |
| Phase crossovers found | 1 |
Every phase-margin candidate (gain crossovers)
| ω_gc [rad/s] | |L| [dB] | ∠L [°] | Phase margin [°] |
|---|---|---|---|
| 1.802 | -3.774e-10 | 167 | -13 |
Every gain-margin candidate (phase crossovers)
| ω_pc [rad/s] | |L| | Status | Gain margin |
|---|---|---|---|
| 1.414 | 1.667 | Finite | -4.437 dB |
Diagnostics
- · Info Simple poles on the imaginary axis give a bounded, non-decaying mode: the system is marginally stable, not asymptotically stable.
Open-loop Bode plot with crossovers
Technical reference
Gain crossover: |L(jω_gc)| = 1 (0 dB)
Phase crossover: ∠L(jω_pc) = 180° + 360°k (unwrapped)
PM = 180° + ∠L(jω_gc) · GM = 1 / |L(jω_pc)|, GM_dB = −20·log10 |L(jω_pc)|
- L(s)
- loop transfer function of the unity-feedback loop
- ω_gc
- gain crossover frequency[rad/s]
- ω_pc
- phase crossover frequency[rad/s]
- PM
- phase margin[°]
- GM
- gain margin as a linear ratio, dimensionless[–]
- GM_dB
- the same gain margin expressed in decibels[dB]
With several 0 dB or −180° crossings (flagged above), a single PM or GM can hide the critical crossing; read every candidate and judge stability with the Nyquist criterion.
Rule of thumb, not a requirement: many designs target roughly PM ≈ 30°–60° and GM ≈ 6–12 dB as a working margin against modelling error, but the right target depends entirely on the system and its uncertainty.
Assumptions
- · The entered transfer function is L(s), the loop gain of a unity negative-feedback loop — not the closed-loop transfer function.
- · Crossovers are found on the exact response and refined by bracketing; only those inside the frequency range examined are reported.
- · A positive phase margin does NOT by itself prove closed-loop stability for an arbitrary loop; use the Nyquist criterion when there are multiple crossings or right-half-plane open-loop poles.
- · An infinite gain margin means |L| = 0 at the phase crossover, not an unconditionally safe loop.
Continue
Opens in loop-analysis context with Nyquist and the full margin workspace.