UBM Tech

Filters in a nutshell: Spreadsheet promotes intuitive feel

By Dave Van Ess, Cypress MicroSystems - June 9, 2005

When almost any electronic system passes a certain level of complexity, it requires some sort of filtering—often several types. However, many designers with a predominantly digital background may hesitate to tackle analog filters, based on unpleasant memories from college days of complex analysis of filter poles and zeros. Fortunately, designers can derive the most common types of filters from a universal-filter-transfer function by relating filter characteristics to the function's five parameters. In addition, experimenting with the Excel spreadsheet  can help you get a feel for how filter response relates to these parameters.

A filter is a circuit that passes or rejects certain signal frequencies. You can derive the most common types of filters—lowpass, bandpass, highpass, notch, and elliptical—from the basic building block of filters: the second-order universal-filter-transfer function.

The transfer function's parameters—f0, d, hHP, hBP, and hLP—allow construction of all filter types. Roll-off frequency, f0, is the frequency at which the s terms start to dominate. Designers consider frequencies below this value as low and above this value as high. They consider frequencies around this level as in-band. Damping, d, is a measure of how a filter changes from lower frequencies to higher frequencies. It is an index of the filter's tendency to oscillate. Practical damping values range from 0 to 2 (Table 1). The highpass coefficient, hHP, is the coefficient of the numerator that dominates for frequencies greater than the roll-off frequency. The bandpass coefficient, hBP, is the coefficient of the numerator that dominates for frequencies near the roll-off frequency. The lowpass coefficient, hLP, is the coefficient of the numerator that dominates for frequencies lower than the roll-off frequency. Designers require only these five parameters to define a filter.

To help develop an intuitive feel for how these parameters interact, click here to download the spreadsheet FilterPlot.xls to experiment with combinations of these five parameters and view the response. The most common topology for both highpass and lowpass filters is the Sallen Key, which requires only one op amp (figures 1a and 1b). The multiple-pass filter finds use in bandpass filters (Figure 1c). Again, it requires only one op amp. Figures 2 and 3 show the topology for biquad-filter sections. Each can implement the complete universal-filter-transfer function. The circuit in Figure 2 uses three op amps. It uses the center op amp only to make the total feedback path negative. The same filter with switched capacitors requires only two op amps (Figure 3). References 1 and 2 describe each of these filter topologies.

Lowpass filter

A lowpass filter passes signals from dc up to some cutoff frequency, fCUTOFF. The highpass and bandpass coefficients of the universal-filter second-order transfer function are set to zero, resulting in the transfer equation for a second-order lowpass filter:

Figure 4 shows the plot of a typical lowpass filter. This plot and Table 2 show that the response is relatively flat for frequencies less than f0. For frequencies greater than f0, the signal falls off at the square of the frequency. At f0, the damping value attenuates the output. You can cascade several sections of these filters to produce a higher order (steeper roll-off) filter. Suppose that a design requires a fourth-order Bessel lowpass filter with a cutoff frequency of 10 kHz. According to Reference 1, each section would have roll-off frequencies of 16.13 and 18.19 kHz, respectively. Damping values would be 1.775 and 0.821, respectively, and the highpass, bandpass, and lowpass coefficients would be 0, 0, and 1, respectively, for both sections. You can implement this filter with two filter sections, each with the prescribed parameters. The cutoff frequency is the point at which 3 dB attenuates the output.

Bandpass filter

A bandpass filter passes signals around a defined median frequency. The highpass and lowpass coefficients of the universal-filter second-order transfer function are zero, resulting in this transfer equation for a second-order bandpass filter:

Figure 5 shows a plot of a typical bandpass filter. Table 3 shows that the response peaks at f0, which is equal to the lowpass coefficient divided by the damping value. For frequencies greater than 10f0, the signal falls off proportionally to the frequency. For frequencies less than f0/10, the signal falls off inversely to the frequency. The bandwidth of the bandpass filter is the width of the frequencies that can pass with no more than 3 dB of attenuation. Another measure of a filter's performance is Q, which is the ratio of the center frequency divided by the bandwidth of the filter. The higher the Q, the narrower the relative bandwidth. By definition, it is equal to the inverse of the damping value:

