Foundations to Frontier
Tests
J. Scientific Machine Learning › J5 Surrogate Modeling and Reduced-Order Models

Dynamic mode decomposition

Dynamic mode decomposition (DMD) fits the best linear map from each snapshot of a system to the next and decomposes it into spatial modes, each with one frequency and one growth or decay rate. It needs only data, gives interpretable oscillations, and forecasts by advancing each mode. This page recovers the eigenvalues of a two-mode travelling-wave field, shows that noise biases standard DMD towards too much damping, removes most of that bias with total-least-squares DMD, and examines the choice of rank.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Oscillations hidden in snapshots

Record a vibrating structure or a swirling wake at regular moments. DMD looks for the simplest rule that turns each recording into the next: a linear map. That map is broken into patterns, each of which oscillates at one frequency and grows or fades at one rate. Knowing those patterns tells you what the system is doing, and running them forward gives a forecast. Measurement noise, however, makes the patterns look more damped than they are, unless the method is corrected.

Surrogate and reduced-order model lab
A two-frequency damped signal (black) observed with noise up to the vertical line, and a Hankel-DMD forecast with 8 delays (green). Circle: DMD eigenvalues and the unit circle. forecast error over steps 100–159: 5.1% · max |λ| = 0.994. Two oscillations need at least 4 delays.
Why engineers care

DMD has been used to find coherent structures in jets and wakes, travelling waves in brain recordings, and patterns in power grids, traffic and epidemics.

📝 Quick check (Level 0)
0/3 answered
  1. 1. DMD fits…
  2. 2. Each DMD mode has…
  3. 3. Noise makes standard DMD modes look…

Level 1: Beginner

★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.

By hand

  • Data: snapshot pairs X = [u_0 … u_(m−1)], Y = [u_1 … u_m] with u_(k+1) ≈ A u_k.
  • Exact DMD (Schmid, 2010; Tu et al., 2014): A ≈ Y X⁺; with the rank-r SVD X ≈ U Σ Vᴴ, the reduced matrix à = Uᴴ Y V Σ⁻¹ has eigenvalues μ_j, and the DMD modes are Φ = Y V Σ⁻¹ W.
  • Continuous eigenvalues: λ_j = log(μ_j)/Δt; Re λ is the growth rate, Im λ the angular frequency. A real oscillation appears as a conjugate pair.
  • Reconstruction and forecast: u_k ≈ Σ_j Φ_j μ_j^k b_j with amplitudes b from the first snapshot.
  • Noise bias: least squares treats X as exact; noise in X biases the eigenvalues towards the origin (too much damping). Total-least-squares DMD (Hemati et al., 2017), forward–backward DMD and optimised DMD (Askham and Kutz, 2018) correct this.
  • Variants: Hankel or delay DMD for few sensors, DMD with control, multiresolution DMD; DMD approximates the Koopman operator on linear observables (J5-4).
📝 Quick check (Level 1)
0/3 answered
  1. 1. A real oscillation appears in DMD as…
  2. 2. |μ| < 1 for a DMD eigenvalue means…
  3. 3. TLS DMD corrects…

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.

DMD on clean data

Exercise 1.

  • Snapshots of u(x, t) = Re(φ1 e^(λ1 t)) + Re(φ2 e^(λ2 t)) on 64 points with λ1 = −0.05 + 2i, λ2 = −0.2 + 5i and Δt = 0.05.
  • Exact DMD of rank 4: eigenvalues, modes, amplitudes, reconstruction.
  • A check on data from a known 2 × 2 linear map.

Practice.

  • Use rank 2 per real oscillation plus any steady or slowly varying components; choose r from the singular values and test forecasts.
  • Expect noise bias: if eigenvalues sit inside the unit circle more than physics suggests, try TLS, forward–backward or optimised DMD.
  • Subtract the mean for data oscillating around a steady state, or keep a mode with μ ≈ 1 for it.
  • With few sensors, stack delayed copies (Hankel DMD).
  • Tools: PyDMD (exact, TLS via tlsq_rank, forward–backward, optimised, Hankel, multiresolution DMD), and the DMD book code by Kutz et al.
import numpy as np

X, Y = D[:, :-1], D[:, 1:]                                   # snapshot pairs
U, s, Vh = np.linalg.svd(X, full_matrices=False)
U, s, V = U[:, :r], s[:r], Vh[:r].conj().T                   # rank r
mu, W = np.linalg.eig(U.conj().T @ Y @ V / s)                # discrete eigenvalues
Phi = Y @ V / s @ W                                          # DMD modes
lam = np.log(mu) / dt                                        # growth rate + i·frequency
b = np.linalg.lstsq(Phi, D[:, 0], rcond=None)[0]             # amplitudes; forecast Phi @ (b * mu**k)
🐍 Exercise 1: exact DMD
Generate two travelling-wave modes, run exact DMD of rank 4, and check eigenvalues and reconstruction.
📝 Quick check (Level 2)
0/3 answered
  1. 1. A Python package for DMD:
  2. 2. Each real oscillation needs rank…
  3. 3. With few sensors, use…

