EE Primers · Analog

Analog filters, from one RC to a sixth-order anti-alias filter

A filter is a circuit whose gain depends on frequency. Everything on this page follows from one idea: each pole in the transfer function adds 20 dB per decade of roll-off and up to 90° of phase, and where you put the poles in the complex plane decides whether the response is flat, sharp, or faithful in time. The rest is choosing parts that keep those poles where you put them.

01 · Vocabulary

Transfer function, poles and order

A linear filter is described by its transfer function H(s), the ratio of output to input in the Laplace domain. Evaluate it at \(s=j\omega\) to get the frequency response: |H| is the gain and ∠H the phase shift at each frequency. The roots of the denominator are the poles, the roots of the numerator the zeros. A filter's order is its number of poles, and in practice its number of independent energy-storage elements (capacitors and inductors).

$$H(s)=K\cdot \Pi (s-z_{i})/\Pi (s-p_{k})\qquad \text{roll-off far from the corner}\approx 20\cdot (n_{\text{poles}}-n_{\text{zeros}})\ \text{dB}/\text{decade}$$
  • Low-pass passes DC and rejects high frequencies; all its zeros are at infinity.
  • High-pass is the mirror image: n zeros at DC, so it blocks DC and passes high frequencies.
  • Band-pass and band-stop (notch) combine both, characterised by a centre frequency and a bandwidth (or Q).
  • All-pass has flat gain and only shapes phase, used to equalise group delay.

The cutoff (corner) frequency fc is normally where the gain is 3 dB below the passband (half power, 1/√2 in amplitude). Chebyshev filters are the exception: they are usually specified at the edge of their ripple band, which is not the −3 dB point.

Group delay \(\tau _{\text{g}}=-\mathrm{d}\varphi /\mathrm{d}\omega\) is the time delay each frequency component experiences. If it is constant across the passband the waveform shape is preserved (a pure delay); if it varies, pulses and steps ring and overshoot even when the magnitude response looks perfect. Magnitude and phase are linked for minimum-phase filters, so a sharper magnitude transition always costs more group-delay variation.

02 · Passive

RC, RL and RLC sections

The single-pole RC low-pass is the most used filter in electronics, as an EMI filter on an input pin, an anti-alias filter on an ADC, a reference noise filter or a de-glitch on a reset line.

$$H(s)=1/(1+sRC)\qquad f_{\text{c}}=1/(2\pi RC)\qquad \tau =RC\qquad t_{\text{r}(10\text{–}90)}=2.2\,\tau =0.35/f_{\text{c}}$$

At fc the phase is −45°, a decade above it the gain is −20 dB and the phase nearly −90°. Swap R and C and it becomes a high-pass with the same corner. The output impedance of an RC section is R at DC, and the next stage's input impedance appears in parallel with C, so cascading two identical RC sections does not give two ideal poles: they interact, the corner moves and the knee softens. Buffer between sections or scale impedance by about 10× per stage.

A series RLC network gives a true second-order response with a resonance at \(\omega _{0}=1/\sqrt{LC}\) and a quality factor set by the resistance: \(Q=(1/R)\cdot \sqrt{L/C}\) for the series form. Passive LC filters dominate where op-amps cannot follow: RF front ends, power-supply input filters, audio speaker crossovers, and above a few MHz in general.

