DSPRelated.com
Forums

FFT and complex numbers

Started by rg August 10, 2004
Hi,

Thank you to everyone that replied to my original post. I think I understand
the issue a bit better now.

Many Thanks

RG

"rg" <rg1117@hotmail.com> wrote in message
news:cfbg5r$7se$1@news.freedom2surf.net...
> Hi all, > > I have been looking at some fft libraries libraries and since DSP is not
my
> main area, there are some things that I am confused about. I noticed that > all major fft libraries, e.g. FFTW & kissfft, use complex data types in > which to store both the input and the output of the fourier transform. > > I was wondering, must this always be the case, or is it possible to just
use
> array of primitive data types like floats or integers. My application for > fft is to perform spectral analysis on sound data that is stored as 16 bit > integers. I normally have to copy this data to the real part of the
complex
> arrays, but I was wondering, would it be reasonable to have an FFT library > that works directly on the array of integer. The only information that I > need is the amplitude of the various frequency bins in a given frame and > nothing more (e.g. phase information). > > I hope somebody can explain this situation to me. Many Thanks for your
help
> in advance. > > RG > >
On 2004-08-11 15:20:12 +0200, Jerry Avins <jya@ieee.org> said:

> Stephan M. Bernsee wrote: > > ... > >> Mark, "extreme numbers" doesn't sound right to me. "Extreme" suggests >> something about their value. What about "enhanced numbers" or "flexible >> numbers"? ;-) > > How about planar numbers, as compared to linear? > > Jerry
Yes, I like that. Makes it intuitively clear what it's all about... -- Stephan M. Bernsee http://www.dspdimension.com

Stephan M. Bernsee wrote:

> On 2004-08-11 05:43:51 +0200, stevenj@alum.mit.edu (Steven G. Johnson) > said: > >> The output is still (in general) complex, but that's intrinsic to the >> Fourier transform...even if you just want the amplitudes, as far as I >> know there is no way to exploit this for a substantial speed gain. > > > You could use the Fast Hartley transform. It's entirely real and conveys > the same information as the Fourier transform (for real inputs of > course). The magnitudes can be calculated from the transform output.
It takes a small amount of extra processing to recover the amplitudes. The Fast Hartley Tranform is a minor repackaging of the specialized varsions of the Fast Fourier Transform. (No free lunch in evidence here!)
> If I understand the OP correctly, he is able to use floating point maths > for the actual transform and is just wondering whether he could use his > integers directly as input - that is very possible and easy to do, just > make sure you use floats for the computation and your magnitude output > to avoid qunatization issues. > > Mark, "extreme numbers" doesn't sound right to me. "Extreme" suggests > something about their value. What about "enhanced numbers" or "flexible > numbers"? ;-)