DSPRelated.com
Forums

CIC filter question

Started by AAA January 17, 2006
AAA wrote:
> >AAA wrote: > > > > ... > > > >> Will anybody show me please a link to the Hogenauer's article? > >> Thank you. > >> Alex. > > > >Hogenauer, E. B., "An Economical Class of Digital Filters for Decimation > >and Interpolation," IEEE Transactions on Acoustics, Speech, and Signal > >Processing, ASSP-29(2): pp. 155-162, 1981 > > > >Check out Donadio, M. Cascaded Integrator-Comb (CIC) Filter Introduction > >http://www.dspguru.com/info/tutor/cic.htm > > > >Use Google, as I just did for you. > > > >Jerry > >-- > >Engineering is the art of making what you want from things you can get. > >=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF
> > > > Thank you, Jerry. But I have already read Donadio's article and yet now > looking for Hogenauer's one. Google can't help... May be You or anybody > knows? > > Alex.
IEEE articles are not free. Go to www.ieee.org for pricing. John
Jerry Avins wrote:
> Mark Borgerding wrote: > >> Jerry Avins wrote: >> >>> Mark Borgerding wrote: >>> >>> >>>> Jerry Avins wrote: >>>> >>>> >>>>> Mark Borgerding wrote: >>>>> >>>>> ... >>>>> >>>>> >>>>> >>>>>> I don't think a Hogenaur(sp?) representation of a CIC filter is >>>>>> appropriate in floating point. >>>>> >>>>> >>>>> >>>>> >>>>> Correct. Even a boxcar averager, in which the oldest sample is >>>>> subtracted and the newest added can fail in floating point if the >>>>> accumulation becomes large enough to change the exponent. >>>>> >>>>> Jerry >>>> >>>> >>>> >>>> >>>> Huh? There's a difference between a boxcar averager and a CIC? >>>> >>>> -- Mark Borgerding >>> >>> >>> >>> From /Multirate Signal Processing for Communication Systems/ by Fredric >>> Harris: "The CIC contains two subfilters, the comb and the integrator, >>> which can be applied in either order." Not exactly a boxcar averager. >>> >>> Jerry >> >> >> >> You say potato and I say potato. >> You say tomato and I say tomato. >> >> Other than possibly scaling, a CIC is the same as a moving average/ >> boxcar filter. >> >> Comb filter: >> y(n) = x(n) - x(n-k) >> H(z) = 1 - z^-k >> >> Integrator : >> y(n) = x(n) + y(n-1) >> H(z) = 1 / (1 - z^-1) >> >> Comb + Integrator >> y(n) = y(n-1) + x(n) - x(n-k) >> H(z) = (1 - z^-k) / (1 - z^-1) >> >> >> I recall either Harris' Multirate book or Rick Lyon's book deriving >> (1 - z^-k) / (1 - z^-1) >> = >> 1 + z^-1 + z^-2 + ... z^-(k-1) >> >> ... in other words, it is the relationship you describe as "oldest >> sample is subtracted and the newest added" > > > I understand your point, but how can you cascade a single boxcar > averager? CIC = cascaded integrator comb. > > Jerry
Exactly the same way you cascade CIC's. It is common usage to refer to even a single stage CIC as a CIC. Should it then be called a "sharpened boxcar"? The clip from harris' book that you yourself referenced discusses "boxcar" and "CIC" interchangeably. They are two names for basically the same thing. I will concede that the term, "CIC", often carries the *connotation* of multiple stages. However, AFAIK the "cascade" term refers to the series implementation of integrator+comb, not necessarily denoting more than 1 of each. -- Mark
AAA wrote:

  I wrote:

