1 / 60

Chapter 8 IIR Filter Design

Introduction. IIR filter have infinite-duration impulse responses, hence they can be matched to analog filters, all of which generally have infinitely long impulse responses.The basic technique of IIR filter design transforms well-known analog filters into digital filters using complex-valued mappings.The advantage of this technique lies in the fact that both analog filter design (AFD) tables and the mappings are available extensively in the literature..

judith
Download Presentation

Chapter 8 IIR Filter Design

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


    1. Chapter 8 IIR Filter Design Gao Xinbo School of E.E., Xidian Univ. Xbgao@ieee.org http://see.xidian.edu.cn/teach/matlabdsp/

    2. Introduction IIR filter have infinite-duration impulse responses, hence they can be matched to analog filters, all of which generally have infinitely long impulse responses. The basic technique of IIR filter design transforms well-known analog filters into digital filters using complex-valued mappings. The advantage of this technique lies in the fact that both analog filter design (AFD) tables and the mappings are available extensively in the literature.

    3. Introduction The basic technique is called the A/D filter transformation. However, the AFD tables are available only for lowpass filters. We also want design other frequency-selective filters (highpass, bandpass, bandstop, etc.) To do this, we need to apply frequency-band transformations to lowpass filters. These transformations are also complex-valued mappings, and they are also available in the literature.

    4. Two approaches

    5. IIR Filter Design Steps Design analog lowpass filter Study and apply filter transformations to obtain digital lowpass filter Study and apply frequency-band transformations to obtain other digital filters from digital lowpass filter

    6. The main problem We have no control over the phase characteristics of the IIR filter. Hence IIR filter designs will be treated as magnitude-only designs.

    7. Main Content of This Chapter Analog filter specifications and the properties of the magnitude-squared response used in specifying analog filters. Characteristics of three widely used analog filters Butterworth, Chebyshev, and Elliptic filter Transformation to convert these prototype analog filters into different frequency-selective digital filter

    8. Some Preliminaries Relative linear scale The lowpass filter specifications on the magnitude-squared response are given by

    11. Properties of |Ha(jOmega)|2

    12. Properties of |Ha(jOmega)|2 We want Ha(s) to represents a causal and stable filter. Then all poles of Ha(s) must lie within the left half-plane. Thus we assign all left-half poles of Ha(s)Ha(-s) to Ha(s). We will choose the zeros of Ha(s)Ha(-s) lying inside or on the jOmega axis as the zeros of Ha(s). The resulting filter is then called a minimum-phase filter.

    13. Characteristics of Prototype Analog Filters IIR filter design techniques rely on existing analog filter filters to obtain digital filters. We designate these analog filters as prototype filters. Three prototypes are widely used in practice Butterworth lowpass Chebyshev lowpass (Type I and II) Elliptic lowpass

    14. Butterworth Lowpass Filter This filter is characterized by the property that its magnitude response is flat in both passband and stopband.

    16. Properties of Butterworth Filter Magnitude Response |Ha(0)|2 =1, |Ha(jOc) |2 =0.5, for all N (3dB attenuation at Oc) |Ha(jO)|2 monotonically decrease for O Approaches to ideal filter when N?8

    17. Poles of |Ha(jO)|2 O=s/j =Ha(s) Ha(-s) Equally distributed on a circle of radius Oc with angular spacing of pi/N radians For N odd, pk= Ocej2pik/N For N even, pk= Ocej(pi/2N+kpi/N) Symmetry respect to the imaginary axis A pole never falls on the imaginary axis, and falls on the real axis only if N is odd A stable and causal filter Ha(s) can now be specified by selecting poles in the left half-plane

    18. Matlab Implementation Function [z,p,k] = buttap(N) To design a normalized (Oc=1) Butterworth analog prototype filter of order N Z: zeros; p: poles; k: gain value Function [b,a] = u_buttap(N,Omegac) Provide a direct form (or numerator-denominator) structure. Function [C,B,A] = sdir2cas(b,a) Convert the direct form into the cascade form

    19. Design Equations

    20. Matlab Implementation Function [b,a] = afd_butt(Wp,Ws,Rp,As) To design an analog Butterworth lowpass filter, given its specifications. Function [db,mag,pha,w] = freqs_m(b,a,wmax) Magnitude response in absolute as well as in relative dB scale and the phase response.

    21. Chebyshev Lowpass Filter Chebyshev-I filters Have equiripple response in the passband Chebyshev-II filters Have equiripple response in stopband Butterworth filters Have monotonic response in both bands We note that by choosing a filter that has an equripple rather than a monotonic behavior, we can obtain a low-order filter. Therefore Chebyshev filters provide lower order than Buttworth filters for the same specifications.

    22. The magnitude-squared response of Chebyshev-I filter

    23. Observations

    24. Causal and stable Ha(s)

    26. The poles of Ha(s)Ha(-s)

    27. Matlab Implementation Function [z,p,k] = cheb1ap(N,Rp) To design a normalized Chebyshev-I analog prototype filter of order N and passband ripple Rp. Z array: zeros; poles in p array, gain value k Function [b,a] = u_chblap(N,Rp,Omegac) Return Ha(s) in the direct form

    28. Design Equations

    29. Chebyshev-II filter

    30. Matlab implementation Function [z,p,k] = cheb2ap(N,As); normalized Chebyshev-II Function [b,a] = u_chb2ap(N,As,Omegac) Unnormalized Chebyshev-II Function [b,a] = afd_chb2(Wp,Ws,Rp,As) Example 8.7

    31. Elliptic Lowpass Filters

    32. The magnitude-squared response

    33. Matlab Implementation [z,p,k]=ellipap(N,Rp,As); normalized elliptic analog prototype [b,a] = u_ellipap(N,Rp,As,Omegac) Unnormalized elliptic analog prototype [b,a] = afd_elip(Wp,Ws,Rp,As) Analog Lowpass Filter Design: Elliptic Example 8.8

    34. Phase Responses of Prototype Filters Elliptic filter provide optimal performance in the magnitude-squared response but have highly nonlinear phase response in the passband (which is undesirable in many applications). Even though we decided not to worry about phase response in our design, phase is still an important issue in the overall system. At other end of the performance scale are the Buttworth filters, which have maximally flat magnitude response and require a higher-order N (more poles) to achieve the same stopband specification. However, they exhibit a fairly linear phase response in their passband.

    35. Phase Responses of Prototype Filters The Chebyshev filters have phase characteristics that lie somewhere in between. Therefore in practical applications we do consider Butterworth as well as Chebyshev filters, in addition to elliptic filters. The choice depends on both the filter order (which influences processing speed and implementation complexity) and the phase characteristics (which control the distortion).

    36. Analog-to-digital Filter Transformations After discussing different approaches to the design of analog filters, we are now ready to transform them into digital filters. These transformations are derived by preserving different aspects of analog and digital filters. Impulse invariance transformation Preserve the shape of the impulse response from A to D filter Finite difference approximation technique Convert a differential eq. representation into a corresponding difference eq. Step invariance Preserve the shape of the step response Bilinear transformation Preserve the system function representation from A to D domain

    37. Impulse Invariance Transformation The digital filter impulse response to look similar to that of a frequency-selective analog filter. Sample ha(t) at some sampling interval T to obtain h(n): h(n)=ha(nT) Since z=ejw on the unit circle and s=j O on the imaginary axis, we have the following transformation from the s-plane to the z-plane: z=esT

    39. Properties: Sigma = Re(s): Sigma < 0, maps into |z|<1 (inside of the UC) Sigma = 0, maps into |z|=1 (on the UC) Sigma >0, maps into |Z|>1 (outside of the UC) Many s to one z mapping: many-to-one mapping Every semi-infinite left strip (so the whole left plane) maps to inside of unit circle Causality and Stability are the same without changing; Aliasing occur if filter not exactly band-limited

    40. Given the digital lowpass filter specifications wp,ws,Rp and As, we want to determine H(z) by first designing an equivalent analog filter and then mapping it into the desired digital filter. Design Procedure:

    41. Matlab Implementation Function [b,a] = imp_invr(c,d,T) b = ??????z^(-1)????? a = ??????z^(-1)????? c = ??????s?????? d = ??????s?????? T = ??(??)?? Examples 8.10-8.14

    42. Advantages of Impulse Invariance Mapping It is a stable design and the frequencies O and w are linearly related. Disadvantage We should expect some aliasing of the analog frequency response, and in some cases this aliasing is intolerable. Consequently, this design method is useful only when the analog filter is essentially band-limited to a lowpass or bandpass filter in which there are no oscillations in the stopband.

    43. Bilinear Transformation This mapping is the best transformation method.

    44. Complex-plane mapping in bilinear transformation

    45. Observations Sigma < 0 ?|z| < 1, Sigma = 0 ?|z| = 1, Sigma > 0 ?|z| > 1 The entire left half-plane maps into the inside of the UC. This is a stable transformation. The imaginary axis maps onto the UC in a one-to-one fashion. Hence there is no aliasing in the frequency domain. Relation of ? to O is nonlinear ?= 2tan-1(OT/2)? O=2tan(?/2)/T;

    46. Given the digital filter specifications wp,ws,Rp and As, we want to determine H(z). The design steps in this procedure are the following:

    47. Advantage of the bilinear Transformation It is a stable design There is no aliasing There is no restriction on the type of filter that can be transformed.

    48. Lowpass Design Using Matlab Matlab Function: [b, a] = butter(N, wn) [b, a] = cheby1(N, Rp, wn) [b, a] = cheby2(N, As, wn) [b, a] = ellip(N, Rp, As, wn) Buttord, cheb1ord, cheb2ord, ellipord can provide filter order N and filter cutoff frequency wn, given the specification.

    49. Lowpass filter design Digital filter specification Analog prototype specifications Analog prototype order calculation,Omega_c,wn Digital Filter design (four types) dir2cas

    50. Digital filter design examples For the same specifications, do the following: Ex8.21: Butterworth LP filter design; Ex8.22: Chebyshev-I LP filter design; Ex8.23: Chebyshev-II LP filter design; Ex8.24: Elliptic LP filter design;

    51. Frequency-band Transformation Design other kinds of filters: High-pass filters Band-pass filters Band-stop filters Using the results of Low-pass filter and Frequency Band Transformation

    52. Frequency-band Transformation

    53. Frequency Transformation for Digital Filters

    54. Use zmapping function to perform the LP-to-HP transformation Digital lowpass filter specifications Analog prototype specification Analogy Chebyshev prototype filter calculation Bilinear transformation Digital highpass filter cutoff frequency Lp-to-HP frequency-band transformation dir2cas

    55. Design Procedure In practice we have to first design a prototype lowpass digital filter whose specification should be obtained from specifications of other frequency-selective filters are given in Fig.8.20

    56. Matlab Implementation Function [b, a] = BUTTER(N, wn,high) Designs an Nth-order highpass filter with digital 3dB cutoff frequency wn in unit of pi Function [b,a] = BUTTER(N,wn,pass) Designs an order 2N bandpass filter if wn is a two-element vectro wn=[w1,w2], with 3dB bandpass w1<w<w2 in unit of pi. Function [b,a] = BUTTER(N,wn,stop) Designs an order 2N bandstop filter if wn=[w1,w2] with 3dB stopband w1<w<w2 in unit of pi. Function [N,wn] = Buttord(wp, ws, Rp, As) Similar discussions apply for cheby1, cheby2, and ellip functions with appropriate modifications.

    57. Comparison of FIR vs. IIR Filters In the case of FIR filters these optimal filters are the equiripple filters designed via the parks-McClellan algorithm, while in the case of IIR filters these are the elliptic filters. For FIR filter the standard realization is the linear-phase direct form, while for elliptic filters cascade forms are widely used. Comparisons: Multiplications per output sample For most applications IIR elliptic filter are desirable from the computational point of view. If we take into account the phase equalizers, then FIR filter designs look good because of their exact linear-phase characteristics.

    58. Readings and exercises Readings: Text book: pp301~362 Chinese text book: pp.151~178 Exercises : 1. p8.1 3. p8.4 1. P8.7,8.11 2. P8.15,p8.21;?p8.23

    59. Thats all! The End

    60. Thanks for your attention! Thanks for your cooperation!

More Related