Documentation |
Minimum order for elliptic filters
[n,Wp] = ellipord(Wp,Ws,Rp,Rs)
[n,Wp] = ellipord(Wp,Ws,Rp,Rs,'s')
ellipord calculates the minimum order of a digital or analog elliptic filter required to meet a set of filter design specifications.
[n,Wp] = ellipord(Wp,Ws,Rp,Rs) returns the lowest order, 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 Wp, is also returned. Use the output arguments n and Wp in ellip.
Choose the input arguments to specify the stopband and passband according to the following table.
Description of Stopband and Passband Filter Parameters
Use the following guide to specify filters of different types.
Filter Type Stopband and Passband Specifications
Filter Type | Stopband and Passband Conditions | Stopband | Passband |
---|---|---|---|
Wp < Ws, both scalars | (Ws,1) | (0,Wp) | |
Highpass | Wp > Ws, both scalars | (0,Ws) | (Wp,1) |
Bandpass | The interval specified by Ws contains the one specified by Wp (Ws(1) < Wp(1) < Wp(2) < Ws(2)). | (0,Ws(1)) and (Ws(2),1) | (Wp(1),Wp(2)) |
Bandstop | The interval specified by Wp contains the one specified by Ws (Wp(1) < Ws(1) < Ws(2) < Wp(2)). | (0,Wp(1)) and (Wp(2),1) | (Ws(1),Ws(2)) |
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.
[n,Wp] = ellipord(Wp,Ws,Rp,Rs,'s') finds the minimum order n and cutoff frequencies Wp for an analog filter. You specify the frequencies Wp and Ws similar to those described in the 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 Filter Type Stopband and Passband Specifications table above.