|Published (Last):||28 May 2014|
|PDF File Size:||12.59 Mb|
|ePub File Size:||2.29 Mb|
|Price:||Free* [*Free Regsitration Required]|
After describing a few applications of CIC filters, this blog introduces their structure and behavior, presents the frequency-domain performance of CIC filters, and discusses several important practical issues in implementing these filters. CIC filters are well-suited for anti-aliasing filtering prior to decimation sample rate reduction , as shown in Figure 1 a ; and for anti-imaging filtering for interpolated signals sample rate increase as in Figure 1 b.
Figure 1: CIC filter applications: a for decimation; b for interpolation. CIC filters originate from the notion of a recursive running sum filter, which is itself an efficient form of a nonrecursive moving averager.
Recall the standard D -point moving-average process in Figure 2 a. Figure 2: D -point moving-average and recursive running sum filters.
The z -domain expression for this moving averager's output is. We provide these equations not to make things complicated, but because they're useful. Equation 1 tells us how to build a moving averager, and Equation 3 is in the form used by commercial signal processing software to model the frequency-domain behavior of the moving averager. The next step in our journey toward understanding CIC filters is to consider an equivalent form of the moving averager, the recursive running sum filter depicted in Figure 2 b.
It's called "recursive" because it has feedback. Each filter output sample is retained and used to compute the next output value. The recursive running sum filter's difference equation is. We use the same H z variable for the transfer functions of the moving average filter and the recursive running sum filter because their transfer functions are equal to each other! It's true.
Equation 3 is the nonrecursive expression, and Equation 5 is the recursive expression, for a D -point averager. The mathematical proof of this can be found in Appendix B of Reference , but shortly I'll demonstrate that equivalency with in example. Here is why we care about recursive running sum filters: the standard moving averager in Figure 2 a must perform D —1 additions per output sample.
The recursive running sum filter has the sweet advantage that only one addition and one subtraction are required per output sample, regardless of the delay length D!
This computational efficiency makes the recursive running sum filter attractive in many applications seeking noise reduction through averaging. Next we'll see how a CIC filter is, itself, a recursive running sum filter.
The feedforward portion of the CIC filter is called the comb section, whose differential delay is D , while the feedback section is typically called an integrator. The comb stage subtracts a delayed input sample from the current input sample, and the integrator is simply an accumulator. The CIC filter's time-domain difference equation is.
If a unit impulse sequence, a unity-valued sample followed by many zero-valued samples, was applied to the comb stage, that stage's output is as shown in Figure 4 a. Think, now, what would be the output of the integrator if its input was the comb stage's impulse response. The initial positive impulse from the comb filter starts the integrator's all-ones output.
Then, D samples later the negative impulse from the comb stage arrives at the integrator to zero all further CIC filter output samples. The key issue is that the combined unit impulse response of the CIC filter, being a rectangular sequence, is identical to the unit impulse responses of a moving average filter and the recursive running sum filter.
Moving averagers, recursive running sum filters, and CIC filters are close kin. If you understand the time-domain behavior of a moving averager, then you now understand the time-domain behavior of the CIC filter in Figure 3. If we ignore the phase factor in Eq. This is why CIC filters are sometimes called sinc filters. The normally risky situation of having a filter pole directly on the z -plane's unit circle need not trouble us here because there can be no coefficient quantization error in our H cic z transfer function.
That's because CIC filter coefficients are ones and can be represented with perfect precision with fixed-point number formats. The filter pole will never be outside the unit circle. Although recursive, happily CIC filters are guaranteed-stable, linear-phase, and have finite-length impulse responses. Again, CIC filters are primarily used for anti-aliasing filtering prior to decimation, and for anti-imaging filtering for interpolated signals.
With those notions in mind we swap the order of Figure 2 C 's comb and integrator—we're permitted to do so because those operations are linear—and include decimation by an integer sample rate change factor R in Figure 6 a. In most CIC filter applications the rate change R is equal to the comb's differential delay D , but I'll keep them as separate design parameters for now. The spectral band, of width B Hz, centered at 0 Hz is the desired passband of the filter. A key aspect of CIC filters is the spectral folding that takes place due to decimation.
Notice how the largest aliased spectral component, in this 1st-order CIC filter example, is 16 dB below the peak of the band of interest.
Of course the aliased power levels depend on the bandwidth B ; the smaller B the lower the aliased energy after decimation. In this CIC filter discussion, interpolation is defined as zeros-insertion, called "zero stuffing", followed by CIC filter lowpass filtering. The interpolation filter's output spectrum in Figure 8 b shows how imperfect CIC filter lowpass filtering gives rise to the undesired spectral images.
If we follow the CIC filter with a traditional lowpass tapped-delay line FIR filter, whose stopband includes the first image band, fairly high image rejection can be achieved. The most common method to improve CIC filter anti-aliasing and image-reject attenuation is by cascading multiple CIC filters.
It's important to notice the W z term in Eq. The transfer function in Eq. The entire system in Figure 9 a is a multirate system, and multirate systems do not have z -domain transfer functions. See Reference  for more information on this subject. The frequency magnitude response of the Figure 9 b filter, from the x n input to the w n sequence, is:.
The price we pay for improved anti-alias attenuation is additional hardware adders and increased CIC filter passband droop downward mainlobe curvature. An additional penalty of increased filter order comes from the gain of the filter, which is exponential with the order M.
Because CIC filters generally must work with full precision to remain stable, the number of bits in the adders is M log 2 D , so there is a large data word-width penalty for higher order filters. In CIC filters, the comb section can precede, or follow, the integrator section. However it's sensible to put the comb section on the side of the filter operating at the lower sample rate. Swapping the Figure 6 comb filters with the down-sampling operations results in the most common implementation of CIC filters as shown in Figure That's because an N -sample comb delay after down-sampling by R is equivalent to a D -sample comb delay before down-sampling by R.
Likewise for the interpolation filter; an N -sample comb delay before up-sampling by R is equivalent to a D -sample comb delay after up-sampling by R. Both of these effects reduce hardware power consumption. Figure Reduced comb delay, single-stage, CIC filter implementations: a for decimation; b for interpolation. Variable N effectively sets the number of nulls in the frequency response of a decimation filter, as shown in Figure 11 a. Sample rate f s,out is the sample rate of the decimated output sequence.
An important characteristic of a fixed-order CIC decimator is the shape of the filter's mainlobe low frequency magnitude response changes very little, as shown in Figure 11 b , as a function of the decimation ratio. For R larger than roughly 16, the change in the filter's low frequency magnitude shape is negligible.
This allows the same compensation FIR filter to be used for variable-decimation ratio systems. The high gain of an M th-order CIC decimation filter can conveniently be made equal to one by binary right-shifting the filter's output samples by log 2 NR M bits when NR M is restricted to be an integer power of two.
CIC filters are computationally efficient i. But to be mathematically accurate they must be implemented with appropriate register bit widths. Let's now consider their register bit widths in order to follow the advice of a legendary lawman. CIC filters suffer from accumulator adder arithmetic register overflow because of the unity feedback at each integrator stage. This overflow is of no consequence as long as the following two conditions are met:.
When two's complement fixed-point arithmetic is used, the number of bits in an M th-order CIC decimation filter's integrator and comb registers must accommodate the filter's input signal's maximum amplitude times the filter's total gain of NR M. To be specific, overflow errors are avoided if the number of integrator and comb register bit widths is at least. In some CIC filtering applications there is the opportunity to discard some of the least significant bits LSBs within the accumulator adder stages of an M th-order CIC decimation filter, at the expense of added noise at the filter's output.
The specific effects of this LSB removal called "register pruning" are, however, a complicated issue so I refer the reader to References  for more details. These desirable properties are not provided by CIC filters alone, with their drooping mainlobe gains and wide transition regions. The compensation FIR filter's frequency magnitude response, ideally an inverted version of the CIC filter passband magnitude response, is similar to that shown by the long-dash curve in Figure 13 a.
If either the passband bandwidth or CIC filter order increases the correction becomes more robust, requiring more compensation FIR filter taps. Those dashed curves in Figure 13 represent the frequency magnitude responses of compensating FIR filters within which no sample rate change takes place. For completeness I'll mention that Reference  also presents a low-order IIR compensation filter for decimation applications where linear-phase filtering is not necessary.
That simple IIR filter's z-domain transfer function is:. I recently reviewed a copy of Reference  that recommends the simple and computationally-efficient decimation FIR compensation filter shown in Figure 14 a. The three-tap FIR compensation filter has only one non-unity coefficient. The coefficient's value depends on the order, M , of the CIC decimation filter being compensated, as shown in the table in Figure 14 A.
This compensation filter deserves consideration because it's linear-phase and was designed to be implemented without multiplication. I've seen decimation applications where a compensating FIR filter is designed to enable an additional, and final, output decimation by two operation.
That is, a CIC filter is followed by a compensation filter whose output is decimated by a factor of two. Such a compensation filter's frequency magnitude response looks similar to that in Figure 15, where f s ,in is the compensation filter's input sample rate. In such applications the transition region width of the cascaded CIC and compensation filter is determined by the transition region width of the compensation filter.
Figure Frequency magnitude response of a decimate-by-2 compensation FIR filter. Here's the bottom line of our CIC filter presentation: a decimating CIC filter is merely a very efficient recursive implementation of a moving average filter, with NR taps, whose output is decimated by R. Likewise, an interpolating CIC filter is insertion of R —1 zero samples between each input sample followed by an NR tap moving average filter running at the output sample rate f s ,out.
A Beginner's Guide To Cascaded Integrator-Comb (CIC) Filters
Comb filters are a class of low-complexity filters especially useful for multistage decimation processes. However, the magnitude response of comb filters presents a droop in the passband region and low stopband attenuation, which is undesirable in many applications. In this work, it is shown that, for stringent magnitude specifications, sharpening compensated comb filters requires a lower-degree sharpening polynomial compared to sharpening comb filters without compensation, resulting in a solution with lower computational complexity. Using a simple three-addition compensator and an optimization-based derivation of sharpening polynomials, we introduce an effective low-complexity filtering scheme.
Optimal Sharpening of Compensated Comb Decimation Filters: Analysis and Design
Skip to Main Content. Try These Tips. A not-for-profit organization, IEEE is the world's largest technical professional organization dedicated to advancing technology for the benefit of humanity. Use of this web site signifies your agreement to the terms and conditions.