Hi, i have to decimate my input data (16 bit resolution) from 10Khz to 10Hz using a 60db/dec or 80db/dec butterworth digital filter, i need to know if this is possible using a standard MCU (for example 16 bit PIC) or is necessary to use a DSP core. Thanks in advance, Emiliano.

# Which processor for decimation?

Started by ●January 23, 2006

Reply by ●January 23, 20062006-01-23

Any processor can do this. I would choose one that has a math library available as you may want to use floating point to make the implementation simple. You want a CIC filter followed by halfband compensation filter. Then your final butterworth filter. "Emiliano" <fiorenza.emiliano@tiscali.it> wrote in message news:43d59238$0$345$5fc30a8@news.tiscali.it...> Hi, > i have to decimate my input data (16 bit resolution) from 10Khz to 10Hz > using a 60db/dec or 80db/dec butterworth digital filter, i need to know if > this is possible using a standard MCU (for example 16 bit PIC) or is > necessary to use a DSP core. > Thanks in advance, > Emiliano. > >

Reply by ●January 24, 20062006-01-24

Hi,> Any processor can do this. I would choose one that has a math library > available as you may want to use floating point to make the implementation > simple.Yes, but I have to use not too much power, I think to use a MCU such a 16 bit PIC.> You want a CIC filter followed by halfband compensation filter. Then your > final butterworth filter.I found this document about CIC filter: http://www.embedded.com/showArticle.jhtml?articleID=160400592 CIC filter use X(n-d) so in my application I have to store more then 1000 samples in memory to implement this filter? In this case a PIC MCU is not able to store large number of data in memory. I don't understand why is not more easy to use a simple butterworth filter for decimation, I know that in this case I have to compute more multiply. My second question is: is possible to have flat phase response (or quasi-flat) using a butterworth/elliptical digital filter? Thanks, and sorry for my English, Emiliano.

Reply by ●January 24, 20062006-01-24

"Emiliano" <fiorenza.emiliano@tiscali.it> writes:> Hi, > i have to decimate my input data (16 bit resolution) from 10Khz to 10Hz > using a 60db/dec or 80db/dec butterworth digital filter, i need to know if > this is possible using a standard MCU (for example 16 bit PIC) or is > necessary to use a DSP core. > Thanks in advance, > Emiliano.Emiliano, You are mis-specifying this filter. An IIR filter (which is what a digital Butterworth filter is) cannot take advantage of polyphase decomposition due to the requirement to compute the intermediate internal states. However, I used Mitra's section on windowed FIR filter order estimation (see table 7.2 in chapter 7) to estimate that it would require about 7000 taps for a passband edge frequency of 9 Hz, a stopband edge frequency of 11 Hz and a minimum stopband attenuation of 75 dB (using the Blackman window). However, if you use a polyphase decomposition of this filter, this reduces to 7 taps per sample. At 10 Hz, that's about 70 multiplies and 70 adds per second - pretty easy. And, this is a MUCH better filter than the one you specified. It would take a significant amount of storage (7K) for the taps, however. This is probably not the most efficient implementation, either: a multistage approach would probably be even less computations, but it goes to show that the goal is easily accomplished with a low-horsepower processor like a PIC. -- % Randy Yates % "Bird, on the wing, %% Fuquay-Varina, NC % goes floating by %%% 919-577-9882 % but there's a teardrop in his eye..." %%%% <yates@ieee.org> % 'One Summer Dream', *Face The Music*, ELO http://home.earthlink.net/~yatescr

Reply by ●January 24, 20062006-01-24

Randy Yates <yates@ieee.org> writes:> [...] > However, if you use a polyphase decomposition of this filter, this > reduces to 7 taps per sample. At 10 Hz, that's about 70 multiplies and > 70 adds per second - pretty easy.Sorry, Emiliano. This is NOT correct. It is about 70,000 multiplies and 70,000 adds per second. Still well within reach of a PIC, but not nearly as efficient as I stated. -- % Randy Yates % "So now it's getting late, %% Fuquay-Varina, NC % and those who hesitate %%% 919-577-9882 % got no one..." %%%% <yates@ieee.org> % 'Waterfall', *Face The Music*, ELO http://home.earthlink.net/~yatescr