← Back to Autonomy
A Field Guide · № 01 · Signal Processing

On Filters.

From the humble RC pair to the exacting geometry of Butterworth, Chebyshev, and Elliptic — an interactive walk through the analog and digital frontiers of frequency selectivity.

By Majid Mazouchi

ScopeLPF · HPF · BPF · 1st-order analog → IIR digital MethodLive math. Real poles. Real responses. AudienceEngineers who prefer the transfer function to the hand-wave.

The Problem of Separation

A filter is, at heart, a polite machine for ignoring. It selects a band of frequencies to pass, another to suppress — and its elegance lies entirely in how gracefully it draws that line.

Every filter answers the same question: given an input signal x(t) composed of many frequency components, how do we produce an output y(t) that keeps the ones we want and attenuates the rest? The ideal answer — a perfect brick-wall cut at cutoff frequency ωc — is physically unrealizable. It would require infinite memory and acausal behavior (a response before the cause). What we build instead are compromises, and the shape of that compromise is what distinguishes a Butterworth from a Chebyshev from a Bessel.

We characterize every filter through three coupled views:

|H(jω)|  ·  ∠H(jω)  ·  {poles, zeros}

The magnitude response |H(jω)| tells us how much each frequency is attenuated. The phase response ∠H(jω) tells us how much each frequency is delayed. The pole-zero plot encodes both, in the geometry of the complex plane. These three are not independent; they are three projections of the same object, the transfer function H(s).

The RC Low-Pass — First Principles

The humblest filter in electronics is a resistor feeding a capacitor. Apply Kirchhoff's voltage law, write the capacitor impedance as 1/(sC), and the voltage divider gives:

H(s) = Vout/Vin = 1 / (1 + sRC) = 1 / (1 + s/ωc)

with cutoff angular frequency ωc = 1/(RC), or equivalently fc = 1/(2πRC). At ω = ωc the magnitude is exactly 1/√2 ≈ −3.01 dB — the so-called half-power point, the universal definition of "cutoff" for a first-order filter. Above cutoff the response rolls off at −20 dB/decade (equivalently −6 dB/octave), which is the signature slope of every first-order system in the known universe.

Vin R Vout C
FIG. 1  ·  RC low-pass. τ = RC sets the time constant.

Tune R and C below. The three views respond together — Bode magnitude, phase, and step response — because they all follow from the same H(s). Note that at ωc the phase is exactly −45°; this is another universal signature of first-order systems.

Lab 01 · RC Low-Pass H(s) = 1 / (1 + sRC)
 
Bode — MagnitudedB vs log₁₀ f
Bode — Phasedeg
Step Responsevout vs t

The RC High-Pass — The Mirror Image

Swap the positions of R and C in the previous circuit and we obtain the mirror: the low-frequency components now see a capacitor blocking DC, while high frequencies sail through. The transfer function is

H(s) = sRC / (1 + sRC) = s / (s + ωc)

It has a zero at the origin — which is precisely what kills DC — and the same pole at s = −ωc as the low-pass. At DC, H(0) = 0. At infinity, H(∞) = 1. At cutoff, |H(jωc)| = 1/√2 and the phase is +45° (not −45°; the zero adds +90° of phase that the pole then partially subtracts).

Lab 02 · RC High-Pass H(s) = sRC / (1 + sRC)
 
Bode — MagnitudedB vs log₁₀ f
Bode — Phasedeg
Step Responsevout vs t

Band-Pass — Two Poles Meet a Zero

A true band-pass response is inherently second-order — it cannot be built from a single storage element. The classic realization is a series RLC circuit with output taken across the resistor:

H(s) = (s/Q·ω0) / (s² + s·ω0/Q + ω0²)

Two parameters describe the full behavior: the center frequency ω0 = 1/√(LC) and the quality factor Q = (1/R)·√(L/C). Q controls sharpness: high-Q gives a narrow, tall peak (selective, ringy); low-Q gives a broad, mellow peak. The bandwidth between the two −3 dB points is exactly BW = ω0/Q.

Why stack a first-order LPF with a first-order HPF?  That gives a broad band-pass with gentle skirts — perfectly respectable for separating two well-separated bands (DC blocking + anti-aliasing, for instance). But for a sharp band-pass around a specific ω0, cascaded first-orders never match an RLC of comparable Q. You need the complex-conjugate pole pair.

Lab 03 · RLC Band-Pass ω₀ = 1/√(LC), Q = (1/R)·√(L/C)
 
Bode — MagnitudedB vs log₁₀ f
Bode — Phasedeg
Pole-Zero (s-plane)Re · Im

From s-Plane to z-Plane — The Bilinear Transform

A digital filter is a difference equation: today's output is a weighted sum of recent inputs and recent outputs. The transfer function lives in the z-domain, where stability requires all poles to sit inside the unit circle |z| < 1 (rather than in the left half of the s-plane as for analog).

