confused with the FFT output

286 Views Asked by At

I am taking some sensor output and doing fft on it. how to get the exact frequencies from the complex output? my understanding is that bin frequencies and the input frequencies are different. Please help. I am just a beginner in fft

1

There are 1 best solutions below

7
On

Let the input signal be given by $x[n]$, for $n=0,1,\dots,N-1$. We want to look at its $N$-point DFT (the FFT is just an efficient way to calculate the DFT). The $k^{\mathrm{th}}$ sample of the DFT is given by

$$ w[k] = \sum_n e^{-j2\pi k \cdot n / N} x[n] $$

What you want to know is the frequency of this DFT bin. The frequency of the DFT bin is just the frequency of the $e^{-j2\pi k \cdot n/N}$ term, which is $2\pi \cdot k/N$. However, the units are radians per sample and you probably want something like radians per second. To convert to radians per second, all you have to do is scale the DFT's frequency by the number of samples per second, which is just the sampling frequency of the input data, $f_s$:

$$ 2\pi {{k}\over{N}} \left( {{\mathrm{rad}\over{\mathrm{sample}}}} \right) \cdot f_s \left( {{\mathrm{sample}\over{\mathrm{second}}}} \right) = 2\pi f_s {{k}\over{N}} \left( {{\mathrm{rad}\over{\mathrm{second}}}} \right). $$