I'm not experienced whatsoever in signal processing. I want to isolate a single frequency (83 Hz) out of a noisy signal. Goertzel works just fine but was wondering if there was any other, maybe even (computationally) simpler technique to do that. I only want the amplitude of that single frequency.

  • 2
    $\begingroup$ If you want a single frequency, I think Goertzel is pretty much unbeatable. It's linear in the number of samples (only $2N$ additions and $N$ multiplications). Can't really go much lower than that. $\endgroup$ – Florian Mar 10 '20 at 14:47

Goertzel in fact is the matched filter for a single frequency – so, it's, in the presence of uncorrelated noise, the estimator that gives the best estimation variance under fixed observation.

But: for Goertzel to work, you need to use a number of samples that is

  1. an integer and
  2. a multiple of $f_\text{sample}/83\,\text{Hz}$.

Unless your sampling rate hence is a small multiple of 83 Hz, that's usually a bad deal.

You can remedy that with a number of things: often, a narrowband (often: even resonant) filter can filter out a frequency range, but you'll need to deal with the skirt of that filter. That skirting will be different than that of Goertzel's algorithm (unless you happen to have also windowed the signal before applying the Goertzel, and now use the same Window as filter design prototype; sounds unlikely).

If you know more about the signal than you're telling us (it's result of AR processes, so you can apply Yule-Walker to get an appropriate model of what's happening, for example. Or, you know the signal is the sum of white noise and a known number of oscillations – then, autocorrelation subspace methods such as MUSIC are very efficient), then you might have methods that are very exact, but use even fewer samples than minimal Goertzel.

Anyway, the beauty of Goertzel really lies in the fact that it's pretty efficient to begin with. Honestly, if your frequency of interest is 83 Hz, and you still can't detect it in realtime even on the weakest of microcontrollers, then you're doing something wrong, with 99.5% probability¹. You really might want to ask a different question on here, describing what you overall want to do (where does your signal come from? What's at 83 Hz? Why do you want to determine the amplitue of that? How exactly do you know that frequency? What's the amplitude estimate reliability that you really need? So many things to talk about...).

¹ This number, like 22.36% of all study results, is totally made up.

  • $\begingroup$ The signal acutally is the sum of white noise and the 83 Hz (rectangular) oscillation. I want to know how strong the 83 Hz signal is. I know that it's always at 83 Hz and rectangular. I am able to detect in realtime, I was just wondering if there was an even more efficient way. $\endgroup$ – Liess Jemai Mar 10 '20 at 15:43
  • $\begingroup$ again, what to recommend here isn't answerable with the amount of info you're giving. I recommend you heed the advice from the last paragraph of my answer: Ask a separate question where you explain what you're doing overall. What you're asking here sounds a lot like you're posing an XY Problem. $\endgroup$ – Marcus Müller Mar 10 '20 at 15:46

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.