>>Hogenauer, E. B., "An Economical Class of Digital Filters for Decimation >>and Interpolation," IEEE Transactions on Acoustics, Speech, and Signal >>Processing, ASSP-29(2): pp. 155-162, 1981
...
> Thank you, Jerry. But I have already read Donadio's article and yet now > looking for Hogenauer's one. Google can't help... May be You or anybody > knows?
Have you tried IEEE? http://www.ieee.org/web/publications/home Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Mark Borgerding wrote:
> Jerry Avins wrote: > >>Mark Borgerding wrote: >> >> >>>Jerry Avins wrote: >>> >>> >>>>Mark Borgerding wrote: >>>> >>>> >>>> >>>>>Jerry Avins wrote: >>>>> >>>>> >>>>> >>>>>>Mark Borgerding wrote: >>>>>> >>>>>>... >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>>I don't think a Hogenaur(sp?) representation of a CIC filter is >>>>>>>appropriate in floating point. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>Correct. Even a boxcar averager, in which the oldest sample is >>>>>>subtracted and the newest added can fail in floating point if the >>>>>>accumulation becomes large enough to change the exponent. >>>>>> >>>>>>Jerry >>>>> >>>>> >>>>> >>>>> >>>>>Huh? There's a difference between a boxcar averager and a CIC? >>>>> >>>>>-- Mark Borgerding >>>> >>>> >>>> >>>>From /Multirate Signal Processing for Communication Systems/ by Fredric >>>>Harris: "The CIC contains two subfilters, the comb and the integrator, >>>>which can be applied in either order." Not exactly a boxcar averager. >>>> >>>>Jerry >>> >>> >>> >>>You say potato and I say potato. >>>You say tomato and I say tomato. >>> >>>Other than possibly scaling, a CIC is the same as a moving average/ >>>boxcar filter. >>> >>>Comb filter: >>>y(n) = x(n) - x(n-k) >>>H(z) = 1 - z^-k >>> >>>Integrator : >>>y(n) = x(n) + y(n-1) >>>H(z) = 1 / (1 - z^-1) >>> >>>Comb + Integrator >>>y(n) = y(n-1) + x(n) - x(n-k) >>>H(z) = (1 - z^-k) / (1 - z^-1) >>> >>> >>>I recall either Harris' Multirate book or Rick Lyon's book deriving >>>(1 - z^-k) / (1 - z^-1) >>>= >>>1 + z^-1 + z^-2 + ... z^-(k-1) >>> >>>... in other words, it is the relationship you describe as "oldest >>>sample is subtracted and the newest added" >> >> >>I understand your point, but how can you cascade a single boxcar >>averager? CIC = cascaded integrator comb. >> >>Jerry > > > Exactly the same way you cascade CIC's. It is common usage to refer to > even a single stage CIC as a CIC. > > Should it then be called a "sharpened boxcar"? > > The clip from harris' book that you yourself referenced discusses > "boxcar" and "CIC" interchangeably. > > They are two names for basically the same thing. > > I will concede that the term, "CIC", often carries the *connotation* of > multiple stages. However, AFAIK the "cascade" term refers to the series > implementation of integrator+comb, not necessarily denoting more than 1 > of each.
The comb filter is implemented as a boxcar. The integrator has a somewhat similar structure, but I don't see it as the same. What did I miss? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Jerry Avins wrote:
> Mark Borgerding wrote: > >> Jerry Avins wrote: >> >>> Mark Borgerding wrote: >>> >>> >>>> Jerry Avins wrote: >>>> >>>> >>>>> Mark Borgerding wrote: >>>>> >>>>> >>>>> >>>>>> Jerry Avins wrote: >>>>>> >>>>>> >>>>>> >>>>>>> Mark Borgerding wrote: >>>>>>> >>>>>>> ... >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>> I don't think a Hogenaur(sp?) representation of a CIC filter is >>>>>>>> appropriate in floating point. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> Correct. Even a boxcar averager, in which the oldest sample is >>>>>>> subtracted and the newest added can fail in floating point if the >>>>>>> accumulation becomes large enough to change the exponent. >>>>>>> >>>>>>> Jerry >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> Huh? There's a difference between a boxcar averager and a CIC? >>>>>> >>>>>> -- Mark Borgerding >>>>> >>>>> >>>>> >>>>> >>>>> From /Multirate Signal Processing for Communication Systems/ by >>>>> Fredric >>>>> Harris: "The CIC contains two subfilters, the comb and the integrator, >>>>> which can be applied in either order." Not exactly a boxcar averager. >>>>> >>>>> Jerry >>>> >>>> >>>> >>>> >>>> You say potato and I say potato. >>>> You say tomato and I say tomato. >>>> >>>> Other than possibly scaling, a CIC is the same as a moving average/ >>>> boxcar filter. >>>> >>>> Comb filter: >>>> y(n) = x(n) - x(n-k) >>>> H(z) = 1 - z^-k >>>> >>>> Integrator : >>>> y(n) = x(n) + y(n-1) >>>> H(z) = 1 / (1 - z^-1) >>>> >>>> Comb + Integrator >>>> y(n) = y(n-1) + x(n) - x(n-k) >>>> H(z) = (1 - z^-k) / (1 - z^-1) >>>> >>>> >>>> I recall either Harris' Multirate book or Rick Lyon's book deriving >>>> (1 - z^-k) / (1 - z^-1) >>>> = >>>> 1 + z^-1 + z^-2 + ... z^-(k-1) >>>> >>>> ... in other words, it is the relationship you describe as "oldest >>>> sample is subtracted and the newest added" >>> >>> >>> >>> I understand your point, but how can you cascade a single boxcar >>> averager? CIC = cascaded integrator comb. >>> >>> Jerry >> >> >> >> Exactly the same way you cascade CIC's. It is common usage to refer to >> even a single stage CIC as a CIC. >> >> Should it then be called a "sharpened boxcar"? >> >> The clip from harris' book that you yourself referenced discusses >> "boxcar" and "CIC" interchangeably. >> >> They are two names for basically the same thing. >> >> I will concede that the term, "CIC", often carries the *connotation* of >> multiple stages. However, AFAIK the "cascade" term refers to the series >> implementation of integrator+comb, not necessarily denoting more than 1 >> of each. > > > The comb filter is implemented as a boxcar. The integrator has a > somewhat similar structure, but I don't see it as the same. What did I > miss? > > Jerry
The comb, as used in CIC, is y(n) = x(n) - x(n-k) Start to think about this by thinking of a moving average of two samples which cancels the folding frequency completely, spectrally inverted by negating the sign of every other time-domain sample, then spectrally replicated via time-domain zero-stuffing. The result (the equation above) cancels DC perfectly as well as k-1 other frequency equidistributed on the unit circle. This comb is definitely not a boxcar, since it cancels DC perfectly. But when you add an integrator with a single pole on the unit circle to exactly cancel the zero at DC, ... alakazam! you have a boxcar. AKA CIC. Let me attempt to make my point in Matlabese. If you run the following, it shows how the FIR boxcar, and the IIR CIC filter have the same frequency response. k=5; % any integer > 1 [H1,w1]=freqz( ones(1,k) , 1 ); %boxcar FIR of length k [H2,w2]=freqz( [1 zeros(1,k-1) -1] , [1 -1] );% single stage CIC IIR plot(w1, abs(H1) ,'+;boxcar;',w2, abs(H2) ,';CIC;') Where is Rick Lyons during this discussion anyway? This is right up his alley. -- Mark Borgerding
Mark Borgerding wrote:

> Let me attempt to make my point in Matlabese. If you run the following, > it shows how the FIR boxcar, and the IIR CIC filter have the same > frequency response. > > k=5; % any integer > 1 > [H1,w1]=freqz( ones(1,k) , 1 ); %boxcar FIR of length k > [H2,w2]=freqz( [1 zeros(1,k-1) -1] , [1 -1] );% single stage CIC IIR > plot(w1, abs(H1) ,'+;boxcar;',w2, abs(H2) ,';CIC;')
A cab and a trailer is a two-part transportation that works like a U-Haul rental, but being in two parts isn't the same thing. Many of the same principles apply to both, I agree. But while one always puts the cab before the trailer (or the horse before the cart) With CICs the order is determined by whether one is decimating or interpolating.
> Where is Rick Lyons during this discussion anyway? This is right up his > alley.
Maybe he figures discretion is the better part of valor. :-) I'll have to reread the CIC chapter in his book. Thanks for changing the subject line. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
On Fri, 20 Jan 2006 20:40:40 GMT, Mark Borgerding
<mark@borgerding.net> wrote:

>Jerry Avins wrote: >> Mark Borgerding wrote: >> >>> Jerry Avins wrote: >>> >>>> Mark Borgerding wrote: >>>> >>>> >>>>> Jerry Avins wrote: >>>>> >>>>> >>>>>> Mark Borgerding wrote: >>>>>> >>>>>> >>>>>> >>>>>>> Jerry Avins wrote: >>>>>>> >>>>>>> >>>>>>> >>>>>>>> Mark Borgerding wrote: >>>>>>>> >>>>>>>> ... >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>>> I don't think a Hogenaur(sp?) representation of a CIC filter is >>>>>>>>> appropriate in floating point. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Correct. Even a boxcar averager, in which the oldest sample is >>>>>>>> subtracted and the newest added can fail in floating point if the >>>>>>>> accumulation becomes large enough to change the exponent. >>>>>>>> >>>>>>>> Jerry >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> Huh? There's a difference between a boxcar averager and a CIC? >>>>>>> >>>>>>> -- Mark Borgerding >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> From /Multirate Signal Processing for Communication Systems/ by >>>>>> Fredric >>>>>> Harris: "The CIC contains two subfilters, the comb and the integrator, >>>>>> which can be applied in either order." Not exactly a boxcar averager. >>>>>> >>>>>> Jerry >>>>> >>>>> >>>>> >>>>> >>>>> You say potato and I say potato. >>>>> You say tomato and I say tomato. >>>>> >>>>> Other than possibly scaling, a CIC is the same as a moving average/ >>>>> boxcar filter. >>>>> >>>>> Comb filter: >>>>> y(n) = x(n) - x(n-k) >>>>> H(z) = 1 - z^-k >>>>> >>>>> Integrator : >>>>> y(n) = x(n) + y(n-1) >>>>> H(z) = 1 / (1 - z^-1) >>>>> >>>>> Comb + Integrator >>>>> y(n) = y(n-1) + x(n) - x(n-k) >>>>> H(z) = (1 - z^-k) / (1 - z^-1) >>>>> >>>>> >>>>> I recall either Harris' Multirate book or Rick Lyon's book deriving >>>>> (1 - z^-k) / (1 - z^-1) >>>>> = >>>>> 1 + z^-1 + z^-2 + ... z^-(k-1) >>>>> >>>>> ... in other words, it is the relationship you describe as "oldest >>>>> sample is subtracted and the newest added" >>>> >>>> >>>> >>>> I understand your point, but how can you cascade a single boxcar >>>> averager? CIC = cascaded integrator comb. >>>> >>>> Jerry >>> >>> >>> >>> Exactly the same way you cascade CIC's. It is common usage to refer to >>> even a single stage CIC as a CIC. >>> >>> Should it then be called a "sharpened boxcar"? >>> >>> The clip from harris' book that you yourself referenced discusses >>> "boxcar" and "CIC" interchangeably. >>> >>> They are two names for basically the same thing. >>> >>> I will concede that the term, "CIC", often carries the *connotation* of >>> multiple stages. However, AFAIK the "cascade" term refers to the series >>> implementation of integrator+comb, not necessarily denoting more than 1 >>> of each. >> >> >> The comb filter is implemented as a boxcar. The integrator has a >> somewhat similar structure, but I don't see it as the same. What did I >> miss? >> >> Jerry >The comb, as used in CIC, is >y(n) = x(n) - x(n-k) > >Start to think about this by thinking of a moving average of two samples >which cancels the folding frequency completely, spectrally inverted by >negating the sign of every other time-domain sample, then spectrally >replicated via time-domain zero-stuffing. The result (the equation >above) cancels DC perfectly as well as k-1 other frequency >equidistributed on the unit circle. > >This comb is definitely not a boxcar, since it cancels DC perfectly. >But when you add an integrator with a single pole on the unit circle to >exactly cancel the zero at DC, ... alakazam! you have a boxcar. > >AKA CIC. > > >Let me attempt to make my point in Matlabese. If you run the following, >it shows how the FIR boxcar, and the IIR CIC filter have the same >frequency response. > >k=5; % any integer > 1 >[H1,w1]=freqz( ones(1,k) , 1 ); %boxcar FIR of length k >[H2,w2]=freqz( [1 zeros(1,k-1) -1] , [1 -1] );% single stage CIC IIR >plot(w1, abs(H1) ,'+;boxcar;',w2, abs(H2) ,';CIC;') > > > >Where is Rick Lyons during this discussion anyway? This is right up his >alley. > >-- Mark Borgerding
Hi Mark, I haven't followed all the back and forth posts in this thread. Perhaps my description at: http://www.eetimes.com/showArticle.jhtml?articleID=160400592 might be helpful. Harris, in his multirate book, uses the term's CIC and boxcar filter interchangeably. When there's a sample rate change in between, the comb and integrator, then Harris calls such a system a "Hogenauer filter". Yes, an N-tap delay line FIR boxcar filter and the CIC filter (with N delays in the comb) have the same frequency response. And if you apply a unit-sample impulse to both filters, you'll see that both filters have identical impulse responses. It was astounding to me how a cascade of a simple comb followed by a simple integrator (or vice versa) could have so many interesting characteristics, and interesting behavior. Mix that interesting behavior with binary arithmetic and sample rate change, and you have a digital network that's not particularly simple. (At least that's my opinion. Harris expends *many* pages in his book on CIC filters. By the way,I think Harris's CIC description is the best available anywhere.) Am not sure that I have added much to the discussion here. [-Rick-]
Rick Lyons wrote:

   ...

> Am not sure that I have added much to the discussion here.
You have. You just told me that I was calling a CIC is a Hogenauer filter. I owe Mark an apology for the grief I subjected him to. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On Fri, 20 Jan 2006 21:01:27 -0500, Jerry Avins <jya@ieee.org> wrote:

>Rick Lyons wrote: > > ... > >> Am not sure that I have added much to the discussion here. > >You have. You just told me that I was calling a CIC is a Hogenauer >filter. I owe Mark an apology for the grief I subjected him to. > >Jerry
Ha ha, I don't know about that. Again, the behavior of those darned CIC filters, combined with sample rate change, is in *NO WAY* as simple as their block diagrams first appear. But, ... those CIC filters do the "heavy lifting", so to speak, when we have super narrowband lowpass filtering to perform. We use a CIC filter (which requires no multiplications) followed by a more conventional tapped-delay line FIR filter to achieve some desired "overall" lowpass filtering process. See Ya' Jer, [-Rick-]
Jerry Avins wrote:
> Rick Lyons wrote: > > ... > >> Am not sure that I have added much to the discussion here. > > > You have. You just told me that I was calling a CIC is a Hogenauer > filter. I owe Mark an apology for the grief I subjected him to. > > Jerry
Not at all. I appreciate the exchange. It helps me explore and test my beliefs and understanding. I'm never 100% sure about anything I think I know, not even my uncertainty. -- Mark PS. I hope your granddaughter is doing well.