I am trying to detect oscillations in a small range around 1.5Hz as early as possible. I am currently using the Goertzel algorithm with bins 1.0Hz, 1.2Hz,..., 1.8Hz, and 2.0Hz; with block size N = 500 and sampling rate Fs = 100 (the sampling rate, in my circumstance, cannot be modified).

I am applying the Goertzel algorithm on two signals, and checking for three conditions that, if met, result in the oscillation I'm concerned with being detected:

  1. amplitude of signal 1 > threshold_1
  2. amplitude of signal 2 > threshold_2
  3. phase difference between signals > threshold_3

If all conditions are met, a flag is raised, and that is the purpose of this whole oscillation detection endeavor.

This all works fine, except that the Goertzel algorithm is inherently subject to latency in accordance with N. I am wondering if there are any other methods that do better than the Goertzel algorithm in terms of latency? Or if there's any way to reduce the latency of this implementation while still confidently detecting oscillations around 1.5Hz. I suppose I could reduce N but I'm not sure I want to be increasing the bin width.


1 Answer 1


I might be mentioning this too often, but if you need to detect frequencies finer than $f_\text{sample}/N$, then superresolution frequency estimators might be the way to go.

In your case, an algorithm called MUSIC would sound promising. $N$ would in that case be the amount of samples you use to estimate the autocorrelation matrix that algorithm works on, and can be as small as $n_\text{tones}+1$, but realistically, don't go too low, and average the estimate a bit.


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.