The Wonderful World of Hamiltonian Maps

Hamiltonian systems are freaks of nature.  Unlike the everyday world we experience that is full of dissipation and inefficiency, Hamiltonian systems live in a world free of loss.  Despite how rare this situation is for us, this unnatural state happens commonly in two extremes: orbital mechanics and quantum mechanics.  In the case of orbital mechanics, dissipation does exist, most commonly in tidal effects, but effects of dissipation in the orbits of moons and planets takes eons to accumulate, making these systems effectively free of dissipation on shorter time scales.  Quantum mechanics is strictly free of dissipation, but there is a strong caveat: ALL quantum states need to be included in the quantum description.  This includes the coupling of discrete quantum states to their environment.  Although it is possible to isolate quantum systems to a large degree, it is never possible to isolate them completely, and they do interact with the quantum states of their environment, if even just the black-body radiation from their container, and even if that container is cooled to milliKelvins.  Such interactions involve so many degrees of freedom, that it all behaves like dissipation.  The origin of quantum decoherence, which poses such a challenge for practical quantum computers, is the entanglement of quantum systems with their environment.

Liouville’s theorem plays a central role in the explanation of the entropy and ergodic properties of ideal gases, as well as in Hamiltonian chaos.

Liouville’s Theorem and Phase Space

A middle ground of practically ideal Hamiltonian mechanics can be found in the dynamics of ideal gases. This is the arena where Maxwell and Boltzmann first developed their theories of statistical mechanics using Hamiltonian physics to describe the large numbers of particles.  Boltzmann applied a result he learned from Jacobi’s Principle of the Last Multiplier to show that a volume of phase space is conserved despite the large number of degrees of freedom and the large number of collisions that take place.  This was the first derivation of what is today known as Liouville’s theorem.

Close-up of the Lozi Map with B = -1 and C = 0.5.

In 1838 Joseph Liouville, a pure mathematician, was interested in classes of solutions of differential equations.  In a short paper, he showed that for one class of differential equation one could define a property that remained invariant under the time evolution of the system.  This purely mathematical paper by Liouville was expanded upon by Jacobi, who was a major commentator on Hamilton’s new theory of dynamics, contributing much of the mathematical structure that we associate today with Hamiltonian mechanics.  Jacobi recognized that Hamilton’s equations were of the same class as the ones studied by Liouville, and the conserved property was a product of differentials.  In the mid-1800’s the language of multidimensional spaces had yet to be invented, so Jacobi did not recognize the conserved quantity as a volume element, nor the space within which the dynamics occurred as a space.  Boltzmann recognized both, and he was the first to establish the principle of conservation of phase space volume. He named this principle after Liouville, even though it was actually Boltzmann himself who found its natural place within the physics of Hamiltonian systems [1].

Liouville’s theorem plays a central role in the explanation of the entropy of ideal gases, as well as in Hamiltonian chaos.  In a system with numerous degrees of freedom, a small volume of initial conditions is stretched and folded by the dynamical equations as the system evolves.  The stretching and folding is like what happens to dough in a bakers hands.  The volume of the dough never changes, but after a long time, a small spot of food coloring will eventually be as close to any part of the dough as you wish.  This analogy is part of the motivation for ergodic systems, and this kind of mixing is characteristic of Hamiltonian systems, in which trajectories can diffuse throughout the phase space volume … usually.

Interestingly, when the number of degrees of freedom are not so large, there is a middle ground of Hamiltonian systems for which some initial conditions can lead to chaotic trajectories, while other initial conditions can produce completely regular behavior.  For the right kind of systems, the regular behavior can hem in the irregular behavior, restricting it to finite regions.  This was a major finding of the KAM theory [2], named after Kolmogorov, Arnold and Moser, which helped explain the regions of regular motion separating regions of chaotic motion as illustrated in Chirikov’s Standard Map.

Discrete Maps

