C4 · Lesson 26 · Butterworth design lab
From an order and a corner to poles, a response and capacitor values
Filter design software takes a specification and returns component values, and the steps in between aren't mysterious. A Butterworth filter's poles sit evenly spaced on a semicircle; the response follows from the poles by multiplying distances (lesson 18); and each pair of poles becomes one second-order active stage whose Q is set by the pair's angle. In this lab you'll write each of those steps in NumPy and end with the capacitor values for a cascade of Sallen-Key stages.
- A fourth-order Butterworth filter's poles on the s-plane (in units where is the slider's radius): four of them, spaced evenly on a semicircle in the left half-plane, 45° apart.
- Higher orders put more poles on the same semicircle, so the ones at the ends crowd closer to the axis, with higher Q.
- Each conjugate pair becomes one second-order stage, with where θ is the pair's angle from the negative real axis.
Predict
The poles of a fourth-order Butterworth filter come in two conjugate pairs. What Q does the pair nearer the axis have?
About 1.31. The four poles sit at 112.5°, 157.5°, 202.5° and 247.5°; the pair at ±112.5° is 67.5° from the negative real axis, so . The other pair has Q = 0.54. Cascading the two stages gives the flat fourth-order response; neither stage alone is Butterworth.
Name it
The poles
An order- Butterworth low-pass with corner has its poles at
evenly spaced on the left half of a circle of radius . Odd orders have one real pole at .
The response
With unity DC gain,
so in NumPy, start with an array of ones and multiply in one factor per pole. At every Butterworth filter is down exactly 3 dB.
Stages
Pair each pole with its conjugate. A pair at distance from the origin and angle θ from the negative real axis is a second-order section with
For a Butterworth filter every . With the unity-gain, equal-resistor Sallen-Key stage (lesson 13), and , so
A real pole, for odd orders, is a plain RC section.
Worked example
Find the stage capacitors for a fourth-order Butterworth low-pass at 1 kHz with R = 10 kΩ.
Show the solution
- Scale factor.
- Stage with Q = 0.541.
- Stage with Q = 1.307.
Answer 17.2 nF and 14.7 nF for the Q = 0.541 stage, and 41.6 nF and 6.09 nF for the Q = 1.307 stage.
Worked example
How far down is that fourth-order filter at 10 kHz?
Show the solution
- Attenuation at 10 kHz.
- Check with the pole product. The pole product gives exactly that too: 80 dB per decade, a decade above the corner.
Answer 80 dB down.
Check
At what angle (measured from the positive real axis) is pole k = 1 of an order-4 Butterworth filter?
Check
What is the highest stage Q in an order-4 Butterworth filter?
Check
An equal-resistor unity-gain Sallen-Key stage needs Q = 0.707 at 1 kHz with R = 10 kΩ. What is ?
Write units the way you normally would: 1.5 nF, 1500 pF and 0.0015 µF are the same answer.
Check
For the same stage (Q = 1.307, 1 kHz, R = 10 kΩ), what is ?
Write units the way you normally would: 1.5 nF, 1500 pF and 0.0015 µF are the same answer.
Check
Write butter_poles(n, wc) returning the n complex poles of a Butterworth low-pass with corner wc (rad/s), and response(poles, f) returning the complex at the frequencies f (Hz, an array), with unity DC gain.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Write sallen_key(n, fc, R) for even n: return a list of (C1, C2) pairs in farads, one per equal-resistor unity-gain Sallen-Key stage, in order of increasing Q.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Explain why
Why can't a fourth-order Butterworth filter be made by cascading two second-order Butterworth stages?
A second-order Butterworth stage has its two poles at ±45° from the negative real axis, Q = 0.707. Cascading two of them puts four poles at those same two angles. A fourth-order Butterworth needs its four poles spread evenly around the semicircle, at 22.5° and 67.5° from the axis, which means one stage of low Q and one of higher Q. With the poles doubled up at 45°, the response is −6 dB at the corner and droops before it, not the maximally flat shape.
Practice
Keep practicing
7 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.