filterBuilder function provides a graphical interface to
fdesign 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 DSP System Toolbox™ product greatly expands the functionality of
filterBuilder. Many of the features described or
displayed on this page are only available if the DSP System Toolbox is installed. You may verify your installation by typing
ver at the command prompt.
The basic workflow in using
filterBuilder is to choose the
constraints and specifications of the filter, and to use those constraints 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 on the desired
performance criteria. The following are the details of each of the steps for
designing a filter with
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 mostly use the Main pane.
The Bandpass Design dialog box contains all the parameters necessary 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.
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 might change based on 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.
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
type I or II, or
Elliptic. If the Order
Mode field is set to
Specify, the design
method available is
IIR least p-norm.
By expanding the Design options section of the
Algorithm frame, you can further customize the algorithm
specified. The options available depend upon the algorithm and settings that have
already been selected in the dialog box. In the case of a bandpass IIR filter using
Butterworth method, design options such as Match
Exactly are available, as shown in the following figure.
To analyze the filter response, click the View Filter Response button. The Filter Visualization Tool (FVTool) opens displaying the magnitude plot of the filter response.
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 the Signal Processing Toolbox software creates the filter coefficients and exports it to the MATLAB workspace.
The filter is then ready to be used to filter actual input data. The basic filter
command takes input data
x, filters it through the Filter Object,
and produces output
y = filter(Hbs,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: