Filter Realization Wizard
Construct filter realizations using digital filter blocks or Sum, Gain, and Delay blocks
Filtering / Filter Implementations
Use this block to implement fixed-point or floating-point digital filters using Sum, Gain, and Delay blocks or digital filter blocks from the DSP System Toolbox™ library. You can either design a filter by using the block 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 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 digital filter blocks from the DSP System Toolbox library, or it can create a subsystem block that implements the specified filter using Sum (Simulink), Gain (Simulink), and Delay blocks. If the Filter Realization Wizard creates a block, double-click the block to open the dialog box. If it creates a subsystem, double-click the subsystem block to see the filter implementation as shown in the figure below.
For more information about filter implementation, see Specify the Filter Implementation.
The parameters of the Filter Realization Wizard are a part of a larger app, the Filter
filterDesigner). You can use filter designer to
design and analyze your filter, and then use the Filter Realization Wizard parameters to
implement the filter in your models.
Specify the Filter and Data Types
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. In the Import Filter panel, you can specify the coefficients directly or specify the workspace variables which store the coefficients.
You can also specify a fixed-point filter or a single-precision filter by using the Set Quantization Parameters panel.
Running a model containing implementations of fixed-point filters requires the Fixed-Point Designer™ product, but you can still edit models containing such filter implementations without it. See the Fixed-Point Designer 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
For more information on the Import Filter panel, see Importing a Filter Design.
For more information on the Set Quantization Parameters panel, see Access the Quantization Features of Filter Designer.
To open a panel, click the appropriate button in the lower-left corner of filter designer.
Supported Filter Structures
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 MA for maximum phase
Lattice MA for minimum phase
Specify the Filter Implementation
You can determine how the Filter Realization Wizard models the specified filter. In the Realize Model panel, select the Build model using basic elements check box. When you select this check box and click on the Realize Model button, the Filter Realization Wizard creates a subsystem block that implements your filter using Sum (Simulink), Gain (Simulink), 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 available only when your filter can be implemented using a digital filter block available in the DSP System Toolbox library.
The Filter Realization Wizard can generate a subsystem that represents either a double-precision or fixed-point filter. You must install the Fixed-Point Designer product to simulate a fixed-point filter. You can still edit the blocks used to implement the filter without installing the Fixed-Point Designer product.
Implementations of Double-Precision and Fixed-Point Filters
Command Line Alternative to Realize Model Button
You can enter
realizemdl( in the
MATLAB® command prompt to generate an architectural model of the filter System object™,
, in a
Simulink® subsystem block using individual sum, gain, and delay blocks, according to
user-defined specifications. For more information, see
The following parameters for the Filter Realization Wizard are in the Realize Model pane of the filter designer app. To open different panels of filter designer, click the different buttons at the lower-left corner. For more information about relevant panels, see Specify the Filter and Data Types.
- Block Name
Enter the name of the new filter block.
Specify where the new filter block should be created. This can be in a new model or in the current (most recently selected) model.
- User Defined
Specify the name of the target subsystem in which the Filter Realization Wizard should create the new filter block.
- Overwrite generated block “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
- Build model using basic elements
Select this check box to implement your filter using Sum, Gain, and Delay blocks. Clear this check box to implement your filter using digital filter blocks from the DSP System Toolbox library. This parameter is available only when your filter can be modeled using an available digital filter block.
- Optimize for zero gains
Select this check box to remove zero-gain paths from the filter structure. For an example, see Optimize the Filter Structure.
- Optimize for unity gains
Select this check box to substitute gains equal to 1 with a wire (short circuit). For an example, see Optimize the Filter Structure.
- Optimize for negative gains
Select this check box to substitute gains equal to -1 with a wire (short circuit), and change the corresponding sums to subtractions. For an example, see Optimize the Filter Structure.
- Optimize delay chains
Select this check box to substitute any delay chains made up of n unit delays with a single delay by n. For an example, see Optimize the Filter Structure.
- Optimize for unity scale values
Select this check box to remove all scale value multiplications by 1 from the filter structure.
- Input processing
Specify how the generated filter block or subsystem block processes the input. Depending on the type of filter you are designing, one or both of the following options may be available:
Columns as channels (frame based)— When you select this option, the block treats each column of the input as a separate channel.
Elements as channels (sample based)— When you select this option, the block treats each element of the input as a separate channel.
For more information about sample- and frame-based processing, see Sample- and Frame-Based Concepts.
- Rate options
For multirate filters, specify how the block should process the input. You can set this parameter to one of the following options:
Enforce single-rate processing— When you select this option, the block maintains the input sample rate.
Allow multirate processing— When you select this option, the block adjusts the rate at the output to accommodate an increased or reduced number of samples.
- Realize Model
Click to create a filter block according to the settings you’ve specified. When the Build model using basic elements check box is selected, the filter is implemented as a subsystem block consisting of Sum, Gain, and Delay blocks. To see the filter implementation, double-click the subsystem block in your model.
For more information about relevant parameters in other panels of filter designer, see Specify the Filter and Data Types.
Supported Data Types
Double-precision floating point
Single-precision floating point — Supported only when you install Fixed-Point Designer.
Fixed point (signed and unsigned) — Supported only when you install Fixed-Point Designer and Fixed-Point Designer.
 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.
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Design and simulate fixed-point systems using Fixed-Point Designer™.
Introduced before R2006a