Iir 2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

IIR FILTER DESIGN

1
Introduction
 IIR filters have infinite-duration impulse responses, hence they can be
matched to analog filters, all of which generally have infinitely long impulse
responses. Therefore the basic technique of IIR filter design transforms well-
known analog filters into digital filters using complex-valued mappings.
 The advantage of this technique lies in the fact that both analog filter design
(AFD) tables and the mappings are available extensively in the literature.
This basic technique is called the A/D (analogto-digital) filter transformation.
 However, the AFD tables are available only for lowpass filters. We also want
to design other frequency-selective filters (highpass, bandpass,
bandstop,etc.).
 To do this, we need to apply frequency-band transformations to lowpass
filters. These transformations are also complex-valued mappings, and they
are also available in the literature. There are two approaches to this basic
technique of IIR filter design

Hence in this IIR filter design technique we will follow the following steps:
• Design analog lowpass filters. 2
• Study and apply filter transformations to obtain digital lowpass filters.
• Study and apply frequency-band transformations to obtain other digital filters
from digital lowpass filters.
The IIR filter is responsible for the infinite duration of the
impulse response. The IIR filter is recursive system.

The general difference equation for an IIR digital:

M N
y (n)   bm x(n  m)   am y(n  m)
m 0 m 1

 ak is the k-th feedback tap depending on previous outputs.


If ak = 0 then the filter is a FIR.
 N is the number of feedback taps in the IIR filter.
 M is the number of feed-forward taps.

3
Where ε is a passband ripple
parameter,Ωp is the passband cutoff
frequency in rad/sec, A is a stopband
attenuation parameter, and Ωs is the
stopband cutoff in rad/sec. These
specifications are shown in Figure
from which we observe that
|Ha(jΩ)|2 must satisfy

The parameters ε and A are related to parameters Rp and As, respectively, of


the dB scale. These relations are given by

4
Rp is the passband ripple in dB
As is the stopband attenuation in dB.
Some Analog Filter Design Methods:

Butterworth ---- maximally flat amplitude.


Chepyshev type I ---- equiriple in the passband.
Chepyshev type II ---- equiriple in the stopband.
Elliptic ---- equiripple in both the passband and stopband.

5
Butterworth Lowpass Filters:
• Passband is designed to be maximally flat.
• The magnitude-squared function is of the
form

1  c The Cutoff frequency


Hc j 
2
H a s  
1
1  j / jc 
2
2N
1  s / jc 
2N
N The order of the filter

c N
Ha (s) 
(s  s k )
LHP poles

p ( 2k  N 1)
j
s k  c e 2N
, k  0,1,  2N  1

6
Steps to design Butterworth lowpass filters:
1. From the given specifications find the order of N
2. Round off it to the next higher integer

3. Find the transfer function H(s) for Ωc =1 for the value of N.

c N p ( 2k  N 1)
Ha (s) 
(s  s k )
j
s k  c e 2N
, k  0,1,  2N  1
LHPpoles

4. Find the value of

5. Find the value of transfer function Ha(s) for the above value of Ωc
by substituting ss/ Ωc
7
Chebyshev Filters:
• Equiripple in the  2
Hc j 
1

VN x  cosN cos1 x 
passband and 1  e2VN2  / c 
monotonic in the
stopband. 1
• Or equiripple in the
| H c ( j) | 
2

1  [e 2VN ( / c )]1
2
stopband and
monotonic in the
passband.
Type II
Type I

8
Design of IIR filters from analog filters
We want to design digital filters that meet desired specifications in
order to get as close to the ideal filter as possible. We will be looking at
obtaining H(ejω) from an analog filter H(jΩ) using the techniques of:

1. Impulse Equivalence Invariance


2. Bilinear Transform

Standard approach:
(1) Convert the digital filter specifications into an analogue
prototype lowpass filter specifications.
(2) Determine the analogue lowpass filter H a (s ) transfer function

(3) Transform H a (s) by replacing the complex variable to the


digital transfer function
G (z )
Pa ( s ) 9
H
Let an analogue transfer function be a ( s ) 
Da ( s )
where the subscript “a” indicates the analog domain
A digital transfer function derived from this is denoted as
P( z )
G( z) 
D( z )
 Basic idea behind the conversion of H a (s ) into G(z ) is to apply
