Digital Signal Processing Reference
In-Depth Information
1.
Depending on the nature of the magnitude response, we choose a value
for
M
and use (5.31), (5.34), (5.35), or (5.36) to compute the values of
the coefficients
C
LP
(n)
,
C
HP
(n)
,
C
BP
(n)
,or
C
BS
(n)
for
M
.
Then we choose a window function (Bartlett, Hamming, Hann, Kaiser,
or other window) and compute its values
w(n)
for
−
M
≤
n
≤
−
M
≤
n
≤
M
.Inthe
N/
2 from (5.44),
whereas he has derived a few other empirical formulas to estimate the
value of
N
, for designing FIR filters using other window functions.
3
Note
that we have to choose the lowest even integer
N
greater than the value
calculated from (5.44), since Kaiser's window is used for the design of
type I filters only.
2.
Then we multiply the coefficients
c(n)
and
w(n)
to get the values of
h
w
(n)
. The filter with these finite numbers of coefficients has a frequency
response given by
H
w
(e
jω
)
case of Kaiser's window, we find the value of
M
=
M)e
jωM
+
1
)e
j(
−
M
+
1
)ω
=
h
w
(
−
+
h
w
(
−
M
+
h
w
(M)e
−
jMω
.
3.
The next step is to multiply
H
w
(e
jω
)
by
e
−
jMω
, which is equivalent to
delaying the coefficients by
M
samples to get
h(n)
[i.e.,
h
w
(n
h
w
(
1
)e
jω
h
w
(
1
)e
−
jω
···+
+
h
w
(
0
)
+
+···+
=
h(n)
]. By delaying the product of
c(n)
and
w(n)
by
M
samples, we have
obtained a causal filter of finite length
(N
−
M)
+
1
)
with coefficients
h(n)
for
0
≤
n
≤
N
.
The procedure becomes a little better understood by considering Figure 5.7
(where a rectangular window has been used). Since
H
w
(e
jω
)
is a real function
of
ω
, its magnitude does not change when we multiply it by
e
−
jMω
.Nowwe
have an FIR filter
H(z
−
1
)
=
n
=
0
h(n)z
−
n
, which is causal and is of length
1
)
and has the same magnitude as
H
w
(e
jω
)
. Its phase response is
Mω
with an additional angle of
π
radians when
H
w
(e
jω
)
attains a negative real
value. Its group delay is a constant equal to
M
samples. This completes the
general procedure for designing an FIR filter that approximates the ideal magni-
tude response of a lowpass FIR filter; similar procedures are used for designing
highpass, bandpass, and bandstop filters. Let us illustrate this procedure by two
simple examples.
(
N
+
−
3
The formulas given by Kaiser may not give a robust estimate of the order for all cases of FIR filters.
A more reliable estimate is given by an empirical formula [10] shown below, and that formula is
used in the MATLAB function
remezord
:
F(δ
p
,δ
s
)
(ω
s
−
2
ω
p
)
D
∞
(δ
p
,δ
s
)
−
2
π
N
=
(ω
s
−
ω
p
)
2
π
=
a
1
(
log
10
δ
p
)
2
a
3
log
10
δ
s
−
a
4
(
log
10
δ
p
)
2
where
D
(δ
p
,δ
s
)
(when
δ
p
≥
δ
s
)
+
a
2
(
log
10
δ
p
)
+
+
∞
b
2
log
10
δ
p
−
log
10
δ
s
, with
a
1
=
0
.
005309,
a
2
=
0
.
07114,
a
3
=−
0
.
4761,
a
4
=
0
.
00266,
a
5
=
0
.
5941,
a
6
=
0
.
4278,
b
1
=
11
.
01217,
b
2
=
0
.
51244.
When
δ
p
<δ
s
, they are interchanged in the expression for
D
∞
(δ
p
,δ
s
)
above.
a
6
,and
F(δ
p
,δ
s
)
a
5
(
log
10
δ
p
)
+
=
b
1
+
Search WWH ::
Custom Search