Tuesday, 21 June 2022

Notes On Notch Filtering - IIR vs. FIR

 A very simple way to implement a notch filter is to use and FIR filter and place a conjugate pair of zeros on the unit circle to define the location of the notch, as shown in the following z-Domain diagram:


Testing this filter in the application showed that while the initial results were good, because the interference was removed, there was a subtle negative impact on the performance of the signal processing functions further down the chain.

On investigation, the cause of this performance degradation turned out to be due to the FIR filter implementation not resulting in equal signal magnitudes in the pass-bands either side of the notch.

This can be clearly seen in the following diagram, where we have a sample rate of 16 kHz and a notch at 2 kHz.


Swapping the FIR filter for a single IIR biquad filter solved the problem and the IIR filter frequency response is shown below:


Functions for designing both FIR and IIR notch filters are included in the Numerix-DSP SigLib DSP and ML library, which can be downloaded from here: https://github.com/Numerix-DSP/siglib.

No comments:

Post a Comment