Hamilton’s equations are ordinary continuous differential equations that define a Hamiltonian flow in phase space.  These equations can be solved using standard techniques, such as Runge-Kutta.  However, a much simpler approach for exploring Hamiltonian chaos uses discrete maps that represent the Poincaré first-return map, also known as the Poincaré section.  Testing that a discrete map satisfies Liouville’s theorem is as simple as checking that the determinant of the Floquet matrix is equal to unity.  When the dynamics are represented in a Poincaré plane, these maps are called area-preserving maps.

There are many famous examples of area-preserving maps in the plane.  The Chirikov Standard Map is one of the best known and is often used to illustrate KAM theory.  It is a discrete representation of a kicked rotater, while a kicked harmonic oscillator leads to the Web Map.  The Henon Map was developed to explain the orbits of stars in galaxies.  The Lozi Map is a version of the Henon map that is more accessible analytically.  And the Cat Map was devised by Vladimir Arnold to illustrate what is today called Arnold Diffusion.  All of these maps display classic signatures of (low-dimensional) Hamiltonian chaos with periodic orbits hemming in regions of chaotic orbits.

Chirikov Standard Map
Kicked rotater
Web Map
Kicked harmonic oscillator
Henon Map
Stellar trajectories in galaxies
Lozi Map
Simplified Henon map
Cat MapArnold Diffusion

Table:  Common examples of area-preserving maps.

Lozi Map

My favorite area-preserving discrete map is the Lozi Map.  I first stumbled on this map at the very back of Steven Strogatz’ wonderful book on nonlinear dynamics [3].  It’s one of the last exercises of the last chapter.  The map is particularly simple, but it leads to rich dynamics, both regular and chaotic.  The map equations are

which is area-preserving when |B| = 1.  The constant C can be varied, but the choice C = 0.5 works nicely, and B = -1 produces a beautiful nested structure, as shown in the figure.

Iterated Lozi map for B = -1 and C = 0.5.  Each color is a distinct trajectory.  Many regular trajectories exist that corral regions of chaotic trajectories.  Trajectories become more chaotic farther away from the center.

Python Code for the Lozi Map

"""
Created on Wed May  2 16:17:27 2018
@author: nolte
"""
import numpy as np
from scipy import integrate
from matplotlib import pyplot as plt

B = -1
C = 0.5

np.random.seed(2)
plt.figure(1)

for eloop in range(0,100):

    xlast = np.random.normal(0,1,1)
    ylast = np.random.normal(0,1,1)

    xnew = np.zeros(shape=(500,))
    ynew = np.zeros(shape=(500,))
    for loop in range(0,500):
        xnew[loop] = 1 + ylast - C*abs(xlast)
        ynew[loop] = B*xlast
        xlast = xnew[loop]
        ylast = ynew[loop]
        
    plt.plot(np.real(xnew),np.real(ynew),'o',ms=1)
    plt.xlim(xmin=-1.25,xmax=2)
    plt.ylim(ymin=-2,ymax=1.25)
        
plt.savefig('Lozi')

References:

[1] D. D. Nolte, “The Tangled Tale of Phase Space”, Chapter 6 in Galileo Unbound: A Path Across Life, the Universe and Everything (Oxford University Press, 2018)

[2] H. S. Dumas, The KAM Story: A Friendly Introduction to the Content, History, and Significance of Classical Kolmogorov-Arnold-Moser Theory (World Scientific, 2014)

[3] S. H. Strogatz, Nonlinear Dynamics and Chaos (WestView Press, 1994)

Top 10 Topics of Modern Dynamics

“Modern physics” in the undergraduate physics curriculum has been monopolized, on the one hand, by quantum mechanics, nuclear physics, particle physics and astrophysics. “Classical mechanics”, on the other hand, has been monopolized by Lagrangians and Hamiltonians.  While these are all admittedly interesting, the topics of modern dynamics that monopolize the time and actions of most physics-degree holders, as they work in high-tech start-ups, established technology companies, or on Wall Street, are not to be found.  These are the topics of nonlinear dynamics, chaos theory, complex networks, finance, evolutionary dynamics and neural networks, among others.

