Digital Signal Processing Reference
In-Depth Information
•
b
is a row vector containing the
N
+ 1 coefficients of the order
N
FIR
filter, whose frequency magnitude characteristics are given by the
vectors
f
and
H
.
•
f
is a vector of frequency points, specified in the normalized range
0
1.
•
H
is a vector containing the desired magnitude response at the points
specified in the vector
f
.
≤
f
≤
1, which corresponds to the digital frequency limit 0
≤
ω
≤
Method III. Optimization approach
The most widely used program is the
Parks-McClellan Algorithm
.
5
The design
procedure is as follows.
The difference equation of a
Nth order FIR
filter can be written as:
yn
()
=
bxn
()
+
bxn
(
−
1
)
+ …−
b xn M
M
(
)
0
1
) be the desired real-valued response of the FIR filter of order
m
.
The error term
E
(
Let
H
d
(
ω
ω
) is defined as
⎣
⎦
EWH H
d
()
ωωωωπ
=
()
()
−
(),-
≤≤
ωπ
where
W
(
) is a weighting factor.
If the designer attaches greater importance to the filter performance in a
certain range of frequencies, then the weighting factor is higher in those
frequency bands. The
optimization problem
is then stated as:
ω
⎣
⎦
Minimize
Max
E
()
ω
in the range
-
π
≤≤
ω
π
bn
()
which means that the values of the filter coefficients
b
(
n
)
, n
= 0, 1, …
N
are
to be chosen to minimize the maximum value of the error
E
(
π.
This optimization is done by the
Remez Exchange Method
. In MATLAB, the
command
>> b = remez(N,f,H)
returns a linear phase filter with the (
N
+ 1) coefficients
b
(
n
)
, n
= 0, 1, …
N
.
ω
)
, -
π
≤
ω
≤
•
The coefficients in the vector
b
are real and symmetric.
•
f
is a vector of frequency points, specified in the range
0
≤
f
≤
1,
1.
• The length of
f
and
H
must be the same and should be an even
number.
•
H
is a vector containing the desired magnitude response at the points
specified in the vector
f.
which corresponds to the digital frequency limit 0
≤
ω ≤