Example: bankruptcy

CIC Filter Introduction

CIC Filter IntroductionMatthew P. July 2000 For Free Publication by Iowegian1 IntroductionAs data converters become faster and faster, the application of narrow-band extraction fromwideband sources, and narrow-band construction of wideband signals is becoming moreimportant. These functions require two basic signal processing procedures: decimation andinterpolation. And while digital hardware is becoming faster, there is still the need forefficient solutions. Techniques found in [CR83] work very well in practice, but large ratechanges require very narrow band filters. Large rate changes require fast multipliers andvery long filters. This can end up being the largest bottleneck in a DSP [Hog81], an efficient way of perfoming decimation and interpolation was devised a flexible, multiplier-free Filter suitable for hardware implementation, thatcan also handle arbitrary and large rate changes.

charecteristics. If H(z) is a symetric FIR lter, then a sharpened version, H S(z), can be expressed as H S(z) = H2(z)[3 2H(z)] (19) The magnitude response of a sharpened CIC lter would then be

Tags:

  Introduction, Filter, Cic filter introduction

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of CIC Filter Introduction

1 CIC Filter IntroductionMatthew P. July 2000 For Free Publication by Iowegian1 IntroductionAs data converters become faster and faster, the application of narrow-band extraction fromwideband sources, and narrow-band construction of wideband signals is becoming moreimportant. These functions require two basic signal processing procedures: decimation andinterpolation. And while digital hardware is becoming faster, there is still the need forefficient solutions. Techniques found in [CR83] work very well in practice, but large ratechanges require very narrow band filters. Large rate changes require fast multipliers andvery long filters. This can end up being the largest bottleneck in a DSP [Hog81], an efficient way of perfoming decimation and interpolation was devised a flexible, multiplier-free Filter suitable for hardware implementation, thatcan also handle arbitrary and large rate changes.

2 These are known ascascaded integrator-combfilters, or CIC filters for paper sumarizes the findings published in [Hog81]. An overview can also be found in[Fre94]. An extension of CIC filters has been published in [KJW97], and is briefly mentionedhere. When in doubt, the reader should refer to these Building BlocksThe two basic building blocks of a CIC Filter are an integrator and a comb. An integrator issimply a single-pole IIR Filter with a unity feedback coeficient:y[n] =y[n 1] +x[n](1)This system is also known as an accumulator. The transfer function for an integrator on thez-plane isHI(z) =11 z 1(2)1 Using the equations from [OS89] for a single pole system, we can determine that|HI(ej )|2=12(1 cos )ARG[HI(ej )] = tan 1[sin 1 cos ]grd[HI(ej )]={undefined = 0 12 6= 0(3)The power response is basically a low-pass Filter with a 20 dB per decade ( 6 dB peroctave) rolloff, but with infinite gain at DC.}

3 This is due to the single pole atz= 1; theoutput can grow without bound for a bounded input. In other words, a single integrator byitself is unstable."!# ?- -z 1 Figure 1: Basic IntegratorA comb Filter running at the high sampling rate,fs, for a rate change ofRis an odd-symetric FIR Filter described byy[n] =x[n] x[n RM](4)In this equation,Mis a design parameter and is called thedifferential be anypositive integer, but it is usally limited to 1 or 2. The corresponding transfer atfsHC(z) = 1 z RM(5)Again, we can determine that|HC(ej )|2= 2(1 cosRM )ARG[HC(ej )] = RM 2grd[HC(ej )]=RM2(6)WhenR= 1 andM= 1, the power response is a high-pass function with 20 dB per decade(6 dB per octave) gain (after all, it is the inverse of an integrator).

4 WhenRM6= 1, then thepower response takes on the familiar raised cosine form withRMcycles from 0 to 2 .When we build a CIC Filter , we cascade, or chain output to input,Nintegrator sectionstogether withNcomb sections. This Filter would be fine, but we can simplify it by combiningit with the rate changer. Using a technique for multirate analysis of LTI systems from [CR83],we can push the comb sections through the rate changer, and have them becomey[n] =x[n] x[n M](7)2at the slower sampling ratefsR. We accomplish three things here. First, we have slowed downhalf of the Filter and therefore increased efficiency. Second, we have reduced the number ofdelay elements needed in the comb sections. Third, and most important, the integrator andcomb structure are now independent of the rate change.

