Nov '04CS3291: Section 61 Baseado no material da: UNIVERSITY of MANCHESTER Department of Computer...
-
Upload
francine-robinson -
Category
Documents
-
view
225 -
download
0
Transcript of Nov '04CS3291: Section 61 Baseado no material da: UNIVERSITY of MANCHESTER Department of Computer...
Nov '04 CS3291: Section 6 1
Baseado no material da:
UNIVERSITY of MANCHESTER
Department of Computer Science
CS3291: Digital Signal Processing
Section 6
IIR discrete time filter design
Nov '04 CS3291: Section 6 2
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
Nov '04 CS3291: Section 6 3
• Analogue filters have transfer functions: a0 + a1s + a2s2+ ... + aNsN
H a (s) = b0 + b1s + b2s2 + ... + bMsM
• Replace s by j 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.
Nov '04 CS3291: Section 6 4
Analogue Butterworth low-pass filter of order n
nC
G2)/(1
1)(
[n/2]
1k
2
212sin21 1
1
cc
p
c
a
ssnk
ssH
[n/2] is integer part of n/2 & P = 0 /1 if n is even / odd
Nov '04 CS3291: Section 6 5
[n/2]
1k
2
212sin21 1
1
cc
p
c
a
ssnk
ssH
Ca
Cs
sHGn
/1
1)(
)/(1
1)( : 1
2
24 )/(/21
1)(
)/(1
1)( : 2
CC
a
Css
sHGn
1 when )1)(1(
1 )(:3
2
Ca sss
sHn
Nov '04 CS3291: Section 6 6
1 when )...1)(..1(
1 )(
:4
22
Ca sssssH
n
)...1)(..1)(1(
1 )(
:5
22 ssssssH
n
a
Nov '04 CS3291: Section 6 7
radian/s
Butterworth low-pass
0
0.2
0.4
0.6
0.8
1
1.2
0 1 2 3 4 5 6
Ga
in
n=2
n=1
n=4
Nov '04 CS3291: Section 6 8
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.
Nov '04 CS3291: Section 6 9
• 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
)(1
12 )(
1
1
5.0
1 )(
1
1
zYz
z
TzY
z
z
TzD
Nov '04 CS3291: Section 6 10
replacing s by [ (2/T) (z-1)/(z+1)] is bilinear approximation.
If LT of y(t) is Y(s) LT of dy(t)/dt is sY(s).
sy(t) dy(t)/dt
(2/T) (z-1)/(z+1){y[n]} {dy(t)/dt / t=nT}
Nov '04 CS3291: Section 6 11
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)
1
12
z
z
T
Nov '04 CS3291: Section 6 12
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(ej) = Ha(j ) where = 2 tan(/2)
Nov '04 CS3291: Section 6 13
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)
Nov '04 CS3291: Section 6 14
Frequency warping:
By (iv), H(ej) = Ha(j) with = 2 tan(/2). from - to mapped to in the range - to .
-3.14
-2.355
-1.57
-0.785
0
0.785
1.57
2.355
3.14
-12 -10 -8 -6 -4 -2 0 2 4 6 8 10 12
Radians/secondRa
dia
ns/s
am
ple
Nov '04 CS3291: Section 6 15
• Mapping approx linear for in the range -2 to 2.
• As increases above 2 , a given increase in produces smaller and smaller increases in .
Nov '04 CS3291: Section 6 16
Comparing (a) with (b) below, (b) becomes more and more compressed as .
|Ha(j )| |H(exp(j )|
(a): Analogue gain response (b): Effect of bilinear transformation
Frequency warping must be taken into account with this method
Nov '04 CS3291: Section 6 17
6.8. Design of IIR low-pass filter by bilinear transfmGiven cut-off frequency C in radians/sample:-
(i) Calculate C = 2 tan( C /2) radians/sec. ( 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 C
(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.
Nov '04 CS3291: Section 6 18
•Example Design 2nd order Butterworth-type
IIR low-pass filter with C = / 4.
•Solution: Prewarped frequency 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
Nov '04 CS3291: Section 6 19
which may be realised by the signal flow graph:-
x[n] y[n] 0.093
2 0.94
-0.33
21
21
33.094.01
21093.0
zz
zzzH
Nov '04 CS3291: Section 6 20
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:
22 85.11
1
77.01
1
sssssH a
Replace s by s/0.4 then replace s by 2 (z-1) / (z+1) to obtain:
48.0365.1
12028.0
74.06.1
12033.0
2
2
2
2
zz
zz
zz
zzzH
Nov '04 CS3291: Section 6 21
H(z) may be realised as:
x[n] 0.033
2 1.6
-0.74
0.028 y[n]
2 1.36
-0.48
Fourth order IIR Butterworth filter with cut-off fs/16
Nov '04 CS3291: Section 6 22
Analogue gain resp.
-0.1
0.1
0.3
0.5
0.7
0.9
1.1
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5
Radians/second
Ga
in
Gain response of 4th order IIR filter
-0.1
0.1
0.3
0.5
0.7
0.9
1.1
0 0.785 1.57 2.355 3.14
Radians/sample
Ga
in
Nov '04 CS3291: Section 6 23
•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 whereas digital filter gain becomes exactly zero at = .
•Shape of Butt gain response is "warped" by bilinear transfn.
•For digital filter, cut-off rate becomes sharper as because of the compression as .