Infinite Impulse
Response Filters
Presenteed By
Dr M.Murugappan
School of Mechatronic Engineering
Universiti Malaysia Perlis
Introduction
A digital filter is a linear time invariant (LTI) discrete time system.
The FIR and IIR filters are of type of non-recursive and recursive
type, respectively.
In FIR filter design, the present output sample depends on the present
and previous input samples.
In IIR filter design, the present output sample depends on the present,
past and output samples.
The Impulse response for realizable filter and The stability condition
must satisfy.
The IIR digital filters have the transfer function form
Analog vs. Digital Filters
Analog Digital
• Speed 10-100x faster • Very complex filters
• Dynamic Range • Full adjustability
– Amplitude: 140 dB • Precision vs. cost
e.g., 12 Vrms & 1 V noise • Arbitrary magnitude
– Frequency: 8 decades • Total linear phase
e.g., 0.01 Hz to 1 MHz • EMI & magnetic noise
• Cheap, small, low power immunity
• Precision limited by noise &
• Stability (temp & time)
component tolerances • Repeatability
Frequency Selective Filters
A filter rejects the unwanted frequencies from the input signal and allow the
desired frequencies.
The ranges frequencies that passed the filter is called the passband and those which
are blocked called stopband.
The filter are of different types.
Lowpass Filter
Highpass Filter
Bandpass Filter
Bandreject Filter
Design of Digital Filters from Analog Filters
The most common technique used for designing IIR digital filters known as Indirect
Method.
The derivation of digital filter transfer function required 3 steps:
1. Map desired digital filter specifications into equivalent analog filter.
2. Derive analog transfer function for the analog prototype.
3. Transform the transfer function of the analog prototype into equivalent
digital filter transfer function.
Specification for the magnitude response of low
pass filter (a)analog (b)digital (c) Alternate
specifications of magnitude response of a
lowpass filter
Fig (b) can be modified to apply to analog lowpass filter as in Fig (a).
Here the digital frequencies ωp, ωs and ωc are replaced by analog frequencies Ωp, Ωs,
and Ωc whose unit in radians/sec.
Analog Filter Digital filter
Process analog input and generates analog Process and generates digital data
output.
Constructed from active or passive Consist of elements: adder, multiplier and
electronic components. delay unit.
The frequency response modified by The frequency response changed by
changing the components. changing the filter coefficient.
Described using differential equation. Described by difference equation.
Disadvantage:
Quantization error arises due to finite length of the representation of signals and
parameters.
Analog Lowpass Filter Design
General form analog filter transfer function is:
Where H(s) is the Laplace transform of the impulse response h(t),
N M must satisfied and H(s) must lie in left half of the s-plane.
Analog lowpass Butterworth filter
Magnitude function of Butterworth lowpass filter is given by
N=order of the filter
=cutoff frequency
Seen, magnitude of response
approaches ideal low pass
characteristic as order N inc.
Round N to the close integer,get N=4
Determine the order and the poles of low pass Butterworth filter that has 3
dB attenuation at 500 Hz and attenuation of 40 dB at 1000Hz.
Round N = 7
Steps to design Analog Butterworth lowpass Filter
From given specifications, find order of the filter, N.
Round off it to the next higher integer.
Find the transfer function H(s) for Ωc =1rad/sec for the value of N
Calculate value of cutoff frequency, Ωc .
Find the transfer function Ha (S) for value Ωc by substituting s -> s/ Ωc in
H(s) .
Analog Frequency Transformations
an
H norm (s ) n
s a1s n 1 an
Convert to Replace s with
s
Lowpass with cutoff 0 c
Highpass with cutoff 0
c
s
s 2 1 2
Bandpass with cutoffs 1 and 2 ( 2 1 )s
( 2 1 )s
Bandstop with cutoffs 1 and 2
s 2 1 2
Design of IIR filters from analog filters
The conversion technique should be effective it should posses following
desirable properties.
The jΩ –axis in the s-plane should map into the unit circle in the z-
plane. Thus, have direct relationship between two frequency variable in two
domain.
The left–half plane of the s-plane should map into the inside of the unit
circle in the z-plane. Thus, we can convert stable analog to stable digital
filter.
4 most widely use Methods for digitizing Analog filter to digital filter
Approximation of derivatives.
Impulse invariant transformation.
Bilinear transformation.
matched z-transformation technique.
Design of IIR Filter using Impulse Invariance Technique
IIR filter is design such that unit impulse response h(n) of digital filter is the
sampled version of the impulse response of analog filter. The z-transform of
infinite impulse response given by
Let us consider the mapping points from the s-plane to the z-plane by the
relation z=esT. Substitute s=σ+jΩ and express the complex variable z in polar
form: z=rejω
rejω = e(σ+jΩ)T , we r = eσT, ω = ΩT.
Therefore, analog is mapped to a place in the z plane of magnitude e σT and
angle ΩT
Real part of analog pole =radius z-
plane,
Imaginary part=angle of digital pole,
Consider any pole on jΩ -axis, where
σ=0. Poles maps at the z-plane at a
radius r=e0.T=1. Therefore, the impulse
invariance had map poles from the s-
plane’s jΩ -axis to z-plane’s unit
circle.
2nd case
Consider pole on left–half s-plane
where σ < 0.Therefore, all s-plane
poles with negative real parts map to
z-plane poles inside the unit circle –
stable analog poles are mapped to
stable digital poles. Because r= e σT<1
for <0.
Unstable pole mapping occur when all poles at right half of the s-plane map
to the digital poles outside the unit circle.
Third case
many point in s-plane are mapped in one point in z-plane .
Easiest way to explain is to consider two poles in the s=plane with identical
real parts.
S 1 = , S 2=
Impulse invariant pole mapping
These pole map to z-plane poles z1 and z2,via impulse invariant mapping.
Let Ha(s) is the system function of an analog filter and {ck} are the coefficients and
{pk} are the poles of analog filter.
The inverse laplace transform of Ha(s)
Sampled ha(t) periodically at t=nT ,
N
ha (nT ) ck e pk nT
k 1
For high sampling rates (small T), the digital gain is high, we can use
Step to design a digital filter using impulse
invariance method
For given specifications, find Ha(s), transfer function of analog filter.
Select sampling rate of the digital filter, T second per sample.
Express analog transfer function as sum of single-pole filters.
Compute the z-transform of the digital filter using formula
For high sampling rates
For the analog transfer function
determine H(z) using impulse invariance method. Ass T=1sec.
Design third order Butterworth digital filter using impulse
invariant technique. Ass sampling period T=1 sec.
Design of IIR filter using Bilinear Transformation
It is a conformal mapping that transforms the jΩ –axis into unit circle in the
z-plane only once, that avoid aliasing components.
All point in LHP ‘s’ mapped inside unit circle z-plane.
All points in RHP ’s’ mapped outside unit circle z-plane.
Let consider analog linear filter with system function
Which an be written
Can be characterize by differential equation
Approximate by trapeizoidal formula
y’(t) is derivative of y(t)
Approximation of the integral at t=nT and t0=nT-T yield
From differential eq
Which implies
The system function of the digital filter is
Dividing numerator and Denominator by
Relation between s ad z known as Bilinear transformation.
Let z=rejw.
.
Separating imaginary and real parts
Steps to Design Digital filter using Bilinear Transform
technique
1. From the given specifications, find prewarping analog frequencies using
formula
2. Using the analog frequencies, find H(s) of analog filter .
3. Select the sampling rate of the digital filter, call T seconds per sample.
4. Substitute into the transfer function found in step 2.
Apply Bilinear Tansformation to H(s)=
with T=1sec and find H(z).
Using the Bilinear transformation, design a highpass filter, monotonoic in passband
with cutoff frequency 1000 Hz and down 10 dB at 350 Hz. The sampling frequency is
5000Hz.
Therefore we take N =1. The 1st order
Butterworth filter for
From Fig 5.27,
Prewarping the digital frequencies we have
Determine H(z) that result when the bilinear
transformation is applied to Ha(s)= .
Solution:
In bilinear transformation
Ass T= 1 sec.
Then,
Realization of Digital Filters
There are two type of realization of digital filter transfer
function.
Recursive Realization Non-Recursive Realization
The current output y(n) is a Current output sample y(n) is a
function of past outputs, past function of only past and
and present input. present inputs.
Correspond to IIR digital filter.
Correspond to FIR digital filter.
IIR Filter can be realized in many forms
Direct form -I realization
Direct form –II realization
Transposed direct form realization
Cascade form realization
Parallel form realization
Lattice form realization.
Direct Form 1 realization
Let consider an LTI recursive system describe by difference equation
Structure call
Direct form 1
Realize the second order digital filter
y(n) =
Direct form II realization
Consider the difference equation
and from which
The system of above difference equation
The equation 5.112 and Eq 5.113b can be
expressed in difference equation form
Which gives
The realization Eq.(5.114) and Eq.(5.115) shown in Fig.(5.35) ,(5.36)
Realize the second order system y(n)
we realize eq.(5.118a) and
and eq. (5.118b)
Determine the direct form II realization for the following system
.
The solution the system function given Realize eq.(5.120) and
eq.(5.121) and combine them
to get direct II realization of the
system shown below
Let,
Cascade Form
Let consider IIR System with system Function
Represented using block diagram
Realize each Hk(z) in direct form II and cascade all structure
Realizing H1(z) and H2(z)in direct form II, and cascading we obtain cascade
form of system function.
Realize the system with difference equation y(n) = ¾ y(n-1)-
1/8 y(n-2)+x(n) +1/3 x(n-1) in cascade form.
Solution ,
From the difference equation >Similarly,H2(z) can be realize n
Direct form II
Cascading the realization of
H1(z) can be realize in direct form II, H1(z) and H2(z)
Analog Lowpass Chebyshev Filters
There are 2 types of Chebyshev filters
Type – I
They are all-pole filters that exhibit equiripple behaviour in the passband and a monotonic
characteristics in the stopband.
Type – II
Contains both poles and zeros and exhibits a monotonic behaviour in the passband and equiripple
behaviour in the stopband.
The magnitude square response of Nth order type I filter
2 1
H(jΩ ) N 1, 2, .......
Ω
1 ε 2 C N2
ΩP
- - - - - (1)
1
Where ε is a parameter of the filter related to C N (x) cos(Ncos x), | x | 1 (Passband)
the ripple in the passband
CN(x) is the Nth order Chebyshev 1
C N (x) cosh(Ncosh x) ,| x | 1 (Stopband)
polynominal
α P 10 log (1 ε 2 ) C N (1) 1 Pole locations for Chebyshev Filter
0.1α p
ε (10 1)0.5 μ ε 1 1 ε 2
2 Ωs
α s 10 log 1 ε C N
2
The poles of a Chebyshev filter
Ω P μ 1/N μ 1/N
a ΩP
2
1 10 0.1 α s
1
cosh 0.1 α p μ 1/N μ 1/N
10 1 b ΩP
N 2
-1 Ω s π (2k 1) π
cosh φk k 1, 2, ..., N
ΩP 2 2N
s k a cos φ k jbsin φ k
Comparison between Butterworth and Chebyshev Filter
The magnitude response of Butterworth filter decreases monotonically as the frequency Ω
increases from 0 to ∞, whereas the magnitude response of the Chebyshev filter exhibits
ripples in the passband or stopband according to the type.
The transition band is more in Butterworth filter when compared to Chebyshev filter.
The poles of the Butterworth filter lie on a circle, whereas the poles of the Chebyshev filter
lie on the ellipse.
Steps to design an analog Chebyshev lowpass filter
1. From the given specifications, find the order of the filter N.
2. Round off it to the next higher integer.
3. Using the following formulas find the values of a and b, which are minor and major axis
of the ellipse respectively.
The poles of a Chebyshev filter
μ 1/N μ 1/N μ 1/N μ 1/N 1 2
a ΩP b ΩP Where μ ε 1 ε ε 10
0.1α P
1
2 2
Ω P Passband Frequency
α p Maximum allowable attenuatio n in the pass band
4. Calculate the poles of Chebyshev filter which lie on the ellipse by using
the formula
π (2k 1) π
φk k 1, 2, ..., N
2 2N
s k a cos φ k jbsin φ k
5. Find the denominator polynomial of the transfer function using above
poles.
6. The numerator of the transfer function depends on the value of N.
(a) For N odd substitute s = 0 in the denominator polynomial and find
the value. This value is equal to the numerator of the transfer
function.
(b) For N even substitute s = 0 in the numerator polynomial and divide
the result by √1+ε2. This value is equal to the numerator.
Determine the order and the poles of a type I lowpass Chebyshev filter that
has a 1 dB ripple in the passband and passband frequency Ωp = 1000π, a
stopband frequency of 2000π and an attenuation of 40dB or more.
Given data: αp = 1 dB, Ωp = 1000π, αs = 40 dB, Ωp = 2000π
10 0.1 α s 1
1
cosh 0.1 α
10 p 1
N 4.536
-1 Ω s π (2k 1) π
cosh φk k 1, 2, ..., 5
N= 5 ΩP 2 2N
φ 1 108 ; φ 2 144 ; φ 3 180 ;
ε (10 0.1 α P
1) 0.5
0.508 φ 4 216
; φ 5 252
μ ε 1 1 ε 2 4.17
s 1 a cos φ 1 jbsin φ 1 89.5 π j989 π
s 2 a cos φ 2 jbsin φ 2 234.2 π j612 π
The poles of a Chebyshev filter
s 3 a cos φ 3 jbsin φ 3 289.5 π
μ 1/N μ 1/N
a Ω P 289.5 π s 4 a cos φ 4 jbsin φ 4 234.2 π j612 π
2
s 5 a cos φ 5 jbsin φ 5 89.5 π j989 π
μ 1/N
μ 1/N
b Ω P 1041 π
2
Given the specifications αp = 3dB ; αs = 16 dB ; fp = 1kHz, and fs = 2kHz, Determine the order of the
filter using Chebyshev approximation. Find H(s).
From the given data we can find, Ωp = 2π x 1000 = 2000 π rad/sec
Ωs = 2π x 2000 = 4000 π rad/sec
Step 1: cosh 1
0.1 α
10 p 1
10 0.1 α s 1
Find N N
-1 Ω s
1.91
cosh
ΩP
Step 2: Rounding N to next higher value we get N = 2
Step 3: The values of minor axis and major axis can be found as below
ε (10 0.1 α P 1) 0.5 1
π (2k 1) π
μ ε 1
1ε 2
2.414 φk k 1, 2
2 2N
π π
φ 1 135
The poles of a Chebyshev filter 2 4
μ 1/N μ 1/N π 3π
a ΩP φ2 225
910 π 2 4
2
s 1 a cos φ 1 jbsin φ 1 643.46 π j1554 π x+jy
μ 1/N μ 1/N
b ΩP 2197 π s 2 a cos φ 2 jbsin φ 2 643.46 π j1554 π
2
The denominator of H(s) = (s+643.46π)2 +(1554π)2 (s+x)2+(y)2
The numerator of H(s) =(643.46π)2 +(1554π)2/√1+ε2 (x)2+(y)2 / √1+ε2
=(1414.38)2π2
The transfer function H(s) = (1414.38)2π2/ (s2+1287πs+(1682)2π2
Design a Chebyshev low pass filter with the specifications α p = 1 dB ripple in the
passband 0 ≤ ω ≤ 0.2π, αs = 15 dB ripple in the stopband 0.3π ≤ ω ≤ π, using (a), bilinear
transformation, (b). Impulse invariance.
Given data αp = 1 dB ;2ωp = 0.2π,
ω αs = 150.2
dB;π ωs = 0.3π
p
Ω p are
Prewarped frequencies tangiven by2tan 0.65
T 2 2
2 ω 0.3 π
Ωs tan s 2tan 1.02
T 2 2
π (2k 1) π
10 1
0.1 α p
φk k 1, 2,3,4
cosh 1 2 2N
10 0.1 α s 1 φ1 112.5 ; φ 2 157.5 ; φ 3 202.5 ;
N 3.01
Ω
cosh -1 s φ 4 247.5 ;
ΩP
Let us take N 4
s 1 a cos φ 1 jbsin φ 1 0.0907 j0.639
s 2 a cos φ 2 jbsin φ 2 0.2189 j0.2647
ε (10 0.1 α P
1) 0.5
0.508
s 3 a cos φ 3 jbsin φ 3 0.2189 j 0.2647
1 2
μ ε 1ε 4.17 s 4 a cos φ 4 jbsin φ 4 0.0907 j0.639
The poles of a Chebyshev filter The denominator of H(s) =[(s+0.0907)2 +(0.639)2] [(s+0.2189)2
μ 1/N μ 1/N +(0.2647)2]
a ΩP 0.237 =(s2+0.1814s+0.4165) (s2+0.4378s+0.118)
2
As N is even, the numerator of H(s) =(0.4165) (0.118)/√1+ε2
μ 1/N μ 1/N
b ΩP 0.6918
2 =0.04381
The transfer function H(s) = 0.04381/[(s2+0.1814s+0.4165)
(s2+0.4378s+0.118)]
H(z) = H(s) | 2 1 z 1
s
T 1 z 1
0.001836(1 z 1 ) 4
(1 1.499z 1 0.8482z 2 ) ( 1 1.5548z 1
0.6493z 2 )
0.1 α
Impulse Invariance Method: cosh
10 p 1
1
Given data αp = 1 dB ; ωp = 0.2π, αs = 15 dB; ωs = 0.3π 10 0.1 α s 1
N 3.2
Ω
cosh -1 s
ΩP
ε (10 0.1 α P 1) 0.5 0.508 Let us take N 4
μ ε 1 1 ε 2 4.17 π (2k 1) π
φk k 1, 2,3,4
2 2N
φ 1 112.5 ; φ 2 157.5 ; φ 3 202.5 ;
The poles of a Chebyshev filter
φ 4 247.5 ;
μ 1/N
μ 1/N
a ΩP 0.229
2
s 1 a cos φ 1 jbsin φ 1 0.0876 j0.619
μ 1/N μ 1/N
b ΩP 0.67 s 2 a cos φ 2 jbsin φ 2 0.2115 j0.2564
2
s 3 a cos φ 3 jbsin φ 3 0.2115 j0.2564
s 4 a cos φ 4 jbsin φ 4 0.0876 j0.619
The denominator of H(s) =[(s+0.0876)2 +(0.619)2] [(s+0.2115)2 +(0.2564)2]
=(s2+0.175s+0.391) (s2+0.423s+0.11)
As N is even, the numerator of H(s) =(0.391) (0.11)/√1+ε2
=0.03834
The transfer function H(s) = 0.03834 / [(s2+0.175s+0.391) (s2+0.423s+0.11)]
A A
H(s) s ( 0.0876 j0.619) s ( 0.0876 j0.619)
B B
s ( 0.2115 j0.2564) s ( 0.2115 j0.2564)
Using Impulse invariant transform
0.083 0.0245z 1 0.083 0.0238z 1
H(z)
1 1.49z 1 0.839z 2 1 1.56z 1 0.655z 2
HOME WORK
FREQUENCY TRANSFORMATION
BASED IIR FILTER DESIGN
THANK YOU
ALL THE BEST