Free Books

Allpass Filters

The allpass filter is an important building block for digital audio signal processing systems. It is called ``allpass'' because all frequencies are ``passed'' in the same sense as in ``lowpass'', ``highpass'', and ``bandpass'' filters. In other words, the amplitude response of an allpass filter is 1 at each frequency, while the phase response (which determines the delay versus frequency) can be arbitrary.

In practice, a filter is often said to be allpass if the amplitude response is any nonzero constant. However, in this book, the term ``allpass'' refers to unity gain at each frequency. In this section, we will first make an allpass filter by cascading a feedback comb-filter with a feedforward comb-filter. This structure, known as the Schroeder allpass comb filter, or simply the Schroeder allpass section, is used extensively in the fields of artificial reverberation and digital audio effects. Next we will look at creating allpass filters by nesting them; allpass filters are nested by replacing delay elements (which are allpass filters themselves) with arbitrary allpass filters. Finally, we will consider the general case, and characterize the set of all single-input, single-output allpass filters. The general case, including multi-input, multi-output (MIMO) allpass filters, is treated in [449, Appendix D].

Allpass from Two Combs

Figure 2.30: A combined feedback/feedforward comb filter which gives an allpass filter when $ b_0 = a_M$.
An allpass filter can be defined as any filter having a gain of $ 1$ at all frequencies (but typically different delays at different frequencies). It is well known that the series combination of a feedforward and feedback comb filter (having equal delays) creates an allpass filter when the feedforward coefficient is the negative of the feedback coefficient. Figure 2.30 shows a combination feedforward/feedback comb filter structure which shares the same delay line.3.13 By inspection of Fig.2.30, the difference equation is
v(n) &=& x(n) - a_M v(n-M)\\
y(n) &=& b_0 v(n) + v(n-M).
This can be recognized as a digital filter in direct form II [449]. Thus, the system of Fig.2.30 can be interpreted as the series combination of a feedback comb filter (Fig.2.24) taking $ x(n)$ to $ v(n)$ followed by a feedforward comb filter (Fig.2.23) taking $ v(n)$ to $ y(n)$. By the commutativity of LTI systems, we can interchange the order to get
v(n) &=& b_0 x(n) + x(n-M)\\
y(n) &=& v(n) - a_M y(n-M).
Substituting the right-hand side of the first equation above for $ v(n)$ in the second equation yields more simply

$\displaystyle y(n) = b_0 x(n) + x(n-M) - a_M y(n-M). \protect$ (3.15)

This can be recognized as direct form I [449], which requires $ 2M$ delays instead of $ M$; however, unlike direct-form II, direct-form I cannot suffer from ``internal'' overflow--overflow can happen only at the output. The coefficient symbols $ b_0$ and $ a_M$ here have been chosen to correspond to standard notation for the transfer function

$\displaystyle H(z) = \frac{b_0 + z^{-M}}{1 + a_M z^{-M}}.

The frequency response is obtained by setting $ z = e^{j\omega T}$, where $ \omega $ denotes radian frequency and $ T$ denotes the sampling period in seconds [449]. For an allpass filter, the frequency magnitude must be the same for all $ \omega\in[-\pi/T,\pi/T]$. An allpass filter is obtained when $ b_0 = \overline{a_M}$, or, in the case of real coefficients, when $ b_0 = a_M$. To see this, let $ a\isdef
a_M=\overline{b_0}$. Then we have