Cover

There is a growing awareness that the undergraduate physics curriculum needs to be reinvigorated to make a physics degree relevant to the modern workplace.  To that end, I am listing my top 10 topics of modern dynamics that can form the foundation of a revamped upper-division (junior level) mechanics course.  Virtually all of these topics were once reserved for graduate-student-level courses, but all can be introduced to undergraduates in simple and intuitive ways without the need for advanced math.

1) Phase Space

The key change in perspective for modern dynamics that differentiates it from classical dynamics is the emphasis on the set of all possible trajectories that fill a “space” rather than emphasizing single trajectories defined by given initial conditions.  Rather than study the motion of one rock thrown from a cliff top, modern dynamics studies an infinity of rocks thrown from every possible point and with every possible velocity.  The space that contains this infinity of trajectories is known as phase space (or more generally state space).  The equation of motion in state space becomes the dynamical flow, replacing Newton’s second law as the central mathematical structure of physics.  Modern dynamics studies the properties of phase space rather than the properties of single trajectories, and makes rigorous and unique conclusions about classes of possible motions.  This emphasis on classes of behavior is more general and more universal and more powerful, while also providing a fundamental “visual language” with which to describe the complex physics of complex systems.

2) Metric Space

The Cartesian coordinate plane that we were all taught in high school tends to dominate our thinking, biasing us towards linear flat geometries.  Yet most dynamics do not take place in such simple Cartesian spaces.  A case in point, virtually every real-world dynamics problem has constraints that confine the motion to a surface.  Furthermore, the number of degrees of freedom of a dynamical system usually exceed our common 3-space, expanding to hundreds or even to thousands of dimensions.  The surfaces of constraint are hypersurfaces of high dimensions (known as manifolds) and are almost certainly not flat hyperplanes. This daunting prospect of high-dimensional warped spaces can be surprisingly simplified through the concept of Bernhard Riemann’s “metric space”.  Understanding the geometry of a metric space can be as simple as applying Pythagoras’ Theorem to sets of coordinates.  For instance, the metric tensor can be taught and used without requiring students to know anything of tensor calculus.  At the same time, it provides a useful tool for understanding dynamical patterns in phase space as well as orbits around black holes.

3) Invariants

Introductory physics classes emphasize the conservation of energy, linear momentum and angular momentum as if they are special cases.  Yet there is a grand structure that yields a universal set of conservation laws: integrable Hamiltonian systems.  An integrable system is one for which there are as many invariants of motion as there are degrees of freedom.  Amazingly, these conservation laws can all be captured by a single procedure known as (canonical) transformation to action-angle coordinates.  When expressed in action-angle form, these Hamiltonians take on extremely simple expressions.  They are also the starting point for the study of perturbations when small nonintegrable terms are added to the Hamiltonian.  As the perturbations grow, this provides one doorway to the emergence of chaos.

4) Chaos theory

“Chaos theory” is the more popular title for what is generally called “nonlinear dynamics”.  Nonlinear dynamics takes place in state space when the dynamical flow equations have terms that algebraically are products of variables.  One important distinction between chaos theory and nonlinear dynamics is the occurrence of unpredictability that can emerge in the dynamics when the number of variables is equal to three or higher.  The equations, and the resulting dynamics, are still deterministic, but the trajectories are incredibly sensitive to initial conditions (SIC).  In addition, the dynamical trajectories can relax to a submanifold of the original state space known as a strange attractor that typically is a fractal structure.

5) Synchronization

