Documentation Center

  • Trial Software
  • Product Updates

equiripple

Equiripple single-rate or multirate FIR filter from specification object

Syntax

hd = design(d,'equiripple')
hd = design(d,'equiripple',designoption,value,designoption,
...value,...)

Description

hd = design(d,'equiripple') designs an equiripple FIR digital filter or multirate filter using the specifications supplied in the object d. Equiripple filter designs minimize the maximum ripple in the passbands and stopbands.

hd is either a dfilt object (a single-rate digital filter) or an mfilt object (a multirate digital filter) depending on the Specification property of the filter specification object d and the specifications object type — halfband or interpolator.

When you use equiripple with Nyquist filter specification objects, you might encounter design cases where the filter design does not converge. Convergence errors occur mostly at large filter orders, or small transition widths, or large stopband attenuations. These specifications, alone or combined, can cause design failures. For more information, refer to fdesign.nyquist in the online Help system.

hd = design(d,'equiripple',designoption,value,designoption,
...value,...)
returns an equiripple FIR filter where you specify design options as input arguments.

To determine the available design options, use designopts with the specification object and the design method as input arguments as shown.

designopts(d,'method')

For complete help about using equiripple, refer to the command line help system. For example, to get specific information about using equiripple with d, the specification object, enter the following at the MATLAB prompt.

help(d,'equiripple')

Examples

Here is an example of designing a single-rate equiripple filter from a halfband filter specification object. Notice the help command used to learn about the options for the specification object and method.

d = fdesign.halfband('tw,ast',0.1,80);
designmethods(d)
help(d,'equiripple')
designopts(d,'equiripple')
hd = design(d,'equiripple','stopbandshape','flat');
fvtool(hd);

Displaying the filter in FVTool shows the equiripple nature of the filter.

equiripple also designs multirate filters. This example generates a halfband interpolator filter.

d = fdesign.interpolator(2); % Interpolation factor = 2.
hd = design(d,'equiripple');

This final example designs an equiripple filter with a direct-form structure by specifying the filterstructure argument. To set the design options for the filter, use the designopts method and options object opts.

d = fdesign.lowpass('fp,fst,ap,ast');
opts=designopts(d,'equiripple')
opts.FilterStructure='dffirt'
opts.MinPhase=1;
opts.DensityFactor=20;
opts
hd=design(d,'equiripple',opts)

    Note:   The MaxPhase design option for equripple FIR filters is currently only available for lowpass, highpass, bandpass, and bandstop filters.

See Also

| |

Was this topic helpful?