DSPRelated.com
Forums

3rd Octave Biquad Filter Implemenation

Started by Scottieb December 15, 2009
Hello All

I would like to use a DSP to implement a bank of filters for a real time
audio analyzer. The filters are 1/3rd octave spanning from 25Hz to 31K5Hz
(32 filters). I was looking at using a C5505 to do the job, Can anyone
point me in the right direction to get started on implementing biquad
filter on this device?

Or would I be better off using an FFT to do the job instead of biquads?

Just a bit of background, the information with be displayed on an LED bar
graph display with 25 leds per bar for each 1/3rd octave. each led will
indicate 1 or 2dB (selectable) the display logic will be handled by an
FPGA.

Thanks in advance for your help.

Regards,

Scott



Scottieb wrote:

> I would like to use a DSP to implement a bank of filters for a real time > audio analyzer. The filters are 1/3rd octave spanning from 25Hz to 31K5Hz > (32 filters). I was looking at using a C5505 to do the job, Can anyone > point me in the right direction to get started on implementing biquad > filter on this device?
Start with prototyping the algorithm on PC.
> Or would I be better off using an FFT to do the job instead of biquads? > > Just a bit of background, the information with be displayed on an LED bar > graph display with 25 leds per bar for each 1/3rd octave. each led will > indicate 1 or 2dB (selectable) the display logic will be handled by an > FPGA.
The job can be done by 8-bit micricontroller. C55xx and FPGA is incredible overkill; you can use *any* algorithm you like, possibly in the floating point. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
On 15 Des, 13:35, "Scottieb" <scottwb...@gmail.com> wrote:
> Hello All > > I would like to use a DSP to implement a bank of filters for a real time > audio analyzer. The filters are 1/3rd octave spanning from 25Hz to 31K5Hz > (32 filters). I was looking at using a C5505 to do the job, Can anyone > point me in the right direction to get started on implementing biquad > filter on this device?
What is the problem? To design the filters or to program the chip in question?
> Or would I be better off using an FFT to do the job instead of biquads? > > Just a bit of background, the information with be displayed on an LED bar > graph display with 25 leds per bar for each 1/3rd octave. each led will > indicate 1 or 2dB (selectable) the display logic will be handled by an > FPGA.
Use the biquads. Far easier than FFTs, and far less latency. Rune
For the C5505 there should be a hand optimized biquad function available. I
haven't programmed the device yet, but on the C6713 (much bigger I know)
there are optimzed functions for all of these things.

You can use those out of the box and just feed the coefficients an data
and go ahead.

Search the TI manuals

If you implement the biquads yourself (on some 8bit controller or
whatever) be aware of the fact, that IIR filters tend to be instable for
low f0-s when the bit-resolution is low. You need to implement dithering
then. Google "biquad", "fix point" and "dithering".

Markus
> > >Scottieb wrote: > >> I would like to use a DSP to implement a bank of filters for a real
time
>> audio analyzer. The filters are 1/3rd octave spanning from 25Hz to
31K5Hz
>> (32 filters). I was looking at using a C5505 to do the job, Can anyone >> point me in the right direction to get started on implementing biquad >> filter on this device? > >Start with prototyping the algorithm on PC.
Using Matlab or something similar?
> >> Or would I be better off using an FFT to do the job instead of
biquads?
>> >> Just a bit of background, the information with be displayed on an LED
bar
>> graph display with 25 leds per bar for each 1/3rd octave. each led
will
>> indicate 1 or 2dB (selectable) the display logic will be handled by an >> FPGA. > >The job can be done by 8-bit micricontroller. C55xx and FPGA is >incredible overkill; you can use *any* algorithm you like, possibly in >the floating point. > >Vladimir Vassilevsky >DSP and Mixed Signal Design Consultant >http://www.abvolt.com >
I know you could do a low quality analyzer with an 8 bit MCU, but I would like at least a 50Hz refresh rate on the display, so the filters need to be giving me 1600 results ever second, not sure what that equates to in instruction count yet, do you still think C55xx will be an overkill?

Scottieb wrote:

>> >>Scottieb wrote: >> >> >>>I would like to use a DSP to implement a bank of filters for a real > > time > >>>audio analyzer. The filters are 1/3rd octave spanning from 25Hz to > > 31K5Hz > >>>(32 filters). I was looking at using a C5505 to do the job, Can anyone >>>point me in the right direction to get started on implementing biquad >>>filter on this device? >> >>Start with prototyping the algorithm on PC. > > > Using Matlab or something similar?
God forbid. Evaluate C or C++ code that you will later use on your target device.
>>The job can be done by 8-bit micricontroller. C55xx and FPGA is >>incredible overkill; you can use *any* algorithm you like, possibly in >>the floating point.
> I know you could do a low quality analyzer with an 8 bit MCU, but I would > like at least a 50Hz refresh rate on the display, so the filters need to be > giving me 1600 results ever second, not sure what that equates to in > instruction count yet, do you still think C55xx will be an overkill?
For the sample rate of 96K, this could take ~tens of MIPS depending on the algorithm and the instruction set. I'd split the bands and decimate, then use Goertzel or Sin/Cos accumulation whatever is better for particular band. Anyway the load looks like too much for one 8-bitter, however it could be paralleled to more then one. Otherwise a low end DSP or bigger MCU would be adequate. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
"Scottieb" <scottwburr@gmail.com> schrieb im Newsbeitrag 
news:zaadnYY_WZs2H7rWnZ2dnUVZ_u2dnZ2d@giganews.com...
> Hello All > > I would like to use a DSP to implement a bank of filters for a real time > audio analyzer. The filters are 1/3rd octave spanning from 25Hz to 31K5Hz > (32 filters). I was looking at using a C5505 to do the job, Can anyone > point me in the right direction to get started on implementing biquad > filter on this device? > > Or would I be better off using an FFT to do the job instead of biquads? > > Just a bit of background, the information with be displayed on an LED bar > graph display with 25 leds per bar for each 1/3rd octave. each led will > indicate 1 or 2dB (selectable) the display logic will be handled by an > FPGA. > > Thanks in advance for your help. > > Regards, > > Scott > >
Hello Scott, A long time ago, I did such an analyser on the 56k from Freescale. It had two channels, a sample rate of 96k and update rate of 100Hz. I used a cascade structure (3x IIR's, SRC, 3x IIR's, SRC, ...) and it works quite well. So implementing a single channel analyzer on a (todays) C55xx shouldn't be a problem, but nevertheless it's not a trivial task! BR, Gerold