Digital Signal Processing Reference
In-Depth Information
filter obtained from the Kaiser window is therefore the least expensive from the
implementation perspective.
For the design of optimal filters, M ATLAB has incorporated the firpm func-
tion, which has the following syntax:
fir coefficients = firpm(order,range norm cut off,
f response,wmatrix);
where the input argument order denotes the order of the FIR filter. The second
input argument rang norm cut off is a vector that specifies the edges of
the normalized cut-off frequency of the FIR filter. All elements of this vector
should have a value between zero and one. For a lowpass filter, the elements of
the rang norm cut off vector are given by
rang norm cut off = [0, pass band cut off, stop band cut off,
1];
The third input argument f response specifies the four gains of the FIR
filter at the four frequencies specified in the rang norm cut off vector. For
a lowpass filter, the value of the f response vector is given by
f response = [1, 1, 0, 0];
Finally, the fourth input argument wmatrix specifies the weight matrix. Since
wmatrix has one entry per band, it is half the length of rang norm cut off
and f response vectors.
Example 15.11 illustrates the design of an optimal FIR filter using the firpm
function.
Example 15.11
Examples 15.9 and 15.10 designed an FIR filter using rectangular. Ham-
ming, and Kaiser windows with a given set of design specifications. It was
shown in Example 15.10 that an FIR filter of length 47, designed using a
Kaiser window, satisfies the design specifications. Design the optimal FIR filter
of length 47 using the Parks-McClellan algorithm and compare the magni-
tude frequency response with that of the FIR filter obtained using the Kaiser
window.
Solution
The values of the normalized pass- and stop-band edge frequencies are given
by
10 3 ) / (0 . 5 2 π
8 10 3 )
normalized pass-band edge frequency p
= (3 π
= 0 . 375;
10 3 ) / (0 . 5 2 π
8 10 3 )
normalized stop-band edge frequency s
= (4 π
= 0 . 5 .
Search WWH ::




Custom Search