# Design second- and third-order Sallen-Key filters with one op amp

Christopher Paul, Motorola -January 31, 2011

RP Sallen and EL Key of the Massachusetts Institute of Technology’s Lincoln Laboratory in 1955 introduced the Sallen-Key analog filter topology. Engineering literature extensively discusses the second-order section that creates two filter poles (Figure 1 and references 1 to 4). You can also make a third-order filter using two op amps (Figure 2). For filter gains of one or two, you can make a third-order filter with one op amp (Figure 3). Such a configuration has been addressed in a limited manner for op amp gains of 1 and 2 (references 5 and 7). Unity-gain filters have low sensitivities to component values, but they can require large ratios of capacitor values. Gain-of-two filters allow capacitors of similar or identical values, but generally are much more sensitive.

Using the following design procedure, you can convert sets of two or three poles into single op-amp filters. The procedure does not place undue restrictions on op-amp gains or component values. You can select standard-value capacitors and resistors and then calculate the remaining resistor values from filter specifications. The procedure produces designs with both low sensitivities and moderate ranges of user-specified capacitor values. A figure of merit compares filter sensitivities. The tendency of the filters to oscillate can be assessed. The procedure also demonstrates the superiority of third-order-filter stopband-leakage characteristics compared with those of second-order filters. You can perform the associated calculations for this procedure in this Excel spreadsheet.

Second-order section design

You first use Equation 1 to determine the transfer function for the second-order section to start the design procedure:

You then select standard-value capacitors. If you use capacitor values that are too large, the capacitors will be expensive or will occupy excessive space. If the values are too small, the PCB’s (printed-circuit-board’s) and op amp’s parasitic capacitances will affect the filter’s response.

In Equation 1, the denominator is (s−p2)×(s−p3), where p2 and p3 are the real-valued and often complex filter poles. By equating the denominator coefficients in s of Equation 1 with those in the expression containing p2 and p3, you can write an equivalence for a term you define as B and then solve for AMIN, the minimum op-amp gain for the filter, as equations 2 and 3 show.

You then choose the values of RF and RG that will keep the gain above AMIN, as Equation 4 shows.

You then create equivalences for terms you define as D and E, as equations 5 and 6 show.

This approach lets you conveniently write equations 7 through 10, which define two sets of the two resistor values.

Resistor values R1A and R2A yield one solution, and R1B and R2B define another. You now choose the nearest standard-value resistors for R1 and R2. The resistor tolerances should be 1% or better, and capacitor tolerances should be 2% or better. When RF×C2>RG×C3, the second pair of values will be negative and will constitute an unusable solution.

Third-order section design

Closed-form solutions for third-order filter sections do not exist. However, you can employ numerical techniques to achieve suitable results. Once again, you start with a derivation of the filter-transfer function, as Equation 11 shows:

You define the B terms with three equivalences, as equations 12 through 14 show.

You can express the denominator as (s−p1)×(s−p2)×(s−p3), where p1, p2 and p3 are the poles of the filter you are designing. You can then equate appropriate coefficients of powers of s to b0, b1, and b2. By solving Equation 14 for r1 and substituting into equations 12 and 13, you get equations 15 and 16:

The K terms in these two equations are defined in equations 17 through 23.

Note that Equation 15 has a degenerate form when K equals zero. This form allows you to generate four equivalences based on the value of K by solving for r2 in equations 15 and 16, as equations 24 and 25 show:

You can now choose values for the capacitors and for resistors RF and RG and evaluate the K's in equations 17 through 23. Equating equations 24 and 25 and solving for r2 gives sets of values for r2 and r3. You can then easily rearrange Equation 14 to solve for r1. One straightforward way to find solutions is to iterate r3 from values of 10Ω to 1 MΩ in a spreadsheet, subtracting expressions for r2α from those for r2β in ranges in which both have positive real values. If successive subtractions have opposing signs, then a solution lies between them.

In searching for solutions, it is sometimes helpful to graph equations 24 and 25. One, many, or no solutions are possible. If there are no curve intersections, the graphs can show whether a new set of values moves the curves closer to or farther from one. The graph can show cases that find a single solution (Figure 4). If you just make arbitrary selections for the capacitors and for resistors RF and RG, you will generally not make a successful design. The sample-filter-design section of this article provides guidance for value selections.

Stability of the second-order section

As with any active circuit, oscillation will occur if the zero-phase-shift frequency loop gain exceeds unity. Accordingly, you must calculate that gain. First, break the connection between C2 and the op-amp output of Figure 1. Then, connect a voltage source, VI to C2. You ground the filter input at R2 because the source driving the filter must have zero impedance if the filter is to function as you design it. Using an op-amp output voltage that you define as VO, you can calculate the transfer function VO/VI using Equation 26.

