seegongsik
Saved words
SC · Control

Gain and Phase Margins

How much room a stable system has before it goes unstable is read off the open-loop Bode plot as two margins. The phase margin is the angle left up to −180° of phase at the frequency where the gain reaches 0 dB; the gain margin is how far the gain is below 0 dB at the frequency where the phase reaches −180°. Move the gain K and watch both margins shrink to zero as the system goes unstable.

Measure the distance to instability with two margins

This is the Bode plot of the same open loop L(s) = K/(s(s+1)(s+2)) as F1 and F2. The top is gain (dB), the bottom is phase (degrees), and the horizontal axis is log frequency. Where the gain crosses the 0 dB line in the top plot is the gain crossover frequency, and the angle left there down to the −180° line in the bottom plot is the phase margin. Where the phase crosses −180° in the bottom plot is the phase crossover frequency (fixed at ω=√2 for this plant), and how far the gain is below 0 dB there in the top plot is the gain margin. Raise K and the gain curve lifts up, both margins shrink together, and at K = 6 both hit zero and the system goes unstable.

gain (dB), log ω axis
phase (deg), log ω axis
gain K8.0
Margins and crossover frequencies
K = 8.0 · PM = -8° · GM = -2.5 dB
gain xover ω = 1.63 · phase xover ω = 1.41
The gain is so large that the gain crossover frequency has passed the phase crossover frequency. Both the phase margin and the gain margin are negative, so the loop has passed the −1 point and the closed loop is unstable. On the Bode plot the gain curve is above 0 dB at the −180° point. You must bring K below 6.
No margin (near unstable)

The room left before instability

The threshold where a unit-feedback system goes unstable is when the open loop L(jω) becomes −1, that is when a magnitude of 1 (0 dB) and a phase of −180° happen at the same frequency. Then 1 + L = 0 and a closed-loop pole sits on the imaginary axis. The stability margins measure, in two directions, how far you currently are from this −1 condition. The phase margin is how much phase is left up to −180° at the frequency where the magnitude just reaches 1; the gain margin is how much magnitude is left up to 1 at the frequency where the phase just reaches −180°. If both are positive you have not touched −1, so stable; zero is the boundary; negative means you have already passed −1, unstable.

Observephase margin = 180° + phase at the 0 dB freq
Phase margin = angle to −180° at the 0 dB frequency.
Choosegain margin is read at the ?
Gain margin = gain below 0 dB at the −180° frequency.
Fill instable ⟺ both margins ?
Both margins positive means stable.
On your ownmargins reach 0 at K = ?
For this plant the margins reach 0 at K=6.

Read them at the two crossover frequencies

The Bode plot lets you read these two at different frequencies. The frequency where the gain curve passes 0 dB is the gain crossover frequency. Reading the phase curve there and taking the difference from −180° gives the phase margin = 180° + ∠L. Conversely, the frequency where the phase curve passes −180° is the phase crossover frequency (for this plant, atan ω + atan(ω/2) = 90° gives ω = √2, fixed). Reading the gain curve there gives the gain margin = −20 log|L| dB. In this example the magnitude at phase crossover is |L| = K/6, so the gain margin is 20 log(6/K) dB. As K grows, the whole gain curve lifts up, the gain crossover frequency moves right, and the phase is more negative there, so the phase margin shrinks.

What the margins tell you

Stability margins go beyond a plain stable-or-not and tell you how trustworthy a real system is. The first thing is robustness. Models are always inexact, component values drift, and sensors have time delays. The phase margin is how much extra phase lag the closed loop can take before going unstable, and the gain margin is the factor of extra gain it can take. With a thin margin, a small error brings it down. The second thing is the shape of the response. The phase margin is nearly proportional to the damping ratio in a second-order approximation, so a phase margin of about 45° to 60° corresponds to a damping ratio of 0.45 to 0.6 and a good transient. So tuning the gain for a target phase margin on the Bode plot does, in the frequency domain, the same thing as setting the damping ratio in D5 and F2.

Back to the first screen

On the Bode plot of the same open loop as F1 and F2, we read the room left before instability as two margins. The angle left up to −180° at the frequency where the gain passes 0 dB was the phase margin, and the gain left below 0 dB at the frequency where the phase passes −180° (ω=√2) was the gain margin. Raising K lifted the gain curve, both margins shrank together, and at K = 6 both reached zero and it went unstable. This K = 6 is exactly the same boundary as F1’s Routh and F2’s imaginary-axis crossing of the root locus. The same limit of the same system, seen by Routh through coefficients, by the root locus through the path of the poles, and by the Bode plot through the margins of the frequency response.

The stability margins come from the fact that a unit-feedback system goes unstable when the open loop L(jω) hits −1 (0 dB and −180°), and measure on the Bode plot how far you currently are from that −1. Phase margin = 180° + ∠L (at gain crossover, the |L|=0 dB frequency); gain margin = −20 log|L| dB (at phase crossover, the ∠L=−180° frequency). Both positive means stable, zero is the boundary, negative is unstable. The phase margin is the extra delay you can take, the gain margin the extra gain, so they mean robustness, and a phase margin of about 45° to 60° corresponds to a damping ratio of 0.45 to 0.6 and a good transient (the same design as D5 and F2, in the frequency domain). This example’s limit K = 6 is the same boundary as F1’s Routh and F2’s root locus.
On to the next unit

The stability margins measured the distance from the −1 condition on the Bode plot in two directions. But −1 is a single point in the complex plane, so why not draw L(jω) itself in the complex plane and look at its relation to that point directly? The next unit, the Nyquist plot, sweeps the frequency ω from zero to infinity and draws the curve L(jω) traces. Counting how many times that curve encircles the −1 point, the Nyquist criterion decides closed-loop stability completely, including the case where the open loop is already unstable. The phase and gain margins reappear there as how closely the curve passes to −1.