Skip to content
Tutorials Center
My learning

Topics

Lesson 33 of 46 ยท Filters and Oscillators

Active filters: Sallen-Key and the meaning of Q

Design second-order active filters with the Sallen-Key circuit: natural frequency, quality factor Q, Butterworth and other responses, and higher orders by cascading.

A single RC filter rolls off gently at 20 dB per decade, which is often not sharp enough. To get steeper slopes you could cascade passive RC stages, but they load each other and never get sharper than a gentle bend. Passive filters with inductors can be sharp, but inductors are bulky, expensive and pick up hum. The solution of modern analog design is the active filter: resistors, capacitors and an op-amp. The op-amp buffers each stage so they do not interact, and with a little positive feedback it can create the sharp, resonant shapes that normally need inductors.

This lesson introduces the most popular active filter, the Sallen-Key second-order stage, and the single number that decides its character: the quality factor, Q.

A Sallen-Key low-pass circuit with two resistors, two capacitors and a unity-gain buffer, beside response curves for Q = 0.5, 0.707 and 2
Q controls the shape near the cutoff: low Q rolls off early, high Q peaks.

What you will learn

  • Describe a second-order filter by its natural frequency f0 and quality factor Q.
  • Design a unity-gain Sallen-Key low-pass filter for a Butterworth response.
  • Compare Butterworth, Bessel and peaking responses and their step behaviour.
  • Build higher-order filters by cascading second-order sections.

Key terms

Second-order filter: a filter with two poles, rolling off at 40 dB per decade.

Natural frequency (f0): the frequency set by the component values; for the low-pass it is close to the -3 dB point when Q = 0.707.

Quality factor (Q): how sharply the response peaks or how lightly damped the filter is; related to the damping ratio ฮถ = 1 / (2Q).

Butterworth response: the "maximally flat" response, Q = 0.707, with no peak in the passband.

Overshoot: how far the step response rises above its final value.

The second-order low-pass

The general second-order low-pass transfer function is

Text
H(s) = K ยท ฯ‰0ยฒ / (sยฒ + (ฯ‰0 / Q) ยท s + ฯ‰0ยฒ)     with ฯ‰0 = 2ฯ€ f0

The magnitude at f0 equals K ยท Q. If Q < 0.707 the response bends early and smoothly; at Q = 0.707 it is maximally flat; above 0.707 it develops a peak near f0 of height about Q and the step response overshoots. At very high frequencies, whatever Q, the slope is -40 dB per decade.

The Sallen-Key circuit

In the unity-gain Sallen-Key low-pass (see the picture), the op-amp is a voltage follower. R1 and R2 are in series from the input to the + pin; C2 goes from the + pin to ground, and C1 returns from the junction of R1 and R2 to the output. That return path is positive feedback at high frequencies and creates the peaking. Solving the circuit gives

Text
H(s) = 1 / (R1ยทR2ยทC1ยทC2 ยท sยฒ  +  C2ยท(R1 + R2) ยท s  +  1)

f0 = 1 / (2ฯ€ โˆš(R1 R2 C1 C2))
Q  = โˆš(R1 R2 C1 C2) / (C2 (R1 + R2))

For the common choice R1 = R2 = R, this simplifies to

Text
f0 = 1 / (2ฯ€ R โˆš(C1 C2))      Q = ยฝ ยท โˆš(C1 / C2)

So Q is set by the capacitor ratio. For Q = 0.707 you need C1 / C2 = 2: the feedback capacitor is twice the grounded one.

Worked design: a 1 kHz Butterworth low-pass

  1. Pick R = 10 kฮฉ.
  2. For a Butterworth response, C1 = 2 C2, and f0 = 1 / (2ฯ€ R C2 โˆš2). With f0 = 1 kHz: C2 = 1 / (2ฯ€ ร— 1000 ร— 10,000 ร— 1.414) = 11.25 nF, C1 = 22.5 nF.
  3. Use standard values C2 = 10 nF, C1 = 22 nF. Then f0 = 1073 Hz and Q = 0.742: a response close enough to Butterworth for most uses.

