230 likes | 346 Vues
Baseado no material da: UNIVERSITY of MANCHESTER Department of Computer Science CS3291: Digital Signal Processing Section 6 IIR discrete time filter design. 6.1. Introduction:
E N D
Baseado no material da: UNIVERSITY of MANCHESTER Department of Computer Science CS3291: Digital Signal Processing Section 6 IIR discrete time filter design CS3291: Section 6
6.1. Introduction: • Many design techniques for IIR discrete time filters have adopted ideas of analogue filters • Transform Ha(s) for analogue ‘prototype’ filter into H(z) for discrete time filter. • Begin with a reminder about analogue filters. 6.2. Analogue filters CS3291: Section 6
Analogue filters have transfer functions: • a0 + a1s + a2s2+ ... + aNsN • H a (s) = • b0 + b1s + b2s2 + ... + bMsM • Replace s by jw for frequency-response. • For RE(s) 0, Ha(s ) is Laplace Transform of h a (t). • In terms of poles and zeros: • (s - z 1 ) ( z - z 2 ) ... ( s - z N) • Ha(s) = K • (s - p 1 ) ( z - p 2 ) ... ( s - p M) • Many known techniques for deriving Ha(s); • e.g. Butterworth low-pass approximation • Analogue filters have infinite impulse-responses. CS3291: Section 6
Analogue Butterworth low-pass filter of order n [n/2] is integer part of n/2 & P = 0 /1 if n is even / odd CS3291: Section 6
Butterworth low-pass 1.2 1 0.8 Gain 0.6 n=1 0.4 n=2 n=4 0.2 0 0 1 2 3 4 5 6 radian/s CS3291: Section 6
Intro to Bilinear Transformation method • Most common method for transforming Ha (s) to H(z) for IIR discrete time filter. • Consider derivative approximation technique: • D[n] = dy(t) /dt at t=nT ( y[n] - y[n-1]) / T. • dx(t) /dt at t=nT (x[n] - x[n-1]) / T. • d2y(t)/dt2 at t=nT (y[n] - 2y[n-1]+y[n-2])/T2 • d3y(t)/dt3 at t=nT (y[n]-3y[n-1]+3y[n-2]-y[n-3])/T3 • “Backward difference” approximation introduces delay which becomes greater for higher orders. • Try "forward differences" : D[n] [y[n+1] - y[n]] / T, etc. • But this does not make matters any better. CS3291: Section 6
Bilinear approximation: • 0.5( D[n] + D[n-1]) (y[n] - y[n-1]) / T • & similarly for dx(t)/dt at t=nT. • Similar formulae may be derived for d2y(t)/dt2, and so on. • If D(z) is z-transform of D[n] : • 0.5( D(z) + z-1D(z) ) = ( Y(z) - z-1Y(z) ) / T CS3291: Section 6
dy(t)/dt y(t) s If LT of y(t) is Y(s) LT of dy(t)/dt is sY(s). (2/T) (z-1)/(z+1) {dy(t)/dt / t=nT} {y[n]} replacing s by [ (2/T) (z-1)/(z+1)] is bilinear approximation. CS3291: Section 6
6.7. Bilinear transformation: • Most common transform from Ha (s) to H(z). • Replace s by (2 / T) (z-1) / (z+1) to obtain H(z). • For convenience take T=1. • Example • 1 1 • H a (s) = then H(z) = • 1 + RC s 1 + RC • z + 1 • = • (1 + 2RC)z + (1 - 2RC) CS3291: Section 6
Re-express as: 1 + z - 1 H(z) = K 1 + b 1 z - 1 where K = 1 / (1 + 2RC) & b 1 = (1 - 2RC) / (1 + 2RC) Properties: (z - 1) (i) H(z) = Ha(s) where s = 2 (z + 1) (ii) Order of H(z) = order of Ha(s) (iii) If Ha(s) is causal & stable, so is H(z). (iv) H(ejW) = Ha(j ) where = 2 tan(W/2) CS3291: Section 6
Proof of (iv): When z = ej, then ej- 1 2(e j / 2 - e - j / 2 ) s = 2 = ej + 1 e j / 2 + e -j / 2 2( 2 j sin ( / 2) = 2 cos ( / 2) = 2 j tan( / 2) CS3291: Section 6
Frequency warping: By (iv), H(ej) = Ha(j) with = 2 tan(/2). from - to mapped to in the range - to . CS3291: Section 6
Mapping approx linear for in the range -2 to 2. • As increases above 2 , a given increase in produces smaller and smaller increases in . CS3291: Section 6
Comparing (a) with (b) below, (b) becomes more and more compressed as . Frequency warping must be taken into account with this method CS3291: Section 6
6.8. Design of IIR low-pass filter by bilinear transfm Given cut-off frequency W C in radians/sample:- (i) Calculate w C = 2 tan(W C /2) radians/sec. (w C is "pre-warped" cut-off frequency) (ii) Find H a (s) for analogue low-pass filter with 1 radian/s cut-off. (iii) Scale cut-off frequency of Ha(s) to wC (iv) Replace s by 2(z - 1) / (z+1) to obtain H(z). (v) Rearrange the expression for H(z) (vi) Realise by biquadratic sections. CS3291: Section 6
ExampleDesign 2nd order Butterworth-type • IIR low-pass filter with W C = / 4. • Solution: Prewarped frequency w C = 2 tan( / 8) = 0.828 • Analogue Butterworth low-pass filter with c/o 1 radian/second: • 1 • H a (s) = • 1 + 2 s + s 2 • Scale c/o to 0.828, • 1 • H a (s) = • 1 + 2 s/0.828 + (s/0.828) 2 • then replace s by 2 (z+1) / (z-1) to obtain: • z 2 + 2z + 1 • H(z) = • z 2 - 9.7 z + 3.4 CS3291: Section 6
which may be realised by the signal flow graph:- CS3291: Section 6
6.9 Higher order IIR digital filters: • Normally cascaded biquad sections. • Example 6.3: Design 4th order Butterwth-type IIR low-pass digital filter with 3 dB c/o at fS / 16. . • Solution: (a) Relative cut-off frequency is /8. • Prewarped cut-off : C = 2 tan((/8)/2) 0.4 radians/s. • Formula for 1 radian/s cut-off is: Replace s by s/0.4 then replace s by 2 (z-1) / (z+1) to obtain: CS3291: Section 6
H(z) may be realised as: CS3291: Section 6
Compare gain-response of 4th order Butt low-pass transfer function used as a prototype, with that of derived digital filter. • Both are 1 at zero frequency. • Both are 0.707 at the cut-off frequency. • Analogue gain approaches 0 as w whereas digital filter gain becomes exactly zero at W = . • Shape of Butt gain response is "warped" by bilinear transfn. • For digital filter, cut-off rate becomes sharper as W because of the compression as w. CS3291: Section 6