Bode plots & margins: practice problems with step-by-step solutions

Free Bode plots & margins practice problems with diagrams, hints and full worked solutions. New values every time, at three levels: filters and asymptotes, magnitude and phase, stability margins.

Free practice problemEasy
vin​C = 4.7 nFR = 10 kΩvout​

Find the corner (−3 dB) frequency fc of the RC high-pass filter shown, with R = 10 kΩ, C = 4.7 nF. Give it in Hz.

R = 10 kΩC = 4.7 nF
Hz
Next problem →

What you practise

  1. Easyfilters and asymptotes
  2. Mediummagnitude and phase
  3. Hardstability margins

Learn Bode plots & margins from scratch

Before this: AC impedance & phasors, Laplace transforms

1What a Bode plot shows

Feed a sine wave into a filter or amplifier, and a sine of the same frequency comes out. Only two things change: its size and its timing.

tvvin​vout​

The gain |H| is the ratio of the output amplitude to the input amplitude. The phase φ is how far the output is shifted, in degrees. A negative phase means the output lags behind.

Both depend on the frequency. A Bode plot draws them against frequency: the gain in decibels on top, the phase below. The frequency axis is logarithmic, so every decade (×10) gets the same width.

Decibels turn a ratio into a number you can add:

|H|dB = 20·log₁₀|H|
  • A gain of 1 is 0 dB, 10 is 20 dB, 100 is 40 dB, and 0.1 is −20 dB.
  • A gain of 1/√2 ≈ 0.707 is −3 dB. This is the edge of the pass band of a filter.
Self-check An amplifier has a gain of 100. What is its gain in decibels?
  1. 100 dB
  2. 2 dB
  3. 20 dB
  4. 40 dB

Answer: 40 dB. 20·log₁₀(100) = 20·2 = 40 dB. 20 dB uses 10·log₁₀, which is for power ratios, not for voltages. 2 is only log₁₀(100).

2First-order filters

A resistor with a capacitor or an inductor makes the simplest filter. A low-pass filter passes low frequencies and weakens high ones. A high-pass filter does the opposite.

vin​RCvout​vin​CRvout​

In the RC low-pass filter (left) the output is across the capacitor. In the RC high-pass filter (right) it is across the resistor. With an inductor, the output of a low-pass filter is across R, and of a high-pass filter across L.

The change happens around the corner frequency, where the gain is −3 dB. It is the same for the low-pass and the high-pass version:

ωc = 1/(R·C) ωc = R/L fc = ωc/(2π)

ωc is in rad/s and fc in Hz. Put R, C and L in base units first: Ω, F and H.

0−20−40dB−20 dB/dec−3 dB0°−45°−90°−45°0.010.1110100ω/ωc​

The plot shows a low-pass filter. Below ωc the gain is about 0 dB. Above it the gain falls by 20 dB per decade. The phase goes from 0° to −90° and is −45° at the corner.

At any frequency, with the ratio x = f/fc = ω/ωc:

  • Low-pass: |H| = 1/√(1 + x²) and φ = −atan x.
  • High-pass: |H| = x/√(1 + x²) and φ = 90° − atan x.
Worked example

Find the corner frequency fc of an RL high-pass filter with R = 470 Ω and L = 47 mH.

1

Base units

L = 47 mH = 0.047 H
2

Corner in rad/s

ωc = R/L = 470/0.047 = 10 000 rad/s
3

Corner in Hz

fc = 10 000/(2π) = 1592 Hz
Answer

fc ≈ 1592 Hz (ωc = 10 000 rad/s).

Self-check An RC low-pass filter has R = 1 kΩ and C = 1 µF. What is its corner frequency fc?
  1. 1000 Hz
  2. 159 Hz
  3. 159 kHz
  4. 6283 Hz

Answer: 159 Hz. ωc = 1/(1000·0.000001) = 1000 rad/s, so fc = 1000/(2π) = 159 Hz. 1000 is ωc in rad/s, not Hz. 6283 multiplies by 2π, and 159 kHz forgets the k in kΩ.

3Straight-line Bode plots

For a transfer function G(s) you can sketch the magnitude with straight lines. Each factor changes the slope at its own corner frequency.

  • A pole factor (s + p) in the denominator bends the line down by 20 dB/decade from ω = p onwards.
  • A zero factor (s + z) in the numerator bends it up by 20 dB/decade from ω = z onwards.
  • A factor s in the denominator (an integrator) gives −20 dB/decade at every frequency, and −90° of phase.
  • Without an integrator the plot starts flat at the DC gain G(0), converted to dB.
