I. Measuring Chaos: The Lyapunov Exponent
Double Pendulum Ensemble
30 pendulums, tiny initial offset, real-time Lyapunov regression
What exactly diverges?
A deterministic system evolves from one state to the next by fixed rules, so two trajectories starting at the same point remain identical forever. The question is: how quickly do trajectories that start close by diverge? For a double pendulum, starting at (θ₁, θ₂) = (2.0, 1.0) and at (2.0 + 10−6, 1.0) — a difference of less than a millionth of a radian — produces completely different motions within a few tens of seconds.
The Lyapunov exponent λ quantifies this: on average, the separation δ(t) ≈ δ(0)·eλt. If λ > 0, the system is chaotic. The larger λ, the faster two initially nearby states diverge and the shorter the horizon over which prediction is meaningful. A prediction error doubles every t½ = ln 2 / λ seconds.
Ensemble approach and regression
Rather than renormalizing a single perturbation (the standard Benettin algorithm), the simulation takes a simpler approach: run N = 30 members simultaneously, each offset by Δθ₁(k) = k · Δθ, and track max|θ₁(k,t) − θ₁(0,t)| over time. Since the maximum separation grows exponentially (until saturation), log₁₀(separation) grows linearly. A linear regression through the middle 75% of the log-separation history gives a slope that, after conversion, estimates λ in bits per second.
Try it: Set the initial spread Δθ to 10−7 (Ultra-fine preset) and watch the log-separation plot evolve. During the initial coherent phase, all members are indistinguishable. Then — suddenly — the fan opens and the slope on the right panel steepens. The Lyapunov estimate stabilises once the regression history is long enough.
Regular vs chaotic initial conditions
Not all initial conditions of the double pendulum are chaotic. With small angles (say both < 20°) the system behaves almost like two coupled linear pendulums — the ensemble fan stays narrow for minutes and the log-separation plot is nearly flat (λ ≈ 0). Increasing the initial angle pushes the system across an invisible boundary in phase space between Kolmogorov-Arnold-Moser (KAM) tori (regular behaviour) and chaotic sea. The "Crossing angles" preset (θ₁ = 2.5, θ₂ = 2.5 rad) reliably produces chaos within a few integration steps.
II. Viscoelastic Materials: Between Elastic and Viscous
Viscoelastic Fluid
Drag an interactive blob; see rheology curves for three spring-dashpot models
Why do polymers bounce and flow?
Silly Putty bounces off the floor (elastic) but sags slowly under its own weight (viscous). This is not a property failure — it is exactly what viscoelasticity predicts. The key is the ratio of the observation timescale tobs to the material relaxation time τR. The Deborah number De = τR / tobs:
- De ≫ 1 (fast deformation, slow material): elastic-dominated behaviour = bouncing.
- De ≪ 1 (slow deformation, long time): viscous-dominated behaviour = sagging.
- De ≈ 1: mixed response where both energy storage and dissipation are significant.
The name honours the biblical prophetess Deborah who said "the mountains flowed before the Lord" (Judges 5:5) — rhetorically, all matter flows on a long enough timescale.
Three model geometries and their signatures
Each model is a circuit of springs (elastic elements, modulus G₀) and dashpots (viscous elements, viscosity η):
- Maxwell — Series. Under constant stress, strain increases without bound (flows). Under constant strain, stress decays fully to zero. Good for liquids: colognes, polymer solutions. G→0 at low frequency.
- Kelvin-Voigt — Parallel. Under constant stress, strain increases asymptotically to σ/G₀ (bounded creep). Stress does not relax to zero. Good for gels, rubber, biological tissues. G′ = const at all frequencies.
- Standard Linear Solid (SLS) — Maxwell arm parallel to a spring. Both bounded creep and genuine stress relaxation. G at long times = αG₀ where α ∈ (0,1). Best fit for most real polymers, cartilage, muscle.
Reading the dynamic spectrum G′(ω) and G″(ω)
In an oscillatory shear experiment with strain ε = ε₀ sin(ωt), the in-phase component of the stress is G′ (storage modulus, energy stored elastically per cycle) and out-of-phase is G″ (loss modulus, energy dissipated). The crossover frequency ωc = 1/τR is where G′ = G″; below it viscous dominates, above it elastic dominates.
For the Maxwell model this crossover is a perfect crossing of two simple curves. Look at the frequency-sweep tab in the simulation: drag G₀ or η and watch ωc shift left and right. Since τR = η/G₀, doubling viscosity at constant elasticity shifts the crossover to lower frequency — the material has a longer memory.
III. Seeing Signals in Time-Frequency Space
DFT & STFT Visualiser
Live Fourier spectrum plus scrolling STFT spectrogram for seven signal types
From "which frequencies" to "which frequencies at which time"
The Discrete Fourier Transform answers a global question: what frequencies are present in the entire signal? For a stationary sine wave this is exactly what you need. But for a chirp (frequency sweeping over time), or a music note that decays, or a drum hit with a sharp transient followed by room reverb, the DFT gives a smeared average that loses the temporal structure.
The Short-Time Fourier Transform answers the local question: what frequencies are present in each short window of time? By sliding a window of N samples across the signal, computing the DFT at each position, and stacking the results, we get the spectrogram: a 2D image with time on the horizontal axis, frequency on the vertical axis, and colour encoding log-magnitude. A chirp appears as a diagonal streak; a pure tone as a horizontal line; a drum hit as a vertical burst that quickly fades.
The uncertainty principle in signal processing
There is a fundamental trade-off — mathematically equivalent to Heisenberg's uncertainty principle — between time resolution and frequency resolution in the STFT:
Δt · Δf ≥ 1 / (4π) (Gabor limit)
A short window gives good time resolution (you can see exactly when an impulse occurs) but poor frequency resolution (the spectrum of a short chirp is blurry). A long window gives sharp frequency resolution but blurs time. The simulation lets you change the window length N: try N = 128 vs. N = 1024 on the chirp signal and observe this trade-off directly in the spectrogram.
Window functions and spectral leakage
If a sinusoid does not complete an exact integer number of cycles within the DFT window, the abrupt truncation at the window edges creates a discontinuity that smears energy across all frequency bins — this is spectral leakage. Window functions taper the signal smoothly to zero at the edges, reducing leakage at the cost of a wider main lobe.
To see leakage live: select a pure Sine signal and zoom in on the DFT spectrum panel. With Rectangular windowing you'll see multiple secondary peaks neighbouring the main spike. Switch to Blackman: the secondary peaks collapse dramatically, leaving only the main spike and its immediate neighbours. Switch back to Rectangular: the leakage returns. This is the most direct demonstration of why audio engineers default to Hanning or Hamming windowing.
The AM signal dissected
Amplitude modulation (AM radio) multiplies a carrier cos(2πfct) by a slowly varying message signal 1 + m·cos(2πfmt). Expanding:
x(t) = cos(2πfct) + (m/2)cos(2π(fc+fm)t) + (m/2)cos(2π(fc-fm)t)
The DFT should therefore show three peaks: the carrier at fc and two sidebands at fc ± fm. Try the AM preset in the simulation: set f₀ = 400 Hz (carrier frequency), and you'll see the carrier peak flanked by two smaller sidebands, with the separation proportional to fm = f₀/10 = 40 Hz.
Connections Across the Three Themes
All three Wave 61 simulations are about measuring hidden structure in dynamic systems. The Lyapunov exponent measures how fast information about initial conditions decays in a chaotic system. The complex modulus measures how energy is partitioned between storage and loss in a viscoelastic material. The Fourier transform measures the energy distribution across frequencies in a signal.
There is even a direct mathematical link: the complex modulus G*(ω) = G′(ω) + iG″(ω) that you compute in the viscoelastic simulation is related to the Fourier transform of the stress relaxation modulus G(t): G*(ω) = iω∫₀^∞ G(t) e−iωt dt. Rheology and signal processing are, at some level, the same mathematics.