1 / 44

ELEN E4810: Digital Signal Processing Topic 8: Filter Design: IIR

ELEN E4810: Digital Signal Processing Topic 8: Filter Design: IIR. Filter Design Specifications Analog Filter Design Digital Filters from Analog Prototypes. 1. Filter Design Specifications. The filter design process:. performance constraints. Analysis. Design. Implement. G ( z )

lotte
Télécharger la présentation

ELEN E4810: Digital Signal Processing Topic 8: Filter Design: IIR

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. ELEN E4810: Digital Signal ProcessingTopic 8: Filter Design: IIR • Filter Design Specifications • Analog Filter Design • Digital Filters from Analog Prototypes Dan Ellis

  2. 1. Filter Design Specifications • The filter design process: performance constraints Analysis Design Implement G(z) transferfunction Problem Solution • magnitude response • phase response • cost/complexity • FIR/IIR • subtype • order • platform • structure • ... Dan Ellis

  3. Performance Constraints • .. in terms of magnitude response: Dan Ellis

  4. Performance Constraints • “Best” filter: • improving one usually worsens others • But: increasing filter order (i.e. cost)improves all three measures smallestPassband Ripple narrowest Transition Band greatest Minimum SB Attenuation Dan Ellis

  5. Passband Ripple • Assume peak passband gain = 1then minimum passband gain = • Or, ripple PB rippleparameter Dan Ellis

  6. Stopband Ripple • Peak passband gain is A larger than peak stopband gain • Hence, minimum stopband attenuation SB rippleparameter Dan Ellis

  7. Filter Type Choice: FIR vs. IIR IIR • Feedback(poles & zeros) • May be unstable • Difficult to control phase • Typ. < 1/10th order of FIR (4-20) • Derive from analog prototype FIR • No feedback(just zeros) • Always stable • Can be linear phase • High order (20-2000) • Unrelated to continuous-time filtering BUT Dan Ellis

  8. FIR vs. IIR • If you care about computational cost use low-complexity IIR (computation no object  Lin Phs FIR) • If you care about phase response use linear-phase FIR (phase unimportant  go with simple IIR) Dan Ellis

  9. IIR Filter Design • IIR filters are directly related to analog filters (continuous time) • via a mapping of H(s) (CT) to H(z) (DT) that preserves many properties • Analog filter design is sophisticated • signal processing research since 1940s  Design IIR filters via analog prototype • hence, need to learn some CT filter design Dan Ellis

  10. 2. Analog Filter Design • Decades of analysis of transistor-based filters – sophisticated, well understood • Basic choices: • ripples vs. flatness in stop and/or passband • more ripples narrower transition band Dan Ellis

  11. Im{z} Im{s} ejw jW Re{z} Re{s} 1 stablepoles stablepoles s-plane z-plane CT Transfer Functions • Analog systems: s-transform (Laplace) Continuous-time Discrete-time Transform Frequencyresponse Pole/zerodiagram Dan Ellis

  12. filterorder N Butterworth Filters Maximally flat in pass and stop bands • Magnituderesponse (LP): • W<<Wc, |Ha(jW)|2 1 • W = Wc, |Ha(jW)|2 = 1/2 3dB point Dan Ellis

  13. Butterworth Filters 6N dB/octrolloff • W>>Wc, |Ha(jW)|2 (Wc/W)2N • flat @ W = 0 for n = 1 .. 2N-1 Log-logmagnituderesponse Dan Ellis

  14. Butterworth Filters • How to meet design specifications? •  DesignEquation =“selectivity”, < 1 =“discrimination”, <<1 Dan Ellis

  15. Butterworth Filters • but what is Ha(s)? • Traditionally, look it up in a table • calculate N normalized filter with Wc = 1 • scale all coefficients for desired Wc • In fact,where Im{s}  Wc  Re{s}   s-plane Dan Ellis

  16. Butterworth Example Design a Butterworth filter with 1 dB cutoff at 1kHz and a minimum attenuation of 40 dB at 5 kHz Dan Ellis

  17. Butterworth Example • Order N = 4 will satisfy constraints;What are Wc and filter coefficients? • from a table, W-1dB = 0.845 whenWc = 1Wc = 1000/0.845 = 1.184 kHz • from a table, get normalized coefficients for N = 4, scale by 1184 • Or, use Matlab: [b,a] = butter(N,Wc,’s’); M Dan Ellis

  18. Chebyshev I Filter • Equiripple in passband (flat in stopband) minimize maximum error Chebyshev polynomial of order N Dan Ellis

  19. Chebyshev I Filter • Design procedure: • desired passband ripple e • min. stopband atten., Wp, WsN : 1/k1, discrimination 1/k, selectivity Dan Ellis

  20. Chebyshev I Filter • What is Ha(s)? • complicated, get from a table • .. or from Matlab cheby1(N,r,Wp,’s’) • all-pole; can inspect them: ..like squashed-in Butterworth Dan Ellis

  21. Chebyshev II Filter • Flat in passband, equiripple in stopband • Filter has poles and zeros (some ) • Complicated pole/zero pattern constant ~1/TN(1/W) zeros on imaginary axis Dan Ellis

  22. Elliptical (Cauer) Filters • Ripples in both passband and stopband • Complicated; not even closed form for N function; satisfiesRN(W-1) = RN(W)-1zeros for W>1 poles for W<1 very narrow transition band Dan Ellis

  23. Analog Filter Types Summary N = 6 r = 3 dB A = 40 dB Dan Ellis

  24. Analog Filter Transformations • All filters types shown as lowpass;other types (highpass, bandpass..)derived via transformations • i.e. • General mapping of s-planeBUT keep jW jW; frequency response just ‘shuffled’ Desired alternateresponse; still arational polynomial lowpass prototype ^ Dan Ellis

  25. Lowpass-to-Highpass • Example transformation: • take prototype HLP(s) polynomial • replace s with • simplify and rearrange  new polynomial HHP(s) ^ Dan Ellis

  26. Lowpass-to-Highpass • What happens to frequency response? • Frequency axes inverted imaginary axisstays on self... ...freq.freq. LP passband HP passband LP stopband HP stopband Dan Ellis

  27. Transformation Example Design a Butterworth highpass filter with PB edge -0.1dB @ 4 kHz (Wp)and SB edge -40 dB @ 1 kHz (Ws) • Lowpass prototype: make Wp = 1 • Butterworth -0.1dB @ Wp=1, -40dB @ Ws=4 ^ ^ Dan Ellis

  28. Im{s}  Wc  Re{s}   Transformation Example • LPF proto has • Map to HPF: N zeros @ s = 0 ^ ^ ^ new poles @ s = WpWp/pl Dan Ellis

  29. Transformation Example • In Matlab: [N,Wc]=buttord(1,4,0.1,40,'s'); [B,A] = butter(N, Wc, 's'); [n,d] = lp2hp(B,A,2*pi*4000); WpWs Rp Rs Dan Ellis

  30. 3. Analog Protos  IIR Filters • Can we map high-performance CT filters to DT domain? • Approach: transformationHa(s)G(z) i.e. where s = F(z) maps s-plane  z-plane: Im{s} Im{z} Ha(s0) s = F(z) G(z0) Every value of G(z)is a value of Ha(s) somewhere on the s-plane & vice-versa Re{z} Re{s} 1 z-plane s-plane Dan Ellis

  31. CT to DT Transformation • Desired properties for s = F(z): • s-plane jW axis  z-plane unit circle  preserves frequency response values • s-plane LHHP  z-plane unit circle interior preserves stability of poles Im{s} Im{z} Imu.c. ejw jW Re{z} Re{s} 1 s-plane z-plane LHHPUCI Dan Ellis

  32. Bilinear Transformation • Solution: • Hence inverse: • Freq. axis? • Poles? Bilinear Transform unique, 1:1 mapping |z| = 1 i.e.on unit circle • < 0 |z| < 1 Dan Ellis

  33. Bilinear Transformation • How can entire half-plane fit inside u.c.? • Highly nonuniform warping! s-plane z-plane Dan Ellis

  34. Bilinear Transformation • What is CTDT freq. relation Ww ? • i.e. • infinite range of CT frequency maps to finite DT freq. range • nonlinear; as w  p im.axis u.circle pack it all in! Dan Ellis

  35. Frequency Warping • Bilinear transform makes for all w, W • Same gain & phase (e, A...), in same ‘order’, but with warped frequency axis Dan Ellis

  36. Design Procedure • Obtain DT filter specs: • general form (LP, HP...), • ‘Warp’ frequencies to CT: • Design analog filter for •  Ha(s), CT filter polynomial • Convert to DT domain: •  G(z), rational polynomial in z • Implement digital filter! Old- style Dan Ellis

  37. Bilinear Transform Example • DT domain requirements:Lowpass, 1 dB ripple in PB, wp = 0.4p,SB attenuation ≥ 40 dB @ ws = 0.5p,attenuation increases with frequency SB ripples,PB monotonic Chebyshev I Dan Ellis

  38. Bilinear Transform Example • Warp to CT domain: • Magnitude specs:1 dB PB ripple 40 dB SB atten. Dan Ellis

  39. Bilinear Transform Example • Chebyshev I design criteria: • Design analog filter, map to DT, check: i.e. need N = 8 >> N=8; >> wp=0.7265; >> [B,A]=cheby1(N,1,wp,'s'); >> [b,a] = bilinear(B,A,.5); M Dan Ellis

  40. Other Filter Shapes • Example was IIR LPF from LP prototype • For other shapes (HPF, bandpass,...): • Transform LPX in CT or DT domain... CTtrans Bilinear transform HD(s) Bilinear warp Analog design DTspecs CTspecs HLP(s) GD(z) Bilinear transform DTtrans GLP(z) Dan Ellis

  41. DT Spectral Transformations • Same idea as CT LPFHPF mapping, but in z-domain: • To behave well, should: • map u.c.  u.c. (preserve G(ejw) values) • map u.c. interior  u.c. interior (stability) • i.e. • in fact, matches the definition of an allpass filter ... replace delays with Dan Ellis

  42. DT Frequency Warping • Simplest mappinghas effect of warping frequency axis: a > 0 :expand HF a < 0 :expand LF Dan Ellis

  43. Another Design Example • Spec: • Bandpass, from 800-1600 Hz (SR = 8kHz) • Ripple = 1dB, min. stopband atten. = 60 dB • 8th order, best transition band • Use elliptical for best performance • Full design path: • design analog LPF prototype • analog LPF  BPF • CT BPF  DT BPF (Bilinear) Dan Ellis

  44. Another Design Example • Or, do it all in one step in Matlab: [b,a] = ellip(8,1,60, [800 1600]/(8000/2)); Dan Ellis

More Related