Open access peer-reviewed chapter

On Design of CIC Decimators

By Gordana Jovanovic Dolecek and Javier Diaz-Carmona

Submitted: November 22nd 2010Reviewed: April 11th 2011Published: September 9th 2011

DOI: 10.5772/22673

Downloaded: 6044

1. Introduction

The process of changing sampling rate of a signal is called sampling rate conversion (SRC).

Systems that employ multiple sampling rates in the processing of digital signals are called multirate digital signal processing systems.

Multirate systems have different applications, such as efficient filtering, subband coding, audio and video signals, analog/digital conversion, software defined radio and communications, among others (Jovanovic Dolecek, 2002).

The reduction of a sampling rate is called decimation and consists of two stages: filtering and downsampling. If signal is not properly bandlimited the overlapping of the repeated replicas of the original spectrum occurs. This effect is called aliasing and may destroy the useful information of the decimated signal. That is why we need filtering to avoid this unwanted effect.

The most simple decimation filter is comb filter which does not require multipliers. One efficient implementation of this filter is called CIC (Cascaded-Integrator-Comb) filter proposed by Hogenauer (Hogenauer, 1981). Because of the popularity of this structure many authors also call the comb filter as CIC filter. In this chapter we will use term CIC filter. Due to its simplicity, the CIC filter is usually used in the first stage of decimation. However, the filter exhibits a high passband droop and a low attenuation in so called folding bands (bands around the zeros of CIC filter), which can be not acceptable in different applications. During last several years the improvement of the CIC filter characteristics attracted many researchers. Different methods have been proposed to improve the characteristics of the CIC filters, keeping its simplicity.

In this chapter we present different proposed methods to improve CIC magnitude characteristics illustrated with examples and MATLAB programs.

The rest of the chapter is organized in the following way. Next Section describes the CIC filter. Section 3 introduces the methods for the CIC passband improvement followed by the Section 4 which presents the methods for the CIC stopband improvement. The methods for both, the CIC passband and stopband improvements are described in Section 5.

2. CIC filter

CIC (Cascaded-Integrator-Comb) filter (Hogenauer, 1981) is widely used as the decimation filter due to its simplicity; it requires no multiplication or coefficient storage but rather only additions/subtractions. This filter consists of two main sections, cascaded integrators and combs, separated by a down-sampler, as shown in Fig. 1.

Figure 1.

CIC filter.

The transfer function of the resulting decimation filter, also known as a RRS (recursive running sum) or comb filter is given by

Hcomb(z)=[1M(1zM1z1)]KE1

where M is the decimation factor, and K is the number of the stages. The transfer function in (Eq. 1) will be also referred to as the comb filter. The integrator section works at the higher input data rate thereby resulting in higher chip area and higher power dissipation for this section. In order to resolve this problem the non-recursive structure of Eq. (1) can be used (Aboushady et al., 2001), (Gao at al., 2000),

H(z)=[1M]K[1+z1+z2+...+z(M1)]KE2

Implementing H(z) of Eq. (2) in a polyphase form, the filtering at the high input rate can be moved to the lower rate. In this chapter we do not discuss the CIC implementation issues.

2.1. Magnitude characteristic

The magnitude characteristic of the comb decimator must satisfy two requirements:

  • To have a low droop in the frequency band defined by the passband frequency ωp in order to preserve the signal after decimation.

  • To have a high attenuations in so called folding bands, i. e. the bands around of the zeros of the comb filter,

