Filter Builder Design Process
Introduction to Filter Builder
filterBuilder function provides a graphical interface to
fdesign object-object oriented filter design paradigm and is
intended to reduce development time during the filter design process.
filterBuilder uses a specification-centered approach to find
the best algorithm for the desired response.
filterBuilder requires the Signal Processing Toolbox™. The functionality of
greatly expanded by the DSP System Toolbox™. Many of the features described or displayed below are only
available if the DSP System Toolbox is installed. You may verify your installation by typing
ver at the command prompt.
Design a Filter Using Filter Builder
The basic workflow in using
filterBuilder is to choose the
constraints and specifications of the filter, and to use those as a starting point
in the design. Postponing the choice of algorithm for the filter allows the best
design method to be determined automatically, based upon the desired performance
criteria. The following are the details of each of the steps for designing a filter
Select a Response
When you open the
filterBuilder tool by
This step cannot be skipped because it is not automatically completed for you by the software. You must select a response to initiate the filter design process.
After you choose a response, say bandpass, you start the design of the Specifications Object, and the Bandpass Design dialog box appears. This dialog box contains a Main pane, a Data Types pane and a Code Generation pane. The specifications of your filter are generally set in the Main pane of the dialog box.
The Data Types pane provides settings for precision and data types, and the Code Generation pane contains options for various implementations of the completed filter design.
For the initial design of your filter, you will mostly use the Main pane.
The Bandpass Design dialog box contains all the parameters you need to determine the specifications of a bandpass filter. The parameters listed in the Main pane depend upon the type of filter you are designing. However, no matter what type of filter you have chosen in the Response Selection dialog box, the filter design dialog box contains the Main, Data Types, and Code Generation panes.
Select a Specification
To choose the specification for the bandpass filter, you can begin by selecting an Impulse Response, Order Mode, and Filter Type in the Filter Specifications frame of the Main Pane. You can further specify the response of your filter by setting frequency and magnitude specifications in the appropriate frames on the Main Pane.
Frequency, Magnitude, and Algorithm specifications are interdependent and may change based upon your Filter Specifications selections. When choosing specifications for your filter, select your Filter Specifications first and work your way down the dialog box- this approach ensures that the best settings for dependent specifications display as available in the dialog box.
Select an Algorithm
The algorithms available for your filter depend upon the filter response and
design parameters you have selected in the previous steps. For example, in the case
of a bandpass filter, if the impulse response selected is IIR and the
Order Mode field is set to
Minimum, the design methods available are
Chebyshev type I or
Elliptic, whereas if the Order
Mode field is set to
Specify, the design
method available is
IIR least p-norm.
Customize the Algorithm
By expanding the Design options section of the
Algorithm frame, you can further customize the algorithm
specified. The options available will depend upon the algorithm and settings that
have already been selected in the dialog box. In the case of a bandpass IIR filter
Butterworth method, design options such as
Match Exactly are available. Select the Use a
System object to implement filter check box to generate a System object™ for the filter designed. With these settings, the
filterBuilder generates a
Analyze the Design
To analyze the filter response, click on the View Filter Response button. The Filter Visualization Tool opens displaying the magnitude plot of the filter response.
Realize or Apply the Filter to Input Data
When you have achieved the desired filter response through design iterations and analysis using the Filter Visualization Tool, apply the filter to the input data. Again, this step is never automatically performed for you by the software. To filter your data, you must explicitly execute this step. In the Bandpass Design dialog box, click OK and DSP System Toolbox creates the filter System object and exports it to the MATLAB workspace.
The filter is then ready to be used to filter actual input data. To filter input
x, enter the following in the MATLAB command prompt:
>> y = Hbp(x);
If you have Simulink®, you have the option of exporting this filter to a Simulink block using the
realizemdl command. To
get help on this command, type:
>> help realizemdl