1
votes

I'm writing a code to compute a simple real data transformation using FFTW. I want to compare the spectrum of the FFTW to FT of the same data. My DFT data length is 5000. However, even if I use a much larger FFTW size (for example N=450000) I don't get a desired frequency resolution. In other words, there's a large gap between each frequency bins in the output spectrum.

This gives me a frequency gap of 1/(deltat*N) = 1,154,700.5

Is there any way I can produce smaller frequencies without massively increasing the FFT size (N) which will sacrifice the speed.

1

1 Answers

3
votes

Keep in mind that a frequency resolution of approximately 1e6 represent a tiny fraction of your wave_frequency of 3e9. That said if you want to analyse or process frequencies within a small bandwidth around a given frequency of interest (such as 3e9), then 1e6 might well represent a sizable portion of that bandwidth. The trick then is to zoom in on the frequency band of interest. This can be achieved with the following broad steps:

  • Apply bandpass filter centered around the frequency of interest;
  • Frequency shift the filtered signal to a lower center frequency (e.g. using Weaver SSB frequency shifting technique described here);
  • Downsample the frequency shifted signal (take one every M sample). This will increase deltat, thus resulting in a better resolution (decreased frequency difference between frequency bins) for the same FFT block size.