Calculation of Lyapunov Spectrum: Aashish Sah Tampere University, Tampere, Finland
Calculation of Lyapunov Spectrum: Aashish Sah Tampere University, Tampere, Finland
Aashish Sah
Tampere University, Tampere, Finland
1 Introduction
What does statistical mechanics and chaos theory have in common? Chaos theory is a multidisci-
plinary field of mathematics and physics. It studies the sensitive dependence of particular deterministic
dynamical system on initial conditions. Statistical mechanics, on the other-hand, also studies a perfectly
deterministic dynamical system, however the number of initial conditions for the system are in the or-
der of Avogadro’s number. As a result, statistical measures are applied to study such systems. It can
be already observed from the definitions, the similarity that is, the study of a deterministic dynamical
system with different initial conditions and the dissimilarity that is, chaos theory studies the sensitivity
of a system on initial conditions whereas statistical mechanics utilizes probabilistic theory and ergodic
theorem to study the system.
In order to investigate the relation between chaos theory and statistical mechanics, study of micro-
canonical ensemble provides a good starting point. When dealing with micro-canonical ensemble, one
common assumption made is that all points in phase-space are equally probable for given energy. This
leads to the application of Liouville’s theorem and ergodicity in deriving the properties of equilibrium
statistical mechanics. Such systems are independent of initial conditions and they give long-time average
behaviour, which is understood as an equilibrium. If the system is non-ergodic, only small subset of
states are occupied called attractors, chaos is in play.
Logistic map is one such system that exhibit chaotic behaviour in one dimension. It also shows that
chaotic behaviour can be observed in a simple system, it needn’t be a complex many-body interaction.
The evolution of phase space is limited to small subset. Henon-Heiles and Lorenz attractor display chaos
in 2D and 3D respectively. It is natural to ask at this point if there is a measure of chaos in a dynamical
system. Is there a way to quantify chaos in a system? It turns out that one can study the sensitivity of a
system to initial conditions, this quantity is called Lyapunov exponent. By estimating long time average
of the difference in trajectories resulting from distinct initial conditions, the measure of chaos is quantified.
Numerical computation of Lyapunov exponents for Henon-Heiles and Lorenz attractors is undertaken
in this project work. The algorithm for computing the exponents in different dimensions are presented.
The chaotic behavior of the Henon-Heiles and Lorenz attractors are quantified by implementing the
algorithm in MATLAB. The results are presented and discussed in the report.
2 Theory
2.1 Chaos
For a Hamiltonian system that is averaged over all times, Liouville theorem states that all points in
phase space are equally probable [1]. However for a system that is not a Hamiltonian, Liouville theorem
breaks down and the state space of the system is confined to the attractor/s. The attractors can either be
stable or unstable fixed points. Initial conditions near unstable fixed point will be attracted by a stable
fixed point [3]. An initial condition around unstable fixed point will first diverge exponentially for some
iteration before it converges around the stable fixed point. The rate at which it will diverge/converge is
given by Lyapunov exponents.
1
2.1.1 Lyapunov exponents
Lyapunov exponents is a measure of chaos. Given two identical dynamical system, if we start with
slightly different initial conditions, the trajectories are expected to diverge/converge exponentially [2].
Mathematically, we write
where n is number of iterations, ∆xn is the difference in trajectories for a given n, and ∆x0 is the
difference in initial conditions at the start. This is true for chaotic system. We estimate the Lyapunov
exponent from equation (1) by taking natural logarithm on both sides of the equation yielding,
1 ∆xn
λ= ln | | (2)
n ∆x0
To get a better estimation of Lyapunov spectrum, the system should be iterated for large values of n
and transient behavior should be filtered out. Thus, we get,
∆xn ∆x1 ∆x2 ∆xn
= ... (3)
∆x0 ∆x0 ∆x1 ∆xn−1
This is derived for 1-dimensional case. This can also be generalized to higher dimensions. In higher
dimensions, one needs to make sure that the initial conditions are orthogonal to each other in order to
determine the divergence/convergence that is elongation/shrinking in orthogonal directions. After all, we
are interested in what direction the trajectories diverges/converges. The orthogonality is made sure by
either Gram-Schmidt process or QR decomposition. The number of Lyapunov exponents depend on the
number of dynamical variable of the system under consideration. For 2-dimensional maps/Differential
equations, there are 2 distinct Lyapunov exponents and 3 distinct Lyapunov exponents for 3-dimensional
maps/differential equations. Thus for n-dimensional maps/differential equations, there are n distinct
Lyapunov exponents. This is further explained in the Numerical analysis section.
2.1.2 Bifurcation
Chaotic systems are described by maps in discrete-time dynamical system and by differential equa-
tions in continuous-time dynamical system. These maps and differential equations contain handful of
control parameters that describe the physical system under study. Once the control parameters change,
the fixed points changes as well. Bifurcations are the qualitative changes in the nature of the fixed points
as the control parameters are varied. The control parameter values at which these qualitative changes
occur are called bifurcation points. The evolution of the attractor and its invariant density as control
parameter varies are plotted in the bifurcation diagram.
Roughly speaking, bifurcation diagrams and Lyapunov exponents of a dynamical system contain all
the necessary information about the system.
3 Numerical algorithm
For one-dimensional case, it is very straight-forward to compute the Lyapunov exponent. About
N > 103 distinct initial conditions are randomly chosen and the same number of control parameters are
chosen. The range of control parameters are mostly determined by the physical system being considered.
Initial transient behavior are ignored and equation (4) is used calculate the Lyapunov exponents for
different values of control parameters. Bifurcation diagram is plotted for about last 100 trajectories for
N initial conditions against the values of control parameters.
For higher dimensions, Lyapunov exponents are calculated with following steps:
2
1. Linearize the difference/differentialPnequations
∂f
f (r) = dr
dt =⇒ f (∆r) ≈ f (r 0 ) + i ∂xi ∆xi
∂f1 ∂f1
∂x1 .... ∂xn
2. define the Jacobian and form the iterative equations. Jacobian: J = ... ... ...
∂fn ∂fn
∂x1 ... ∂xn
ODE:∆rn+1 = ∆rn + J∆rn dt
MAP:∆rn+1 = J∆rn
3. initialize n orthonormal initial conditions
∆r1 (0) = [1, 0, ..., 0],∆r2 (0) = [0, 1, ..., 0],∆rn (0) = [0, 0, ..., 1]
4. iterate original ode/difference and Linearized equations
5. Update initial position r and the Jacobian J at each iteration
6. Update difference vectors ∆ri and ortho-normalize it either with Gram-Schmidt process or QR
Decomposition. [∆r1 · · · ∆rn ] = QR, where Q = matrix of orthonormal vectors and diagonals of
R gives the scaling.
7. Iterate steps 4-6 for multiple times and calculate the Lyapunov exponents using
log|diag(R)i |
λi = λi + (5)
N
Transient behaviour in the beginning is ignored and the calculation of Lyapunov exponents are done
with the remaining iterations. It is important that the iterations are done many times, in the order of
105 to get the better estimation.
4 Results
4.1 Logistic map (1D)
Logistic map mentioned in introduction section is an one-dimensional map and maps a one-dimensional
real interval [0,1] onto itself. The form of map is,
f (xn ) = xn+1 = 4rxn (1 − xn ) (6)
∗ ∗
where r is the control parameter. The fixed points are calculated such that f (x ) = x . This yields two
fixed points, essentially, x∗ = 0 and x∗ = 1 − 4r 1
. These fixed points are stable if |f 0 (x∗ ) < 1|. This
∗ ∗
implies x = 0 is stable if r < 4 and x = 1 − 4r is stable if 14 < r < 43 . One can easily see that rc = 14
1 1
is a bifurcation point. There are limit cycles of period doubling as well that exists for some range of r,
for example 2-cycle exists for some x = p when f (f (p)) = p.
Figure 1: a) intermittency orbits, where some trajectories are stable for sometime, b) Lyapunov exponent,
c and d) bifurcation plot showing limit cycles.
3
4.2 Henon map (2D)
Like Logistic map, Henon-Heiles is a discrete-time dynamical system but defined on the two-dimensional
real plane and contains two control parameters a and b. The form of the Henon map is,
In order to calculate the Lyapunov exponents for Henon-Heiles map, the system of equations (7) and (8)
must be linearized first. This is achieved by the scheme mentioned in section 3, Numerical algorithm.
The linearized form is,
Next, we write equations (9) and (10) in iterative form ∆rn+1 = J∆rn ,
∆xn+1 −2axn 1 ∆xn
= (11)
∆yn+1 b 0 ∆yn
dx d∆x
= σ(y − x) (12) = σ(∆y − ∆x) (15)
dt dt
dy d∆y
= (r − z)x − y (13) = (r − z)∆x − ∆y − x∆z (16)
dt dt
dz d∆z
= xy − bz (14) = y∆x + x∆y − b∆z (17)
dt dt
4
The iterative form for Linearized ∆rn+1 = ∆rn + J∆rn dt and original equations are,
∆xn+1 ∆xn −σ σ 0 ∆xn xn+1 xn + σ(yn − xn )dt
∆yn+1 = ∆yn + r − z −1 −x ∆yn dt yn+1 = yn + ((r − zn )xn − yn )dt (19)
∆zn+1 ∆zn y x −b ∆zn zn+1 zn + (xn yn − bzn )dt
(18)
Figure 3: i,ii, and iv) Lyapunov spectrum for parameters σ, b, and r respectively, and (iii) phase space
plot.
In figure (3), we observe that in (iii) the Lioville’s theorem breaksdown in presence of two distinct
fixed points. The figure contains Lyapunov spectrum for control parameters σ, b, and r. It can be seen
that λ3 is always negative, which means that the trajectory always converges in one of the direction
and for the rest two it either converges or diverges depending on the values of the control parameters.
The Lyapunov exponents for control parameters σ = 16, b = 4, and r = 45.92 are 1.51, 0, and -22.62.
These values match with the external sources upto 1 decimal point. The accuracy could have been
further increased if the differential equations were solved using some rigorous technique, for example
ode45 package in MATLAB.
5 Conclusions
In this project report, the relation between chaos theory and statistical physics was outlined. In micro-
canonical ensemble, Liouville’s theorem states that the phase-space volume is conserved and ergodic
theorem states that all points in phase space comes arbitrarily close to each other. The presence of
chaos in non Hamiltonian system were discussed with examples in 1D,2D,and 3D. It was shown that the
phase-space volume indeed is not preserved in chaotic system. In addition, the attracting fixed-point
was shown to break Liouville’s theorem; except few initial conditions, all initial conditions are transient.
Indeed, all systems lead to the same, time-independent state eventually. Furthermore, calculation of
Lyapunov spectrum clearly gives some form of measure of chaos. In addition, from the spectrum, one
can easily speculate for which control parameters does the trajectories will converge.
5
References
[1] James P. Sethna (2019), Entropy, Order Parameters, and Complexity. Phase-space dynamics and
ergodicity pp.63-71. Copyright Oxford University Press 2006.
[2] Harvey Gould, Jan Tobochnik, and Wolfgang Christian (2016). An Introduction to Computer Sim-
ulation Methods Application to Physical system.
Appendix
Codes for the calculation of Lyapunov spectrum and additional figures.
Figure 4: Chaotic behavior of Lorenz attractor as the control parameters are tuned.
6
Figure 5: Bifurcation plot of Henon map.
7
Figure 8: Lyapunov code for Henon Heiles.
8
Figure 12: Lyapunov spectrum code for Lorenz attractor.