0
$\begingroup$

I know normal FFT with a fixed window size will introduce leakage and rectangular window function will give me the best main lobe width.

For example, with 44100Hz sample rate, 2048 window size, a 64Hz sine wave will have about 20~30Hz resolution in a VST plugin called Voxengo SPAN.

enter image description here

However, in Image-Line Wave Candy and Edison, with the same configuration (44100Hz sample rate, 2048 window size), it can have nearly 1Hz resolution. (I'm not sure Image-Line plugins use FFT but I can confirm Voxengo's uses FFT because they stated in their documents) enter image description here

My question is how to achieve the spectrum resolution like Image-Line's plugins without increasing window size (limited by time resolution) or sample rate? Whether with DFT-based algorithm or other algorithms. The input signal is audio signal (20Hz-20kHz). It is not always sine wave. It could be polyphonic and complicated waveforms.

Update1

From @Dan Boschen's suggestion I tried to place two sine wave as close as possible before aliasing. It seems it is not really 1Hz resolution. (about 15Hz minimal I can get before this happens visually) enter image description here

I also tried a linear chirp signal from 440Hz to 44hz in 8192 samples. It is like this. enter image description here

Although it is not 1Hz resolution, their result is still what I want to achieve. So I will try zero padding later.

$\endgroup$
2
  • 1
    $\begingroup$ For DFT: are you aware of zero-padding? For others: look at superresolution spectral estimation. MUSIC is the prime candidate here. $\endgroup$ Nov 22, 2021 at 12:03
  • $\begingroup$ Alex- Do they really get 1 Hz resolution with a total time duration of approx T = 46.4 ms? Or are they just giving you an interpolated frequency sample with 1 Hz spacing with the same resolution (that would be $1/T$ with a rectangular window, and larger based on windowing beyond that). You can confirm this with two closely spaced tones and how close can they be until you can visually discern them in the FFT. If interpolated as I suspect, then Marcus' answer to simply zero-pad would do that for you. $\endgroup$ Nov 22, 2021 at 13:02

1 Answer 1

1
$\begingroup$

DFT-based methods

If you can't have more data coming into your estimator, which maps one input sample to one output bin per definition, you need to pad your data. So, zero-padding is the method you should investigate

Non-DFT-based methods

You want more resolution than you have samples – that calls for so-called superresolution spectral estimation, of which the MUSIC algorithm is a prominent example. It is a parametric estimator, so you will have to decide on an estimate of the number of discrete harmonic contents in your signal.

If your signal is more like AR(MA) systems excited by noise, then Yule-Walker equations might help you, as well.

All in all, there's no free lunch, and the duration of signal you put into anything that is not specific to a particular shape of signal inherently sets a lower limit on the granularity of your frequency estimate; in the end, that's the same mathematical principle underpinning Heisenberg's Uncertainty Principle.

$\endgroup$
7
  • $\begingroup$ simple zero padding (up to 16x window size) seems not work as good as Wave Candy. But from my experiments, Wave Candy isn't really 1Hz resolution. So the question becomes how to interpolate the DFT result to make it feel like 1Hz resolution when there no "too close" frequencies. $\endgroup$
    – Alex Wang
    Nov 26, 2021 at 10:45
  • $\begingroup$ by zero-padding, literally, that's how you do it. Don't forget that you probably still want windowing! $\endgroup$ Nov 26, 2021 at 10:49
  • $\begingroup$ (appending zeros in one domain is equivalent to interpolation in the other domain) $\endgroup$ Nov 26, 2021 at 10:51
  • $\begingroup$ 1. I tried different windows (windows with better main lobe width like rectangle, triangle, other windows with better sidelobe slope like hann, kaiser, blackmanharris, etc). I also adjust min/max range. 2. With 16x padding (window size=16*2048=32768, this should have 1.3Hz resolution on paper), the dft output is ~1.3Hz width but the spectrum is wide (like in the Voxengo SPAN's image). The actual resolution is not 1.3Hz (maybe because of dft spectral leakage. $\endgroup$
    – Alex Wang
    Nov 26, 2021 at 11:25
  • $\begingroup$ I even tried manually calculate the frequency bins (not using FFT) using the definition of Discrete-time Fourier transform, with no better results. So it seems the leakage is not cause by FFT bin width but rather windowing $\endgroup$
    – Alex Wang
    Nov 26, 2021 at 11:28

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.