Setting: signal sampling rate 1000Hz, DFT 1s 1000 samples. This yields frequency resolution 1Hz.

I know, this is the limit of meaningful frequency and when I want to read 0.5Hz then either sampling rate should be doubled or samples acquisition doubled.

What bothers me is that when I compute DFT of 0.5Hz in given setting on artificial signal (sparse signal, some k Hz cosines and some 0.5 Hz cosines, e.g. 2Hz, 5.5Hz, 12Hz, 14.5Hz etc.) without any spectral window, the results seems valid. I know this shouldn't happen, with dense signal, non-perfect frequencies (multiples of frequency resolution) and noise situation gets complicated.

What exactly I read below frequency resolution and what are conditions it may work?


2 Answers 2


Computing your DFT with a 0.5 Hz spacing is equivalent to appending your signal with 1000 zeros and then computing a 2000 point DFT. It should be clear that this adds no real information to the signal. Yet it can sometimes be useful.

What really happens by this zero padding is that you're seeing an interpolated version of your spectrum. This means that between each two "valid" points (at 1 Hz spacing) you're seeing one more that produces an interpolate, a potentially smoother version of your spectrum. The interpolation kernel is essentially a sinc function (periodified sinc to be accurate).

Depending on what you want to do with the spectrum, such interpolated results can be visually more pleasing and sometimes more clearly show things we would otherwise have missed.

In particular, if you have one harmonic signal and its frequency is not on the DFT grid, your DFT will not show one line but many. This is also known as the picket fence effect. This picture may be confusing and in cases like this, an interpolated version would show us more clearly what is going on and thus be easier to interpret. Also, this allows us to find the actual frequency with a better precision (NB: resolution is not improved by this, but precision is).

Here are two examples. In each example I considered N = 30 for clarity. For the first example we have a frequency of 5 Hz, falling exactly on the DFT grid. The 30-point DFT (depicted in red) gives just one line). An interpolated version is added with the dashed line just for clarity. You can clearly see the sinc-like interpolation kernels and how in the on-grid case we're sampling exactly the zero crossings, which is the reason we're seeing only one line.

On-Grid frequency

In the second example, the frequency was chosen to be off the grid (between 5 and 6 Hz). Now the 30-point DFT shows many lines and it may be hard to see that these stem from just one harmonic if we only have those. Adding the interpolated DFT once more shows a very similar picture to before: We can see that it looks like one harmonic and we can much better spot its maximum.

Off-Grif frequency


For a single pure tone across the frame, the frequencies below 1 cycle per frame (the DFT doesn't care about the sampling rate) represent fractions of a single cycle across the frame. Theoretically, they can be measured just as accurately as a tone with with more cycles across the frame. As long as there is just a single pure tone, the frequency (then the phase amplitude and amplitude) can be found. The closer to the DC (or Nyquist) the more sensitive the calculation is to noise though.

These articles give formulas which exactly describe the bin values for a single pure tone. They are valid for the fractional frequency case.

Note, that interpolating the real valued formulas will not match the DFT definition for fractional values. They are a simplified form of the equation that only match at integer values. It is this simplification that makes the formulas mathematically invertible to yield the equations found in the rest of these articles.

These articles give formulas to calculate the frequency:

These articles give formulas for phase and magnitude estimation:

Note: The method in the "Two Bin Solution" is an improvement on "Method 1".

Yes, these all work. They are all mathematically exact. They differ in noise robustness in various situations, so there is a best formula to use in a given set of circumstances.


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.