Signal Processing Toolbox | Help Desk |
ellip
Elliptic (Cauer) filter design.
[b,a] = ellip(n,Rp,Rs,Wn) [b,a] = ellip(n,Rp,Rs,Wn,'ftype
') [b,a] = ellip(n,Rp,Rs,Wn,'s') [b,a] = ellip(n,Rp,Rs,Wn,'ftype
','s') [z,p,k] = ellip(...) [A,B,C,D] = ellip(...)
ellip
designs lowpass, bandpass, highpass, and bandstop digital and analog elliptic filters. Elliptic filters offer steeper rolloff characteristics than Butterworth or Chebyshev filters, but are equiripple in both the pass- and stopbands. In general, elliptic filters meet given performance specifications with the lowest order of any filter type.
[b,a] = ellip(n,Rp,Rs,Wn)
designs an order n
lowpass digital elliptic filter with cutoff frequency Wn
, Rp
dB of ripple in the passband, and a stopband Rs
dB down from the peak value in the passband. It returns the filter coefficients in the length n + 1
row vectors b
and a
, with coefficients in descending powers of z:-Rp
dB. For ellip
, the cutoff frequency Wn
is a number between 0 and 1, where 1 corresponds to half the sample frequency (Nyquist frequency). Smaller values of passband ripple Rp
and larger values of stopband attenuation Rs
both lead to wider transition widths (shallower rolloff characteristics).
If Wn
is a two-element vector, Wn = [w1 w2]
, ellip
returns an order 2*n
bandpass filter with passband w1 <
< w2
.
[b,a] = ellip(n,Rp,Rs,Wn,'ftype
')
designs a highpass or bandstop filter, where ftype
is
high
for a highpass digital filter with cutoff frequency Wn
stop
for an order 2*n
bandstop digital filter if Wn
is a two-element vector, Wn = [w1 w2]
The stopband is w1
< <
w2
.
ellip
directly obtains other realizations of the filter. To obtain zero-pole-gain form, use three output arguments:
[z,p,k] = ellip(n,Rp,Rs,Wn)
or
[z,p,k] = ellip(n,Rp,Rs,Wn,'ftype
')
returns the zeros and poles in length n
column vectors z
and p
and the gain in the scalar k
.
To obtain state-space form, use four output arguments:
[A,B,C,D] = ellip(n,Rp,Rs,Wn)
or
[A,B,C,D] = ellip(n,Rp,Rs,Wn,'ftype
')
where A
, B
, C
, and D
are[b,a] =
ellip(n,Rp,Rs,Wn,'s')
designs an order n
lowpass analog elliptic filter with cutoff frequency Wn
and returns the filter coefficients in the length n + 1
row vectors b
and a
, in descending powers of s:-Rp
dB. For ellip
, the cutoff frequency Wn
must be greater than 0.
If Wn
is a two-element vector with w1
< w2
, then ellip(n,Rp,Rs,Wn,
's')
returns an order 2*n
bandpass analog filter with passband w1
< w2
.
[b,a] = ellip(n,Rp,Rs,Wn,'ftype
','s')
designs a highpass or bandstop filter, where ftype
is
high
for a highpass analog filter with cutoff frequency Wn
stop
for an order 2*n
bandstop analog filter if Wn
is a two-element vector, Wn = [w1 w2]
The stopband is w1
< <
w2
.
[z,p,k] = ellip(n,Rp,Rs,Wn,'s')
or
[z,p,k] = ellip(n,Rp,Rs,Wn,'ftype
',
's')
returns the zeros and poles in length n
or 2*n
column vectors z
and p
and the gain in the scalar k
.
To obtain state-space form, use four output arguments:
[A,B,C,D] = ellip(n,Rp,Rs,Wn,'s')
or
[A,B,C,D] = ellip(n,Rp,Rs,Wn,'ftype
',
's')
where A
, B
, C
, and D
are[b,a] = ellip(6,3,50,300/500);The filter's frequency response is
freqz(b,a,512,1000)Design a 20th-order bandpass elliptic filter with a passband from 100 to 200 Hz and plot its impulse response:
![]()
n = 10; Rp = 0.5; Rs = 20; Wn = [100 200]/500; [b,a] = ellip(n,Rp,Rs,Wn); [y,t] = impz(b,a,101); stem(t,y)For high order filters, the state-space form is the most numerically accurate, followed by the zero-pole-gain form. The transfer function form is the least accurate; numerical problems can arise for filter orders as low as 15. The design of elliptic filters is the most difficult and computationally intensive of the Butterworth, Chebyshev type I and II, and elliptic designs.
![]()
ellip
uses a five-step algorithm:
ellipap
function.
ellip
uses bilinear
to convert the analog filter into a digital filter through a bilinear transformation with frequency prewarping. Careful frequency adjustment guarantees that the analog filters and the digital filters will have the same frequency response magnitude at Wn
or w1
and w2
.