# 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:

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 A

_{MIN}, the minimum op-amp gain for the filter, as

**equations 2**and

**3**show.

_{F}and R

_{G}that will keep the gain above A

_{MIN}, as

**Equation 4**shows.

**equations 5**and

**6**show.

**equations 7**through

**10**, which define two sets of the two resistor values.

_{1A}and R

_{2A}yield one solution, and R

_{1B}and R

_{2B}define another. You now choose the nearest standard-value resistors for R

_{1}and R

_{2}. The resistor tolerances should be 1% or better, and capacitor tolerances should be 2% or better. When R

_{F}×C

_{2}>R

_{G}×C

_{3}, 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:

**equations 12**through

**14**show.

**Equation 14**for r1 and substituting into

**equations 12**and

**13**, you get

**equations 15**and

**16**:

**equations 17**through

**23**.

**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:

_{F}and R

_{G}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 R_{F}and R_{G}, 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 C

_{2}and the op-amp output of

**Figure 1**. Then, connect a voltage source, V

_{I}to C

_{2}. You ground the filter input at R

_{2}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 V

_{O}, you can calculate the transfer function V

_{O}/V

_{I}using

**Equation 26**.

^{2}=−1/(R2×R3×C2×C3), you can solve for the loop gain under that condition using

**Equation 27**.

**Equation 28**to convert the expression to negative decibels to obtain the gain margin.

**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 C

_{2}, R

_{2}, and R

_{F}and the smallest for C

_{3}, R

_{3}, and R

_{G}.

**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 C

_{2}and the op-amp output and then ground the filter input at R

_{1}. You then use

**Equation 29**to determine the transfer function between the disconnected side of C

_{2}and the op amp’s output.

**equation**tells you that you should choose R

_{1}, R

_{2}, C

_{2}, and R

_{F}at the highest points within their tolerance ranges to maximize gain. Similarly, you should choose C

_{1}, R

_{3}, C

_{3}, and R

_{G}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, s

_{0}.

**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:

**Equation 36**exist at ±s0:

**Equation 38**to convert to negative decibels to get the gain margin from

**Equation 29**.

**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**.

**Equation 40**).

**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**).

_{c})| in the vicinity of the filter’s cutoff frequency s

_{c}.

**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(s

_{c}, x

_{i})|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.

_{XI}is the tolerance of component x

_{I}, 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

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**).

**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 C

_{2}and C

_{3}if the op amp gain is two (

**Reference 2**). You can also do it with a unity gain circuit if C

_{2}is four times the product of Q

^{2}and C

_{3}. 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×Q

^{2}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 C

_{1}=C

_{2}=C

_{3}. You can make unity-gain-filter sections with values of C

_{1}equal to C

_{2}and greater than 8×Q

^{2}×C

_{3}. Solutions also exist for gains slightly greater than unity if C

_{1}=C

_{2}and C

_{2}/C

_{3}≈R

_{G}/R

_{F}, where C

_{2}/C

_{3}can be much less than 8×Q

^{2}. 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**

**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×Q

^{2}for each complex pole pair. The next column describes the orders of the implemented filter sections. Columns with headings of C

_{1}, C

_{2}, C

_{3}, R

_{G}, and R

_{F}contain the values you have selected, whereas those with headings of R

_{1}, R

_{2}, and R

_{3}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 R

_{2}and C

_{2}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, C

_{1}shunts much of this current to ground. Although the high-frequency current in a second-order section is simply V

_{IN}/R

_{2}, the current for a third-order single section decreases to (V

_{IN}/(R

_{1}+R

_{2}))/(1+sC

_{1}R

_{1}R

_{2}/(R

_{1}+R

_{2})).

**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 stopb

System level design and integration challenges with multiple ADCs on single chip

Understanding the basics of setup and hold time

Product How-to: Digital isolators offer easy-to-use isolated USB option

Managing noise in the signal chain, Part 2: Noise and distortion in data converters

War of currents: Tesla vs Edison

Simple reverse-polarity-protection circuit has no voltage drop

Control an LM317T with a PWM signal

Start with the right op amp when driving SAR ADCs

FEATURED RESOURCES