16 IIR Filter Design
16 IIR Filter Design
16 IIR Filter Design
Discussion #16
IIR Filter Design
Tarun Choubisa
Dept of ETC,
KIIT University
12 April 2011 1
Introduction
•Analog filter design theory was developed in
the mid-1900’s.
•As digital signal processing developed, it
seemed reasonable to leverage existing
knowledge in analog filter design.
•Our strategy will be to design the filter in the
analog domain, and then transform the filter
to the digital domain.
Introduction
• IIR filter design methods
Normalized analog
lowpass filter
Continuous frequency
band transformation
IIR filter
Feb.2008 3
IIR Filter Design by Impulse invariance method
• And thus N
Ak
H ( z) sk T 1
k 1 1 e z
Feb.2008 5
IIR Filter Design by Impulse invariance method
• Example: s a
H c ( s)
( s a) 2 b 2
Expanding in a partial fraction
expansion, it produce 1/ 2 1/ 2
H c ( s)
s a jb s a jb
ej
1
a0 a1Z
H ( z) 1 2
1 b1Z b2 Z
0
e-j
7
Filter Coefficients
• Output frequency 0
• Cosine wave: h(n) = cos( 0T) u(n)
– a0 = 1, a1 = cos( 0T)
– b1 = 2cos( 0T), b2 = -1
• Sine wave: h(n) = sin( 0T) u(n)
– a0 = 0, a1 = sin( 0T)
– b_1 = 2cos( 0T), b2 = -1
8
Effect of Coefficient Quantization
9
Effect of Coefficient Quantization
Im
Z plane Direct Form
Implementation (3 bits
+ sign bit)
rad. 0 rad. Re
-1.0 -0.5 0 0.5 1.0
Coefficient quantization can change the pole locations and hence the output frequency
After quantization
unstable IIR filter
1
H ( z) 1 2
1 1.85 z 0.85 z
Effect of Coefficient Quantization
%Demonistration for the effect of quantization of filter
coefficients
L=100; %L is the length of the impulse response h[n]
num=[1];
den=[1 -1.845 0.850586];
den2=[1 -1.85 0.85]
[h1 t]=impz(num,den,L);
subplot(2,1,1);
stem(h1); This program draws the
ylabel('Amplitude'); previous impulse
xlabel('Time index n'); response that shows the
[h2 t]=impz(num,den2,L);
subplot(2,1,2); effect of quantization on
stem(h2); the system stability.
ylabel('Amplitude');
xlabel('Time index n');
IIR Filter Design by Impulse invariance method
esT
Re(Z)
S domain Z domain
Feb.2008 13
Complex-plane mapping in impulse invariance transformation
N Rk
H ( z) k 1
1 e pk T z 1
IIR Filter Design by Impulse invariance method
• Example:
s a
H c ( s)
( s a) 2 b 2
Expanding in a partial fraction
expansion, it produce 1/ 2 1/ 2
H c ( s)
s a jb s a jb
2 r2 1
T 1 r 2 2r cos
2 2r sin
T 1 r 2 2r cos
• To understand the implications on frequency response, set r = 1 and =0:
2 sin 2
tan
T 1 cos T 2
1 T
2 tan
2