Author 
Message 

Posted: Dec 14, 2011  04:47 PM 

Joined: Dec 11, 2011
Posts: 9


Can I calculate FFT without using floating point numbers?
I have 8 or 10 bits samples coming from an Analog Digital Converter. They are unsigned integers.
I want to perform FFTs using an 8 bit AVR on blocks of 128 to 1024 samples.
Question: Can I evaluate those FFTs without using floating point variables, just signed or unsigned integers, to speed up calculations?
FFT algorithm in C: http://www.codeproject.com/KB/recipes/howtofft.aspx 





Posted: Dec 14, 2011  05:03 PM 

Joined: Sep 19, 2005
Posts: 843
Location: Belgium


ChaN has a fixed point fft library written in assembler.
http://elmchan.org/works/akilcd/report_e.html
Quote:
The FFT operations are done in 16bit fixedpoint. These 128 point FFT processes, applying window, butterfly operations and scalar output, could be executed in realtime (within 7.3 msec). The sampling frequency is 9.6 kHz






Posted: Dec 14, 2011  05:35 PM 

Joined: Feb 19, 2001
Posts: 29287
Location: Wisconsin USA


Hmmma Google search on 'FFT "integer only" ' gives some interesting hits. Several mention CORDIC which has been brought up here before. 





Posted: Dec 14, 2011  08:08 PM 

Joined: Aug 29, 2002
Posts: 1163
Location: Muenster, Germany


In my application i started with ChaN's fixedpoint FFT implementation, but changed to another algorithm due to arithmetical reasons (incorrect results, i believe). Now i'm using an optimized Hartley algorithm to perform a floatingpointbased 128 bin FFT on an array of ADC values. The FFT is done within about 23ms on a 12 MHz ATmega32. 





Posted: Dec 14, 2011  09:01 PM 

Joined: Sep 04, 2002
Posts: 24109
Location: Orlando Florida


There is a pc app called fixfft that might be portable to an avr c compiler 
_________________ I ain't nobody's uncle, so don't call me that.





Posted: Dec 14, 2011  09:16 PM 

Joined: Jun 15, 2008
Posts: 1977
Location: North Carolina USA


In the old days of 16 bit arithmetic you would subtract the DC component to get zero mean (this was called floating the buffer) and do an integer FFT. If overflows did occur you just divide everything by another power of two. That gives 16 bit precision in the AC frequencies, since there is no longer a DC component. 





Posted: Dec 15, 2011  12:16 AM 

Joined: Dec 29, 2010
Posts: 475





Posted: Jan 09, 2012  07:28 PM 

Joined: Jan 05, 2011
Posts: 48
Location: Montreal




