Control Systems
Bode Plot
Reading stability margins from frequency response
A Bode plot is a pair of stacked graphs that show a system's gain in decibels and its phase shift in degrees, both plotted against frequency on a logarithmic axis. Because cascaded factors add as straight lines on those scales, you can read a feedback loop's gain margin and phase margin — its entire stability cushion — directly off two curves.
- AxesMagnitude (dB) & phase (°) vs log-frequency
- MagnitudedB = 20·log₁₀|G(jω)|
- Asymptote slope±20 dB/decade per pole / zero
- Phase margin target45°–60° (ζ ≈ 0.45–0.6)
- Gain margin target6–12 dB
- Named forHendrik Bode, Bell Labs, 1930s
Interactive visualization
Press play, or step through manually. The visualization is yours to drive — try it before reading on.
Watch the 60-second explainer
A condensed visual walkthrough — narrated, captioned, under a minute.
What a Bode plot is, and why two curves
Feed a stable linear system a sine wave and, after the transients die away, the output is a sine wave at the same frequency — but scaled in amplitude and shifted in time. Sweep the input frequency from very slow to very fast and record those two numbers — the amplitude ratio and the phase shift — at every frequency, and you have completely characterised the system. A Bode plot is simply the graph of those two numbers. The top panel plots magnitude in decibels; the bottom panel plots phase in degrees; the shared horizontal axis is frequency on a logarithmic scale, usually spanning four or five decades.
Two design choices make the Bode plot the workhorse of classical control rather than a mere data display. First, magnitude is expressed in decibels, defined as 20·log₁₀ of the gain ratio. Second, frequency runs logarithmically. Together these turn multiplication into addition and curves into straight lines. A real plant cascaded with a controller has an open-loop transfer function that is a product of first- and second-order factors. Taking the logarithm of a product gives a sum, so each pole and each zero contributes its own straight-line asymptote that you literally add to the others. Phase adds directly in degrees with no logarithm needed. The result: a fourth-order loop that would be a hopeless tangle in linear coordinates collapses into five or six line segments you can sketch on the back of an envelope.
The asymptote rules — building the curve from poles and zeros
Every Bode plot is assembled from a handful of canonical building blocks. Write the open-loop transfer function in time-constant (Bode) form, then add up the pieces:
| Factor | Magnitude asymptote | Phase contribution | Corner |
|---|---|---|---|
| Constant gain K | Flat at 20·log₁₀K dB | 0° (or 180° if K<0) | — |
| Integrator 1/s | −20 dB/decade, all ω | −90° constant | — |
| Differentiator s | +20 dB/decade, all ω | +90° constant | — |
| Real pole 1/(1+s/ωₚ) | 0 then −20 dB/dec | 0° → −90°, −45° at ωₚ | ω = ωₚ |
| Real zero (1+s/ω_z) | 0 then +20 dB/dec | 0° → +90°, +45° at ω_z | ω = ω_z |
| Complex pole pair | 0 then −40 dB/dec | 0° → −180°, −90° at ωₙ | ω = ωₙ (peak if ζ<0.5) |
The phase transition of a single real pole spreads across roughly two decades — from one decade below the corner frequency to one decade above it — passing through exactly −45° at the corner. That decade-wide phase smear is the single most important fact in the whole subject, because it is the phase lag piling up from your plant's poles that eventually pushes the loop toward the −180° danger line and eats your phase margin. A simple integrator-plus-pole plant already starts at −90° from the integrator and adds another −90° from the pole, so it asymptotes to −180° all by itself before any controller dynamics are even added.
Reading the margins — the two crossover frequencies
Stability of a unity-feedback loop is read off the open-loop Bode plot at two specific frequencies. The gain-crossover frequency ω_gc is where the magnitude curve passes through 0 dB — unity gain, where the loop neither amplifies nor attenuates. The phase-crossover frequency ω_pc is where the phase curve passes through −180°.
Phase margin PM = 180° + ∠G(jω_gc) ← measured at the 0 dB crossing
Gain margin GM = −20·log₁₀|G(jω_pc)| dB ← measured at the −180° crossing
Intuitively: at ω_gc the loop gain is already unity, so the only thing standing between you and the −1 point (gain 1, phase −180°, the onset of sustained oscillation) is how far the phase still sits above −180°. That gap is the phase margin. At ω_pc the phase has already reached −180°, so the only thing protecting you is how far the gain still sits below unity. That gap, in decibels, is the gain margin. For a textbook minimum-phase loop, both margins positive means stable; either one negative means the closed loop has a right-half-plane pole and will oscillate or run away.
Worked example — a motor position loop
Take a DC servo positioning a load. The plant is an integrator (position is the integral of velocity) cascaded with a motor electrical/mechanical pole at 20 rad/s, and we add a proportional gain K:
Plant: G(s) = K / [ s · (1 + s/20) ]
Choose: K = 50
Magnitude pieces:
Gain 50 → +34 dB flat
Integrator 1/s → −20 dB/decade everywhere
Pole at 20 rad/s → extra −20 dB/decade above ω = 20
Find gain crossover (|G| = 1, i.e. 0 dB):
Below the pole, |G(jω)| ≈ 50/ω = 1 → ω ≈ 50 rad/s ... but that's past the pole,
so include it: |G| = 50 / (ω·√(1+(ω/20)²)) = 1
Solving numerically → ω_gc ≈ 29 rad/s
Phase at ω_gc:
∠G = −90° (integrator) − atan(29/20) = −90° − 55° = −145°
Phase margin PM = 180° − 145° = 35° ← marginal, ~20% overshoot expected
Phase crossover (∠G = −180°):
−90° − atan(ω/20) = −180° → atan(ω/20) = 90° → ω_pc → ∞
So |G| never reaches 0 dB at −180° → Gain margin = ∞ (infinite)
This is the canonical "type-1 system with one extra pole" result: an infinite gain margin (the phase only reaches −180° asymptotically) but a finite, and here marginal, phase margin of about 35°. The design fix is a lead compensator — a zero/pole pair that injects up to about +60° of phase right at ω_gc to push the phase margin up to a healthier 50–55°, trading a little extra high-frequency gain for damping. That is the everyday job a Bode plot is built for: see the deficit, add phase exactly where the gain crosses over.
Loop shaping — bending the curves on purpose
Once you can read a Bode plot you can design with it. The art is called loop shaping, and the rules are physical:
- Low-frequency gain buys accuracy. High loop gain at low frequency drives steady-state error toward zero and rejects slow disturbances. An integrator (1/s) gives infinite DC gain and zero steady-state error to a step — at the cost of −90° of permanent phase lag.
- The crossover region sets stability and speed. Aim to cross 0 dB at a slope of −20 dB/decade. A single-pole-like −20 dB/dec slope at crossover corresponds to about +90° of asymptotic phase headroom and a healthy phase margin; crossing at −40 dB/dec leaves you near −180° and almost no margin. Closed-loop bandwidth is roughly ω_gc, so where you put crossover sets the response speed.
- High-frequency roll-off buys noise rejection. Above crossover you want the gain to fall steeply — −40 dB/dec or more — so sensor noise and unmodelled high-frequency resonances are attenuated. A lag compensator or a low-pass filter does this, but each added pole costs phase near crossover, so it is a balancing act.
A lead compensator (1+s/ω_z)/(1+s/ωₚ) with ω_z < ωₚ raises gain and adds phase around crossover — used to recover phase margin and increase bandwidth. A lag compensator (the same form with ω_z > ωₚ) raises low-frequency gain for accuracy while keeping the crossover region nearly untouched. A PID controller is just a lag-lead pair plus an integrator, and its three gains map onto exactly these Bode-plot moves.
Bode plot versus the alternatives
| Property | Bode plot | Nyquist plot | Root locus |
|---|---|---|---|
| Domain | Frequency (jω) | Frequency (jω) | Complex s-plane (gain sweep) |
| What you read | Gain margin, phase margin, bandwidth, roll-off | Encirclements of −1, absolute stability | Closed-loop pole locations vs gain |
| Best for | Lead/lag & PID design, measured plants | Open-loop-unstable, conditionally stable loops | Choosing gain, pole placement |
| Handles RHP poles correctly | No (margins can mislead) | Yes (rigorous count) | Yes |
| Works from measured data | Yes — sweep a real plant | Yes — same data, replotted | No — needs a model |
| Reads from the curve | Margins, ω_gc, ω_pc directly | Stability yes/no, less quantitative | Damping & speed vs gain |
The three are complementary. Bode and Nyquist plot identical information — both are G(jω) — but Bode separates magnitude and phase so you can read the margins and shape compensation, while Nyquist condenses them into one trajectory whose encirclements of −1 give the rigorous answer for awkward plants. Root locus answers a different question entirely: how the closed-loop poles migrate as you turn the gain knob. In practice you design on the Bode plot, confirm on the Nyquist plot when the loop is conditionally stable, and use root locus to pick the final gain.
Failure modes — where the simple reading lies
- Conditionally stable loops. If the open-loop phase dips below −180° and then climbs back above it, there are two phase-crossover frequencies and the loop is unstable for a band of gains in between. The headline margins can both read positive while the loop is on the edge. Worse, reducing the gain — normally the safe move — can push you into the unstable band. Always sanity-check a multi-resonance plant on Nyquist.
- Non-minimum-phase (right-half-plane) zeros. A boost converter, a tail-rotor-controlled helicopter yaw, or a flexible-arm robot all have RHP zeros. These add phase lag like a pole but bend magnitude up like a zero, so they devour phase margin while masking the loss in the gain plot. They impose a hard upper limit on achievable bandwidth: you cannot cross over much above the RHP-zero frequency without going unstable.
- Time delay. A pure transport delay e^(−sT) is flat at 0 dB (no magnitude effect at all) but contributes phase lag −ωT that grows without bound with frequency. It is invisible on the magnitude plot and lethal on the phase plot — a 10 ms delay costs 57° of phase at 100 rad/s. Networked and sampled-data loops live or die on this term.
- Lightly damped resonances. A complex pole pair with ζ < 0.5 produces a sharp magnitude peak and a fast −180° phase drop. If that peak pokes above 0 dB near crossover, the loop can oscillate at the resonant frequency — the classic source of "singing" in disk-drive head loops and gantry stages.
- Gain-only margin checks. Reporting just the gain margin or just the phase margin can hide trouble. A loop can have a comfortable 12 dB gain margin and a dangerous 15° phase margin simultaneously. Both numbers are needed; the conservative single figure is the vector margin — the shortest distance from the Nyquist curve to −1.
Bode plots in real engineering practice
- Measured frequency response. The greatest practical strength: you do not need a model. A network/dynamic-signal analyzer or a swept-sine on a servo drive measures gain and phase at hundreds of frequencies on the real hardware, plots them as an empirical Bode plot, and reads the margins of the actual loop — bearings, cables, flex, and all. This is how disk drives, hard-disk head positioners, machine-tool axes, and switch-mode power supplies are tuned on the bench.
- Switch-mode power supplies. A buck or boost converter's control-to-output Bode plot, measured with an injection transformer, is the standard acceptance test. Designers target ~60° phase margin and crossover at one-fifth to one-tenth of the switching frequency; the RHP zero of the boost topology shows up as a phase plunge that caps the bandwidth.
- Op-amp stability. The open-loop gain curve of an operational amplifier, rolling off at −20 dB/decade through its unity-gain frequency, is a Bode plot; the rate-of-closure between it and the feedback network's 1/β curve predicts whether the amplifier rings or oscillates.
- Flight control and aeroservoelasticity. Margins are mandated — MIL-F-9490D requires 6 dB gain margin and 45° phase margin across the flight envelope, with structural-mode notch filters shaped directly on the Bode plot to keep wing-bending resonances below 0 dB.
- Audio and instrumentation. A loudspeaker's or amplifier's magnitude-and-phase response is a Bode plot by another name; crossover-network and equalizer design is loop shaping on those curves.
Common pitfalls when using Bode plots
- Plotting the closed loop instead of the open loop. Margins are read off the open-loop transfer function L(s) = G(s)·C(s). Sketch the closed-loop response and the crossover frequencies mean nothing for stability.
- Trusting straight-line asymptotes near a corner. The exact magnitude is 3 dB below the asymptote intersection at a single real pole's corner, and a lightly damped complex pair peaks far above its asymptote. The asymptotes are for sketching; verify the margins on the exact curve.
- Forgetting the delay term. Any sampling, transport lag, or computation delay adds −ωT of phase that the rational transfer function never shows. Tune a sampled loop ignoring it and the real hardware will have far less phase margin than the model promised.
- Crossing over at −40 dB/decade. A steep slope at gain crossover means the phase is already near −180°, leaving almost no phase margin. Aim to cross at −20 dB/decade.
- Reading margins on a conditionally stable or non-minimum-phase loop. When the phase wanders across −180° more than once, or the plant has RHP zeros, the simple two-margin reading can be flatly wrong. Confirm with Nyquist.
Frequently asked questions
What is a Bode plot and what does it actually show?
A Bode plot is two stacked graphs of a system's steady-state frequency response. The upper plot shows magnitude in decibels, where dB = 20·log₁₀|G(jω)|; the lower plot shows phase shift in degrees. Both are plotted against frequency on a logarithmic axis spanning several decades. The log scaling is the point: a transfer function that is a product of first- and second-order factors becomes a sum of straight-line asymptotes, so you sketch a complicated loop by adding the contributions of its poles and zeros. Each pole bends magnitude down 20 dB/decade and adds −90°; each zero bends it up 20 dB/decade and adds +90°.
How do you read gain margin and phase margin off a Bode plot?
At two special frequencies of the open-loop response. The gain-crossover frequency ω_gc is where magnitude crosses 0 dB; the phase margin is how far phase sits above −180° there: PM = 180° + ∠G(jω_gc). The phase-crossover frequency ω_pc is where phase crosses −180°; the gain margin is how far magnitude sits below 0 dB there. Both must be positive for a typical loop to be stable. Aim for 45°–60° phase margin and 6–12 dB gain margin; 60° corresponds to a closed-loop damping ratio near 0.6.
Why use decibels and a logarithmic frequency axis?
Because multiplication becomes addition. A plant-plus-controller open-loop transfer function is a product of many terms; taking 20·log₁₀ turns each factor into a straight-line asymptote you add to the others, and phase adds directly in degrees. A logarithmic frequency axis turns those asymptotes into literal straight lines sloping at integer multiples of 20 dB/decade. Decibels also compress a huge dynamic range — 80 dB of gain over five decades — into a readable grid.
What is the difference between a Bode plot and a Nyquist plot?
They show the same data — G(jω) — in different coordinates. A Bode plot separates magnitude and phase into two curves versus frequency, making it easy to read crossover frequencies, margins, and roll-off, and to design lead/lag compensation. A Nyquist plot draws G(jω) as one trajectory in the complex plane and judges stability by encirclements of −1. Nyquist is the rigorous test for open-loop-unstable and conditionally stable loops; Bode is the everyday design tool.
Can a system have positive margins and still be unstable?
Yes — the classic trap with conditionally stable and non-minimum-phase systems. The simple "both margins positive ⇒ stable" reading assumes the phase crosses −180° once and the magnitude crosses 0 dB once. If the phase dips below −180° and climbs back, there are two phase crossovers and the loop can be unstable in between. Right-half-plane zeros add phase lag without magnitude help and eat phase margin fast. When the Bode reading is ambiguous, draw the Nyquist plot and count encirclements of −1.
How does phase margin relate to overshoot and settling time?
For a dominant second-order loop, ζ ≈ PM/100 up to about 70°. A 45° phase margin gives ζ ≈ 0.45 and ~20% overshoot; 60° gives ζ ≈ 0.6 and ~10%; 70° is nearly overshoot-free but slightly sluggish. The gain-crossover frequency sets speed: bandwidth ≈ ω_gc and 2% settling time ≈ 4/(ζ·ω_gc). So the two numbers you read off a Bode plot directly predict overshoot and settling time.