DSP Blockset
  Go to block:
    Search    Help Desk 
Filter Realization Wizard    Examples   See Also

Automatically construct filter realizations using Sum, Gain, and Unit Delay blocks.

Library

Filter Realizations, in Filtering

Description

The Filter Realization Wizard is a tool for automatically creating filter realizations with specific architectures. The Wizard's interface allows you to specify the filter's structure and coefficients, the type of data to be filtered, and optimization criteria for the design. The Wizard then builds the specified filter as a subsystem composed of Sum, Gain, and Unit Delay blocks. You can select the name of the subsystem ("Filter" is the default) and whether it is placed in the current model or in a new model.

The Architecture panel in the Wizard's interface allows you to select from the following realizations.

Architecture
Parameters
Direct-Form I
Numerator, denominator
Direct-Form II
Numerator, denominator
Lattice (AR)
Lattice coefficients
Lattice (MA)
Lattice coefficients
Lattice (ARMA)
Lattice coefficients, ladder coefficients
Symmetric FIR
Coefficients

The Optimization panel in the Wizard's interface lets you choose to optimize for zero and unity gains. Zero-gain optimization removes zero-gain paths from the filter structure, and unity-gain optimization substitutes a wire (short circuit) for unity gains.

Type a name for the new filter block in the Block Name text field, and select where the block should be placed from the Destination pop-up menu. Within a model, the Filter subsystem operates on a sample-based signal (similar to Simulink's Discrete Filter block), filtering each channel over time. Double-click on the subsystem to open it; you can then modify the gains or the filter structure to suit your needs.

Fixed-Point Options

By default, the filter constructed by the Filter Realization Wizard operates using the Simulink standard double-precision arithmetic. If you have the Fixed-Point Blockset installed on your system, you have the additional option of building the filter to operate using single-precision or fixed-point arithmetic. Select the option you want from the Data Type panel.

For information on these parameters, see the Fixed-Point Blockset User's Guide.

Dialog Box

The parameters displayed in the Architecture panel vary for different selections in the Type menu. Only a portion of the parameters listed below are visible in the wizard at any one time.

Type
The filter architecture: Direct-Form I, Direct-Form II, Symmetric FIR, Lattice (MA), Lattice (AR), Lattice (ARMA).
Numerator
The numerator coefficients for the direct-form I and II structures, specified as a vector or variable name.
Denominator
The denominator coefficients for the direct-form I and II structures, specified as a vector or variable name.
Coefficients
The coefficients for the symmetric FIR structure, specified as a vector or variable name.
Lattice Coefficients
The lattice coefficients for the lattice MA/AR/ARMA structures, specified as a vector or variable name.
Ladder Coefficients
The ladder coefficients for the lattice ARMA structure, specified as a vector or variable name.
Optimize for zero gains
Enables zero-gain optimization (when checked) by removing zero-gain paths from the filter structure.
Optimize for unity gains
Enables unity-gain optimization (when checked) by substituting a wire (short circuit) for unity gains.
Destination
The location where the new filter block should be created.
Block name
The name of the new filter block.
Build
Generate the filter.
Data type
The precision of the data that the filter will process. Built-in data types, when selected, configures the block to build the filter using double-precision Simulink blocks. Single precision and Fixed-point configure the block to build the filter using Fixed-Point Blockset blocks.
Fixed-point
Options for fixed-point filter construction. See the Fixed-Point Blockset User's Guide.

Examples

Example 1: Direct Form II

Design an fourth-order, quarter-band, lowpass Butterworth filter:

   1.
At the MATLAB command line, compute the filter coefficients by entering
   2.
Launch the Filter Realization Wizard by double-clicking on the icon in the Filter Realizations library.
   3.
Configure the Wizard to use b and a as the numerator and denominator of a Direct-Form II structure:
   4.
Type a name for the new filter subsystem in the Block Name field. The example uses Butter LPF.
The GUI with these settings is shown below:

   5.
Press the Build button to create the specified filter subsystem in a new model window.
   6.
Double-click the new Butter LPF block to see the Direct-Form II filter realization that the Wizard created:

Example 2: Second Order Sections

Design an eighth-order, quarter-band, lowpass Butterworth filter using second-order sections (SOS):

   1.
At the MATLAB command line, compute the second-order sections by entering
   2.
Configure the Wizard to use sos as the numerator of a Direct-Form II structure:
   3.
Type a name for the new filter subsystem in the Block Name field. The example uses Butter SOS.
   4.
Press the Build button to create the specified filter subsystem in a new model window.
   5.
Double-click the new Butter SOS block to see the Direct-Form II filter realization that the Wizard created:

Note that in a subsystem with the Direct-Form I or II architecture, the filter sections are connected using From and Goto blocks rather than being directly wired together. This makes it easier to recognize and move filter sections in the model window independently of each other.

Example 3: Nth Order Sections

Design a lowpass Butterworth filter using Nth order cascades:

   1.
At the MATLAB command line, compute the coefficients for the Nth order sections by entering
   2.
Configure the Wizard to use these coefficient vectors as the numerator and denominator of a Direct-Form II structure:
   3.
Type a name for the new filter subsystem in the Block Name field. The example uses Butter sections.
   4.
Press the Build button to create the specified filter subsystem in a new model window.
   5.
Double-click the new Butter sections block to see the Direct-Form II filter realization that the Wizard created:

Example 4: ARMA Lattice

Design a fourth-order, quarter-band, lowpass Butterworth filter using an ARMA lattice:

   1.
At the MATLAB command line, compute the lattice and ladder coefficients (k and v, respectively) for the ARMA filter:
   2.
Configure the Wizard to use k and v as the coefficients of the lattice design:
   3.
Type a name for the new filter subsystem in the Block Name field. The example uses Butter Lattice.
   4.
Press the Build button to create the specified filter subsystem in a new model window.
   5.
Double click the new Butter Lattice block to see the ARMA filter realization that the Wizard created:

References

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.

See Also

Biquadratic Filter
Direct-Form II Transpose Filter
Discrete Filter (Simulink)
Time-Varying Direct-Form II Transpose Filter
Time-Varying Lattice Filter


[ Previous | Help Desk | Next ]