As with lowpass filters, designers can cascade multiple bandpass filters to form higher order filters. Suppose that a design requires a bandpass filter that passes frequencies between 950 and 1050 Hz. The center frequency is the geometric mean of these two values, or 999 Hz, and the bandwidth is 100 Hz. These parameters yield a Q of 9.99 and a damping value of 0.1001. The roll-off frequency is 998 Hz; the damping value is 0.1001; and the highpass, bandpass, and lowpass coefficients are 0, 0.1001, and 0, respectively.

Highpass filter

A highpass filter allows the passing of signals greater than some cutoff frequency. The transfer equation for a second-order highpass filter is:

Figure 6 shows a plot of a typical highpass filter. Table 4 shows that the response is relatively flat for frequencies greater than f0. For frequencies greater than f0, the signal falls off at the square to the frequency. At f0, the damping value attenuates the output. Note that the cutoff frequency, fCUTOFF, is the frequency at which 3 dB attenuates the output. It is not necessarily equal to f0. Fortunately, filter-design cookbooks provide tables with the necessary roll-off and damping values for different types and orders of filters.

Notch filter

A notch filter passes signals except around a defined median frequency; it is just the opposite of a bandpass filter. It combines equal numbers of the lowpass and highpass coefficients:

The bandpass coefficient of the second-order universal-transfer function is zero. Figure 7 shows a plot of a typical notch filter. Table 5 shows that the response is zero at f0. At some distance away from f0, the signal passes relatively unattenuated. As with the bandpass filter, designers measure a notch filter's performance in Q. Suppose that a design requires a notch filter with the same frequency limits as the earlier bandpass example. The roll-off frequency and damping value remain the same: 998 Hz and 0.1001, respectively. For a unity gain, the highpass and lowpass coefficients are 1, and the bandpass coefficient is 0.

Elliptical filter

Filter sections with multiple-pass coefficients can have different values. Such a filter is an elliptical filter, and it passes low frequencies with one gain and high frequencies with another. The transfer equation for a second-order filter is:

Figure 8 shows a plot of a typical elliptical lowpass filter. Table 6 shows that the response is zero at points that f0, hHP, and hLP determine. At some distance away from f0, the relative pass coefficient determines the signal. An elliptical filter can be either highpass or lowpass. At some defined point, the output rapidly drops to zero. Suppose that a system requires a 5-kHz second-order Butterworth lowpass filter; 3 dB attenuates the signal at 5 kHz. However, the signal does not reach an attenuation of 20 dB until the frequency is 15.8 kHz. (The spreadsheet  can verify this result.) The signal has 3-dB attenuation for the relative frequency of one and is down 20 dB at 3.16 times that relative frequency. Suppose that the system requires that no more than 20 dB needs to attenuate higher frequencies. You can add a highpass coefficient, one-tenth the size—20 dB—of the lowpass coefficient to the filter-transfer function, converting the lowpass filter to an elliptical filter. In this case, the damping value is 1.414, and the highpass, bandpass, and lowpass coefficients are 0.1, 0, and 1, respectively.

The filter now passes low frequencies at unity gain; 20 dB attenuates the high frequencies. Entering these parameters into the spreadsheet shows that the attenuation is now 3 dB for the relative frequency of 0.908, 20 dB for the relative frequency of 2.228, and 0 at the relative frequency of 3.162. Adjusting the roll-off frequency to 5.5 kHz (5 kHz/0.908) results in a cutoff frequency of 5 kHz (5.5 kHz×0.908), 20-dB attenuation at 12.3 kHz (5.5 kHz×2.228), and 0 at 17.4 kHz (5.5 kHz×3.162). The 20-dB attenuation point has now moved from 15.8 to 12.3 kHz.

In summary, with knowledge of how roll-off frequency; damping value; and lowpass, bandpass, and highpass coefficients interact, along with a good filter-design book, engineers can implement filters to meet their system requirements.

 References Lancaster, Don, Active Filter Cook Book, Synergetics Press, 2002. Van Ess, Dave, "Understanding Switched Capacitor Filters," Application Note AN20168, Cypress MicroSystems, 2004.