5 This means we can design a CICfilter with a programmable rate change and keep the same filtering structure."!# -?--z MFigure 2: Basic CombTo summarize, a CIC decimator would haveNcascaded integrator stages clocked atfs, followed by a rate change by a factorR, followed byNcascaded comb stages runningatfsR. A CIC interpolator would beNcascaded comb stages running atfsR, followed be azero-stuffer, followed byNcascaded integrator stages running atfs."!# --------?IIICCCRF igure 3: Three Stage Decimating CIC Filter "!# --------6 RCCCIIIF igure 4: Three Stage Interpolating CIC Filter3 Frequency CharacteristicsThe transfer function for a CIC Filter atfsisH(z) =HNI(z)HNC(z) =(1 z RM)N(1 z 1)N=(RM 1 k=0z k)N(8)This equation shows that even though a CIC has integrators in it, which by themselveshave an infinite impulse response, a CIC Filter is equivalent toNFIR filters, each having a3rectangular impulse response.

6 Since all of the coeficients of these FIR filters are unity, andtherefore symetric, a CIC Filter also has a linear phase response and constant group magnitude response at the output of the Filter can be shown to be|H(f)|= sin Mfsin fR N(9)By using the relation sinx xfor smallxand some algebra, we can approximate thisfunction for largeRas|H(f)| RMsin Mf Mf Nfor 0 f <1M(10)We can notice a few things about the response. One is that the output spectrum has nullsat multiples off=1M. In addition, the region around the null is where aliasing/imagingoccurs. If we definefcto be the cutoff of the usable passband, then the aliasing/imagingregions are at(i fc) f (i+fc)(11)forf 12andi= 1,2, ,bR2c. Iffc M2, then the maximum of these will occur at thelower edge of the first band, 1 fc.

7 The system designer must take this into consideration,and adjustR,M, andNas thing we can notice is that the passband attenuation is a function of the numberof stages. As a result, while increasing the number of stages improves the imaging/aliasrejection, it also increases the passband droop. We can also see that the DC gain of thefilter is a function of the rate Bit GrowthFor CIC decimators, the gainGat the output of the final comb section isG= (RM)N(12)Assuming two s complement arithmetic, we can use this result to calculate the numberof bits required for the last comb due to bit growth. IfBinis the number of input bits, thenthe number of output bits,Bout, isBout=dNlog2RM+Bine(13)It also turn out thatBoutbits are needed for each integrator and comb stage.

8 The inputneeds to be sign extended toBoutbits, but LSB s can either be truncated or rounded atlater stages. The analysis of this is beyond the scope of this tutorial, but is fully describedin [Hog81].For a CIC interpolator, the gain,G, at theith stage isGi={2ii= 1,2, ,N22N i(RM)i NR, i=N+ 1, ,2N(14)4As a result the register width,Wi, atith stage isWi=dBin+ log2 Gie(15)andWN=Bin+N 1(16)ifM= 1. Rounding or truncation cannot be used in CIC interpolators, except for the result,becuase the small errors introduced by rounding or truncation can grow without bound inthe integrator is now worth revisiting the unstable aspect of the integrator stages. It turns out thatit is not a problem. For decimators, integrator overflow is not a problem as long as two scomplement math is used and we don t expect an overall system gain>1.}

9 For interpolators,the comb stages and zero stuffing will prevent integrator Implementation DetailsBecause of the passband droop, and therefore narrow usable passband, many CIC designsutilize an additional FIR Filter at the low sampling rate. This Filter will equalize the passbanddroop and perform a low rate change, usually by a factor of two to many CIC designs, the rate changeRis programmable. Since the bit growth is afunction of the rate change, the Filter must be designed to handle both the largest andsmallest rate changes. The largest rate change will dictate the total bit width of the stages,and the smallest rate change will determine how many bits need to be kept in the final many designs, the output stage is followed by a shift register that selects the proper bitsfor transfer to the final output register.

10 A system designer can use the equation forBoutfor a decimator andW2 Nfor an interpolator to calculate proper shift a CIC decimator1, the normalized gain at the output of the last comb is given byg=(RM)N2dNlog2 RMe(17)This lies in the interval (12,1]. Note that whenRis a power of two, the gain is unity. Thisgain can be used to calculate a scale factor,s, to apply to the final shifted (RM)N(18)which lies in the interval [1,2). By doing this, the CIC decimation Filter can have unity Sharpened CIC FiltersFilter sharpening can be used to improve the response of a CIC Filter . This techniqueapplies the same Filter several times to an input to improve both passband and stopband1 This paragraph is an generalization of equations found in the datasheet for the Harris/Intersil IfH(z) is a symetric FIR Filter , then a sharpened version,HS(z), can beexpressed asHS(z) =H2(z)[3 2H(z)](19)The magnitude response of a sharpened CIC Filter would then be|H(f)|= 3(sin Mfsin fR)2N (2sin Mfsin fR)3N (20)The interested reader is referred to [KJW97] for more details.