FIR Filter Design Window methodsite.iugaza.edu.ps/ahdrouss/files/2010/02/ch10-2.pdf · 2012. 3. 22. · Hamming Window Examples Example 2 a) Calculate the filter coefficients for
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
An ideal low-pass filter has a frequency response characteristics
The impulse response of this filter
As we can see h(n) is infinite and hence we need to truncate the higher coefficients.
٢
Slide ٣Digital Signal Processing
Paely-Weiner Theorem
٣
For practical implementation, the filter function should be causal.Paely – Weiner theorem summarize the conditions that should besatisfied to guarantee causality which are :
1. The frequency response H() cannot be zero except at afinite set of points at frequency.
2. The magnitude H() cannot be constant in any finite range offrequencies
3. The Transition between the passband and stopband cannot beinfinitely sharp .
4. Real part and Imaginary part of H() are interdependent byHilbert Transform.
Slide ٤Digital Signal Processing
Practical Filter
٣
Slide ٥Digital Signal Processing
FIR Filter
1
0
M
kknxkbny
122
110
MM zbzbzbbzH
A FIR system can be described by the following difference equation
The transfer function is given by
The impulse response is
Mbbbbnh ,,,, 210
Then H(z) can be expressed as
1
0
)(M
k
kzkhzH
Slide ٦Digital Signal Processing
In this type, the coefficients of impulse response are symmetric
And N = M-1 is even
Type I Symmetric FIR filter
nMhnh 1
Example: consider
But as h(0)=h(6), h(1)=h(5), h(2)=h(4)
65
4321
6543210
zhzhzhzhzhzhhzH
342516 32110 zhzzhzzhzhzH
٤
Slide ٧Digital Signal Processing
Or
Type I Symmetric FIR filter
3210 1122333 hzzhzzhzzhzzH
Converting to DTFT
3cos22cos13cos023 hhhheH j
R
j HeH 3
HR() is a real-valued function but it can be positive or negative, then the phase is given by
0303
R
R
HH
Slide ٨Digital Signal Processing
The result can be generalized
Type I Symmetric FIR filter
2/22/cos212/cos12/cos022/
NhNhNhNh
eH Nj
R
Nj HeH 2/
the phase is given by
02/02/
R
R
HNHN
٥
Slide ٩Digital Signal Processing
In this type, the coefficients of impulse response are symmetric
And N =M -1 is odd
Type II Symmetric FIR filter
nMhnh 1
After mathematic manipulation, we get
2/1
1
2/ 5.0cos212
N
n
Nj nnNheH
The phase is given by
02/02/
R
R
HNHN
Slide ١٠Digital Signal Processing
In this type, the coefficients of impulse response are anti-symmetric
And M =N -1 is even
Type III Symmetric FIR filter
nMhnh 1
After mathematic manipulation, we get
2/
1
2/ sin2
2N
n
Nj nnNheH
The phase is given by
02/02/
R
R
HNHN
٦
Slide ١١Digital Signal Processing
In this type, the coefficients of impulse response are anti-symmetric
And M =N -1 is even
Type IV Symmetric FIR filter
nMhnh 1
After mathematic manipulation, we get
2/1
1
2/ 5.0sin212
N
n
Nj nnNheH
The phase is given by
02/02/
R
R
HNHN
Slide ١٢Digital Signal Processing
Properties of Linear Phase FIR Filters
All the four type have constant group delay (linear phase)
2/Ndd
1. Type I FIR filters have either an even number of zeros or no zeros at z = 1 and z = −1.
2. Type II FIR filters have an even number of zeros or no zeros at z = 1 and an odd number of zeros at z = −1.
3. Type III FIR filters have an odd number of zeros at z = 1 and z = −1.
4. Type IV FIR filters have an odd number of zeros at z = 1 and either an even or odd number of zeros at z = −1.
٧
Slide ١٣Digital Signal Processing
Properties of Linear Phase FIR Filters
•Type I and II are suitable only for lowpass filters•Type III is suitable for designing bandpass filters•Type IV is used mainly for highpass and bandpass
Slide ١٤Digital Signal Processing
Window method
The magnitude responses of four ideal classical types of digital filters are shown in Figure.
٨
Slide ١٥Digital Signal Processing
An ideal low-pass filter has a frequency response characteristics:
To get FIR filter:
hLP (n) is truncated to be defined only between n = -N and n = N
This is equivalent to multiplying h(n) by w (n). Where
Windows method
0sin
0,
nnn
nnh
c
c
LP
otherwise,0
,1)(
NnNw
Slide ١٦Digital Signal Processing
Rectangular window
The resultant functions is given by
The new Hd (), will not be the same as the ideal H (). Gibbs phenomena is raised by this truncation of h(n). The overshot can be reduced by increasing M but the oscillation increases.
nhnwnh LPd
٩
Slide ١٧Digital Signal Processing
other windows
To reduce gibbs phenomena, researchers have use different type of windows such as
1) Bartlett windows
2) Hann Windows
3) Hamming windows
10;1212
1
MnM
Mnnw
101
2cos121
Mn
Mnnw
101
2cos46.054.0
Mn
Mnnw
Slide ١٨Digital Signal Processing
4) Blackman window
5) Kaiser window
6) Lanczose window
101
4cos08.01
2cos5.042.0
Mn
Mn
Mnnw
١٠
Slide ١٩Digital Signal Processing
4) Tukey window
Slide ٢٠Digital Signal Processing
Impulse response for HP, BP and BS Filers
The impulse response of the highpass, bandpass and bandstopare derived by the same method
0sin
0,
nnn
nnh
c
c
0sinsin1
0,
12
12
nnnn
nnh
cc
cc
0sinsin1
0,
21
12
nnnn
nnh
cc
cc
١١
Slide ٢١Digital Signal Processing
Examples
Example 1: Design a bandpass filter using hamming window of length 11. given that c1 = 0.2 and c1 = 0.6
04.0sin6.0sin10,4.0
nnnn
nnh
90102cos46.054.0
nnnw
Solution: M = 11 = 2N + 1
N =5.
substituting in h (n) for bandpass filter and w (n) for hamming window and shifting the result by 5