4
$\begingroup$

I would like to integrate in my application a tone detector but I'm confused between 2 kinds of filters: Goertzel or Notch? I saw that Goertzel is a recommended for tone detection. But - what if I implement a Notch filter using Matlab with order of 20 (for example)??

$\endgroup$
3
$\begingroup$

A filter will pass the signal. The output of a bandpass filter is your original signal with all of the frequencies outside the pass range attenuated.

The Goertzel algorithm is more like a single bin of a DFT. Its output is just the amplitude of the signal at a given frequency.

Use a filter when you want to remove noise or interference.

Use the Goertzel algorithm when you need to know the amplitude of a signal at a particular frequency.

$\endgroup$
4
$\begingroup$

The Goertzel algorithm allows you to sample the DTFT of a signal with slightly lower complexity than direct computation (still $\mathcal{O}(N^2)$ to produce the DFT but with a smaller coefficient). I think of it as being advantageous in two ways:

  1. If you know the frequency you are looking for (like in telephone dialing systems)
  2. If you only want a small number of frequencies so that computing the FFT and discarding those you don't want is overly computational

Of course if the frequency you are looking for is not a multiple of $\frac{2\pi}{N}$ where $N$ is the signal support, then the FFT won't get it anyways (sans zero padding tricks).

Notch filters, are, well, filters. So their complexity is straightforward. An advantage in some cases is that they can have a non-impulse frequency response (but still sharp over a small concentrated band) so that if you are only sure of a specific region the signal you are trying to detect is in, this is a good way to do some "averaging".

As an interesting aside, Goertzel's original paper doesn't mention directly applications to Fourier analysis (but rather just people who wanted to program trigonometric series), and is less than a single page long)

$\endgroup$
2
$\begingroup$

@axcelenator. A Goertzel filter is a bandpass filter. And when this filter's center frequency has a certain value the Goertzel filter generates a final complex output value that's equal to a single-bin value of a DFT. In any case, a bandpass filter passes a range of frequencies and a notch filter attenuates a range of frequencies. So their behavior, like a freezer and an oven, are opposites!

$\endgroup$

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.