Signals and Systems/Filter Implementations

From Wikibooks, open books for an open world
< Signals and Systems
Jump to: navigation, search

Filter design mostly bases on a limited set of widely used transfer functions. Optimization methods allow to design other types of filters, but the functions listed here have been studied extensively, and designs for these filters (including circuit designs to implement them) are readily available. The filter functions presented here are of lowpass type, and transformation methods allow to obtain other common filter types such as highpass, bandpass or bandstop.

Butterworth Filters[edit]

Plot of the amplitude response of the normalized Butterworth lowpass transfer function, for orders 1 to 5

The Butterworth filter function has been designed to provide a maximally flat amplitude response. This is obtained by the fact that all the derivatives up to the filter order minus one are zero at DC. The amplitude response has no ripple in the passband. It is given by:

A(j\omega) = |H(j\omega)| = \sqrt{ \frac{1}{1+\omega^{2n}} }

It should be noted that whilst the amplitude response is very smooth, the step response shows noticeable overshoots. They are due to the phase response which is not linear or, in other words, to the group delay which is not constant.

The amplitude response plot shows that the slope is 20n dB/decade, where n is the filter order. This is the general case for all-pole lowpass filters. Zeros in the transfer function can accentuate the slope close to their frequency, thus masking this general rule for zero-pole lowpass filters.

The plot also shows that whatever the order of the filter, all the amplitudes cross the same point at A(\omega = 1) = \frac {1}\sqrt{2}, which corresponds to approximatively -3 db. This -3 db reference is often used to specify the cutoff frequency of other kinds of filters.

Butterworth filters don't have a particularly steep drop-off but, together with Chebyshev type I filters, they are of all-pole kind. This particularity results in reduced hardware (or software, depending on the implementation method), which means that for a similar complexity, higher order Butterworth filters can be implemented, compared to functions with a steeper drop-off such as elliptic filters.

Zeroes of the Butterworth function[edit]

Poles of a 4th order Butterworth filter

The normalized Butterworth function is indirectly defined by:

H(s) \cdot H(-s) = \frac{1}{1+\omega^{2n}}

This functions has zeros regularly placed on the unit circle. Knowing that a stable filter has all of its poles on the left half s-plane, it is clear that the left half poles on the unit circle belong to H(s), whilst the right half poles on the right belong to H(-s).

The normalized Butterworth function has a cutoff frequency at f_c = \omega_c / (2 \pi) = 1/ (2 \pi) [Hz]. A different cutoff frequency is achieved by scaling the circle radius to \omega_c = 2 \pi f_c.

Butterworth Transfer Function[edit]

The transfer function of a Butterworth filter is of the form:

H(s) = \frac{1}{den(s)}

It can also be written as a function of the poles:

H(s) = \frac{k}{\prod_{i=1}^N (s-p_i)}

With this, the denominator ploynom is found from the values of the poles.

Chebyshev Filters[edit]

In comparison to Butterworth filters, Chebyshev filters have a supplemental parameter: a ripple in amplitude. This ripple, which could be considered as non ideal, has the tremendous advantage to allow a steeper roll-off between passband and stopband.

The ripple can happen in the passband, which is the case for Type I Chebyshev filters, or in the stopband for Type II filters.

Chebyshev Polynomials[edit]

Chebyshev polynomials in the domain −1 < x < 1

Chebyshev Polynomials have the property to remain in the range -1 < T_n(x) < 1 for an input in the range −1 < x < 1 and then rapidly grow outside this range. This characteristic is a good prerequisite for devising transfer functions with limited oscillations in a given frequency range and steep roll-offs at its borders.

The Chebyshev polynomials of the first kind are defined by the recurrence relation:


\begin{align}
T_0(x) & = 1 \\
T_1(x) & = x \\
T_{n+1}(x) & = 2x \cdot T_n(x) - T_{n-1}(x).
\end{align}

The first Chebyshev polynomials of the first kind are:

 T_0(x) = 1
 T_1(x) = x
 T_2(x) = 2x^2 - 1
 T_3(x) = 4x^3 - 3x
 T_4(x) = 8x^4 - 8x^2 + 1

Chebyshev Type I[edit]

Frequency response of a fourth-order type I Chebyshev filter

Chebyshev type I filters show a ripple in the passband. The amplitude response as a function of angular frequency \omega of the nth-order low-pass filter is:

G_n(\omega) = \left | H_n(j \omega) \right | = \frac{1}{\sqrt{1+\varepsilon^2 T_n^2\left(\frac{\omega}{\omega_0}\right)}}

where \varepsilon is the ripple factor, \omega_0 is the cutoff frequency and T_n() is a Chebyshev polynomial of order n.

The passband exhibits equiripple behavior, with the ripple determined by the ripple factor \varepsilon. In the passband, the Chebyshev polynomial alternates between 0 and 1 so the filter gain will alternate between maxima at G = 1 and minima at G=1/\sqrt{1+\varepsilon^2}. At the cutoff frequency \omega_0 the gain again has the value 1/\sqrt{1+\varepsilon^2} but continues to drop into the stop band as the frequency increases. This behavior is shown in the diagram on the right. The common practice of defining the cutoff frequency at −3 dB is usually not applied to Chebyshev filters; instead the cutoff is taken as the point at which the gain falls to the value of the ripple for the final time.

Chebyshev Type II[edit]

Frequency response of a fifth-order type II Chebyshev filter

Chebyshev Type II filters have ripples in the stopband. The amplitude response is:

G_n(\omega,\omega_0) = \frac{1}{\sqrt{1+ \frac{1} {\varepsilon^2 T_n ^2 \left ( \omega_0 / \omega \right )}}}.

In the stopband, the gain will always be smaller than

\frac{1}{\sqrt{1+ \frac{1}{\varepsilon^2}}}

Also known as inverse Chebyshev, this filter function is less common because it does not roll-off as fast as type I, and requires more components. Indeed, the transfer function exhibits not only poles but also zeros.

Elliptic Filters[edit]

Elliptic filters, also called Cauer filters, suffer from a ripple effect like Chebyshev filters. However, unlike the type 1 and Type 2 Chebyshev filters, Elliptic filters have ripples in both the passband and the stopband. To counteract this limitation, Elliptic filters have a very aggressive rolloff, which often more than makes up for the ripples.

Comparison[edit]

The following image shows a comparison between 5th order Butterworth, Chebyshev and elliptic filter amplitude responses.

Electronic linear filters.svg

Bessel Filters[edit]

Filter Design[edit]

Using what we've learned so far about filters, this chapter will discuss filter design, and will show how to make decisions as to the type of filter (Butterworth, Chebyshev, Elliptic), and will help to show how to set parameters to achieve a set of specifications.