Interactive Lecture
Bode Plots, Gain and Phase Margins, and Stability
by Dr Arnaldo Delli Carri
Thanks to the contribution of Dr Andrew Pike
In the Laplace Transforms and Control Systems lectures, we modelled linear systems using transfer functions \(G(s)\). A fundamental engineering question is: how does a system respond to sinusoidal inputs at different frequencies? This is the frequency response.
To find the steady-state sinusoidal response of a system, simply substitute \(s = j\omega\) into the transfer function. The complex number \(G(j\omega)\) gives the amplitude ratio and phase shift at every frequency \(\omega\).
This substitution is equivalent to evaluating the Laplace Transform on the imaginary axis, which is precisely the Fourier Transform.
If the input is \(u(t) = A\sin(\omega t)\), the steady-state output of a stable linear system is:
\[y(t) = A\,|G(j\omega)|\,\sin\!\bigl(\omega t + \angle G(j\omega)\bigr)\]
Replace every \(s\) with \(j\omega\), then separate the result into real and imaginary parts. For the first-order system \(G(s) = K/(1 + \tau s)\):
\[G(j\omega) = \frac{K}{1 + j\omega\tau} = \frac{K(1 - j\omega\tau)}{1 + (\omega\tau)^2}\]
Therefore:
\[|G(j\omega)| = \frac{K}{\sqrt{1+(\omega\tau)^2}}, \qquad \angle G(j\omega) = -\arctan(\omega\tau)\]
A Bode plot consists of two graphs plotted against a logarithmic frequency axis:
The log scale is essential — it turns the multiplication of magnitudes into addition of dB values, and allows asymptotic (straight-line) approximations that make hand analysis practical.
Corner (break) frequency: \(\omega_c = 1/\tau\)
| Region | Magnitude | Phase |
|---|---|---|
| \(\omega \ll \omega_c\) | \(20\log_{10}K\) dB (flat) | \(\approx 0°\) |
| \(\omega = \omega_c\) | \(20\log_{10}K - 3\) dB (−3 dB point) | \(-45°\) exactly |
| \(\omega \gg \omega_c\) | Slope of −20 dB/decade | \(\to -90°\) |
The standard second-order form has unity DC gain (\(G(0) = 1\), i.e. 0 dB). Evaluating at \(s = j\omega\) with the normalised frequency ratio \(r = \omega/\omega_n\):
\[G(j\omega) = \frac{1}{(1-r^2) + j2\zeta r}\]
\[\begin{aligned}|G(j\omega)|_{\text{dB}} &= 20\log_{10}\!\left[\frac{1}{\sqrt{(1-r^2)^2 + (2\zeta r)^2}}\right] \\[6pt] &= -10\log_{10}\!\left[(1-r^2)^2 + (2\zeta r)^2\right]\end{aligned}\]
\[\angle G(j\omega) = -\arctan\!\left(\frac{2\zeta r}{1-r^2}\right)\]
| Region | Magnitude | Phase |
|---|---|---|
| \(\omega \ll \omega_n\) | \(\approx 0\) dB (unity gain) | \(\approx 0°\) |
| \(\omega = \omega_n\) | \(-20\log_{10}(2\zeta)\) dB | \(-90°\) exactly (for all \(\zeta\)) |
| \(\omega \gg \omega_n\) | Slope of −40 dB/decade | \(\to -180°\) |
Resonance peak (only when \(\zeta < 1/\sqrt{2} \approx 0.707\)):
\[\omega_r = \omega_n\sqrt{1-2\zeta^2}, \qquad |G(\omega_r)|_{\text{dB}} = -20\log_{10}\!\left(2\zeta\sqrt{1-\zeta^2}\right)\]
Damped natural frequency \(\omega_d\) is a related but distinct quantity: it is the frequency of free oscillation observed in the step response:
\[\omega_d = \omega_n\sqrt{1-\zeta^2}\]
Note that \(\omega_r < \omega_d < \omega_n\) for \(0 < \zeta < 1/\sqrt{2}\). The resonance peak in the frequency response (\(\omega_r\)) is shifted below the damped natural frequency (\(\omega_d\)) because resonance is driven by the forced response, which is slightly de-tuned from free oscillation by damping.
The Nyquist diagram is a polar plot of \(G(j\omega)\) in the complex plane as \(\omega\) sweeps from 0 to \(\infty\) (the conjugate mirror image for \(\omega < 0\) is implied). It is used to assess closed-loop stability of feedback systems.
Nyquist Stability Criterion: A unity-feedback closed-loop system is stable if the Nyquist plot of the open-loop \(G(j\omega)\) does not encircle the critical point \(-1 + j0\).
Two key frequency-domain stability margins, both readable from the Bode or Nyquist plots:
Well-designed systems typically have \(GM > 6\) dB and \(PM > 30°\). A 2nd-order system without zeros always has infinite gain margin — gain can never make it unstable — but finite phase margin is still meaningful.
The root locus shows how the closed-loop poles move in the \(s\)-plane as the loop gain \(K\) increases from 0 to \(\infty\). It directly links the time-domain behaviour (pole positions) to the designer's choice of gain.
For unity feedback with open-loop \(G(s) = K\,G_0(s)\), the closed-loop characteristic equation is:
\[1 + K\,G_0(s) = 0\]
Roots start (\(K=0\)) at open-loop poles and end (\(K\to\infty\)) at open-loop zeros (or diverge along asymptotes).
Key rules for sketching the root locus:
Explore Bode plots, Nyquist diagrams, and root locus for 1st and 2nd order systems. Adjust the sliders to see how system parameters shape the frequency response.
| Concept | Equation | Notes |
|---|---|---|
| Frequency response substitution | \(G(j\omega) = G(s)\big|_{s=j\omega}\) | Replaces \(s\) with \(j\omega\) |
| Magnitude in dB | \(|G|_{\text{dB}} = 20\log_{10}|G(j\omega)|\) | Logarithmic amplitude ratio |
| 1st-order magnitude | \(|G| = K\,/\,\sqrt{1+(\omega\tau)^2}\) | Corner at \(\omega_c = 1/\tau\) |
| 1st-order phase | \(\angle G = -\arctan(\omega\tau)\) | \(-45°\) at \(\omega = \omega_c\) |
| 2nd-order magnitude | \(|G| = 1\,/\,\sqrt{(1-r^2)^2+(2\zeta r)^2}\) | \(r = \omega/\omega_n\) |
| 2nd-order phase | \(\angle G = -\arctan\!\left(\frac{2\zeta r}{1-r^2}\right)\) | \(-90°\) at \(\omega = \omega_n\) |
| Resonance frequency | \(\omega_r = \omega_n\sqrt{1-2\zeta^2}\) | Exists only if \(\zeta < 1/\sqrt{2}\) |
| Resonance peak | \(|G|_{\text{peak}} = 1\,/\,(2\zeta\sqrt{1-\zeta^2})\) | Magnitude ratio at \(\omega_r\) |
| Phase margin | \(PM = 180° + \angle G(j\omega_{gc})\) | \(\omega_{gc}\): gain crossover (\(|G|=1\)) |
| Gain margin | \(GM_{\text{dB}} = -|G(j\omega_{pc})|_{\text{dB}}\) | \(\omega_{pc}\): phase crossover (\(\angle G = -180°\)) |
| RL closed-loop char. eq. | \(1 + KG_0(s) = 0\) | Roots are closed-loop poles |
| RL asymptote centroid | \(\sigma_a = (\sum p_i - \sum z_i)\,/\,(n-m)\) | \(n\) poles, \(m\) zeros |
A hydraulic valve actuator has the transfer function \(G(s) = 4\,/\,(0.5s + 1)\).
Show Solution
Solution:
1. Corner frequency:
Standard form \(G(s) = K/(1+\tau s)\) with \(K = 4\), \(\tau = 0.5\) s.
\[\omega_c = \frac{1}{\tau} = \frac{1}{0.5} = 2 \text{ rad/s}\]
2. DC gain:
\[|G(0)|_{\text{dB}} = 20\log_{10}(4) = 12.0 \text{ dB}\]
3. Asymptotic Bode magnitude:
4. Exact magnitude at corner and 4× corner:
At \(\omega = \omega_c = 2\) rad/s: \(\omega\tau = 1\),
\[|G|_{\text{dB}} = 20\log_{10}\!\frac{4}{\sqrt{1+1}} = 20\log_{10}\!\frac{4}{\sqrt{2}} = 12.0 - 3.0 = 9.0 \text{ dB}\]
At \(\omega = 4\omega_c = 8\) rad/s: \(\omega\tau = 4\),
\[|G|_{\text{dB}} = 20\log_{10}\!\frac{4}{\sqrt{1+16}} = 20\log_{10}\!\frac{4}{\sqrt{17}} = 20\log_{10}(0.970) = -0.26 \text{ dB}\]
The high-frequency asymptote at \(\omega = 8\) rad/s sits at \(20\log_{10}(4) - 20\log_{10}(\omega\tau) = 12 - 20\log_{10}(4) = 0\) dB, so the exact curve is only 0.26 dB below it — the asymptotic approximation is already accurate this far past the corner.
5. Phase at \(2\omega_c\):
\[\angle G = -\arctan(\omega\tau) = -\arctan(2 \times 0.5 \times 2) = -\arctan(2) \approx -63.4°\]
Answer: \(\omega_c = 2\) rad/s; DC gain 12.0 dB; \(|G|\) = 9.0 dB at the corner and \(-0.26\) dB at \(4\omega_c = 8\) rad/s; phase \(-63.4°\) at \(2\omega_c\).
A second-order system has the transfer function:
\[G(s) = \frac{25}{s^2 + 3s + 25}\]
Show Solution
Solution:
1. System parameters:
Standard form: \(\omega_n^2 = 25 \Rightarrow \omega_n = 5\) rad/s. Then \(2\zeta\omega_n = 3 \Rightarrow \zeta = 3/(2 \times 5) = 0.3\).
2. Resonance peak:
Since \(\zeta = 0.3 < 1/\sqrt{2} \approx 0.707\), a resonance peak exists.
\[\omega_r = \omega_n\sqrt{1-2\zeta^2} = 5\sqrt{1-2(0.3)^2} = 5\sqrt{1-0.18} = 5\sqrt{0.82} \approx 4.53 \text{ rad/s}\]
\[|G|_{\text{peak}} = \frac{1}{2\zeta\sqrt{1-\zeta^2}} = \frac{1}{2(0.3)\sqrt{1-0.09}} = \frac{1}{0.6\sqrt{0.91}} = \frac{1}{0.572} \approx 1.748\]
\[|G|_{\text{peak, dB}} = 20\log_{10}(1.748) \approx 4.85 \text{ dB}\]
3. At \(\omega = \omega_n = 5\) rad/s (\(u = 1\)):
\[|G(j\omega_n)| = \frac{1}{\sqrt{(1-1)^2 + (2\times0.3\times1)^2}} = \frac{1}{\sqrt{0+0.36}} = \frac{1}{0.6} \approx 1.667\]
\[|G|_{\text{dB}} = 20\log_{10}(1/0.6) = 20\log_{10}(1.667) \approx 4.44 \text{ dB}\]
\[\angle G = -\arctan\!\left(\frac{2(0.3)(1)}{1-1}\right) = -\arctan(\infty) = -90°\]
(Phase is always exactly −90° at \(\omega = \omega_n\), for any \(\zeta\).)
4. Asymptotic magnitude:
Answer: \(\omega_n = 5\) rad/s, \(\zeta = 0.3\); a resonance peak exists with \(\omega_r \approx 4.53\) rad/s and peak \(\approx 4.85\) dB; at \(\omega_n\) the magnitude is \(\approx 4.44\) dB and the phase is exactly \(-90°\); high-frequency slope \(-40\) dB/decade.
An open-loop transfer function (with unity feedback) is:
\[G(s) = \frac{5}{s(s+1)(0.1s+1)}\]
Show Solution
Solution:
1. Evaluate \(G(j2)\):
\[G(j2) = \frac{5}{(j2)(j2+1)(0.2j+1)}\]
Evaluate each factor:
\[|G(j2)| = \frac{5}{2 \times \sqrt{5} \times \sqrt{1.04}} = \frac{5}{2 \times 2.236 \times 1.020} = \frac{5}{4.561} \approx 1.10\]
\[\angle G(j2) = 0 - 90° - 63.4° - 11.3° = -164.7°\]
2. Phase margin:
\[PM = 180° + \angle G(j\omega_{gc}) \approx 180° - 147° = 33°\]
This is marginal but acceptable (typically want PM > 30°).
3. Gain margin:
\[GM_{\text{dB}} = -20\log_{10}|G(j\omega_{pc})| = -20\log_{10}(0.4) = +7.96 \approx 8 \text{ dB}\]
4. Stability and damping:
Both margins are positive (\(PM \approx 33° > 0\), \(GM \approx 8\) dB \(> 0\)), so the closed-loop system is stable. However, a phase margin of 33° suggests the step response will be somewhat underdamped with noticeable overshoot (typically PM ≈ 30° corresponds to overshoot ≈ 35%). A phase margin of 45°–60° is generally preferred for well-damped behaviour.
Answer: \(|G(j2)| \approx 1.10\), \(\angle G(j2) \approx -164.7°\); \(PM \approx 33°\); \(GM \approx 8\) dB; the closed-loop system is stable but only lightly damped (PM well below 45°).
To obtain the frequency response from a transfer function \(G(s)\), you substitute:
For a first-order system \(G(s) = K/(1+\tau s)\), the phase at the corner frequency \(\omega_c = 1/\tau\) is:
A second-order system has \(\zeta = 0.3\). At the natural frequency \(\omega_n\), the phase is:
A resonance peak appears in the Bode magnitude plot of a 2nd-order system when:
The high-frequency asymptotic slope of the Bode magnitude plot for \(G(s) = \omega_n^2/(s^2 + 2\zeta\omega_n s + \omega_n^2)\) is:
In a root locus diagram, the branches begin (at \(K = 0\)) at the: