Reply by Jerry Avins January 25, 20062006-01-25
AAA wrote:

   ...

> Is CIC pruning some kind of compromise between calculation errors an > filter complexity? Or decimating CIC filter with DC at the input (signal > to measure) may be pruned without any risk of errors at all?
By pruning, I assume you mean adjusting the size of successive accumulators to save silicon. If the accumulator is wide enough 1) so that no input can cause more than one bit to overflow, and 2) to hold the final answer, there will be no error at all. With DC input and enough integration time, condition (2) won't be met. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by AAA January 25, 20062006-01-25
>AAA wrote: > > ... > >> Hi, Jerry! >> >> Will you explane me please also how CIC stages pruning is possible >> ("11.4.2.2. Down sampling CIC" in the article)? I think if initial
stages
>> have less bit-length accumulators there will be errors in calculations
in
>> overflow condition, but if all accumulators will have the same length -
it
>> will not. Isn't it? >> >> The Author of this article takes into account the maximum output values
of
>> respective integrators, but DC or low frequency will overflow them at
all
>> at any bit-length. > >Overflow doesn't hurt as long as the accumulator is long enough to hold >the final number, and each input alone. Try some small numbers and see. >An overflow bit is simply discarded. A two-bit overflow from one >operation isn't possible if the conditions I stated are met. > >Jerry >-- >Engineering is the art of making what you want from things you can get. >����������������������������������������������������������������������� >
Hi, Jerry! Is CIC pruning some kind of compromise between calculation errors an filter complexity? Or decimating CIC filter with DC at the input (signal to measure) may be pruned without any risk of errors at all? Alex.
Reply by Jerry Avins January 23, 20062006-01-23
AAA wrote:

   ...

> Hi, Jerry! > > Will you explane me please also how CIC stages pruning is possible > ("11.4.2.2. Down sampling CIC" in the article)? I think if initial stages > have less bit-length accumulators there will be errors in calculations in > overflow condition, but if all accumulators will have the same length - it > will not. Isn't it? > > The Author of this article takes into account the maximum output values of > respective integrators, but DC or low frequency will overflow them at all > at any bit-length.
Overflow doesn't hurt as long as the accumulator is long enough to hold the final number, and each input alone. Try some small numbers and see. An overflow bit is simply discarded. A two-bit overflow from one operation isn't possible if the conditions I stated are met. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by AAA January 23, 20062006-01-23
>AAA wrote: > > ... > >> Hi, it is Alex. >> >> May be I caught the idea about how unsaturation property of two's >> complement arithmetic work: I think it relies upon not using in >> calculations multiplications by not hole coefficients (divisions), what
is
>> the case in CIC-filters. Because they may reflect not present at
adders
>> (and regs) m.s.b.'s to the calculated sum. >> >> But I d'nt know any paper with explanation of this in details (how CIC >> integrators overflowed by DC and low frequences in the signal band
does
>> work correctly). Tell me please one. May be anybody knows where I can
see
>> Hogenauer's article? > >http://www.phptr.com/articles/article.asp?p=361985&seqNum=1 and its >sequels will interest you. In particular, for overflow matters, >http://www.phptr.com/articles/article.asp?p=361985&seqNum=2 > >Jerry >-- >Engineering is the art of making what you want from things you can get. >����������������������������������������������������������������������� >
Hi, Jerry! Will you explane me please also how CIC stages pruning is possible ("11.4.2.2. Down sampling CIC" in the article)? I think if initial stages have less bit-length accumulators there will be errors in calculations in overflow condition, but if all accumulators will have the same length - it will not. Isn't it? The Author of this article takes into account the maximum output values of respective integrators, but DC or low frequency will overflow them at all at any bit-length. Thank you. Alex.
Reply by Jerry Avins January 21, 20062006-01-21
Mark Borgerding wrote:
> 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.
She attended a PBA ceremony last week (accompanied by the nanny, of course) to honor the cops who helped save her. Everybody looked happy. It was televised and in the NY Daily News. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by Mark Borgerding January 21, 20062006-01-21
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.
Reply by Rick Lyons January 21, 20062006-01-21
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-]
Reply by Jerry Avins January 20, 20062006-01-20
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;
Reply by Rick Lyons January 20, 20062006-01-20
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-]
Reply by Jerry Avins January 20, 20062006-01-20
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. &#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;