Sie sind auf Seite 1von 4

cheby2 :: Functions (Signal Processing Toolbox)

1 of 4

jar:file:///C:/Program%20Files/MATLAB/R2011a/help/toolbox/signal/hel...

cheby2
Chebyshev Type II filter design (stopband ripple)

Syntax
[z,p,k]=cheby2(n,R,Wst)
[z,p,k]=cheby2(n,R,Wst,'ftype')
[b,a]=cheby2(n,R,Wst)
[b,a]=cheby2(n,R,Wst,'ftype')
[A,B,C,D]=cheby2(n,R,Wst)
[A,B,C,D]=cheby2(n,R,Wst,'ftype')
[z,p,k]=cheby2(n,R,Wst,'s')
[z,p,k]=cheby2(n,R,Wst,'ftype','s')
[b,a]=cheby2(n,R,Wst,'s')
[b,a]=cheby2(n,R,Wst,'ftype','s')
[A,B,C,D]=cheby2(n,R,Wst,'s')
[A,B,C,D]=cheby2(n,R,Wst,'ftype','s')

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
[z,p,k] = cheby2(n,R,Wst) designs an order n lowpass digital Chebyshev Type II filter with normalized stopband edge
frequency Wst and stopband ripple R dB down from the peak passband value. It returns the zeros and poles in length n
column vectors z and p and the gain in the scalar k.
Normalized stopband edge frequency is the beginning of the stopband, where the magnitude response of the filter is equal to
-R dB. For cheby2, the normalized stopband edge frequency Wst is a number between 0 and 1, where 1 corresponds to half
the sample rate. Larger values of stopband attenuation R lead to wider transition widths (shallower rolloff characteristics).
If Wst is a two-element vector, Wst = [w1 w2], cheby2 returns an order 2*n bandpass filter with passband w1 < < w2.
[z,p,k] = cheby2(n,R,Wst,'ftype')designs a highpass, lowpass, or bandstop filter, where the string 'ftype' is one
of the following:
'high' for a highpass digital filter with normalized stopband edge frequency Wst
'low' for a lowpass digital filter with normalized stopband edge frequency Wst
'stop' for an order 2*n bandstop digital filter if Wst is a two-element vector, Wst = [w1 w2]. The stopband is
w1 < < w2.
With different numbers of output arguments, cheby2 directly obtains other realizations of the filter. To obtain the transfer
function form, use two output arguments as shown below.
Note See Limitations below for information about numerical issues that affect forming the transfer function.

[b,a] = cheby2(n,R,Wst) designs an order n lowpass digital Chebyshev Type II filter with normalized stopband edge
frequency Wst and stopband ripple R 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.

[b,a] = cheby2(n,R,Wst,'ftype') designs a highpass, lowpass, or bandstop filter, where the string 'ftype' is
'high', 'low', or 'stop', as described above.
To obtain state-space form, use four output arguments as shown below.
[A,B,C,D] = cheby2(n,R,Wst) or

11/27/2014 7:38 PM

cheby2 :: Functions (Signal Processing Toolbox)

2 of 4

jar:file:///C:/Program%20Files/MATLAB/R2011a/help/toolbox/signal/hel...

[A,B,C,D] = cheby2(n,R,Wst,'ftype') where A, B, C, and D are

and u is the input, x is the state vector, and y is the output.

Analog Domain
[z,p,k] = cheby2(n,R,Wst,'s') designs an order n lowpass analog Chebyshev Type II filter with angular stopband
edge frequency Wst rad/s.. It returns the zeros and poles in length n or 2*n column vectors z and p and the gain in the scalar
k.
Angular stopband edge frequency is the frequency at which the magnitude response of the filter is equal to -R dB. For
cheby2, the angular stopband edge frequency Wst must be greater than 0 rad/s.
If Wst is a two-element vector Wst = [w1 w2] with w1 < w2, then cheby2(n,R,Wst,'s') returns an order 2*n bandpass
analog filter with passband w1 < < w2.
[z,p,k] = cheby2(n,R,Wst,'ftype','s') designs a highpass, lowpass, or bandstop filter, where the string 'ftype'
is 'high', 'low', or 'stop', as described above.
With different numbers of output arguments, cheby2 directly obtains other realizations of the analog filter. To obtain the
transfer function form, use two output arguments as shown below:
[b,a] = cheby2(n,R,Wst,'s') designs an order n lowpass analog Chebyshev Type II filter with angular stopband edge
frequency Wst rad/s.. 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.

[b,a] = cheby2(n,R,Wst,'ftype','s') designs a highpass , lowpass, or bandstop filter, where the string 'ftype' is
'high', 'low', or 'stop', as described above.
To obtain state-space form, use four output arguments as shown below:
[A,B,C,D] = cheby2(n,R,Wst,'s') or
[A,B,C,D] = cheby2(n,R,Wst,'ftype','s') where A, B, C, and D are

and u is the input, x is the state vector, and y is the output.

Examples
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:
[z,p,k] = cheby2(9,20,300/500);
[sos,g] = zp2sos(z,p,k);
Hd = dfilt.df2tsos(sos,g);
h = fvtool(Hd);
set(h,'Analysis','freq')

% Convert to SOS form


% Create a dfilt object
% Plot magnitude response
% Display frequency response

11/27/2014 7:38 PM

cheby2 :: Functions (Signal Processing Toolbox)

3 of 4

jar:file:///C:/Program%20Files/MATLAB/R2011a/help/toolbox/signal/hel...

Limitations
In general, you should use the [z,p,k] syntax to design IIR filters. To analyze or implement your filter, you can then use the
[z,p,k] output with zp2sos and an sos dfilt structure. For higher order filters (possibly starting as low as order 8),
numerical problems due to roundoff errors may occur when forming the transfer function using the [b,a] syntax. The
following example illustrates this limitation:
n = 6;
r = 80;
Wn = [2.5e6 29e6]/500e6;
ftype = 'bandpass';
% Transfer Function design
[b,a] = cheby2(n,r,Wn,ftype);
h1=dfilt.df2(b,a);
% This is an unstable filter.
% Zero-Pole-Gain design
[z, p, k] = cheby2(n,r,Wn,ftype);
[sos,g]=zp2sos(z,p,k);
h2=dfilt.df2sos(sos,g);
% Plot and compare the results
hfvt=fvtool(h1,h2,'FrequencyScale','log');
legend(hfvt,'TF Design','ZPK Design')

11/27/2014 7:38 PM

cheby2 :: Functions (Signal Processing Toolbox)

4 of 4

jar:file:///C:/Program%20Files/MATLAB/R2011a/help/toolbox/signal/hel...

Algorithms
cheby2 uses a five-step algorithm:
1. It finds the lowpass analog prototype poles, zeros, and gain using the cheb2ap function.
2. It converts poles, zeros, and gain into state-space form.
3. It transforms the lowpass filter into a bandpass, highpass, or bandstop filter with desired cutoff frequencies, using a
state-space transformation.
4. For digital filter design, 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 Wst or w1 and w2.
5. It converts the state-space filter back to transfer function or zero-pole-gain form, as required.

See Also
besself | butter | cheb1ord | cheb2ap | cheby1 | ellip
Was this topic helpful?

Yes

No

1984-2011 The MathWorks, Inc. Terms of Use Patents Trademarks Acknowledgments

11/27/2014 7:38 PM

Das könnte Ihnen auch gefallen