1
$\begingroup$

Given a half complex spectrum (positive frequency bins from DC to Nyquist) as the result of a real FFT, to estimate the true (non integer) peak frequency I usually rely on Eric Jacobsen's estimator:

$$f=Re\bigg[\frac{Z_p-Z_n}{2Z-Z_p-Z_n}\bigg]$$

where $Z$ is the complex bin value at local maximum and $Z_p$, $Z_n$ are the previous and next bin values, and $f$ is the obtained fractional position. The problem is when a frequency peak is very close to frequency 0, then we have two cases:

  1. When the peak is at bin 1, the estimator starts losing precision.

  2. .When the peak is at bin 0 as in case of, say, a frequency peak of 0.2 in bin units, the estimator cannot be used because there is not any previous bin $Z_p$. This of course happens because the left portion of the peak body gets reflected back as conjugate, and the closer you get to bin zero, the more radical is the influence of the reflected portion tricking the estimator, which would otherwise work well with an analytic spectrum devoid of reflections.

How can I reliably estimate the peak frequency when the peak is at bin 1 or worst at bin zero ?

$\endgroup$
4
  • $\begingroup$ Could you make the FFT size larger so that the peak isn't at bin 1? $\endgroup$ – Engineer Feb 21 at 21:23
  • $\begingroup$ Of course not Engineer. I am working in a STFT framework and I cannot decide to change the fft size everytime I get a peak at bin 1 or 0. $\endgroup$ – elena Feb 22 at 15:14
  • $\begingroup$ If the local max is not at bin 0 or 1 then use your estimator, and otherwise you could do a fine search using a larger FFT size. The idea of coarse and fine searches is pretty common I think $\endgroup$ – Engineer Feb 22 at 15:46
  • $\begingroup$ What is this the peak frequency of, the STFT window? and what do you intend to do with the quantity? "1" is often the truest value there is. $\endgroup$ – OverLordGoldDragon Feb 23 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.