Active Filters: Sallen-Key and Multiple-Feedback
A sensor's signal must be cleaned up before an ADC samples it at : everything above about should be attenuated, and fast. A first-order RC falls at only (First-Order Filters). A passive second-order RLC (Second-Order Passive Filters) is steeper, but at its inductor would be large, lossy and a magnet for hum, and the filter's response would change with every load. An op-amp, two resistors and two capacitors give the same second-order response with no inductor, a buffered output and the option of gain. These active filters are the building blocks of every higher-order filter (Filter Design). This lesson covers the two classic topologies, Sallen-Key and multiple-feedback, how to design them, and how sensitive they are to component tolerances.
The second-order target
Every second-order low-pass section has the form
is the DC gain, the natural frequency and the quality factor (). is two coincident real poles, is the maximally flat Butterworth response, which is exactly at , and higher gives a peak near . Above the response falls at . The high-pass and band-pass forms have or in the numerator (Resonance, Q and Bandwidth).
Sallen-Key (unity gain)
Two resistors in series lead to the non-inverting input of a follower; goes from that input to ground, and from the junction of the resistors back to the output. Nodal analysis (Node-Voltage Analysis) with gives
With equal resistors, : the capacitor ratio alone sets , and a Butterworth section needs . How does it reach a above with only RC parts? The feedback capacitor is driven by the output, which near is in phase with ; it pumps a little of the output back into the junction node, which a passive RC ladder cannot do.
High-pass: swap every R with a C. With equal capacitors, (here is the resistor to the output and the one to ground), so Butterworth needs .
Strengths: non-inverting, low component spread, the op-amp works as a follower (noise gain 1, the most bandwidth). Weaknesses: its stop-band does not keep falling for ever. At high frequency couples the input straight to the output node, and the op-amp's rising output impedance lets it through, so a real Sallen-Key low-pass "floors" at to somewhere in the megahertz range.
Gain other than 1: add a gain in the feedback. The equal-component version then has , simple but very sensitive: near a 1 % change in changes by a lot, and at it oscillates.
Multiple-feedback (MFB) low-pass
The MFB circuit is built around an inverting amplifier, with two feedback paths ( and ) from the output. Solving the two nodes gives
so , and (an equivalent form). With all three resistors equal, : Butterworth needs . The MFB's stop-band keeps falling (no feed-through path to the output), it inverts, and it has gain built in.
MFB band-pass (input , to ground, two capacitors , feedback ): , , centre gain . Changing alone tunes without changing the gain.
Sensitivity
The sensitivity says how many percent moves per percent change of component . For the unity-gain Sallen-Key low-pass every sensitivity is or smaller: a 5 % capacitor moves by at most about 2.5 %. That robustness is why unity-gain Sallen-Key and MFB are the default choices, while the equal-component Sallen-Key with gain is used only at low .
Worked example: a 1 kHz Butterworth low-pass
Given: unity-gain Sallen-Key, , (two in parallel), equal resistors, target .
Find: (E24), the actual and , and the attenuation at .
Solve:
Check: a Butterworth filter is at , so the corner is ; one decade above it the response is down almost , twice the slope of an RC.
In Python: design and tolerance spread
import numpy as np
from scipy import signal
def sk_lp(R1, R2, C1, C2):
w0 = 1 / np.sqrt(R1 * R2 * C1 * C2)
Q = np.sqrt(R1 * R2 * C1 * C2) / (C2 * (R1 + R2))
return w0 / (2 * np.pi), Q
f0, Q = sk_lp(11e3, 11e3, 20e-9, 10e-9)
w0 = 2 * np.pi * f0
w, h = signal.freqs([w0**2], [1, w0 / Q, w0**2], worN=2 * np.pi * np.array([100, f0, 1e4]))
print(f"Sallen-Key: f0 = {f0:.1f} Hz, Q = {Q:.4f}")
print("dB at 100 Hz, f0, 10 kHz:", [round(float(x), 2) + 0.0 for x in 20 * np.log10(abs(h))])
# MFB low-pass, all R equal: Q = sqrt(C1/C2)/3
R, C1, C2 = 16e3, 22e-9, 4.7e-9
f0m = 1 / (2 * np.pi * R * np.sqrt(C1 * C2))
print(f"MFB: f0 = {f0m:.1f} Hz, Q = {np.sqrt(C1 / C2) / 3:.4f}, gain = -1")
# Monte Carlo: 1 % resistors, 5 % capacitors (uniform)
rng = np.random.default_rng(7)
n = 20000
r = 11e3 * (1 + rng.uniform(-0.01, 0.01, (n, 2)))
c = np.array([20e-9, 10e-9]) * (1 + rng.uniform(-0.05, 0.05, (n, 2)))
fs, Qs = sk_lp(r[:, 0], r[:, 1], c[:, 0], c[:, 1])
print(f"f0 spread: {np.percentile(fs, 1):.0f} to {np.percentile(fs, 99):.0f} Hz (1st-99th percentile)")
print(f"Q spread: {np.percentile(Qs, 1):.3f} to {np.percentile(Qs, 99):.3f}")Sallen-Key: f0 = 1023.1 Hz, Q = 0.7071
dB at 100 Hz, f0, 10 kHz: [0.0, -3.01, -39.6]
MFB: f0 = 978.2 Hz, Q = 0.7212, gain = -1
f0 spread: 980 to 1071 Hz (1st-99th percentile)
Q spread: 0.677 to 0.738
With 5 % capacitors the corner wanders by several percent, but stays within a few percent of , as the sensitivities promise.
Cross-check with SPICE
The deck builds the worked example around the op-amp macro-model written for this course (GBW ), sweeps to , and measures the pass-band gain, the corner and the stop-band.
cat > sk.cir <<'EOF'
* unity-gain Sallen-Key low-pass, f0 = 1.02 kHz, Q = 0.707
.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
R1 in a 11k
R2 a p 11k
C1 a out 20n
C2 p 0 10n
X1 p out out OA
.control
ac dec 100 10 1meg
meas ac g100 find vdb(out) at=100
meas ac f3db when vdb(out)=-3.0103 fall=1
meas ac g10k find vdb(out) at=10k
meas ac g100k find vdb(out) at=100k
.endc
.end
EOF
ngspice -b sk.cir 2>&1 | grep -E '^(g1|f3)'g100 = -3.660066e-04
f3db = 1.023061e+03
g10k = -3.961695e+01
g100k = -7.965928e+01
The corner lands at and the gain at is , as calculated, then at . The macro-model has zero output resistance, so it does not show the stop-band floor of a real Sallen-Key; add Ro of in series with E1's output and the floor appears.
Interactive: change the capacitor ratio
The filter of the worked example with the op-amp as a follower E1 out 0 p out 100k (gain , no bandwidth limit: ee-netlist has no op-amp element). The probes are the output and the junction node a.
At the lab shows at : just below the corner, where a second-order low-pass has a phase of . Raise to () and a peak appears in the response near ; lower it to () and the knee becomes soft.
Guided lab: build and sweep the filter
Hand calculation. , there, phase at , at .
Simulation. The Python run, the SPICE deck and the lab.
What you would measure. Use 1 % resistors and C0G or film capacitors (avoid high-K ceramics, whose value changes with voltage), a general-purpose op-amp on a current-limited split supply ( limit), decoupling. Drive peak from the generator and step the frequency through , , , , , , reading the output amplitude and the phase on a two-channel scope. Expect the point (output ) within about of with 5 % capacitors, and the phase crossing at the same frequency. At the output is about peak, near the scope's noise floor: average the trace or use the scope's FFT. A scope with a "Bode" function or a network analyser makes the sweep automatic.
Hazards and safe setup. Low-voltage current-limited supply; generator output within the rails.
Pitfalls
- High-K ceramic capacitors in the frequency-setting positions. Their capacitance can drop by half with DC bias and temperature; and move with them.
- Forgetting the source resistance. It adds to and shifts both and ; drive the filter from a low-impedance stage.
- Too slow an op-amp. Choose GBW at least for a well-behaved Sallen-Key; slower parts shift upwards.
- Expecting a Sallen-Key low-pass to reject megahertz interference. Its stop-band floors; add a passive RC after it if RF matters.
Practice
- Design a unity-gain Sallen-Key high-pass at , Butterworth, with .
- An MFB low-pass has , , . Find and .
- In an equal-component Sallen-Key with gain, what gain gives ?
Answer
- with : , ; .
- ; .
- .
Test yourself
A unity-gain Sallen-Key low-pass with equal resistors needs which capacitor ratio for a Butterworth response?
Far above , an ideal second-order low-pass falls at…
What is a practical advantage of the MFB low-pass over the Sallen-Key low-pass?
- It does not invert
- Its stop-band keeps falling, without the high-frequency feed-through floor
- It needs no capacitors
- It has a noise gain of 1
A sensitivity means a 4 % increase of changes by about…
- 0.5 %
- 2 %
- 4 %
- 8 %