In the more general case, the input coefficients `A`

define
a cascade or multisection allpass filter. `allpass2wdf`

applies
separately to each section of the same transformation used in the
single-section case. In the single-section case, the numeric coefficients
vector *a* contains a standard polynomial representation
of an allpass filter of order 1, 2, or 4. For example, in the first
order case,

$$a=\left[{a}_{1}\right]$$

represents the first
order transfer function:

$${H}_{1}(z)=\frac{{z}^{-1}+{a}_{1}}{1+{a}_{1}{z}^{-1}}$$

and in the second order
case,

$$a=\left[{a}_{1},{a}_{2}\right]$$

represents the second
order transfer function:

$${H}_{2}(z)=\frac{{z}^{-2}+{a}_{1}{z}^{-1}+{a}_{2}}{1+{a}_{1}{z}^{-1}+{a}_{2}{z}^{-2}}$$

.

The allpass transfer functions *H*_{1} and *H*_{2} can
also have the following alternative representations, using decoupled
coefficients in vector *w*_{1} or *w*_{2} respectively.

$${\stackrel{~}{H}}_{1}(z)=\frac{{z}^{-1}+{w}_{1}}{1+{w}_{1}{z}^{-1}}$$

$$\stackrel{}{{\stackrel{~}{H}}_{2}(z)=\frac{{z}^{-2}+{w}_{2}(1+{w}_{1}){z}^{-1}+{w}_{1}}{1+{w}_{2}(1+{w}_{1}){z}^{-1}+{w}_{1}{z}^{-2}}}$$

For allpass coefficients, *w* is often used
to derive adaptor multipliers for Wave Digital Filter structures,
and it is required by a number of allpass based filters in DSP System Toolbox™ when `Structure`

is
set to `'Wave Digital Filter'`

(e.g. `dsp.AllpassFilter`

,
and `dsp.CoupledAllpassFilter`

).

For a given vector of section coefficients *a*, `allpass2wdf`

computes
the corresponding vector *w* such that

$$\begin{array}{l}when\text{}i\text{}=\text{}1,\text{}2\text{}or\text{}4\\ {\stackrel{~}{H}}_{i}(z)={H}_{i}(z)\end{array}$$

This results in using
the following formulas:

$$\begin{array}{l}for\text{}order\text{}1:\\ {w}_{1}={a}_{1}\\ for\text{}order\text{}2:\\ {w}_{1}={a}_{2}\\ {w}_{2}=\frac{{a}_{1}}{1+{a}_{2}}\\ for\text{}order\text{}4:\\ {w}_{1}={a}_{4}\\ {w}_{3}=\frac{{a}_{2}}{1+{a}_{4}}\\ {w}_{2}={w}_{4}=0\end{array}$$