Bookmark this page:
Yahoo!
Windows Live
del.icio.us
digg
Netscape
|
|
||||||||||||||||||||||||||||
|
Posted by Mook Johnson on January 27, 2005, 3:11 am
Please log in for more thread options filter. It doesn't need to have a very sharp cutoff but the .6 Hz information needs to be down by ~30dB. It should continued down to -50 to 60 db from there. My question is how do I determine the number of taps required? if taps are roughly equivalent to the order then 2 or three should get me. However. with a 100Hz sample rate from the A2D my ScopeFIR says I need ~700 taps. Am I doing something wrong? What is the design algorithm for a analog guy that wants to replace analog filters with a digital one? Also, I'm using a ADSP2181 processor. How do I calculate how many clock cycles it takes to execute a single tap on the filter? Thanks | ||||||||||||||||||||||||||||
|
Posted by John Larkin on January 26, 2005, 7:46 pm
Please log in for more thread options Hey, I'm doing filters today (semi-exotic linear phase with Chebyshev stopband) and Williams' book is on my lap. A 4th order Butterworth is down almost 40 dB at 3x Fc, so that's not a lot of filter. I'm not a digital filter jock, but I've taken a simple state-variable type analog filter design, 4 integrators in this case, and simulated that digitally in a uP, fixed-point or floating math. Works great, don't know why, and it's a lot simpler than a typical cookbook digital filter. As the sample rate/cutoff ratio increases, the integrator coefficients just get smaller. Yeah, a FIR (transversal) filter needs a lot of taps at this high sample rate/cutoff freq ratio; you're basicly building a very long delay line. IIRs, with feedback, are better but still a bit of work. Multiply-and-sum should be one clock on a decent DSP chip. John | ||||||||||||||||||||||||||||
|
Posted by CBarn24050 on January 27, 2005, 10:27 am
Please log in for more thread options >Subject: Re: 0.2 Hz DSP filter
>From: John Larkin >>I'm trying to replace a 0.2Hz 2nd order LP active filter with a similar DSP
>>filter. Look on the microchip site, there are several application notes on implementing digital filters. | ||||||||||||||||||||||||||||
|
Posted by Tim Wescott on January 26, 2005, 8:09 pm
Please log in for more thread options Mook Johnson wrote:
> I'm trying to replace a 0.2Hz 2nd order LP active filter with a similar DSP
> filter. It doesn't need to have a very sharp cutoff but the .6 Hz > information needs to be down by ~30dB. It should continued down to -50 to > 60 db from there. > > My question is how do I determine the number of taps required? if taps are > roughly equivalent to the order then 2 or three should get me. However. > with a 100Hz sample rate from the A2D my ScopeFIR says I need ~700 taps. Am > I doing something wrong? Yes -- you're designing a FIR filter when you want an IIR filter. Expect to use 2x taps as the filter order for an IIR, but you need a much lower order filter. >
Search for "IIR Filter" on the net. Be way careful about the degree of
> What is the design algorithm for a analog guy that wants to replace analog > filters with a digital one? > precision -- if you use the typical bilinear filter forms you're going to need (100Hz/0.2Hz)^2 more precision than your input data, or 18 bits. This can be a bummer when you have 16-bit data. You can use a state-space filter that trades off more computation for lower precision (i.e. you'll get it down to 9 bits instead of 18, but you'll need six multiplies for a 2nd-order filter instead of 4). >
For an FIR filter with 16-bit taps and 16-bit data you can expect some
> Also, I'm using a ADSP2181 processor. How do I calculate how many clock > cycles it takes to execute a single tap on the filter? > setup (10 to 50 clocks) then one clock per tap. IIR filters tend to be more difficult to code effectively. You could probably do this with an 8051 and some clever coding tricks, so unless you're really running that 2181 slowly you just don't have to worry. >
You're welcome. You may want to ask the question again on comp.dsp if
> Thanks > you're not happy with what you've heard here. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com | ||||||||||||||||||||||||||||
|
Posted by Rene Tschaggelar on January 27, 2005, 12:11 pm
Please log in for more thread options Mook Johnson wrote:
> I'm trying to replace a 0.2Hz 2nd order LP active filter with a similar DSP
> filter. It doesn't need to have a very sharp cutoff but the .6 Hz > information needs to be down by ~30dB. It should continued down to -50 to > 60 db from there. > > My question is how do I determine the number of taps required? if taps are > roughly equivalent to the order then 2 or three should get me. However. > with a 100Hz sample rate from the A2D my ScopeFIR says I need ~700 taps. Am > I doing something wrong? > > What is the design algorithm for a analog guy that wants to replace analog > filters with a digital one? > > Also, I'm using a ADSP2181 processor. How do I calculate how many clock > cycles it takes to execute a single tap on the filter? IMO the same sampling theorem holds as for doing FFTs. The sampling memory has to be about as long as a period of the lowest frequency you wish to process. So these 100Hz divided by 700 go down to 0.15Hz. This doesn't mean that you need all 700 taps unequal zero. There are decimatiuon algorithms that allow you to process only every N-th sample, IIRC. I'd recommend digging up some theory. Rene -- Ing.Buero R.Tschaggelar - http://www.ibrtses.com & commercial newsgroups - http://www.talkto.net | ||||||||||||||||||||||||||||
| Similar Threads | Posted |
| AC Power filter and phone line filter (homemade circuit breaker) | October 13, 2008, 11:35 am |
| PLL input filter vs. loop filter | April 9, 2006, 4:47 pm |
| Balanced filter -> Balun vs. Balun -> Single-ended filter | April 1, 2008, 4:59 pm |
| 0.2 Hz DSP filter | January 27, 2005, 3:11 am |
| PLL as IF filter | June 6, 2005, 12:10 pm |
| Paynter Filter | March 8, 2005, 4:40 pm |
| FIR filter in FPGA | March 11, 2005, 4:04 am |
| Filter to use PWM signal as DAC? | April 4, 2005, 2:02 pm |
| Sallen-key filter and SNR | May 6, 2005, 1:25 pm |
| Filter Saturation | June 21, 2005, 3:24 pm |
| Butterworth Filter | June 22, 2005, 6:20 pm |
| best op-amp for 10.7MHz BP filter | July 14, 2005, 11:37 pm |
| Filter Design | September 2, 2005, 9:18 pm |
| EMI and harmonic filter | September 3, 2005, 3:04 am |
| Leapfrog Filter | October 24, 2005, 7:24 am |

0.2 Hz DSP filter
Yahoo!
Windows Live
del.icio.us
digg
Netscape 








>filter. It doesn't need to have a very sharp cutoff but the .6 Hz
>information needs to be down by ~30dB. It should continued down to -50 to
>60 db from there.
>
>My question is how do I determine the number of taps required? if taps are
>roughly equivalent to the order then 2 or three should get me. However.
>with a 100Hz sample rate from the A2D my ScopeFIR says I need ~700 taps. Am
>I doing something wrong?
>
>What is the design algorithm for a analog guy that wants to replace analog
>filters with a digital one?
>
>
>Also, I'm using a ADSP2181 processor. How do I calculate how many clock
>cycles it takes to execute a single tap on the filter?
>
>
>Thanks
>
>
>