| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Filter Design Toolbox |
| Contents | Index |
| Learn more about Filter Design Toolbox |
| On this page… |
|---|
Switching FDATool to Multirate Filter Design Mode Controls on the Multirate Design Panel Exporting the Individual Phase Coefficients of a Polyphase Filter to the Workspace |
Not only can you design multirate filters from the MATLAB command prompt, FDATool provides the same design capability in a graphical user interface tool. By starting FDATool and switching to the multirate filter design mode you have access to all of the multirate design capabilities in the toolbox — decimators, interpolators, and fractional rate changing filters, among others.
The multirate filter design mode in FDATool lets you specify and design a wide range of multirate filters, including decimators and interpolators.
With FDATool open, click Create a Multirate Filter,
, on the side
bar. You see FDATool switch to the design mode showing the multirate
filter design options. Shown in the following figure is the default
multirate design configuration that designs an interpolating filter
with an interpolation factor of 2. The design uses the current FIR
filter in FDATool.

When the current filter in FDATool is not an FIR filter, the multirate filter design panel removes the Use current FIR filter option and selects the Use default Nyquist FIR filter option instead as the default setting.
You see the options that allow you to design a variety of multirate filters. The Type option is your starting point. From this list you select the multirate filter to design. Based on your selection, other options change to provide the controls you need to specify your filter.
Notice the separate sections of the design panel. On the left is the filter type area where you choose the type of multirate filter to design and set the filter performance specifications.
In the center section FDATool provides choices that let you pick the filter design method to use.
The rightmost section offers options that control filter configuration when you select Cascaded-Integrator Comb (CIC) as the design method in the center section. Both the Decimator type and Interpolator type filters let you use the Cascaded-Integrator Comb (CIC) option to design multirate filters.
Here are all the options available when you switch to multirate filter design mode. Each option listed includes a brief description of what the option does when you use it.
Selecting and Configuring Your Filter
Option | Description |
|---|---|
Type | Specifies the type of multirate filter to design. Choose from Decimator, Interpolator, or Fractional-rate convertor.
|
Interpolation Factor | Use the up-down control arrows to specify the amount of interpolation to apply to the signal. Factors range upwards from 2. |
Decimation Factor | Use the up-down control arrows to specify the amount of decimation to apply to the signal. Factors range upwards from 2. |
Sampling Frequency | No settings here. Just Units and Fs below. |
Units | Specify whether Fs is specified in Hz, kHz, MHz, GHz, or Normalized (0 to 1) units. |
Fs | Set the full scale sampling frequency in the frequency units you specified in Units. When you select Normalized for Units, you do not enter a value for Fs. |
Designing Your Filter
Option | Description |
|---|---|
Use current FIR filter | Directs FDATool to use the current FIR filter to design the multirate filter. If the current filter is an IIR form, you cannot select this option. You cannot design multirate filters with IIR structures. |
Use a default Nyquist Filter | Tells FDATool to use the default Nyquist design method when the current filter in FDATool is not an FIR filter. |
Cascaded Integrator-Comb (CIC) | Design CIC filters using the options provided in the right-hand area of the multirate design panel. |
Hold Interpolator (Zero-order) | When you design an interpolator, you can specify how the filter sets interpolated values between signal values. When you select this option, the interpolator applies the most recent signal value for each interpolated value until it processes the next signal value. This is similar to sample-and-hold techniques. Compare to the Linear Interpolator option. |
Linear Interpolator (First-order) | When you design an interpolator, you can specify how the filter sets interpolated values between signal values. When you select this option, the interpolator applies linear interpolation between signal value to set the interpolated value until it processes the next signal value. Compare to the Linear Interpolator option. |
To see the difference between hold interpolation and linear interpolation, the following figure presents a sine wave signal s1 in three forms:
The top subplot in the figure presents signal s1 without interpolation.
The middle subplot shows signal s1 interpolated by a linear interpolator with an interpolation factor of 5.
The bottom subplot shows signal s1 interpolated by a hold interpolator with an interpolation factor of 5.
You see in the bottom figure the sample and hold nature of hold interpolation, and the first-order linear interpolation applied by the linear interpolator.

We used FDATool to create interpolators similar to the following code for the figure:
Linear interpolator — hm=mfilt.linearinterp(5)
Hold interpolator — hm=mfilt.holdinterp(5)
Options for Designing CIC Filters | Description |
|---|---|
Differential Delay | Sets the differential delay for the CIC filter. Usually a value of one or two is appropriate. |
Number of Sections | Specifies the number of sections in a CIC decimator. The default number of sections is 2 and the range is any positive integer. |
To introduce the process you use to design a multirate filter in FDATool, this example uses the options to design a fractional rate convertor which uses 7/3 as the fractional rate. Begin the design by creating a default lowpass FIR filter in FDATool. You do not have to begin with this FIR filter, but the default filter works fine.
Select the settings for a minimum-order lowpass FIR filter, using the Equiripple design method.
When FDATool displays the magnitude
response for the filter, click
in the side bar. FDATool
switches to multirate filter design mode, showing the multirate design
panel, shown in the following figure.

To design a fractional rate filter, select Fractional-rate convertor from the Type list. The Interpolation Factor and Decimation Factor options become available.
In Interpolation Factor, use the up arrow to set the interpolation factor to 7.
Using the up arrow in Decimation Factor, set 3 as the decimation factor.
Select Use a default Nyquist FIR filter. You could design the rate convertor with the current FIR filter as well.
Click Create Multirate Filter.
After designing the filter, FDATool returns with the specifications for your new filter displayed in Current Filter Information, and shows the magnitude response of the filter.

