Designs a digital IIR Chebyshev Type II filter.
CHEBY2( 
type, order, rate, pb1, pb2, attn, ripple, sb1, sb2, "options") 
type 
 
An integer, the filter type.
 
order 
 
Optional. An integer, the filter length. If not specified or set to 1, the filter order is automatically estimated.  
rate 
 
A real, the sample rate of the filter in Hertz.  
pb1 
 
A real, the first passband edge in Hertz.  
pb2 
 
A real, the second passband edge in Hertz.  
attn 
 
Optional. A real, the stopband attenuation in dB. Defaults to 40 dB.  
ripple 
 
Optional. A real, the stopband ripple in dB. Defaults to 3 dB.  
sb1 
 
Optional. A real, the first stopband
edge frequency in Hertz. Defaults to  
sb2 
 
Optional. A real, the second stopband
edge frequency in Hertz. Defaults to  
"options" 
 
Optional. A string, zero or more filter options:

A series, the Chebyshev Type II filter coefficients in multistage cascade format.
W1: cheby2(2, 1000.0, 100.0, 40.0, 3.0)
W2: 20*log10(filtmag(W1, 1024));sety(80, 10)
W1 creates a Chebyshev II highpass filter with a sample rate of 1000 Hz and a cutoff frequency of 100 Hz. The passband ripple is set to 3.0 dB. The stopband frequency defaults to 50 Hz. The stopband attenuation is set to 40.0 dB. W2 displays the frequency response of the resulting filter.
W1: cheby2(2, 1000.0, 100.0, 40.0, 3.0)
W2: gsin(1000, 1/1000, 3) + gsin(1000, 1/1000, 250)
W3: iirfilter(W2, W1)
Creates the same IIR highpass filter as the previous example. W2 contains a series with two sinusoids and W3 applies the filter to recover the higher frequency sinewave.
W2: cheby2(2, 1000.0, 100.0, 50.0, 1.0, 70.0)
Creates a similar filter except the stopband ripple is set to 1 dB, the stopband attenuation is set to 50 dB and the stopband edge is increased to 70 Hz.
W3: cheby2(3, 8, 1000.0, 200.0, 300.0, 60.0)
Creates a Chebyshev II bandpass filter with a sample rate of 1000 Hz, a filter order of 8 and the passband extends from 200 Hz to 300 Hz. The stopband attenuation is set to 60 dB.
W4: cheby2(3, 1000.0, 200.0, 300.0, 60.0, 2.0, 150.0, 350.0)
Creates a similar Chebyshev II bandpass filter with a sample rate of 1000 Hz, a stopband ripple of 2.0 dB and the passband extends from 200 Hz to 300 Hz. The first stopband edge is set to 150 Hz and the second passband edge is set to 350 Hz. The passband attenuation is set to 60 dB.
W5: cheby2(3, 1000.0, 200.0, 300.0, 50.0, 2.0, 180.0, 320.0)
Creates a similar Chebyshev II bandpass filter to above except the first stopband edge is 180 Hz and the last stopband edge is set to 320 Hz. The desired stopband attenuation is set to 50 dB.
W1: cheby2(2, 1000.0, 100.0, 40.0, 3.0, "analog")
W2: 20*log10(filtmag(W1, 1024, "analog"));semilogx;sety(80, 10)
Same as the first example, except the result is an analog filter. The rate parameter is ignored.
The generic CHEBY2 filter specifications are depicted as follows:
Type = 1, Lowpass
Type = 2, Highpass
Type = 3, Bandpass
Type = 4, Bandstop
For filter type 1 and 2 (lowpass and highpass), the band frequencies pb2 and sb2 are omitted.
CHEBY2 uses the Bilinear Transform Method to compute the coefficients by converting an analog filter prototype to the digital domain. The filter order refers to the number of resulting poles (2X poles result for type 3 and type 4) and is not equivalent to the number of filter coefficients.
If "matched_z" is specified, the matched z transform is used instead of the BILINEAR transform. The matched z method maps the analog prototype filter poles and zeros to the digital domain with:
z = e^{ sT} where T is the sample rate of the digital filter.
The band edges must lie between 0.0 and 0.5 * rate (the Nyquist frequency). Overlapping band edges are not permitted.
The filter coefficients are produced in multistage biquad form suitable for processing by the CASCADE function.
The cascade stages are ordered such that the poles of each stage are closer to the unit circle than the previous stage. The zeros of each stage are chosen to be closest to the poles of the same stage.
If "analog" is specified, the filter coefficients represent an analog filter, with coefficients in cascaded second order stages of analog frequency s. In this case, the rate parameter is ignored.
The transfer function of an analog low pass Chebyshev II filter with a cut off frequency of ω_{c} is given by the pole and zero expression:
where n is the filter order. The magnitude of the transfer function at ω_{c} is equal to the stopband attenuation. The stopband attenuation is determined by ε such that:
The zeros of the transfer function are defined by:
The poles of the transfer function are defined by:
The gain of the filter in terms of the transfer function is:
where T_{n} is the Chebyshev polynomial:
A Chebyshev II filter is flat in the passband but exhibits ripple in the stopband. Because the poles of the Chebyshev II filter are the inverse of the Chebyshev I filter, it is also called the Inverse Chebyshev filter.
The attn and ripple parameters are swapped from the CHEBY1 function.
See BANDPASS, BANDSTOP, HIGHPASS and LOWPASS to design linear phase FIR filters using the Remez Exchange method.
CHEBY2 requires the DADiSP/Filters Module.
Oppenheim and Schafer
Discrete Time Signal Processing
Prentice Hall, 1989
Digital Signal Processing Committee
Programs for Digital Signal Processing
I.E.E.E. Press, 1979
Bateman & Yates
Digital Signal Processing Design
Computer Science Press, 1989