What do you think of this notch / band reject filter for a very very narrow band ?

Original signal x[n] 
--> FFT
--> then I just put "0" in the FFT bin of the frequency I need to reject (notch filter)
--> inverse FFT 
--> output signal y[n].

How is called such a filter ? Does it really work, or is it too simple to be true ?

  • 5
    $\begingroup$ Try it out; you'll see a multitude of issues. First is your output as you described it will be complex (need to zero out the conjugate bin as well). What you've done is implicit cyclic convolution with a filter the length of your input sequence (provided you haven't zero padded your input). $\endgroup$ – Bryan Oct 15 '13 at 21:55
  • 2
    $\begingroup$ Arguably this is a very complicated filter when you consider the number of complex multiply/adds you need when compared to a biquad filter. $\endgroup$ – nispio Oct 15 '13 at 22:54
  • $\begingroup$ nispio, just to be sure to understand the classification of types of filters, a biquad filter is just a simple IIR, right ? $\endgroup$ – Basj Oct 16 '13 at 9:28
  • 1
    $\begingroup$ Why is it a bad idea to filter by zeroing out FFT bins? $\endgroup$ – endolith Oct 16 '13 at 14:38
  • $\begingroup$ Thanks everybody ! Now (a month after) I understand all these things a lot better ! By the way, what is the simplest way for doing a filter in the frequency domain (after FFT is done) ? Not zeroing bins because this is bad, but is there another good method ? $\endgroup$ – Basj Nov 17 '13 at 13:14

The frequency response of a single FFT bin filter looks like a Sinc function, which has a massive amount of overshoot or ripple at frequencies between FFT bins. So your filter is only useful if you can strictly guarantee that the input to the FFT only contains unmodulated frequencies that are strictly and exactly periodic in the FFT aperture length (e.g. not a window on longer data of unknown periodicity or a non-periodic stream).

A notch filter is equivalent to adding the inverse of the equivalent bandpass filter to the signal. If the bandpass has ripples, they will get added to the result of the notch, thus potentially adding a lot of noise.

So you end up with a not-so-simple (as it requires pairs of FFT computations) that likely produces terrible results.

  • $\begingroup$ Thanks for your answer. Is it possible to draw a frequency response of such a filter? I'd like to see "graphicaly" how it would look like, do you think such a frequency response chart could be easily done? Is it something like this dsprelated.com/josimages_new/mdft/img1768.png but inverted (ie a big minimum instead of a big maximum jump) ? $\endgroup$ – Basj Oct 16 '13 at 9:17

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.