WatchAn LC supply filter (a ferrite bead or inductor feeding an MLCC) is an undamped resonator. Its peak at 1/(2π√(LC)) can amplify switching ripple or a load step by 10–20 dB instead of attenuating it. Damp it with a lossy bulk capacitor (ESR comparable to √(L/C)), a series resistor in a parallel RC, or by choosing a bead that is resistive at the resonance. The same resonance can destabilise a switching regulator downstream (Middlebrook's criterion).
03 · The building block

The second-order section and Q

Any higher-order filter is built from second-order sections (biquads), plus one first-order section if the order is odd. Every second-order low-pass has the same form, described by just two numbers: the natural frequency ω₀ and the quality factor Q.

$$H(s)=K\,\omega _{0}^{2}/(s^{2}+(\omega _{0}/Q)s+\omega _{0}^{2})\qquad \text{poles at}\ s=-\omega _{0}/(2Q)\pm j\omega _{0}\sqrt{1-1/(4Q^{2})}$$

Q measures how close the poles are to the jω axis. Low Q means well-damped, slow knees; high Q means sharp knees, peaking and ringing.

QDamping \(\zeta =1/(2Q)\)Frequency responseStep response
0.51Two real coincident poles, gain −6 dB at ω₀Critically damped, no overshoot
0.5770.8662nd-order Bessel, flattest group delay≈ 0.4 % overshoot
0.7070.7072nd-order Butterworth, maximally flat, −3 dB at ω₀≈ 4.3 % overshoot
1.00.5+1.25 dB peak just below ω₀≈ 16 % overshoot
50.1+14 dB peak at ω₀Rings for about Q cycles
RuleAt \(\omega =\omega _{0}\) the magnitude of a second-order low-pass is exactly Q (times its DC gain), and the phase is exactly −90°. That is the quickest way to read Q off a measured Bode plot, and the quickest way to see why a Q of 5 in a supply filter is dangerous.
04 · Approximations

Butterworth, Chebyshev, Bessel and elliptic

An ideal brick-wall filter cannot be built, so each classical family approximates it with a different compromise. For a given order they differ only in where the poles sit, which shows up as a different set of section Qs.

FamilyOptimisesPassbandTransitionTime domainSection Qs, 4th order
ButterworthFlatness at DCMaximally flat, no rippleModerateSome overshoot (≈11 % at 4th order)0.54, 1.31
Chebyshev ISteepness for a given rippleEquiripple (0.1–3 dB)SteepLarge overshoot and ringing0.78, 3.56 (1 dB)
BesselFlat group delayDroops earlySlowAlmost no overshoot, preserves pulse shape0.52, 0.81
Elliptic (Cauer)Steepest for given orderRippleSteepest, with stop-band notchesWorstNeeds zeros, e.g. notch biquads
Linkwitz–RileyCrossovers sum flat−6 dB at fcModerateGoodTwo cascaded Butterworths

Choose by asking what the signal cares about. Audio and frequency-domain measurements: Butterworth or Chebyshev. Pulses, edges, data, sensor steps and anything where overshoot reads as a false event: Bessel. Anti-alias filters in front of an FFT: often Chebyshev or elliptic for the sharpest transition. Butterworth is the default when nothing argues otherwise.

05 · Active

Active filters: Sallen-Key and multiple feedback

Op-amps let a filter realise complex poles with only R and C, isolate sections from each other, and provide gain. Two topologies cover most practical designs.

R1R2 C1C2 +− inout
Unity-gain Sallen-Key low-pass. C1 provides positive feedback near ω₀, which is what lifts Q above 0.5.
$$\omega _{0}=1/\sqrt{R_{1}R_{2}C_{1}C_{2}}\qquad Q=\sqrt{R_{1}R_{2}C_{1}C_{2}}/(C_{2}(R_{1}+R_{2}))\qquad R_{1}=R_{2}=R\Rightarrow C_{1}=2Q/(\omega _{0}R),\ C_{2}=1/(2Q\omega _{0}R)$$
Sallen-Key (voltage-controlled voltage source)

Non-inverting, few parts

  • Unity gain buffer configuration is insensitive to op-amp gain error and needs no extra resistors.
  • Q is set by the capacitor ratio: \(C_{1}/C_{2}=4Q^{2}\) with equal resistors. High Q demands large ratios.
  • High-frequency leakage: above a few hundred kHz the op-amp's rising output impedance lets the signal feed straight through C1, so the stop band floors out at −40 to −60 dB. Add a passive RC after it if deep rejection is needed.
  • Q sensitivity to gain rises quickly if you use gain > 1 to get Q (\(Q=1/(3-K)\) in the equal-component form).
Multiple feedback (MFB, Rauch)

Inverting, better stop band

  • Op-amp drives both feedback paths; input reaches the output only through the op-amp, so no high-frequency feedthrough.
  • Lower sensitivity to component tolerance at moderate Q; gain is set independently by a resistor ratio.
  • Inverts the signal and loads the source with a frequency-dependent impedance.
  • Preferred for anti-alias filters in front of ADCs and for band-pass up to \(Q\approx 20\).
State-variable / biquad

Two or three op-amps

  • Simultaneous LP, HP and BP outputs; f₀ and Q set independently, so tunable.
  • Low sensitivity at high Q; basis for most integrated universal filters.
  • More op-amps means more noise, power and area.

Practical design rules

  • Op-amp bandwidth. Finite GBW shifts f₀ down and Q up. A common rule for Sallen-Key is \(\text{GBW}\ge 100\cdot K\cdot Q\cdot f_{\text{c}}\) for <1 % error [1]; check the slew rate too, at the full output amplitude and fc.
  • Section order. Cascade sections in increasing order of Q so that a high-Q stage's peaking is not clipped by an earlier stage and its noise is not amplified by later gain. Put the first-order section (odd orders) first, where it also helps as an input RC.
  • Capacitors. Use C0G/NP0 ceramics or film. X7R and X5R change value with DC bias and AC voltage, which moves poles and generates distortion (tens of dB worse THD).
  • Resistor values. Too low loads the op-amp output; too high adds Johnson noise and lets the op-amp's input capacitance and bias current matter. 1 kΩ to 100 kΩ is the usual window.
  • Tolerance. Pole Q is sensitive to component ratios. A 4th-order Chebyshev with a Q of 3.6 section needs 1 % resistors and 2 % capacitors or better; simulate a Monte Carlo before committing.
06 · Interactive

Filter designer

Pick a family, order and cutoff. The plot shows magnitude (left axis) and group delay (dashed, normalised); the results list each section's f₀ and Q and unity-gain Sallen-Key values with \(R=10\ \text{k}\Omega\).

07 · Application

Anti-aliasing in front of an ADC

A sampler cannot tell a tone at f from one at fs − f. Any energy above fs/2 at the ADC input folds into the band of interest and cannot be removed afterwards. The anti-alias filter must attenuate everything that would fold onto the passband to below the noise floor or the error budget.

$$\text{required attenuation at}\ (f_{\text{s}}-f_{\text{pass}})\approx 6.02\cdot N+1.76\ \text{dB for a full-scale interferer and an}\ N-\text{bit converter}$$

Worked example. A 12-bit SAR samples at 100 kS/s; the signal extends to 10 kHz. Anything at 90 kHz folds onto 10 kHz, so we need about 74 dB there. A Butterworth of order n attenuates by 10·log(1 + (f/fc)2n); at 9× the corner that is 19 dB per order, so \(n=4\) gives 76 dB. Alternatives: sample at 1 MS/s and decimate digitally, and a 2nd-order filter is enough; or use a ΣΔ converter, whose heavy oversampling leaves only a single RC to do.

NoteOversampling moves the hard part of the filter into the digital domain where it is exact, cheap and drift-free. That is why audio codecs, IMUs and most sensor ADCs are ΣΔ and need only a simple RC in front.

The RC between a driver and a SAR ADC

A SAR's sampling capacitor takes a gulp of charge at the start of each acquisition (kickback). The small RC at the ADC pin is mostly a charge reservoir, not an anti-alias filter: \(C_{\text{filt}}\approx 10\)–20 × Csample so the kick only disturbs the node by a few percent, and R is chosen so the node settles to ½ LSB within the acquisition time (about (N+1)·ln2 time constants) while isolating the driver op-amp from the capacitive load. Too large an R and it fails to settle; too small and the op-amp may oscillate.

08 · In real products

Where filters show up on a board

Audio and microphones
  • DC-blocking coupling capacitor and the next stage's input resistance form a high-pass; size it for \(f_{\text{c}}\approx 10\)–20 Hz, and remember a ceramic coupling cap's capacitance drops with bias.
  • Digital MEMS microphones (PDM) push filtering into the codec's decimation filter; the analog concern becomes clock integrity and supply noise.
  • A class-D speaker output may need an LC filter for EMI, which has to be damped by the speaker load.
EMI and protection
  • RC or ferrite-plus-C on every I/O that leaves the board, sized to pass the signal's edges and block RF (cell bands, Wi-Fi, BT at 2.4 GHz) from being rectified by ESD diodes and op-amp inputs.
  • Feed-through and π filters at connectors.
  • Common-mode chokes on differential pairs.
Power
  • Second-stage LC after a buck to cut ripple for an RF or audio rail.
  • Ferrite-bead isolation of analog and digital supply islands.
  • RC filter on an LDO's reference or noise-reduction pin.
Sensing and timing
  • Deglitch RCs on resets, buttons and hall sensors (with Schmitt-trigger inputs).
  • Loop filters in PLLs, which set lock time, jitter and spur rejection.
  • Band-pass and demodulator integrators in capacitive and inductive sensor AFEs.
09 · Check yourself

Questions worth being able to answer

Why does a first-order RC low-pass have −45° of phase at its corner, and what is its step-response rise time?

At \(\omega =1/RC\) the transfer function is 1/(1 + j), whose angle is −atan\((1)=-45\)° and magnitude 1/√2. The step response is 1 − e−t/RC; going from 10 % to 90 % takes \(RC\cdot \ln 9\approx 2.2\,RC\), which is 0.35/fc. The same 0.35/BW relationship links an oscilloscope's bandwidth to its rise time.

Two identical RC low-pass stages are cascaded with no buffer. Is the result a second-order Butterworth?

No. Two real poles can never give Q above 0.5, and Butterworth needs 0.707. Worse, the second stage loads the first, so the poles split apart and the overall Q drops to about 0.33. The response is soft and the −3 dB point is much lower than either stage alone. Use an active stage to get complex poles, or scale impedances so the second stage barely loads the first.

When would you choose a Bessel over a Butterworth?

When the waveform shape matters more than passband flatness: pulse or data signals, sensor step responses, triggers, anything where ringing could cross a threshold. Bessel has nearly constant group delay so all components arrive together and the step response barely overshoots. The cost is a gentler transition, so you need higher order or more margin for the same stop-band rejection.

Your Sallen-Key low-pass at 20 kHz shows only −45 dB at 5 MHz instead of the predicted −160 dB. Why?

At high frequency the op-amp's closed-loop output impedance rises (its loop gain has run out), and C1 couples the input directly to the output node. The circuit becomes an RC divider with a floor set by R1, C1 and Zout. Fixes: a faster op-amp, an MFB topology, or a passive RC after the active stage.

How do you decide the order of an anti-alias filter?

Find the lowest frequency that folds into the passband, fs − fpass. Decide how much attenuation it needs (signal-to-noise target or ½ LSB, and how big the out-of-band energy is in reality, not always full scale). Then pick a family and solve for order, or raise fs and decimate. Always check passband droop and group delay at the top of the band too.

What does finite op-amp GBW do to an active filter?

It adds phase lag inside the feedback loop. f₀ shifts down and Q typically rises, so peaking increases, and at worst a high-Q section becomes unstable. Rules of thumb like \(\text{GBW}\ge 100\cdot Q\cdot f_{\text{c}}\) keep these errors near 1 %. Slew rate limits large-signal performance separately: \(\text{SR}\ge 2\pi \cdot f\cdot V_{\text{peak}}\).

A ferrite bead and a 10 µF MLCC filter a 1.8 V rail. The rail noise got worse at 300 kHz after adding them. Explain.

The bead's inductance (a few µH at low frequency, before it turns resistive) and the very low-ESR MLCC form an LC resonance near 1/(2π√(LC)), which for 3 µH and 10 µF is about 29 kHz; with DC bias reducing the MLCC and a smaller bead the peak lands in the hundreds of kHz, right on the buck's switching frequency or a load transient's energy. Q of the tank is high, so it amplifies. Add damping (a series-R electrolytic or polymer cap, or an R-C snubber), or choose a bead that is resistive at that frequency, and check the bead's inductance at the actual DC current.

Why are C0G capacitors specified for filters even when X7R would fit the value?

Class II ceramics (X7R, X5R) lose a large fraction of their capacitance with DC bias, vary with temperature and ageing, and their capacitance changes with the instantaneous AC voltage. That moves poles, changes Q, and makes the filter nonlinear, which shows up as harmonic distortion. C0G is stable to about ±30 ppm/°C and linear.

10 · Further reading

References

  1. J. Karki, Active Low-Pass Filter Design, Texas Instruments application report SLOA049. Link
  2. R. Mancini (ed.), Op Amps for Everyone, Texas Instruments, chapters on active filter design. Link
  3. H. Zumbahlen (ed.), Linear Circuit Design Handbook, Analog Devices / Newnes, 2008, chapter 8 "Analog Filters".
  4. A. Williams and F. Taylor, Electronic Filter Design Handbook, 4th ed., McGraw-Hill, 2006. Pole tables for every classical family.
  5. P. Horowitz and W. Hill, The Art of Electronics, 3rd ed., Cambridge University Press, 2015, chapter 6.
  6. R. Schaumann and M. Van Valkenburg, Design of Analog Filters, Oxford University Press, 2001.