# Lorenz system

The Lorenz system is a system of ordinary differential equations first studied by mathematician and meteorologist Edward Lorenz. It is notable for having chaotic solutions for certain parameter values and initial conditions. In particular, the Lorenz attractor is a set of chaotic solutions of the Lorenz system. The term "butterfly effect" in popular media may stem from the real-world implications of the Lorenz attractor, namely that tiny changes in initial conditions evolve to completely different trajectories. This underscores that chaotic systems can be completely deterministic and yet still be inherently impractical or even impossible to predict over longer periods of time. For example, even the small flap of a butterfly's wings could set the earth's atmosphere on a vastly different trajectory, in which for example a hurricane occurs where it otherwise would have not (see Saddle points). The shape of the Lorenz attractor itself, when plotted in phase space, may also be seen to resemble a butterfly.

## Overview

In 1963, Edward Lorenz, with the help of Ellen Fetter who was responsible for the numerical simulations and figures, and Margaret Hamilton who helped in the initial, numerical computations leading up to the findings of the Lorenz model, developed a simplified mathematical model for atmospheric convection. The model is a system of three ordinary differential equations now known as the Lorenz equations:
    ${\begin{aligned}{\frac {\mathrm {d} x}{\mathrm {d} t}}&=\sigma (y-x),\\[6pt]{\frac {\mathrm {d} y}{\mathrm {d} t}}&=x(\rho -z)-y,\\[6pt]{\frac {\mathrm {d} z}{\mathrm {d} t}}&=xy-\beta z.\end{aligned}}$
The equations relate the properties of a two-dimensional fluid layer uniformly warmed from below and cooled from above. In particular, the equations describe the rate of change of three quantities with respect to time: x is proportional to the rate of convection, y to the horizontal temperature variation, and z to the vertical temperature variation. The constants σ, ρ, and β are system parameters proportional to the Prandtl number, Rayleigh number, and certain physical dimensions of the layer itself.
The Lorenz equations can arise in simplified models for lasers, dynamos, thermosyphons, brushless DC motors, electric circuits, chemical reactions and forward osmosis. Interestingly, the same Lorenz equations were also derived in 1963 by Sauermann and Haken for a single-mode laser. In 1975, Haken realized that their equations derived in 1963 were mathematically equivalent to the original Lorenz equations. Haken's paper thus started a new field called laser chaos or optical chaos. The Lorenz equations are often called Lorenz-Haken equations in optical literature. Later on, it was also shown the complex version of Lorenz equations also had laser equivalent ones.
The Lorenz equations are also the governing equations in Fourier space for the Malkus waterwheel. The Malkus waterwheel exhibits chaotic motion where instead of spinning in one direction at a constant speed, its rotation will speed up, slow down, stop, change directions, and oscillate back and forth between combinations of such behaviors in an unpredictable manner.
From a technical standpoint, the Lorenz system is nonlinear, aperiodic, three-dimensional and deterministic. The Lorenz equations have been the subject of hundreds of research articles, and at least one book-length study.

## Analysis

One normally assumes that the parameters σ, ρ, and β are positive. Lorenz used the values σ = 10, ρ = 28, and β = ⁠8/3⁠. The system exhibits chaotic behavior for these (and nearby) values.
If ρ < 1 then there is only one equilibrium point, which is at the origin. This point corresponds to no convection. All orbits converge to the origin, which is a global attractor, when ρ < 1.
A pitchfork bifurcation occurs at ρ = 1, and for ρ > 1 two additional critical points appear at $\left({\sqrt {\beta (\rho -1)}},{\sqrt {\beta (\rho -1)}},\rho -1\right)\quad {\text{and}}\quad \left(-{\sqrt {\beta (\rho -1)}},-{\sqrt {\beta (\rho -1)}},\rho -1\right).$ These correspond to steady convection. This pair of equilibrium points is stable only if
    $\rho <\sigma {\frac {\sigma +\beta +3}{\sigma -\beta -1}},$
which can hold only for positive ρ if σ > β + 1. At the critical value, both equilibrium points lose stability through a subcritical Hopf bifurcation.
When ρ = 28, σ = 10, and β = ⁠8/3⁠, the Lorenz system has chaotic solutions (but not all solutions are chaotic). Almost all initial points will tend to an invariant set – the Lorenz attractor – a strange attractor, a fractal, and a self-excited attractor with respect to all three equilibria. Its Hausdorff dimension is estimated from above by the Lyapunov dimension (Kaplan-Yorke dimension) as 2.06±0.01, and the correlation dimension is estimated to be 2.05±0.01. The exact Lyapunov dimension formula of the global attractor can be found analytically under classical restrictions on the parameters:
    $3-{\frac {2(\sigma +\beta +1)}{\sigma +1+{\sqrt {\left(\sigma -1\right)^{2}+4\sigma \rho }}}}$
