# Chebychev filter (Type II)

The Chebychev filter of type II is given by the normalized transfer function

where n is the order of the filter, ε defines the size of the ripples of the filter's magnitude response in the stop band, the roots of the numerator rk are

and the roots of the denominator sk are

Here sinh and cosh are the hyperbolic sine and cosine functions and asinh and acosh are the inverse hyperbolic sine and cosine functions.

The transfer function above is shown irrespective of the cutoff frequency (i.e., it is normalized for the cutoff frequency 1) and the forms of the Chebychev type II filter require substitutions. Use S = s / ωc to get the Chebychev type II low pass filter, where s = jω, ωc is the cutoff frequency of the filter, and ω is the angular frequency spanning the frequency spectrum between 0 and π. Use S = ωc / s to get the Chebychev type II high pass filter. Use S = (s2 + ωc2) / (B s) to get the Chebychev type II band pass filter, where ωc is the midpoint of the pass band and B is the width of the band. Use S = B s / (s2 + ωc2) to get the Chebychev type II band stop filter.

This filter is also called the "inverse Chebychev filter". Its poles (the roots of the denominator) are the inverse of the Chebychev filter of type I and as its gain function (shown below) "inverts" the gain function of the Chebychev filter of type I. While the Chebychev filter of type I controls the size of ripples in the pass band, this filter exhibits a flat pass band and controls the size of the ripples in the stop band.

## Example: Fourth order low pass Chebychev type II filer

Set n = 4 and use the substitution S = s / ωc. The transfer function of the fourth order low pass Chebychev type II filter is

Note that r1 and r4 are complex conjugates, r2 and r3 are complex conjugates, s1 and s4 are complex conjugates, and s2 and s3 are complex conjugates. Moreover, the roots of the numerator rk have real parts equal to zero, and hence r1 + r4 = 0, and r3 + r2 = 0. To make our computations easier, we can rewrite the transfer function as follows.

or

After the bilinear transformation s = 2 (z – 1) / (z + 1) the transfer function becomes a Z transform transfer function.

Say that the cutoff frequency of the filter is ωc = 0.6 and that ε = 0.1 (technically, the cutoff frequency of the filter will be ωc = 2 arctan(0.6/2) ≈ 0.583, due to the warping of the frequency domain by the bilinear transformation). The transfer function of this example Chebychev type 1 low pass filter, after scaling to obtain b0 = 1 is

and the filter itself is

y(k) = 0.090729 x(k) – 0.190160 x(k – 1) + 0.251568 x(k – 2)
– 0.190160 x(k – 3) + 0.090729 x(k – 4) + 2.662409 y(k – 1)
– 2.828952 y(k -2) + 1.378102 y(k – 3) – 0.264003 y(k – 4)

Suppose that the sampling frequency is 2000 Hz. The cutoff frequency then is ωc = (0.6 * 2000) / (2 π) = 191 Hz. The magnitude response of the filter is shown in the graph below.

## Size of the ripples in the stop band

The magnitude function of the Chebychev type II low pass filer can also be written as follows.

where Tn are the Chebychev polynomials

In the stop band, where ωc / ω < 1, Tnc / ω) = cos(n acos(ωc / ω)) and 0 ≤ Tn2c / ω) ≤ 1. In the stop band

Thus, smaller ε implies smaller ripples in the stop band and larger ε implies larger ripples. It should also be expected that |H(jω)| approaches 0 at ωc / ω approaches cos(π / 2n), since then Tnc / ω) = 0.

Using the same parameters as above, namely n = 2 and ωc = 0.6, we can plot the | H(jω)| for three different values of ε (0.1, 0.2, and 0.3).

The magnitude response of the three corresponding filters is:

A larger ε creates a filter with a smaller transition band, but with larger ripples in the stop band and worse stop band attenuation. A smaller ε creates a filter with smaller ripples in the stop band and better stop band attenuation, but with larger transition band.

## Example: Second order band stop Chebychev type II filter

Set n = 2 and S = B s / (s2 + ωc2). The transfer function of the second order band stop Chebychev type II filter is

s1, s2, r1 and r2 are computed with the same formulae as before. After the bilinear transformation s = 2 (z – 1) / (z + 1), setting, for example, ε = 0.1, B = 0.5 and ωc = 0.8, and scaling to obtain 1 at the beginning of the denominator, we have the following band stop transfer function

If we suppose that the sampling frequency is 2000 Hz, then ωc = (0.8 * 2000) / (2 π) = 255 Hz, B = (0.5 * 2000) / (2 π) = 159 Hz, and the magnitude response of the filter is as follows.

## Higher order Chebychev type II filters

Higher order Chebychev type II filters can be designed either using the methods above, or by stacking lower order filters. For example, the transfer function for the fourth order low pass Chebychev type II filter could have also been written as

This means that the fourth order low pass Chebychev type II filter can be implemented by stacking two filters of order two (these are not Chebychev type II filters, as the roots of each filter of order two differ from the Chebychev roots). Multiplying two transfer functions means that the impulse response of the total filter is the convolution of the two impulse responses of the lower order filters and the output of the first filter is the input to the second filter. We combine the roots in the manner above, as s1 and s4, s2 and s3, r1 and r4, and r2 and r3 form complex conjugate pairs. It is not important whether ε is used in the first filter, the second filter, or split between the two.

The following is a comparison of the magnitude responses of the fourth order and second order Chebychef type II filters with ε = 0.1, sampling frequency of 2000 Hz, and ωc = 0.6.

## Odd order Chebychev type II filters

When the Chebychev type II filter is of odd order n, one of the roots rk of the numerator cannot be computed, as the computation produces a division by zero. At k = (n – 1) / 2 we have rk = 1 / (-j cos(π / 2)). Thus, when n is odd, the middle root of the numerator is omitted from the transfer function, and the numerator becomes a polynomial of s of a lower degree than the denominator. Take, for example, the low pass Chebychev type II filter of order n = 3. Its transfer function, after omitting the middle root r2, is as follows.

Since r1 and r3 are complex conjugates, s1 and s3 are complex conjugates, and s2 is a real number, we can rewrite the transfer function above as a function with real coefficients in the following way.

After the bilinear transformation this filter has the transfer function

For example, when ωc = 0.6 and after scaling to obtain b0 = 1 in the denominator, the filter would be

This filter, however, produces a magnitude response in the pass band of about -5 dB. To ensure that the filter does not attenuate the pass band, we add some gain by scaling the coefficients in the numerator, so that H(s), evaluated at zero, is equal to 1. The gain is

In the example above the gain is 1.8 and the filter itself changes to

The magnitude response of this third order filter is shown below with the magnitude responses of two Chebychev type II filter so order 2 and 4.

Rating