DSPRelated.com
Forums

Confused

Started by Unknown February 22, 2006
Hi

Im half way through a project that is a three band grahic equliser.
Each band has been generated in a mathematical tool and each band has
250 coefficent - total 750 for all three bands.

At this stage i am going to use convolution on my DSP development
board.  However at this point i dont know which of the methods to use
e.g. (polynominal, matrix, multiplication, fft or graphical........)?

When reading numerous books, they say fft is used for applications with
large numbers of coefficents?? Is 750 large?

Also another misunderstand i have is, why are some of the above 5
methods impemented in the time domain and others are implemented in the
frequency domain??

Look foward to your advice

Elvis

tuurbo46@yahoo.co.uk wrote:
> Hi > > Im half way through a project that is a three band grahic equliser. > Each band has been generated in a mathematical tool and each band has > 250 coefficent - total 750 for all three bands.
... It seems to me that you want your band edges to be very steep. That's not a good thing in an equalizer; bands that blend seamlessly sound better. (Imagine a trill or even vibrato whose pitch crosses a band edge.) Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
tuurbo46@yahoo.co.uk wrote in news:1140598705.150314.132070
@z14g2000cwz.googlegroups.com:

> Hi > > Im half way through a project that is a three band grahic equliser. > Each band has been generated in a mathematical tool and each band has > 250 coefficent - total 750 for all three bands. > > At this stage i am going to use convolution on my DSP development > board. However at this point i dont know which of the methods to use > e.g. (polynominal, matrix, multiplication, fft or graphical........)? > > When reading numerous books, they say fft is used for applications with > large numbers of coefficents?? Is 750 large? > > Also another misunderstand i have is, why are some of the above 5 > methods impemented in the time domain and others are implemented in the > frequency domain?? > > Look foward to your advice > > Elvis >
Jerry is probably right that you may want to consider a less aggressive filter. Convolution with a typical DSP takes about 1 instruction cycle per tap, plus a minimum amount of set up overhead. You can get an fast idea of the amount of DSP power you have available by this simple formula: Instructions/sample = (Instructions/second)/sampling rate For example, if your DSP can operate at 300Mips and your sample rate was 48k, you have 6250 instructions available per sample. FIRs using time domain methods would take about 750 + a little extra, which is only 12% of the available processing time in this example. FFT methods certainly work, but they are more complicated than a simple FIR (time domain convolution). BTW, 300Mips represents the slowest SHARC DSP we currently sell (assuming SIMD). One of the biggest changes in implementing DSP algorithms today, is that all the DSPs are much faster than even a few years ago. I find that for many applications, Mips are not the biggest concern. -- Al Clark Danville Signal Processing, Inc. -------------------------------------------------------------------- Purveyors of Fine DSP Hardware and other Cool Stuff Available at http://www.danvillesignal.com
<tuurbo46@yahoo.co.uk> wrote in message 
news:1140598705.150314.132070@z14g2000cwz.googlegroups.com...
> Hi > > Im half way through a project that is a three band grahic equliser. > Each band has been generated in a mathematical tool and each band has > 250 coefficent - total 750 for all three bands. > > At this stage i am going to use convolution on my DSP development > board. However at this point i dont know which of the methods to use > e.g. (polynominal, matrix, multiplication, fft or graphical........)? > > When reading numerous books, they say fft is used for applications with > large numbers of coefficents?? Is 750 large? > > Also another misunderstand i have is, why are some of the above 5 > methods impemented in the time domain and others are implemented in the > frequency domain?? > > Look foward to your advice > > Elvis
750 is definitely "large" although not the "largest" in the grand scheme of all filters. 250 is pretty "large" also. "polynominal, matrix, multiplication, fft or graphical......." This list confuses me too!! I imagine that a "graphical" equalizer has a gain term for each band that's varied but the underlying filter is the same .... so how do you get and how do you implement those filters wouold be my question / your challenge. fft doesn't go along with "convolution" exactly..... not when you say you're going to implement convolution in the normal, temporal sense. multiplication also ... it goes more with fft "matrix" is a notational convenience. Maybe you mean there's something like a matrix of filter elements? polynomial may be the way you reach the frequency response you want. How does it affect implementation? Just some thoughts to encourage more questions... Fred
Elvis wrote:

