Main Content


Cascade of allpass discrete-time filters


hd = dfilt.cascadeallpass(c1,c2,...)


hd = dfilt.cascadeallpass(c1,c2,...) constructs a cascade of allpass filters, each of which uses the minimum number of multipliers, given the filter coefficients provided in c1, c2, and so on.

Each vector c represents one section in the cascade filter. c vectors must contain one, two, three, or four elements as the filter coefficients for each section. As a result of the design algorithm, each section is a dfilt.allpass structure whose coefficients are given in the matching c vector, such as the c1 vector contains the coefficients for the first stage.

States for each section are shared between sections.

Vectors c do not have to be the same length. You can combine various length vectors in the input arguments. For example, you can cascade fourth-order sections with second-order sections, or first-order sections.

For more information about the vectors ci and about the transfer function of each section, refer to dfilt.allpass.

Generally, you do not construct these allpass cascade filters directly. Instead, they result from the design process for an IIR filter. Refer to the first example in Examples for more about using dfilt.cascadeallpass to design an IIR filter.


In the next table, the row entries are the filter properties and a brief description of each property.

Property Name

Brief Description


Contains the coefficients for the allpass filter object


Describes the signal flow for the filter object, including all of the active elements that perform operations during filtering — gains, delays, sums, products, and input/output.


Specifies whether to reset the filter states and memory before each filtering operation. Lets you decide whether your filter retains states from previous filtering runs. False is the default setting.


This property contains the filter states before, during, and after filter operations. States act as filter memory between filtering runs or sessions. They also provide linkage between the sections of a multisection filter, such as a cascade filter. For details, refer to filtstates in Signal Processing Toolbox™ documentation or in the Help system.


Two examples show how dfilt.cascadeallpass works in very different applications — designing a halfband IIR filter and constructing an allpass cascade of dfilt objects.

First, design the IIR halfband filter using cascaded allpass filters. Each branch of the parallel cascade construction is a cascadeallpass filter object.

tw = 100;  % Transition width of filter to be designed, 100 Hz.
ast = 80;  % Stopband attenuation of filter to be designed, 80dB.
fs = 2000; % Sampling frequency of signal to be filtered.
% Store halfband design specs in the specifications object d.
d = fdesign.halfband('tw,ast',tw,ast,fs);

Now perform the actual filter design. hd contains two dfilt.cascadeallpass objects.

hd = design(d,'ellip','filterstructure','cascadeallpass');
% Get summary information about one dfilt.cascadeallpass stage.
StageInfo = hd.Stage(1).Stage(1);

This second example constructs a dfilt.cascadeallpass filter object directly given allpass coefficients for the input vectors.

section1 = 0.8;
section2 = [1.2,0.7];
section3 = [1.3,0.9];
hd = dfilt.cascadeallpass(section1,section2,section3);
% Get information about the filter
% return informatio in character array
S = info(hd);
Introduced in R2011a