Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Linear dynamics for nonlinear systems
Nonlinear systems are hard because their parts interact. Koopman’s idea was to stop following the state and follow measurements of it instead: its position, its energy, its square, and so on. The rule that moves measurements forward in time is always linear, which means the whole toolbox of linear algebra applies. The price is that you may need infinitely many measurements. Sometimes a few are enough and the linear model is exact; often they are not, and the approximation has to be checked.
Koopman methods are used to design controllers for nonlinear systems with linear tools, to analyse fluid flows and power grids, and to build interpretable models from data.
- 1. The Koopman operator acts on…
- 2. The Koopman operator is…
- 3. A Koopman eigenfunction evolves…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.By hand
- Definition: for a flow map F_t, the Koopman operator acts on observables g by (𝒦_t g)(x) = g(F_t(x)). It is linear in g, whatever the dynamics.
- Eigenfunctions: 𝒦_t φ = e^(λt) φ, so φ(x(t)) = e^(λt) φ(x(0)). Products of eigenfunctions are eigenfunctions with summed eigenvalues; conserved quantities have λ = 0.
- Invariant subspaces: if a set of observables maps into its own span, the Koopman operator restricted to it is a finite matrix and a linear model of those observables is exact.
- EDMD (Williams, Kevrekidis and Rowley, 2015): choose a dictionary Ψ, fit K by least squares from Ψ(x_(k+1)) ≈ Ψ(x_k) K; DMD is EDMD with the linear dictionary.
- Limits: systems with several attractors or continuous spectra (chaos) have no finite invariant subspace containing the state; truncation creates spurious eigenvalues, some unstable.
- Learned dictionaries: autoencoders that learn observables and a linear latent map (Lusch, Kutz and Brunton, 2018).
- 1. Conserved quantities are Koopman eigenfunctions with eigenvalue…
- 2. EDMD with the dictionary (x) alone is…
- 3. On an invariant subspace, a linear model of the observables is…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.Eigenfunctions of a nonlinear system
Exercise 1.
- The system x′ = μx, y′ = λ(y − x²) with μ = −0.05, λ = −1, integrated by RK4.
- Checks that x, x² and y − b x² with b = λ/(λ − 2μ) scale by e^(μt), e^(2μt) and e^(λt), and that trajectories approach the slow manifold y = b x².
- The pendulum θ′ = ω, ω′ = −sin θ and its energy, an eigenfunction with eigenvalue 0.
Practice.
- Start from physics: include observables you know matter (energy, products appearing in the equations).
- Check eigenvalues: unstable eigenvalues for a dissipative or conservative system are a sign of truncation or overfitting.
- Validate on long rollouts, not only one-step errors.
- Regularise or constrain K (stability constraints, smaller dictionaries, more trajectories) when long predictions are needed.
- Tools: PyKoopman, PyDMD (EDMD variants), pykoopman’s neural observables, and deep Koopman autoencoders in PyTorch.
import numpy as np
def dictionary(S): # observables (x, y, x^2, 1)
return np.stack([S[:, 0], S[:, 1], S[:, 0]**2, np.ones(len(S))], 1)
PX, PY = dictionary(X), dictionary(Y) # snapshot pairs of states
K = np.linalg.lstsq(PX, PY, rcond=None)[0] # Psi(x(k+1)) ≈ Psi(x_k) K
rates = np.log(np.linalg.eigvals(K)).real / dt # continuous Koopman eigenvalues
z = dictionary(S0)
for _ in range(100): z = z @ K # linear prediction; state = z[:, :2]- 1. A Python package for Koopman models:
- 2. Unstable EDMD eigenvalues for a pendulum suggest…
- 3. Koopman models should be validated on…
Level 3: Advanced
★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.Theory
An exact finite subspace. For x′ = μx, y′ = λ(y − x²): x evolves by e^(μt), x² by e^(2μt), and y − b x² by e^(λt) when b = λ/(λ − 2μ). So (x, x², y) span an invariant subspace and the nonlinear system is exactly linear in these three observables. EDMD with (x, y, x², 1) recovered the eigenvalues −0.05, −0.1, −1 and 0 and predicted 10 time units with error below 1e-6; without x² the error was 0.4.
No exact subspace. The pendulum’s eigenfunctions include the energy (eigenvalue 0) and functions of the phase whose frequencies depend on the energy; no finite set of polynomials is invariant. EDMD on monomials of degree 1, 3 and 5 gave prediction errors over one time unit of 0.1, 0.03 and 0.006. Over ten time units, degree 1 gave 1.0 while degrees 3 and 5 diverged (error above 10): K had eigenvalues of modulus 1.05 and 1.23, which grow without bound when applied a hundred times.
- 1. Here x² evolves by…
- 2. Degrees 3 and 5 diverged over ten time units because…
- 3. The pendulum energy is an eigenfunction with eigenvalue…
Level 4: Expert
★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.When does a finite Koopman model predict a nonlinear system exactly, and what goes wrong when it cannot?
History.
- B. Koopman (1931) introduced the operator for Hamiltonian systems.
- I. Mezić (2005) and C. Rowley et al. (2009) revived it for data analysis and linked it to DMD.
- M. Williams, I. Kevrekidis and C. Rowley (2015) introduced EDMD; S. Brunton et al. (2016) studied Koopman invariant subspaces for control, including the slow-manifold example.
- B. Lusch, J. N. Kutz and S. Brunton (2018) learned Koopman observables with deep autoencoders.
Exercise 2. Time step 0.1. Slow manifold: 30 training trajectories of 5 time units, 50 test trajectories of 10. Pendulum: 100 training trajectories of 3 time units, 50 test trajectories of 10. Relative prediction error of the state.
| model | error over 1 unit | 3 units | 10 units | max eigenvalue modulus |
|---|---|---|---|---|
| slow manifold, (x, y) | 0.4 | |||
| slow manifold, (x, y, x²) | below 1e-6 | |||
| pendulum, degree 1 | 0.1 | 0.4 | 1.0 | 1.0 |
| pendulum, degree 3 | 0.03 | 0.4 | above 10 | 1.05 |
| pendulum, degree 5 | 0.006 | 0.3 | above 10 | 1.23 |
- Invariant subspace, exact model: eigenvalues 0, −0.05, −0.1 and −1 recovered.
- No invariant subspace: richer dictionaries helped at first and then diverged.
- Seeds 1 and 2: slow-manifold results identical; pendulum degree 5 errors 0.007 and 0.001 over one unit and above 10 over ten; on seed 2, degree 3 stayed bounded (0.6 over ten units, max modulus 1.01).
Koopman methods in practice
- Control: linear model-predictive control on Koopman observables for robots, vehicles and power systems.
- Fluids: Koopman modes of cylinder wakes and other periodic flows.
- Power grids and buildings: data-driven linear models for monitoring and control.
- Molecular dynamics: Markov state models and VAMP are Koopman-type methods for slow conformational changes.
References
- B. O. Koopman (1931). “Hamiltonian systems and transformation in Hilbert space.” Proceedings of the National Academy of Sciences.
- I. Mezić (2005). “Spectral properties of dynamical systems, model reduction and decompositions.” Nonlinear Dynamics.
- M. O. Williams, I. G. Kevrekidis and C. W. Rowley (2015). “A data-driven approximation of the Koopman operator: extending dynamic mode decomposition.” Journal of Nonlinear Science.
- S. L. Brunton, B. W. Brunton, J. L. Proctor and J. N. Kutz (2016). “Koopman invariant subspaces and finite linear representations of nonlinear dynamical systems for control.” PLOS ONE.
- B. Lusch, J. N. Kutz and S. L. Brunton (2018). “Deep learning for universal linear embeddings of nonlinear dynamics.” Nature Communications.