Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

# dfilt.cascadewdfallpass

Cascade allpass WDF filters to construct allpass WDF

## Syntax

```hd = dfilt.cascadewdfallpass(c1,c2,...) ```

## Description

`hd = dfilt.cascadewdfallpass(c1,c2,...)` constructs a cascade of allpass wave digital filters given the allpass coefficients in the vectors `c1`, `c2`, and so on.

Each `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.

When the `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 `dfilt.wdfallpass`, with the coefficients given by the corresponding c vector. That is, the first section has coefficients from vector `c1`, the second section coefficients come from `c2`, and on until all of the `c` vectors are used.

You can mix the lengths of the `c` vectors. They do not need to be the same length. For example, you can cascade several fourth-order sections (`length`(`c`) = 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 `dfilt.cascadewdfallpass` to design an IIR filter.

For more information about the `c` vectors and the transfer function for the allpass filters, refer to `dfilt.wdfallpass`.

## Properties

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

Property Name

Brief Description

`AllpassCoefficients`

Contains the coefficients for the allpass wave digital filter object

`FilterStructure`

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.

`PersistentMemory`

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.

`States`

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.

## Examples

To demonstrate two approaches to using `dfilt.cascadewdfallpass` to 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` contains two `dfilt.cascadewdfallpass` filters.

```hd = design(d,'ellip','filterstructure','cascadewdfallpass'); % Summary info on dfilt.cascadewdfallpass. StageSummary = hd.stage(1).stage(2);```

This example demonstrates direct construction of a `dfilt.cascadewdfallpass` filter with allpass coefficients.

```section1 = 0.8; section2 = [1.5,0.7]; section3 = [1.8,0.9]; hd = dfilt.cascadewdfallpass(section1,section2,section3); ```

Watch now