Slightly different standard values give slightly different results; that is normal, and the demo below checks it.

Gain greater than 1

If the op-amp has a gain K = 1 + Rf/Rg (non-inverting), the equal-component filter has Q = 1 / (3 - K). K = 1.586 yields Q = 0.707 (Butterworth) without capacitor ratios, and K = 3 makes Q infinite: oscillation. This is why Sallen-Key designs with high gain become sensitive to component tolerance.

Choosing the response

Response Q (2nd order) Character
Bessel 0.577 Best step response and phase linearity, gentle slope
Butterworth 0.707 Flat passband, moderate slope; the usual default
Chebyshev (1 dB ripple) 0.96 Steeper cutoff, ripple in the passband
Peaking (Q = 2) 2 Strong peak near f0; useful for tone shaping

The step response also changes. The overshoot of a second-order low-pass is exp(-ฯ€ ฮถ / โˆš(1 - ฮถยฒ)): 0% for Q = 0.5 (critical damping), 4.3% for Butterworth, and 44% for Q = 2. Audio and anti-aliasing filters usually take Butterworth or Bessel; measurement systems that care about pulse shape take Bessel.

Higher orders and other types

For a fourth-order Butterworth, cascade two second-order stages with different Q values: 0.541 and 1.307. A sixth-order uses 0.518, 0.707 and 1.932. Each stage is a Sallen-Key (or similar) section. A high-pass version swaps resistors and capacitors in the same circuit; a band-pass can be built with a multiple-feedback (MFB) circuit; and a notch removes one frequency, such as 50 or 60 Hz mains hum.

Common misconceptions

"Higher Q is always better." High Q gives a sharper transition but also a peak and ringing. For a plain "remove the noise" job, Q around 0.707 is usually best.

"Any resistors and capacitors will do if their product is right." Q depends on the ratio of the capacitors (or on the gain), not just on f0. The same f0 with the wrong ratio gives a different shape.

"Active filters never lose signal." They have gain stages, but their output swing, noise and bandwidth are bounded by the op-amp; the op-amp's GBW must be well above f0 ร— Q.

Try it

The first example computes the response of the real component values from the worked design using the exact transfer function and compares it with an ideal Butterworth curve. It is a numerical model of the ideal op-amp circuit.

Python Check the Sallen-Key design

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The second example compares step responses for three values of Q using scipy.signal. It prints the measured overshoot and compares it with the formula.

Python Step response and overshoot

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The third example is an interactive Q explorer. Slide Q and watch the magnitude response of the second-order low-pass change shape.

Q explorer

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. For a unity-gain Sallen-Key low-pass with equal resistors, what sets Q?

    With R1 = R2, Q = 0.5 โˆš(C1/C2); for Butterworth Q = 0.707, so C1 = 2 C2.
  2. 2. What is the gain of a second-order low-pass at f0 when Q = 2 and the DC gain is 1?

    The magnitude at f0 equals K ร— Q = 2, or +6 dB.
  3. 3. Which response gives no passband peak and the flattest gain?

    Butterworth (Q = 0.707) is the maximally flat response.
  4. 4. How steeply does a second-order filter roll off far above f0?

    Two poles give 40 dB per decade.
  5. 5. How can you build a sharper fourth-order Butterworth filter?

    A fourth-order Butterworth needs two sections with different Q values.

Summary

  • A second-order low-pass is described by f0 and Q; far above f0 it falls at 40 dB per decade.
  • Unity-gain Sallen-Key: f0 = 1 / (2ฯ€ โˆš(R1R2C1C2)) and Q = โˆš(R1R2C1C2) / (C2(R1+R2)); equal resistors give Q = ยฝ โˆš(C1/C2).
  • Butterworth Q = 0.707 is flat; Bessel 0.577 rings least; high Q peaks and overshoots.
  • Higher-order filters cascade second-order sections with different Qs.

Next: Oscillators