a mapping from the s-domain to the z-domain so that essential
properties of the analog frequency response are preserved.
 Thus mapping function should be such that
 Imaginary ( j ) axis in the s-plane be mapped onto the unit
circle of the z-plane
 A stable analog transfer function be mapped into a stable
digital transfer function.
 Transform difference equations into algebraic equations that are easier
to solve
 Are complex-valued functions of a complex frequency variable

 Laplace: s =  + j 2 p f
 Z: z = r e j
 Transform kernels are complex exponentials: eigenfunctions of linear
time-invariant systems
 Laplace: e– s t = e– t – j 2 p f t = e– t e –j2pft
 Z: z–k = (r e j )–k = r–k e– j  k

10
Filter Design by Impulse Invariance:(MATLAB function:
impinvar)
In this design method we want the digital filter impulse response to
look “similar” to that of a frequency-selective analog filter. Hence we
sample ha(t) at some sampling interval T to obtain h(n); that is,

The parameter T is chosen so that the shape of ha(t)is “captured” by


the samples. Since this is a sampling operation, the analog and digital
frequencies are related by

z  e sT
11
• Preserve the shape of impulse response
z  e sT

Since the entire left half of the s-plane maps into the unit circle, a
12
causal and stable analog filter maps into a causal and stable digital
filter.
Design Procedure
p s
1. Choose Td and determine the analog frequencies  p  s 
Td Td

2. Design an analog filter H a (s) using specifications  p ,  s , R p , and As


N
H a s   
Ak
3. Partial fraction expansion
k 1 s  sk N
 Ak esk t t0
hc t   k 1
•Corresponding impulse response  0 t0

4. Transform analog poles {sk } into digital poles esk Td


N
to obtain transfer function H  z   
Td Ak
sk Td 1
k 1 1  e z 13
Filter Design by the bilinear transformation: (MATLAB
function: bilinear)
This mapping is the best transformation method; it involves a well-known
function given by
2 1  z 1 1  ( sT ) / 2
s z 
T 1  z 1 1  ( ST ) / 2
• Preserve the system function representation

Complex-plane mapping in bilinear transformation

 The entire left half-plane maps into the inside of the unit circle. Hence
this is a stable transformation.
 The imaginary axis maps onto the unit circle in a one-to-one fashion.
Hence there is no aliasing in the frequency domain.
14
Design Procedure

1. Choose T (set T=1) and determine the analog frequencies


2  2 
 p  tan( p )  s  tan( s )
T 2 T 2

2. Design an analog filter H a ( s) using specifications  p ,  s , R p , and As

2  1  z 1 
3. Bilinear transformation s  
1 
Td 1  z 

2  1  z 1 
H z   H a   
1 
 Td  1  z 

15
•We can solve the transformation for z as

1  Td / 2s 1  Td / 2  jTd / 2


z  s    j
1  Td / 2s 1  Td / 2  jTd / 2

• Maps the left-half s-plane into the inside of the unit-circle in z


• Stable in one domain would stay in the other
• On the unit circle the transform becomes
1  jTd / 2
z  e j
1  jTd / 2
• To derive the relation between  and 

2  1  e j  2  2e j / 2 j sin / 2 2 j  


s      j    j / 2  tan 
  j 
Td  1  e  Td  2e cos / 2 Td 2

Which yields 2    Td 


 tan  or   2 arctan 
Td 2  2 
16
Comparision between FIR and IIR Filters
FIR filter IIR Filter
1. The impulse response of the The impulse response of this filter
filter is restricted to finite extends over an infinite duration
number of samples
2. It is non-recursive type It is recursive type

3. FIR filters can have precisely These filters do not have linear
linear phase phase
4. Greater flexibility to control the Less flexibility specially for
shape of their magnitude obtaining non-standard frequency
response response
5. In these filters poles are fixed The poles are placed anywhere
at the origin, high selectivity inside the unit circle, high
can be achieved by using a selectivity can be achieved with
relatively high order for the low-order transfer functions
transfer function
6. Always stable Not always stable
7. Error due to round off noise are The round off noise in IIR filters
17
less severe in FIR filters, are more
mainly because feedback is not
used

You might also like