23. IIR Digital Filter Design

Signals and Systems 講義
國立交通大學 電機系 陳永平 編
23. IIR Digital Filter Design
A digital filter is an algorithm to convert a sequence of numbers representing an
input signal into another sequence of numbers which changes the character of the
input signal in some prescribed feature. Here, we will focus on the design of LTI
digital filter to behave closely with a reference analog filter, especilly a lowpass filter.
An nth-order discretized LTI filter can be described by the following difference
equation
yk   an1 yk  1    a1 yk  n  1  a0 yk  n
(1)
 bnuk   bn1uk  1    b1uk  n  1  b0uk  n
whose impulse response is h[k] and transfer function is given as

H z    hk z k 
k 0
Y z  bn z n  bn1 z n1    b1 z  b0

U z  z n  an1 z n1    a1 z  a0
(2)
The problem in digital filter design is to determine the set of coefficients ai and bi so
that the filter performs the desired behavior.
Based on the duration of impulse response h[k], the digital filters can be
classified into two types, the infinite impulse response (IIR) and the finite impulse
response (FIR). The impulse response h[k] of an IIR filter contains an infinite number
of samples and the filter is often realized in a recursive structure. Below shows the
structure of an 3-rd order IIR filter.
b0
b1
b2
y[k]
u[k]
+



z1
z1
z1
b3
+
a2
a1
a0
From (1), the example of 3-rd order IIR filter can be expressed as the following
difference equation
yk   a2 yk  1  a1 yk  n  1  a0 yk  n
1/5
(3)
Signals and Systems 講義
國立交通大學 電機系 陳永平 編
 b3uk   b2uk  1  b1uk  2  b0uk  3
Its transfer function is
b3 z 3  b2 z 2  b1 z  b0
z 3  a2 z 2  a1 z  a0
H z  

  hk z k  h0  h1z 1    hnz n  
(4)
k 0
and clearly h  0 , i.e., the impulse response indeed consists of an infinite number
of samples.
The impulse response h[k] of an FIR filter contains a finite number of samples
and the filter is often realized in a nonrecursive structure. Below shows the structure
of an 3-rd order FIR filter.
b0
b1
b2
u[k]
y[k]
z1
z1
z1
b3
+
From (1), the example of 3-rd order FIR filter can be expressed as the following
difference equation
yk   b3uk   b2uk  1  b1uk  2  b0uk  3
(5)
Its transfer function is
H z   b3  b2 z 1  b1 z 2  b0 z 3
(6)
 h0z 0  h1z 1  h2z 2  h3z 3
and clearly hk   0 for k>3, i.e., the impulse response only consists of a finite
number of samples.
Next, we will discuss the design of the IIR digital lowpass filter based on the
bilinear transform method. It is known that the z-transform H(z) and Laplace
transform H(s) are related by the condition:
z  e sT
(7)
which is not an easy work to implement the relation. Instead, the so-called bilinear
transform H(p) is employed by introducing a variable p which is defined as
2/5
Signals and Systems 講義
國立交通大學 電機系 陳永平 編
sT
2
sT

2
1  z 1
1  e sT
e e
sT
pC
C
 C sT
 C tanh
1
 sT
sT

2
1 z
1 e
e 2 e 2
(8)
In frequency response, let s=j  then
p  C tanh
where   2f , f 0 
jT
T
f
 
 jC tan
 jC tan
 jC tan v 
2
2
2 f0
2 
(9)
1
f
and v  . Let the imaginary part of p be , then (9) can
2T
f0
be written as
 
p  jC tan v   j
2 
(10)
 
  C tan v 
(11)
i.e.,
2 
which is periodic and implies only the frequency response in the range of 0ff0 or
0v1 is required for filter design. The relationship p,z and s-planes are illustrated in
the following figure.
A
z-plane
j
C
1
1
C
A
D
D
B
C
s-plane

p-plane
B
B
0
A
0
A
D
C
j
D
B
A
C

  
From (11), if v is small or f  f 0 we have tan v   v . That means (11)
2  2
can be approximate as

f
T
 C vC
C
2
2 f0
(12)
2
Then, the constant C can be chosen to satisfy    and obttained as
3/5
Signals and Systems 講義
國立交通大學 電機系 陳永平 編
C
2
 4 f0
T
(13)
for small v. In addition, we can also choose C such that =p is a particular frequency
of a prototype analog filter and = c is the desired cutoff frequency. Hence,
 T 
C   p cot  c 
 2 
(14)
Now, let’s use some examples of lowpass filter design for demonstration.
Example
Under sampling rate 2kHz and based on the bilinear transformation, derive a 1st order
lowpass digital with cutoff frequency 200Hz and it is required that its low frequency
response is closed to the analog filter.
Sol:
Choose the digital filter as below:
H  p 
1
1
p
c
1

1

p
400
400
p  400
where the desired cutoff frequency is 200Hz or c=400 rad. To fit the requirement,
we choose C based on (13) for low frequency response, i.e.,
C
2
 2  2000  4000
T
From (8), we have
pC
1  z 1
1  z 1

4000
1  z 1
1  z 1
Hence, the digital filter is designed as
400
400



1
p  400 
 1  z 1 
1 z 
 4000

10
 

400

1 
1  z 1 

 1 z 
3.1416 1  z 1
0.2391 1  z 1


10 1  z 1  3.1416 1  z 1
1  0.5219 z 1
H  p 






4/5


Signals and Systems 講義
國立交通大學 電機系 陳永平 編
Example
Under sampling rate 1kHz and based on the bilinear transformation, derive a lowpass
digital filter from the 2nd order butterworth filter with cutoff frequency 100 Hz.
Sol:
Choose the prototype 2nd order butterworth filter below:
H  p 
1
1  1.414 p  p 2
where p=1 is the normalized cutoff frequency. Since the desired cutoff frequency is
100Hz or c=200 rad. According to (14), we have
 T 
 200 
 
C   p cot  c   cot 
  cot    3.0777
 2000 
 10 
 2 
which from (8) yields
pC
1  z 1
1  z 1

3
.
0777
1  z 1
1  z 1
Hence, the digital filter is designed as
H  p 

1

1  1.414 p  p 2

1

1  z 1  
1  z 1 



1  1.414 3.0777

3
.
0777
1  z 1  
1  z 1 


0.0675 z 2  2 z  1
z 2  1.143z  0.413
5/5
2