The Lorenz attractor is difficult to analyze, but the action of the differential equation on the attractor is described by a fairly simple geometric model. Proving that this is indeed the case is the fourteenth problem on the list of Smale's problems. This problem was the first one to be resolved, by Warwick Tucker in 2002.
For other values of ρ, the system displays knotted periodic orbits. For example, with ρ = 99.96 it becomes a T(3,2) torus knot.
Example solutions of the Lorenz system for different values of ρ :
| ρ = 14, σ = 10, β = ⁠8/3⁠ (Enlarge) | ρ = 13, σ = 10, β = ⁠8/3⁠ (Enlarge) |
| ρ = 15, σ = 10, β = ⁠8/3⁠ (Enlarge) | ρ = 28, σ = 10, β = ⁠8/3⁠ (Enlarge) |
| For small values of ρ, the system is stable and evolves to one of two fixed point attractors. When ρ > 24.74, the fixed points become repulsors and the trajectory is repelled by them in a very complex way. ||
Sensitive dependence on the initial condition :
| Time t = 1 (Enlarge) | Time t = 2 (Enlarge) | Time t = 3 (Enlarge) |
| These figures — made using ρ = 28, σ = 10, and β = ⁠8/3⁠ — show three time segments of the 3-D evolution of two trajectories (one in blue, the other in yellow) in the Lorenz attractor starting at two initial points that differ only by 10$^{−5}$ in the x-coordinate. Initially, the two trajectories seem coincident (only the yellow one can be seen, as it is drawn over the blue one) but, after some time, the divergence is obvious. |||
* Divergence of nearby trajectories.
* Evolution of three initially nearby trajectories of the Lorenz system. In this animation the equation is numerically integrated using a Runge-Kutta routine — made using starting from three initial conditions (0.9,0,0) (green), (1.0,0,0) (blue) and (1.1,0,0) (red). Produced with WxMaxima.
* The parameters are: $\rho =28$, $\sigma =10$, and $\beta =8/3$ . Significant divergence is seen at around $t=24.0$, beyond which the trajectories become uncorrelated. The full-sized graphic can be accessed here.

## Connection to tent map

In Figure 4 of his paper, Lorenz plotted the relative maximum value in the z direction achieved by the system against the previous relative maximum in the z direction. This procedure later became known as a Lorenz map (not to be confused with a Poincaré plot, which plots the intersections of a trajectory with a prescribed surface). The resulting plot has a shape very similar to the tent map. Lorenz also found that when the maximum z value is above a certain cut-off, the system will switch to the next lobe. Combining this with the chaos known to be exhibited by the tent map, he showed that the system switches between the two lobes chaotically.

## A Generalized Lorenz System

Over the past several years, a series of papers regarding high-dimensional Lorenz models have yielded a generalized Lorenz model, which can be simplified into the classical Lorenz model for three state variables or the following five-dimensional Lorenz model for five state variables: ${\begin{aligned}{\frac {\mathrm {d} x}{\mathrm {d} t}}&=\sigma (y-x),\\[6pt]{\frac {\mathrm {d} y}{\mathrm {d} t}}&=x(\rho -z)-y,\\[6pt]{\frac {\mathrm {d} z}{\mathrm {d} t}}&=xy-xy_{1}-\beta z,\\[6pt]{\frac {\mathrm {d} y_{1}}{\mathrm {d} t}}&=xz-2xz_{1}-d_{0}y_{1},\\[6pt]{\frac {\mathrm {d} z_{1}}{\mathrm {d} t}}&=2xy_{1}-4\beta z_{1}.\end{aligned}}$
A choice of the parameter d$_0$=19/3 {\textstyle d_{0}={\dfrac {19}{3}}} has been applied to be consistent with the choice of the other parameters. See details in.

## Simulations

import numpy as np import matplotlib.pyplot as plt
* Define the function and domain
x = np.linspace(0, 2 * np.pi, 400) y = np.sin(np.exp(x))
* Plot the function
plt.plot(x, y) plt.xlabel('x') plt.ylabel('y = sin(e^x)') plt.title('Plot of y = sin(e^x) for x in [0, 2π]') plt.grid(True) plt.show

### Mathematica simulation

Standard way:
Less verbose:

### R simulation
## Applications
### Model for atmospheric convection

