Post on 07-Jul-2020
Session 8 : IIR Filter
I I R Filter(Infinite Impulse Response)
Session 8
Ir. Dadang Gunawan, Ph.DElectrical Engineering
University of Indonesia
Session 8 : IIR Filter
The Outline8.1 State-of-the-art8.2 Coefficient Calculation Method for IIR Filter8.2.1 Pole-Zero Placement Method8.2.2 Impulse Invariant Method8.2.3 Matched-z-transform (MZT) Method 8.2.4 Bilinear z-transform (BZT) Method8.3 Classical Analog Filter8.3.1 Butterworth Filter8.3.2 Chebysev Filter8.3.3 Elliptic Filter8.4 Review
Session 8 : IIR Filter
State of the art• The basic IIR filter is characterized by the follo-wing
equation :
• Where h(k) is the impulse response of the filter which is theoretically infinite in duration
∑∑
∑
==
∞
=
−−−=
−=
M
kk
N
kk
k
knxaknxbny
knxkhny
00
0
)()()(
)()()(
8.1
Session 8 : IIR Filter
State of the art (cont’d)
• bk and ak are the coefficients of the filter • x(n) and y(n) are the input and output to the filter• Transfer function for the IIR filter is :
∑
∑
=
−
=
−
−−
−−
=++++++
= M
k
kk
N
k
kk
MM
NN
za
zb
zazaazbzbbzH
0
01
10
110
......)(
8.1
Session 8 : IIR Filter
State of the art (cont’d)
• The important thing is to find suitable values for the coefficients bk and ak
• Note that the current output y(n) is a function of the past outputs y(n-k) . So that it show the feedback system of some sort
• The strength of IIR filters comes from the flexibility the feedback arrangement provides
• Remember that the transfer function of IIR filter can be shown as the pole and zero equations
8.1
Session 8 : IIR Filter
State of the art (cont’d)
• Here is an example tolerance scheme for an IIR bandpass filter
8.1
Figure 8.1
Session 8 : IIR Filter
State of the art (cont’d)
ε2 : passband ripple parameterδp : passband deviationδs : stopband deviationfp1 and fp2 : passband edge frequencyfp1 and fp2 : stopband edge frequencyAp : passband ripple = 10. log10(1+ ε2)
= 20. log10(1- δp)As : stopband attenuation = -20. log10(δp)
8.1
Session 8 : IIR Filter
Coefficient calculation methods for IIR filters
There are 4 methods to calculate the coefficients :1. Pole-zero placement2. Impulse invariant3. Matched z-transform4. Bilinear z-transform
Learn carefully
8.2
Session 8 : IIR Filter
Pole-zero placement Method
• The idea is : when a zero is placed at a given point on the z-plane, the frequency response will be zero at the corresponding pointwhile a pole produces a peak at the corresponding frequency point
• Note that for the coefficient of the filter to be real, the poles and zeros must either be real
Watch the figure 8.2 below
8.2.1
Session 8 : IIR Filter
Pole-zero placement Method (cont’d)
8.2.1
Figure 8.2
Session 8 : IIR Filter
Pole-zero placement Method (cont’d)
• Here is an example to make a bandpass digital filter which is required to meet the following specifications :- complete signal rejection at dc and 250 Hz- a narrow passband centered at 125 Hz- a 3dB bandwidth of 10 Hz
Fist we must determine where to place the poles and zeros on the z-plane . Watch the frequency on 250 Hz and 125 Hz
8.2.1
Session 8 : IIR Filter
Pole-zero placement Method (cont’d)
These are at angles of 0o and 360o x 250/500 = 180o
and the place poles at +- 360o x 125/500 = +-90o
The radius, r, of the poles is determined by the desi-red bandwidth. An approximate relationship betweenr , for r > 0.9 and bandwidth bw is given by :r = 1 – (bw/Fs).πSo that, by substituting the value of bw=10 Hz and Fs=500 Hz , giving r = 0.937After it, we can draw the pole-zero diagram below :
8.2.1
Session 8 : IIR Filter
Pole-zero placement Method (cont’d)
8.2.1
Figure 8.3
Session 8 : IIR Filter
Pole-zero placement Method (cont’d)
From the pole-zero diagram, the transfer function can be written as follow :
2
2
2
2
2/2/
877969.011
877969.01
))(()1)(1()(
−
−
+−
=
+−
=
−−+−
=
zz
zz
rezrezzzzH jj ππ
8.2.1
Session 8 : IIR Filter
Pole-zero placement Method (cont’d)
So that, the difference equation is :
Look at again the transfer function. It shows filter which is a second-order section, with coefficients :
b0 = 1 a1 = 0b1 = 0 a2 = 0.877969b2 = -1
)2()()2(877969.0)( −−+−−= nxnxnyny
8.2.1
Session 8 : IIR Filter
Impulse Invariant Method
• First, consider these component :- H (s) : a suitable analog transfer function - h (t ) : the impulse response- h (nT) : z transforming with T sampling interval - H (z) : desired transfer function
• Those component are useful and obtained by using Laplace Transform and also z-transformation
• Look at the example on DSP textbook
8.2.2
Session 8 : IIR Filter
Impulse Invariant Method (cont’d)
Here are the steps in Impulse Invariant Method :1. Determine a normalized analog filter H(s) that
satisfies the specifications for the desired digital filter2. If necessary, expand H(s) using partial fraction to
simplify the next step3. Obtain the z-transform of each partial fraction to
obtain :
∑∑=
−= −
→−
M
KTp
KM
K K
K
zeC
psC
k1
11 1
8.2.2
Session 8 : IIR Filter
Impulse Invariant Method (cont’d)
4. Obtain H(z) by combining the z-transforms of the partial fractions into second-order terms and possibly one-first-order term. If the actual sampling frequency is used then multiply H(z) by T
8.2.2
Session 8 : IIR Filter
Matched z-transform (MZT) method
• It provides a simple way to convert an analog filter into an equivalent digital filter
• The idea is : each of the poles and zeros of the analog filter is mapped directly from the s-plane to the z-plane using the following equation :
• It maps a pole or zero at the location s=a in the s-plane, onto a pole or zero in the z-plane at z=eaT
)1()( 1 aTezas −−→−
8.2.3
Session 8 : IIR Filter
Matched z-transform (MZT) method (cont’d)
• Here is an example for having a filter with a 3 dB cutoff frequency of 150 Hz in sampling frequency of 1.28 kHz. The normalized of transfer function of an analog filter is given by :
121)(
2 ++=
sssH
To obtain the transfer function, watch the answer below
8.2.3
Session 8 : IIR Filter
Matched z-transform (MZT) method (cont’d)
The cutoff frequency may be expressed as ωc=2π x 150 = 942.4778 rad/s . The transfer function ofthe denormalized analog filter is obtained by repla-cing s by s/ωc :
22
2
2
)()('
cc
c
css
ss
sHsH
ωωωω
++=
==
Find poles byabc formula
8.2.3
Session 8 : IIR Filter
Matched z-transform (MZT) method (cont’d)
Remember : so that :
We have the real and imaginary poles :
jjp
p
ci
cr
43.66622
43.66622
=+=
−=−=
ω
ω
acbbs 42
212 −±
−=
8.2.3
Session 8 : IIR Filter
Matched z-transform (MZT) method (cont’d)
Then, prT = -0.52065 cos (piT) = 0.8675piT = +0.52065 e prT = 0.5941
The transfer function become :
21
5
594134.0030818.11108876.8)( −− +−
×=
zzzH
8.2.3
Session 8 : IIR Filter
Bilinear z-transform (BZT) Method
• It is the most important method• The idea is: to convert an analog filter H(s) into an
equivalent digital filter is to replace s as follow:
• That transformation maps the analog transfer function, H(s), from the s-plane into the discrete transfer function, H(z), in the z-plane
Tkork
zzks 21,
11
==+−
=
8.2.4
Session 8 : IIR Filter
BZT Method (cont’d)
• Look at the figure below. It shows the transforma-tion using BZT method
8.2.4
S-plane Z-planeFigure 8.4
Session 8 : IIR Filter
BZT Method (cont’d)
• Here are the steps for using BZT1. Use the digital filter specifications to find suitable
normalized, prototype, analog low pass filter H(s)2. Determine and prewarpe the bandedge or critical
frequencies of the desired filterwhen : ωp = specified cutoff frequency
ωp’ = prewarped cutoff frequency
8.2.4
Session 8 : IIR Filter
BZT Method (cont’d)
Remember that in bandpass and bandstop filter, there are the lower and upper passband edge frequencies or we can say ωp1’ and ωp2’ .
3. Denormalize the analog prototype filter by replacing s in the transfer function, H(s), using these following transformation :
⎟⎟⎠
⎞⎜⎜⎝
⎛=
2tan'
Tpp
ωω
8.2.4
Session 8 : IIR Filter
BZT Method (cont’d)
lowpass to lowpass
lowpass to highpass
lowpass to bandpass
lowpass to bandstop2
02
20
2
'
'
ω
ω
ω
ω
+=
+=
=
=
sWss
Wsss
ss
ss
p
p
8.2.4
Session 8 : IIR Filter
BZT Method (cont’d)
where :
4. Apply the BZT to obtain the desired digital filter transfer function, H(z), by replacing s in the frequency-scaled (i.e. denormalized) transfer function, H’(s) as follows
11
+−
=zzs
121220 '''' pppp W ωωωωω −==
8.2.4
Session 8 : IIR Filter
Example of BZT Method
Learn in DSP textbook [Ifeachor and Jervis] pages 474 – 477 . Its very urgent !
Lowpass filter
Bandpass filter
Highpass filter
8.2.4
Session 8 : IIR Filter
Classical Analog Filter
• There are four types of Classical Analog filter :1. Butterworth filter2. Chebysev type I3. Chebysev type II4. Elliptic• All types of filter are derived from lowpass prototype
filter
8.3
Session 8 : IIR Filter
Butterworth Filter
Here is sketch of frequency response on Butterworth filter
8.3.1
Figure 8.5
Session 8 : IIR Filter
Butterworth Filter (cont’d)
• The important equations on Butterworth filter are :
⎟⎟⎠
⎞⎜⎜⎝
⎛
⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛
−
−
≥
⎟⎟⎠
⎞⎜⎜⎝
⎛+
=
pp
ps
Ap
As
N
pp
NH
ωω
ωω
ωlog2
110
110log
1
1)(10
10
22
Magnitude squareFrequency response Filter order
8.3.1
Session 8 : IIR Filter
Chebysev Filter
• Chebysev Type I : equal ripple in the passband,monotonic in the stopband
• Chebysev Type II : equal ripple in the stopband,monotonic in the passband
⎟⎟⎠
⎞⎜⎜⎝
⎛
⎟⎟⎟
⎠
⎞
⎜⎜⎜
⎝
⎛
−
−
≥−
−
pp
ps
Ap
As
N
ωω1
10
101
cosh
110
110cosh
8.3.2
Session 8 : IIR Filter
Chebysev Filter
Here is sketch of frequency response on Chebysev
8.3.2
Type 1 Type 2Figure 8.6
Session 8 : IIR Filter
Elliptic Filter
• The elliptic filter exhibits equiripple behavior in both the passband and the stopband
• This is the following magnitude-squared response:
• GN(ω’) is a Chebysev rational function
)(1)'( 222
2
ωεω
NGKH
+=
8.3.3
Session 8 : IIR Filter
Elliptic Filter
Here is sketch of frequency response on Elliptics
8.3.3
Figure 8.7
Session 8 : IIR Filter
Preparation for the review
IT IS THE END OF THIS SESSIONPREPARE FOR THE REVIEW
Open your DSP textbook and read more
ARE YOU READY ? IT WILL TAKE ONLY A FEW MINUTES
8.4
Session 8 : IIR Filter
Review
1. What is the meaning of Infinite Impulse Response and its effect in digital filter ?
2. Compare the performance of three filter : Butterworth, Chebysev, and Elliptic
3. Find out several applications of IIR filter in our daily life. Refer to internet, magazine, journal.
8.4
Not so hard… Isn’t it ?