Quantcast

Documentation Center

  • Trial Software
  • Product Updates

cheby1

Chebyshev Type I filter design (passband ripple)

Syntax

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

Description

cheby1 designs lowpass, bandpass, highpass, and bandstop digital and analog Chebyshev Type I filters. Chebyshev Type I filters are equiripple in the passband and monotonic in the stopband. Type I filters roll off faster than type II filters, but at the expense of greater deviation from unity in the passband.

Digital Domain

[z,p,k] = cheby1(n,R,Wp) designs an order n Chebyshev lowpass digital Chebyshev filter with normalized passband edge frequency Wp and R dB of peak-to-peak ripple in the passband. It returns the zeros and poles in length n column vectors z and p and the gain in the scalar k.

[z,p,k] = cheby1(n,R,Wp,'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 passband edge frequency Wp

  • 'low' for a lowpass digital filter with normalized passband edge frequency Wp

  • 'stop' for an order 2*n bandstop digital filter if Wp is a two-element vector, Wp = [w1 w2]. The stopband is w1 < ω < w2.

Normalized passband edge frequency is the frequency at which the magnitude response of the filter is equal to -R dB. For cheby1, the normalized passband edge frequency Wp is a number between 0 and 1, where 1 corresponds to half the sample rate, π radians per sample. Smaller values of passband ripple R lead to wider transition widths (shallower rolloff characteristics).

If Wp is a two-element vector, Wp = [w1 w2], cheby1 returns an order 2*n bandpass filter with passband w1 < ω < w2.

With different numbers of output arguments, cheby1 directly obtains other realizations of the filter. To obtain the transfer function form, use two output arguments as shown below.

    Note:   See Limitations for information about numerical issues that affect forming the transfer function.

[b,a] = cheby1(n,R,Wp) designs an order n Chebyshev lowpass digital Chebyshev filter with normalized passband edge frequency Wp and R dB of peak-to-peak ripple 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.

[b,a] = cheby1(n,R,Wp,'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] = cheby1(n,R,Wp) or

[A,B,C,D] = cheby1(n,R,Wp,'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] = cheby1(n,R,Wp,'s') designs an order n lowpass analog Chebyshev Type I filter with angular passband edge frequency Wp 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 passband edge frequency is the frequency at which the magnitude response of the filter is -R dB. For cheby1, the angular passband edge frequency Wp must be greater than 0 rad/s.

If Wp is a two-element vector Wp = [w1 w2] with w1 < w2, then cheby1(n,R,Wp,'s') returns an order 2*n bandpass analog filter with passband w1 < ω< w2.

[z,p,k] = cheby1(n,R,Wp,'ftype','s') designs a highpass, lowpass, or bandstop filter, where the string 'ftype' is 'high', 'low', or 'stop', as described above.

You can supply different numbers of output arguments for cheby1 to directly obtain other realizations of the analog filter. To obtain the transfer function form, use two output arguments as shown below.

[b,a] = cheby1(n,R,Wp,'s') designs an order n lowpass analog Chebyshev Type I filter with angular passband edge frequency Wp rad/s. It returns the filter coefficients in length n+1 row vectors b and a, in descending powers of s, derived from the transfer function

[b,a] = cheby1(n,R,Wp, '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] = cheby1(n,R,Wp,'s') or

[A,B,C,D] = cheby1(n,R,Wp,'ftype','s') where A, B, C, and D are defined as

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

Examples

expand all

Lowpass Chebyshev Type I Filter

For data sampled at 1000 Hz, design a 9th-order lowpass Chebyshev Type I filter with 0.5 dB of ripple in the passband and a passband edge frequency of 300 Hz, which corresponds to a normalized value of 0.6. Plot the magnitude and phase responses.

[z,p,k] = cheby1(9,0.5,300/500);
sos = zp2sos(z,p,k);
fvtool(sos,'Analysis','freq')

More About

expand all

Limitations

Numerical Instability from Transfer Function Form

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. If you design the filter using the [b,a] syntax, you may encounter numerical problems. These problems are due to round-off errors. They may occur for filter orders as low as 6. The following example illustrates this limitation.

n = 6;
r = 0.1;
Wn = [2.5e6 29e6]/500e6;
ftype = 'bandpass';

% Transfer function design
[b,a] = cheby1(n,r,Wn,ftype);      % This filter is unstable

% Zero-pole-gain design
[z,p,k] = cheby1(n,r,Wn,ftype);
sos = zp2sos(z,p,k);

% Plot and compare the results
hfvt = fvtool(b,a,sos,'FrequencyScale','log');
legend(hfvt,'TF Design','ZPK Design')

Algorithms

cheby1 uses a five-step algorithm:

  1. It finds the lowpass analog prototype poles, zeros, and gain using the cheb1ap function.

  2. It converts the 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, cheby1 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 Wp or w1 and w2.

  5. It converts the state-space filter back to transfer function or zero-pole-gain form, as required.

See Also

| | | | |

Was this topic helpful?