Because the zero-phase-shift frequency occurs when s2=−1/(R2×R3×C2×C3), you can solve for the loop gain under that condition using Equation 27.

You then use Equation 28 to convert the expression to negative decibels to obtain the gain margin.

If the result is positive, the circuit will be stable, whereas negative results predict instability. You should evaluate Equation 28 with its components at the tolerance extremes that would lead to the highest possible gains, meaning that you should use the largest possible values for C2, R2, and RF and the smallest for C3, R3, and RG.

Stability of the third-order section

You use the same procedure to evaluate the stability of a third-order loop. You break the connection between C2 and the op-amp output and then ground the filter input at R1. You then use Equation 29 to determine the transfer function between the disconnected side of C2 and the op amp’s output.

This form of the equation tells you that you should choose R1, R2, C2, and RF at the highest points within their tolerance ranges to maximize gain. Similarly, you should choose C1, R3, C3, and RG at the lowest points. This rule applies to equations 29 through 38. Equation 30 rearranges Equation 29 in the standard form to find the gain at the zero-phase-shift frequency, s0.

This equation uses the equivalences you define for the n and d terms in equations 31 through 35.

When the phase shift is zero, the arctangent of the ratio of the imaginary to the real parts of the numerator of Equation 30 must equal that of the denominator, which means that the ratios themselves must be equal:

Imaginary solutions to Equation 36 exist at ±s0:

You can use Equation 38 to convert to negative decibels to get the gain margin from Equation 29.

As with the second-order stability analysis, positive values indicate stability, and negative values predict instability.

Sensitivity

A low-sensitivity-filter design is immune to component variations due to manufacturing tolerances. Filter parameters such as gain and phase shift are sensitive to component tolerances, and so production-line filters will have somewhat differing characteristics. You use sensitivity analysis to prevent these differences from becoming unacceptable. You can define the sensitivity of some filter function F(x) to a component value, x, using Equation 39.

The partial derivative appears because F(x) is also a function of variables other than x. The other terms effectively normalize the sensitivity parameter. It is more intuitive to replace the differentials with small differences and then rewrite the equation (Equation 40).

You can now see that, when you multiply the sensitivity parameter by a small relative change in the value of component x, you get an associated relative change in F(x). Rather than directly differentiate Equation 39, it is simpler to use the definition of a derivative and evaluate using a small value of ε, such as 10−6 (Equation 41).

One important filter function is the absolute amplitude response, |H(s)|. Monte Carlo evaluations reveal significant variations of F(x)=|H(sc)| in the vicinity of the filter’s cutoff frequency sc. Equations defining |H(s)| for third- and second-order sections were derived earlier. Those for the first-order sections to form a composite filter with a second-order section are trivial. It is better to create a single figure of merit that you can use to compare all filters. One approach might be to take the root/mean/square of the sensitivities of |H(sc, xi)|for each of a filter’s i constituent components. You can define parameter S as an aggregate filter sensitivity (Equation 42), taking into account that components may have different tolerances.

TOLXI is the tolerance of component xI, so that a component with a 1% tolerance would have a TOL of 1, one with a 2% tolerance would have a TOL of 2, and so forth.

Selecting sample-filter designs

It is valuable to design filter sections that implement complex pole pairs α±jβ over a range of quality factors Q (Equation 43).

A ninth-order, 0.1-dB-ripple Chebyschev lowpass filter offers a good selection of quality factors. You can implement second order sections (Figure 1), composite first- and second-order sections (Figure 2) and third-order sections (Figure 3) using each of the filter’s four complex pole pairs. Each third- and first-order section of the composite filters will reflect the single real pole. You can implement second-order sections of any Q with equal values of C2 and C3 if the op amp gain is two (Reference 2). You can also do it with a unity gain circuit if C2 is four times the product of Q2 and C3. The sensitivities of the filters’ Q and resonance frequencies are much greater if the op amp gain is two, but the ratio of capacitor values for high Q sections can be too high if the gain is one. By investigating filter sections between gains of one and two, you will be able to see that some gains allow the use of standard-value capacitors whose ratio is considerably less than 4×Q2 and yet yield S values almost as low as those of the unity-gain filters.

You can use the same approach to get similar results for third-order filter sections. You can find solutions for op-amp gains of two where C1=C2=C3. You can make unity-gain-filter sections with values of C1 equal to C2 and greater than 8×Q2×C3. Solutions also exist for gains slightly greater than unity if C1=C2 and C2/C3≈RG/RF, where C2/C3 can be much less than 8×Q2. In this last case, values of S can approach those of unity gain designs. Try small value variations in ranges that satisfy these conditions to uncover the minimum values of S.

