Thinking in Waves Episode 31 / Part XII · Moving the dimension

From the \(s\) plane to the \(z\) plane

Building the order digitally ──
integer orders are FIR, fractional orders are IIR Expand \(D^\alpha=(1-z^{-1})^\alpha\) and you get the Grünwald–Letnikov fractional derivative itself.
★ Only at integer orders do the taps terminate; otherwise they run on forever, decaying as \(k^{-\alpha-1}\).
★★ And last episode's "dimension" was exactly the same count ── the dimension of space is a filter's tap count.

Prerequisites: Episodes 1, 2, 5, 26, 27, 30Computation: kenshou/dejitaru.js

For thirty episodes we have stayed analogue ── differentiation is \(\times(i\omega)\), the order is \((i\omega)^\alpha\), stability is "poles in the left half-plane".
Sample it into discrete time and the stage moves.

ConceptAnalogue (\(s\) plane)Digital (\(z=e^{sT}\) plane)
Frequency axisimaginary axis \(s=i\omega\)★ unit circle \(z=e^{i\omega T}\)
Stability\(\operatorname{Re}s<0\)★ \(|z|<1\)
Differentiation\(s\)★ \((1-z^{-1})/T\)
Integration\(1/s\)★ \(1/(1-z^{-1})\) = accumulator
Delay \(\tau\)\(e^{-s\tau}\)\(z^{-n}\) ── ★ integers only
Constants (Ep. 5)\(\omega=0\)★ a pole at \(z=1\)
Fractional order\((i\omega)^\alpha\)★ \((1-z^{-1})^\alpha\) ← this episode

01★ The digital fractional derivative ── Grünwald–Letnikov

Just a binomial expansion $$(1-z^{-1})^\alpha=\sum_k w_k\,z^{-k},\qquad w_k=(-1)^k\binom{\alpha}{k}$$

By recursion, \(w_0=1,\ w_k=w_{k-1}\left(1-\dfrac{\alpha+1}{k}\right)\). The \(w_k\) are the filter's taps

\(\alpha\)\(w_0\dots w_5\)Taps
−11, 1, 1, 1, 1, 1★ infinite (accumulator)
−1/21, 0.5, 0.375, 0.3125, 0.2734, 0.2461★ infinite
01, 0, 0, 0, 0, 0★ ends after 1
1/21, −0.5, −0.125, −0.0625, −0.0391, −0.0273★ infinite
11, −1, 0, 0, 0, 0★ ends after 2
21, −2, 1, 0, 0, 0★ ends after 3
31, −3, 3, −1, 0, 0★ ends after 4

The heart of §01

★★ Only when \(\alpha\) is a non-negative integer do the taps terminate (FIR).

★ \(\alpha=-1\) is all ones ── an accumulator: whatever goes in stays forever.
★ \(\alpha=0\) passes straight through (\(\delta\)). ★ \(\alpha=1\) is the difference \([1,-1]\), two taps.
★ \(\alpha=\pm1/2\) never ends.

02The tail decays as a power law ── the same shape as Episodes 26 and 27

Asymptotics $$w_k\ \approx\ \frac{k^{-\alpha-1}}{\Gamma(-\alpha)}\qquad(\text{large }k)$$
\(\alpha\)\(k\)\(w_k\)\(k^{-\alpha-1}/\Gamma(-\alpha)\)Ratio
−0.50\(10^{5}\)1.7841e−31.7841e−30.999999
0.50\(10^{5}\)−8.9207e−9−8.9206e−91.000004
1.50\(10^{5}\)1.3381e−131.3381e−131.000019
−0.25\(10^{5}\)4.9048e−54.9048e−50.999999

The heart of §02

A fractional-order digital filter has coefficients that decay as a power law ── memory that never ends. This is the same shape as Episodes 26 and 27 ──
Episode 26: fractional order ⇐ time constants distributed as \(g(\tau)\propto\tau^{\alpha-1}\)
★ Here  : fractional order ⇐ taps distributed as \(w_k\propto k^{-\alpha-1}\)
Continuous versus discrete is the only difference; they say the same thing.

03Does applying the half order twice give the first?

The standard check for a fractional order ── by convolution $$D^{1/2}\!\circ D^{1/2}=D^1\quad\Longleftrightarrow\quad w^{(1/2)}*w^{(1/2)}=w^{(1)}=[1,-1]$$
\(n\)\((w^{½}*w^{½})_n\)\(w^{(1)}_n\)Difference
01.00000000000010
1−1.000000000000−10
2–70.00000000000000

★ Pass a signal through an infinite filter twice and you get a filter that ends after two taps ── the half order really is the square root of the first.

04In the frequency domain ── which discretization preserves the order?

There is more than one way to replace \(s\) by \(z\). Put them on the unit circle \(z=e^{i\theta}\) (\(\theta=\omega T\)) and look at the phase.