200−20−40−60dB0−20−401101001000ω

The figure shows G(s) = 10 000/((s + 10)(s + 100)). G(0) = 10 000/1000 = 10, so the plot starts at 20 dB. It bends to −20 dB/decade at 10 rad/s and to −40 dB/decade at 100 rad/s.

To find the slope in a band: start with −20 dB/decade per integrator, then add −20 for every pole corner and +20 for every zero corner below that band.

Self-check G(s) = 20(s + 50)/(s(s + 5)). What is the slope of the straight-line plot between 5 and 50 rad/s?
  1. 0 dB/decade
  2. −20 dB/decade
  3. −40 dB/decade
  4. −60 dB/decade

Answer: −40 dB/decade. The integrator gives −20 from the start. The pole at 5 adds −20, so the slope is −40 between 5 and 50. The zero at 50 brings it back to −20 above 50. −60 treats the zero as a pole.

4Exact values at one frequency

Straight lines are a sketch. For an exact value, substitute s = jω. Each factor (jω + a) is a complex number with:

|jω + a| = √(ω² + a²) ∠(jω + a) = atan(ω/a)

The magnitude of G is the product of the numerator magnitudes divided by the product of the denominator magnitudes. The phase is the sum of the numerator angles minus the sum of the denominator angles.

Example: G(s) = 150/((s + 3)(s + 4)) at ω = 4 rad/s. |j4 + 3| = 5 and |j4 + 4| = 5.657, so |G| = 150/28.28 = 5.30, which is 14.5 dB.

The phase is −atan(4/3) − atan(4/4) = −53.1° − 45° = −98.1°.

A series RLC circuit with the output across R is a band-pass filter. It passes frequencies near the resonant frequency ω₀ = 1/√(LC). The bandwidth is BW = R/L in rad/s, and the quality factor Q = ω₀/BW.

  1. Write down G(s) or H(jω). For an RC or RL filter, find ωc and the ratio x = ω/ωc first.
  2. For each factor, find its magnitude √(ω² + a²) and its angle atan(ω/a).
  3. Multiply and divide the magnitudes. Add the zero angles and subtract the pole angles; an integrator adds −90°.
  4. Convert the magnitude to dB with 20·log₁₀.
  5. Check against the straight-line sketch: the exact value should lie close to it, and 3 dB below it at a single corner.

5A worked example

This is a typical medium question. Try each step before you open it.

Worked example

An RC low-pass filter has R = 10 kΩ and C = 100 nF. A sine of 480 Hz is applied. Find the gain |H| in dB and the phase shift φ.

1

Corner frequency

Use base units: R = 10 000 Ω and C = 0.0000001 F.

ωc = 1/(10 000·0.0000001) = 1000 rad/s
fc = 1000/(2π) = 159.2 Hz
2

Frequency ratio

x = f/fc = 480/159.2 = 3.016

The input is above the corner, so expect a clear loss of gain.

3

Gain

|H| = 1/√(1 + 3.016²) = 1/3.177 = 0.315
20·log₁₀(0.315) = −10.0 dB
4

Phase

A low-pass filter makes the output lag, so the phase is negative.

φ = −atan(3.016) = −71.7°
5

Check the answer

0−20−40dB−20 dB/dec−10.0 dB0.010.1110100ω/ωc​

The straight line gives −20·log₁₀(3.016) = −9.6 dB, close to the exact −10.0 dB.

Answer

|H| ≈ −10.0 dB and φ ≈ −71.7°.

6Common mistakes

  • Using 10·log₁₀ for a voltage gain. Gains of signals use 20·log₁₀.
  • Mixing up ω and f. ωc = 1/(RC) is in rad/s; divide by 2π for Hz.
  • Using L/R for an RL corner frequency. L/R is the time constant; the corner is ωc = R/L.
  • Adding magnitudes like ω + a. The size of jω + a is √(ω² + a²).
  • Forgetting the integrator: 1/s gives −20 dB/decade and −90° at every frequency.
  • Giving the straight-line value when the question asks for the exact magnitude.
Self-check What is the DC gain of G(s) = 400/((s + 2)(s + 5)) in dB?
  1. 16.0 dB
  2. 32.0 dB
  3. 40 dB
  4. 52.0 dB

