Cascaded integrator–comb filter

From HandWiki

In digital signal processing, a cascaded integrator–comb (CIC) is a computationally efficient class of low-pass finite impulse response (FIR) filter that chains N number of integrator and comb filter pairs (where N is the filter's order) to form a decimator or interpolator. In a decimating CIC, the input signal is first fed through N integrator stages, followed by a down-sampler, and then N comb stages. An interpolating CIC (e.g. Figure 1) has the reverse order of this architecture, but with the down-sampler replaced with a zero-stuffer (up-sampler).[1][2]

Operation

Figure 1: Hogenauer non-pipelined CIC interpolator. In the middle, a zero-stuffer up-sampler by factor of [math]\displaystyle{ R }[/math] converts from the low sampling rate of [math]\displaystyle{ \tfrac{f_s}{R} }[/math] used by the comb stages (left half) to the high sampling rate of [math]\displaystyle{ f_s }[/math] used by the integrator stages (right half).

CIC filters were invented by Eugene B. Hogenauer in 1979[3] (published in 1981), and are a class of FIR filters used in multi-rate digital signal processing.

Unlike most FIR filters, it has a down-sampler or up-sampler in the middle of the structure, which converts between the high sampling rate of [math]\displaystyle{ f_s }[/math] used by the integrator stages and the low sampling rate of [math]\displaystyle{ \tfrac{f_s}{R} }[/math] used by the comb stages.[1]

Transfer function

At the high sampling rate of [math]\displaystyle{ f_s }[/math], a CIC's transfer function in the z-domain is:

[math]\displaystyle{ \begin{align} H(z) &=\left [ \sum_{k=0}^{RM-1}z^{-k} \right ] ^N \\ &= \left ( \frac{1-z^{-RM}}{1-z^{-1}} \right ) ^N \end{align} }[/math]

where:

[math]\displaystyle{ R }[/math] is the decimation or interpolation ratio,
[math]\displaystyle{ M }[/math] is the number of samples per stage (usually 1 but sometimes 2), and
[math]\displaystyle{ N }[/math] is the order: the number of comb-integrator pairs.
  • The numerator comes from multiplying [math]\displaystyle{ N }[/math] negative feedforward comb stages (each is simply multiplication by [math]\displaystyle{ 1-z^{-RM} }[/math] in the z-domain).
  • The denominator comes from multiplying [math]\displaystyle{ N }[/math] integrator stages (each is simply multiplication by [math]\displaystyle{ \tfrac{1}{1-z^\text{-1}} }[/math] in the z-domain).

Integrator–comb is simple moving average

An integrator–comb filter is an efficient implementation of a simple 1st-order moving-average FIR filter, with division by [math]\displaystyle{ RM }[/math] omitted.[note 1] To see this, consider how a simple moving average filter can be implemented recursively by adding the newest sample [math]\displaystyle{ x[n] }[/math] to the previous result [math]\displaystyle{ y[n-1] }[/math] and subtracting the oldest sample [math]\displaystyle{ x[n-RM] }[/math]:

[math]\displaystyle{ \begin{align} y[n] &= \sum_{k=0}^{RM-1} x[n-k] \\ y[n] &= y[n-1] + \underbrace{x[n] - x[n-RM]}_{\text{comb filter }c[n]}. \end{align} }[/math]

The second equality corresponds to a comb filter ([math]\displaystyle{ c[n] = x[n] - x[n-RM] }[/math]) that gets integrated ([math]\displaystyle{ y[n] = y[n-1] + c[n] }[/math]).

Cascaded integrator–comb yields higher-order moving average

Higher-order CIC structures are obtained by cascading [math]\displaystyle{ N }[/math] identical simple moving average filters, then rearranging the sections to place all integrators first (decimator) or combs first (interpolator). Such rearrangement is possible because both the combs, the integrators, and the entire structure are linear time-invariant (LTI) systems.

In the interpolating CIC, its upsampler (which normally precedes an interpolation filter) is passed through the comb sections using a Noble identity, reducing the number of delay elements needed by a factor of [math]\displaystyle{ R }[/math]. Similarly, in the decimating CIC, its downsampler (which normally follows a decimation filter) is moved before the comb sections.

Features

1st-order pole-zero map (RM=8)

CIC filters have some appealing features:

  • Linear phase response (i.e. constant group delay).
  • Utilize only delay, addition, and subtraction.
    • No expensive multiplication.
  • Bit growth of [math]\displaystyle{ N \log_2(RM) }[/math], due to equivalence with moving average.[4]
  • Shape of the filter's main lobe changes very little when the decimation ratio is changed.[5]

Frequency response

1st, 2nd, 3rd-order CIC filters (RM=8) normalized frequency response. Top plot in linear gain, bottom plot in dB.

In the z-domain, each integrator contributes one pole at DC ([math]\displaystyle{ z{=}1 }[/math]) and one zero at the origin ([math]\displaystyle{ z{=}0 }[/math]). Each comb contributes [math]\displaystyle{ RM }[/math] poles at the origin and [math]\displaystyle{ RM }[/math] zeroes that are equally-spaced around the z-domain's unit circle, but its first zero at DC cancels out with each integrator's pole. Nth-order CIC filters have N times as many poles and zeros in the same locations as the 1st-order.

Thus, the 1st-order CIC's frequency response is a crude low-pass filter. Typically the gain is normalized by diving by [math]\displaystyle{ (RM)^N }[/math] so DC has the peak of unity gain. The main lobes drop off as it reaches the next zero, and is followed by a series of successive lobes that have smaller and smaller peaks, separated by the subsequent zeros. This approximates at large [math]\displaystyle{ R }[/math] a sinc-in-frequency.

An Nth-order CIC's shape corresponds to multiplying that sinc shape on itself N times, resulting in successively greater attenuation. Thus, Nth-order CIC filters are called sincN filters. The first sidelobe is attenuated ~13N dB.

The CIC filter's possible range of responses is limited by this shape. Larger amounts of stopband rejection can be achieved by increasing the order, but that increases attenuation in the passband and requires increased bit width for the integrator and comb sections. For this reason, many real-world filtering requirements cannot be met by a CIC filter alone.

Shape compensation

A short to moderate length FIR or infinite impulse response (IIR) filter can compensate for the falling slope of a CIC filter's shape.[5] Multiple interpolation and decimation rates can reuse the same set of compensation FIR coefficients, since the shape of the CIC's main lobe changes very little when the decimation ratio is changed.[5]Figure 11(b)

Comparison with other FIR filters

  • CIC filters are used primarily in multi-rate processing. Meanwhile, FIR filters in general are used in a wide array of applications, and can be used in multi-rate processing in conjunction with an interpolator or decimator.
  • CIC filters have low pass frequency characteristics,[1] while FIR filters can have low-pass, high-pass, or band-pass frequency characteristics.
  • CIC filters use only addition and subtraction.[1] FIR filters use addition, subtraction, but most FIR filters also require multiplication.
  • CIC filters have a specific frequency roll-off,[1] while low pass FIR filters can have an arbitrarily sharp frequency roll-off.
  • CIC filters are in general much more economical than general FIR filters,[1] but tradeoffs are involved.
    • In cases where only a small amount of interpolation or decimation are needed, FIR filters generally have the advantage. However, when rates change by a factor of 10 or more, achieving a useful FIR filter anti-aliasing stop band requires many FIR taps.
    • For large rate changes, a CIC has a significant advantage over a FIR filter with respect to architectural and computational efficiency.[1]
    • Additionally, CIC filters can typically be reconfigured for different rates by changing nothing more than the decimation/interpolation section assuming the bit width of the integrators and comb sections meets certain mathematical criteria based on the maximum possible rate change.
  • CIC filter uses only fixed point math, while FIR filters can use fixed or floating point math.[1]
    • This is necessary because, as a recursively implemented FIR filter, a CIC filter relies on exact cancellation of poles from the integrator sections by zeros from the comb sections. While the reasons are less than intuitive, an inherent characteristic of the CIC architecture is that if fixed bit length overflows occur in the integrators, they are corrected in the comb sections.[1]

Notes

  1. Division by the constant [math]\displaystyle{ RM }[/math] could be added before or after the filter to make it an average. If [math]\displaystyle{ RM }[/math] is a power of two, that division can be easily implemented with an inexpensive binary right shift or by simply treating the input or output numbers as fixed-point binary.

References

  1. 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 Hogenauer, Eugene B. (April 1981). "An economical class of digital filters for decimation and interpolation". IEEE Transactions on Acoustics, Speech, and Signal Processing 29 (2): 155–162. doi:10.1109/TASSP.1981.1163535. https://www.researchgate.net/publication/3176890. 
  2. Donadio, Matthew (2000) CIC Filter Introduction "Hogenauer introduced an important class of digital filters called 'Cascaded Integrator-Comb', or 'CIC' for short (also sometimes called 'Hogenauer filters').
  3. Lyons, Richard G. (2012-02-20). "The History of CIC Filters: The Untold Story". https://www.dsprelated.com/showarticle/160.php. 
  4. Hogenauer 1981, Eq. 11
  5. 5.0 5.1 5.2 Richard, Lyons (2020-03-26). "A Beginner's Guide To Cascaded Integrator-Comb (CIC) Filters". https://www.dsprelated.com/showarticle/1337.php. 

See also

External links