Level 3: Advanced

★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.

Theory

Why noise causes damping. In the scalar case x_(k+1) = a x_k, the least-squares estimate Σ x̃_k x̃_(k+1) / Σ x̃_k² from noisy observations x̃ divides by a sum inflated by the noise variance, so it shrinks a towards zero. DMD does the same in every direction: eigenvalues move inside the unit circle and the growth rates become too negative. Total least squares treats X and Y symmetrically, projecting both onto the leading subspace of the stacked data, which removes most of the bias.

Results in the exercise. Clean data gave decay rates −0.05 and −0.2 and a forecast error below 1e-6. With noise 0.05, exact DMD gave −0.11 and −0.35 and a 100-step forecast error of 0.5; TLS DMD gave −0.05 and −0.21 and 0.09. With noise 0.2, exact DMD gave −0.84 and −2.45 (forecast error 1.0, the forecast had decayed to nothing), TLS −0.04 and −0.26 (0.2). With rank 2 only one oscillation could be represented and the forecast error was 2.0; rank 4 gave 0.09 and rank 8 0.1.

📝 Quick check (Level 3)
0/3 answered
  1. 1. Least squares on noisy X shrinks the estimate because…
  2. 2. TLS DMD treats X and Y…
  3. 3. Rank 2 failed here because…

Level 4: Expert

★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.

How much does noise distort DMD eigenvalues and forecasts, and how much does total-least-squares DMD recover?

History.

  • P. Schmid (2010) introduced DMD for fluid flows; C. Rowley et al. (2009) connected it to the Koopman operator.
  • J. Tu, C. Rowley, D. Luchtenburg, S. Brunton and J. N. Kutz (2014) defined exact DMD.
  • S. Dawson et al. (2016) and M. Hemati et al. (2017) analysed noise bias and proposed forward–backward and total-least-squares DMD; T. Askham and J. N. Kutz (2018) introduced optimised DMD.
  • J. N. Kutz, S. Brunton, B. Brunton and J. Proctor (2016) wrote the standard book.

Exercise 2. Data as in Exercise 1 with Gaussian noise; DMD of rank 4 on the first 200 snapshots; forecast of the next 100 compared with clean data (relative error).

noise exact DMD: rates / forecast TLS DMD: rates / forecast
0 −0.05, −0.2 / below 1e-6 −0.05, −0.2 / below 1e-6
0.05 −0.11, −0.35 / 0.5 −0.05, −0.21 / 0.09
0.2 −0.84, −2.45 / 1.0 −0.04, −0.26 / 0.2
  • Noise doubled the damping of exact DMD at noise 0.05 and made it 12–17 times too large at 0.2.
  • TLS DMD kept the rates close to the truth and forecast 5 times better.
  • Rank mattered: TLS forecast error 2.0 / 0.09 / 0.1 for ranks 2 / 4 / 8.
  • Seeds 1 and 2: exact DMD at noise 0.05 gave −0.12 and −0.11 for the first rate, TLS −0.06 and −0.05; TLS forecast errors 0.07 and 0.05; at noise 0.2, TLS forecast errors 0.4 and 0.8, so the advantage shrinks at high noise.
🐍 Exercise 2 (research): how much does noise distort DMD eigenvalues and forecasts, and how much does total-least-squares DMD recover?
Run exact and total-least-squares DMD on noisy snapshots of two travelling-wave modes, compare the recovered decay rates and the forecasts, and vary the rank.

DMD in practice

  • Fluid dynamics: coherent structures and their frequencies in jets, wakes and cavity flows.
  • Neuroscience: travelling waves and sleep spindles in multi-electrode recordings.
  • Power grids and video: oscillation monitoring; background–foreground separation in video.
  • Epidemiology and climate: seasonal and spatial patterns from incidence or temperature data.

References

  1. P. J. Schmid (2010). “Dynamic mode decomposition of numerical and experimental data.” Journal of Fluid Mechanics.
  2. J. H. Tu, C. W. Rowley, D. M. Luchtenburg, S. L. Brunton and J. N. Kutz (2014). “On dynamic mode decomposition: theory and applications.” Journal of Computational Dynamics.
  3. M. S. Hemati, C. W. Rowley, E. A. Deem and L. N. Cattafesta (2017). “De-biasing the dynamic mode decomposition for applied Koopman spectral analysis of noisy datasets.” Theoretical and Computational Fluid Dynamics.
  4. T. Askham and J. N. Kutz (2018). “Variable projection methods for an optimized dynamic mode decomposition.” SIAM Journal on Applied Dynamical Systems.
  5. J. N. Kutz, S. L. Brunton, B. W. Brunton and J. L. Proctor (2016). Dynamic Mode Decomposition: Data-Driven Modeling of Complex Systems. SIAM.