The Langevin package provides functions to estimate drift and diffusion functions from data sets.
A wide range of dynamic systems can be described by a stochastic differential equation, the Langevin equation. The time derivative of the system trajectory \(\dot{X}(t)\) can be expressed as a sum of a deterministic part \(D^{(1)}\) and the product of a stochastic force \(\Gamma(t)\) and a weight coefficient \(D^{(2)}\). The stochastic force \(\Gamma(t)\) is \(\delta\)-correlated Gaussian white noise.
For stationary continuous Markov processes Siegert et al. and Friedrich et al. developed a method to reconstruct drift \(D^{(1)}\) and diffusion \(D^{(2)}\) directly from measured data.
$$ \dot{X}(t) = D^{(1)}(X(t),t) + \sqrt{D^{(2)}(X(t),t)}\,\Gamma(t)\quad \mathrm{with} $$ $$ D^{(n)}(x,t) = \lim_{\tau \rightarrow 0} \frac{1}{\tau} M^{(n)}(x,t,\tau)\quad \mathrm{and} $$ $$ M^{(n)}(x,t,\tau) = \frac{1}{n!} \langle (X(t+\tau) - x)^n \rangle |_{X(t) = x} $$
The Langevin equation should be interpreted in the way that for every time \(t_i\) where the system meets an arbitrary but fixed point \(x\) in phase space, \(X(t_i+\tau)\) is defined by the deterministic function \(D^{(1)}(x)\) and the stochastic function \(\sqrt{D^{(2)}(x)}\Gamma(t_i)\). Both, \(D^{(1)}(x)\) and \(D^{(2)}(x)\) are constant for fixed \(x\).
One can integrate drift and diffusion numerically over small intervals. If the system is at time \(t\) in the state \(x = X(t)\) the drift can be calculated for small \(\tau\) by averaging over the difference of the system state at \(t+\tau\) and the state at \(t\). The average has to be taken over the whole ensemble or in the stationary case over all \(t = t_i\) with \(X(t_i) = x\). Diffusion can be calculated analogously.
Philip Rinn
This package was developed by the research group Turbulence, Wind energy and Stochastics (TWiSt) at the Carl von Ossietzky University of Oldenburg (Germany).
A review of the Langevin method can be found at:
Friedrich, R.; et al. (2011) Approaching Complexity by Stochastic Methods: From Biological Systems to Turbulence. Physics Reports, 506(5), 87–162.
For further reading:
Risken, H. (1996) The Fokker-Planck equation. Springer.
Siegert, S.; et al. (1998) Analysis of data sets of stochastic systems. Phys. Lett. A.
Friedrich, R.; et al. (2000) Extracting model equations from experimental data. Phys. Lett. A.
Honisch, C.; Friedrich, R. (2011). Estimation of Kramers-Moyal coefficients at low sampling rates.. Physical Review E, 83(6), 066701.
Useful links: