| Signal Processing Blockset™ | ![]() |
Filtering / Filter Designs
dsparch4
Note Use this block to implement fixed-point or floating-point digital filters using Sum, Gain, and Delay blocks or the Digital Filter block. You can either design a filter by using the block's filter design and analysis parameters, or import the coefficients of a filter you have designed elsewhere. The following blocks also implement digital filters, but serve slightly different purposes:
|
The Filter Realization Wizard is a tool for automatically implementing a digital filter. You must specify a filter, its structure, and the data types for the filter's inputs, outputs, and computations. The filter can support double-precision, single-precision, or fixed-point data types.
The Filter Realization Wizard can implement a digital filter in one of two ways. It can use a Digital Filter block, or it can create a subsystem block that implements the specified filter using Sum, Gain, and Delay blocks. If the Filter Realization Wizard creates a Digital Filter block, double-click the block to open the Block Parameters: Filter dialog box. If it creates a subsystem, double-click the subsystem block to see the filter implementation as shown in the figure below.

The subsystem block applies the specified filter to any sample-based input signal, or any frame-based row vector signal, and outputs the result. For more information about filter implementation, see Specifying the Filter Implementation.
The parameters of the Filter Realization Wizard are a part of a larger GUI, the Filter Design and Analysis Tool (fdatool), from the Signal Processing Toolbox product. You can use the tools in FDATool to design and analyze your filter, and then use the Filter Realization Wizard parameters to implement the filter in your models.
When the Filter Realization Wizard implements the specified filter by creating a new subsystem block, the block applies the specified filter to an input signal and outputs the result.
The subsystem block accepts inputs that are
Sample-based vectors and matrices
Frame-based row vectors (nonrecursive structures only)
The output of the subsystem block has the same dimensions and frame status as the input.
The subsystem block treats each element of a vector or matrix as an independent channel.
To specify a purely double-precision filter, you can either design a filter using the Design Filter panel, or import a filter using the Import Filter panel. (You can import dfilt filter objects as well as vectors of filter coefficients designed using Signal Processing Toolbox functions and Filter Design Toolbox functions.)
You can also specify a fixed-point filter or a single-precision filter. You can specify such filters by using the Set Quantization Parameters panel, which requires the Filter Design Toolbox product.
Note Running a model containing implementations of fixed-point filters requires the Simulink Fixed Point product, but you can still edit models containing such filter implementations without it. See the Simulink Fixed Point documentation for more information. |
See the following topics to learn how to use the panels to specify your filter:
For more information on the Design Filter panel, see FDATool: A Filter Design and Analysis GUI in the Signal Processing Toolbox documentation.
For more information on the Import Filter panel, see "Importing a Filter Design" in the Signal Processing Toolbox documentation.
For more information on the Set Quantization Parameters panel, see Switching FDATool to Quantization Mode in the Filter Design Toolbox documentation.
To open a panel, click the appropriate button in the lower-left corner of FDATool.

The Filter Realization Wizard supports the following structures:
Direct form I
Direct form I, second-order sections
Direct form I transposed
Direct form I transposed, second-order sections
Direct form II
Direct form II, second-order sections
Direct form II transposed
Direct form II transposed, second-order sections
Direct form FIR
Direct form FIR transposed
Direct form symmetric FIR
Direct form antisymmetric FIR
Lattice all-pass
Lattice AR
Lattice ARMA
Lattice MA for maximum phase
Lattice MA for minimum phase
Cascade
Parallel
You can determine how the Filter Realization Wizard models the specified filter using the Build model using basic elements check box. When you select this check box, the Filter Realization Wizard creates a subsystem block that implements your filter using Sum, Gain, and Delay blocks. When you clear this check box, the Filter Realization Wizard uses a Digital Filter block to implement your filter. The Build model using basic elements check box is only available when your filter can be implemented using a Digital Filter block.
If you have Signal Processing Blockset software, Signal Processing Toolbox software, and Filter Design Toolbox software installed on your system, the Filter Realization Wizard can generate a subsystem that represents either a double-precision or fixed-point filter. You must install the Simulink Fixed Point product to simulate a fixed-point filter. You can still edit the blocks used to implement the filter without installing the Simulink Fixed Point product.
Implementations of Double-Precision and Fixed-Point Filters

The Signal Processing Toolbox dfilt (digital filter) object in has a method, realizemdl, that allows you to access the capabilities of the Filter Realization Wizard from the command line.
For more information about the realizemdl method, see the following:
The topic on "Methods" in the dfilt reference page in the Signal Processing Toolbox documentation
The realizemdl reference page in the Filter Design Toolbox documentation
Note The following parameters for the Filter Realization Wizard are in the Realize Model pane of the Filter Design and Analysis Tool (FDATool) GUI. To open different panels of FDATool, click the different buttons at the lower-left corner. For more information about relevant panels, see Specifying the Filter and Its Data Type Support. |

Specify where the new filter block should be created. This can be in a new model or in the current (most recently selected) model.
Enter the name of the new filter block.
When selected, the block overwrites any filter block in the current model with the name specified in the Block Name parameter. This parameter is enabled when the Destination parameter is set to Current.
Select this check box to implement your filter using Sum, Gain, and Delay blocks. Clear this check box to implement your filter using the Digital Filter block. This parameter is only available when your filter can be modeled using the Digital Filter block.
Note that when your filter is implemented using Sum, Gain, and Delay blocks, inputs to the filter must be sample based.
When selected, the block removes zero-gain paths from the filter structure. For an example, see Optimizing the Filter Structure.
When selected, the block substitutes gains equal to 1 with a wire (short circuit). For an example, see Optimizing the Filter Structure.
When selected, the block substitutes gains equal to -1 with a wire (short circuit), and changes the corresponding sums to subtractions. For an example, see Optimizing the Filter Structure.
When selected, the block substitutes any delay chains made up of n unit delays with a single delay by n. For an example, see Optimizing the Filter Structure.
Click to create a subsystem block that implements the specified filter using Sum, Gain, and Delay blocks. To see the filter implementation, double-click the subsystem block. The subsystem block applies the specified filter to any sample-based input signal or frame-based row vector signal, and outputs the result.
Note For more information about relevant parameters in other panels of FDATool, see Specifying the Filter and Its Data Type Support. |
Oppenheim, A. V. and R. W. Schafer. Discrete-Time Signal Processing. Englewood Cliffs, NJ: Prentice Hall, 1989.
Proakis, J. and D. Manolakis. Digital Signal Processing. 3rd ed. Englewood Cliffs, NJ: Prentice-Hall, 1996.
Double-precision floating point
Single-precision floating point — Supported only when you install the following products: Filter Design Toolbox and Simulink Fixed Point
Fixed point (signed and unsigned) — Supported only when you install the following products: Filter Design Toolbox, Simulink Fixed Point, and Fixed-Point Toolbox
| Digital Filter | Signal Processing Blockset |
| Digital Filter Design | Signal Processing Blockset |
| filter | Filter Design Toolbox |
| realizemdl | Filter Design Toolbox |
| dfilt | Signal Processing Toolbox |
| filter | Signal Processing Toolbox |
Filters — Examples of when and how to use Signal Processing Blockset filtering blocks
![]() | FFT | FIR Decimation | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |