2
votes

I am analyzing accelerometer data through FFT as it was suggested that I get information on frequency from the output of FFT. How is the output of FFT correlated with frequency information.

The FFT function is passed an array of values (all real numbers). The FFT function gives back 2 arrays of the same size - for the real and complex part.

I read up some of the previous posts and still confused as to how you can extract the frequency information from the output array of FFT. 1. Is the output array an array of frequencies? Is the array ordered? 1. What does each index of the output array mean? It was suggested that you can compute the magnitude of each index - sort (real[i]* real[i] + img[i] * img[i]) 2. Is the magnitude at each index somehow related to the index in the input array - or is this a frequency? 3. How do I find the dominant frequency?

1

1 Answers

5
votes

FFT gives you a complex pair in each Frequency Bin. The first bin in the FFT is like the DC part of your signal (0 Hz), the second bin is Fs / N, where Fs is the sample rate and N is the windowsize of the FFT, next bin is 2 * Fs / N and so on. To get the Power contained in a bin you will need the magnitude. As for the dominant freqency: that is the highest peak in magnitude.