Signal Processing Toolbox |
Chebyshev Type II filter design (stopband ripple)
Syntax
[b,a]=
cheby2(n,Rs,Wn) [b,a]=
cheby2(n,Rs,Wn,'ftype
') [b,a]=
cheby2(n,Rs,Wn,'s
') [b,a]=
cheby2(n,Rs,Wn,'ftype
','s
') [z,p,k]=
cheby2(...) [A,B,C,D]=
cheby2(...)
Description
cheby2
designs lowpass, highpass, bandpass, and bandstop digital and analog Chebyshev Type II filters. Chebyshev Type II filters are monotonic in the passband and equiripple in the stopband. Type II filters do not roll off as fast as type I filters, but are free of passband ripple.
Digital Domain
[b,a] = cheby2(n,Rs,Wn)
designs an order n
lowpass digital Chebyshev Type II filter with normalized stopband edge frequency
Wn
and stopband ripple Rs
dB down from the peak passband value. It returns the filter coefficients in the length n+1
row vectors b
and a
, with coefficients in descending powers of z.
Normalized stopband edge frequency is the beginning of the stopband, where the magnitude response of the filter is equal to -Rs
dB. For cheby2
, the normalized stopband edge frequency Wn
is a number between 0 and 1, where 1 corresponds to the Nyquist frequency. Larger values of stopband attenuation Rs lead to wider transition widths (shallower rolloff characteristics).
If Wn
is a two-element vector, Wn
= [w1 w2]
, cheby2
returns an order 2*n
bandpass filter with passband w1
<
<
w2
.
[b,a] = cheby2(n,Rs,Wn,'
designs a highpass, lowpass, or bandstop filter, where the string ftype
')
'
ftype
'
is one of the following.
'high'
for a highpass digital filter with normalized stopband edge frequency Wn
'low'
for a lowpass digital filter with normalized stopband edge 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
.
With different numbers of output arguments, cheby2
directly obtains other realizations of the filter. To obtain zero-pole-gain form, use three output arguments as shown below:
[z,p,k] = cheby2(n,Rs,Wn,'
returns the zeros and poles in length ftype
')
n
column vectors z
and p
and the gain in the scalar k
.
To obtain state-space form, use four output arguments as shown below.
[A,B,C,D] = cheby2(n,Rs,Wn)
or
[A,B,C,D] = cheby2(n,Rs,Wn,'
where ftype
')
A
, B
, C
, and D
are
and u is the input, x is the state vector, and y is the output.
Analog Domain
designs an order [b,a]
= cheby2(n,Rs,
Wn,'s
')
n
lowpass analog Chebyshev Type II filter with angular stopband edge frequency Wn
. It returns the filter coefficients in the length n+1
row vectors b
and a
, with coefficients in descending powers of s, derived from the transfer function.
Angular stopband edge frequency is the frequency at which the magnitude response of the filter is equal to -Rs
dB. For cheby2
, the angular stopband edge frequency Wn
must be greater than 0 rad/s.
If Wn
is a two-element vector Wn
= [w1 w2]
with w1
< w2
, then cheby2(n,Rs,Wn,'
s
')
returns an order 2*n
bandpass analog filter with passband w1
< < w2
.
[b,a] = cheby2(n,Rs,Wn,'
designs a highpass , lowpass, or bandstop filter.ftype
','s
')
With different numbers of output arguments, cheby2 directly obtains other realizations of the analog filter. To obtain zero-pole-gain form, use three output arguments as shown below:
[z,p,k] = cheby2(n,Rs,Wn,'
ors
')
[z,p,k] = cheby2(n,Rs,Wn,'
returns the zeros and poles in length ftype
','s
')
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 as shown below:
[A,B,C,D] = cheby2(n,Rs,Wn,'
ors
')
[A,B,C,D] = cheby2(n,Rs,Wn,'
where ftype
','s
')
A
, B
, C
, and D
are
and u is the input, x is the state vector, and y is the output.
Example 1: Lowpass Filter
For data sampled at 1000 Hz, design a ninth-order lowpass Chebyshev Type II filter with stopband attenuation 20 dB down from the passband and a stopband edge frequency of 300 Hz, which corresponds to a normalized value of 0.6:
The frequency response of the filter is
Example 2: Bandpass Filter
Design a fifth-order bandpass Chebyshev Type II filter with passband from 100 to 200 Hz and plot the impulse response of the filter:
Limitations
For high order filters, the state-space form is the most numerically accurate, followed by the zero-pole-gain form. The transfer function coefficient form is the least accurate; numerical problems can arise for filter orders as low as 15.
Algorithm
cheby2
uses a five-step algorithm:
cheb2ap
function.
cheby2
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
.
See Also
besself
, butter
, cheb2ap
, cheb1ord
, cheby1
, ellip
cheby1 | chirp |
© 1994-2005 The MathWorks, Inc.