Several people asked for more information about anti-alias filters used with analog-to-digital converters to remove unwanted signals. This column describes a filter-selection “gotcha,” and includes references to anti-alias-filter information. An example in a previous column explained how to use the upper frequency of the signals you want to measure along with the dynamic range of an ADC to determine characteristics needed for an anti-alias-filter.
Suppose you have a 16-bit ADC (96 dB dynamic range) and want to digitize signals between 0Hz and 1,500Hz. In a 2-pole Butterworth filter with a cutoff, or corner, frequency (fc) of 1,500Hz, attenuation doesn’t reach -96 dB until about 377kHz. An 8-pole Butterworth low-pass filter, with a 1,500Hz cutoff frequency, provides a -96 dB attenuation at 6,000Hz. So the more poles in a filter, the narrower the bandwidth of signals for the ADC -- the condition you want.
This plot shows attenuation for an 8-pole Butterworth filter with a 2,000Hz cutoff frequency.
Filter specifications, however, define cutoff frequency as the point where attenuation reaches -3 dB, or 0.707 times the original signal. In both filters described above, a signal at 1,500Hz will lose 30 percent of its amplitude. So, ignore the cutoff frequency and specify a filter that doesn’t attenuate any signals at or below the 1,500Hz limit used in the above examples. Microchip’s FilterLab software created a 2-pole Butterworth filter with a 4,560Hz cutoff frequency. No attenuation occurs up to 1,500Hz and attenuation reaches -96 dB at about 1MHz. That’s a wide bandwidth.
An 8-pole Butterworth low-pass filter will work better. Attenuation to -96 dB occurs at 8,000Hz instead of at 1 MHz, and the filter has a cutoff of 2,000Hz (see figure). The narrower bandwidth means less noise above 1,500Hz, and no aliased data for signals above 8,000Hz.
Four filter types -- Butterworth, Bessel, Chebyshev, and Elliptic -- answer most anti-aliasing needs. Butterworth and Bessel filters have a flat amplitude response over the pass band, although Bessel filters have a slower attenuation rate. Elliptical and Chebyshev filters introduce amplitude ripple in the pass band, but have steeper attenuation above the cutoff frequency.
Keep in mind all real-world filters have some time delay, or phase shift, between their input and output, and the delay depends on the frequency of the input signal. A low-pass Bessel filter, for example, has a linear phase delay across its pass band. When you must preserve phase and time relationships between signals, a linear-phase filter will work well.