ToolSphere
Back to all articles
engineering

Bode Plot: Gain and Phase Margin Example

2026-10-207 min read

Try it: free Bode Plot Generator

Plot gain and phase from a transfer function

Open →

A Bode plot shows how a system responds to sine waves of every frequency: one curve for the gain in decibels, one for the phase in degrees, both against frequency on a log scale. Control engineers read stability off it; electronics engineers read filter behaviour. This page works through both.

A first-order system: 1/(s + 1)

The pole at s = −1 sets a corner frequency of ω = 1 rad/s.

ω (rad/s) Gain Phase
0.1 −0.04 dB −5.7°
1 (corner) −3.01 dB −45°
10 −20.04 dB −84.3°
100 −40.00 dB −89.4°

The two rules every Bode sketch uses:

  • Each pole bends the gain down by 20 dB per decade above its corner, and adds −90° of phase in total (−45° at the corner itself).
  • Each zero does the opposite: +20 dB per decade and +90°.

This is exactly the RC low-pass filter, with ω = 1/RC.

An open-loop example: G(s) = 10 / (s(s + 1)(s + 10))

A classic exam transfer function: an integrator (the s), and poles at 1 and 10 rad/s.

Sketching it:

  • The integrator gives −20 dB/decade and −90° from the start.
  • Past ω = 1, a second pole: the slope becomes −40 dB/decade.
  • Past ω = 10, the third: −60 dB/decade. The phase heads towards −270°.

Gain margin

Find the phase crossover, where the phase hits −180°. Here that's at ω = √10 = 3.162 rad/s. The gain there is −20.83 dB, so:

gain margin = 0 − (−20.83) = 20.83 dB

You could raise the loop gain by 20.83 dB (11×) before the closed loop goes unstable.

Phase margin

Find the gain crossover, where the gain is 0 dB. Here that's at ω = 0.784 rad/s. The phase there is −132.6°, so:

phase margin = 180° + (−132.6°) = 47.4°

Rules of thumb: a phase margin of 45–60° gives a well-damped response, and a gain margin of at least 6 dB gives a safe buffer. This system has both.

Turning up the gain

Same poles, different gain K in K/(s(s + 1)(s + 10)):

K Gain crossover Phase margin Gain margin Closed loop
10 0.784 rad/s 47.4° 20.83 dB stable, well damped
100 3.015 rad/s 1.6° 0.83 dB barely stable, rings badly
110 3.162 rad/s 0° 0 dB on the edge: sustained oscillation
200 4.234 rad/s −9.7° −5.19 dB unstable

Raising K slides the gain curve up without changing the phase curve, so the gain crossover moves right into regions of worse phase. At K = 110 both margins reach zero together. That matches the Routh–Hurwitz limit for the characteristic equation s³ + 11s² + 10s + K = 0, which is stable only for K < 110.

A resonant system: 1/(s² + 0.2s + 1)

A second-order system with natural frequency ω_n = 1 rad/s and damping ratio ζ = 0.1. Near ω_n the gain peaks at about +14 dB (the exact peak value is 1/(2ζ√(1 − ζ²)), about 5×), and the phase swings quickly through −90°. Light damping makes a tall, narrow peak; that peak is what a phase margin of only 16.3° looks like when this is the loop.

How to read margins from any plot

  1. Find where the phase crosses −180°. Read the gain there; the gain margin is how far it is below 0 dB.
  2. Find where the gain crosses 0 dB. Read the phase there; the phase margin is how far it is above −180°.
  3. If the phase never reaches −180°, the gain margin is infinite. That's normal for first- and second-order systems.

Common mistakes

  • Reading margins off the closed-loop plot. Margins come from the open-loop transfer function G(s)H(s).
  • Forgetting the integrator's −90° at low frequency.
  • Using Hz on a rad/s axis. ω = 2πf; mixing them shifts every corner by 6.28×.
  • Assuming positive margins guarantee good behaviour. 1.6° is "stable" but rings for ages.

Try it

The Bode plot generator takes H(s) typed as you'd write it, such as 10/(s(s+1)(s+10)), and plots magnitude and phase with the gain and phase margins, both crossover frequencies, and the poles and zeros. To tune the controller that closes the loop, use the PID tuning helper.

For a related walkthrough, read RC Low-Pass Filter Cutoff Frequency Explained.

Looking for other tools?

Explore ToolSphere Homepage →