circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

March 2006 , Issue 188

FIR Factor


by Tom Cantrell


NOISE BUSTERS 

So far, we’ve got a decently fast, decently accurate ADC with a SPI interface. Nothing especially newsworthy about that with any number of similar chips available from the usual suspects (Maxim, Linear Devices, Analog Devices, Texas Instruments, etc.). Turning back to the block diagram, now let’s take a look at the built-in FIR filters that separate the Quickfilter chip from all the rest.

Needless the say, the topic of filters is a long-storied one. I could write a year’s worth of columns and still not come close to covering the subject in its entirety. If you want a taste, just punch something like “filter tutorial” into your favorite search engine. See what I mean? I’m just going to hit some highlights to set the stage for aspects of the discussion that most closely relate to the chip at hand.

To start, recall that the basic function of a filter is to pass frequencies of interest (the passband) while attenuating everything else (the stopband), as you can see in Figure 3. The merit (and, not surprisingly, the cost) of a particular filter implementation is defined by how well it does the job. There are a few factors to consider.

(Click here to enlarge)

Figure 3—All filters share the same basic goal of cleanly passing signals in the passband while suppressing those in the stopband. A good filter is characterized by a flat passband (i.e., less ripple), a highly attenuated stopband, and a sharp transition between the two.

Most basic is the degree of attenuation between the passband and stopband. This measures the ability of the filter to separate the wheat (frequencies of interest) from the chaff (everything else). For example, a filter with 60 dB of stopband attenuation reduces the amplitude of unwanted frequencies by a factor of 1,000.

Another key factor is the selectivity, or quality, of the filter as measured by the slope of the roll on and off. An ideal filter has a brick wall (i.e., rectangular) shape with a sharp transition between passband and stopband.

In the real world, the simplest filters will have a gentle slope in the transition region, as little as 20 dB per decade. Assuming 60-dB attenuation between passband and stopband, that means full transition will span a frequency range of 1,000× (i.e., three decades). In some applications, such leisurely roll on/off isn’t necessarily a problem because the frequencies of interest may be widely separated from the most troublesome noise source. For example, if you’re looking at a 60-kHz signal but need to stamp out 60-Hz hum, 20 dB per decade will be fine.

Now let’s turn our attention to the passband. What happens to signals that make it through the filter? Do they look exactly the same as when they came in? An ideal brick wall filter would pass such signals with perfect fidelity (i.e., the top of the wall is perfectly flat). But once again, in actual practice, a real-world filter passband may exhibit some ripple or otherwise non-flat response (i.e., varying gain for different frequencies within the passband). The same goes for the stopband, but these glitches are of less concern as long as the overall stopband attenuation specification isn’t breached.

Another thing to watch out for is phase nonlinearity. Different frequencies within the passband may exhibit different delays through the filter. If you’re just interested in looking at a signal, this may not be a big deal. But if you intend to otherwise use the input signal to reconstruct an output signal, phase shift could be a problem. The timing between signals at different frequencies within the passband would change as they pass through the filter.

So far, this discussion has conceptually been about a mix of sine waves flowing through the filter. But in some applications, the filter reaction to a single transition (impulse response) may be a consideration. A filter that works well with a sine wave may exhibit ringing or other anomalies in response to an impulse. Another item of possible concern is the time it takes an input to pass through the filter and be detected on the output (i.e., latency), which could be a gotcha for fast-acquisition applications.