iircomb
IIR comb notch or peak filter
Syntax
[num,den] = iircomb(n,bw)
[num,den] = iircomb(n,bw,ab)
[num,den] = iircomb(...,'type')
Description
[num,den] = iircomb(n,bw)
returns a digital notching filter with ordern
and with the width of the filter notch at -3 dB set tobw
, the filter bandwidth. The filter order must be a positive integer.n
also defines the number of notches in the filter across the frequency range from 0 to 2π — the number of notches equalsn
+1.
For the notching filter, the transfer function takes the form
whereαandbare the positive scalars andnis the filter order or the number of notches in the filter minus 1.
质量factor (Q factor) q for the filter is related to the filter bandwidth byq=ω0/bwwhereω0is the frequency to remove from the signal.
[num,den] = iircomb(n,bw,ab)
returns a digital notching filter whose bandwidth,bw
, is specified at a level of -ab
decibels. Including the optional input argumentab
lets you specify the magnitude response bandwidth at a level that is not the default -3 dB point, such as -6 dB or 0 dB.
[num,den] = iircomb(...,'type')
returns a digital filter of the specified type. The input argumenttype
can be either
'notch'
to design an IIR notch filter. Notch filters attenuate the response at the specified frequencies. This is the default type. When you omit thetype
input argument,iircomb
returns a notch filter.'peak'
to design an IIR peaking filter. Peaking filters boost the signal at the specified frequencies.
The transfer function for peaking filters is