Digital Filters IIR & FIR

Digital Filters IIR & FIR

http://elec3004.com Digital Filters IIR & FIR © 2019 School of Information Technology and Electrical Engineering at The University of Queensland TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Lecture Schedule: Week Date Lecture Title 27-Feb Introduction 1 1-Mar Systems Overview 6-Mar Systems as Maps & Signals as Vectors 2 8-Mar Systems: Linear Differential Systems 13-Mar Sampling Theory & Data Acquisition 3 15-Mar Aliasing & Antialiasing 20-Mar Discrete Time Analysis & Z-Transform 4 22-Mar Second Order LTID (& Convolution Review) 27-Mar Frequency Response 5 29-Mar Filter Analysis 6 3-Apr Digital Filters (IIR) & Filter Analysis 5-Apr PS 1: Q & A 10-Apr Digital Filter (FIR) & Digital Windows 7 12-Apr FFT 8 17-Apr Active Filters & Estimation & Holiday 19-Apr 24-Apr Holiday 26-Apr 1-May Introduction to Feedback Control 9 3-May Servoregulation/PID 8-May PID & State-Space 10 10-May State-Space Control 15-May Digital Control Design 11 17-May Stability 22-May State Space Control System Design 12 24-May Shaping the Dynamic Response 29-May System Identification & Information Theory 13 31-May Summary and Course Review ELEC 3004: Systems 3 April 2019 2 1 Follow Along Reading: Today B. P. Lathi • Chapter 10 Signal processing and linear systems (Discrete-Time System Analysis 1998 Using the z-Transform) TK5102.9.L38 1998 – § 10.3 Properties of DTFT – § 10.5 Discrete-Time Linear System analysis by DTFT – § 10.7 Generalization of DTFT to the 풵 –Transform • Chapter 12 (Frequency Response and Digital Filters) • § 12.1 Frequency Response of Discrete-Time Systems • § 12.3 Digital Filters • § 12.4 Filter Design Criteria • § 12.7 Nonrecursive Filters ELEC 3004: Systems 3 April 2019 3 ELEC3004 is 흅풊 −풆 ELEC 3004: Systems 3 April 2019 4 2 Periodic Signals: Writing them in the Fourier Domain & z-Domain • Synthesis: ELEC 3004: Systems 3 April 2019 5 ퟏ Euler’s Identity: 풔풊풏 흎풕 = 풆풊⋅ 흎풕 − 풆−풊⋅ 흎풕 ퟐ풊 • The Discrete-Time Fourier Transform of a sinusoid ELEC 3004: Systems 3 April 2019 6 3 Recap: IIR Filters = “Analog Filters” in Digital Form ELEC 3004: Systems 3 April 2019 7 Filter Specification in the Frequency Domain Where: 1 = passband ripple (dB) |H(ω)| 2 = stopband attenuation (dB) ωp = passband edge (Hz) ωst = stopband edge (Hz) 1 ωc = cutoff frequency (@ 3dB) N: filter type/order to meet specification 2 ω ωp ωc ωst Passband Transition Stopband ELEC 3004: Systems 3 April 2019 8 4 Butterworth Filters ELEC 3004: Systems 3 April 2019 9 Butterworth Filters • Butterworth: Smooth in the pass-band • The amplitude response |H(jω)| of an nth order Butterworth low pass filter is given by: • The normalized case (ωc=1) Recall that: ELEC 3004: Systems 3 April 2019 10 5 Analog Filter Summary Passband Stopband Transition MATLAB Design Filter Type Ripple Ripple Band Command Butterworth No No Loose butter Chebyshev Yes No Tight cheby Chebyshev Type II No Yes Tight cheby2 (Inverse Chebyshev) Eliptic Yes Yes Tightest ellip ELEC 3004: Systems 3 April 2019 11 IIR Filter Design Methods ELEC 3004: Systems 3 April 2019 12 6 IIR Filter Design Methods • Normally based on analogue prototypes – Butterworth, Chebyshev, Chebyshev 2, Elliptic, etc. • Then transform 퐻 푠 → 퐻(푧) • Three popular methods: 1. Impulse invariant – 퐻(푧): whose impulse response is a sampled version of ℎ(푡) (also step invariant) 2. Matched z–Transform – poles/zeros 퐻(푠) directly mapped to poles/zeros 퐻(푧) 3. Bilinear z – transform – left hand s – plane mapped to unit circle in z – plane ELEC 3004: Systems 3 April 2019 13 Impulse Invariant Simplest approach, proceeds as follows: 1. Select prototype analogue filter 2. Determine H(s) for desired 휔 푐 and 휔 푠 푐푢푡표푓푓 푓푟푒푞. 푠푡표푝 푓푟푒푞. 3. Inverse Laplace • Calculate impulse response, ℎ(푡) 4. Sample impulse response ℎ 푡 푡=푛Δ푡푑 • ℎ[푛] = Δ푡푑 ℎ(푛Δ푡푑) 5. Take z-Transform of ℎ 푛 ⇒ 퐻(푧) – Poles: 푝푖 maps to exp (푝푖Δ푡푑) – Zeros: have no simple mapping ELEC 3004: Systems 3 April 2019 14 7 Impulse Invariant [2] Useful approach when: • Impulse (or step) invariance is required – e.g., control applications • Designing Lowpass or Bandpass filters Has problems when: • 퐻 휔 does not 0 as 휔 → ∞ • Ex: highpass or bandstop filters • If H(w) is not bandlimited, aliasing occurs! ELEC 3004: Systems 3 April 2019 15 Matched z - transform • Maps poles/zeros in s – plane directly –to poles/zeros in z – plane • No great virtues/problems • Fairly old method –not commonly used –so we won’t consider it further ELEC 3004: Systems 3 April 2019 16 8 Bilinear z - transform • Maps complete imaginary s –plane () – to unit circle in z -plane • That is: map analogue frequency 휔푎 to discrete frequency 휔푑 • Uses continuous transform: 2 d t a tan t 2 흎 This compresses (warps) 흎 to have finite extent 풔 풂 ퟐ this removes possibility of any aliasing ELEC 3004: Systems 3 April 2019 17 tan transform maps ωa to ωd ω t/2 Analogue ωa d Filter |H(ωa)| 0 - 0 2 3 4 ωdt/2 Spectral compression |H(ωd)| due to the bilinear z -transform Digital Filter -ωs/2 0 ωs/2 ωs 3ωs/2 2ωs ωd Note,ELEC H(3004:ω Systemsd) periodic, due to sampling 3 April 2019 18 9 Bilinear Transform The bilinear transform Transforming to s-domain Remember: s = ja and tan = sin/cos Where = dt/2 Using Euler’s relation This becomes… (note: j terms cancel) Multiply by exp(-j)/exp(-j) As z = exp(sdt) = exp(jdt) ELEC 3004: Systems 3 April 2019 19 Bilinear Transform • Convert H(s) H(z) by • However, this substituting, transformation compresses the analogue frequency response, which means 21 z 1 – digital cut off frequency s will be lower than the t1 z 1 analogue prototype Note: this comes directly from tan transform • Therefore, analogue filter must be “pre-warped” prior to transforming H(s) H(z) ELEC 3004: Systems 3 April 2019 20 10 Bilinear Pre-warping 2 d t a tan t 2 a = d ELEC 3004: Systems 3 April 2019 21 Bilinear Transform: Example • Design digital Butterworth lowpass filter – order, n = 2, cut off frequency 휔푑 = 628 rad/s – sampling frequency 휔푠 = 5024 rad/s (800Hz) • Pre-warp to find 휔푎 that gives desired 휔푑 2 628 Note: ωd < ωa a tan 663 rad/s 1 2 800 due to compression 800 • Butterworth prototype (unity cut off) is, 1 H(s) s2 2s 1 ELEC 3004: Systems 3 April 2019 22 11 Bilinear Transform: Example [2] 푠 • De-normalised analogue prototype (푠’ = ) 휔푐 – 휔푐 = 663 rad/s (required 휔푎 to give desired 휔푑) 1 H(sd ) 2 s 2s 1 663 663 1 – Convert H(s) H(z) by substituting 21 z s 1 t1 z 1 H(z) 2 2800(1 z 1) 2800(1 z 1) 2 1 1 1 663(1 z ) 663(1 z ) 0.098z 2 0.195z 0.098 Note: H(z) has both H(z) poles and zeros z 2 0.942z 0.333 H(s) was all-pole ELEC 3004: Systems 3 April 2019 23 Bilinear Transform: Example [3] Y (z) 0.098z 2 0.195z 0.098 H (z) X (z) z 2 0.942z 0.333 • Multiply out and make causal: Y (z)(z 2 0.942z 0.333) X (z)(0.098z 2 0.195z 0.098) Y (z)(1 0.942z 1 0.333z 2 ) X (z)(0.098 0.195z 1 0.098z 2 ) • Finally, apply inverse z-transform to yield the difference equation: y[ n ] 0.098 x [ n ] 0.195 x [ n 1] 0.098 x [ n 2] 0.942y [ n 1] 0.333 y [ n 2] ELEC 3004: Systems 3 April 2019 24 12 Bilinear Transform: Example [4] Magnitude response c Digital compared to Analog: 1. Increased roll off and attenuation in stopband 휔 2. Nearly attenuation at 푠 2 ELEC 3004: Systems 3 April 2019 25 Bilinear Transform: Example [5] Pole/Zero Plot 1 0.8 0.6 0.4 0.2 0 Imaginary Part Imaginary -0.2 -0.4 -0.6 -0.8 -1 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 Real Part ELEC 3004: Systems 3 April 2019 26 13 Bilinear Transform: Example [6] Phase response Increased phase delay Bilinear transform has effectively increased digital filter order (by adding zeros) ELEC 3004: Systems 3 April 2019 27 Bilinear Transform: Example [7] Impulse Response 0.35 0.3 0.25 0.2 0.15 Amplitude 0.1 0.05 0 0 2 4 6 8 10 12 14 16 Samples ELEC 3004: Systems 3 April 2019 28 14 Bilinear Transform: Example [8] x[n] Canonical Implementation 0.942 -0.333 y[n] 0.098y'[n] 0.195y'[n 1] 0.098y'[n 2] y'[n] x[n] 0.942y'[n 1] 0.333y'[n 2] z -1 z -1 y[n]’ of the difference equation 0.098 0.195 0.098 y[n] 0.098x[n] 0.195x[n 1] 0.098x[n 2] 0.942y[n 1] 0.333y[n 2] y[n] ELEC 3004: Systems 3 April 2019 29 Bilinear Design Summary • Calculate pre-warping analogue cutoff frequency • De-normalise filter transfer function using pre-warping cut-off • Apply bilinear transform and simplify • Use inverse z-transform to obtain difference equation ELEC 3004: Systems 3 April 2019 30 15 BREAK ELEC 3004: Systems 3 April 2019 31 Tutorial 3 (Week 6 & 7!) • Week 6: PS 1 Review • Week 7: FIR Filters • DCT, FFT & More! ELEC 3004: Systems 3 April 2019 32 16 Fun Demo! Resize a “Screen Shot” • 10:1 Reduction of Picture of an LCD Screen… Without Gaussian Filter First WITH Gaussian Filter (σ=2) • Moire ∵ of Aliasing of a Non Band-limited Signal ELEC 3004: Systems 3 April 2019 33 Direct Synthesis (in the Z-Domain) ELEC 3004: Systems 3 April 2019 34 17 Direct Synthesis • Not based on analogue prototype – But direct placement of poles/zeros • Useful for – First order lowpass or highpass • simple smoothers – Resonators and equalisers • Single frequency amplification/removal – Comb and notch filters • Multiple frequency amplification/removal ELEC 3004: Systems 3 April 2019 35 First Order Filter: Example • General first order transfer function – Gain, G, zero at –b, pole at a (a, b both < 1) Remember: H(ω) = H(z)|z = exp(jwt) G1 bz 1 H(z) 1 az 1 with a +ve & b –ve z = exp(jω) this is a lowpass filter i.e., G1 b o x H (0) exp(j) = -1 1= exp(j0) 1 a -b a G1 b H ( ) s/2 1 a ELEC 3004: Systems 3 April 2019 36 18 First Order Filter: Example • Possible design criteria – cut-off frequency, 휔푐 • 3푑퐵 = 20 log ( 퐻 (휔푐) ) • e.g., at 휔 = , 푐 2 1+푏 • = 2 1+푎 – stopband attenuation • assume 휔푠푡표푝 = (Nyquist frequency) 퐻() 1 • e.g., = = i.e., two unknowns (a,b) 2 퐻(0) 21 two (simultaneous) design equations.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    27 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us