Main Content

multistage

Multistage filter from specification object

Support for multistage filter design using the fdesign.interpolator and fdesign.decimator objects will be removed in a future release. Use the designMultistageInterpolator and the designMultistageDecimator functions, respectively.

Multistage filter design using the fdesign.lowpass object and the design function now requires you to set the SystemObject flag to true unless the resulting design is a single-stage filter and not a cascade.

For more information on how to replace your existing code, see Compatibility Considerations.

Syntax

msFilter = design(d,'multistage',SystemObject=true)
msFilter = design(...,filterstructure=structure,SystemObject=true)
msFilter = design(...,nstages=nstages,SystemObject=true)
msFilter = design(...,usehalfbands=hb,SystemObject=true)

Description

msFilter = design(d,'multistage',SystemObject=true) designs a multistage filter whose response you specified by the filter specification object d.

msFilter = design(...,filterstructure=structure,SystemObject=true) returns a filter with the structure specified by structure. Input argument structure is dffir by default and can also be one of the following options.

structure

Valid with These Responses

firdecim

Lowpass or Nyquist response

firtdecim

Lowpass or Nyquist response

firinterp

Lowpass or Nyquist response

lowpass

Default lowpass only

Multistage design applies to the default lowpass filter specification object and to decimators and interpolators that use either lowpass or Nyquist responses.

msFilter = design(...,nstages=nstages,SystemObject=true) specifies nstages, the number of stages to be used in the design. nstages must be an integer or auto. To allow the design algorithm to use the optimal number of stages while minimizing the cost of using the resulting filter, nstages is auto by default. When you specify an integer for nstages, the design algorithm minimizes the cost for the number of stages you specify.

msFilter = design(...,usehalfbands=hb,SystemObject=true) uses halfband filters when you set hb to true. The default value for hb is false.

Note

To see a list of the design methods available for your filter, use designmethods(hd).

Examples

collapse all

This example designs a minimum order, multistage Nyquist interpolator.

l = 15;   % Interpolation factor. Also the Nyquist band.
tw = 0.05; % Normalized transition width
ast = 40;   % Minimum stopband attenuation in dB
msMinInterp = designMultistageInterpolator(l,2,tw,ast)
msMinInterp = 
  dsp.FilterCascade with properties:

         Stage1: [1x1 dsp.FIRInterpolator]
         Stage2: [1x1 dsp.FIRInterpolator]
    CloneStages: false

filterAnalyzer(msMinInterp);

Design a multistage lowpass interpolator with an interpolation factor of 8 using the designMultistageInterpolator function.

m = 8; 
msInterp = designMultistageInterpolator(m,2);
filterAnalyzer(msInterp);

Version History

Introduced in R2011a

expand all

See Also

|