DSPRelated.com
Forums
Online · Live + on demand
February 9-11, 2027
Price goes up Nov 1: register now to lock in today's rate
Register Now →

FFT questions

Started by french_student ●May 12, 2004
Hi everyone,

I thank you for your help.

Here is another question : the goertzel algorithm uses float numbers
but the DSP i'm working with (TMS320VC5402) is a fixed-point one. How
will I be able to achieve this algorithm?

Thansk again.

Jerome.

> > > Jerry Avins <jya@ieee.org> wrote in message news:<40a25737$0$3039> > > > >>The Goertzel algorithm is very efficient. It can be looked on as an FFT > >>that concentrates on one bin, but that confines one to using integers > >>where a fractional value may be more efficient yet. Explore the links at > >>http://www.google.com/search?q=goertzel%20algorithm and > >>http://groups.google.com/groups?q=goertzel%20algorithm > >> > >>Jerry > > > > > > It's me again! For the moment here are my first two questions about > > Goertzel: > > > > 1) In some papers k=0.5+(N*F)/Fs, and in other ones k=(N*fF)/Fs. Which > > is the good one? > > Probably both. I'll bet that the symbols are defined differently, and > that the corresponding formulas are correct for each definition. > > > 2) With my DSP (TMS320VC5402) the samples x(n) are in the Q15 format. > > I think I'll have problems when computing Q0=coeff*Q1-Q2+sample, won't > > I? > > Most samples that come from ADCs are integers, but you can construe them > any way you like. Q15 on a 16-bit machine is the equivalent of > construing integer shifted 15 bits (leaving the sign bit in place. The > values of such numbers lie between -1 and 1 - 2^-15. The product of two > such numbers is a double that lies between -1 and 1 - 2^-30. The more > significant word is the product you will store. > > Note: When using an integer multiplier, you must shift the less > significant word left one place, putting its MSB into carry, then shift > the more significant word left to eliminate the "extra sign bit" and > shift carry into the LSB. A Q15 multiplier does these operations > automatically. When q15 multiplication is an option, it is usually > specified by a bit in a control register. > > > Anyway thank you very much. The idea of using the Goertzel algorithm > > seems to be, for the moment, the best i could find. Apparently it > > exactly does what i need, so once again, thank you. > > You're very welcome. > > Jerry
french_student wrote:
> Hi everyone, > > I thank you for your help. > > Here is another question : the goertzel algorithm uses float numbers > but the DSP i'm working with (TMS320VC5402) is a fixed-point one. How > will I be able to achieve this algorithm?
Search TI's web site for their DTMF app note. I believe it will have sample Goertzel code (I know ADI's DTMF app note does, but you're using a TI DSP). They probably also have an app note describing fixed-point arithmetic - which they call the "Q15 format" while ADI calls it "1.15 format" or "1.31 format" (depending on word-size). -- Jim Thomas Principal Applications Engineer Bittware, Inc jthomas@bittware.com http://www.bittware.com (703) 779-7770 To mess up a Linux box, you need to work at it; to mess up your Windows box, you just need to work on it. - Scott Granneman