Unit3 Iir Design Lecture Notes
Unit3 Iir Design Lecture Notes
Syllabus:
Structure of IIR – System design of discrete time IIR filter from continuous time filter
– IIR filter design by impulse invariance – Bilinear transformation – Approximation
derivatives – Design of IIR filter in the frequency domain.
Phase I
1. Structure of IIR –
2. System design of discrete time IIR filter from continuous time filter
Approximation derivatives –
3. IIR filter design by impulse invariance –
4. Bilinear transformation –
5. Design of IIR filter in the frequency domain.
TEXT BOOK
1. John G Proakis and Dimtris G Manolakis, “Digital Signal Processing Principles
- Algorithms and Application”, 3rd Edition, PHI/Pearson Education, 2000.
REFERENCES
1. Alan V Oppenheim, Ronald W Schafer and John R Buck, “Discrete Time
Signal Processing”, 2nd Edition, PHI/Pearson Education, 2000.
AVR 2
NOMENCLATURE
F s : Sampling Rate
Relation between Discrete Time signal and Analog
1 Time signal Frequencies:
T = : Sampling Time
Fs
Ω=2 πF ( Analog signal)
F pass : Analog passband edge frequency
ω=2 πf (Digital Signal)
F stop : Analog stopband edge frequency F
f=
f p : Digital passband edge frequency Fs
(∑ ❑ ❑ )
❑
❑
❑
❑
H ( z )−→ H ( ω)
( ❑❑ ❑❑ ❑❑ )
ω H ( ω ) drawn ¿ Pole zero plot () ω ¿ Analog Filter is converted to Digital Filter by
❑❑ ❑❑ ❑❑
1. Approximation Derivatives
2. Impulse Invariance
3. Bilinear Transformation
If the conversion technique is to be correct, it should possess the following desirable properties:
(Condition to satisfy for Correct Conversion)
1.The jΩ axis in the s-plane should map into the unit circle in the z-plane.
2. A stable analog filter should be converted to a stable digital filter.
Method1: Approximation Derivative:
L {dydt }=s . Y ( s )
Backward difference
Z ( ( y ( n ) − y ( n−1 ) )
T ) =
1−z−1
T
Y (z )
1−z −1
s= ( Mapping¿ s¿ z plane )
T
Problems:
1.Convert the analog filter given below to digital filter using backward difference method.
Assume T = 0.1sec.
1
H ( s )=H a ( s )=
( s +0.1 )2 +9
Solution:
Simplifying the H(s):
1 1
H ( s )= 2
= 2
s + 0.01+0.2 s+ 9 s + 0.2 s+ 9.01
−1
1−z
Substituting s=
T
1
H ( z )=
( ) ( )
−1 2
1−z 1−z−1
+0.2 +9.01
T T
1
H ( z )=
( 1+ z −2 z )
( )+9.01
−2 −1 −1
1−z
2
+ 0.2
T T
AVR 4
2
T
¿
1+ z −2 z +0.2 T ( 1−z ) +9.01T
−2 −1 −1 2
2
T
¿
1+ z −2 z +0.2 T −0.2 T z−1 +9.01 T 2
−2 −1
p1,2=0.91± j 0.27
Mapping s and z
N
h a ( t )=∑ c k e p t , t ≥ 0 k
k=1
k=1 k=1
Applying Z Transform:
∞
H ( z )= ∑ h ( n ) z
−n
n=−∞
∞ N N ∞ N ∞
H ( z )=∑ ∑ c k e p Tn z −n=∑ c k ∑ e p Tn z−n=∑ c k ∑ ( e p T z−1 )
n
k k k
∞
1
Since, ∑ a =
n
, then ,
n=0 1−a
( )
N
ck
H ( z ) =∑ −→ ( 2 )
1− ( e z )
pk T −1
k=1
So if we have:
c1 c c ❑ c2 c1
H a ( s )= + 2 + …+ N −→ H ( z )= ❑ ❑ ❑ + + …+
s− p1 s− p2 s− pN ❑ ❑ 1−e zp T −1 p T −1
1−e z ❑ 2 N
into a digital IIR filter by means of the impulse invariance method. Assume T = 0.1 second.
Solution:
To convert the poles in s-plane to z-plane. So first need to find pole in s-plane.
Pole in Analog Filter is, pk is found using equating the denominator to zero.
( s+0.1 )2 +9=0
s=−0.1± j3=poles , pk
s+0.1
H a ( s )=
( s +0.1+ j 3 ) ( s +0.1− j3 )
Only summation of poles in s-plane can be replaced by summation of poles in z-plane.
So use partial fraction expansion, to convert from product form to summation of poles form.
Hence,
s+0.1 c c'
H a ( s )= = +
( s +0.1+ j 3 ) ( s +0.1− j3 ) ( s+0.1+ j3 ) ( s+ 0.1− j3 )
If Residue , c=a+ jb, then Residue, c '=a− jb
To find c using Residue Method:
Numerator
Residue=
Differentiation of Denominator
s+0.1
Residue=
d s+ 0.1 s +0.1 1
(s ¿ ¿ 2+0.2 s +9.01)= = = ¿
ds 2 s+0.2 2 ( s+ 0.1 ) 2
1 ' 1
c= ∧c =
2 2
1 1
2 2
H a ( s )= +
( s +0.1+ j 3 ) ( s+ 0.1− j 3 )
1 1 1 1
2 2 2 2
H ( z )= + = +
( 1−e (−0.1− j 3) T z−1 ) ( 1−e(−0.1 + j 3) T z−1 ) ( 1−e−0.1T e− j 3 T z−1 ) ( 1−e−0.1T e+ j 3T z −1 )
Convert the system function to implementable form:
1
( 1−e−0.1 T e j 3 T z−1 +1−e−0.1 T e− j 3T z −1)
2
H ( z )=
( 1−e−0.1T e j 3 T z−1 ) ( 1−e−0.1T e− j 3 T z−1)
1
H ( z )= ¿ ¿
2
1
( 2−e−0.1T ( 2 cos 3 T ) z−1 )
2
H ( z )=
1−e−0.1 T ¿ ¿
−0.1T −1
1−e c os 3 T z
H ( z )= −0.1T
1−e ¿¿
Given T = 0.1,
¿∨H ¿ )|
, where N is the order of the Butterworth Filter , Ω c isthe cutoff freque ncy where
1
the magnitude becomes of the maximum value .
√2
3π
|H a ( jΩ )|≤ 0.2 for 4
≤ ΩT ≤ π
Substituting (1) in (2), ≥∧≤ both are modified ¿ equality , ¿ find N∧Ωc
2 1 2 1
|H a ( j 0.5 π )| =|0.707| = 2N | a
H ( j 0.75 π )| =|0.2| =
2 2
( ) ( )
2N
j 0.5 π j0.75 π
1+ 1+
j Ωc j Ωc
( )
2N
j0.5 π 1
1+ = =2
j Ωc 0.70 72 Taking Log on both sides,
2Nlog
( )
2N
0.5 π
=1
Ωc
N
Ωc
H a ( s )= ( obtained¿ ( 2 ) )
( s− p 1) ( s− p2 ) ( s− p3 ) ( s−p 4 )
AVR 10
Im(s)
Re(s)
ℑ ( p1 ) Ωc ℜ ( p 1)
= = ℑ ( p1 ) =Ωc sin22.5=0.6011 ; ℜ ( p1 )=1.4512
sin(22.5) sin 90 sin ( 180−90−22.5 )
p1=−1.4512+ j0.6011 , p 2=−1.4512− j0.6011 (Negative because left half of the s-plane)
ℑ ( p3 ) Ωc ℜ ( p3 )
= =
sin ( 45+22.5 ) sin 90 sin ( 180−90−67.5 )
( 0.5 π )N
H a ( s )=
( s +1.4512− j0.6011 ) ( s +1.4512+ j 0.6011 ) (s +0.6011−1.4512)(s +0.6011+1.4512)
For implementing Impulse Invariance, sum of poles form is needed. To do it, we need to find the
partial fraction expansion using Residue method.
c1 c1 ' c2 c2 '
H a ( s )= + + +
s +1.4512− j0.6011 s+1.4512+ j0.6011 s+ 0.6011− j 1.4512 s+0.6011+ j1.4512
To find c 1∧c 2 using Residue Method :
Numerator
Residue=
Differentiation of Denominator
( 0.5 π )4
Residue=
d
( ( s+ 1.4512− j 0.6011 ) ( s+1.4512+ j0.6011 ) ( s +0.6011−1.4512 ) ( s +0.6011+1.4512 ) )
ds
6.09
Residue=
d
¿¿
ds
d
¿
ds
6.09
Residue=
( s +2.9 s +2.47 ) ( 2 s+ 1.2 )+ ( s 2+ 1.2 s+2.47 ) (2 s+2.9 )
2
AVR 11
Basic Maths to help you:
−1.45
1.42−0.71e ( 2 cos 0.6 ) z−1+ j 1.75 e−1.45 (−2 jsin 0.6 ) z−1
H1 (z )=
1−e−1.45 ( 2 cos 0.6 ) z−1 +e−2.9 z−2
H1 (z )=
( 0.6∗180
1.42−1.42 e−1.45 cos
π ) −1
z +3.5 e sin (
0.6∗180
π )z
−1.45 −1
cos ( ) z +e z
−1.450.6∗180 −1 −2.9 −2
1−2 e
π
Using Calculator,
−1 −1 −1
1.42−0.27 z + 0.46 z 1.42+ 0.19 z
H 1 (z )= −1 −2
= −1 −2
1−0.39 z + 0.055 z 1−0.39 z +0.055 z
Similarly proceeding with H 2 ( z ) ,
AVR 12
(−0.73+ j 0.3 ) ( 1−e−0.6 e− j1.45 z−1 ) + (−0.73− j 0.3 ) ( 1−e−0.6 e j 1.45 z−1 )
H 2 (z )=
( 1−e−0.6 e j 1.45 z −1) ( 1−e−0.6 e− j 1.45 z−1)
−0.6 − j 1.45 −1 −0.6 − j 1.45 −1 −0.6 j 1.45 −1 −0.6 j1.45 −1
−0.73+ 0.73 e e z + j0.3− j 0.3 e e z −0.73+0.73 e e z − j0.3+ j0.3 e e z
H2 (z )= −0.6 − j1.45 −1 −0.6 j1.45 −1 −1.2 −2
1−e e z −e e z +e z
−0.6
H 2 ( z ) =−1.46+0.73 e ¿¿
−0.6
−1.46+ 0.73 e ( 2cos 1.45 ) z−1− j0.3 e−0.6 (−2 jsin 1.45 ) z−1
H 2 (z )=
1−e−0.6 ( 2cos 1.45 ) z−1 +e−1.2 z−2
Aft er converting radians¿ degree∧using calculator ,
−1.46+ 0.1 z −1 −0.33 z −1 −1.46−0.23 z−1
H 2 (z )= =
1−0.13 z−1+ 0.3 z −2 1−0.13 z−1 +0.3 z−2
H ( z )=H 1 ( z ) + H 2 ( z )
−1 −1
1.42+0.19 z −1.46−0.23 z
H ( z )= +
1−0.39 z−1+ 0.055 z −2 1−0.13 z−1+ 0.3 z −2
Aliasing Effect Ω
( )
+∞
1 jω j 2 πk
H ( e )= ∑ H a
jω
+
T k=−∞ T T
p T
Since mapping corresponds ¿ poles , s= p k =¿ z=e k
z=esT
z=ℜ jω ; s=σ + j Ω
r e jω =e σT e j Ω T
σT jω j ΩT
r =e ; e =e
ω=Ω T ,
Mapping:
For a stable analog fitler , σ <0 ,then r< 1. Hence stable digital filter .
¿
digital filter specification ¿ analog filter specification ¿
Aliasing Effect:
−π <ω< π
−π <Ω T < π
−π π
< Ω<
T T
❑
Since Ω varies from −∞ ¿+∞ , other values of Ω ❑ are also mapped to same−π ¿ π region,
resulting in aliasing effect. (More than one frequency in continuous domain has the same
frequency in digital domain. This is called aliasing.)
Advantage of Impulse Invariance:
AVR 13
Apply Trapezoidal
Represent Derivative
formula and convert
in Integral form By Substituting, H(z) is found
to digital domain (t
= nT, t0 = nT-T) by taking Z transform and is
T) compared with Ha (s) to find the
mapping between s and z.
dt s−a
(
y ' ( t ) +ay ( t ) =bx ( t ) since : y ' ( t )=
dy (t)
dt )
C onverting ¿ digital domain ,t=nT ,
∫ y ' ( t ) dt+ y ( t0 ) = y ( t )
t0
Trapezoidal Rule:
t
( y' ( t ) + y' (t 0 ))
∫ y ( t ) dt=( t −t 0 )
'
2
t0
( y ' ( t )+ y ' ( t 0 ) )
( t−t 0 ) 2
+ y ( t 0 )= y ( t )
( y ' ( nT ) + y ' ( nT −T ) )
( nT −( nT −T ) ) + y ( nT −T ) = y ( nT )
2
T
. ( y ( nT )+ y ( nT −T ) ) + y ( nT −T ) = y ( nT )
' '
2
Since T is understood implicitly,
T
. ( y ( n ) + y ( n−1 ) ) + y ( n−1 )= y ( n ) → ( 2 )
' '
2
Substitute (1) in (2), ( y ' ( n )=−ay ( n )+ bx ( n )∧¿ y ' ( n−1 )=−ay ( n−1 )+ bx ( n−1 ) since LTI system )
T
( −ay ( n ) +bx ( n )−ay ( n−1 )+ bx ( n−1 ) ) + y ( n−1 ) = y ( n )
2
Rearranging the above equation:
bT
2
( x ( n )+ x ( n−1 )) + 1−
aT
2 (
y ( n−1 )= y ( n )+
aT
2 )
y (n)
(
Y ( z ) 1+
aT
2
− 1−
aT −1
2 (
z = X(z)
bT
2 ) )
( 1+ z−1 ) ( )
bT bT
( 1+ z−1 ) ( 1+ z −1)
Y ( z) 2 2
H ( z )= = =
( ) ) ( )
X (z )
1+
aT
2
− 1−
a T −1
2
z ( 1−z−1 +
aT
2
( 1+ z−1 )
By comparing with Ha(s), only b is in the Numerator, Divide the numerator and denominator by:
T
( 1+ z −1)
2
AVR 15
bT
2 (( 1+ z −1) )
T
( 1+ z −1 )
2 b b
H ( z )= = =
( −1 aT ( 1−z )
) 2 ( 1−z )
−1 −1
1−z + ( 1+ z−1 ) +a +a
2 T( T ( 1+ z
−1
)
1+ z )
−1
T 2
( 1+ z )
−1
2
b
Comparing with H a ( s )= , then
s +a
2 ( 1−z )
−1
s=
T ( 1+ z )
−1
2 ( 1−e )
− jω
jω −1 − jω
Since z=e , then z =e , s=
T ( 1+ e )
− jω
jω
Multiply thenumerator ∧denominator by e 2 :
) = 2 (2 jsin ( 2 )) = 2 j
( )( ω2 ) = 2 j tan ω
ω
2(e ) = 2(e
jω jω jω jω − jω
sin
2 ( 1−e )∗e
(2)
− jω 2 − jω 2 2 2
2
−e e −e
s= =
T (e ) T (e ) T ( 2 cos( ω2 )) T cos ( )
jω jω jω jω − jω
ω T
T ( 1+ e )∗e
− jω 2 2 − jω 2 2 2
+e e +e 2
s=σ + jΩ=
2j
T
tan
ω
2 ( )
Equatingimaginary parts ,
Ω=
2
T
tan
ω
2 ( )
¿ ω=2 tan −1 ( ΩT2 )
Mapping of ω∧Ω and Frequency Warping:
−π <ω< π
( ΩT2 )< π
−π <2 tan −1
< tan (
2 ) 2
−π ΩT π −1
<
2
Frequency
Warped
Problems:
( s +0.1 )
1. Convert the analog filter: H a ( s )= into digital IIR filter by means of bilinear
( s +0.1 )2 +16
π
Transformation. Given: Digital should have resonant frequency, ω r=
2
Solution:
Before applying the mapping directly, from the given data, T can be obtained.
From the given H a ( s )=¿> Ωr=4 Resonant Frequency: Frequency at which Filter
frequency response is exactly unity (Maximum)
Ω=
2
T
tan
ω
2 ( )
()
π
2 2 1
4= tan −→ T =
T 2 2
( ) ( )
−1 −1
2 1−z 1−z
Bilinear Transformation, s= =¿> , s=4
T 1+ z −1 1+ z
−1
H ( z )=[ H a ( s ) ]
( )
−1
1−z
s=4 −1
1+z
2. Design a single-pole low pass digital filter with a 3-dB bandwidth of 0.2 π , using the
Bilinear transformation applied to the analog filter
Ωc
H a ( s )=
s +Ωc
Ωc =
2
T ( )
tan
ωc 2
2
= tan
T
0.2 π
2 ( )
2
= tan ( 0.1 π )=
T
0.65
T
0.245 ( 1+ z )
−1
H ( z )=
1−0.509 z−1
(If T is not cancelled, assume T = 1 in case T is not given)
3. Design a digital filter from
❑❑ () ❑❑
()
Solution:
❑❑ () ❑❑ ❑❑ ❑❑
() ❑ ❑
() [ ❑❑ () ] ❑
( )
❑
❑
❑ ❑❑
()
❑ ❑❑
❑ ❑❑( )
( ( )) ( ( ))
❑
❑ ❑❑ ❑ ❑❑
❑ ❑❑ ❑ ❑❑
( ( ❑❑ ) (❑❑) )
( ❑❑)
()
( ❑❑ )❑ ❑ ❑❑
❑ (❑ ) ❑ ❑
❑ ❑❑ ❑ ( )
( ( ❑❑ ) (❑❑) )
( ❑)
() ❑ ❑ ❑ ❑ ❑ ❑ ❑ ❑
(❑ ) ( ❑ ) (❑ ) ❑ ( ❑ )
❑ ❑❑
❑ (❑ )
AVR 18
( (❑❑ ) (❑❑) ) ( ( ❑❑ ) )
()
( ❑❑ )❑ ( ❑❑) ( ❑❑) ❑❑ ( ❑❑ )❑
( (❑❑ ) ( ❑❑ ) ) ( ❑❑)
()
( ❑❑ )❑ ( ❑❑) ( ❑❑) ( ❑❑ )❑
( ( ❑❑ ) (❑❑❑❑) )
()
( ❑❑ ❑❑ ) ( ❑❑ ) ( ❑❑❑❑ )
( ❑❑ ❑❑ )
() ❑ ❑
❑ ❑
( ❑❑ ❑❑ )
() ❑ ❑
❑ ❑
Try to implement atleast in Direct form I. (Since asked for 16 marks)
( ) (❑❑ ❑❑)
()
( ) ❑❑ ❑❑
() ( ❑❑ ❑❑ ) () ( ❑❑ ❑❑)
()❑❑( )❑❑ ()= ( )❑❑ ()❑❑ ()
()()( )❑❑ ()
( )()( )( )
Now you can implement this in direct form I easily (as we did before).
|()|❑❑( ❑
❑)
|()|❑❑( ❑
❑)
Taking only the Passband limit:
❑ ❑❑ ❑ ❑ ❑ () ❑ ( )
❑ ( )
❑ ❑❑ ❑
()
Taking only the stopband limit:
❑ ❑❑ ❑ ❑ () ❑ ❑ ❑
❑ ( )
❑ ❑ ❑ ❑ ❑ ( )
()
Substituting the limit,
|()|
AVR 19
|()|
()
()
Analog Butterworth Filter Design:
❑ ❑
|()| ❑
( )
❑
❑❑
|()| ❑❑ ❑ ❑ |()| ❑❑ ❑ ❑
❑ ❑
( ❑❑ ) ❑
( ❑❑ ) ❑
❑ ❑
( )
❑
❑❑
❑
❑
❑ ( )
❑
❑❑
❑
❑
❑
❑ ❑
( )
❑
❑❑ ( )
❑
❑❑
Taking Log on both sides, Taking Log on both sides,
❑❑ ❑❑
❑❑ ❑❑ – (2)
❑
❑
Assume N=2 ( always greater ∨equal integer than what we obt ained )
Substitute N = 2 in (1) (satisfying passband criterion),
❑❑
❑❑
❑❑
❑❑ ❑❑ ❑ ❑ ❑
( () ❑ )
( () ❑)
❑❑ ❑ ❑ ❑
( ❑ ❑ ) ( ❑)
❑❑ ❑ ❑ ❑ ❑ ❑ ❑ ❑
❑ ❑ (( )( ))
()
( ❑ ❑ ) ( ❑)
❑❑ ❑ ❑ ❑ ❑ ❑ ❑ ❑
❑ ❑ (( )( ))
AVR 20
❑❑ () ❑ ❑❑
()() ❑
❑❑ ❑❑ ❑❑()❑❑❑ ()
Analog filter design is over. Now analog filter can be converted to digital filter using
=1)
() ❑
(( )) (( ❑❑ ))
❑ ❑ ❑
❑
❑❑ ❑
( ❑❑ ❑❑) ❑❑❑❑
()
❑❑ ❑❑ ❑❑❑❑
Thus digital filter design is over.
Other commonly used Analog filters:
Direct Form I
AVR 21
Direct Form II
AVR 22
Bilinear Transformation:
❑ ❑❑ ( ) ( )
❑ ❑❑ ❑❑ ❑
❑
Formulas to Solve Butterworth Filter Design:
|()| ()() ❑ ❑
❑
( ❑❑ )
❑
If Impulse Invariance:
( )
❑
❑❑
❑❑
❑❑ () ❑
()
❑ ❑ ❑ () ❑ ( ) Poles , s =Ω e j( ) , k=0,1,2 , … , N −1
( 2 k 1) π π
❑ ❑ ❑ ❑ ❑ +
2N 2
k c
Hint :
Only if find half of the poles is sufficient , others can be found usingcomplex conjugate .
❑❑ () ❑ ❑❑ () ❑❑ ❑❑ ❑❑ ❑❑ ❑❑ ❑
()() ❑ ❑ ❑ ❑ ( )()() [ ]❑
❑❑ ❑ Laplace Transform to Know:
❑ ❑❑ ❑❑ ❑❑ ❑
()() ( ❑( ) )() (❑ ) ❑❑ ❑
Z Transform to Know:
{ ()} () (() ) ❑❑()
AVR 23
0 π
❑❑ () ❑
()()
❑❑ ❑❑ ❑❑ ❑❑
❑❑ ()
❑ ❑ ❑ ❑
❑❑
[ ( )(❑)() ]
❑