Predefined Dynamical Systems

Predefined systems exist in the Systems submodule in the form of functions that return a DynamicalSystem. They are accessed like:

using DynamicalSystems # or DynamicalSystemsBase
ds = Systems.lorenz(ρ = 32.0)

So far, the predefined systems that exist in the Systems sub-module are:

DynamicalSystemsBase.Systems.antidotsFunction
antidots(u; B = 1.0, d0 = 0.3, c = 0.2)

An antidot "superlattice" is a Hamiltonian system that corresponds to a smoothened periodic Sinai billiard with disk diameter d0 and smooth factor c [1].

This version is the two dimensional classical form of the system, with quadratic equations of motion and a perpendicular magnetic field. Notice that the equations of motion are with respect to the velocity instead of momentum, i.e.:

\[\begin{aligned} \dot{x} &= v_x \\ \dot{y} &= v_y \\ \dot{v_x} &= B*v_y - U_x \\ \dot{v_y} &= -B*v_x - U_X \\ \end{aligned}\]

with $U$ the potential energy:

\[U = \left(\tfrac{1}{c^4}\right) \left[\tfrac{d_0}{2} + c - r_a\right]^4\]

if $r_a = \sqrt{(x \mod 1)^2 + (y \mod 1)^2} < \frac{d_0}{2} + c$ and 0 otherwise. I.e. the potential is periodic with period 1 in both $x, y$ and normalized such that for energy value of 1 it is a circle of diameter $d0$. The magnetic field is also normalized such that for value B=1 the cyclotron diameter is 1.

[1] : G. Datseris et al, New Journal of Physics 2019

DynamicalSystemsBase.Systems.arnoldcatFunction
arnoldcat(u0 = rand(2))
\[f(x,y) = (2x+y,x+y) \mod 1\]

Arnold's cat map. A chaotic map from the torus into itself, discovered by Vladimir Arnold in the 1960s. [1]

[1] : Arnol'd, V. I., & Avez, A. (1968). Ergodic problems of classical mechanics.

DynamicalSystemsBase.Systems.chuaFunction
chua(u0 = [0.7, 0.0, 0.0]; a = 15.6, b = 25.58, m0 = -8/7, m1 = -5/7)
\[\begin{aligned} \dot{x} &= \alpha (y - h(x))\\ \dot{y} &= x - y+z \\ \dot{z} &= \beta y \end{aligned}\]

where h(x) is defined by

\[h(x) = m_1 x + \frac 1 2 (m_0 - m_1)(|x + 1| - |x - 1|)\]

This is a 3D continuous system that exhibits chaos.

Chua designed an electronic circuit with the expressed goal of exhibiting chaotic motion, and this system is obtained by rescaling the circuit units to simplify the form of the equation. [1]

The parameters are a, b, m0 and m1. Setting a = 15.6, m0 = -8/7 and m1 = -5/7, and varying the parameter b from b = 25 to b = 51, one observes a classic period-doubling bifurcation route to chaos. [2]

The parameter container has the parameters in the same order as stated in this function's documentation string.

[1] : Chua, Leon O. "The genesis of Chua's circuit", 1992.

[2] : Leon O. Chua (2007) "Chua circuit", Scholarpedia, 2(10):1488.