The most widely used bridge between the two worlds is the bilinear transform:

s ← (2/T) · (z − 1)/(z + 1)

where T = 1/fs is the sampling period. This conformal map sends the entire imaginary axis s = jω onto the unit circle z = e, and the entire left half-plane into the interior of the unit disk. Stability is preserved; no aliasing. The only cost is frequency warping: the analog frequency ω and the digital frequency Ω are related by

ω = (2/T) · tan(Ω/2)

which stretches as we approach Ω = π (the Nyquist frequency). Pre-warping the analog prototype at the target cutoff cancels this on a chosen point.

Applying the bilinear transform to our first-order low-pass H(s) = ωc/(s + ωc) and simplifying yields a first-order IIR:

y[n] = α · (x[n] + x[n−1]) + (1 − 2α/·) · y[n−1]

More cleanly written, with K = tan(π fc/fs):

H(z) = (K/(K+1)) · (1 + z⁻¹) / (1 − ((1−K)/(1+K)) z⁻¹)
Lab 04 · Digital First-Order IIR (Bilinear) LPF · via bilinear transform
 
Magnitude |H(e^jΩ)|dB vs log₁₀ f
Pole-Zero (z-plane)unit circle
Impulse Response h[n]samples

The Archetypes — Butterworth, Chebyshev, Elliptic, Bessel

At higher orders, filter design becomes an act of choosing your compromise. Flatness, roll-off, ripple, phase linearity — you cannot have all four. Each archetype is a different point on that trade-off surface.

Every archetype we discuss is a prototype low-pass: it defines a magnitude response |H(jω)|² as an explicit function of ω/ωc, from which the poles (and sometimes zeros) follow by algebra. High-pass, band-pass, and band-stop variants are obtained by frequency transformations.

FamilyMagnitude behaviourStrengthCost
ButterworthMaximally flat in passbandNo ripples anywhere; smooth phaseGentlest transition for a given order
Chebyshev IEquiripple in passband, monotonic stopbandSteeper roll-off than ButterworthPassband ripple; worse phase
Chebyshev IIMonotonic passband, equiripple stopbandFlat passband + steep skirtStopband doesn't go to −∞; phase worse
Elliptic (Cauer)Equiripple in bothSteepest transition for a given orderRipples on both sides; poorest phase
BesselMaximally flat group delayBest pulse fidelity, minimal overshootSlowest roll-off of the lot

The governing formulas

Each archetype is defined by a squared magnitude of the form |H(jω)|² = 1 / (1 + F(ω/ωc)), where the characteristic function F differs:

Butterworth:   F(x) = x2N
Chebyshev I:   F(x) = ε² · TN²(x)
Chebyshev II:  F(x) = 1 / (ε² · TN²(1/x))
Elliptic:      F(x) = ε² · RN²(x, L)
Bessel:   defined via maximally flat group delay

Here TN is the Chebyshev polynomial of the first kind, RN is the Chebyshev rational function (which requires Jacobi elliptic functions), ε controls ripple, and L controls the ratio between passband and stopband edges in the elliptic case.

Adjust order, ripple, and cutoff in the lab below. All five curves are computed directly from the analytical definitions — no pre-baked coefficients.

Lab 05 · The Archetypes Compared N  ·  ε  ·  ωc
Legend keys to colours below.
Magnitude ResponsedB vs normalised f
Phase Responsedeg
Group Delaysamples
Step Response (overlay)samples

A Word on IIR vs FIR

Everything we've called "Butterworth" or "Chebyshev" above is an Infinite Impulse Response (IIR) filter — its difference equation has feedback terms (y[n−k]), so its impulse response rings on forever (theoretically). Advantages: very efficient, low order gets you sharp responses. Disadvantages: nonlinear phase by default; potential for instability if poles wander outside the unit circle due to finite wordlength.

A Finite Impulse Response (FIR) filter has only feedforward terms; its impulse response terminates after N samples. Advantages: always stable, easy to make exactly linear phase (zero phase distortion), which matters for audio and control systems where waveform shape must be preserved. Disadvantage: to match an IIR's selectivity you typically need a much higher order — tens to hundreds of taps.

For embedded control engineers

First-order IIR low-pass filters — sometimes called "leaky integrators" or "exponential moving averages" — are ubiquitous in motor control: speed filtering, torque reference smoothing, current measurement de-noising. The single-coefficient form y[n] = α·x[n] + (1−α)·y[n−1] with α = T·ωc/(1 + T·ωc) (from impulse-invariant design) or α = K/(K+1) with K = tan(πfc/fs) (from bilinear) costs one multiply-add. For harmonic injection paths, where phase alignment with a carrier matters, the −45° phase lag at cutoff of a first-order IIR is a crucial consideration; the cutoff must be chosen high enough above the injection frequency that the phase error stays within budget.