Second-order IIR peak or resonator filter
[num,den] = iirpeak(w0,bw)
[num,den] = iirpeak(w0,bw,ab)
[num,den] = iirpeak(w0,bw) turns
a second-order digital peaking filter with the peak located at
and with the bandwidth at the +3 dB point set to
To design the filter,
w0 must meet the condition 0.0 <
w0 < 1.0,
where 1.0 corresponds to π radians per sample in the frequency
The quality factor (Q factor) q for the filter is related to
the filter bandwidth by
w0/bw where ω0 is
signal frequency to boost.
[num,den] = iirpeak(w0,bw,ab) returns
a digital peaking filter whose bandwidth,
specified at a level of +
ab decibels. Including
the optional input argument
ab 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.
Design and plot an IIR peaking filter that boosts the frequency at 1.75 Khz in a signal and has bandwidth of 500 Hz at the -3 dB point:
fs = 10000; wo = 1750/(fs/2); bw = 500/(fs/2); [b,a] = iirpeak(wo,bw); fvtool(b,a);
The peak filter has the desired gain and bandwidth at 1.75 KHz.
Usage notes and limitations:
All inputs must be constant. Expressions or variables are allowed if their values do not change.