FFT question

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

For the first time I use a GNU FFT library, It's work I display the spectrum of my frequancy. My question is how can I know what is the frequancy store in the spectrum array? I had set my AD for 28us sampling and the FFT library is set for FFT_N 256. at first look it's something like 300hz window with 150hz overlapping. Maybe you can light my lamp?

Thanks

Yours truly,
Sylvain Bissonnette
www.microsyl.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A 28 uS sample period equates to a 35.7 kHz sample rate. By Nyquist, the highest frequency that can represented is half that or about 17.8 kHz. I'm not familiar with that FFT library. With a real input, the spectrum will be symmetrical for positive and negative frequencies. It will not be for complex input. So, it sounds like your frequency resolution will be 17.8 kHz/128 = 139 Hz.

This is from memory, so I could be wrong. :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks you answer is good, it's exactly what you wrote

Sylvain

Yours truly,
Sylvain Bissonnette
www.microsyl.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Sylvain

Have a look at elm-chan's avrfft (Atmega assembler) , should be fast.
It might have to be adapted to your ICC-AVR , in the "C" compiler interfacing :-)

http://elm-chan.org/works/akilcd...

http://elm-chan.org/docs/avrlib/...

*** Examples ***
https://www.avrfreaks.net/index.p...

http://tinkerish.com/blog/?p=39

http://www.adrianlombard.com/phy...