How to apply FFT to find frequency of a signal?
Your signal has a DC bias. A DC bias is the same (to an FFT) as a cosine wave with a frequency of 0. This DC bias also appears to be larger than the periodic amplitude variations in your signal. So f=0 is the expected result.
There are at least two thing you could try. You could look for the next peak value in your FFT result magnitudes after frequency bin 0. Plot the FFT magnitudes and you might see it. Or you could subtract the DC bias (the mean/average of all the samples) before performing the FFT, which will remove the large FFT result at frequency bin 0.
Note that the FFT result’s bin center frequencies are only those that are integer periodic in the FFT’s length. If the actual frequency is not one of those, you will have to interpolate. Sinc kernal interpolation is the proper interpolator for FFT result data.
Read more here: Source link