DSP Blockset Previous page   Next Page

Implementing a Lowpass Filter

The Digital Filter block, in the DSP Blockset Filter Designs library, is useful for implementing a digital FIR or IIR filter. In this example, you create a lowpass filter using the Digital Filter block.

To learn how to create a highpass filter, see Implementing a Highpass Filter. To design and implement a new filter, see Digital Filter Design Block:

  1. Define the lowpass filter coefficients in the MATLAB workspace by typing

  1. lopassNum = [-0.0021 -0.0108 -0.0274 -0.0409 -0.0266 0.0374 0.1435 0.2465 0.2896 0.2465 0.1435 0.0374 -0.0266 -0.0409 -0.0274 -0.0108 -0.0021]

    You could have calculated these values using

  1. Open Simulink and create a new model file.
  2. In the Simulink Model browser, double-click DSP Blockset.
  3. Double-click Filtering, and select the Filter Designs library.
  4. Click-and-drag a Digital Filter block into your model.
  5. Double-click the Digital Filter block.

  1. The Block Parameters: Digital Filter dialog box opens.

  1. Set the parameters to the values shown below.

  1. Note that you can provide the filter coefficients in several ways:

  1. Click OK.

The Digital Filter block in your model now represents a lowpass filter.


Previous page  Digital Filter Block Implementing a Highpass Filter Next page

Learn more about the latest releases of MathWorks products:

 © 1994-2010 The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS