Fast Fourier Transform results: frequency axis sca

2019-06-01 08:54发布

问题:

I successfully implemented code that takes array data and runs a fast fourier transform on it, using Apple's Accelerate Framework (performed on iOS device).

My question now is what is the scale of the frequency axis? The results have peaks as expected in certain frequency ranges, but I'm not sure what the frequency should be. The Accelerate Framework's FFT functions take in an array and spit out an array with the same (or more) number of data points. Does it assume that all those points are equally spaced in time? It doesn't take the sampling frequency or time variable as input. Is the scale of the frequency axis (i.e. frequency increment on each point) just the sampling period divided by 2*Pi (or something similar to that?) I couldn't find a lot of information in the documentation on this. I've been looking for similar questions online and haven't found anything.

This is in some ways a math question, although it depends heavily on the Accelerate Framework implementation.

Thanks

EDIT I asked a follow-up question here but no one has answered it yet. Please take a look!

回答1:

The FFT gives you linearly spaced frequency bins up to the sampling frequency. This means that the spacing between the bins is (sample frequency) / (number of bins).



回答2:

The frequency axis scale does not depend on the Accelerate framework implementation, only on the sample rate (FS) of the time domain data and the length (N) of the FFT. Any FFT.

For strictly real data input, the second half of the FFT results will just be complex conjugates of the first half. Only the first half, up to FS/2, are usually plotted for real data.