Catto / Topic Map · Analog Electronics II Year 5
Analog Electronics II · 144 h · Topic 6 of 6

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.

Filters and oscillators Cutoff frequency Decibels Sallen-Key Q factor

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.

Everything follows from these two lines
XC=12πfCXL=2πfL

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.

Low-pass low high output High-pass low high output Band-pass low high output Band-stop low high output one frequency sweep runs through all four filters at once
Figure 1. The four types, animated. The sweep runs across the spectrum and each filter shows what is left at the output: the low-pass passes the lows, the high-pass the highs, the band-pass only one band and the band-stop everything except one band.
TypeWhat it passesConcrete example
Low-passFrom DC up to fcPower supply filter; anti-aliasing ahead of an A/D converter; the woofer.
High-passFrom fc upwardCoupling capacitor between stages; the tweeter of a speaker cabinet.
Band-passOnly a band around f0Radio tuning; 38 kHz remote-control receiver; equalizer.
Band-stop (notch)Everything except a bandRemoving 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.

fc=12πRC With R = 10 kΩ and C = 10 nF: fc = 1592 Hz. The same formula works for the low-pass and for the high-pass: what changes is where the output is taken from.
What happens exactly at the cutoff frequency
  • 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.

f/100 f/10 fc 10 f 100 f 0 dB -20 dB -40 dB -60 dB 1st order · −20 dB/dec 2nd order · −40 dB/dec −3 dB output signal −0.0 dB −0.0 dB −0.0 dB −0.0 dB −0.2 dB −0.8 dB −3.0 dB −7.5 dB −13.5 dB −20.0 dB −26.7 dB −33.3 dB −40.0 dB logarithmic frequency scale
Figure 2. Response of a low-pass filter, animated. The dot moves along the frequency axis while the output signal is shown on the right: it passes in full in the passband, falls to 0.707 at the cutoff and fades away beyond. The second-order curve falls twice as fast.
Worked example · Attenuation at different frequencies

First-order RC low-pass with fc = 1 kHz:

FrequencyVout/VinIn decibels
100 Hz0.995−0.04 dB
1 kHz (fc)0.707−3 dB
2 kHz0.447−7.0 dB
10 kHz0.0995−20 dB
100 kHz0.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.

dB=20·logVoutVin Decibels turn what are multiplications in plain ratios into sums, and that is why they are always used for filters: two stages of −20 dB give −40 dB.

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.

OrderSlopeAttenuation one decade laterHow it is built
1−20 dB/dec10 timesAn RC or an RL
2−40 dB/dec100 timesAn LC, or an active Sallen-Key
3−60 dB/dec1000 timesA second-order section plus a first-order one
4−80 dB/dec10,000 timesTwo second-order stages in cascade
Putting two RC filters in cascade does not give a proper second order

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:

Butterworth

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.

Chebyshev

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.

Bessel

Prioritizes phase: it delays all frequencies equally, so it does not distort pulses. It is the one of choice for square waves and data.

The Q factor in a filter

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:

Q=f0BWBW=f2−f1 f₁ and f₂ are the frequencies where the response falls by 3 dB. A band-pass filter centered at 1 kHz with Q = 10 has a bandwidth of 100 Hz.

04Passive LC and active op amp filters

Passive LC 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.
Active filters
  • 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.
fc=12πR1R2C1C2 Second-order Sallen-Key. With equal components (R₁ = R₂ = R, C₁ = C₂ = C) it reduces to fc = 1/(2πRC), and Q is set by the gain of the op amp.
Worked example · Anti-aliasing filter for an A/D converter

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.
Worked example · Crossover of a speaker cabinet

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).

By resonance

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.

f0=12πLC
50 Hz notch

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.

Worked example · AM radio tuning

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

CircuitWhat filter it really is
Filter capacitor of a power supplyLow-pass: passes the DC and blocks the 100 Hz ripple.
Coupling capacitor between stagesHigh-pass: blocks the bias DC and lets the signal through.
100 nF capacitor next to each ICLow-pass toward the supply: sends fast noise to ground.
Tone control of an amplifierAdjustable low-pass and high-pass.
Anti-aliasing before an A/D converterLow-pass, and it is mandatory: what gets in wrong can no longer be taken out.
Remote-control receiverBand-pass centered at 38 kHz that separates the signal from ambient light.
Antenna and tunerHigh-Q band-pass, see impedance measurements.
Snubber of a triacFilter that limits dV/dt (special semiconductors).
Averaging readings in a programA digital low-pass: the moving average is exactly that.

07In the lab

Lab 1 · Curve of an RC, point by point

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°.

Lab 2 · The cascade that is not a second order

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.

Lab 3 · Sallen-Key active filter

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.

Lab 4 · Filtering out the hum

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.

Lab 5 · Passive filter with a square wave

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

SymptomUsual cause
The measured cutoff does not match the calculated oneCapacitor tolerance, or the impedance of the next stage loading the filter.
Two filters in cascade do not give the expected slopeLoading effect between stages: you need to separate them with a follower or use an active filter.
A peak appears just before the cutoffQ too high because of excess gain in the Sallen-Key. Adjust the feedback ratio.
The active filter does not work at high frequencyThe 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 throughThe 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 pointPhase cancellation between the two ways. In second order the tweeter polarity has to be reversed.
The signal is distorted even though the amplitudes are rightPhase 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 signalQ 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.

Development of the topic “Filters” of Analog Electronics II (Year 5), based on the “Curriculum Proposal – Second Cycle of the Technical-Vocational Track, Secondary Education – Electronics,” Ministry of Education of the Province of Córdoba, DGETyFP. Back to the Topic Map · catto.ar