IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its...

40
IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency ranging in [, ].

Transcript of IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its...

Page 1: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

IIR Filter design(cf. Shenoi, 2006)

The transfer function of the IIR filter is given by

Its frequency responses are (where w is the normalized frequency ranging in [, ].

Page 2: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

When a and b are real, the magnitude response |H(ejw)| is an even function, and the phase response (jw) is an odd function. Very often it is convenient to compute and plot the log magnitude of |H(ejw)| as

measured in dB. Linear phase:Consider the ideal delay system. The impulse response is

and the frequency response is

210 |)(|log10 jweH

][][ did nnnh

djwnjwid eeH ][

Page 3: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

In this case, the magnitude and phase responses are

and

Hence, when time domain is a constant delay, it causes the frequency a “linear phase distortion.” Sometimes we hope the filter response is linear phase, i.e., the phase response is linear with w.Eg. an ideal lowpass filter with linear phase (i.e., ideal low-pass but the output is delayed by nd samples in the time domain)

However, linear phase is difficult to achieve by using IIR filters, but it can be easily designed by using FIR filters.

1|][| jwid eH

|| ][ wwneH djw

id

ww

wweeH

c

cjwn

jwlp

d

,0

,|][|

Page 4: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

Group delay: A convenient measure of the linearity of the phase is the group delay.

For the IIR filter, the group delay is

where

and

)]}([{)]([)( jwjw eHdw

deHgrdw (unit: samples)

Page 5: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

Since the state-of-the-arts of analog IIR filter is more advanced, the design of discrete-time IIR filter is usually an approximation of the analog one. Three approximation criteria commonly used:

The Butterworth approximation The Chebyshev (minimax) approximation

Analog filters represented by Laplace transform H(s). Substituting s=jw, we obtain its frequency response (in terms of continuous Fourier transform).

Page 6: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

where |H(jw)| and (jw) can be found by

Page 7: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

Maximally Flat and Butterworth Approximation Magnitude response of an ideal low-pass analog filter showing the tolerances:

passband: [0, wp], transition band:[wp, ws], stopband: [ws, ]passband tolerance: p, stopband tolerance: s.

Page 8: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

Butterworth response (or maximally flat magnitude response):

and now we have

Page 9: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

Magnitude responses of Butterworth lowpass filters

normalized passband

Page 10: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

D2n and n are the parameters of the Butterworth filter, where n is the order of this filter.

If, for example, the magnitude at the passband frequency p, is , which means that the log magnitude required is 3dB, then we choose D2n = 1.

If the magnitude at the passband frequency = p = 1 is required to be 1 p, then we choose D2n, normally denoted by 2, such that

If the magnitude at the bandwith = p = 1 is given as Ap dB, the values 2 is computed by

2/1

Page 11: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

We get the formula

Let us consider the common case of a Butterworth filter with a log magnitude of 3dB at the bandwith of p = 1 to develop the design procedure of Butterworth lowpass filter. In this case, we use the function for the prototype filter, in the form

Page 12: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

This satisfies the following properties:

Page 13: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

Design theory of Butterworth lowpass filters

Let us consider the design of Butterworth lowpass filter for which (1) the frequency p at which the magnitude is 3DB below the maximum value at =0, and (2) the magnitude at another frequency s in the stopband are specified. Since we only know that but want to infer H(ej). Let us consider the relationship that |H(ej)|2 = H(ej)H(ej).

We denote = p/j, so

)1/(1|)(| 22 njH

Page 14: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

There are n poles satisfying the following equations:

This gives us the 2n poles of H(p)H(p), which are

and

In general,

These poles have a magnitude of one, and the angle between adjacent poles is equal to /n.There are n poles in the left half plane and n poles in the right plane.

Note that for a continuous-time linear system, it is stable iff all poles lie in the left half plane.

Page 15: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

Note that, for every pole of H(p) at p=pa, that lies in the left half-plane, there is a pole of H(p) at p=pa that lies in the right half-plane.Because of this property, we identify n poles that are in the left half of the p planes as the poles of H(p) so that it is a stable transfer function.The poles that are in the left half of the p plane are given by

When we have found these n poles, we construct the denominator polynomial D(p) of the prototype filter from H(p) = 1/D(p) from

Page 16: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

Pole locations of Butterworth low-pass filters of orders n=6

Page 17: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

The only unknown parameter at this stage of design is the order n of the filter function H(p). This is calculated using the specification that at the stopband frequency s, the log magnitude is required to be no more than As dB.

So we choose n as an integer satisfying

The pairs of poles from left and right half-planes can be found by the polynomial in the denominator D(p),

Their coefficients can be computed recursively from

where d0=1. The polynomial is referred to as Butterworth polynomials.

Page 18: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.
Page 19: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

Chebyshev 1 Approximation:The Chebyshev 1 approximation for an ideal lowpass filter has equal-valued ripples in the passband . It is known as minimax approximation and also known as the equiripple approximation.

The magnitude squared function of Chebyshev approximation:

where Cn() is the Chebyshev polynomial of degree n. It is defined by

Page 20: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

For n = 2, 3, 4, 5, these polynomials are

Page 21: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

Chebyshev II Approximation: (or inverse Chebyshev filters)Maximally flat at w=0; decreases monotonically as the frequency increases and has an equiripple response in the stopband.

The magnitude square function of the inverse Chebyshev low pass filter: |H(j)|2 =

Page 22: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

Chebyshev I

Chebyshev II

Page 23: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

Discrete-time IIR filterThe procedure used for designing discrete-time IIR filters employ different transformations of the form s = f(z) to transform H(s) into H(z).

Two methods: Impulse invariance Bilinear Transform

Please see the copy of book chapters (Oppenheim 1999, Section 7.1)

Page 24: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

General concept on digital filter design (cf. D. Ellis, Columbia University)

Page 25: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.
Page 26: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

Discrete-time FIR filters

Page 27: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

Discrete-time FIR filters

Page 28: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

Linear Phase Discrete-time FIR filters Now we consider the special types of FIR filters in which the impulse response h[n] are assumed to be symmetric or antisymmetric. Since the order of the polynomial in each of these two types can be either odd or even, we have four types of filters with different properties.

Linear phase FIR filters:Type 1: The coefficients are symmetric, i.e., h[n] = h[Nn], and the order N is even.

Page 29: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.
Page 30: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.
Page 31: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.
Page 32: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

Linear phase response

Page 33: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

Linear phase FIR filters:

Type II: The coefficients are symmetric, i.e., h[n] = h[Nn], and the order N is odd.

Page 34: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

Linear phase FIR filters:

Type III: The coefficients are antisymmetric, i.e., h[n] = h[Nn], and the order N is even.

Page 35: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

Linear phase FIR filters:

Type IV: The coefficients are antisymmetric, i.e., h[n] = h[Nn], and the order N is odd.

Page 36: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.
Page 37: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.
Page 38: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

Fourier Series Method Modified by WindowsLet us consider the magnitude response of the ideal lowpass filter to be HLP(ejw), in which the cutoff frequency is given as wc. Its inverse Fourier transform (i.e., the impulse response of the ideal low pass filter) is:

Page 39: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

We choose the following finite series to approximate HLP(ejw):Since {ejnw} form an set of orthonormal bases, CLP[n] is the the least squared solution.The approximation error is

As M increases, the number of ripples in the passband (and the stopband) increases while the width between the frequencies at which the the maximum error occurs in the passband (0wwc) and in the stopband (wcw<) decreases.

Page 40: IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.

Gibbs phenomenon: as M increases, the maximum deviation from the ideal value decreases except near the point of discontinuity, where the error remains the same, however large the value M we choose. (i.e., as M increases, the maximum amplitude of the oscillation does not approch zero)