Backward difference $$1-e^{-i\theta}=2\sin\frac\theta2\cdot e^{i(\pi/2-\theta/2)}\quad\Longrightarrow\quad\text{phase}=\alpha\left(90^\circ-\frac\theta2\right)$$
Bilinear (Tustin) $$\frac{1-e^{-i\theta}}{1+e^{-i\theta}}=i\tan\frac\theta2\quad\Longrightarrow\quad\text{phase}=90\alpha^\circ\ \text{(independent of frequency)}$$
\(\alpha\)\(\omega/\omega_N\)Backward diff.BilinearAnalogue \(90\alpha^\circ\)Error of backward diff.
1.00.0189.10090.00090.000−0.900°
1.00.3063.00090.00090.000−27.000°
1.00.909.00090.00090.000−81.000°
0.50.5022.50045.00045.000−22.500°
−0.50.50−22.500−45.000−45.000+22.500°

The heart of §04

★★ The bilinear transform holds the phase at exactly \(90\alpha^\circ\) at every frequency.
Episode 1's "the order is the phase" has become the criterion for choosing a discretization.
★ The backward difference tips toward zero phase near Nyquist: even at first order, staying within 1° means staying below 1 % of Nyquist (0.6 % at \(\alpha=2\)). The higher the order, the tighter.

05★★ The link to last episode ── the dimension was a tap count

Episode 30: the order of the \(d\)-dimensional Green's function is \(\alpha=(d-3)/2\); odd dimensions are sharp, even ones leave a tail. This episode: only non-negative integer \(\alpha\) gives finite taps. Overlay them.