$\displaystyle \left\vert H(e^{j\omega T})\right\vert
= \left\vert\frac{\overli...
...eft\vert\frac{\overline{a + e^{j\omega MT}}}{a+e^{j\omega MT}}\right\vert = 1.

Nested Allpass Filters

An interesting property of allpass filters is that they can be nested [412,152,153]. That is, if $ H_1(z)$ and $ H_2(z)$ denote unity-gain allpass transfer functions, then both $ H_1(H_2(z))$ and $ H_2(H_1(z))$ are allpass filters. A proof can be based on the observation that, since $ \vert H_i(e^{j\omega})\vert=1$, $ H_i(z)$ can be viewed as a conformal map [326] which maps the unit circle in the $ z$ plane to itself; therefore, the set of all such maps is closed under functional composition. Nested allpass filters were proposed for use in artificial reverberation by Schroeder [412, p. 222]. An important class of nested allpass filters is obtained by nesting first-order allpass filters of the form

$\displaystyle S_i(z) = \frac{k_i+z^{-1}}{1+k_iz^{-1}}.

The nesting begins with $ H_1(z)\isdef S_1(z)$, and $ H_2(z)$ is obtained by replacing $ z^{-1}$ in $ H_1(z)$ by $ z^{-1}S_2(z)$ to get

$\displaystyle H_2(z) \isdef S_1\left([z^{-1}S_2(z)]^{-1}\right) \isdef \frac{k_1+z^{-1}S_2(z)}{1+k_1z^{-1}S_2(z)}.

Figure 2.31a depicts the first-order allpass $ S_1(z)$ in direct form II. Figure 2.31b shows the same filter redrawn as a two-multiplier lattice filter section [297]. In the lattice form, it is clear that replacing $ z^{-1}$ by $ z^{-1}S_2(z)$ just extends the lattice to the right, as shown in Fig.2.32. The equivalence of nested allpass filters to lattice filters has computational significance since it is well known that the two-multiply lattice sections can be replaced by one-multiply lattice sections [297,314].
Figure 2.31: First-order allpass filter: (a) Direct form II. (b) Two-multiply lattice section. (b) is just (a) folded over.
Figure 2.32: Second-order allpass filter: (a) Nested direct-form II. (b) Consecutive two-multiply lattice sections.
In summary, nested first-order allpass filters are equivalent to lattice filters made of two-multiply lattice sections. In §C.8.4, a one-multiply section is derived which is not only less expensive to implement in hardware, but it additionally has a direct interpretation as a physical model.

More General Allpass Filters

We have so far seen two types of allpass filters:
  • The series combination of feedback and feedforward comb-filters is allpass when their delay lines are the same length and their feedback and feedforward coefficents are the same. An example is shown in Fig.2.30.
  • Any delay element in an allpass filter can be replaced by an allpass filter to obtain a new (typically higher order) allpass filter. The special case of nested first-order allpass filters yielded the lattice digital filter structure of Fig.2.32.
We now discuss allpass filters more generally in the SISO case. (See Appendix D of [449] for the MIMO case.)
Definition: A linear, time-invariant filter $ H(z)$ is said to be lossless if it preserves signal energy for every input signal. That is, if the input signal is $ x(n)$, and the output signal is $ y(n) = (h\ast x)(n)$, we must have

$\displaystyle \sum_{n=-\infty}^{\infty} \left\vert y(n)\right\vert^2 =
\sum_{n=-\infty}^{\infty} \left\vert x(n)\right\vert^2.

In terms of the $ L2$ signal norm $ \left\Vert\,\,\cdot\,\,\right\Vert _2$, this can be expressed more succinctly as

$\displaystyle \left\Vert\,y\,\right\Vert _2^2 = \left\Vert\,x\,\right\Vert _2^2.

Notice that only stable filters can be lossless since, otherwise, $ \left\Vert\,y\,\right\Vert$ is generally infinite, even when $ \left\Vert\,x\,\right\Vert$ is finite. We further assume all filters are causal3.14 for simplicity. It is straightforward to show the following: It can be shown [449, Appendix C] that stable, linear, time-invariant (LTI) filter transfer function $ H(z)$ is lossless if and only if

$\displaystyle \left\vert H(e^{j\omega})\right\vert = 1, \quad \forall \omega.

That is, the frequency response must have magnitude 1 everywhere over the unit circle in the complex $ z$ plane. Thus, ``lossless'' and ``unity-gain allpass'' are synonymous. For an allpass filter with gain $ g$ at each frequency, the energy gain of the filter is $ g^2$ for every input signal $ x$. Since we can describe such a filter as an allpass times a constant gain, the term ``allpass'' will refer here to the case $ g=1$.

Example Allpass Filters

  • The simplest allpass filter is a unit-modulus gain

    $\displaystyle H(z) = e^{j\phi}

    where $ \phi$ can be any phase value. In the real case $ \phi$ can only be 0 or $ \pi$, in which case $ H(z)=\pm 1$.
  • A lossless FIR filter can consist only of a single nonzero tap:

    $\displaystyle H(z) = e^{j\phi} z^{-K}

    for some fixed integer $ K$, where $ \phi$ is again some constant phase, constrained to be 0 or $ \pi$ in the real-filter case. Since we are considering only causal filters here, $ K\geq 0$. As a special case of this example, a unit delay $ H(z)=z^{-1}$ is a simple FIR allpass filter.
  • The transfer function of every finite-order, causal, lossless IIR digital filter (recursive allpass filter) can be written as

    $\displaystyle H(z) = e^{j\phi} z^{-K} \frac{\tilde{A}(z)}{A(z)} \protect$ (3.16)

    where $ K\geq 0$, $ A(z) = 1 + a_1 z^{-1}+ a_2 z^{-2} + \cdots + a_N
z^{-N}$, and $ \tilde{A}(z)\isdef z^{-N}\overline{A}(z^{-1})$. The polynomial $ \tilde{A}(z)$ can be obtained by reversing the order of the coefficients in $ A(z)$ and conjugating them. (The factor $ z^{-N}$ serves to restore negative powers of $ z$ and hence causality.)
In summary, every SISO allpass filter can be expressed as the product of a unit-modulus gain factor, a pure delay, and an IIR transfer function in which the numerator is the ``flip'' of the denominator, as in Eq.$ \,$(2.16).

Gerzon Nested MIMO Allpass

An interesting generalization of the single-input, single-output Schroeder allpass filter (defined in §2.8.1) was proposed by Gerzon [157] for use in artificial reverberation systems. The starting point can be the first-order allpass of Fig.2.31a on page [*], or the allpass made from two comb-filters depicted in Fig.2.30 on page [*].3.15In either case, Let $ \underline{x}(n)$ denote the $ N\times 1$ input vector with components $ x_i(n), i=1,\dots,N$, and let $ \underline{X}(z)=[X_1(z),\dots,X_N(z)]$ denote the corresponding vector of z transforms. Denote the $ N\times 1$ output vector by $ \underline{y}(n)$. The resulting vector difference equation becomes, in the frequency domain (cf. Eq.$ \,$(2.15))

$\displaystyle \underline{Y}(z) = \overline{g} \underline{X}(z) + \mathbf{U}(z)\underline{X}(z) - g \mathbf{U}(z)\underline{Y}(z)

which leads to the matrix transfer function

$\displaystyle \mathbf{H}(z) = [\mathbf{I}+ g \mathbf{U}(z)]^{-1}[\overline{g}\mathbf{I}+ \mathbf{U}(z)]

where $ \mathbf{I}$ denotes the $ N\times N$ identity matrix, and $ \mathbf{U}(z)$ denotes any paraunitary matrix transfer function [500], [449, Appendix C]. Note that to avoid implementing $ \mathbf{U}(z)$ twice, $ \mathbf{H}(z)$ should be realized in vector direct-form II, viz.,
\underline{v}_d(n) &=& \mathbf{U}(d)\underline{v}(n) = {\cal Z...
...line{y}(n) &=& \underline{v}(n) + \overline{g}\underline{v}_d(n)
where $ d$ denotes the unit-delay operator ( $ d^k x(n)\isdef x(n-k)$). To avoid a delay-free loop, the paraunitary matrix must include at least one pure delay in every row, i.e., $ \mathbf{U}(z) = z^{-1}
\mathbf{U}^\prime(z)$ where $ \mathbf{U}^\prime(z)$ is paraunitary and causal. In [157], Gerzon suggested using $ \mathbf{U}(z)$ of the form

$\displaystyle \mathbf{U}(z) = \mathbf{D}(z) \mathbf{Q}

where $ \mathbf{Q}$ is a simple $ N\times N$ orthogonal matrix, and

$\displaystyle \mathbf{D}(z) = \left[ \begin{array}{ccccc} z^{-m_1} & 0 & 0 & \d...
...ts & \ddots& \vdots\\ 0 & 0 & 0 & \dots & z^{-m_N} \end{array} \right] \protect$ (3.17)

is a diagonal matrix of pure delays, with the lengths $ m_i$ chosen to be mutually prime (as suggested by Schroeder [417] for a series combination of Schroeder allpass sections). This structure is very close to the that of typical feedback delay networks (FDN), but unlike FDNs, which are ``vector feedback comb filters,'' the vectorized Schroeder allpass is a true multi-input, multi-output (MIMO) allpass filter. Gerzon further suggested replacing the feedback and feedforward gains $ \pm g$ by digital filters $ \pm G(z)$ having an amplitude response bounded by 1. In principle, this allows the network to be arbitrarily different at each frequency. Gerzon's vector Schroeder allpass is used in the IRCAM Spatialisateur [218].
Next Section:
Allpass Digital Waveguide Networks
Previous Section:
Feedback Delay Networks (FDN)