DSPRelated.com
Forums

simple perspective in using floats for recursive moving-average

Started by Randy Yates December 26, 2016
Tim

Thanks, I was trying to understand why my experience with CIC filters, when used for interpolation, was that they will crash with a single math error, whereas your method did not. Now I see that the "integrate first " approach will not crash in that situation, but requires extra registers compared to the "differentiate first" structure, where you can use the Noble Identities to shift all the (1 -Z^-n) sections to the lower rate where they become (1 - Z^-1). This is the normal way it is done in VLSI design to save registers and power but it does have this susceptibility to crashing. 
If you are interpolating with an Nth-order filter using your method, the first integrator can replaced by a zero-order hold, due to the initial zero-stuffing, so you can save one integrator. 

Bob
On Tue, 3 Jan 2017 19:59:38 -0800 (PST), radams2000@gmail.com wrote:

>Tim > >Thanks, I was trying to understand why my experience with CIC filters, when= > used for interpolation, was that they will crash with a single math error,= > whereas your method did not. Now I see that the "integrate first " approac= >h will not crash in that situation, but requires extra registers compared t= >o the "differentiate first" structure, where you can use the Noble Identiti= >es to shift all the (1 -Z^-n) sections to the lower rate where they become = >(1 - Z^-1). This is the normal way it is done in VLSI design to save regist= >ers and power but it does have this susceptibility to crashing.=20 >If you are interpolating with an Nth-order filter using your method, the fi= >rst integrator can replaced by a zero-order hold, due to the initial zero-s= >tuffing, so you can save one integrator.=20 > >Bob
Yup. But I'm wondering how critical it is to be stingy on populating registers in silicon these days, since the geometries are so small so the real-estate is less expensive?
Depends , if you are designing for a battery-powered consumer device a or wearable medical device ,  every mw counts, but in other applications it may not matter. 

Bob
On Tue, 03 Jan 2017 19:59:38 -0800, radams2000 wrote:

> Tim > > Thanks, I was trying to understand why my experience with CIC filters, > when used for interpolation, was that they will crash with a single math > error, whereas your method did not. Now I see that the "integrate first > " approach will not crash in that situation, but requires extra > registers compared to the "differentiate first" structure, where you can > use the Noble Identities to shift all the (1 -Z^-n) sections to the > lower rate where they become (1 - Z^-1). This is the normal way it is > done in VLSI design to save registers and power but it does have this > susceptibility to crashing. > If you are interpolating with an Nth-order filter using your method, the > first integrator can replaced by a zero-order hold, due to the initial > zero-stuffing, so you can save one integrator. > > Bob
I always assumed that the way that a CIC filter did it was to save the integrator state at every N'th sample when decimating by N, and then (for integrator state = x) subtract x[n] - x[n-N] at the decimated rate. This is not done? It seems like it would still be susceptible to a math error, but only for one decimated sample, not for all time afterward. I'm not a VLSI guy -- the closest I've gotten is threatening to implement algorithms in Verilog, to scare the real logic guys into doing it themselves. (Because, nothing's more scary than an ace software guy claiming competence at writing Verilog...) -- Tim Wescott Wescott Design Services http://www.wescottdesign.com I'm looking for work -- see my website!
The Wikipedia entry is pretty much the standard way I've always done it, based on the original Hoganouer paper. It's also interesting to read about the Noble identities. 

https://en.m.wikipedia.org/wiki/Cascaded_integrator%E2%80%93comb_filter

Bob