2
$\begingroup$

In many articles I see that the frequency resolution of the Discrete Fourier Transform (DFT) equals Fs/N where Fs is the sampling rate and N is the total number of samples. Fs/N is equivalent to 1/T where T is the total time the signal was sampled.

So the longer the time of sampling took place the better the resolution of the spectrum (allowing to separate different tones)

I'm looking for the mathematical proof of the 1/T resolution as I do not see it directly from the definition of the DFT.

$\endgroup$
5
  • 1
    $\begingroup$ Is it possible to provide a reference that states this equivalence? $\endgroup$
    – A_A
    May 3, 2019 at 7:57
  • 1
    $\begingroup$ "T" is a bad label for the entire length (in units of real time, like seconds) of the input buffer. we usually say that $T$ is the sampling period which is the reciprocal of the sample rate, $f_\mathrm{s}$. you should say $NT$ is the total time the signal was sampled and that $\frac{1}{N} f_\mathrm{s}$ is the frequency resolution. $\endgroup$ May 3, 2019 at 8:28
  • $\begingroup$ When you divide Fs [samples/sec] by N [ samples] you get units of [1/sec]. $\endgroup$
    – D.Cohen
    May 3, 2019 at 8:29
  • $\begingroup$ $N$ is dimensionless. like radian, a sample is a dimensionless unit. (so also is the neper which is about 8.685889638 decibels.) $\frac{1}{N} f_\mathrm{s}$ is Hz, just like $f_\mathrm{s}$ is Hz. $\endgroup$ May 3, 2019 at 8:32
  • $\begingroup$ BTW, the DFT does not know about the sample rate, $f_\mathrm{s}$. but if you use the DFT of length $N$ to analyze sampled data sampled at rate $f_\mathrm{s}$ then $\frac{1}{N} f_\mathrm{s}$ is the resolution of your frequency analysis that is using the DFT. $\endgroup$ May 3, 2019 at 8:37

3 Answers 3

3
$\begingroup$

Many of the answers and comments above do not give the whole picture so I believe some clarification is in order. First of all if we take frequency resolution to mean the smallest frequency change where we can find another peak that is distinguishable and not an artifact. Then the limited resolution is a consequence of limited observation time, capital T in the question. I'll sketch the proof: The idea is that what we observe can be described as the real signal $s(t)$ multiplied by a hat window function i.e. $s_o(t)=s(t)[H(t+T/2)-H(t-T/2)]$ where $H()$ is Heavisides step function. The Fourier transform of the hat window is $sin(\frac{Tw}{2})/w/2$, $w = 2 \pi f$. Then the transform is $s_o(w)=s(w)*sin(T/2 w)/w/2$ where * denotes convolution. In other words every single peak in $s(w)$ will trace out the transform of the hat window function centered around that peak and since the transform of the window function is a damped sinus there will be artifacts by the name of side lobes or satellites.

The resolution is commonly taken to be the frequency defined by the first zero of the sinus i.e. $\frac{Tw_{res}}{2} = \pi$ that is $w_{res} = 2 \pi/T$ or $f_{res} = 1/T$. In other words the first point without any contribution from the transform of the hat window is chosen. Note that this is all continuous so far.

Say now that we sample the signal with sampling frequency $f_s$. Then we get $T f_s = N$ samples which then corresponds to N equidistant frequencies in the DFT (discrete Fourier transform) ranging from $-f_s/2$ to $f_s/2$. This means that the step in frequency or frequency bin is $f_s/N = f_s/(T f_s) = 1/T$ which as it happens coincides with the first zero of the sine function above. This is also the smallest non-zero frequency of course. Note that in a power spectrum $1/T$ is the first minimum of the hat window spectrum (not so in the amplitude spectrum).

Now, in practical frequency analysis we don't want side lobes so one usually replaces the hat window with one that does not have any side lobes but this causes degradation of the resolution so in terms of resolution $1/T$ is seldom met in practice but it will always be the first non-zero frequency and frequency bin in the DFT.

Actually, I'm not too keen on the term frequency bin as it might give the impression that the DFT amplitude at a frequency is an integral of the continuous transform over an interval surrounding that frequency but there is no such thing going on. The DFT samples the continuous transform up to $f_s/2$, no more, no less.

$\endgroup$
1
$\begingroup$

$\frac{Fs}{N}$ is not equivalent to $\frac{1}{T}$, since $Fs = \frac{1}{T}$, $\frac{1}{T N} \neq \frac{1}{T}$ for $N>1$ (as it is implied here of course).

The point about the resolution of the Discrete Fourier Transform follows from its definition where an $N$ point transform, "divides the circle" in $N$ discrete points. As you can see $k n$ (the discrete frequency and sample "instance" variables) are multiplied by the constant $\frac{i 2 \pi}{N}$.

Here, it is still possible to "sample" a non-integer harmonic (say $k = 1.267$) but that would not improve the situation if you only have a limited number of true $n$ (samples).

Hope this helps.

$\endgroup$
1
$\begingroup$

The resolution of a DFT is not 1/T (or Fs/N). That is just the spacing of the DFT basis vectors or the DFT output bins for a DFT of length N. Or perhaps by making some crazy assumptions, such as the signal is infinitely long and perfectly periodic in T beyond the life of the universe (and therefore test equipment).

However to separate the magnitude peaks two arbitrary frequency (not-just-integer-periodic-in-aperture) windowed sinusoids (or other very narrow-band spectra), you need a gap in between peaks, thus the peak separation resolution is closer to 2/T (or 2Fs/N) (for a 3 dB gap), or a bit more, and greater in noise, or if the magnitudes of the adjacent peaks are different, or if there are more than 2 peaks, or if you use a window function different from the default rectangular window of a DFT.

To graphically resolve the frequency peak of an isolated windowed sinusoid in low noise and interference, the graphical resolution is much finer than the DFT bin spacing, perhaps to a small fraction of Fs/N via Sinc interpolation if the peak is surrounded by a very low noise floor.

$\endgroup$
3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.