As shown in Lorenz's original paper, the Lorenz system is a reduced version of a larger system studied earlier by Barry Saltzman. The Lorenz equations are derived from the Oberbeck–Boussinesq approximation to the equations describing fluid circulation in a shallow layer of fluid, heated uniformly from below and cooled uniformly from above. This fluid circulation is known as Rayleigh–Bénard convection. The fluid is assumed to circulate in two dimensions (vertical and horizontal) with periodic rectangular boundary conditions.
The partial differential equations modeling the system's stream function and temperature are subjected to a spectral Galerkin approximation: the hydrodynamic fields are expanded in Fourier series, which are then severely truncated to a single term for the stream function and two terms for the temperature. This reduces the model equations to a set of three coupled, nonlinear ordinary differential equations. A detailed derivation may be found, for example, in nonlinear dynamics texts from Hilborn (2000), Appendix C; Bergé, Pomeau & Vidal (1984), Appendix D; or Shen (2016), Supplementary Materials.

### Model for the nature of chaos and order in the atmosphere

The scientific community accepts that the chaotic features found in low-dimensional Lorenz models could represent features of the Earth's atmosphere, yielding the statement of “weather is chaotic.” By comparison, based on the concept of attractor coexistence within the generalized Lorenz model and the original Lorenz model, Shen and his co-authors proposed a revised view that “weather possesses both chaos and order with distinct predictability”. The revised view, which is a build-up of the conventional view, is used to suggest that “the chaotic and regular features found in theoretical Lorenz models could better represent features of the Earth's atmosphere”.

### Resolution of Smale's 14th problem

Smale's 14th problem says, 'Do the properties of the Lorenz attractor exhibit that of a strange attractor?'. The problem was answered affirmatively by Warwick Tucker in 2002. To prove this result, Tucker used rigorous numerics methods like interval arithmetic and normal forms. First, Tucker defined a cross section $\Sigma \subset \{x_{3}=r-1\}$ that is cut transversely by the flow trajectories. From this, one can define the first-return map $P$, which assigns to each $x\in \Sigma$ the point $P(x)$ where the trajectory of $x$ first intersects $\Sigma$.
Then the proof is split in three main points that are proved and imply the existence of a strange attractor. The three points are:
* There exists a region $N\subset \Sigma$ invariant under the first-return map, meaning $P(N)\subset N$.
* The return map admits a forward invariant cone field.
* Vectors inside this invariant cone field are uniformly expanded by the derivative $DP$ of the return map.
To prove the first point, we notice that the cross section $\Sigma$ is cut by two arcs formed by $P(\Sigma )$. Tucker covers the location of these two arcs by small rectangles $R_{i}$, the union of these rectangles gives $N$. Now, the goal is to prove that for all points in $N$, the flow will bring back the points in $\Sigma$, in $N$. To do that, we take a plan $\Sigma '$ below $\Sigma$ at a distance $h$ small, then by taking the center $c_{i}$ of $R_{i}$ and using Euler integration method, one can estimate where the flow will bring $c_{i}$ in $\Sigma '$ which gives us a new point $c_{i}'$. Then, one can estimate where the points in $\Sigma$ will be mapped in $\Sigma '$ using Taylor expansion, this gives us a new rectangle $R_{i}'$ centered on $c_{i}$. Thus we know that all points in $R_{i}$ will be mapped in $R_{i}'$. The goal is to do this method recursively until the flow comes back to $\Sigma$ and we obtain a rectangle $Rf_{i}$ in $\Sigma$ such that we know that $P(R_{i})\subset Rf_{i}$. The problem is that our estimation may become imprecise after several iterations, thus what Tucker does is to split $R_{i}'$ into smaller rectangles $R_{i,j}$ and then apply the process recursively. Another problem is that as we are applying this algorithm, the flow becomes more 'horizontal', leading to a dramatic increase in imprecision. To prevent this, the algorithm changes the orientation of the cross sections, becoming either horizontal or vertical.

## Gallery

* A solution in the Lorenz attractor plotted at high resolution in the xz plane.
* A solution in the Lorenz attractor rendered as an SVG.
* An animation showing trajectories of multiple solutions in a Lorenz system.
* A solution in the Lorenz attractor rendered as a metal wire to show direction and 3D structure.
* An animation showing the divergence of nearby solutions to the Lorenz system.
* A visualization of the Lorenz attractor near an intermittent cycle.
* Two streamlines in a Lorenz system, from ρ = 0 to ρ = 28 (σ = 10, β = ⁠8/3⁠).
* Animation of a Lorenz System with rho-dependence.
* Animation of the Lorenz attractor in the Brain Dynamics Toolbox.