Cascade allpass WDF filters to construct allpass WDF
hd = dfilt.cascadewdfallpass(c1,c2,...)
hd = dfilt.cascadewdfallpass(c1,c2,...) constructs
a cascade of allpass wave digital filters given the allpass coefficients
in the vectors
c2, and so
c vector contains the coefficients for
one section of the cascaded filter.
C vectors must
have one, two, or four elements (coefficients). Three element vectors
are not supported.
c vector has four elements, the
first and third elements of the vector must be 0. Each section of
the cascade is an allpass wave digital filter, from
with the coefficients given by the corresponding c vector. That is,
the first section has coefficients from vector
the second section coefficients come from
on until all of the
c vectors are used.
You can mix the lengths of the
They do not need to be the same length. For example, you can cascade
several fourth-order sections (
= 4) with first or second-order sections.
Wave digital filters are usually used to create other filters. This toolbox uses them to implement halfband filters, which the first example in Examples demonstrates. They are most often building blocks for filters.
Generally, you do not construct these WDF 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
design an IIR filter.
For more information about the
and the transfer function for the allpass filters, refer to
In the next table, the row entries are the filter properties and a brief description of each property.
Contains the coefficients for the allpass wave digital 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.
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 demonstrate two approaches to using
design a filter, these examples show both direct construction and
construction as part of another filter.
The first design shown creates an IIR halfband filter that uses lattice wave digital filters. Each branch of the parallel connection in the lattice is an allpass cascade wave digital filter.
tw = 100; % Transition width of filter, 100 Hz. ast = 80; % Stopband attenuation of filter, 80 dB. fs = 2000; % Sampling frequency of signal to filter. % Store halfband specs. d = fdesign.halfband('tw,ast',tw,ast,fs);
Now perform the actual halfband design process.
hd = design(d,'ellip','filterstructure','cascadewdfallpass'); % Summary info on dfilt.cascadewdfallpass. StageSummary = hd.stage(1).stage(2);
This example demonstrates direct construction of a
with allpass coefficients.
section1 = 0.8; section2 = [1.5,0.7]; section3 = [1.8,0.9]; hd = dfilt.cascadewdfallpass(section1,section2,section3);