A Filter Primer

addToMyAnalog

Add to myAnalog

Share

Send to Email

downloadArticle

Download Article 256.00K

Author's Contact Information

Abstract

This comprehensive article covers all aspects of analog filters. It first addresses the basic types: first- and second-order filters, highpass and lowpass filters, notch and all-pass filters, and high-order filters. The tutorial then explains the characteristics of the different implementations, such as Butterworth filters, Chebychev filters, Bessel filters, elliptic filters, state-variable filters, and switched-capacitor filters.

Introduction

Ease of use makes integrated, switched-capacitor filters attractive for many 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. We then introduce practical realizations such as the state-variable filter and its implementation in switched-capacitor form. Specific integrated filters described here include Maxim's MAX7400 family of higher-order switched-capacitor filters.

First-Order Filters

Integrator 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 1b. A Bode plot of a simple integrator.

You can easily derive the transfer function as:

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, when discussing the implementation of actual filters.

Simple RC Lowpass Filters

A slightly more complex filter is the simple lowpass RC type (Figure 2a). Its characteristic (transfer function) is:

When s = 0, the function reduces to ω00, i.e., Unity. When s increases to infinity, the function approaches zero, so this is a lowpass 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 lowpass filter, frequency response tends to zero at infinite frequency. Simply put, there is a zero at This single zero surrounds the complex plane.

Figure 2b. The complex function of an RC lowpass 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 the 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 of the above equations, 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 lowpass 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 3a. An RLC lowpass filter.

Equation

Increasing the Q moves 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.

We can use the same idea to generate a bandpass filter. Multiply the lowpass responses by s, which adds a +20dB/decade slope. The net response is then +20dB/decade below the cutoff and -20dB/decade above. This yields the bandpass response in Figure 5c:

Notice that the rate of cutoff in a second-order bandpass filter is half that of the other types. This is because the available 40dB/decade slope must be shared between the two skirts of the filter.

In summary, second-order lowpass, bandpass, and highpass functions in normalized form have the same denomination, but they have numerators of ω0 2 , ω0s, and s 2 , 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:

Consider the limit cases. When s = 0, f(s) reduces to ωz 2 /ω0 2 , 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 2 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:

This can be stated simply. The notch filter is based on the sum of a lowpass and a highpass characteristic. We use this fact in practical filter implementations to generate the notch response from existing highpass and lowpass 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:

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.

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 lowpass filter.

You can build Butterworth versions of highpass, 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 lowpass filter and then applying transformations to generate the other types (such as the s 1/s that we used earlier to change a lowpass into a highpass filter).

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 lowpass filter.

Figure 9. A pole-zero diagram of a fourth-order Bessel lowpass 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 10b. The complex function of a fourth-order elliptic lowpass 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 is time to shift from abstract theory to 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. Consequently, our basic building block should be a second-order section, from which we can derive lowpass, highpass, 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 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:

Thus the average current transferred to the summing junction is:

Notice that the current is proportional to VIN, so we have the same effect as a resistor of value:

The integrator's ω0 is therefore:

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

This article introduced 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.

Add to myAnalog

Share

Send to Email

Download Article 256.00K