\(d\)\(\alpha\)GL tapsEpisode 30's tailIn digital terms
1−1infinite (never decays ── all ones)\(\theta(s)\), a step that never leaves★ IIR
2−1/2infinite (\(k^{-1/2}\))tail \(s^{-1/2}\)★ IIR
30★ 1 tap [1]a bare \(\delta\)★ FIR
4+1/2infinite (\(k^{-3/2}\))tail \(s^{-3/2}\)★ IIR
5+1★ 2 taps [1, −1]\(\delta'\) (differentiated)★ FIR
7+2★ 3 taps [1, −2, 1]\(\delta''\)★ FIR

The heart of §05

★★★ The dimension of space can be counted as a filter's tap count.

★ Odd dimensions = integer order = FIR (taps end after \((d-1)/2\))
★ Even dimensions = half-integer order = IIR (taps run on as a power law)
── ★★ "Huygens' principle holds" = "that filter is FIR".

Read one by one ── \(d=1\) is an all-ones accumulator so sound stays forever (\(\theta(s)\)); \(d=3\) is a single-tap pass-through, undistorted and gone once past (\(\delta\)); \(d=5\) is a two-tap difference, sharp but differentiated (\(\delta'\)).

06Actually ringing the 2D reverberation

What do the \(d=2\) taps (\(\alpha=-1/2\)) sound like as reverberation? Here is the step response ── how much piles up while you keep sounding.

Samples \(n\)\(d=1\) (\(\alpha=-1\))\(d=2\) (\(\alpha=-1/2\))\(d=3\) (\(\alpha=0\))Ratio to \(\sqrt n\)
\(10^{2}\)101.011.32601.01.132604
\(10^{3}\)1001.035.69591.01.128802
\(10^{5}\)100001.0356.82621.01.128383

The heart of §06

\(d=3\) stays at 1 ── nothing piles up. \(d=1\) grows as \(n\). ★ \(d=2\) grows as \(\sqrt n\) ── in between.
The ratio converges to \(2/\sqrt\pi=1.128379\).
★ "In a two-dimensional room, sound piles up as \(\sqrt{\text{time}}\)" ── an hour of talking leaves 7.7 times what a minute does.

07A problem that only appears digitally ── fractional delay

In the analogue world \(e^{-s\tau}\) lets \(\tau\) be as fine as you like. Digitally, delay is \(z^{-n}\) with \(n\) an integer. So what does a "half-sample delay" \(z^{-1/2}\) look like?

The ideal fractional delay $$h_k=\operatorname{sinc}(k-D),\qquad D=\text{delay in samples}$$
\(k\)\(D=0\) (integer)\(D=0.5\) (half sample)\(D=1\) (integer)
−10−0.2122070
01.0000000.6366200
100.6366201.000000
20−0.2122070
300.1273240

The heart of §07

An integer delay is one tap. A half-sample delay runs on forever, and decays only as \(1/k\).
★ Exactly the pattern of §01 ── integer → finite (FIR), fractional → infinite (IIR).
★★ In the order, in the delay, and in the dimension: the moment you leave the integers, a tail grows.

Exercises

  1. You want a half-order filter in an audio device. Backward difference or bilinear?
    Show the answer
    Bilinear. The backward difference gives a phase \(\alpha(90^\circ-\theta/2)\), so past 1 % of Nyquist it is already off by more than a degree. At the top of the audible band (20 kHz against a 24 kHz Nyquist, i.e. 0.83) the backward-difference phase has essentially collapsed.
    ★ Bilinear keeps the phase at exactly \(90\alpha^\circ\) at every frequency because \(\tan(\theta/2)\) is purely imaginary. The price is frequency warping, \(\omega\to(2/T)\tan(\omega T/2)\) (pre-warping is the standard fix).
    ★ Episode 1's "the order is the phase" becomes a design criterion.
  2. The \(\alpha=-1/2\) taps are all positive; the \(\alpha=+1/2\) taps are negative from the second onward. Why?
    Show the answer
    Because the sign of the asymptote \(w_k\approx k^{-\alpha-1}/\Gamma(-\alpha)\) is set by \(\Gamma(-\alpha)\). At \(\alpha=-1/2\), \(\Gamma(1/2)=\sqrt\pi>0\); at \(\alpha=+1/2\), \(\Gamma(-1/2)=-2\sqrt\pi<0\).
    ★ In meaning ── the integrating side (\(\alpha<0\)) accumulates the past, so every tap is positive; the differentiating side (\(\alpha>0\)) subtracts it, so they go negative.
    ★ The extreme case is \(\alpha=-1\) (pure integration), all ones ── exactly Episode 30's \(d=1\), "a step that never leaves".
  3. If "Huygens holds = FIR", what would creatures in a non-FIR dimension struggle with?
    Show the answer
    They could not separate moments in time, because the past keeps mixing in. In \(d=2\) the reverberation piles up as \(\sqrt n\) (§06), so the background rises the more you speak.
    ★ To hear "when" something sounded, the impulse response must be finite ── a different constraint from Episode 9's bandwidth theorem (\(\Delta t\Delta\omega\ge1/2\)). However wide your bandwidth, an IIR medium muddies timing.
    ★ Only 3 dimensions has \(\alpha=0\) (one tap), so conversation is a privilege of three dimensions (Episode 30).

Summary The order becomes visible as a number of taps

We moved the stage from the \(s\) plane to the \(z\) plane. Expanding \(D^\alpha=(1-z^{-1})^\alpha\) binomially gives the Grünwald–Letnikov fractional derivative, and the coefficients \(w_k\) are the filter's taps.

★ Only for non-negative integer \(\alpha\) do the taps terminate (FIR): 1 tap at \(\alpha=0\), \([1,-1]\) at \(\alpha=1\), \([1,-2,1]\) at \(\alpha=2\). Otherwise they continue forever, decaying as \(w_k\approx k^{-\alpha-1}/\Gamma(-\alpha)\) (agreeing to 6 digits out to \(k=10^5\)). ★ The same shape as Episode 26's \(g(\tau)\propto\tau^{\alpha-1}\) ── continuous versus discrete is the only difference.

We checked it too ── convolving the \(D^{1/2}\) taps with themselves gives exactly \([1,-1]\). An infinite filter applied twice ends after two taps. The half order really is the square root of the first.

The order also decides how to discretize: the bilinear (Tustin) transform holds the phase at exactly \(90\alpha^\circ\) at every frequency (because \(\tan(\theta/2)\) is purely imaginary), while the backward difference is already off by a degree past 1 % of Nyquist even at first order. ★ Episode 1's "the order is the phase" became a design criterion.

★★★ And last episode's "dimension" was exactly the same count.
Odd dimensions = integer order = FIR (\((d-1)/2\) taps); even dimensions = half-integer = IIR.
The dimension of space can be counted as a filter's tap count.

\(d=1\) is the all-ones accumulator (\(\theta(s)\)), \(d=3\) the single-tap pass-through (\(\delta\)), \(d=5\) the two-tap difference (\(\delta'\)) ── matching Episode 30's table line for line. And the \(d=2\) reverberation piles up as \(\sqrt n\), with the ratio converging to \(2/\sqrt\pi=1.1284\).

Finally, the problem that only appears digitally has the same shape ── an integer delay is one tap; a half-sample delay is an infinite tail decaying only as \(1/k\). In the order, in the delay, and in the dimension: leave the integers and a tail grows.

This document is Episode 31 of the "Thinking in Waves" series. The computations are in kenshou/dejitaru.js. On the numbers here: the GL coefficients and their asymptotics, the self-convolution of the half order, the phase of each discretization, the step responses, and the fractional-delay sinc coefficients were all computed for this article. The Grünwald–Letnikov definition, the coefficient asymptotics \(w_k\sim k^{-\alpha-1}/\Gamma(-\alpha)\), the fact that the bilinear transform maps the imaginary axis onto the unit circle, and that the ideal fractional delay is a sinc are all well-known results and not discoveries of this article ── what this article did was line them up against Episode 30's "dimension = order" table row by row and make the correspondence "odd dimensions = FIR, even dimensions = IIR" explicit. That correspondence means the Green's functions have the same shape; it is not a claim that the \(d\)-dimensional wave equation is literally a GL filter (one is an order in time, the other a discrete-time operator). The phase-error table in §04 is for the first-order backward difference; higher-order discretizations do better. The "\(\sqrt n\) pile-up" in §06 is a statement about the step response; real room acoustics also involve absorption. ── To print, use your browser's Print → Save as PDF.

Print / PDF: ⌘+P (Ctrl+P on Windows). "Show the answer" opens the solutions.