One of the central paradigms of nonlinear dynamics is the autonomous oscillator.  Unlike the harmonic oscillator that eventually decays due to friction, autonomous oscillators are steady-state oscillators that convert steady energy input into oscillatory behavior.  A prime example is the pendulum clock that converts the steady weight of a hanging mass into a sustained oscillation.  When two autonomous oscillators (that normally oscillator at slightly different frequencies) are coupled weakly together, they can synchronize to the same frequency.   This effect was discovered by Christiaan Huygens when he observed two pendulum clocks hanging next to each other on a wall synchronize the swings of their pendula.  Synchronization is a central paradigm in modern dynamics for several reasons.  First, it demonstrates the emergence of order when a collective behavior emerges from a collection of individual systems (this phenomenon of emergence is one of the fundamental principles of complex system science).  Second, synchronized systems include such critical systems as the beating heart and the thinking brain.  Third, synchronization becomes a useful tool to explore coupled systems that have a large number of linked subsystems, as in networks of nodes.

6) Network Dynamics

Networks have become one of the driving forces of our modern interconnected society.  The structure of networks, the dynamics of nodes in networks, and the dynamic growth of networks are all coming into focus as we live our lives in multiple interconnected webs.  Dynamics on networks include problems like diffusion and the spread of infection and connect with topics of percolation theory and critical phenomenon.  Nonlinear dynamics on networks provide key opportunities and examples to study complex interacting systems.

7) Neural Networks

Perhaps the most enigmatic network is the network of neurons in the brain.  The emergence of intelligence and of sentience is one of the greatest scientific questions.  At a much simpler level, the nonlinear dynamics of small numbers of neurons display the properties of autonomous oscillators and synchronization, while larger sets of neurons become interconnected into dynamic networks.  The dynamics of neurons and of neural networks is a  key topic in modern dynamics.  Not only can the physics of the networks be studied, but neural networks become tools for studying other complex systems.

8) Evolutionary Dynamics

The emergence of life and the evolution of species stands as another of the greatest scientific questions of our day.  Although this topic traditionally is studied by the biological sciences (and mathematical biology), physics has a surprising lot to say on the topic.  The dynamics of evolution can be captured in the same types of nonlinear flows that live in state space.  For instance, population dynamics can be described as a large ensemble of interacting individuals that are born, flourish and die dependent on their environment and on their complicated interactions with other members in their ecosystem.  These types of problems have state spaces of extremely high dimension far beyond what we can visualize.  Yet the emergence of structure and of patterns from the complex dynamics helps to reduce the complexity, as do conceptual metaphors like evolutionary fitness landscapes.

9) Economic Dynamics

A non-negligible fraction of both undergraduate and graduate physics degree holders end up on Wall Street or in related industries.  This is partly because physicists are numerically fluent while also possessing sound intuition.  Therefore, economic dynamics is a potentially valuable addition to the modern dynamics curriculum and easily expressed using the concepts of dynamical flows and state space.  Both microeconomics (business competition, business cycles) and macroeconomics (investment and savings, liquidity and money, inflation, unemployment) can be described and analyzed using mathematical flows that are the central toolkit of modern dynamics.

10) Relativity

Special relativity is a common topic in the current upper-division physics curriculum, while general relativity is viewed as too difficult to expose undergraduates to.  This is mostly an artificial division, because Einstein’s “happiest thought” occurred when he realized that an observer in free fall is in a force-free (inertial) frame.  The equivalence principle, that states that a frame in uniform acceleration is indistinguishable from a stationary frame in a uniform gravitational field, opens a wide door that connects special relativity to general relativity.  In an undergraduate course on modern dynamics, the metric tensor (described above) is introduced in simple terms, providing the foundation to develop Minkowski spacetime, and the next natural extension is to warped spacetime—all at the simple level of linear algebra combined with partial differentiation.  General relativity ties in many of the principles of the modern dynamics curriculum (dynamical flows, state space, metric space, invariants, nonlinear dynamics), and the students can simulate orbits around black holes with ease.  I have been teaching General Relativity to undergraduates for over ten years now, and it is a highlight of the course.

Introduction to Modern Dynamics