Comparing sample-filter designs

You can generate a set of sample filter designs using the Excel spreadsheet to do the mathematics (Click here to view Table 1). The first column assigns a trial number to each design. The subsequent two columns yield pole values that are multiplied by a 2π1000 frequency-scale factor to achieve a 1-kHz cutoff frequency. The next two columns give the values of Q and 4×Q2 for each complex pole pair. The next column describes the orders of the implemented filter sections. Columns with headings of C1, C2, C3, RG, and RF contain the values you have selected, whereas those with headings of R1, R2, and R3 list calculated values that the nearest standard 1%-tolerance values approximate. The subsequent column lists gain margin, using worst-case values within tolerances of 1% for resistors and 2% for capacitors. The following column presents the aggregate sensitivity, S, of the third-order composite (Figure 2) or third-order single section (Figure 3). The next column shows S only for the second-order section in the composite filter. The final column indicates whether other design procedures have confirmed the filter-component values in the table.

Perhaps the most notable finding is that the gain margins of trials 3, 6, and 9 (in red) are negative, meaning that these designs will be unstable at component-value-tolerance extremes. All of these designs have op-amp gains of two and relatively high quality factors. You should be cautious when using such designs. Among the composite designs, virtually all the sensitivity lies in the second-order sections, and little exists in the first.

You can also compare the S values for the third-order single sections and their companion composite filters, those having similar or the same op-amp gains and implementing the same poles. If you ignore the unstable designs, there is little difference in the aggregate sensitivities. A composite design, which requires an additional op amp, has about the same sensitivity as a third-order single section, meaning that you can convert a third-order composite design into a third-order single section by removing an op amp and adjusting component values. This result exhibits little or no penalty in component-tolerance sensitivity. If your design requires a specific second-order response, you can add a real pole high enough above the second-order section’s cutoff frequency to get additional stopband attenuation.

Building and measuring filters

It is a good idea to validate the solutions to these equations with actual physical filters. Alternatively, for composite and single-section third-order filters with gains of two, you can gain confidence in the design by ensuring that other design procedures give component values identical to these. Because few if any alternative procedures exist for third-order single-section designs with gains other than one or two, you must evaluate those designs by building the circuit. The designs of trials 8 and 11 in Table 1 were built and tested using high-gain-bandwidth op amps. The measured dc gains were normalized to unity. Spot checks of each filter were made against the continuous graph of their theoretical responses (Figure 5).

Stopband leakage

There is one additional benefit to a third-order design. The second-order designs suffer from a high-frequency leakage current through R2 and C2 from the filter’s input to the op amp’s output (Reference 8). Because the output impedance of an op amp rises with falling open-loop gain at higher frequencies, it and the current from the input combine to yield stopband leakage, an unexpected signal at the output. In a third-order filter, C1 shunts much of this current to ground. Although the high-frequency current in a second-order section is simply VIN/R2, the current for a third-order single section decreases to (VIN/(R1+R2))/(1+sC1R1R2/(R1+R2)). Figure 6 shows the measured and theoretical results of the Table 1 filter designs of trials 11 (second-order section only) and 8 (third-order single section). To exacerbate stopband leakage, they both use a low-gain-bandwidth op amp and with components having one-tenth of the impedances the table lists. The stopband leakage of the second-order Trial 11 section is evident, whereas it is absent from the third-order Trial 8 section. Because the measurement noise floor was about −70 dBV, it is not possible to determine at what point leakage appeared in the third-order section. The inputs of both filters were driven at 10V rms at frequencies greater than 1500 Hz where filter attenuation ensured that output saturation of the ±12V-powered op amp was not a concern.

 References Williams, Arthur B, and Fred Taylor, Electronic Filter Design Handbook, McGraw-Hill, 1981.Van Valkenburg, ME, Analog Filter Design, Van Valkenburg, M.E., Holt, Reinhart and Winston, 1982.Cano, Martin, “A new set of Sallen-Key filter equations,” EDN, Oct 1, 2009.Texas Instruments FilterPro, 2001-2006, Texas Instruments Corp.Williams, Arthur B, Active Filter Design, Artech House Inc, 1975.Parker, Glenn A, “Reducing Active Filter Costs Using Symbolic Three-Pole Synthesis,” RF Design, March 1996.Beis, Uwe, “Design and Dimensioning of Active Filters."Cano, Martin, “Eliminate Sallen-Key stopband leakage with a voltage follower,” EDN, May 14, 2009, pg 17.