590
Practical MATLAB
® Applications for Engineers
R.6.120 Type-1 FIR fi lter is defi ned by the following relation:
h(n) = h(N − n) for 0 ≤ n ≤ N − 1, with N = odd.
Then the amplitude response is given by
H (W)
a (n)cos(W )
n
1
1
ϭ
Ϫ
ր
ϭ
ր
e
jNW
n
N
2
0
2
∑
where a 1 (0) = h(N/2) is the mid-point and a 1 (n) = 2h((N/2) − n) for 1 ≤ n ≤ N/2.
Type-1 FIR fi lters can be used to design any fi lter type. The following sequence
illustrates a type-1 FIR fi lter:
h(n)
(n)
(n )
(n
)
(n 3)
(
ϭ
ϩ
ϩ
ϩ
Ϫ
Ϫ
Ϫ
Ϫ Ϫ
0.09
0.30
0.3593
2 0.30
0.09
1
n n
)
Ϫ 4
R.6.121 The type-2 FIR fi lter is defi ned by
h(n) = h(N − n) for 0 ≤ n ≤ N − 1, with N = even
then
H (W)
a (n)cos W(n
)
2
2
1 2
ϭ
Ϫ ր
Ϫ
ր
ϭ
ϩ ր
e
jNW
n
N
2
0
1 2
[
]
(
)
∑
where
a n
h
N
n
n
N
2 ( )
(
)
ϭ
ϩ
ϩ
2
1
2
1 2
1 2
Ϫ
ր
=
for
, , …
Since the response is defi ned for −π ≤ W ≤ π, then
H (W
)
2
0
ϭ ϭ
Therefore, type-2 FIR fi lters cannot be used to implement an HP or a BP fi lter.
The following sequence illustrates a type-2 FIR fi lter:
h(n) = −0.09δ(n) + 0.30δ(n − 1) + 0.3593δ(n − 2) + 0.3593δ(n − 3)
+ 0.30δ(n − 4) −0.09δ(n − 5)
R.6.122 The type-3 FIR fi lter is defi ned by
h(n) = −h(N − n) for 0 ≤ n ≤ N, with N = odd
H (W)
[a (n)sin(Wn)]
3
3
ϭ
Ϫ
ր
ր
ϭ
ր
e
e
jNW
j
n
N
2
2
1
2
∑
where a 3 (n) = 2h [
N
__
2
− n ] for n = 1, 2, … N/2)
CRC_47760_CH006.indd 590
CRC_47760_CH006.indd 590
7/23/2008 2:26:38 PM
7/23/2008 2:26:38 PM
Practical MATLAB
® Applications for Engineers
R.6.120 Type-1 FIR fi lter is defi ned by the following relation:
h(n) = h(N − n) for 0 ≤ n ≤ N − 1, with N = odd.
Then the amplitude response is given by
H (W)
a (n)cos(W )
n
1
1
ϭ
Ϫ
ր
ϭ
ր
e
jNW
n
N
2
0
2
∑
where a 1 (0) = h(N/2) is the mid-point and a 1 (n) = 2h((N/2) − n) for 1 ≤ n ≤ N/2.
Type-1 FIR fi lters can be used to design any fi lter type. The following sequence
illustrates a type-1 FIR fi lter:
h(n)
(n)
(n )
(n
)
(n 3)
(
ϭ
ϩ
ϩ
ϩ
Ϫ
Ϫ
Ϫ
Ϫ Ϫ
0.09
0.30
0.3593
2 0.30
0.09
1
n n
)
Ϫ 4
R.6.121 The type-2 FIR fi lter is defi ned by
h(n) = h(N − n) for 0 ≤ n ≤ N − 1, with N = even
then
H (W)
a (n)cos W(n
)
2
2
1 2
ϭ
Ϫ ր
Ϫ
ր
ϭ
ϩ ր
e
jNW
n
N
2
0
1 2
[
]
(
)
∑
where
a n
h
N
n
n
N
2 ( )
(
)
ϭ
ϩ
ϩ
2
1
2
1 2
1 2
Ϫ
ր
=
for
, , …
Since the response is defi ned for −π ≤ W ≤ π, then
H (W
)
2
0
ϭ ϭ
Therefore, type-2 FIR fi lters cannot be used to implement an HP or a BP fi lter.
The following sequence illustrates a type-2 FIR fi lter:
h(n) = −0.09δ(n) + 0.30δ(n − 1) + 0.3593δ(n − 2) + 0.3593δ(n − 3)
+ 0.30δ(n − 4) −0.09δ(n − 5)
R.6.122 The type-3 FIR fi lter is defi ned by
h(n) = −h(N − n) for 0 ≤ n ≤ N, with N = odd
H (W)
[a (n)sin(Wn)]
3
3
ϭ
Ϫ
ր
ր
ϭ
ր
e
e
jNW
j
n
N
2
2
1
2
∑
where a 3 (n) = 2h [
N
__
2
− n ] for n = 1, 2, … N/2)
CRC_47760_CH006.indd 590
CRC_47760_CH006.indd 590
7/23/2008 2:26:38 PM
7/23/2008 2:26:38 PM
