Signal Processing Toolbox |
Minimum order for elliptic filters
Syntax
Description
ellipord
calculates the minimum order of a digital or analog elliptic filter required to meet a set of filter design specifications.
Digital Domain
returns the lowest order [n,Wn]
= ellipord(Wp,Ws,Rp,Rs)
n
of the elliptic filter that loses no more than Rp
dB in the passband and has at least Rs
dB of attenuation in the stopband. The scalar (or vector) of corresponding cutoff frequencies Wn
, is also returned. Use the output arguments n
and Wn
in ellip
.
Choose the input arguments to specify the stopband and passband according to the following table.
Use the following guide to specify filters of different types.
If your filter specifications call for a bandpass or bandstop filter with unequal ripple in each of the passbands or stopbands, design separate lowpass and highpass filters according to the specifications in this table, and cascade the two filters together.
Analog Domain
finds the minimum order [n,Wn] = ellipord(Wp,Ws,Rp,Rs,'
s
')
n
and cutoff frequencies Wn
for an analog filter. You specify the frequencies Wp
and Ws
similar to those described in the Table , Description of Stopband and Passband Filter Parameters table above, only in this case you specify the frequency in radians per second, and the passband or the stopband can be infinite.
Use ellipord
for lowpass, highpass, bandpass, and bandstop filters as described in the Table , Filter Type Stopband and Passband Specifications table above.
Example 1
For 1000 Hz data, design a lowpass filter with less than 3 dB of ripple in the passband defined from 0 to 40 Hz and at least 60 dB of ripple in the stopband defined from 150 Hz to the Nyquist frequency (500 Hz):
Wp=
40/500; Ws=
150/500; Rp=
3; Rs=
60; [n,Wn]=
ellipord(Wp,Ws,Rp,Rs) n = 4 Wn = 0.0800 [b,a]=
ellip(n,Rp,Rs,Wn); freqz(b,a,512,1000); title('n=4 Elliptic Lowpass Filter')
Example 2
Now design a bandpass filter with a passband from 60 Hz to 200 Hz, with less than 3 dB of ripple in the passband, and 40 dB attenuation in the stopbands that are 50 Hz wide on both sides of the passband:
Wp=
[60 200]/500; Ws=
[50 250]/500; Rp=
3; Rs=
40; [n,Wn]=
ellipord(Wp,Ws,Rp,Rs) n = 5 Wn = 0.1200 0.4000 [b,a]=
ellip(n,Rp,Rs,Wn); freqz(b,a,512,1000); title('n=5 Elliptic Bandpass Filter')
Algorithm
ellipord
uses the elliptic lowpass filter order prediction formula described in [1]. The function performs its calculations in the analog domain for both the analog and digital cases. For the digital case, it converts the frequency parameters to the s-domain before estimating the order and natural frequencies, and then converts them back to the z-domain.
ellipord
initially develops a lowpass filter prototype by transforming the passband frequencies of the desired filter to 1 rad/s (for low- and highpass filters) and to -1 and 1 rad/s (for bandpass and bandstop filters). It then computes the minimum order required for a lowpass filter to meet the stopband specification.
See Also
buttord
, cheb1ord
, cheb2ord
, ellip
References
[1] Rabiner, L.R., and B. Gold. Theory and Application of Digital Signal Processing. Englewood Cliffs, NJ: Prentice-Hall, 1975. Pg. 241.
ellipap | eqtflength |
© 1994-2005 The MathWorks, Inc.