Answer: 32.0 dB. G(0) = 400/(2·5) = 40, and 20·log₁₀(40) = 32.0 dB. 16.0 dB uses 10·log₁₀. 40 is the ratio, not dB. 52.0 dB forgets to set s = 0 in the denominator.

7How exam questions look

  • Easy: filters and asymptotes. The corner frequency of an RC or RL filter in Hz or rad/s, the slope of a straight-line plot in a band, or the DC gain in dB.
  • Medium: magnitude and phase. The gain in dB or the phase of a filter at a given frequency, the exact |G(jω)| or ∠G(jω) of a transfer function, or f₀, BW or Q of an RLC band-pass filter.
  • Hard: stability margins of a loop L(s), such as 85/(s(s + 5)) or K/(s(s + a)(s + b)).

For the hard level you need two frequencies. At the gain crossover ωc, |L(jω)| = 1 (0 dB). At the phase crossover ω180, ∠L(jω) = −180°.

PM = 180° + ∠L(jωc) GM = −20·log₁₀|L(jω180)|

For L(s) = K/(s(s + a)(s + b)) the phase crossover is at ω180 = √(a·b). A loop is stable when both margins are positive.

Learn it step by step in the appLearn it step by step in the app

Worked examples

Example 1Easy
|H| (dB)0.11101001000−100−80−60−40−200ω (rad/s)

Find the low-frequency (DC) gain of G(s) = 12/((s + 1)(s + 40)) in decibels, |G(0)| in dB.

G(s) = 12/((s + 1)(s + 40))

Find |G(0)| (dB)

Show hints
  1. At very low frequency s → 0.
  2. G(0) = 0.3.
  3. 20·log₁₀(0.3).
Show the answer and the step-by-step solution

Frequency response: substitute s = jω in the transfer function. The magnitude in decibels is 20·log₁₀|H(jω)| and the phase is the sum of the angles of the numerator factors minus those of the denominator factors. A first-order RC or RL filter has its corner (−3 dB) frequency at ωc = 1/(RC) or R/L, and fc = ωc/(2π); a low-pass filter gives |H| = 1/√(1 + (ω/ωc)²) and φ = −atan(ω/ωc). In the asymptotic (straight-line) Bode plot each pole bends the magnitude down by 20 dB/decade at its corner frequency, each zero bends it up by 20 dB/decade, and an integrator 1/s gives −20 dB/decade at all frequencies. Gain crossover ωc: |L(jω)| = 1 (0 dB); phase margin PM = 180° + ∠L(jωc). Phase crossover ω180: ∠L(jω) = −180°; gain margin GM = −20·log₁₀|L(jω180)| dB. The closed loop is stable when both margins are positive.

DC gain

G(0) = 0.3

In decibels

20·log₁₀(0.3) = −10.46 dB

Answer

|G(0)| = −10.46 dB
Example 2Medium
vin​R = 1 kΩC = 1 nFvout​

The RC low-pass filter shown has R = 1 kΩ, C = 1 nF. A sinusoidal input of 1600 kHz is applied. Find the phase shift φ of vout relative to vin, in degrees.

R = 1 kΩC = 1 nFf = 1600 kHz

Find φ (°)

Show hints
  1. Find the corner frequency first: fc = 159155 Hz.
  2. H(jω) = 1/(1 + jω/ωc)
  3. f/fc = 10.05.
Show the answer and the step-by-step solution

Frequency response: substitute s = jω in the transfer function. The magnitude in decibels is 20·log₁₀|H(jω)| and the phase is the sum of the angles of the numerator factors minus those of the denominator factors. A first-order RC or RL filter has its corner (−3 dB) frequency at ωc = 1/(RC) or R/L, and fc = ωc/(2π); a low-pass filter gives |H| = 1/√(1 + (ω/ωc)²) and φ = −atan(ω/ωc). In the asymptotic (straight-line) Bode plot each pole bends the magnitude down by 20 dB/decade at its corner frequency, each zero bends it up by 20 dB/decade, and an integrator 1/s gives −20 dB/decade at all frequencies. Gain crossover ωc: |L(jω)| = 1 (0 dB); phase margin PM = 180° + ∠L(jωc). Phase crossover ω180: ∠L(jω) = −180°; gain margin GM = −20·log₁₀|L(jω180)| dB. The closed loop is stable when both margins are positive.

Corner frequency

ωc = 1/(RC) = 1/(1000·1 × 10⁻⁹) = 1000000 rad/s
fc = 159155 Hz → f/fc = 1.6 × 10⁶/159155 = 10.05

