You are on page 1of 50

Infinite Impulse

Response Filters
By
Dr Hariharan Muthusamy
School of Mechatronic Engineering
Universiti Malaysia Perlis

Introduction
A digital filter is a linear time invariant 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 input sample and previous input samples.
In IIR filter design, the present output sample depends on the
present input, past input samples and output samples.
The Impulse response for realizable filter and The stability
condition must satisfy.

The IIR digital filters have the transfer function form

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:
Map desired
digital filter specifications into equivalent analog
filter.
Derive analog transfer function for the analog prototype.
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 output.

Process and generates digital data

Constructed from active or passive


electronic components.

Consist of elements: adder, multiplier


and delay unit.

The frequency response modified by


changing the components.

The frequency response changed by


changing the filter coefficient.

Described using differential equation.

Described by difference equation.

Advantages:
not influence by component aging, temperature and power variation.
Highly immune to noise and parameter stability and can operated over wide range of
frequencies.
no problem input and output impedance matching. Coefficient also can be
programmed
and
altered
anytime
to
obtain
desired
characteristic.
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 lowpass
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) .

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 btw two frequency variable
in two domain.
The lefthalf plane of the s-plane should map into the inside of the
unit circle in the z-plane. Thus, 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 = eT, = T.
Therefore, analog is mapped to a place in the z =plane of magnitude
eT 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 zplane at a radius r=e0.T=1.
Therefore,the impulse invariance
had map poles from the s-planes
j -axis to z-planes unitcircle.
2nd case
Consider pole on lefthalf s-plane
where < 0.Therefore, all splane poles with negative real
parts map to z-plane poles inside
the unit circle stable analog
poles are mapped to stable
digital poles. Bcoz r= eT<1 for
<0.

Unstable pole mapping occur when all poles at right half of the splane 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 ,

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
From the given specifications,find prewarping analog frequencies using formula

Using the analog frequencies, find H(s) of analog filter

Select the sampling rate of the digital filter, call T seconds per sample.
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

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


function of past outputs,
past and present input.
Correspond to IIR digital
filter.

Current output sample y(n)


is a function of only past
and present inputs.
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

H1(z) can be realize in direct form II,

>Similarly,H2(z) can be realize n


Direct form II

Cascading the realization of


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

H(j )

1

1 2 C N2
P

N 1, 2, .......

- - - - - (1)
Where is a parameter of the filter
related to the ripple in the passband

C N (x) cos(Ncos 1 x), | x | 1 (Passband)

CN(x) is the Nth order Chebyshev


polynominal

C N (x) cosh(Ncosh 1 x) ,| x | 1 (Stopband)

Taking log for Eq(1), we get


20 log H(j ) 10 log 1 10 log 1 2 C N2
P

( 2)
P 10 log (1 )
2

(10

0.1 p

C N (1) 1

1) 0.5
(3)

At = s, Eq (2) can be
written as

s 10 log 1 2 C N2 s
P

(4)

2
1
s

10 log 1 cosh Ncosh
1

P
P

Substituting Eq(3) for in Eq(4), solving for N

0.1

10 p 1
cosh
10 0.1 s 1
N

cosh -1 s

Pole locations for Chebyshev Filter

1 1 2
The poles of a Chebyshev

filter

1/N 1/N
a P

1/N 1/N
bP

(2k 1)
k
k 1, 2, ..., N
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
0.1 P
1
2
a P
bP
1

Where 1 10
2
2

P Passband Frequency
p Maximum allowable attenuation in the pass band

4.

Calculate the poles of Chebyshev filter which lie on the ellipse


by using the formula
k

(2k 1)
k 1, 2, ..., N

2
2N

s k a cos k jbsin k
5.
6.

Find the denominator polynomial of the transfer function using


above poles.
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 denominator 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
0.1

10 p 1
cosh
10 0.1 s 1
N
4.536
-1 s
cosh
P
1

N= 5
(10

0.1 P

1
The

1)

0.5

(2k 1)
k 1, 2, ..., 5

2
2N
1 180 ; 2 144 ; 3 180 ;
k

4 216

0.508

1 2 4.17

poles of a Chebyshev

1/N 1/N
a P
2

1/N 1/N
bP
2

; 5 252

s 1 a cos 1 jbsin 1 89.5 j989

filter

289.5

1041

s 2 a cos 2 jbsin 2 234.2 j612


s 3 a cos 3 jbsin 3 289.5
s 4 a cos 4 jbsin 4 234.2 j612
s 5 a cos 5 jbsin 5 89.5 j989

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:
Find N

0.1

10 p 1
cosh
10 0.1 s 1
N
1.91
-1 s
cosh
P
1

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

1 1 2 2.414
The poles of a Chebyshev filter
1/N 1/N
a P
910
2

1/N 1/N
bP
2197
2

(2k 1)
k 1, 2

2
2N

k 135
2 4
3
k
225
2
4
s 1 a cos 1 jbsin 1 643.46 j1554
k

s 2 a cos 2 jbsin 2 643.46 j1554

The

denominator of H(s) = (s+643.46)2 +(1554)2

The

numerator of H(s) =(643.46)2 +(1554)2/1+2

=(1414.38)22
The transfer function H(s) = (1414.38)22/ (s2+1287s+(1682)22

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 ; p = 0.2, s = 15 dB; s = 0.3
Prewarped frequencies are given by

p
2
0.2
tan
2tan
0.65
T
2
2

0.3
2
tan s 2tan
1.02
2
2
T

0.1

p
1
1 10
cosh
10 0.1 s 1
N
3.01

cosh -1 s
P

Let us take N 4
(10

0.1 P

1)

0.5

0.508

4.17

(2k 1)

k 1, 2,3,4
2
2N
1 112.5 ; 2 157.5 ; 3 202.5 ;
k

4 247.5 ;
s1 a cos 1 jbsin 1 0.0907 j0.639
s 2 a cos 2 jbsin 2 0.2189 j0.2647
s 3 a cos 3 jbsin 3 0.2189 j 0.2647
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]


1/N 1/N
a P
0.237
2

1/N 1/N
bP
0.6918
2

[(s+0.2189)2 +(0.2647)2]
=(s2+0.1814s+0.4165) (s2+0.4378s+0.118)
As N is even, the numerator of H(s) =(0.4165)
(0.118)/1+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 )

Impulse Invariance Method:

0.1

Given data p = 1 dB ; p = 0.2, s = 15 dB; s = 0.3

Let us take N 4

(10 0.1 P 1) 0.5 0.508


1 1 2 4.17
The poles of a Chebyshev filter

a P

1/N
bP

1/N

1/N

1/N
2

0.229

0.67

10 p 1
cosh
10 0.1 s 1
N
3.2

cosh -1 s
P
1

(2k 1)

k 1, 2,3,4
2
2N
1 112.5 ; 2 157.5 ; 3 202.5 ;
k

4 247.5 ;
s1 a cos 1 jbsin 1 0.0876 j0.619
s 2 a cos 2 jbsin 2 0.2115 j0.2564
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.0238z 1
0.083 0.0245z 1
H(z)

1 1.49z 1 0.839z 2 1 1.56z 1 0.655z 2

You might also like