RC Low-Pass Filter Bode Plot
Copy this iframe to your website:
1 | |
Description
This MicroSim draws the Bode plot of the simplest analog filter: a resistor \(R\) in series with the signal and a capacitor \(C\) from the output to ground. The top plot is the gain in decibels and the bottom plot is the phase in degrees. Both share a logarithmic frequency axis from 1 Hz to 100 kHz.
- Resistance R steps through the standard E12 resistor values from 10 Ω to 100 kΩ (12 values per decade).
- Capacitance C steps through the E12 capacitor values from 1 nF to 100 µF.
- Show straight-line asymptotes adds the grey dashed straight-line approximations that are used to sketch Bode plots by hand.
The read-outs at the top give the time constant \(\tau = RC\) and the corner frequency \(f_c = 1/(2\pi RC)\). The orange dashed line marks \(f_c\). The orange dots mark the two values that hold for every first-order low-pass filter: a gain of \(-3\) dB and a phase of \(-45°\) at \(f_c\). The black triangle spans one decade well above \(f_c\) and shows the gain falling by 20 dB across it. Hover over either plot to move the grey cursor and read the gain and phase at that frequency. The cursor snaps to \(f_c/10\), \(f_c\), \(10f_c\) and \(100f_c\), and it follows \(f_c\) when you move a slider.
This simulation supports the low-pass filter section of Chapter 9: Filter Design Fundamentals.
Mathematical Concepts
The capacitor and resistor form a voltage divider whose ratio depends on frequency:
The plotted gain and phase are
At \(f = f_c\) the gain is \(-10\log_{10} 2 = -3.01\) dB (\(|H| = 1/\sqrt{2} = 0.707\)) and the phase is \(-45°\). Well above \(f_c\), \(|H(f)| \approx f_c/f\), so the gain falls by 20 dB for every factor of 10 in frequency (about 6 dB per octave) and the phase approaches \(-90°\). The straight-line asymptotes are 0 dB below \(f_c\) and \(-20\log_{10}(f/f_c)\) dB above it for the gain, and for the phase 0° below \(f_c/10\), \(-90°\) above \(10f_c\), and a straight line through \(-45°\) at \(f_c\) in between.
Lesson Plan
Learning Objectives
After using this MicroSim, students will be able to:
- Calculate the time constant \(\tau = RC\) and the corner frequency \(f_c = 1/(2\pi RC)\) for given values of \(R\) and \(C\).
- Identify the \(-3\) dB gain and the \(-45°\) phase at the corner frequency on a Bode plot.
- Explain why the gain falls by 20 dB per decade and the phase approaches \(-90°\) well above \(f_c\).
- Predict how changing \(R\) or \(C\) moves the Bode plot along the frequency axis without changing its shape.
- Select standard E12 values of \(R\) and \(C\) that place the corner frequency near a target frequency.
Target Audience
Undergraduate students in a signals and systems, circuits, or introductory signal processing course. Plan 20-30 minutes for the activities below.
Prerequisites
- Complex numbers, magnitude and phase
- Decibels and logarithms
- The impedance of a resistor (\(R\)) and of a capacitor (\(1/(j2\pi fC)\))
Activities
Activity 1: Find the corner (5 min). Start from the default \(R = 1\) kΩ and \(C = 1\) µF.
- Confirm the read-outs: \(\tau = 1.00\) ms and \(f_c = 1/(2\pi \times 0.001) = 159\) Hz.
- The cursor starts at \(f_c\). Read \(|H| = 0.707 = -3.01\) dB on the gain plot and \(-45.0°\) on the phase plot.
Activity 2: Measure the roll-off (5 min). Keep the default values and hover near the triangle.
- Move the cursor to \(10f_c = 1.59\) kHz (it snaps there). The gain is \(-20.04\) dB (\(|H| = 0.0995\)) and the phase is \(-84.3°\).
- Move it to \(100f_c = 15.9\) kHz. The gain is \(-40.00\) dB and the phase is \(-89.4°\). The triangle shows the same drop of \(-20.0\) dB over that decade.
- Move it to \(f_c/10 = 15.9\) Hz. The gain is only \(-0.04\) dB and the phase is \(-5.7°\).
Activity 3: Only the product RC matters (5 min). Set \(R = 10\) kΩ and \(C = 1\) µF, then \(R = 1\) kΩ and \(C = 10\) µF.
- Both give \(\tau = 10.0\) ms and \(f_c = 15.9\) Hz, and the two Bode plots are identical.
- Now set \(R = 10\) kΩ and \(C = 10\) nF. Then \(\tau = 100\) µs and \(f_c = 1.59\) kHz: the whole curve moves two decades to the right without changing shape.
Activity 4: Design with standard parts (10 min). Choose components for a corner near 1 kHz with \(C = 100\) nF.
- The exact value would be \(R = 1/(2\pi \times 1000 \times 100\text{ nF}) = 1.59\) kΩ, which is not an E12 value.
- Try the neighbours: 1.5 kΩ gives \(f_c = 1.06\) kHz and 1.8 kΩ gives \(f_c = 884\) Hz.
- Find another pair that comes closer (for example 3.3 kΩ with 47 nF gives \(f_c = 1.03\) kHz).
Activity 5: How good is the sketch? (5 min). Turn Show straight-line asymptotes on and compare the dashed lines with the curves.
- The largest gain error is 3.01 dB, exactly at \(f_c\).
- The largest phase error is 5.7°, at \(f_c/10\) and at \(10f_c\).
Assessment
- A filter uses \(R = 4.7\) kΩ and \(C = 10\) nF. What are \(\tau\) and \(f_c\)? (Answer: \(\tau = 47\) µs and \(f_c = 1/(2\pi \times 47\ \mu\text{s}) = 3.39\) kHz.)
- What are the gain and the phase of any first-order RC low-pass filter at its corner frequency? (Answer: \(|H| = 1/\sqrt{2} = 0.707\), which is \(-3.01\) dB, and the phase is \(-45°\).)
- A filter has \(f_c = 200\) Hz. Estimate its gain at 20 kHz. (Answer: 20 kHz is two decades above \(f_c\), so the gain is about \(-40\) dB. The exact value is \(-40.0\) dB.)
- You double \(R\) and leave \(C\) unchanged. What happens to \(f_c\) and to the shape of the Bode plot? (Answer: \(f_c\) halves, so the curves move left by \(\log_{10}2 = 0.30\) decade. Their shape does not change.)
- Why does the gain fall by 20 dB per decade well above \(f_c\)? (Answer: for \(f \gg f_c\), \(|H(f)| \approx f_c/f\). A factor of 10 in \(f\) divides \(|H|\) by 10, which is \(20\log_{10}10 = 20\) dB.)
Common Misconceptions
- "The cutoff frequency is where the filter stops passing signals." At \(f_c\) the output still has 70.7% of the input amplitude, and at \(2f_c\) it still has 44.7% (\(-6.99\) dB). Hover just above \(f_c\) and watch the gain fall gradually: an RC filter attenuates, it does not block.
- "A larger resistor or capacitor raises the cutoff." Move either slider to the right and the orange line moves to the left. Because \(f_c = 1/(2\pi RC)\), a larger \(R\) or \(C\) means a slower filter and a lower corner.
- "The straight-line sketch is the real response." Turn the asymptotes on: the true curve lies 3 dB below the corner of the sketch.
References
- RC circuit - Wikipedia - derivation of the RC low-pass transfer function, time constant and cutoff frequency
- Bode plot - Wikipedia - gain and phase plots on a logarithmic frequency axis and their straight-line approximations
- Low-pass filter - Wikipedia - first-order low-pass filters and the 20 dB per decade roll-off
- Cutoff frequency - Wikipedia - the -3 dB (half-power) definition of the corner frequency
- E series of preferred numbers - Wikipedia - the E12 values used by the R and C sliders
- The Scientist and Engineer's Guide to Digital Signal Processing - Steven W. Smith - free online textbook with chapters on filters and on analog electronic filters
Development Notes
Version 2.0 (October 2026) rebuilt the original page, which used Plotly, as a p5.js 2.3.2 sketch. Changes from version 1:
- The two number boxes and the Generate Bode Plot button were replaced by sliders that step through standard E12 values, so the plot updates as you drag. Values outside 10 Ω to 100 kΩ and 1 nF to 100 µF can no longer be entered.
- The frequency axis now runs from 1 Hz to 100 kHz (it was 10 Hz to 100 kHz).
- Gain and phase are drawn as two stacked plots that share the frequency axis, instead of one plot with two vertical axes. They keep their original colors (gain red, phase blue).
- New: the corner-frequency marker, the time-constant and corner-frequency read-outs, the slope triangle, the straight-line asymptotes, the cursor and the circuit diagram.