> Im half way through a project that is a three band grahic equliser. > Each band has been generated in a mathematical tool and each band has > 250 coefficent - total 750 for all three bands.
You shouldn't be using FIR for audio equalizer. Use an IIR implementation, and compute the coefficients according to r b j's cookbook (http://musicdsp.org/files/Audio-EQ-Cookbook.txt). Instead of 750 coeffcients, you'll have 13 coefficients. And the implementation of IIR filters is four lines of code (if you place each assembly instruction on a new line). Admittedly, the implementation of FIR filters is even simpler. The computational load of the IIR filter is neglibible (compared to the FIR). The implementation of this on a DSP developement board should take you half a day (if you take a long coffee break in between :-). I mean, the IO / IIR / FIR routines are standard library content. All you have to do is fill the coefficient array with the values from your filter design tool. Regards, Andor
tuurbo46@yahoo.co.uk wrote:

> At this stage i am going to use convolution on my DSP development > board. However at this point i dont know which of the methods to use > e.g. (polynominal, matrix, multiplication, fft or graphical........)? > > When reading numerous books, they say fft is used for applications with > large numbers of coefficents?? Is 750 large?
It all depends on the capabilities of your processor. Basically, if you take the instruction rate of your processor and divide it by your sampling rate you get the number of instructions available per sample. If you then divide that by the number of instructions required to calculate each coefficient, you get the maximum number of taps you can calculate. Of course, you also have to throw in some overhead for filter setup, I/O, etc. Here's a totally contrived example. Suppose your processor's instruction rate is 100 MHz and your sampling rate is 10 kHz. So you have 10,000 instructions per sample. Suppose that your processor can calculate 1 FIR tap (coefficient) per instruction. You could then nominally do 10,000 FIR taps per sample. De-rate that by, say, 25% for overhead and you could do 7,500 FIR taps, which is 10 times what your application requires. The numbers for your processor are undoubtedly different, and might not turn out to be enough to support the 750 taps you want. But this illustrates how you might work through it.
> Also another misunderstand i have is, why are some of the above 5 > methods impemented in the time domain and others are implemented in the > frequency domain??
The choice is entirely a practical one. Time-domain filtering is usually simpler to implement and has fewer pitfalls. So it used for most applications. However, frequency-based filtering can require less calculations via the efficiency of the FFT algorithm, so it is used in certain demanding filtering applications, notably in filter 'banks'. (I'm not sure if three equalizer bands constitute a 'bank', but I guess it might.) That said, in many years of DSP, I have never once done filtering in the frequency domain--unless you count FFT spectral analysis such as is done by ScopeDSP as 'filtering' (which it technically is, I guess.) =g2 _____________________________________________________________________ Grant R. Griffin Publisher of dspGuru http://www.dspguru.com Iowegian International Corporation http://www.iowegian.com See http://www.iowegian.com/img/contact.gif for e-mail address
Hi

Thanks for your help. Im currently using the TMS320C6713 DSK dev board.
 I have been trying to do this assignment for about 3 weeks - i would
love to do it in a day!!

I have designed the filters in Matlab and generated the coefficents.  I
have also generated a simulink model and tested the filters in a non
real time manner and they work well.

The next step is more complecated.  Our final year course in DSP to
date has consisted of 2 hours introduction to convolution, DFT, FFT and
lastly count to 15 in binary on the DSK leds.  From this we are
supposed to generate a graphical equaliser.

I now believe, as my boss has metioned, "those that can do, those that
cant, teach preach and teach geography - and in this instance teach DSP
at my universtiy!"

I have asked my teacher in many instances about the assignment and he
has not got a clue.  The DSP teacher left - this man saw the light, and
now we have somebody that used to teach maths once and knows nothing of
DSP.

So back to my orignal problem, i dont know how to read the coefficents
in and also how to genearte c functions to represent the above advice
you gave me.  Could anybody recommend any sites with tempate functions?

Cheers and thanks for your help.