For further reading and more details, these top 10 topics of modern dynamics are defined and explored in the undergraduate physics textbook “Introduction to Modern Dynamics: Chaos, Networks, Space and Time” published by Oxford University Press (2015).  This textbook is designed for use in a two-semester junior-level mechanics course.  It introduces the topics of modern dynamics, while still presenting traditional materials that the students need for their physics GREs.

 

How to Weave a Tapestry from Hamiltonian Chaos

While virtually everyone recognizes the famous Lorenz “Butterfly”, the strange attractor  that is one of the central icons of chaos theory, in my opinion Hamiltonian chaos generates far more interesting patterns. This is because Hamiltonians conserve phase-space volume, stretching and folding small volumes of initial conditions as they evolve in time, until they span large sections of phase space. Hamiltonian chaos is usually displayed as multi-color Poincaré sections (also known as first-return maps) that are created when a set of single trajectories, each represented by a single color, pierce the Poincaré plane over and over again.

The archetype of all Hamiltonian systems is the harmonic oscillator.

MATLAB Handle Graphics

A Hamiltonian tapestry generated from the Web Map for K = 0.616 and q = 4.

Periodically-Kicked Hamiltonian

The classic Hamiltonian system, perhaps the archetype of all Hamiltonian systems, is the harmonic oscillator. The physics of the harmonic oscillator are taught in the most elementary courses, because every stable system in the world is approximated, to lowest order, as a harmonic oscillator. As the simplest dynamical system, one would think that it held no surprises. But surprisingly, it can create the most beautiful tapestries of color when pulsed periodically and mapped onto the Poincaré plane.

The Hamiltonian of the periodically kicked harmonic oscillator is converted into the Web Map, represented as an iterative mapping as

WebMap

There can be resonance between the sequence of kicks and the natural oscillator frequency such that α = 2π/q. At these resonances, intricate web patterns emerge. The Web Map produces a web of stochastic layers when plotted on an extended phase plane. The symmetry of the web is controlled by the integer q, and the stochastic layer width is controlled by the perturbation strength K.

MATLAB Handle Graphics

A tapestry for q = 6.

Web Map Python Program

Iterated maps are easy to implement in code.  Here is a simple Python code to generate maps of different types.  You can play with the coupling constant K and the periodicity q.  For small K, the tapestries are mostly regular.  But as the coupling K increases, stochastic layers emerge.  When q is a small even number, tapestries of regular symmetric are generated.  However, when q is an odd small integer, the tapestries turn into quasi-crystals.

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
“”
@author: nolte
“””

import numpy as np
from scipy import integrate
from matplotlib import pyplot as plt
plt.close(‘all’)
phi = (1+np.sqrt(5))/2
K = 1-phi     # (0.618, 4) (0.618,5) (0.618,7) (1.2, 4)
q = 4         # 4, 5, 6, 7
alpha = 2*np.pi/q

np.random.seed(2)
plt.figure(1)
for eloop in range(0,1000):

xlast = 50*np.random.random()
ylast = 50*np.random.random()

xnew = np.zeros(shape=(300,))
ynew = np.zeros(shape=(300,))

for loop in range(0,300):

xnew[loop] = (xlast + K*np.sin(ylast))*np.cos(alpha) + ylast*np.sin(alpha)
ynew[loop] = -(xlast + K*np.sin(ylast))*np.sin(alpha) + ylast*np.cos(alpha)

xlast = xnew[loop]
ylast = ynew[loop]

plt.plot(np.real(xnew),np.real(ynew),’o’,ms=1)
plt.xlim(xmin=-60,xmax=60)
plt.ylim(ymin=-60,ymax=60)

plt.title(‘WebMap’)
plt.savefig(‘WebMap’)

References and Further Reading

D. D. Nolte, Introduction to Modern Dynamics: Chaos, Networks, Space and Time (Oxford, 2015)

G. M. Zaslavsky,  Hamiltonian chaos and fractional dynamics. (Oxford, 2005)