DynamicalSystemsBase.Systems.coupledstandardmapsFunction
coupledstandardmaps(M::Int, u0 = 0.001rand(2M); ks = ones(M), Γ = 1.0)
\[\begin{aligned} \theta_{i}' &= \theta_i + p_{i}' \\ p_{i}' &= p_i + k_i\sin(\theta_i) - \Gamma \left[ \sin(\theta_{i+1} - \theta_{i}) + \sin(\theta_{i-1} - \theta_{i}) \right] \end{aligned}\]

A discrete system of M nonlinearly coupled standard maps, first introduced in [1] to study diffusion and chaos thresholds. The total dimension of the system is 2M. The maps are coupled through Γ and the i-th map has a nonlinear parameter ks[i]. The first M parameters are the ks, the M+1th parameter is Γ.

The first M entries of the state are the angles, the last M are the momenta.

[1] : H. Kantz & P. Grassberger, J. Phys. A 21, pp 127–133 (1988)

DynamicalSystemsBase.Systems.double_pendulumFunction
double_pendulum(u0 = [π/2, 0, 0, rand()];
                G=10.0, L1 = 1.0, L2 = 1.0, M1 = 1.0, M2 = 1.0)

Famous chaotic double pendulum system (also used for our logo!). Keywords are gravity (G), lengths of each rod and mass of each ball (all assumed SI units).

The variables order is [θ1, dθ1/dt, θ2, dθ2/dt].

Jacobian is created automatically (thus methods that use the Jacobian will be slower)!

(please contribute the Jacobian and the e.o.m. in LaTeX :smile:)

The parameter container has the parameters in the same order as stated in this function's documentation string.

DynamicalSystemsBase.Systems.duffingFunction
duffing(u0 = [rand(), rand(), 0]; ω = 2.2, f = 27.0, d = 0.2, β = 1)

The (forced) duffing oscillator, that satisfies the equation

\[\ddot{x} + d\cdot\dot{x} + β*x + x^3 = f\cos(\omega t)\]

with f, ω the forcing strength and frequency and d the dampening.

The parameter container has the parameters in the same order as stated in this function's documentation string.

DynamicalSystemsBase.Systems.fitzhugh_nagumoFunction
fitzhugh_nagumo(u = 0.5ones(2); I = 1.0, ε = 0.08)

Famous excitable system which emulates the firing of a neuron, with equations

\[\begin{aligned} \dot{v} &= v - v^3/3 - w + I \\ \ddot{w} &= \varepsilon(v + 0.7 - 0.8w) \end{aligned}\]

More details in the Scholarpedia entry.

DynamicalSystemsBase.Systems.gissingerFunction
gissinger(u0 = 3rand(3); μ = 0.119, ν = 0.1, Γ = 0.9)
\[\begin{aligned} \dot{Q} &= \mu Q - VD \\ \dot{D} &= -\nu D + VQ \\ \dot{V} &= \Gamma -V + QD \end{aligned}\]

A continuous system that models chaotic reversals due to Gissinger [1], applied to study the reversals of the magnetic field of the Earth.

The parameter container has the parameters in the same order as stated in this function's documentation string.

[1] : C. Gissinger, Eur. Phys. J. B 85, 4, pp 1-12 (2012)

DynamicalSystemsBase.Systems.henonFunction
henon(u0=zeros(2); a = 1.4, b = 0.3)
\[\begin{aligned} x_{n+1} &= 1 - ax^2_n+y_n \\ y_{n+1} & = bx_n \end{aligned}\]

The Hénon map is a two-dimensional mapping due to Hénon [1] that can display a strange attractor (at the default parameters). In addition, it also displays many other aspects of chaos, like period doubling or intermittency, for other parameters.

According to the author, it is a system displaying all the properties of the Lorentz system (1963) while being as simple as possible. Default values are the ones used in the original paper.

The parameter container has the parameters in the same order as stated in this function's documentation string.

[1] : M. Hénon, Commun.Math. Phys. 50, pp 69 (1976)

DynamicalSystemsBase.Systems.henonheilesFunction
henonheiles(u0=[0, -0.25, 0.42081,0])
\[\begin{aligned} \dot{x} &= p_x \\ \dot{y} &= p_y \\ \dot{p}_x &= -x -2 xy \\ \dot{p}_y &= -y - (x^2 - y^2) \end{aligned}\]

The Hénon–Heiles system [1] is a conservative dynamical system and was introduced as a simplification of the motion of a star around a galactic center. It was originally intended to study the existence of a "third integral of motion" (which would make this 4D system integrable). In that search, the authors encountered chaos, as the third integral existed for only but a few initial conditions.

The default initial condition is a typical chaotic orbit. The function Systems.henonheiles_ics(E, n) generates a grid of n×n initial conditions, all having the same energy E.

[1] : Hénon, M. & Heiles, C., The Astronomical Journal 69, pp 73–79 (1964)

DynamicalSystemsBase.Systems.labyrinthFunction
labyrinth(u0 = [1.0, 0, 0])
\[\begin{aligned} \dot{x} &= \sin(y) \\ \dot{y} &= \sin(z) \\ \dot{z} &= \sin(x) \end{aligned}\]

Three dimensional conservative continuous system, whose evolution in 3D space looks like a speudo-random walk, the orbit moving around like in a labyrinth.

First proposed by René Thomas (1999). [1] See discussion in Section 4.4.3 of "Elegant Chaos" by J. C. Sprott. [2]

[1] : Thomas, R. (1999). International Journal of Bifurcation and Chaos, 9(10), 1889-1905.

[2] : Sprott, J. C. (2010). Elegant chaos: algebraically simple chaotic flows. World Scientific.

DynamicalSystemsBase.Systems.logisticFunction
logistic(x0 = rand(); r = 4.0)
\[x_{n+1} = rx_n(1-x_n)\]

The logistic map is an one dimensional unimodal mapping due to May [1] and is used by many as the archetypal example of how chaos can arise from very simple equations.

Originally intentend to be a discretized model of polulation dynamics, it is now famous for its bifurcation diagram, an immensely complex graph that that was shown be universal by Feigenbaum [2].

The parameter container has the parameters in the same order as stated in this function's documentation string.

[1] : R. M. May, Nature 261, pp 459 (1976)

[2] : M. J. Feigenbaum, J. Stat. Phys. 19, pp 25 (1978)

DynamicalSystemsBase.Systems.lorenzFunction
lorenz(u0=[0.0, 10.0, 0.0]; σ = 10.0, ρ = 28.0, β = 8/3) -> ds
\[\begin{aligned} \dot{X} &= \sigma(Y-X) \\ \dot{Y} &= -XZ + \rho X -Y \\ \dot{Z} &= XY - \beta Z \end{aligned}\]

The famous three dimensional system due to Lorenz [1], shown to exhibit so-called "deterministic nonperiodic flow". It was originally invented to study a simplified form of atmospheric convection.

Currently, it is most famous for its strange attractor (occuring at the default parameters), which resembles a butterfly. For the same reason it is also associated with the term "butterfly effect" (a term which Lorenz himself disliked) even though the effect applies generally to dynamical systems. Default values are the ones used in the original paper.

The parameter container has the parameters in the same order as stated in this function's documentation string.

[1] : E. N. Lorenz, J. atmos. Sci. 20, pp 130 (1963)

DynamicalSystemsBase.Systems.lorenz96Function
lorenz96(N::Int, u0 = rand(M); F=0.01)
\[\frac{dx_i}{dt} = (x_{i+1}-x_{i-2})x_{i-1} - x_i + F\]

N is the chain length, F the forcing. Jacobian is created automatically. (parameter container only contains F)

DynamicalSystemsBase.Systems.magnetic_pendulumFunction
magnetic_pendulum(u=[cos(θ),sin(θ),0,0]; γ=1, d=0.3, α=0.2, ω=0.5, N=3)

Create a pangetic pendulum with N magnetics, equally distributed along the unit circle, with equations of motion

\[\begin{aligned} \ddot{x} &= -\omega ^2x - \alpha \dot{x} - \sum_{i=1}^N \frac{\gamma (x - x_i)}{D_i^3} \\ \ddot{y} &= -\omega ^2y - \alpha \dot{y} - \sum_{i=1}^N \frac{\gamma (y - y_i)}{D_i^3} \\ D_i &= \sqrt{(x-x_i)^2 + (y-y_i)^2 + d^2} \end{aligned}\]

where α is friction, ω is eigenfrequency, d is distance of pendulum from the magnet's plane and γ is the magnetic strength. A random initial condition is initialized by default somewhere along the unit circle with zero velocity.

DynamicalSystemsBase.Systems.more_chaos_exampleFunction
more_chaos_example(u = rand(3))

A three dimensional chaotic system introduced in [Sprott2020] with rule

\[\begin{aligned} \dot{x} &= y \\ \dot{y} &= -x - sign(z)y \\ \dot{z} &= y^2 - \exp(-x^2) \end{aligned}\]

It is noteworthy because its strange attractor is multifractal with fractal dimension ≈ 3.

DynamicalSystemsBase.Systems.nosehooverFunction
nosehoover(u0 = [0, 0.1, 0])
\[\begin{aligned} \dot{x} &= y \\ \dot{y} &= yz - x \\ \dot{z} &= 1 - y^2 \end{aligned}\]

Three dimensional conservative continuous system, discovered in 1984 during investigations in thermodynamical chemistry by Nosé and Hoover, then rediscovered by Sprott during an exhaustive search as an extremely simple chaotic system. [1]

See Chapter 4 of "Elegant Chaos" by J. C. Sprott. [2]

[1] : Hoover, W. G. (1995). Remark on ‘‘Some simple chaotic flows’’. Physical Review E, 51(1), 759.

[2] : Sprott, J. C. (2010). Elegant chaos: algebraically simple chaotic flows. World Scientific.

DynamicalSystemsBase.Systems.pomeau_mannevilleFunction
pomaeu_manneville(u0 = 0.2; z = 2.5)

The Pomeau-Manneville map is a one dimensional discrete map which is characteristic for displaying intermittency [1]. Specifically, for z > 2 the average time between chaotic bursts diverges, while for z > 2.5, the map iterates are long range correlated [2].

Notice that here we are providing the "symmetric" version:

\[x_{n+1} = \begin{cases} -4x_n + 3, & \quad x_n \in (0.5, 1] \\ x_n(1 + |2x_n|^{z-1}), & \quad |x_n| \le 0.5 \\ -4x_n - 3, & \quad x_n \in [-1, 0.5) \end{cases}\]

[1] : Manneville & Pomeau, Comm. Math. Phys. 74 (1980)

[2] : Meyer et al., New. J. Phys 20 (2019)

DynamicalSystemsBase.Systems.qbhFunction
qbh([u0]; A=1.0, B=0.55, D=0.4)

A conservative dynamical system with rule

\[\begin{aligned} \dot{q}_0 &= A p_0 \\ \dot{q}_2 &= A p_2 \\ \dot{p}_0 &= -A q_0 -3 \frac{B}{\sqrt{2}} (q_2^2 - q_1^2) - D q_1 (q_1^2 + q_2^2) \\ \dot{p}_2 &= -q_2 (A + 3\sqrt{2} B q_1 + D (q_1^2 + q_2^2)) (x^2 - y^2) \end{aligned}\]

These equations of motion correspond to a Hamiltonian used in nuclear physics to study the quadrupole vibrations of the nuclear surface [1,2].

\[H(p_0, p_2, q_0, q_2) = \frac{A}{2}\left(p_0^2+p_2^2\right)+\frac{A}{2}\left(q_0^2+q_2^2\right) +\frac{B}{\sqrt{2}}q_0\left(3q_2^2-q_0^2\right) +\frac{D}{4}\left(q_0^2+q_2^2\right)^2\]

The Hamiltonian has a similar structure with the Henon-Heiles one, but it has an added fourth order term and presents a nontrivial dependence of chaoticity with the increase of energy [3]. The default initial condition is chaotic.

[1]: Eisenberg, J.M., & Greiner, W., Nuclear theory 2 rev ed. Netherlands: North-Holland pp 80 (1975)

[2]: Baran V. and Raduta A. A., International Journal of Modern Physics E, 7, pp 527–551 (1998)

[3]: Micluta-Campeanu S., Raportaru M.C., Nicolin A.I., Baran V., Rom. Rep. Phys. 70, pp 105 (2018)

DynamicalSystemsBase.Systems.rikitakeFunction
rikitake(u0 = [1, 0, 0.6]; μ = 1.0, α = 1.0)
\[\begin{aligned} \dot{x} &= -\mu x +yz \\ \dot{y} &= -\mu y +x(z-\alpha) \\ \dot{z} &= 1 - xz \end{aligned}\]

Rikitake's dynamo is a system that tries to model the magnetic reversal events by means of a double-disk dynamo system.

[1] : T. Rikitake Math. Proc. Camb. Phil. Soc. 54, pp 89–105, (1958)

DynamicalSystemsBase.Systems.roesslerFunction
roessler(u0=rand(3); a = 0.2, b = 0.2, c = 5.7)
\[\begin{aligned} \dot{x} &= -y-z \\ \dot{y} &= x+ay \\ \dot{z} &= b + z(x-c) \end{aligned}\]

This three-dimensional continuous system is due to Rössler [1]. It is a system that by design behaves similarly to the lorenz system and displays a (fractal) strange attractor. However, it is easier to analyze qualitatively, as for example the attractor is composed of a single manifold. Default values are the same as the original paper.

The parameter container has the parameters in the same order as stated in this function's documentation string.

[1] : O. E. Rössler, Phys. Lett. 57A, pp 397 (1976)

DynamicalSystemsBase.Systems.shinrikiFunction
shinriki(u0 = [-2, 0, 0.2]; R1 = 22.0)

Shinriki oscillator with all other parameters (besides R1) set to constants. This is a stiff problem, be careful when choosing solvers and tolerances.

DynamicalSystemsBase.Systems.standardmapFunction
standardmap(u0=0.001rand(2); k = 0.971635)
\[\begin{aligned} \theta_{n+1} &= \theta_n + p_{n+1} \\ p_{n+1} &= p_n + k\sin(\theta_n) \end{aligned}\]

The standard map (also known as Chirikov standard map) is a two dimensional, area-preserving chaotic mapping due to Chirikov [1]. It is one of the most studied chaotic systems and by far the most studied Hamiltonian (area-preserving) mapping.

The map corresponds to the Poincaré's surface of section of the kicked rotor system. Changing the non-linearity parameter k transitions the system from completely periodic motion, to quasi-periodic, to local chaos (mixed phase-space) and finally to global chaos.

The default parameter k is the critical parameter where the golden-ratio torus is destroyed, as was calculated by Greene [2]. The e.o.m. considers the angle variable θ to be the first, and the angular momentum p to be the second, while both variables are always taken modulo 2π (the mapping is on the [0,2π)² torus).

The parameter container has the parameters in the same order as stated in this function's documentation string.

[1] : B. V. Chirikov, Preprint N. 267, Institute of Nuclear Physics, Novosibirsk (1969)

[2] : J. M. Greene, J. Math. Phys. 20, pp 1183 (1979)

DynamicalSystemsBase.Systems.towelFunction
towel(u0 = [0.085, -0.121, 0.075])
\[\begin{aligned} x_{n+1} &= a x_n (1-x_n) -0.05 (y_n +0.35) (1-2z_n) \\ y_{n+1} &= 0.1 \left( \left( y_n +0.35 \right)\left( 1+2z_n\right) -1 \right) \left( 1 -1.9 x_n \right) \\ z_{n+1} &= 3.78 z_n (1-z_n) + b y_n \end{aligned}\]

The folded-towel map is a hyperchaotic mapping due to Rössler [1]. It is famous for being a mapping that has the smallest possible dimensions necessary for hyperchaos, having two positive and one negative Lyapunov exponent. The name comes from the fact that when plotted looks like a folded towel, in every projection.

Default values are the ones used in the original paper.

[1] : O. E. Rössler, Phys. Lett. 71A, pp 155 (1979)

DynamicalSystemsBase.Systems.uedaFunction
ueda(u0 = [3.0, 0]; k = 0.1, B = 12.0)
\[\ddot{x} + k \dot{x} + x^3 = B\cos{t}\]

Nonautonomous Duffing-like forced oscillation system, discovered by Ueda in

  1. It is one of the first chaotic systems to be discovered.

The stroboscopic plot in the (x, ̇x) plane with period 2π creates a "broken-egg attractor" for k = 0.1 and B = 12. Figure 5 of [1] is reproduced by

using Plots
ds = Systems.ueda()
a = trajectory(ds, 2π*5e3, dt = 2π)
scatter(a[:, 1], a[:, 2], markersize = 0.5, title="Ueda attractor")

For more forced oscillation systems, see Chapter 2 of "Elegant Chaos" by J. C. Sprott. [2]

[1] : Ruelle, David, ‘Strange Attractors’, The Mathematical Intelligencer, 2.3 (1980), 126–37

[2] : Sprott, J. C. (2010). Elegant chaos: algebraically simple chaotic flows. World Scientific.

  • Sprott2020Sprott, J.C. 'Do We Need More Chaos Examples?', Chaos Theory and Applications 2(2),1-3, 2020