Filters
A filter separates signals by their frequency: it lets some through and blocks others. It is everywhere—in the power supply that feeds the equipment, ahead of every converter, in the tweeter, in the tuner of a radio—and it almost always solves a problem that no other circuit can solve.
01The idea: frequency as the criterion
An amplifier makes the signal bigger. A rectifier turns it into DC. A filter does something different: it chooses. And it can choose because capacitors and inductors present a reactance that depends on frequency, which resistors do not.
A capacitor opposes current less the higher the frequency; an inductor opposes it more. A divider made of a resistor and one of them is already a filter, and which side the output is taken from decides whether it is low-pass or high-pass.
| Type | What it passes | Concrete example |
|---|---|---|
| Low-pass | From DC up to fc | Power supply filter; anti-aliasing ahead of an A/D converter; the woofer. |
| High-pass | From fc upward | Coupling capacitor between stages; the tweeter of a speaker cabinet. |
| Band-pass | Only a band around f0 | Radio tuning; 38 kHz remote-control receiver; equalizer. |
| Band-stop (notch) | Everything except a band | Removing the 50 Hz hum from a biomedical or audio signal. |
02The first-order RC filter
It is the simplest filter there is: a resistor and a capacitor. It is worth knowing by heart because it shows up everywhere, often without anyone having put it there on purpose: the output resistance of a stage and the capacitance of the cable form a low-pass filter even though nobody designed it.
- The reactance of the capacitor equals the resistance: XC = R.
- The output falls to 0.707 of the input, which is −3 dB.
- Power falls to half: that is why it is also called the half-power frequency.
- The phase shift is 45°.
And far from the cutoff, the slope is −20 dB per decade, or what amounts to the same, −6 dB per octave: every time the frequency is multiplied by ten, the signal is divided by ten.
First-order RC low-pass with fc = 1 kHz:
| Frequency | Vout/Vin | In decibels |
|---|---|---|
| 100 Hz | 0.995 | −0.04 dB |
| 1 kHz (fc) | 0.707 | −3 dB |
| 2 kHz | 0.447 | −7.0 dB |
| 10 kHz | 0.0995 | −20 dB |
| 100 kHz | 0.00995 | −40 dB |
The practical conclusion: a first-order filter does not separate well. To attenuate by a factor of a hundred you have to go two decades beyond the cutoff. If you need to reject something that is close to what you want to keep, you need a higher order.
03Order, slope and shape of the curve
The order of a filter is the number of reactive elements that determine its response. Each order adds 20 dB per decade of slope.
| Order | Slope | Attenuation one decade later | How it is built |
|---|---|---|---|
| 1 | −20 dB/dec | 10 times | An RC or an RL |
| 2 | −40 dB/dec | 100 times | An LC, or an active Sallen-Key |
| 3 | −60 dB/dec | 1000 times | A second-order section plus a first-order one |
| 4 | −80 dB/dec | 10,000 times | Two second-order stages in cascade |
Each stage loads the previous one, so the resulting curve is not the expected one: the cutoff shifts and the transition becomes softer, not sharper. There are two ways to fix it: separate the stages with a voltage follower, or use an active filter directly, which is what the Sallen-Key topology does.
The shape of the curve: not all second orders are the same
With the same order you can favor different things, and each choice has its own name:
Passband as flat as possible. It is the default choice when there is no strong reason for anything else. Q = 0.707 in the second order.
Falls faster in exchange for accepting ripple in the passband. It is used when something very close to the useful band has to be rejected.
Prioritizes phase: it delays all frequencies equally, so it does not distort pulses. It is the one of choice for square waves and data.
With low Q the curve is soft and has no peak; with Q = 0.707 it is flat (Butterworth); with high Q a resonance peak appears just before the cutoff. In a band-pass filter, on the other hand, Q is directly its selectivity:
04Passive LC and active op amp filters
- They need no power supply and handle power: they are the only possible ones at the output of a transmitter or in a speaker crossover.
- They work at any frequency, including hundreds of MHz.
- Their response depends on the load impedance: the same filter behaves differently with 8 Ω than with 4 Ω.
- In audio, the inductors required are large, expensive and lossy.
- With an op amp, resistors and capacitors: no inductors.
- They can have gain as well as filter, and their output is low-impedance: they can be chained without loading each other.
- They allow high Q without bulky components.
- Limited by the bandwidth of the op amp: they are no good at RF. And they need a power supply.
The sampling rate is 10 kSa/s, so everything above 5 kHz has to be rejected. A cutoff of 3 kHz is chosen to leave some margin.
- With first order, at 5 kHz the attenuation is barely −5.8 dB: a little more than half of the unwanted signal gets through. Not good enough.
- With a fourth-order Butterworth (two Sallen-Key stages in cascade), the attenuation at 5 kHz is about −18 dB, and at 10 kHz −42 dB. That is already acceptable.
- Components for fc = 3 kHz with C = 10 nF: R = 1/(2π × 3000 × 10−8) = 5305 Ω → commercial value 5.6 kΩ, or 5.1 kΩ if you prefer to stay above the frequency. E12 series values can be looked up with the resistor calculator.
Two-way crossover at 3 kHz on 8 Ω speakers, first order:
- To the tweeter, a series capacitor: C = 1/(2πf·R) = 1/(6.283 × 3000 × 8) = 6.6 µF → use 6.8 µF polyester, never an ordinary electrolytic.
- To the woofer, a series inductor: L = R/(2πf) = 8/18,850 = 424 µH.
With first order the two ways overlap quite a lot around the crossover frequency; commercial crossovers are usually second order per way, and there the tweeter polarity has to be reversed so that the two signals do not cancel in the crossover region.
05Band-pass and band-stop
They can be built in two ways: by chaining a high-pass with a low-pass (wide band) or by taking advantage of the resonance of an LC (narrow band).
A parallel LC presents maximum impedance at resonance: placed in series with the signal, it passes only that band. A series LC does the opposite: it presents minimum impedance, and placed to ground it drags that band down to the floor. That is the band-stop.
The most requested case: removing the mains hum from a small signal. An active twin-T network is used, which gives deep, narrow rejection. You have to be careful with the width: if the notch is too wide, it also takes away useful information from the signal, and in an electrocardiogram that distorts the trace.
A station at 1 MHz with a tank circuit of L = 250 µH:
- C = 1/(4π²f²L) = 1/(39.48 × 1012 × 2.5×10−4) = 101 pF: that is why the variable capacitor of an AM radio goes up to about 400 pF, just enough to cover the whole band.
- With a Q of 100, the bandwidth is BW = f₀/Q = 106/100 = 10 kHz: exactly one AM channel fits and the adjacent one is rejected.
That is exactly the trade-off of a tuner: with Q too high the highs of the modulation are lost; with low Q, the neighboring station leaks in.
06Where filters show up, even if nobody calls them that
| Circuit | What filter it really is |
|---|---|
| Filter capacitor of a power supply | Low-pass: passes the DC and blocks the 100 Hz ripple. |
| Coupling capacitor between stages | High-pass: blocks the bias DC and lets the signal through. |
| 100 nF capacitor next to each IC | Low-pass toward the supply: sends fast noise to ground. |
| Tone control of an amplifier | Adjustable low-pass and high-pass. |
| Anti-aliasing before an A/D converter | Low-pass, and it is mandatory: what gets in wrong can no longer be taken out. |
| Remote-control receiver | Band-pass centered at 38 kHz that separates the signal from ambient light. |
| Antenna and tuner | High-Q band-pass, see impedance measurements. |
| Snubber of a triac | Filter that limits dV/dt (special semiconductors). |
| Averaging readings in a program | A digital low-pass: the moving average is exactly that. |
07In the lab
R = 10 kΩ and C = 10 nF. With the generator at constant amplitude, measure the output at 100, 200, 500 Hz, 1, 1.6, 3, 5, 10, 30 and 100 kHz. Plot the ratio in dB on semilogarithmic paper. Check that at 1592 Hz the output is 0.707 and that between 10 and 100 kHz the curve drops 20 dB. Also measure the phase shift at the cutoff: it should be 45°.
Measure the curve of an RC, then that of two identical RCs connected one after the other, and finally that of the two separated by an op amp follower. Compare the three curves: the shift of the cutoff in the middle case is the loading effect, and it is plainly visible on the graph.
Build a second-order low-pass with a TL081, R = 10 kΩ and C = 10 nF. Plot the curve and check the slope of 40 dB per decade. Then vary the gain with a trimmer and watch how a peak appears before the cutoff as Q goes up: it is the same phenomenon that makes a circuit oscillate if you go too far.
Add to a 1 kHz signal a little 50 Hz taken from a step-down transformer. Listen to the result and look at it on the oscilloscope. Then pass the mix through a high-pass with fc = 300 Hz and compare: the hum disappears and the signal stays intact. It is the real solution to a very common audio problem.
Inject a 1 kHz square wave into the RC of Lab 1 and observe the output: it gets rounded. Lower the cutoff frequency and watch the square wave turn first into an exponential and then almost into a triangle wave. It is the most graphic way to understand that a square wave is made of harmonics and that the filter removes them one by one.
08Common mistakes
| Symptom | Usual cause |
|---|---|
| The measured cutoff does not match the calculated one | Capacitor tolerance, or the impedance of the next stage loading the filter. |
| Two filters in cascade do not give the expected slope | Loading effect between stages: you need to separate them with a follower or use an active filter. |
| A peak appears just before the cutoff | Q too high because of excess gain in the Sallen-Key. Adjust the feedback ratio. |
| The active filter does not work at high frequency | The bandwidth of the op amp has been exceeded. There you have to go to passive LC filters. |
| The low-pass filter still lets fast noise through | The capacitor is above its self-resonance and behaves like an inductor. Add a small ceramic one in parallel. |
| The speaker crossover sounds hollow at the crossover point | Phase cancellation between the two ways. In second order the tweeter polarity has to be reversed. |
| The signal is distorted even though the amplitudes are right | Phase distortion: each harmonic arrives with a different delay. If that matters, the filter must be a Bessel. |
| The 50 Hz notch takes away part of the signal | Q too low: the rejection is wide. It has to be narrowed, even though it becomes more sensitive to component drift. |
09Self-assessment
What happens exactly at the cutoff frequency of an RC filter?
XC = R, the output falls to 0.707 of the input (−3 dB), the power falls to half and the phase shift is 45°.
R = 4.7 kΩ and C = 100 nF: what is the cutoff frequency?
fc = 1/(2π × 4700 × 10−7) = 1/(2.953×10−3) = 338.6 Hz.
A third-order filter, one decade past the cutoff: how much does it attenuate?
60 dB, which is 1000 times in voltage. Each order contributes 20 dB per decade.
Why do two RC filters in cascade not give a correct second order?
Because the second stage loads the first: the impedance of one changes the response of the other. The cutoff shifts and the transition becomes softer. They are separated with a voltage follower, or an active topology such as Sallen-Key is used.
A band-pass filter centered at 455 kHz with Q = 50: what bandwidth does it have?
BW = f₀/Q = 455,000/50 = 9.1 kHz. It is the typical value of the intermediate-frequency filters of an AM radio.
When is a Bessel preferable to a Butterworth?
When the waveform matters and not just the amplitude: square waves, pulses, data. A Bessel delays all frequencies equally, so it does not distort the pulse, at the cost of a slower roll-off.
Why does an anti-aliasing filter have to be analog?
Because it has to act before sampling. Afterward, the high frequency has already been folded into the useful band as a false signal indistinguishable from a real one: no digital filter can separate it.
What kind of filter is, at bottom, the coupling capacitor between two stages?
A first-order high-pass, formed by that capacitor and the input impedance of the next stage. If the capacitor is small, the lows are lost: that is the criterion for choosing it.
You want a 3 kHz low-pass with C = 10 nF: what resistance?
R = 1/(2πfcC) = 1/(6.283 × 3000 × 10−8) = 5305 Ω. The closest commercial value in the E12 series is 5.6 kΩ, which puts the cutoff at 2842 Hz.
Why does the tweeter in a speaker cabinet have a series capacitor?
Because that capacitor forms a high-pass that keeps low frequencies from reaching the tweeter. Without it, the tweeter tries to reproduce high-energy bass and is destroyed.