Learn › Topic 8
RC Low-Pass and High-Pass Filters and Bode Plots
7 min read · bitGateLab Team
A filter lets some frequencies through and attenuates others. With just one resistor and one capacitor you can remove high-frequency noise from a sensor, strip the DC level from an audio signal or separate bass from treble. In this topic you'll learn to calculate the cutoff frequency of passive RC filters, to express their gain in decibels and to draw their Bode plot, the graph engineers use to describe any system in the frequency domain. If you are not yet comfortable with complex impedances, first review alternating current and phasors.
Transfer function
The transfer function H relates the output phasor to the input phasor: H = Vout/Vin. It is a complex number that depends on frequency. Its magnitude |H| tells you how much the signal is amplified or attenuated, and its angle tells you how much it is phase-shifted. Since RC filters are voltage dividers made with impedances, H is obtained with the divider formula.
RC low-pass filter
The resistor goes in series with the signal and the capacitor from the output to ground. At low frequency the capacitor hardly conducts (large XC) and the output is almost equal to the input; at high frequency the capacitor behaves like a short circuit and the output goes to zero.
H(f) = ZC / (R + ZC) = 1 / (1 + j·f/fc) fc = 1 / (2πRC) |H| = 1 / √(1 + (f/fc)²) phase = −arctan(f/fc)
The cutoff frequency fc is the one at which XC = R. There |H| = 1/√2 = 0.707 and the phase is −45°. At that frequency the output power is half the input power, which is why it is also called the half-power frequency.
RC high-pass filter
Just swap the components: the capacitor in series and the resistor from the output to ground. Now the capacitor blocks DC and the low frequencies, and lets the high ones through.
H(f) = R / (R + ZC) = (j·f/fc) / (1 + j·f/fc) |H| = (f/fc) / √(1 + (f/fc)²) phase = 90° − arctan(f/fc)
The cutoff frequency is calculated with the same formula, fc = 1/(2πRC). At fc the magnitude is also 0.707, but the phase is +45°: the output leads the input.
Gain in decibels
Because filter gains span many orders of magnitude, they are expressed in decibels:
GdB = 20 · log10|H|
| |H| | G (dB) |
|---|---|
| 2 | +6.02 |
| 1 | 0 |
| 0.707 | −3.01 |
| 0.5 | −6.02 |
| 0.1 | −20 |
| 0.01 | −40 |
Bode plot
A Bode plot consists of two graphs with the frequency axis on a logarithmic scale: one of magnitude in dB and one of phase in degrees. The logarithmic scale makes every decade (multiplying the frequency by 10) take up the same space.
For the low-pass filter, the magnitude is approximated by two straight lines called asymptotes:
- Below fc: a horizontal line at 0 dB.
- Above fc: a line that falls 20 dB per decade (equivalent to about 6 dB per octave, that is, each time you double the frequency).
The actual curve departs from the asymptotes by at most 3 dB, right at fc. For the phase, another approximation is used: 0° up to fc/10, a straight line that falls to −90° at 10·fc, passing through −45° at fc, and −90° from there on. The error of this approximation is less than 6°. The high-pass filter is the mirror image: it rises 20 dB per decade up to fc and then stays at 0 dB, with a phase that goes from +90° to 0°.
Example 1: analysis. A filter has R = 10 kΩ and C = 10 nF. Calculate fc and the response of the low-pass and high-pass versions at several frequencies.
- fc = 1/(2π · 10 000 · 10×10−9) = 1/(6.283×10−4) = 1591.5 Hz.
- At 5 kHz: f/fc = 3.14. Low-pass: |H| = 1/√(1 + 9.87) = 0.303, that is, −10.36 dB, with a phase of −72.3°.
- High-pass at 5 kHz: |H| = 3.14/√(10.87) = 0.953, that is, −0.42 dB, with a phase of +17.7°.
| f | Low-pass (dB) | LP phase | High-pass (dB) | HP phase |
|---|---|---|---|---|
| 159 Hz (fc/10) | −0.04 | −5.7° | −20.04 | +84.3° |
| 1591.5 Hz (fc) | −3.01 | −45° | −3.01 | +45° |
| 5 kHz | −10.36 | −72.3° | −0.42 | +17.7° |
| 15.9 kHz (10 fc) | −20.04 | −84.3° | −0.04 | +5.7° |
| 159 kHz (100 fc) | −40.00 | −89.4° | 0.00 | +0.6° |
Notice the symmetry: whatever one attenuates, the other lets through.
Example 2: design. You need a low-pass filter with fc ≈ 1 kHz and you have a 100 nF capacitor.
- Solve for R: R = 1/(2π · fc · C) = 1/(2π · 1000 · 100×10−9) = 1591.5 Ω.
- The nearest standard value is 1.6 kΩ.
- With 1.6 kΩ: fc = 1/(2π · 1600 · 100×10−9) = 994.7 Hz, within 1 % of the target.
A practical detail: these formulas assume that nothing is connected to the output. If you load the filter with a resistance comparable to R, the passband gain drops and fc shifts. To avoid this, use a load much larger than R or a voltage follower built with an operational amplifier.
Common mistakes
- Using 10·log10 for voltage ratios. With voltages and currents you use 20·log10; 10·log10 is for power.
- Thinking that the signal disappears at fc. At fc, 70.7 % of the voltage still comes out; the filter attenuates gradually, it does not cut off abruptly.
- Plotting frequency on a linear scale: the asymptotes are no longer straight lines and the −20 dB/decade slope is hard to see.
- Forgetting the load connected to the output, which changes the actual cutoff frequency.
- Confusing the phase of the high-pass filter (positive, from +90° to 0°) with that of the low-pass filter (negative, from 0° to −90°).
Try it in the simulator
The simulator's AC analysis sweeps the frequency and plots the magnitude and phase, so you can compare the curve with your hand-drawn asymptotes.
- Place a sine-wave source, a 10 kΩ resistor and a 10 nF capacitor to form a low-pass filter.
- Run an AC sweep from 10 Hz to 1 MHz with a logarithmic axis and look at the output.
- Find the −3 dB point and check that it is close to 1591 Hz and that the phase there is −45°.
- Measure the drop between 15.9 kHz and 159 kHz: it should be about 20 dB.
- Swap R and C to form the high-pass filter and repeat the sweep.
- Connect a 10 kΩ load resistor to the output and see how the curve changes.
Exercises
Calculate the cutoff frequency of an RC filter with R = 4.7 kΩ and C = 100 nF.
Show answer
fc = 1/(2π · 4700 · 100×10−9) = 1/(2.953×10−3) = 338.6 Hz.
A filter lets through a quarter of the input voltage. What is its gain in dB?
Show answer
G = 20 · log10(0.25) = −12.04 dB.
An RC low-pass filter receives a signal of frequency 2·fc. Find |H| in dB and the phase.
Show answer
|H| = 1/√(1 + 4) = 0.447, which gives 20·log10(0.447) = −6.99 dB. Phase = −arctan(2) = −63.4°.
With R = 10 kΩ and C = 10 nF in a high-pass configuration, how much is a 159 Hz signal attenuated?
Show answer
f/fc = 159.15/1591.5 = 0.1. |H| = 0.1/√(1.01) = 0.0995, which is equivalent to −20.04 dB, with a phase of +84.3°. One decade below cutoff, the high-pass filter attenuates by about 20 dB.