# Selectively improve the frequency resolution of FFT (DFT)

I have a digitally sampled signal(sampling frequency = 4000 Hz) which contains analog frequencies from 0 to 1000 Hz. I wish to have a frequency resolution of 100 Hz(like 0,100,200,300 Hz .. 1000 Hz) and I have to improve the frequency resolution at the 0 to 100 Hz range by 10 Hz. That is at the frequencies 0,10,20,30,... 100. So the frequency components I wish to detect are [0,10,20,...,100,200,300,...,1000]. In other words, I want more frequency resolution at the 0-100Hz range and less resolution at 100-1000Hz range. How this is possible through FFT or related methods.

You can compute any single FFT result bin using a complex Goertzel algorithm or filter.

Realize however that if you want to compute a number of bins on the order of log N or greater (such as 10 extra bins with 10 Hz bandwidth and spacing), it may be faster to do the full longer FFT and throw away all the extra FFT result bins.

So just compute 2 FFTs of 2 different lengths and ignore all the unwanted results.

I haven't seen this answer here, so I'll post it. You can resample the signal to a lower sample rate before doing the FFT, which reduces the size of the FFT.

If you know that the only frequencies that you are interested in are from 0..1000Hz, you can safely resample the original signal to an FS of 2000Hz and then do the FFT. This decreases the required FFT by a factor of 2 for the higher frequencies.

For the 10Hz divisions, resample the original signal again to an FS of 200Hz, and do the same FFT on the result to get your results from 0..100Hz.

Resampling the signal first increases the frequency resolution for the same size FFT, by limiting the FFT to only the frequencies you are interested in. It effectively increases the length of the FFT over the lower frequencies while throwing out the higher frequencies.

In your case: Input signal 4000Hz. Resample to 2000Hz and use FFT of size 64 gives a resolution of 2000/64 or 31.25Hz. Resample to 200Hz and use FFT of size 64 gives a resolution of 200/64 or 3.125Hz.

• An anti-aliasing lowpass filter should be applied before downsampling. – Deve Aug 25 '14 at 7:11
• I think it's the other way round, see en.wikipedia.org/wiki/Decimation_%28signal_processing%29 – Deve Aug 25 '14 at 8:17
• Huh, either wikipedia is wrong or I am. Neither is unheard of. :) – c.fogelklou Aug 25 '14 at 8:24
• I'd bet against Wikipedia. I've had a few of my edits on related pages rejected, for reasons that strongly suggest that the Wikipedian in charge doesn't actually understand digital signals. – MSalters Aug 25 '14 at 10:14
• For a fixed FFT size I think this a good solution. – Deve Aug 25 '14 at 11:59

The frequency resolution of the FFT is Fs/N where N is the FFT size. The FFT gives you a uniform resolution at all frequencies. Therefore, you require N >= 400 points to get 10 Hz resolution.

• I don't want 10 Hz resolution in the frequency range [100,1000] Hz – Vinod Aug 18 '14 at 11:01
• You can get coarser resolution in that band by combining sets of ten FFT bins. – John Aug 18 '14 at 11:07

You can't improve frequency resolution in a given frequency region without increasing a number of samples to be analysed. The picture is for example: There are two input signals of the same frequency, but one is 64us duration while other is 256us duration. Their Fourier transforms are represented in the picture by blue and green curves respectively. Now we say that DFT (and also FFT) is sampling of the Fourier transform. Red line and circles in the picture are DFT bins of the short signal. They are obviously uniformly spaced, but changing coefficients of DFT matrix we can of course sample the spectrum in the interesting region more precisely. But the main idea is: the frequency resolution stays the same. It's dependent on signal duration (or number of samples under processing). It's clearly seen from the picture: green curve shows greater frequency resolution because it was calculated from more signal samples.