Options a and b are the fixed FIR and IIR notch filters, respectively. The simplicity of these filters is a major draw. But how well do they work? Characterizing the filters in the frequency domain is a good starting point for this assessment.
A sinusoidal signal of the form
won’t pass through these filters in steady state.
The following figure provides magnitude response in dB versus frequency plots of the FIR and IIR notch filters, when fi = 1,000 Hz and fs = 8,000 Hz. For the IIR, notch r is stepped over 0.8, 0.9, and 0.95. In Figure c, a cascade of two IIR notch filters having r = 0.95 is made for fi = 1,000 and 600 Hz.
Here are the IPython command line inputs for creating the IIR cascade:
In [<b>659</b>]: bIIR95, aIIR95 = ssd.fir_iir_notch(1000,8000,0.95) In [<b>664</b>]: bIIR95_600,aIIR95_600 = ssd.fir_iir_notch(600,8000,0.95) In [<b>665</b>]: bIIR_cas,aIIR_cas = ssd.cascade_filters(bIIR95,aIIR95, bIIR95_600,aIIR95_600) In [<b>666</b>]: f,HIIR_cas = signal.freqz(bIIR_cas,aIIR_cas,1024)
SNOI tones are blocked if
is set properly. What spectral components from the SOI are also removed? Unfortunately, some SOI information is lost, but you want to minimize the loss within reason. The FIR notch, although simple to implement, removes too much information from the SOI. So drop this filter from further consideration.
Going with the IIR notch is worth the extra effort to get the precision removal of essentially just the SNOI. You have to accept that if the SOI has frequency components at the SNOI frequencies, they, too, will be removed by the FIR and IIR filters.
The adaptive filter comes with many parameters to play with. For this study, the filter length is M = 64 and μ = 0.005.