(require 'ob-dot)
(setq org-confirm-babel-evaluate nil)
- The point of this final project is to learn parameters in Lorenz63 using monte carlo methods. The approach taken is to formulate a Hamiltonian using the dynamic residuals, and then sample from the corresponding Gibbs distribution.
- Another similar idea is to estimate the state of the system given noisy observations (e.g. data assimilation).
This system is one of the earliest examples of what would later become
known as chaotic dynamical systems. It is obtained by projection of
the Rayleigh-Benard equations for convection of a thin layer onto
three orthogonal modes. The system is given by
\begin{align}
\dot{X} &= σ(Y-X)
\dot{Y} &= -XZ + rX - Y\
\dot{Z} &= XY - bZ.
\end{align}
The parameters used by Lorenz are
- Let
$U$ be given by the dynamics \[ \dot{U} = F(U; θ) + ε \dot{W}\] where$θ$ is some set of parameters. - Let $Ψ_tθ$ be the propagator, defined by
\[Ψ_tθU(s) = U(t+s).\]
-
Temporal grid: Let
$T > 0$ ,$N$ , and define$τ = T / (N+1)$ . Then, a temporal grid$t_j=j τ$ can be defined for$j=0…N$ .
Given a set of point estimates
Then, a sensible way to choose the parameters is so that they minimize \[ ∑j=1N|e_j|^2.\]
Because
- Vector of parameters
$θ = [σ, r, b]$ - Generate samples
$θ_k$ from \[ f(θ) \propto exp \left( -\frac{β}{N}∑j=1N|e_j(θ)|^2 \right).\] - The mode of
$f(θ)$ is the value that minimizes the dynamic residuals
Note that $Uj$ is only in
- Independent gaussian proposal function: \[P(θ0, θ_1) \propto exp \left( -\frac{1}{2} (θ_1 -θ_0)^T C-1 (θ_1 -θ_0) \right) \]
- Covariance matrix: $C11 = .5^2$, $C22 = .1^2$, $C33=1.0^2$,
$Cij = 0$ if
$i≠ j$ .
Metropolis-Hastings acceptance probability: \[ A(θ_0, θ_1 ) = min \left\{1, \frac{f(θ_1) P(θ_1, θ_0)}{f(θ_0) P(θ_0, θ_1)} \right\} \]
- Language: C++ for sampler, Python for plotting/analysis
- C++ Libraries:
- Armadillo++ for convenient vector arithmetic
- GNU Scientific Library for random number generation
- The integrator for the dynamical system is defined in src/integrate.cpp.
- Second order explicit predictor/corrector method for deterministic dynamics
- Forward Euler for the stochastic terms
- src/equil.cpp contains the equilibrium distribution
- The basic proposal distribution and metropolis acceptance function are defined in src/mcmc.cpp.
- src/param_search.cpp contains the parameter searching method.
- Let
$ε = 5.0$
- Using the dynamic residuals method to find parameters works well for
short observations times
$τ \leq .5$ . - MCMC performance is very poor for larger
$τ$ . - Making a model error can help regularize the fit
-
$σ$ is the most difficult parameter to estimate
- Use dynamic residuals might work better for the data assimilation problem
- Parameter fitting might be better done by matching equilbrium statistics of the attractor rather than exact paths.