IIRORDER Function
Determines minimum filter order required for a Butterworth, Chebyshev Type I, Chebyshev Type II, or elliptic infinite impulse response (IIR) digital lowpass filter to satisfy a given set of pass-band frequency edge, stop-band frequency edge, pass-band ripple, and stop-band ripple constraints.
Usage
result = IIRORDER(fp, fs, rp, rs)
Input Parameters
fp—The pass-band frequency edge
fs—The stop-band frequency edge
rp—The pass-band ripple
rs—The stop-band ripple
 
note
In addition to these parameters, exactly one keyword must be set to select the filter type for which the filter order will be computed.
Returned Value
result—A scalar long containing the computed filter order.
Keywords
Butter—If present and nonzero, computes the filter order for a Butterworth filter.
Cheby1—If present and nonzero, computes the filter order for a Chebyshev Type I filter.
Cheby2—If present and nonzero, computes the filter order for a Chebyshev Type II filter.
Ellip—If present and nonzero, computes the filter order for an elliptic filter.
Discussion
The pass-band frequency edge (fp), stop-band frequency edge (fs), pass-band ripple (rp), and stop-band ripple (rs) are defined as shown in Figure 3-2: IIRDESIGN Function Example and are discussed in the Discussion section of IIRDESIGN.
The equations which relate the frequency cutoff values, pass-band ripple, stop-band ripple, and filter order (n) are discussed in Rabiner and Gold, 1975, p. 241.
Example
This example illustrates how IIRORDER may be used to find the minimum required lowpass filter order.
; Select frequency band edges and ripple parameters.
fp = 0.5
fs = 0.55
rp = 0.1
rs = 0.1
PM, IIRORDER(fp, fs, rp, rs, /Butter), $
Title = 'Butterworth Order'
; PV-WAVE prints the following:
; Butterworth Order
;     20
PM, IIRORDER(fp, fs, rp, rs, /Cheby1), $
Title = 'Chebyshev Type I Order'
PM, IIRORDER(fp, fs, rp, rs, /Cheby2), $
Title = 'Chebyshev Type II Order'
PM, IIRORDER(fp, fs, rp, rs, /Ellip), $
Title = 'Elliptic Order'
See Also
For Additional Information
Parks and Burrus 1987, Chapter 7.
Rabiner and Gold 1975, p. 241.