make_lorenz63¶
- kooplearn.datasets.make_lorenz63(X0, n_steps=100, dt=0.01, sigma=10.0, mu=28.0, beta=2.667)[source]¶
Generate a trajectory from the Lorenz-63 system.
The Lorenz-63 system is a simplified mathematical model of atmospheric convection that exhibits chaotic behavior. It is one of the most famous examples of deterministic chaos.
The system is governed by:
\[\begin{split}\begin{cases} \frac{dx}{dt} = \sigma(y - x) \\ \frac{dy}{dt} = x(\mu - z) - y \\ \frac{dz}{dt} = xy - \beta z \end{cases}\end{split}\]- Parameters:
X0 (
array-like,shape (3,)) – Initial conditions[x, y, z].n_steps (
int, default100) – Number of time steps to simulate.dt (
float, default0.01) – Time step size for numerical integration.sigma (
float, default10.0) – The \(\sigma\) parameter, controlling the ratio of the rate of heat conduction to the rate of convection.mu (
float, default28.0) – The \(\mu\) parameter (also called \(\rho\)), representing the Rayleigh number.beta (
float, default8/3) – The \(\beta\) parameter, related to the physical dimensions of the convection layer.
- Returns:
df – Trajectory of the Lorenz-63 system with columns
['x', 'y', 'z']andn_steps + 1samples. Has a MultiIndex with levels['step', 'time']. Metadata stored indf.attrsincludes:'generator':'make_lorenz63';'X0': initial conditions;'params': dict of all parameters.
- Return type:
pandas.DataFrame
Examples
>>> import numpy as np >>> X0 = np.array([1.0, 0.0, 0.0]) >>> df = make_lorenz63(X0, n_steps=1000, dt=0.01) >>> df.shape (1001, 3) >>> df.columns.tolist() ['x', 'y', 'z'] >>> df.attrs['generator'] 'make_lorenz63'
Access time values from index:
>>> times = df.index.get_level_values('time')Generate classic chaotic trajectory from near the attractor:
>>> df_chaotic = make_lorenz63( ... X0=[0.0, 1.0, 1.05], ... n_steps=10000, ... dt=0.01, ... sigma=10.0, ... mu=28.0, ... beta=8.0/3.0 ... )