Phase

φ = − atan(10.05) = −84.32°

Answer

φ = −84.32°
Example 3Hard
|H| (dB)0.10.111101010010010001000−60−40−200204060ω (rad/s)φ (°)ω (rad/s)−180−135−90−450ωc​

A unity-feedback loop has the open-loop transfer function L(s) = 185/(s(s + 5)). Find the phase margin PM in degrees.

L(s) = 185/(s(s + 5))

Find PM (°)

Show hints
  1. |L(jω)| = 185/(ω·√(ω² + 25)) = 1 gives ω⁴ + 25ω² − 34225 = 0.
  2. Solve the quadratic in x = ω²: x = (−a² + √(a⁴ + 4K²))/2.
  3. ωc = 13.15 rad/s; ∠L = −90° − atan(ωc/5).
Show the answer and the step-by-step solution

Frequency response: substitute s = jω in the transfer function. The magnitude in decibels is 20·log₁₀|H(jω)| and the phase is the sum of the angles of the numerator factors minus those of the denominator factors. A first-order RC or RL filter has its corner (−3 dB) frequency at ωc = 1/(RC) or R/L, and fc = ωc/(2π); a low-pass filter gives |H| = 1/√(1 + (ω/ωc)²) and φ = −atan(ω/ωc). In the asymptotic (straight-line) Bode plot each pole bends the magnitude down by 20 dB/decade at its corner frequency, each zero bends it up by 20 dB/decade, and an integrator 1/s gives −20 dB/decade at all frequencies. Gain crossover ωc: |L(jω)| = 1 (0 dB); phase margin PM = 180° + ∠L(jωc). Phase crossover ω180: ∠L(jω) = −180°; gain margin GM = −20·log₁₀|L(jω180)| dB. The closed loop is stable when both margins are positive.

Gain crossover

ω⁴ + 25ω² − 34225 = 0
ω² = (−25 + √(625 + 4·34225))/2 = 172.9
ωc = 13.15 rad/s

Phase margin

∠L(jωc) = −90° − atan(13.15/5) = −159.2°
PM = 180° + ∠L = 20.82°

Answer

PM = 20.82°

Questions and answers

What is Bode plots & margins?

Feed a sine wave into a filter or amplifier, and a sine of the same frequency comes out. Only two things change: its size and its timing.

The gain |H| is the ratio of the output amplitude to the input amplitude. The phase φ is how far the output is shifted, in degrees. A negative phase means the output lags behind.

How do I solve Bode plots & margins problems step by step?

Frequency response: substitute s = jω in the transfer function. The magnitude in decibels is 20·log₁₀|H(jω)| and the phase is the sum of the angles of the numerator factors minus those of the denominator factors. A first-order RC or RL filter has its corner (−3 dB) frequency at ωc = 1/(RC) or R/L, and fc = ωc/(2π); a low-pass filter gives |H| = 1/√(1 + (ω/ωc)²) and φ = −atan(ω/ωc). In the asymptotic (straight-line) Bode plot each pole bends the magnitude down by 20 dB/decade at its corner frequency, each zero bends it up by 20 dB/decade, and an integrator 1/s gives −20 dB/decade at all frequencies. Gain crossover ωc: |L(jω)| = 1 (0 dB); phase margin PM = 180° + ∠L(jωc). Phase crossover ω180: ∠L(jω) = −180°; gain margin GM = −20·log₁₀|L(jω180)| dB. The closed loop is stable when both margins are positive.

What are common mistakes in Bode plots & margins?
  • That is the gain as a ratio. Convert: 20·log₁₀(0.3).
  • For a voltage or signal ratio use 20·log₁₀, not 10·log₁₀ (that is for power).
  • Set s = 0 in every factor: G(0) = 0.3, not 12.
What do the Bode plots & margins exercises cover?
  • Easy: filters and asymptotes
  • Medium: magnitude and phase
  • Hard: stability margins

Every problem has new values, so you learn the method instead of an answer. Stuck? Open a small hint first, and the full explanation only when you need it.

How practising works

  • Every problem has new values, so you learn the method instead of an answer.
  • Stuck? Open a small hint first, and the full explanation only when you need it.
  • Your progress, mistakes and saved problems are kept, so you can review before the exam.

Topics before and after this one

Learn first

Calculators

Courses with this topic

More topics in Electrical

Printable worksheet