[2πiMωp;2πiM+ωp], for
i={1,...,M/2forM even1,...,(M1)/2forM oddE3

We define the passband frequency as the frequency where the worst case of passband droop occurs, (Kwentus, Willson, 1997),

ωp=πMRE4

where R is the decimation stage that follows the CIC decimation stage, and that is usually much less than M.

The magnitude response of the comb filter exhibits a linear-phase, lowpass characteristic which can be expressed as

|Hcomb(ejω)|=|1Msin(ωM/2)sin(ω/2)|KE5

Figure 2.a shows the magnitude characteristics in dB for M=8 and the values of K=1, 3, and 5.

Figure 2.

Magnitude responses of comb filters.

Note that the attenuations in the folding bands are increased by increasing the numbers of stages. However, an increasing in the number of stages results in the increasing of the passband droop as shown in Fig. 2.b. In the continuation we will consider different methods to improve the comb magnitude characteristics keeping its simplicity.

3. Methods for the passband improvement

The motivation behind the compensation methods is to appropriately modify the original CIC characteristic in the desired passband such that the compensator filter has as low complexity as possible. Different methods have been proposed to compensate for the CIC passband droop. We classify the methods as the methods for the narrowband compensation (R>2), and the methods for the wideband compensation (R=2). Methods specified in (Fernandez-Vazquez & Jovanovic Dolecek, 2009, 2011), (Kim et al. 2006) employ optimization techniques, whereby the resulting compensation filters require multipliers. The method described in (Yeung & Chan, 2004) suggests the multiplierless design of a second order compensation filter where the filter coefficients are expressed as a sum of power of two (SOPOT) and are computed using the random search algorithm. The simple multiplierless compensator with only one parameter, which depends on the number of the stages K of the CIC filter, is proposed in (Jovanovic Dolecek & Mitra, 2008). This filter provides a good compensation in a narrow passband. The wide-band compensators have been recently proposed in (Jovanovic Dolecek, 2009), and (Jovanovic Dolecek & Dolecek, 2010).

We define the following desirable CIC compensator properties:

  • The proposed filter should work at a low sampling rate;

  • Multiplierless design and a second order at low rate;

  • Simple design i.e., that it is not necessary redesign the filter for new values of M and K;

  • That the compensation filter practically does not depends on the decimation factor M. This is a very desirable characteristic because the compensator remains the same across different values of M, provided that the value of K stays the same.

3.1. Narrowband CIC compensation

We describe here the compensation filter (Jovanovic Dolecek & Mitra, 2008) because this filter satisfies all the properties mentioned previously.

Consider a filter with the magnitude response

|G(ejω)|=|1+2bsin2(ωM/2)|E6

where b is a integer parameter.

Using the well known relation

sin2(α)=(1cos(2α))/2E7

the corresponding transfer function can be expressed as

G(zM)=2(b+2)[1(2b+2+2)zM+z2M]E8

Denoting

A=2(b+2);B=(2b+2+2)E9

we arrive at

G(zM)=A[1BzM+z2M]E10

The compensator filter has the scaling factor A and a single coefficient B which requires only one adder. Additionally, the compensator can be implemented at a lower rate after the downsampling by M by making use of the multirate identity (Jovanovic Dolecek, 2002), becoming a second order filter,

G(z)=A[1Bz1+z2]E11

In that way the filter does not depend on the decimation factor M but only on the number of the stages K which defines the parameter b in (Eq. 9). Table 1 shows typical values for b at different values of K.

Parameter KParameter b, R=8
22
32
41
50
60

Table 1.

Typical parameters b for different values of K.

The overall transfer function of the cascaded CIC and compensator is

H(z)=Hcomb(z)G(zM)E12

where Hcomb(z) and G(zM) are given in (Eq. 1) and (Eq. 10), respectively.

Example 1: We compensate the CIC filter with M=16 and K=5. From Table 1 we have b=0. The passband characteristics of the compensator, along with that of the compensated CIC and the CIC filters, are shown in Fig.3.

3.2. Wideband CIC compensation

We turn now our attention to the wideband compensators satisfying the desirable characteristics previously mentioned.

In (Jovanovic Dolecek, 2009) a novel decimation filter

G(zM)=GcK1(zM),E13

is proposed, where K1 is the parameter that depends on the number of cascaded CIC filters K,

K1={Kfor1<K3K1forK>3E14

and

Gc(zM)=24[zM(24+2)z2M+z3M]E15

The coefficients of the filter (Eq. 15) are obtained using the condition that the compensator magnitude characteristic has the value 1 for ω=0 and minimizing the squared error in the passband. Finally, the coefficients thus obtained are rounded using the rounding constant r=2-6.

Figure 3.

Magnitude responses of CIC, Compensator and cascaded CIC-compensator.

The total number of additions depends on K, as given by

Nadd={3KforK33K3forK>3E16

This filter can be moved to a lower rate becoming

G(z)=24[z1(24+2)z2+z3]E17

The overall transfer function of the compensated CIC filter, obtained from (Eq. 1) and (Eq. 13)-(Eq. 15) is as follows

H(z)=Hcomb(z)G(zM)=Hcomb(z)GcK1(zM)E18

Note that the filter (Eq. 17) does not depend on the decimation factor M. Additionally, the filter (Eq. 17) has a very interesting property i.e. it does not depend on K and its structure remains the same for all values of K and M. However, the number of the cascaded compensators K1 depends on the parameter K, as indicated in (Eq. 14). The method is illustrated in the following example.

Example 2: In this example we compensate the CIC filter with M=20 and K=5. From (Eq. 14) it follows that K1=4. The magnitude responses of the compensated CIC, along with the responses of the compensator and CIC filters, are shown in Fig.4. From (Eq. 16) the total number of adders in compensator 3K-3, equal 12.

Figure 4.

Wideband compensation method (Jovanovic Dolecek, 2009).

Example 3: In this example we apply the compensator from (Jovanovic Dolecek, 2009) to the CIC filter with M=25 and K=2; in this case K1=2. The required number of adders for the decimator is 3K=6. Figure 5 shows the corresponding magnitude responses.

We will refer here the method from (Jovanovic Dolecek, 2009) as the Compensation method 1.

Another simple wideband multiplierless compensator has been proposed in (Jovanovic Dolecek & Dolecek, 2010). The goal put in it, was that the resulting passband deviation be less than 0.4 dB, and to decrease the number of adders comparing with the Compensation method 1.

To this end the following filter has been proposed,

Hc(zM)=bzM+az2M+bz3ME19

with the corresponding magnitude response

|Hc(ω)|=|2bcos(Mω)+a|E20

The coefficients a and b, obtained in (Jovanovic Dolecek & Dolecek, 2010), are as follows

b=0.5[1αMKsinK(π/4M)sinK(π/4)]E21
a=1[1αMKsinK(π/4M)sinK(π/4)]E22

Figure 5.

Wideband CIC compensation using the Compensation method 1.

The initial value of the parameter α is 1 and the value is adjusted in order to satisfy

max{|1Hc(ω)H(ω)|}=dpδpω[0,ωp].E23

Let us indicate how the coefficients a and b depend on M for a given K. To this end, considering that for a small value of φ, sin(φ) ~ φ, and knowing that M»1, we have

b0.5[1απK4KsinK(π/4)]E24
a1[1απK4KsinK(π/4)]E25

From (Eq. 20), (Eq. 24) and (Eq. 25) it follows the desirable characteristic, that the compensator does not depend on the decimation factor M but only on the parameter K, is satisfied. Next, the coefficients (Eq. 24) and (Eq. 25) are rounded to the nearest integer, using the rounding constant r=2-5, resulting in

Hp(zM)=S[BzM+Az2M+Bz3M]E26

where S is the scaling factor and A and B are integers, which can be implemented using only adders and shifts. Consequently the decimator (26) is also multiplierless.

We also note that the compensator can be moved to a lower rate using the multirate identity, (Jovanovic Dolecek, 2002), thereby becoming a second order filter,

Hp(zM)=S[Bz1+Az2+Bz3]E27

Table 2 shows the values for S, A and B for different values of K. The total number of additions and the corresponding passband deviations are also shown.

KSBAdp[dB]Number of additions
12-4-124+210.1423
22-3-123+210.2343
32-4-2-2024+22+210.2975
42-2-122+210.3423
52-4-22-2024+23+210.3775

Table 2.

The design parameters.

We make the following observations:

  • The maximum number of adders is 5.

  • The passband deviation is less than δp=0.4dB.

  • The smallest deviation is obtained for K = 1, (dp=0.142dB), while the largest is for K = 5, (dp=0.377dB).

The method is illustrated in the following examples.

Example 4: We compensate the CIC filter with M=32 and K=4. The values of B, A, and S, from Table 2, are -1, 22+21, and 2-2, respectively. The magnitude responses are illustrated in Fig.6.

Example 5: We compare the methods (Jovanovic Dolecek, 2009) and (Jovanovic Dolecek & Dolecek, 2010) for M=16 and K=4 and 5. The result is shown in Fig. 7. For K=4 the methods (Jovanovic Dolecek, 2009) and (Jovanovic Dolecek & Dolecek, 2010) require 9 and 3 adders, respectively. For K=5 the method (Jovanovic Dolecek & Dolecek, 2010) requires 5 adders whereas the method (Jovanovic Dolecek, 2009) requires 12 adders.

Figure 6.

Wideband CIC compensation using the method (Jovanovic Dolecek & Dolecek, 2010).

4. Methods for the stopband improvement

Presti, (Presti, 2000), introduced the CIC zero rotation and proposed the Rotated Sinc (RS) filter to increase the attenuations and widths in the folding bands. By applying a clockwise rotation of β radians to any zero of CIC filter, we obtain the following transfer function

Hu(z)=1M1zMejβM1z1ejβE28

An expression equivalent to (Eq. 28) is obtained by applying the opposite rotation

Hd(z)=1M1zMejβM1z1ejβE29

These two filters have complex coefficients, but they can be cascaded, thus obtaining a filter Hr(z) with real coefficients

Hr(z)=Hu(z)Hd(z)=1M212cos(βM)zM+z2M12cos(β)z1+z2E30

Figure 7.

Comparisons of compensators.

The cascade of CIC filter and the filter (Eq. 30) is reffered by Presti as RS filter, HR(z),

HR(z)=Hcomb(z)Hr(z)E31

The magnitude response of this filter is given as

|HR(ejω)|=|1M3sin(ωM/2)sin(ω/2)|K|sin((ω+β)M/2)sin((ω+β)/2)|K|sin((ωβ)M/2)sin((ωβ)/2)|KE32

Example 6: Using the method Presti, we design the RS filter for M=16, K=1, and β=0.0184. The magnitude response is shown in Fig.8.

Figure 8.

Illustration of RS filter. (Presti, 2000).

Note that the folding band widths are wider and the attenuations are increased in comparison with the CIC filter. However, the passband droop is increased and additionally RS filter needs two multipliers, one working at high input rate. (See (Eq. 30)).

In (Jovanovic Dolecek & Mitra, 2004) the modification of the Presti method has been proposed for the case if M can be represented as a product of two factors

M=M1M2E33

The transfer function (Eq. 1) can be rewritten as

H(z)=H1K1(z)H2K2(zM1)E34

where

H1(z)=1M11zM11z1;       H2(zM1)=1M21zM1M21zM1E35

The filter H2(z) can be moved to a low rate which is M2 time lesser than the high input rate. Additionally, the polyphase decomposition of the filter H1(z) move all filtering to a lower rate. The corresponding RS filter is modified in such way that it can also be moved to a lower rate.

Hrm(z)=Hum(z)Hdm(z)=1M2212cos(βM)zM+z2M12cos(βM1)z1+z2M1E36

The modified RS filter is

HRm(z)=Hcomb(z)Hrm(z)E37

The corresponding magnitude response is

|HRm(ejω)|=|1Msin(ωM/2)sin(ω/2)|K|sin((ω+β)M/2)Msin((ω+β)M1/2)||sin((ωβ)M/2)Msin((ωβ)M1/2)|E38

Next example compares the (Eq. 38) with the RS filter.

Example 7: We use the same design parameters as in Example 6 taking K1=3 and K2=2 and M1=M2=4. The magnitude responses along with the zoom in the first folding band are shown in Fig. 9. Note that the attenuation in the all folding bands except the last one, are improved. Additionally, the filter Hr(z) works at a lower rate.

The method in (Jovanovic Dolecek & Mitra, 2005a) includes the multistage structure and improves deteriorated passband. The generalized approach to the CIC zero-rotation, has been proposed in (Laddomada, 2007), where the generalized comb (GC) has been proposed. An economical class of droop-compensated GC filters has been proposed in (Jovanovic Dolecek & Laddomada, 2010).

Note the following:

  • Folding bands are wider and with increased attenuations comparing with those of the corresponding comb filter.

  • The RS filter needs two multipliers, one working at the high input rate.

  • During the quantization of the coefficients in RS filter, the pole-zero cancellation can be lost resulting in instability.

  • The most critical is the first folding band of a comb filter where the worst case aliasing occurs because it has less attenuation than other folding bands.

To this end in order to solve some of the above mentioned problems we propose to introduce the zero-rotation only in the first folding band yielding in the zero-rotation term (ZRT), (Jovanovic Dolecek, 2010a),

HZR(z)=k(1z1ejβ)(1z1ejβ)=k(12cos(β)z1+z2)E39

where k is the normalizing constant introduced to ensure that the magnitude characteristic is equal to 1 at ω =0.

Figure 9.

Comparison of RS and modified RS filters.

Considering that R in (Eq. 4) is equal to 2, the pass band is defined by the pass band cutoff frequency

ωp=π2ME40

The introduced zero must be in the first folding band, near the point where the worst case aliasing occurs, 2π/M-ωp,

β=2πMπ(β0+2)ME41

where β0 is the term which approaches slightly zero from the left end of the first folding band to the right position, within the first folding band. Typical value for β0=0.99. The normalized constant k is,

k=122cos(2πMπ(β0+2)M)E42

Using (Eq. 41) the cascade of the combs from (Eq. 1) and the ZRT (Eq. 39) is given as

HCOMB,ZR=[1M1zM1z1]K×k(12z1cos(2πMπ(β0+2)M)+z2)E43

The first folding band is wider than the CIC first folding band. However, the side lobes are increased and the pass band droop is also increased. To decrease attenuation in all other folding bands we propose to use cascade of the expanded cosine filters,

HCOS(z)=k[12(1+zNk)]KkE44

resulting in

HCOMB,ZR,COS(z)=HCOMB(z)HZR(z)HCOS(z)E45

The method is illustrated in the following example.

Example 8: Let us consider CIC filter with M=12, K=5 and K=6. The expanded cosine filters are

HCOS(z)=k=16[12(1+zNk)]Kk,Nk=k;K1=2;Kk=1,   for  k=2,...,6;E46

The magnitude responses along with the passband zoom are shown in Fig.10. Note that the first folding band is wider and that exhibits higher attenuation than the first folding bands of CIC filters for K=5 and 6. See (Jovanovic Dolecek, 2010a) for more details about the choice of design parameters and the multiplierless design.

Figure 10.

Illustration of method (Jovanovic Dolecek, 2010a).

Another approach to improving the CIC stopband characteristic has been proposed in (Jovanovic Dolecek & Diaz-Carmona, 2005). The method is based on the cosine prefilters introduced in (Lian & Lim, 1993). Recently, the method based on the extended search of cyclotomic polynomials has been also proposed (Laddomada at al, 2011).

5. Methods for the passband and stopband improvement

In this section we consider some methods applied for the simultaneous improvement in the CIC passband and stopband. The pioneer work has been presented in (Kwentus & Willson, 1997), where the sharpening technique originally introduced by (Kaiser & Hamming, 1977) was applied. The sharpening technique uses the sharpening polynomials to improve the passband and the stopband characteristics of the symmetrical FIR (Finite impulse response) filter. Kwentus and Willson used the polynomial Hsh=3H2-2H3, where H is the CIC filter (Eq. 1) and K=K1. The corresponding magnitude response of the sharpened CIC filter is

|Hshcomb(ejω)|=|3(1Msin(ωM/2)sin(ω/2))2K12(1Msin(ωM/2)sin(ω/2))3K1|E47

The method is illustrated in the Example 9.

Example 9: The parameters of the CIC filter are M=16 and K=5 and K1=3. Figure 11a shows the magnitude responses of the sharpened CIC filter and the CIC filter with K=5. Figure 11b shows the zooms in the passband and in the first folding band. Note that both the passband and the stopband are improved.

The main drawback of this method is that the sharpening is performed at high input rate. A method where the decimation is split into two stages, and the sharpening is performed only in the second stage considering that the decimation factor M is an even number, has been proposed in (Jovanovic Dolecek & Mitra, 2003). The method was generalized later for the case where the decimation factor M can be expressed as in (Eq. 33). The first stage is the less simple CIC filter (M1<M), which can be implemented either in recursive or non recursive form.

H1(z)=1M11zM11z1=i=0M11ziE48

In the second stage is the less complex CIC filter, (M2<M)

H2(z)=1M21zM21z1E49

The overall transfer function is

H(z)=H1K1(z)Sh{H2K2(zM1)}E50

where Sh{.} means sharpening of {.}, and

K12K2E51

Figure 11.

Illustration of sharpening method.

The corresponding magnitude response is

|H(ejω)|=|(1M1sin(ωM1/2)sin(ω/2))K1{3×(1M2sin(ωM/2)sin(ωM1/2))2K22×(1M2sin(ωM/2)sin(ωM1/2))3K2}|E52

Next examples (Eq. 10) and (Eq. 11) illustrate the method.

Example 10: Consider M=16 and M1=M2=4. The parameters K1 and K2 are respectively 5, and 2, and K=4. The magnitude responses and the pasband zoom are shown in Fig.12.

In the following example we compare the original sharpening method with the modified sharpening method (Jovanovic Dolecek & Mitra, 2005b).

Example 11. We compare the modified sharpening method with the original sharpening method, considering M=16 and K=4. In the modified sharpening M1=M2=4, K1=5 and K2=4. Figure 13 shows the magnitude responses and the corresponding passband zoom. Note that the original sharpening has better passband characteristic while the modified sharpening method has higher attenuations in the folding bands.

Figure 12.

Modified sharpening and CIC filters magnitude responses.

The number of authors presented different modifications of sharpening method, like (Jovanovic Dolecek, 2010b), (Laddomada & Mondin, 2004), (Jovanovic Dolecek & Harris, 2009). In (Jovanovic Dolecek & Mitra, 2010), the two-stage CIC filter with the compensator (Eq. 10) has been proposed.

Figure 13.

Comparison of original and modified sharpening method.

The procedure of the design is given in the following steps:

  1. For a given M choose the value M1, in a such way that the factors M1 and M2 are close to each other in values, such that M1M2 to obtain the filters (Eq. 48) and (Eq. 49).

  2. Choose the number of the stages K1 and K2 depending of the desired alias rejection (see Table 3 for tentative values).

  3. For given K1 and K2, choose value of b according to Table 3.

Parameters (K1, K2)A in dBb
(2,2)-46.52
(2,3)-68.751
(3,4)-92.251
(4,5)-1150
(4,6)-139.340

Table 3.

Parameters of design.

This method is illustrated in the following example.

Example 12: We consider the decimator with M =16 and at least 130 dB worst-case aliasing attenuation. We choose M1=M2=4. From Table 3 we get K1=4, K2=6 and b=0. The method is compared with the two-stage sharpening with K1=4 and K2=2 in Fig.14. Note that the two-stage compensated method has better characteristics.

Figure 14.

Comparison of two-stage methods: sharpening and compensated.

6. Conclusion

This chapter presents different methods that have been proposed to improve the magnitude characteristics of the CIC decimator. Particularly, the methods are divided into 3 groups depending if the improvement is only in the passband, the stopband or in both i.e. passband and stopband. Only a few methods in each group are described and illustrated in examples. All examples are done in MATLAB and programs can be downloaded from the INAOE web page www-elec.inaoep.mx/paginas_personales/gordana.php.

The CIC filter implementation, which is another important issue concerning the CIC filter, was not considered in this chapter.

Acknowledgments

Authors thank to CONACYT and to the Institute INAOE for the support.

How to cite and reference

Link to this chapter Copy to clipboard

Cite this chapter Copy to clipboard

Gordana Jovanovic Dolecek and Javier Diaz-Carmona (September 9th 2011). On Design of CIC Decimators, Applications of MATLAB in Science and Engineering, Tadeusz Micha&#322;owski, IntechOpen, DOI: 10.5772/22673. Available from:

chapter statistics

6044total chapter downloads

More statistics for editors and authors

Login to your personal dashboard for more detailed statistics on your publications.

Access personal reporting

Related Content

This Book

Next chapter

Fractional Delay Digital Filters

By Javier Diaz-Carmona and Gordana Jovanovic Dolecek

Related Book

First chapter

Monte Carlo Simulations in NDT

By Frank Sukowski and Norman Uhlmann

We are IntechOpen, the world's leading publisher of Open Access books. Built by scientists, for scientists. Our readership spans scientists, professors, researchers, librarians, and students, as well as business professionals. We share our knowledge and peer-reveiwed research papers with libraries, scientific and engineering societies, and also work with corporate R&D departments and government entities.

More about us