Filter Design: Butterworth, Bessel and Chebyshev
An anti-alias filter in front of a ADC must pass to and attenuate everything above the Nyquist frequency of by at least (with some margin: at ). One second-order section gives about at : not enough. How many poles do you need, where should they go, and what does the choice do to a pulse that passes through the filter? Those are the questions of filter approximation. The answer is a short menu of classic responses, each a recipe for pole positions, which you then build as a cascade of the second-order sections of Active Filters. This lesson compares the families, finds the order from a specification, splits a fourth-order design into two Sallen-Key sections, and checks the result in Python and SPICE. The digital counterparts (IIR design by bilinear transform) are in Signals, Systems and Digital Filters.
The families
All of them are all-pole low-pass prototypes, normalised to a corner of and scaled to any afterwards:
| Family | Pass band | Transition | Step response | Poles |
|---|---|---|---|---|
| Butterworth | maximally flat, at | medium, eventually | about 11 % overshoot at order 4 | on a circle |
| Chebyshev type I | equal ripple (e.g. ) | steepest of the all-pole filters | more overshoot and ringing | on an ellipse, close to the axis |
| Bessel (Thomson) | gently drooping | slowest | almost no overshoot: maximally flat group delay | further left, spread in frequency |
| Elliptic (Cauer) | ripple in pass and stop band | steepest of all, for a given order | rings | adds zeros on the axis (notches), so the sections need notch topologies |
Group delay is the time each frequency component is delayed. If it is constant across the pass band, a pulse comes out delayed but undistorted: that is the Bessel filter's virtue, important for pulses, audio crossovers and data. A Chebyshev filter's delay peaks near the band edge, so components there arrive late and the step rings.
Order from a specification
For a Butterworth low-pass with at most dB of loss at and at least dB at :
For at and at : , so . scipy.signal.buttord and cheb1ord do the same; a 1 dB-ripple Chebyshev meets the spec at order 3. A Bessel filter, with its slow transition, needs a higher order or a lower corner.
From poles to sections
A Butterworth filter of order has its poles evenly spaced on the left half of the unit circle, at angles from the negative real axis:
For : and , so the two sections both have and and . Neither section alone is Butterworth; only their product is maximally flat: the low- section's droop near is filled in by the high- section's peak. For Chebyshev and Bessel the sections also have different , read from the pole magnitudes.
Cascading. Each section is buffered by its op-amp, so the sections do not load each other and the transfer functions multiply. A common order is the lowest first, so the high- section's peak does not clip a signal that still carries large out-of-band components; for low noise the order can be reversed. Odd orders add a first-order RC (buffered) or a three-pole section.
Worked example: a fourth-order Butterworth at 1 kHz
Given: , two unity-gain Sallen-Key sections with equal resistors, in both, capacitors from the E12 series.
Find: and for each section, the actual and , and the attenuation at .
Solve: with equal resistors , so :
Check: both sections land 2 to 3 % below because the E24 resistors were rounded up; the cascade's point follows, at about (computed below). At the ideal fourth-order Butterworth gives , comfortably past the target.
In Python: compare the families
import numpy as np
from scipy import signal
fc = 1e3
print("order for -3 dB at 1 kHz (Chebyshev: 1 dB ripple edge), >= 40 dB at 4 kHz:")
print(" Butterworth", signal.buttord(2*np.pi*fc, 2*np.pi*4e3, 3, 40, analog=True)[0],
" Chebyshev 1 dB", signal.cheb1ord(2*np.pi*fc, 2*np.pi*4e3, 1, 40, analog=True)[0])
protos = {"Butterworth": signal.buttap(4), "Chebyshev 1dB": signal.cheb1ap(4, 1),
"Bessel": signal.besselap(4, norm="mag")}
print("4th order, scaled to -3 dB at 1 kHz:")
print(" family A(4k) dB overshoot % delay(0) us delay(1k) us sections f0 (Hz)/Q")
for name, (z, p, k) in protos.items():
b, a = signal.zpk2tf(z, p, k)
w = np.logspace(-2, 2, 40001)
_, h = signal.freqs(b, a, w)
w3 = w[np.argmax(20 * np.log10(abs(h)) < -3.0103)]
p, k = p / w3, k / w3**4 # now -3 dB at 1 rad/s
b, a = signal.zpk2tf([], p, k)
_, h4 = signal.freqs(b, a, [4.0])
t, y = signal.step((b, a), T=np.linspace(0, 40, 20001))
over = 100 * (y.max() / y[-1] - 1)
wd = np.array([1e-3, 2e-3, 0.999, 1.0])
_, hd = signal.freqs(b, a, wd)
ph = np.unwrap(np.angle(hd))
scale = 1 / (2 * np.pi * fc) # 1 rad/s -> 1 kHz
d0 = -(ph[1] - ph[0]) / (wd[1] - wd[0]) * scale
d1 = -(ph[3] - ph[2]) / (wd[3] - wd[2]) * scale
secs = sorted(((abs(q) * fc, abs(q) / (-2 * q.real)) for q in p if q.imag > 0), key=lambda x: x[1])
st = ", ".join(f"{float(f0):.0f}/{float(Q):.3f}" for f0, Q in secs)
print(f" {name:14s} {20*np.log10(abs(h4[0])):8.1f} {over:11.1f} {d0*1e6:12.0f} {d1*1e6:13.0f} {st}")order for -3 dB at 1 kHz (Chebyshev: 1 dB ripple edge), >= 40 dB at 4 kHz:
Butterworth 4 Chebyshev 1 dB 3
4th order, scaled to -3 dB at 1 kHz:
family A(4k) dB overshoot % delay(0) us delay(1k) us sections f0 (Hz)/Q
Butterworth -48.2 10.8 416 588 1000/0.541, 1000/1.307
Chebyshev 1dB -61.7 21.7 452 1101 502/0.785, 943/3.559
Bessel -34.4 0.8 337 330 1430/0.522, 1603/0.806
The table is the whole trade-off: the Chebyshev filter attenuates most at but overshoots by a fifth and its delay at the band edge is more than twice its DC delay; the Bessel filter barely overshoots and delays every frequency by the same , but gives only at . The section columns are the and to build.
In Python: the E-series design as built
import numpy as np
from scipy import signal
def sk(R, C1, C2):
return 1 / (R * np.sqrt(C1 * C2)), np.sqrt(C1 / C2) / 2
num, den = [1.0], [1.0]
for name, R, C1, C2 in [("A", 15e3, 12e-9, 10e-9), ("B", 6.2e3, 68e-9, 10e-9)]:
w0, Q = sk(R, C1, C2)
print(f"section {name}: R = {R/1e3:.1f}k, C1 = {C1*1e9:.0f}n: f0 = {w0/2/np.pi:.1f} Hz, Q = {Q:.4f}")
num, den = np.polymul(num, [w0**2]), np.polymul(den, [1, w0 / Q, w0**2])
f = np.linspace(100, 10e3, 99001)
_, h = signal.freqs(num, den, 2 * np.pi * f)
db = 20 * np.log10(abs(h))
print(f"-3 dB at {f[np.argmax(db < -3.0103)]:.0f} Hz, peak {db.max():.3f} dB,"
f" at 4 kHz {db[np.argmin(abs(f - 4e3))]:.1f} dB")section A: R = 15.0k, C1 = 12n: f0 = 968.6 Hz, Q = 0.5477
section B: R = 6.2k, C1 = 68n: f0 = 984.4 Hz, Q = 1.3038
-3 dB at 981 Hz, peak 0.010 dB, at 4 kHz -49.0 dB
Cross-check with SPICE
The two sections in cascade, each around the op-amp macro-model written for this course (, enough for by a wide margin).
cat > bw4.cir <<'EOF'
* 4th-order Butterworth low-pass, 1 kHz: two unity-gain Sallen-Key sections
.subckt OA inp inn out
G1 0 n1 inp inn 1m
R1 n1 0 100meg
C1 n1 0 159.2p
E1 out 0 n1 0 1
.ends
Vin in 0 AC 1
* section A, Q = 0.548
R1 in a1 15k
R2 a1 p1 15k
C1 a1 o1 12n
C2 p1 0 10n
X1 p1 o1 o1 OA
* section B, Q = 1.304
R3 o1 a2 6.2k
R4 a2 p2 6.2k
C3 a2 out 68n
C4 p2 0 10n
X2 p2 out out OA
.control
ac dec 200 100 100k
meas ac f3db when vdb(out)=-3.0103 fall=1
meas ac pk max vdb(out)
meas ac a4k find vdb(out) at=4k
meas ac b1k find vdb(o1) at=1k
.endc
.end
EOF
ngspice -b bw4.cir 2>&1 | grep -E '^(f3db|pk|a4k|b1k)'f3db = 9.811737e+02
pk = 1.433841e-02 at= 3.758374e+02
a4k = -4.899287e+01
b1k = -5.511662e+00
SPICE agrees with the Python model of the built values: corner , a pass band flat within , at . Section A alone is already at ; section B's peak lifts it back.
Interactive: two sections, one response
The cascade with the op-amps as followers E1, E2 (gain , no bandwidth limit, since ee-netlist has no op-amp element). Compare o1, the output of the low- section, with out.
At the lab shows (section A droops) but , just past the point; at the output is , .
Guided lab: anti-alias filter and step response
Hand calculation. As in the worked example; ideal fourth-order Butterworth: at , at , 11 % overshoot on a step.
Simulation. Both Python runs, the SPICE deck and the lab.
What you would measure. Build the two sections with a dual op-amp on a current-limited split supply ( limit), 1 % resistors, 5 % C0G or film capacitors, decoupling. Sweep with a peak sine: expect the corner within about of and the pass band within about of flat (capacitor tolerance shifts the two sections' ). At the output is a few millivolts: use the scope's averaging or FFT. Then drive a square wave of and look at the output edges: about 11 % overshoot ( on a step) with a ring at about . Replace the capacitors to make a Bessel filter (sections and , and ) and the overshoot nearly disappears.
Hazards and safe setup. Low-voltage current-limited supply; generator output within the rails.
Pitfalls
- Building each section with the overall and . Two Butterworth second-order sections in cascade are not a fourth-order Butterworth: the corner drops and the knee softens.
- Using Chebyshev for pulses. Its ringing and delay distortion corrupt edges; use Bessel (or Butterworth as a compromise).
- Forgetting the Chebyshev normalisation. Tables and
cheb1apput the ripple edge, not the point, at . - High- sections with slow op-amps or loose capacitors. The sensitivity of the response near grows with ; a Chebyshev section needs good parts.
Practice
- How many Butterworth poles are needed for at most loss at and at least at ?
- Give the section values of a sixth-order Butterworth filter.
- A data link needs the least pulse distortion and can accept a slow roll-off. Which family?
Answer
- , so .
- : .
- Bessel: flat group delay, almost no overshoot.
Test yourself
Which filter family has the flattest group delay in the pass band?
- Chebyshev
- Butterworth
- Bessel
- Elliptic
A fourth-order Butterworth low-pass is built from two second-order sections. Their values are…
- and
- and
- and
- and
Far above the cut-off, an th-order all-pole low-pass falls at…
For the same order, a 1 dB Chebyshev filter compared with a Butterworth filter has…
- a flatter pass band and slower roll-off
- pass-band ripple, a steeper transition and more step overshoot
- no overshoot
- zeros in the stop band