Thursday 5 May 2016

FFT frequency resolution


I'm having some problems understanding the FFT. Is the frequency resolution in the spectrum calculated as


$\frac{\textrm{sampling rate}}{\textrm{number of FFT points}}$ or $\frac{\textrm{sampling rate}}{\textrm{0.5 * number of FFT points}}$?


Asking this because the spectrum is symmetric for real-valued inputs. So, say I have $f_s = 1000$ Hz and $N$ = 1024, where $N$ is the number of FFT points. Now, is the frequency resolution $\frac{1000 \textrm{ Hz}}{1024} = 0.9766$ Hz or $\frac{1000 \textrm{ Hz}}{0.5 * 1024} = 1.9531$ Hz?



Answer




Suppose you have a signal $x[n]$, with $n \in {0, 1, ... N - 1} $. The same-size DFT is defined by:


$$ X[k] = \sum_{n = 0}^{N-1} x[n] e^{-j\frac{\Large{2 \ \pi n k}}{N}} $$


The frequency resolution is going to be how many Hz each DFT bin represents. This is, as you have noted, given by $\frac{f_s}{N}$.


If on the other hand you had zero-padded your signal, such that $N_{zp}$ is greater than $N$, then a more apt term of frequency granularity is given by $\frac{f_s}{N_{zp}}$



Asking this because the spectrum is symmetric for real-valued inputs.



That is irrelevant. The frequency resolutions/granularities are given by the above.



o, say I have fs=1000 Hz and N = 1024, where N is the number of FFT points. Now, is the frequency resolution 1000 Hz1024=0.9766 Hz or 1000 Hz0.5∗1024=1.9531 Hz?




If your sampling frequency $f_s = 1000$ Hz, and you are taking an $N=1024$ (same-sized) FFT, then your frequency resolution is $\frac{1000}{1024}$, which is equal to 0.9766 Hz/bin. If your $N_{zp} = 1024$ (FFT length after zero-padding), then your frequency granularity is 0.9766 Hz/bin.


No comments:

Post a Comment

readings - Appending 内 to a company name is read ない or うち?

For example, if I say マイクロソフト内のパートナーシップは強いです, is the 内 here read as うち or ない? Answer 「内」 in the form: 「Proper Noun + 内」 is always read 「ない...