Digital Signal Processing Reference
In-Depth Information
Example 4.3: Implementation of Four Different Filters: Lowpass, Highpass,
Bandpass, and Bandstop ( FIR4types )
This example is similar to Example 4.2 and illustrates the GEL (slider) file to step
through four different types of FIR filters. Each filter has 81 coefficients, designed
with MATLAB's SPTool. The four coefficient files (on the accompanying CD) are:
1. lp1500.cof : lowpass with bandwidth of 1500 Hz
2. hp2200.cof : highpass with bandwidth of 2200 Hz
3. bp1750.cof : bandpass with center frequency at 1750 Hz
4. bs790.cof : bandstop with center frequency at 790 Hz
The program FIR4types.c (on the CD) implements this project. The program
FIR3LP.c (Example 4.2) is modified slightly to incorporate the implementation of
a fourth filter.
Build and run this project as FIR4types . Load the GEL file FIR4types.gel
(on the CD) and verify the implementation of the four different FIR filters. This
example can readily be expanded to implement more FIR filters.
Figure 4.16 shows the frequency response of the FIR bandstop filter centered at
790 Hz, using the coefficient file bs790.cof.
FIGURE 4.16. Frequency response of a FIR bandstop filter centered at 790 Hz using
bs790.cof , obtained with a signal analyzer.
Search WWH ::




Custom Search