Main Content

iirpeak

(To be removed) Second-order IIR peak or resonator filter

The iirpeak function will be removed in a future release. Use the designNotchPeakIIR function instead. For more information on how to update your existing code, see Compatibility Considerations.

Description

[num,den] = iirpeak(w0,bw) returns a second-order digital peaking filter with the peak located at w0, and with the bandwidth at the +3 dB point set to bw.

[num,den] = iirpeak(w0,bw,ab) returns a digital peaking filter whose bandwidth, bw, is specified at a level of +ab decibels.

Examples

collapse all

Design and plot an IIR peaking filter that boosts the frequency at 1.75 KHz in a signal and has a bandwidth of 500 Hz at the –3 dB point. The peak filter has the desired gain and bandwidth at 1.75 KHz.

fs = 10000; 
wo = 1750/(fs/2);  
bw = 500/(fs/2);
[b,a] = iirpeak(wo,bw);

Input Arguments

collapse all

Peak frequency of the IIR filter, specified as a positive scalar in the range (0.0,1.0), where 1.0 corresponds to π radians per sample in the frequency range.

Data Types: single | double

Bandwidth of the filter at a level of +ab decibels, specified as a positive scalar in the range (0.0,1.0).

The quality factor (Q factor) q for the filter is related to the filter bandwidth by q = ω0 / bw where ω0 is the signal frequency to boost.

Data Types: single | double

Magnitude response at the filter bandwidth bw, specified as a scalar in dB. 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.

Data Types: single | double

Output Arguments

collapse all

Numerator coefficients of the second order IIR peak filter transfer function, returned as a real-valued three-element row vector.

Data Types: single | double

Denominator coefficients of the second order IIR peak filter transfer function, returned as a real-valued three-element row vector.

Data Types: single | double

References

[1] S.J.Orfanidis. Introduction To Signal Processing. Englewood Cliffs, New Jersey: Prentice-Hall, 1996.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2011a

collapse all

R2024a: iirpeak will be removed

The iirpeak function will be removed in a future release. Existing instances of the function continue to run. For new code, use the designNotchPeakIIR function instead.

Update Code

This table shows how the function is typically used and explains how to update the existing code to use the designNotchPeakIIR function.

Discouraged UsageRecommended Replacement

Peak frequency is 0.35π radians per sample and bandwidth is 0.1 in normalized units.

fs = 10000; 
wo = 1750/(fs/2);  
bw = 500/(fs/2);
[b,a] = iirpeak(wo,bw);
[b,a] = designNotchPeakIIR(CenterFrequency=wo,...
Bandwidth=bw,Response="peak");

See Also

Functions