owned this note
owned this note
Published
Linked with GitHub
## Reproducing "Ergodic theory and visualization. I. Mesochronic plots for visualization" by Levnajic and Mezic (2010)
We have a general interest in detecting invariants in integrable (and nearly-integrable) Hamiltonian dynamical systems and their associated Koopman eigenvalue problems. Following Levnajic and Mezic (2010) and Igor's suggestions, I learned how to compute the so-called ergodic partition of some discrete maps. This seems like it will be a handy computational technique soon enough. But first, I wanted to reproduce the paper to make sure I understood the details of how it works. I've been mostly succesful with this. I will be referencing the paper mentioned above from here on out in this section.
### The Basic Idea of the Partition Method and an Algorithm to compute It
The method is laid out in Section 2 A and B in the paper, and I'll provide a review of it here later (or in a potential future manuscript). If you are unfamiliar with the method, please reference this section of the paper. One thing to note is the arbitrary use of $L^1(A),$ with $A$ the phase space, basis functions throughout the paper. I asked Igor about it, and he answered that they were chosen ad hoc to speed up convergence. You will see throughout this note and the paper that such choices of functions most likely took a good deal of experimentation to find. For now, I will just take them on faith as wise choices.
### Numerical Example 1 (The Standard Map)
The standard map is given by
$$
p_n = \mathrm{mod}(p_{n-1} + \varepsilon\sin\left(2\pi x_{n-1}\right), 1)
$$
$$
x_n = \mathrm{mod}(x_{n-1} + p_n, 1)
$$
This plot shows the approximation of the time average of the observable $f(x,y)=\sin(8\pi x)\sin(8\pi y)$ for $\varepsilon=0.12$ (compare with figure 3)

Such a time-averaged observable is key in approximating the ergodic partition of the phase space. I was able to get this color plot with a $400\times 400$ grid with $t_{\rm final} =7000$ iterations. The plot doesn't look so converged in a couple of bands around some of the islands, but I think it's ok.
Next, we discuss the important concept of the ergodic quotient space, here denoted by $Q_e$. Essentially, $Q_e$ is the space where each ergodic set is mapped into a single point. The finite-dimensional Euclidean projection of $Q_e$ to a space of finite sequences labeled by $i_1,...,i_N$ can be obtained by the $N$-tuples $\{f^*_{i_1},...,f^*_{i_N}\}(\mathbf{x})$ where each $f_k(\mathbf{x})$ is a basis function of $L^2(A)$. Such an embedding is called a mesochronic (time-averaged) scatter plot (MSP). The MSP, in my opinion, is *the* important and novel visualization technique introduced (at least to me) by the paper since it can be used to study higher dimensional systems.
In practical terms, the MSP is a graphical representation of $Q_e$. It amounts to computing a finite set of observables for a map, and constructing a scatter plot via
$$
(x_1,...,x_m)\to (f_1^*(x_1,...,x_m),...,f_m^*(x_1,...,x_m))\in A
$$
Continuing to use the standard map as an example, further consider the observables $f_1=\sin(2\pi y)$ and $f_3=\cos(12\pi x)\cos(2\pi y)$. The MSP for these observables with $\varepsilon=0.12$ looks like (and compare with Figure 5)

This scatter plot is $f_3$ vs. $f_1$, and has the undesirable feature of self-intersection. So, embed in a higher dimensional space via an inclusion of another observable, namely, $f_2=\cos(2\pi y)$. Now the MSP looks like (compare with Figure 8)

To visualize the approximation of the ergodic partition, an extra step of "clustering" must be performed and is discussed on page 12/shown in Figures 10 and 11. I didn't take the time to implement this, since, (a) I felt confident I could, and (b) I didn't think it would have much relevance in a higher dimensional example at the moment.
### Numerical Example 2 (The Froeschle Map)
The MSP really comes in handy in higher dimensional examples. The paper uses the following Froeschle Map
$$
x_n = \mathrm{mod}(x_{n-1}+y_{n-1}+\varepsilon_1\sin(2\pi x_{n-1})+\eta \sin(2\pi(x_{n-1}+z_{n-1})), 1)
$$
$$
y_n = \mathrm{mod}(y_{n-1}+\varepsilon_1\sin(2\pi x_{n-1})+\eta \sin(2\pi(x_{n-1}+z_{n-1})), 1)
$$
$$
z_n = \mathrm{mod}(z_{n-1}+w_{n-1}+\varepsilon_2\sin(2\pi z_{n-1})+\eta \sin(2\pi(x_{n-1}+z_{n-1})), 1)
$$
$$
w_n = \mathrm{mod}(w_{n-1}+\varepsilon_2\sin(2\pi z_{n-1})+\eta \sin(2\pi(x_{n-1}+z_{n-1})), 1)
$$
Choosing $\varepsilon_1=\varepsilon_2=2\eta=0.05$ and slicing along the $w=z=0$ plane, we have (compare with Figure 12)

The plot is far from converged. This is 30,000 iterations for a $200\times 200$ grid, where in the paper it's shown for 200,000 iterations for a $500\times 500$ grid. I think the plots agree qualitatively (the "scars" in the red portion, the color bar, and overall geometry match up for the most part), but maybe I'll get around to leaving this running over night, because it takes a while to compute.
The most interesting figures are 13 and 14 where MSPs are shown. Using a $12\times12\times12\times12$ grid, $\varepsilon_1=\varepsilon_2=2\eta=0.01,$ and three observables $f_1,f_2,$ and $f_3$ which are written in the caption of Figure 13, I see the following

As you can see, this looks nothing like Figure 14. This is because I have used a uniform grid, and this is not what was done in the paper. On page 15, a good deal of information is shared about how to pick out the resonances which are to be visualized. This intuition comes from the ergodic quotient space discussed for the standard map earlier at the bottom of page 8 and top of page 9. This is basically where my understanding ends when it comes to applying this method to other higher dimensional problems in the future. How would I know which "adaptive" grid to construct the MSP for a system of interest?
I'm going to get working on other maps, and try to figure things out on a problem to problem basis. Duffing, Calogero, and Toda are on the list...