Professional Documents
Culture Documents
Danilo P. Mandic
Department of Electrical and Electronic Engineering
Imperial College London
{d.mandic}@imperial.ac.uk
Danilo P. Mandic 1
Danilo P. Mandic 2
{z}
Complex zeros zk and poles pk Occurs in quadruples
zplane
occur in conjugate pairs. Occurs in conjugate pairs
with even multiplicity
Danilo P. Mandic 3
Danilo P. Mandic 4
Causal filters are normally assumed, hence IIR filters are commonly
written as:
M
P
aiz i
i=0 A(z 1 )
H(z) = N
P
= B(z 1)
, b0 = 1
1+ bj z j
j=1
Danilo P. Mandic 5
111
000 11
00000
111
000
111
000
111 00
11
00
11000
111
000
111
000
111 rad
00111
11000 rad
-2 - 2 -2 - 2
|H(e )| |H(e )|
Bandpass Filter Allpass Filter
111
000 1111
0000
000
111 0000
1111
000
111 0000
1111
000
111 rad
0000
1111 rad
-2 - 2 -2 - 2
|H(e )| ()
Highpass Filter Phase Characteristics
111
000
000
111
000
111
000
111 rad
rad
-2 - 2 -2 - 2 3
Danilo P. Mandic 6
Danilo P. Mandic 7
Im[z]
Unit Circle
Re[z]
a 1/a
Danilo P. Mandic 8
j
ej a 2 cos a j sin 2 1 2a cos + a2
2
|H1(e )| = = = =1
1 aej 1 a cos + aj sin 1 2a cos + a2
1 jk
The poles are at p1,2 = rk ejk and the zeros at z1,2 = rk e
Danilo P. Mandic 9
Im[z]
Unit Circle 1
X 1/r
X
Re[z]
r
Danilo P. Mandic 10
ej ( r1 )ejk ej ( r1 )ejk
|H2(ej )|2 = | k
|2| k
|2 (2)
ej rk ejk ej rk ejk
ej ( r1 )ejk ej ( r1 )ejk
where | k
ej rk ejk
2
| =| k
ej rk ejk
|2 = rk2
Hence
|H2(ej )|2 = rk4 = c (3)
where c is a constant, implying that it represents an all-pass filter.
Danilo P. Mandic 11
N
X 1
n
H(z) = h(n)z (4)
n=0
The filter will have linear phase response if the FIR digital filter satisfies
Danilo P. Mandic 12
N 3
X2
jn j(N 1n) ` N 1 j n[
(N 1)
]
= [h(n)e + h(N 1 n)e ]+h e 2
n=0
2
N 3
X2
jn j(N 1n) ` N 1 j n[
(N 1)
]
= h(n)[e +e ]+h e 2 (6)
n=0
2
N 3
X2
j[(N 1)/2] N 1
(N 1) (N 1)
j n[ ] j n[ 2 ] ]
= e h( )+ h(n)[e 2 +e
2 n=0
N 3
X2
j[(N 1)/2] N 1 N 1
= e h( )+ 2h(n) cos [(n )] (7)
2 n=0
2
Danilo P. Mandic 13
(N
2 1)
j j[(N 1)/2]
X N 1
H(e ) = e 2h(n) cos [(n )] (8)
n=0
2
N 1
() = (9)
2
which is linear for < .
N 1
() = () = (10)
2
which is constant for < .
Danilo P. Mandic 14
N
X 1
(N 1) N n1
H(z) = z h(n)z
n=0
N
X 1
H(z) = z (N 1)
h(N m 1)z m
n=0
N
X 1
(N 1) 1 m
= z h(m)(z ) (11)
n=0
(N 1) 1
= z H(z )
This means that zeros of H(z) are the zeros of H(z 1) except, perhaps, for the zeros at
origin.
Danilo P. Mandic 15
Im[z]
Unit Circle
Re[z]
a 1/a
Danilo P. Mandic 16
Im[z]
Unit Circle
Re[z]
Danilo P. Mandic 17
Im[z]
Unit Circle
i
Re[z]
i
Danilo P. Mandic 18
N
X 1
j2nk
e [ ]
H(k) = h(n)e N (12)
n=0
e
where H(k) is actually the uniformly spaced N-point sample sequence of the
frequency response of the digital filter. As a consequence, the impulse response
sequence h(n) and transfer function H(z) are given by
N 1
1 X e [
j2nk
]
h(n) = H(k)e N (13)
N k=0
and
N 1
1 X e 1 z N
H(z) = H(k) j2k
(14)
N k=0 1z e N ]
1 [
where equation (14) is the key to the design of FIR digital filter.
Danilo P. Mandic 19
Hd(ej ), H(k)
1
Hd(ej )
0 2
0 5 10 15 k
Danilo P. Mandic 20
e
H(0) e
= H(1) e
= H(15) =1
e
H(k) = 0 for k = 2, 3, 4, . . . , 14 (15)
15 e
1 X (1 z 16)H(k)
H(z) =
16 k=0 1 z 1e jk
8
1 z 16 1 1 1
= j0
+ j
+ j15
(16)
16 1
1z e 4 1
1z e 8 1
1z e 8
1 z 16 1 2(1 z 1 cos(/8))
= +
16 1 z 1 1 2z 1 cos(/8) + z 2
It can be be shown that the frequency response of (17) will be equal to the specifications
of (15) at the sampling frequencies = k
8 for k = 0, 1, 2, . . . , 15.
Danilo P. Mandic 21
hD (n) = h(n)w(n)
where w(n) is w(n) = 0 for n > N and n < 0.
Danilo P. Mandic 22
The windowing method has the effect of smoothing out the ripples and
overshoots in the original frequency response as shown in the figure for a
simple window function
Danilo P. Mandic 23
rad rad
2n
w(n) = 1 + cos for 0 n N 1
N
= 0 otherwise (19)
Danilo P. Mandic 24
Rectangular Window
w(n) = 1 for 0 n N 1
= 0 otherwise (20)
2n
w(n) = for 0 n (N 1)/2
N 1
2n
= 2 for (N 2)/2 n N 1 (21)
N 1
= 0 elsewhere
where N is even.
Danilo P. Mandic 25
Hann Window
1 2n
w(n) = 1 cos for 0 n N 1
2 N 1
= 0 elsewhere (22)
Hamming Window
2n
w(n) = 0.54 0.46 cos for 0 n N 1
N 1
= 0 elsewhere (23)
Danilo P. Mandic 26
Kaiser Window
q
N 1 2 N 1 2
I0 wa 2 n 2
w(n) = N 1
for 0 n N 1
I0 wa 2
= 0 elsewhere (25)
where I0(.) is a modified zeroth order Bassel function of the first kind
and wa is a window shaper parameter.
Danilo P. Mandic 27
15 20
10 10
5
0
Magnitude (dB)
Magnitude (dB)
0
10
5
20
10
30
15
40
20
25 50
30 60
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
Frequency (units of pi) Frequency (units of pi)
Danilo P. Mandic 28
1
PN 12
where N is the window length and U = n=0 |w[n]| is a constant,
N
and is defined so that PM () is asymptotically unbiased.
In Matlab:-
xw=x(n1:n2).*w/norm(w);
Pm=N * periodogram(xw);
w=hanning(N); w=bartlett(N);w=blackman(n);
Danilo P. Mandic 29
Hann window
w = 0.5 * (1 - cos(2*pi*(0:m-1)/(n-1)));
Hamming window
w = (54 - 46*cos(2*pi*(0:m-1)/(n-1)))/100;
Blackman window
w = (42 - 50*cos(2*pi*(0:m-1)/(n-1)) +
+ 8*cos(4*pi*(0:m-1)/(n-1)))/100;
Danilo P. Mandic 30
Danilo P. Mandic 31
Unlike IIR filters, FIR filters can be designed to have linear phase
characteristics.
FIR filters are, however, computationally more expensive than IIR filters
and hence are called for to perform tasks not possible/or not practical
by IIR filters such as linear phase, and multirate filters.
Danilo P. Mandic 32