You can test the filter by exporting it to your workspace and using it to filter a signal. For information about exporting filters, refer to Importing and Exporting Quantized Filters.
Another kind of filter you can design in FDATool is Cascaded-Integrator Comb (CIC) filters. FDATool provides the options needed to configure your CIC to meet your needs.
Launch FDATool and design the default FIR lowpass filter. Designing a filter at this time is an optional step.
Switch FDATool to multirate design mode
by clicking
on the side bar.
To design the decimator using a CIC implementation, select Cascaded-Integrator Comb (CIC). This enables the CIC-related options on the right of the panel.
Set Differential Delay to 2. Generally, 1 or 2 are good values to use.
Enter 2 for the Number of Sections. Settings in the multirate design panel should look like this.

Click Create Multirate Filter.
FDATool designs the filter, shows the magnitude response in the analysis area, and updates the current filter information to show that you designed a tenth-order cascaded-integrator comb decimator with two sections. Notice the source is Multirate Design, indicating you used the multirate design mode in FDATool to make the filter. FDATool should look like this now.

Designing other multirate filters follows the same pattern.
To design other multirate filters, do one of the following depending on the filter to design:
To design an interpolator, select one of these options.
Use a default Nyquist FIR filter
Cascaded-Integrator Comb (CIC)
Hold Interpolator (Zero-order)
Linear Interpolator (First-order)
To design a decimator, select from these options.
Use a default Nyquist FIR filter
Cascaded-Integrator Comb (CIC)
To design a fractional-rate convertor, select Use a default Nyquist FIR filter.
After you design a multirate filter in FDATool, the quantization features enable you to convert your floating-point multirate filter to fixed-point arithmetic.
With your multirate filter as the current filter in FDATool, you can quantize your filter and use the quantization options to specify the fixed-point arithmetic the filter uses.
Follow these steps to convert your multirate filter to fixed-point arithmetic and set the fixed-point options.
Design or import your multirate filter and make sure it is the current filter in FDATool.
Click the Set Quantization Parameters button on the side bar.
From the Filter Arithmetic list on the Filter Arithmetic pane, select Fixed-point. If your filter is a CIC filter, the Fixed-point option is enabled by default and you do not set this option.
In the quantization panes, set the options for your filter. Set options for Coefficients, Input/Output, and Filter Internals.
When you current filter is a CIC filter, the options on the Input/Output and Filter Internals panes change to provide specific features for CIC filters.
The options that specify how your CIC filter uses input and output values are listed in the table below.
Option Name | Description |
|---|---|
Input Word Length | Sets the word length used to represent the input to a filter. |
Input fraction length | Sets the fraction length used to interpret input values to filter. |
Input range (+/-) | Lets you set the range the inputs represent. You use this instead of the Input fraction length option to set the precision. When you enter a value x, the resulting range is -x to x. Range must be a positive integer. |
Output word length | Sets the word length used to represent the output from a filter. |
Avoid overflow | Directs the filter to set the fraction length for the input to prevent the output values from exceeding the available range as defined by the word length. Clearing this option lets you set Output fraction length. |
Output fraction length | Sets the fraction length used to represent output values from a filter. |
Output range (+/-) | Lets you set the range the outputs represent. You use this instead of the Output fraction length option to set the precision. When you enter a value x, the resulting range is -x to x. Range must be a positive integer. |
The available options change when you change the Filter precision setting. Moving from Full to Specify all adds increasing control by enabling more input and output word options.
With a CIC filter as your current filter, the Filter precision option on the Filter Internals pane includes modes for controlling the filter word and fraction lengths.
There are four usage modes for this (the same mode you select for the FilterInternals property in CIC filters at the MATLAB prompt).
Full — All word and fraction lengths set to Bmax + 1, called Baccum by Harris in [2]. Full Precision is the default setting.
Minimum section word lengths — Set the section word lengths to minimum values that meet roundoff noise and output requirements as defined by Hogenauer in [3].
Specify word lengths — Enables the Section word length option for you to enter word lengths for each section. Enter either a scalar to use the same value for every section, or a vector of values, one for each section.
Specify all — Enables the Section fraction length option in addition to Section word length. Now you can provide both the word and fraction lengths for each section, again using either a scalar or a vector of values.
After designing a polyphase filter in Filter Design Analysis Tool (FDATool), you can obtain the individual phase coefficients of the filter by:
Exporting the filter to an object in the MATLAB workspace.
Using the polyphase method to create a matrix of the filter's coefficients.
To export a polyphase filter to an object in the MATLAB workspace, complete the following steps.
In FDATool, open the File menu and select Export.... This opens the dialog box for exporting the filter coefficients.

(Optional) For Variable Names, enter the name of the Multirate Filter object that will be created in the MATLAB workspace.
Click the Export button. The multirate filter object, Hm in this example, appears in the MATLAB workspace.

To create a matrix of the filter's coefficients, enter p=polyphase(Hm) at the command line. The polyphase method creates a matrix, p, of filter coefficients from the filter object, Hm. Each row of p consists of the coefficients of an individual phase subfilter. The first row contains to the coefficients of the first phase subfilter, the second row contains those of the second phase subfilter, and so on.
![]() | Transforming Filters | Realizing Filters as Simulink Subsystem Blocks | ![]() |

Learn how to apply early verification to your development process through these technical resources.
How much time do you spend on testing to ensure implementation meets system-level requirements?
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |