You are here : matlab → Signal Processing → cheb2ord
# cheb2ord() - Signal Processing

### Syntax

### Example

### Output / Return Value

### Limitations

### Alternatives / See Also

### Reference

cheb2ord calculates the minimum order of a digital or analog Chebyshev Type II filter required to meet a set of filter design specifications.Digital Domain[n,Ws] = cheb2ord(Wp,Ws,Rp,Rs) returns the lowest order n of the Chebyshev Type II 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 Ws, is also returned. Use the output arguments n and Ws in cheby2.Choose the input arguments to specify the stopband and passband according to the following table.Description of Stopband and Passband Filter ParametersParameterDescription WpPassband corner frequency Wp, the cutoff frequency, is a scalar or a two-element vector with values between 0 and 1, with 1 corresponding to the normalized Nyquist frequency, π radians per sample. WsStopband corner frequency Ws, is a scalar or a two-element vector with values between 0 and 1, with 1 corresponding to the normalized Nyquist frequency. RpPassband ripple, in decibels. This value is the maximum permissible passband loss in decibels. RsStopband attenuation, in decibels. This value is the number of decibels the stopband is down from the passband. Use the following guide to specify filters of different types. Filter Type Stopband and Passband SpecificationsFilter TypeStopband and Passband ConditionsStopbandPassband LowpassWp < Ws, both scalars(Ws,1)(0,Wp) HighpassWp > Ws, both scalars(0,Ws)(Wp,1) BandpassThe 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)) BandstopThe 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.Analog Domain[n,Ws] = cheb2ord(Wp,Ws,Rp,Rs,'s') finds the minimum order n and cutoff frequencies Ws for an analog Chebyshev Type II 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 cheb2ord for lowpass, highpass, bandpass, and bandstop filters as described in the Filter Type Stopband and Passband Specifications table above.

[n,Ws] = cheb2ord(Wp,Ws,Rp,Rs)[n,Ws] = cheb2ord(Wp,Ws,Rp,Rs,'s')

Chebyshev Type II Filter DesignOpen This Example For data sampled at 1000 Hz, design a lowpass filter with less than 3 dB of ripple in the passband defined from 0 to 40 Hz, and at least 60 dB of attenuation in the stopband defined from 150 Hz to the Nyquist frequency. Wp = 40/500; Ws = 150/500; Rp = 3; Rs = 60; [n,Ws] = cheb2ord(Wp,Ws,Rp,Rs) [b,a] = cheby2(n,Rs,Ws); freqz(b,a,512,1000) title('n = 4 Chebyshev Type II Lowpass Filter') n = 4 Ws = 0.3000 Design a bandpass filter with a passband of 60 Hz to 200 Hz, with less than 3 dB of ripple in the passband, and 40 dB attenuation in the stopbands that are 50 Hz wide on both sides of the passband:Wp = [60 200]/500; Ws = [50 250]/500; Rp = 3; Rs = 40; [n,Ws] = cheb2ord(Wp,Ws,Rp,Rs) [b,a] = cheby2(n,Rs,Ws); freqz(b,a,512,1000) title('n = 7 Chebyshev Type II Bandpass Filter') n = 7 Ws = 0.1000 0.5000