Académique Documents
Professionnel Documents
Culture Documents
Objective:
FIR, Finite Impulse Response, filters are one of the primary types of filters
used in Digital Signal Processing. FIR filters are said to be finite because
they do not have any feedback. Therefore, if you send an impulse through
the system (a single spike) then the output will invariably become zero as
soon as the impulse runs through the filter. There are four types of filter as
low pass filter (LP), high pass filter (HP), band stop filter (BS) and band pass
filter (BP). Here I have decided to design a high pass filter by using Window
Method (Kaiser Window method, Hamming Window Method and Blackman
Window) and Remez Algorithm Method.
Filter Specification:
A filter transfer function H(w) consists of the magnitude response and the
phase response verses frequency function. To design a FIR high pass filter
there are some specification is needed. The specifications are- sampling
frequency (fS), cutoff frequency (fC), transition width as (f), attenuation (A),
length of FIR filter (N), ideal transfer function H i(n) and the window function
w(n). Here a low pass filter is given as follows
Here,
hi (n)=
(n )
C (n )
h ( n )=
hi ( n ) (n)
[Transfer
Function
with
Transfer Window]
Methods:
There are four types of methods are available to design a FIR filter. Those are
1.
2.
3.
4.
Window Method
LS Method
Equiripple filter design method
Remez algorithm
Rectangular Window
Triangular Window
Hamming Window
Hanning Window
Kaiser Window
Blackman Window
Here is a brief discussion about the window of the six Window methodsNames of the
Windows
Rectangular
( n)
Triangular
No specified equation
Hamming
2 n
N 1
( n)
Hanning
otherwise
2 n
N 1
.5 .5 cos
( n)
0nN
0n N
otherwise
Kaiser
(n) =
({
2 1
2
( )})
n
I 0 1
0 n N 1
I0 ( )
0 otherwise
Design Parameters:
Kaiser Window Method (Reference - FIR Filter Design Using the Window
Method, Example- 9.5.2)
To design a FIR low pass filter by using the Kaiser Window method I have
used the following parametersfS = 1000
Frequency ]
fC = 250
Frequency ]
f = 50
width ]
= 0.001
[Sampling
[Cut off
[ Transition
W ( n )=
Here,
({
2 1
2
( )})
n
I 0 1
I0 ( )
.1102( A 8.7);
A 50
A8
N = 1+ 2.285 w
N 1
2
Results:
fS = 1000
1.0000e-003
A = 60
fC(norm) = 0.2500
fC = 250
f = 50
= 5.6533
f(norm) = 0.0500
= 36.2191
wC = 1.5708
N = 73.4381
w = 0.3142
0.0557
0.0715
0.0893
0.1094
0.1316
0.3454
0.3830
0.4217
0.4613
0.5016
0.7777
0.8124
0.8449
0.8750
0.9024
0.9999
0.9988
0.9938
0.9850
0.9724
0.7932
0.7574
0.7200
0.6813
0.6415
0.3617
0.3250
0.2898
0.2563
0.2247
Columns 67 through 73
0.1189 0.0979 0.0790
0.0624
0.0478
0.0352
0.0245
1
0.8
w(n)
0.6
0.4
0.2
0
-0.2
-0.4
0
10
20
30
40
50
60
W ( n )=
({
2 1
2
( )})
n
I 0 1
I0 ( )
70
0.5
0.5
Hi(w)
1
0
hi(n)
w(n)
0.5
0
0
20
40
-0.5
60
20
(w)))
20
-20
angle((H
20*log10(H
(w))
n
Magnitude response of hi(n) at log scale
-40
20
40
60
n
Phase response of hi(n)
-20
100
500
20*log10(H(w))
0
100
200 300
Frequency
400
500
500
20
40
60
n
Phase response of h(n)
-50
-100
0
400
-0.5
100
0.5
200 300
Frequency
-40
100
0.5
-60
-60
H(w)
h(n)
angle(H(w))
-0.5
-50
-100
0
100
200 300
Frequency
400
500
100
200 300
Frequency
400
500
Figure 10: All the output plots for Kaiser window method
Hamming Window Method (Reference Same parameters as Kaiser
Window)
0.0955
0.1074
0.1226
0.1409
0.1622
Columns 12 through 22
0.2740
0.3075
0.3427
0.3795
0.4174
0.4563
0.5755 0.6151 0.6541
Columns 23 through 33
0.6923
0.7293
0.7649
0.7989
0.8308
0.8606
0.9347 0.9537 0.9695
Columns 34 through 44
0.9822
0.9915
0.9974
0.9999
0.9989
0.9945
0.9610 0.9434 0.9227
Columns 45 through 55
0.8992
0.8729
0.8442
0.8131
0.7800
0.7451
0.6323 0.5929 0.5531
Columns 56 through 66
0.5132
0.4735
0.4344
0.3960
0.3587
0.3227
0.2257 0.1978 0.1725
Columns 67 through 73
0.1499 0.1302 0.1137 0.1003 0.0902 0.0836 0.0803
0.4958
0.5356
0.8880
0.9127
0.9867
0.9755
0.7087
0.6710
0.2884
0.2560
Plots of the FIR high pass filter by using the given parameters are shown
as followsWindow Function for Hamming method w(n)
1
0.8
w(n)
0.6
0.4
0.2
0
-0.2
-0.4
0
10
20
30
40
50
60
70
N 1
( n)
otherwise
0.5
0.5
Hi(w)
1
0
hi(n)
w(n)
0nN
0.5
0
0
20
40
-0.5
60
20
(w)))
20
-20
angle((H
20*log10(H
(w))
n
Magnitude response of hi(n) at log scale
-40
20
40
60
n
Phase response of hi(n)
-20
100
500
20*log10(H(w))
0
100
200 300
Frequency
400
500
500
20
40
n
Phase response of h(n)
60
-50
-100
0
400
-0.5
100
0.5
200 300
Frequency
-40
100
0.5
-60
-60
H(w)
h(n)
angle(H(w))
-0.5
-50
-100
0
100
200 300
Frequency
400
500
100
200 300
Frequency
400
500
Figure 12: All the output plots for Hamming window method
0.0852
0.4951
0.8194
0.7994
0.4751
0.1256
0.8
w(n)
0.6
0.4
0.2
-0.2
-0.4
0
10
20
30
40
50
60
2 n
24 n
.08 cos
N 1
N 1
( n)
0n N
otherwise
70
0.5
0.5
Hi(w
)
1
0
hi(n)
w
(n)
0.5
0
0
20
40
-0.5
60
20
(w
)))
20
-20
angle((H
20*log10(H
(w
))
n
Magnitude response of hi(n) at log scale
-40
20
40
n
Phase response of hi(n)
60
-20
100
500
20*log10(H
(w
))
0
100
200 300
Frequency
400
500
500
20
40
60
n
Phase response of h(n)
-50
-100
0
400
-0.5
100
0.5
200 300
Frequency
-40
100
0.5
-60
-60
H
(w
)
h(n)
angle(H
(w
))
-0.5
-50
-100
0
100
200 300
Frequency
400
500
100
200 300
Frequency
400
500
Figure 12: All the output plots for Blackman window method
[ A vector of frequency
[ A real vector the same
Remez Algorithm
0.8
0.7
R eal V ec tor
0.6
0.5
0.4
0.3
0.2
0.1
0
-0.1
-0.2
2
8
10
Frequency
12
14
16
Discussion:
This project paper is summarizes the various equation which is used to
design a FIR high pass filter. Here the high pass filter is designed by using
the Kaiser Window method, hamming window method, Blackman window
method and Remez algorithm method. All the outputs are same for each
method but for Blackman window method there is a slide difference from the
others. By using the equations we can design any kinds of filter in Window
method. By changing the ideal transfer function we can compute the other
filters as High pass (HP) filters, Band stop (BS) filters and Band pass (BP)
filters. At last all the necessary statement has been given as above and other
documents have been attached with the report as follows.
Project
Submitted To
Kamrul Hassan
Submitted By
Imran Ahmed
ID: 2006-2-80-052
Date of Submission:
02.12.2008