Digital Signal Processing Reference
In-Depth Information
FIR filter using Hamming window
FIR filter using Blackman window
20
20
0
0
−20
−20
−40
−40
−60
−60
−80
−80
−100
−100
−120
−120
0
0.5
1
1.5
2
2.5
3
0
0.5
1
1.5
2
2.5
3
(a)
(b)
Fig. 15.19. FIR filter design for
Example 15.9 using M ATLAB .
(a) Hamming window
(b) Blackman window.
>> H black = freqz(h black,1,w); % transfer function
>> plot(w,20*log10(abs(H black))); % magnitude response
>> axis([0 pi -120 20]); % set axis
>> title('FIR filter using Blackman window');
>> grid on
The magnitude response of the FIR filter obtained with the Blackman window is
shown in Fig. 15.19(b). On comparing with Fig. 15.19(a), we note that the stop-
band attenuation in Fig. 15.19(b) is higher. The improvement in the stop-band
attenuation is the result of the shape of the Blackman window.
Although the above example uses only the Hamming and Blackman windows,
any of the elementary windows covered in Section 15.1 can be used by speci-
fying the appropriate window coefficients in the fir1 function.
Example 15.10
Design the lowpass FIR filter considered in Example 15.3 using the Kaiser
window. Sketch and compare the magnitude response of the resulting FIR filter
with those of the FIR filters obtained in Example 15.3.
Solution
As shown in Example 15.3, the normalized cut-off frequency n
= 0 . 4375 and
the normalized transition bandwidth n
= 0 . 1250. The design parameters for
the Kaiser window were calculated as β = 4 . 5513 and N = 47.
The M ATLAB code for the design of the FIR filter using the Kaiser window
is similar to the M ATLAB code in Example 15.9. The major difference is in the
fir1 instruction, where the window argument is now replaced by the kaiser
Search WWH ::




Custom Search