Linear-phase FIR filter can be divided into four basic types.
| Type |
impulse response |
| I |
symmetric |
length is odd |
| II |
symmetric |
length is even |
| III |
anti-symmetric |
length is odd |
| IV |
anti-symmetric |
length is even |
When
hn
h
n
is nonzero for
0≤n≤N-1
0
n
N
1
(the length of the impulse response
hn
h
n
is NN), then the
symmetry of the impulse response can be written as
hn=hN-1-n
h
n
h
N
1
n
(1)
and the anti-symmetry can be written as
hn=-hN-1-n
h
n
h
N
1
n
(2)
The frequency response of a length
N=5
N
5
FIR Type I filter can be written as follows.
H
f
ω=
h
0
+
h
1
ⅇ-ⅈω+
h
2
ⅇ-2ⅈω+
h
1
ⅇ-3ⅈω+
h
0
ⅇ-4ω
H
f
ω
h
0
h
1
ω
h
2
-2
ω
h
1
-3
ω
h
0
-4
ω
(3)
H
f
ω=ⅇ-2ⅈω
h
0
ⅇ2ⅈω+
h
1
ⅇⅈω+
h
2
+
h
1
ⅇ-ⅈω+
h
0
ⅇ-2ⅈω
H
f
ω
-2
ω
h
0
2
ω
h
1
ω
h
2
h
1
ω
h
0
-2
ω
(4)
H
f
ω=ⅇ-2ⅈω
h
0
ⅇ2ⅈω+ⅇ-2ⅈω+
h
1
ⅇⅈω+ⅇ-ⅈω+
h
2
H
f
ω
-2
ω
h
0
2
ω
-2
ω
h
1
ω
ω
h
2
(5)
H
f
ω=ⅇ-2ⅈω2
h
0
cos2ω+2
h
1
cosω+
h
2
H
f
ω
-2
ω
2
h
0
2
ω
2
h
1
ω
h
2
(6)
H
f
ω=Aωⅇⅈθω
H
f
ω
A
ω
θ
ω
(7)
where
θω=-2ω
θ
ω
-2
ω
Aω=2
h
0
cos2ω+2
h
1
cosω+
h
2
A
ω
2
h
0
2
ω
2
h
1
ω
h
2
Note that
Aω
A
ω
is real-valued and can be both positive and
negative. In general, for a Type I FIR filters of length
NN:
H
f
ω=Aωⅇⅈθω
H
f
ω
A
ω
θ
ω
Aω=hM+2∑n=0M-1hncosM-nω
A
ω
h
M
2
n
0
M
1
h
n
M
n
ω
(8)
θω=-Mω
θ
ω
M
ω
M=N-12
M
N
1
2
The frequency response of a length
N=4
N
4
FIR Type II filter can be written as follows.
H
f
ω=
h
0
+
h
1
ⅇ-ⅈω+
h
1
ⅇ-2ⅈω+
h
0
ⅇ-3ⅈω
H
f
ω
h
0
h
1
ω
h
1
-2
ω
h
0
-3
ω
(9)
H
f
ω=ⅇ-32ⅈω
h
0
ⅇ32ⅈω+
h
1
ⅇ12ⅈω+
h
1
ⅇ-12ⅈω+
h
0
ⅇ-32ⅈω
H
f
ω
-3
2
ω
h
0
3
2
ω
h
1
1
2
ω
h
1
-1
2
ω
h
0
-3
2
ω
(10)
H
f
ω=ⅇ-32ⅈω
h
0
ⅇ32ⅈω+ⅇ-32ⅈω+
h
1
ⅇ12ⅈω+ⅇ-12ⅈω
H
f
ω
-3
2
ω
h
0
3
2
ω
-3
2
ω
h
1
1
2
ω
-1
2
ω
(11)
H
f
ω=ⅇ-32ⅈω2
h
0
cos32ω+2
h
1
cos12ω
H
f
ω
-3
2
ω
2
h
0
3
2
ω
2
h
1
1
2
ω
(12)
H
f
ω=Aωⅇⅈθω
H
f
ω
A
ω
θ
ω
(13)
where
θω=-32ω
θ
ω
-3
2
ω
Aω=2
h
0
cos32ω+2
h
1
cos12ω
A
ω
2
h
0
3
2
ω
2
h
1
1
2
ω
In general, for a Type II FIR filters of length
NN:
H
f
ω=Aωⅇⅈθω
H
f
ω
A
ω
θ
ω
Aω=2∑n=0N2-1hncosM-nω
A
ω
2
n
0
N
2
1
h
n
M
n
ω
(14)
θω=-Mω
θ
ω
M
ω
M=N-12
M
N
1
2
The frequency response of a length
N=5
N
5
FIR Type III filter can be written as follows.
H
f
ω=
h
0
+
h
1
ⅇ-ⅈω-
h
1
ⅇ-3ⅈω-
h
0
ⅇ-4ω
H
f
ω
h
0
h
1
ω
h
1
-3
ω
h
0
-4
ω
(15)
H
f
ω=ⅇ-2ⅈω
h
0
ⅇ2ⅈω+
h
1
ⅇⅈω-
h
1
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-32ⅈω
h
0
ⅇ32ⅈω-ⅇ-32ⅈω+
h
1
ⅇ12ⅈω-ⅇ-12ⅈω
H
f
ω
-3
2
ω
h
0
3
2
ω
-3
2
ω
h
1
1
2
ω
-1
2
ω
(25)
H
f
ω=ⅇ-32ⅈω2ⅈ
h
0
sin32ω+2ⅈ
h
1
sin12ω
H
f
ω
-3
2
ω
2
h
0
3
2
ω
2
h
1
1
2
ω
(26)
H
f
ω=ⅇ-32ⅈωⅈ2
h
0
sin32ω+2
h
1
sin12ω
H
f
ω
-3
2
ω
2
h
0
3
2
ω
2
h
1
1
2
ω
(27)
H
f
ω=ⅇ-32ⅈωⅇⅈπ22
h
0
sin32ω+2
h
1
sin12ω
H
f
ω
-3
2
ω
2
2
h
0
3
2
ω
2
h
1
1
2
ω
(28)
H
f
ω=Aωⅇⅈθω
H
f
ω
A
ω
θ
ω
(29)
where
θω=-32ω+π2
θ
ω
-3
2
ω
2
Aω=2
h
0
sin32ω+2
h
1
sin12ω
A
ω
2
h
0
3
2
ω
2
h
1
1
2
ω
In general, for a Type IV FIR filters of length
NN:
H
f
ω=Aωⅇⅈθω
H
f
ω
A
ω
θ
ω
Aω=2∑n=0N2-1hnsinM-nω
A
ω
2
n
0
N
2
1
h
n
M
n
ω
(30)
θω=-Mω+π2
θ
ω
M
ω
2
M=N-12
M
N
1
2