Digital and Filter Design Thanks in advance for any help The
Digital and Filter Design.
Thanks in advance for any help!
Solution
Design of FIR Filters
An FIR filter of length M is an LTI system with the following difference equation1
:
y[n] =
M
X1
k=0
bk x[n k] .
Note that the book changes the role of M here. Earlier, when discussing rational system functions, M was the number of zeros.
Now M is the number of “nonzero” elements of h[n], which corresponds to at most M 1 zeros. (More precisely, we assume
bM1 6= 0 and b0 6= 0, but some of the coefficients in between could be zero.)
The problem: given 1, 2, c, and s, we wish to choose M and {bk}
M1
k=0 to achieve that goal.
We focus on linear-phase FIR filters, because if linear phase is not needed, then IIR is probably preferable anyway.
We focus on lowpass filters, since transformations can be made to form highpass, bandpass from lowpass, as discussed previously.
Impulse response
Clearly for an FIR filter
h[n] =
bn, n = 0, . . . , M 1
0, otherwise.
So rather than writing everything in terms of bk’s, we write it directly in terms of the impulse response h[n].
In fact, for FIR filter design we usually design h[n] directly, rather than starting from a pole-zero plot.
(An exception would be notch filters.)
8.2.1 Symmetric and antisymmetric FIR filters
I focus on the symmetric case.
System function:
H(z) =
M
X1
n=0
h[n] z
n
.
How do we make a filter have linear phase?
We previously answered this in the pole-zero domain. Now we examine it in the time domain.
An FIR filter has linear phase if h[n] = h[M 1 n], n = 0, 1, . . . , M 1.
Example. For M = 5: h[n] = {b0, b1, b2, b1, b0} .
Such an FIR filter is called symmetric. Caution: this is not “even symmetry” though in the sense we discussed previously.
This is related, but not exactly the same as circular symmetry.
Example. For M = 3 and h[n] =
n
1/2, 1, 1/2
o
. Does this filter have linear phase? Is it lowpass or highpass?
H() =
1
2
+ e
+
1
2
e
2 = e
1
2
e
+ 1 +
1
2
e
= e
(1 + cos ),
so since 1 + cos 0, H() = , which is linear phase.
So it works for this particular example, but why does the symmetry condition ensure linear phase in general?
1Caution. At this point the book switches from PM
k=0 to PM1
k=0 apparently. This inconsistent with MATLAB, so there are “M 1” factors that appear
frequently in the MATLAB calls. I think that MATLAB is consistent and the book makes an undesirable switch of convention here.

