Keywords: analog filter design, second order filters, highpass, high pass, lowpass, low pass, filters, notch, allpass, high order, filters, Butterworth, Chebychev, Bessel, Elliptic, State variable, filter
Abstract: This comprehensive article covers all aspects of analog filters. It first addresses the basic types like first and second order filters, highpass and lowpass filters, notch and allpass filters and high order filters. It then goes on to explain the characteristics of the different implementations such as Butterworth filters, Chebychev filters, Bessel filters, Elliptic filters, State-variable filters, and Switched-capacitor filters.
Ease of use makes integrated, switched-capacitor filters attractive for
many new applications. This article helps you prepare for such designs
by describing the filter products and explaining the concepts that govern
their operation.
Starting with a simple integrator, we first develop an intuitive approach
to active filters in general and then introduce practical realizations
such as the state-variable filter and its implementation in switched-capacitor
form. Specific integrated filters mentioned include Maxim's MAX7400
family of higher-order switched-capacitor filters.
First-Order Filters
An integrator (Figure 1a) is the simplest filter mathematically, and
it forms the building block for most modern integrated filters. Consider
what we know intuitively about an integrator. If you apply a DC signal
at the input (i.e., zero frequency), the output will describe a linear
ramp that grows in amplitude until limited by the power supplies. Ignoring
that limitation, the response of an integrator at zero frequency is infinite,
which means that it has a pole at zero frequency. (A pole exists at any
frequency for which the transfer function's value becomes infinite.)
We also know that the integrator's gain diminishes with increasing
frequency and that at high frequencies the output voltage becomes virtually
zero. Gain is inversely proportional to frequency, so it has a slope of
-1 when plotted on log/log coordinates (i.e., -20db/decade on a Bode plot,
Figure 1b).
Figure 1a. A simple RC integrator
Figure 1b. A Bode plot of a simple integrator
You can easily derive the transfer function as
VOUT/VIN = XC/R = (1/sC)/R = ω0
where s is the complex-frequency variable σ
+ jω and ω
0 is 1/RC. If we think of s as frequency, this formula confirms
the intuitive feeling that gain is inversely proportional to frequency.
We will return to integrators later, in discussing the implementation
of actual filters.
The next most complex filter is the simple low-pass RC type (Figure 2a).
Its characteristic (transfer function) is
When s = 0, the function reduces to ω
0/ ω 0,
i.e., 1. When s tends to infinity, the function tends to zero, so this
is a low-pass filter. When s = - ω
0, the denominator is zero and the function's value is
infinite, indicating a pole in the complex frequency plane. The magnitude
of the transfer function is plotted against s in Figure 2b, where the
real component of s (σ)
is toward us and the positive imaginary part (jω)
is toward the right. The pole at -ω
0 is evident. Amplitude is shown logarithmically to emphasize
the function's form. For both the integrator and the RC low-pass filter,
frequency response tends to zero at infinite frequency; that is, there
is a zero at s = ∞.
This single zero surrounds the complex plane.
Figure 2a. A simple RC low-pass filter
Figure 2b. The complex function of an RC low-pass filter
But how does the complex function in s relate to the circuit's response
to actual frequencies? When analyzing the response of a circuit to AC
signals, we use the expression jωL
for impedance of an inductor and 1/jωC
for that of a capacitor. When analyzing transient response using Laplace
transforms, we use sL and 1/sC for the impedance of these elements. The
similarity is apparent immediately. The jω
in AC analysis is in fact the imaginary part of s, which, as mentioned
earlier, is composed of a real part s and an imaginary part jω.
If we replace s by jω
in any equation so far, we have the circuit's response to an angular
frequency ω. In the
complex plot in Figure 2b, σ
= 0 and hence s = jω
along the positive jω
axis. Thus, the function's value along this axis is the frequency
response of the filter. We have sliced the function along the jω
axis and emphasized the RC low-pass filter's frequency-response curve
by adding a heavy line for function values along the positive jω
axis. The more familiar Bode plot (Figure 2c) looks different in form
only because the frequency is expressed logarithmically.
Figure 2c. A Bode plot of a low-pass filter
While the complex frequency's imaginary part (jω)
helps describe a response to AC signals, the real part (σ)
helps describe a circuit's transient response. Looking at Figure 2b,
we can therefore say something about the RC low-pass filter's response
as compared to that of the integrator. The low-pass filter's transient
response is more stable, because its pole is in the negative-real half
of the complex plane. That is, the low-pass filter makes a decaying-exponential
response to a step-function input; the integrator makes an infinite response.
For the low-pass filter, pole positions further down the -σ
axis mean a higher ω
0, a shorter time constant, and therefore a quicker transient
response. Conversely, a pole closer to the jω
axis causes a longer transient response.
So far, we have related the mathematical transfer functions of some simple
circuits to their associated poles and zeroes in the complex-frequency
plane. From these functions, we have derived the circuit's frequency
response (and hence its Bode plot) and also its transient response. Because
both the integrator and the RC filter have only one s in the denominator
of their transfer functions, they each have only one pole. That is, they
are first-order filters.
However, as we can see from Figure 1b, the first-order filter does not
provide a very selective frequency response. To tailor a filter more closely
to our needs, we must move on to higher orders. From now on, we will describe
the transfer function using f(s) rather than the cumbersome VOUT/VIN.
Second-Order Low-Pass Filters
A second-order filter has s² in the denominator and two poles
in the complex plane. You can obtain such a response by using inductance
and capacitance in a passive circuit or by creating an active circuit
of resistors, capacitors, and amplifiers. Consider the passive LC filter
in Figure 3a, for instance. We can show that its transfer function has
the form
where ω 0
is the filter's characteristic frequency and Q is the quality factor
(lower R means higher Q).
Figure 3a. An RLC low-pass filter
Figure 3b. A pole-zero diagram
of an RLC low-pass filter
The poles occur at s values for which the denominator becomes zero; that
is, when s² +sω
0/Q +ω 0²
= 0. We can solve this equation by remembering that the roots of ax²
+ bx + c = 0 are given by
In this case, a = 1, b = ω
0/Q, and c = ω
0². The term (b² -4ac) equals ω
0² (1/Q² -4), so if Q is less than 0.5
then both roots are real and lie on the negative-real axis. The circuit's
behavior is much like that of two first-order RC filters in cascade. This
case isn't very interesting, so we'll consider only the case where
Q > 0.5, which means (b² -4AC) is negative and the roots
are complex.
The real part is therefore -b/2a, which is -ω
0/2Q, and common to both roots. The roots' imaginary parts
will be equal and opposite in signs. Calculating the position of the roots
in the complex plane, we find that they lie at a distance of ω0
from the origin, as shown in Figure 3b. (The associated mathematics, which
are straightforward but tedious, will be left as an exercise for the more
masochistic readers.)
Varying ω0 changes
the poles' distance from the origin. Decreasing the Q moves the poles
toward each other, whereas increasing the Q moves the poles in a semicircle
away from each other and toward the jω
axis. When Q = 0.5, the poles meet at -ω0 on the negative-real axis. In this case, the corresponding
circuit is equivalent to two cascaded first-order filters, as noted earlier.
Now let's examine the second-order function's frequency response
and see how it varies with Q. As before, Figure 4a shows the function
as a curved surface, depicted in the three-dimensional space formed by
the complex plane and a vertical magnitude vector. Q = 0.707, and you
can see immediately that the response is a low-pass filter.
Figure 4a. The complex function of a second-order low-pass filter (Q = 0.707)
The effect of increasing the Q is to move the poles in a circular path
toward the jω axis.
Figure 4b shows the case where Q = 2. Because the poles are closer to
the jω axis, they have
a greater effect on the frequency response, causing a peak at the high
end of the passband.
Figure 4b. The complex function of a second-order low-pass filter (Q = 2)
There is also an effect on the filter's transient response. Because
the poles' negative-real part is smaller, an input step function will
cause ringing at the filter output. Lower values of Q result in less ringing,
because the damping is greater. On the other hand, if Q becomes infinite,
the poles reach the jω
axis, causing an infinite frequency response (instability and continuous
oscillation) at s = ω0. In
the LCR circuit in Figure 3a, this condition would be impossible unless
R = 0. For filters that contain amplifiers, however, the condition is
possible and must be considered in the design process.
A second-order filter provides the variables ω
0 and Q, which allow us to place poles wherever we want in
the complex plane. These poles must, however, occur as complex-conjugate
pairs, in which the real parts are equal and the imaginary parts have
opposite signs. This flexibility in pole placement is a powerful tool
and one that makes the second-order stage a useful component in many switched-capacitor
filters. As in the first-order case, the second-order low-pass transfer
function tends to zero as frequency tends to infinity. The second-order
function decreases twice as fast, however, because of the s²
factor in the denominator. The result is a double zero at infinity.
Having discussed first- and second-order low-pass filters, we now need
to extend our concepts in two directions: We'll discuss other filter
configurations such as high-pass and bandpass sections, and then we'll
address higher-order filters.
High-Pass and Bandpass Filters
To change a low-pass filter into a high-pass filter, we turn the s plane
inside out, making low frequencies high and high frequencies low. The
double zero at infinite frequency goes to zero frequency, and the finite
response at zero frequency becomes infinite. To accomplish this transformation,
we make s = ω 0²/s,
so that s →
∞
when ω 0²/s
→
0 and vice versa. At ω
0 the old and new values of s are identical. The double zero
that was at s = 1 moves to zero, and the finite response we had at s =
0 moves to infinity, producing a high-pass filter:
(S) = ω0² / (ω04/s²) + (ω0³/Qs) + ω0²
If we multiply the numerator and the denominator by s²/ω
0²,
(S) = s²/ s² + [(Sω0)/Qs] + ω0²
This form is the same as before, except the numerator is s²
instead of ω 0².
In other words, we can transform a low-pass function into a high-pass
one by changing the numerator, leaving the denominator alone.
The Bode plot offers another perspective on low-pass to high-pass transformations.
Figure 5a shows the Bode plot of a second-order low-pass function: flat
to the cutoff frequency, then decreasing at -40db/decade. Multiplying
by s² adds a +40db/decade slope to this function. The additional
slope provides a low-frequency rolloff below the cutoff frequency, and
above cutoff it gives a flat response (Figure 5b) by canceling the original
-40db/decade slope.
Figure 5. Bode plots of second-order filters
We can use the same idea to generate a bandpass filter. Multiply the
low-pass responses by s, which adds a +20db/decade slope. The net response
is then +20db/decade below the cutoff and -20db/decade above, yielding
the bandpass response in Figure 5c:
(S) = ω0s/ s² + (Sω0)/Q) + ω0²
Notice that the rate of cutoff in a second-order bandpass filter is half
that of the other types, because the available 40db/decade slope must
be shared between the two skirts of the filter.
In summary, second-order low-pass, bandpass, and high-pass functions
in normalized form have the same denomination, but they have numerators
of ω 0²,
ω 0s, and
s², respectively.
Notch and All-Pass Filters
A notch, or bandstop, filter rejects frequencies in a certain band while
passing all others. Again, you derive this filter's transfer function
by changing the numerator of the standard second-order characteristic:
(S) = (s² + ωZ²)/ s² + (Sω0)/Q) + ω0²
Consider the limit cases. When s = 0, f(s) reduces to ω
z²/ω
0², which is finite. When s →
∞
, the equation reduces to 1. At s = jω
z, the numerator becomes zero, f(s) becomes zero (a double
zero, in fact, because of s² in the numerator), and we have
the characteristic of a notch filter. The gain at frequencies above and
below the notch will differ unless ω
z = ω 0.
The notch filter equation can also be expressed as follows:
In other words, the notch filter is based on the sum of a low-pass and
a high-pass characteristic. We use this fact in practical filter implementations
to generate the notch response from existing high-pass and low-pass responses.
It may seem odd that we create a zero by adding two responses, but their
phase relationships make it possible.
Finally, there is the all-pass filter, which has the form
(S) = [s² - (Sω0/Q) + ω0²]/[s² + (Sω0/Q) + ω0²]
This response has poles and zeros placed symmetrically on either side
of the jω axis, as
shown in Figure 6. The effects of these poles and zeroes cancel exactly
to give a level and uniform frequency response. It might seem that a piece
of wire could provide this effect more cheaply; however, unlike a wire,
the all-pass filter offers a useful variation of phase response with frequency.
Figure 6. The complex function of a second-order all-pass filter
Higher-Order Filters
We are fortunate in not having to treat the higher-order filters separately,
because a polynomial in s of any length can be factored into a series
of quadratic terms (plus a single first-order term if the polynomial is
odd). A fifth-order low-pass filter, for instance, might have the transfer
function
(S) = 1/ S5 + a4S4 + a3S3 + a2S2 + a1S + a0
where all the a0 are constants. We can factor the denominator
as follows:
The last equation represents a filter that we can realize physically
as two second-order sections and one first-order section, all in cascade.
This configuration simplifies the design by making it easier to visualize
the response in terms of poles and zeroes in the complex-frequency plane.
We know that each second-order term contributes one complex-conjugate
pole pair, and that the first-order term contributes one pole on the negative-real
axis. If the transfer function has a higher-order polynomial in the numerator,
that polynomial can be factored as well, which means that the second-order
sections will be something other than low-pass sections.
Using the synthesis principles described above, we can build a great
variety of filters simply by placing poles and zeroes at different positions
in the complex-frequency plane. Most applications require only a restricted
number of these possibilities, however. For them, many earlier experimenters
such as Butterworth and Chebychev have already worked out the details.
The Butterworth Filter
A type of filter that is common to many applications requires a response
that is flat in the passband but cuts off as sharply as possible afterwards.
You can obtain that response by arranging the poles of a low-pass filter
with equal spacing around a semicircular locus, and the result will be
a Butterworth filter. The pole-zero diagram of Figure 7a, for example,
represents a fourth-order type of Butterworth filter.
Figure 7a. A pole-zero diagram of a fourth-order Butterworth low-pass filter
The poles in Figure 7a have different Q values, but they all have the
same ω 0
because they are the same distance from the origin. The three-dimensional
surface corresponding to this filter (Figure 7b) illustrates how, as the
effect of the lowest-Q pole starts to wear off, the next pole takes over,
and the next, until you run out of poles and the response falls off at
-80db/decade.
Figure 7b. The complex function of a fourth-order Butterworth low-pass filter
You can build Butterworth versions of high-pass, bandpass, and other
filter types, but the poles of these filters will not be arranged in a
simple semicircle. In most cases, you begin by designing a low-pass filter
and then applying transformations to generate the other types (such as
the s →
1/s that we used earlier to change a low-pass into a high-pass).
The Chebychev Filter
By bringing poles closer to the jω
axis (increasing their Qs), we can make a filter whose frequency cutoff
is steeper than that of a Butterworth. This arrangement has a penalty:
The effects of each pole will be visible in the filter response, giving
a variation in amplitude known as ripple in the passband. With proper
pole arrangement, the variations can be made equal, however, which results
in a Chebychev filter.
You derive a Chebychev filter from a Butterworth by moving each pole
closer to the jω axis
in the same proportion, so that the poles lie on an ellipse (Figure 8a).
Figure 8b demonstrates how each pole contributes one peak to the passband
ripple. Moving the poles closer to the jω axis increases the passband
ripple but provides a more abrupt cutoff in the stopband. The Chebychev
filter therefore offers a trade-off between ripple and cutoff. In this
respect, the Butterworth filter in which passband ripple has been set
to zero is a special case of the Chebychev.
Figure 8a. A pole-zero diagram of a fourth-order Chebychev low-pass filter
Figure 8b. The complex function of a fourth-order Chebychev low-pass filter
The Bessel Filter
Butterworth and Chebychev filters with sharp cutoffs carry a penalty
that is evident from the positions of their poles in the s plane. Bringing
the poles closer to the jω
axis increases their Q, which degrades the filter's transient response.
Overshoot or even ringing at the response edges can result.
The Bessel filter represents a trade-off in the opposite direction from
the Butterworth. The Bessel's poles lie on a locus further from the
jω axis (Figure 9).
Transient response is improved, but at the expense of a less steep cutoff
in the stopband.
Figure 9. A pole-zero diagram of a fourth-order Bessel low-pass filter
The Elliptic Filter
By increasing the Q of poles nearest the passband edge, you can obtain
a filter with sharper stopband cutoff than that of the Chebychev, without
incurring more passband ripple. Doing this alone would produce a gain
peak, but you can compensate for the peak by providing a zero at the bottom
of the stopband. Additional zeroes must be spaced along the stopband to
ensure that the filter response remains below the desired level of stopband
attenuation. Figure 10a shows the pole-zero diagram for this type: an
elliptic filter. Figure 10b shows the corresponding transfer-function
surface. As you may imagine, the elliptic filter's high-Q poles produce
a transient response that is even worse than that of the Chebychev.
Figure 10a. A pole-zero diagram of a fourth-order elliptic low-pass filter
Figure 10b. The complex function of a fourth-order elliptic low-pass filter
Note that all the filters described have the same number of zeros as
poles (this must be the case, or the transfer function would not be a
dimensionless expression). Elliptic filters, for example, space their
zeroes along the jω
axis in the stopband. In the case of Bessel, Butterworth, and Chebychev,
all the zeros are on top of each other at infinity. Because there are
no zeros explicit in the numerator, these filter types are sometimes called
all-pole filters.
We have now extended our concepts to cover not only first- and second-order
filters but also filters of higher order, including some particularly
useful cases. Now it's time to get away from abstract theory and discuss
practical circuits.
The State-Variable Filter
As demonstrated earlier, we can construct any filter from first- and
second-order building blocks. You can regard the first-order filter as
a special case of the second order, so our basic building block should
be a second-order section, from which we can derive low-pass, high-pass,
bandpass, notch, or all-pass characteristics.
The state-variable filter is a convenient realization for the second-order
section. It uses two cascaded integrators and a summing junction, as shown
in Figure 11.
Figure 11. A second-order state-variable filter
We know that the characteristic of an integrator is simply ω
0/s. But to demonstrate the principle while simplifying the
mathematics, we can assume that both integrators have ω
0 = 1 and that their characteristic is simply 1/s. Then we
can write equations for each of the integrators in Figure 11:
L = B/s or B = sL
B = H/s or H = sB = s²L
The equation for the summing junction in Figure 11 is simply
H = I - B - L.
If we substitute for H and B using the integrator equations, we get
s²L = I - sL - L
or
s²L + sL +L = I,
in which case,
L(s² + s + 1) = I,
or
L/I = 1/s² + s + 1
which is the classic, normalized, low-pass response. Because B = sL and
H = s²L,
B/I = s/s² + s + 1 and H/I = s²/s² + s + 1
These are, respectively, the classic bandpass and high-pass responses.
Thus, one filter provides simultaneous low-pass, bandpass, and high-pass
outputs. We can create actual filters with real values of ω
0 and Q from these equations by building integrators with ω
0 ≠ 1 and
feedback factors to the summing junction with values ≠
1.
In theory you can create higher-order filters by cascading more than
two integrators. Some integrated-circuit filters use this approach, but
it has drawbacks. To program these filters, you must calculate coefficient
values for the higher-order polynomial. Also, a long string of integrators
introduces stability problems. By limiting ourselves to second-order sections,
we have the advantage of working directly with the ω
0 and Q variables associated with each pole.
Switched-Capacitor Filters
The characteristics of all active filters, regardless of architecture,
depend on the accuracy of their RC time constants. Because the typical
precision achieved for integrated resistors and capacitors is approximately
±30%, a designer is handicapped when attempting to use absolute
values for the components in an integrated filter circuit. The ratio of
capacitor values on a chip can be accurately controlled, however, to about
one part in 2000. Switched-capacitor filters use these capacitor ratios
to achieve precision without the need for precise external components.
In the switched-capacitor integrator shown in Figure 12, the combination
of C1 and the switch simulates a resistor.
Figure 12. A switched-capacitor integrator
The switch S1 toggles continuously at a clock frequency fCLK.
Capacitor C1 charges to VIN when S1 is
to the left. When it switches to the right, C1 dumps charge
into the integrator's summing node, from which it flows into the capacitor
C2. The charge on C1 during each clock cycle is
Q = C1 VIN,
and thus the average current transferred to the summing junction is
I = QfC = C1VIN×fC
Notice that the current is proportional to VIN, so we have
the same effect as a resistor of value
R = VIN/I = 1/ C1fC
The integrator's ω
0 is therefore
ω0 = 1/RC2 = C1fC/C2
Because ω 0
is proportional to the ratio of the two capacitors, its value can be controlled
with great accuracy. Moreover, the value is proportional to the clock
frequency, so you can vary the filter characteristics by changing fCLK,
if desired. But the switched capacitor is a sampled-data system and therefore
not completely equivalent to the time-continuous RC integrator. The differences,
in fact, pose three issues for a designer.
First, the signal passing through a switched capacitor is modulated by
the clock frequency. If the input signal contains frequencies near the
clock frequency, they can intermodulate and cause spurious output frequencies
within the system bandwidth. For many applications, this is not a problem,
because the input bandwidth has already been limited to less than half
the clock frequency. If not, the switched-capacitor filter must be preceded
by an anti-aliasing filter that removes any components of input frequency
above half of the clock frequency.
Second, the integrator output (Figure 12) is not a linear ramp, but a
series of steps at the clock frequency. There may be small spikes at the
step transitions caused by charge injected by the switches. These aberrations
may not be a problem if the system bandwidth following the filter is much
lower than the clock frequency. Otherwise, you must again add another
filter at the output of the switch-capacitor filter to remove the clock
ripple.
Third, the behavior of the switched-capacitor filter differs from the
ideal, time-continuous model, because the input signal is sampled only
once per clock cycle. The filter output deviates from the ideal as the
filter's pole frequency approaches the clock frequency, particularly
for low values of Q. You can, however, calculate these effects and allow
for them during the design process.
Considering the above, it is best to keep the ratio of clock-to-center
frequency as large as possible. Typical ratios for switched-capacitor
filters range from approximately 28:1 to 200:1. The MAX262, for example,
allows a maximum clock frequency of 4MHz, so using the minimum ratio of
28:1 gives a maximum center frequency of 140kHz. At the low end, switched-capacitor
filters have the advantage that they can handle low frequencies without
using uncomfortably large values of R and C. You simply lower the clock
frequency.
Conclusion
The purpose of this article was to introduce the concepts and terminology
associated with switched-capacitor active filters. If you have grasped
the material presented here, you should be able to understand most filter
data sheets.
Automatic Updates
Would you like to be automatically notified when new application notes are published in your areas of interest? Sign up for EE-Mail™.