0808.2182/s2.tex
1: \documentclass[10pt]{article}
2: \setlength{\oddsidemargin}{.2in}
3: \setlength{\evensidemargin}{.2in}
4: \setlength{\topmargin}{-.5in}
5: \setlength{\textwidth}{6.4in}
6: \setlength{\textheight}{8.8in}
7: \usepackage{epsfig,amssymb,latexsym,color,amsmath,pifont}
8: \newcommand{\n}{\noindent}
9: \newcommand{\e}{\varepsilon}
10: \newcommand{\R}{\mathbb{R}}
11: \newcommand{\Q}{\mathbb{Q}}
12: \newcommand{\N}{\mathbb{N}}
13: \newcommand{\ns}{\normalsize}
14: \newcommand{\inv}{invariant }
15: \newcommand{\per}{periodic }
16: \newcommand{\x}{\mathbf{x}}
17: \newcommand{\T}{\mathbf{T}}
18: \newcommand{\Z}{\mathbb{Z}}
19: 
20: \begin{document}
21: 
22: \title{\textbf{Ergodic Theory and Visualization II: \\ 
23: Visualization of Resonances and Periodic Sets}}
24: 
25: 
26: \vspace{0.5cm}
27: \author{Zoran Levnaji\'c${}^{1}$, Igor Mezi\'c${}^{2}$}
28: 
29: \date{}
30: 
31: \maketitle
32: 
33: \vspace{-0.8cm}
34: \ns
35: \begin{center}
36: ${}^{1}$\textit{Department of Theoretical Physics, Jo\v zef Stefan Institute, Jamova Cesta 39, \\ 1000 Ljubljana, Slovenia. Email:} \texttt{zoran.levnajic@ijs.si} \\[0.1cm]
37: ${}^{2}$\textit{Department of Mechanical and Environmental Engineering, University of California, \\ Santa Barbara, CA 93106, USA. Email:} \texttt{mezic@engineering.ucsb.edu}
38: \end{center}
39: 
40: \vspace{0.3cm}
41: 
42: \begin{center}
43: ----------------------------------------------------------------------------------------------------------------------------
44: 
45: \begin{minipage}[t]{5.72in}
46: \ns 
47: {\bf We extend the computational visualization method proposed in \cite{visualization-paper-1,mezicwiggy} using the concept of the harmonic time averages presented in \cite{mezicbanaszuk}. Algorithms for frequency analysis of the phase space are constructed and implemented numerically, producing a graphical visualization of the periodic sets for a given periodicity. The convergence of the harmonic time averages is addressed, and an algorithm using more functions is proposed for visualization of the phase space periodic partitions. Visualization of chaotic regions based on the same concept is exposed as well. The method is presented in the context of the discrete-time dynamical systems using the Chirikov standard map as the prototype. Applications to other maps are included.}
48: \end{minipage}\\[0.1cm] 
49: ----------------------------------------------------------------------------------------------------------------------------
50: \end{center}
51: \n \textbf{Keywords}: dynamical systems, measure-preserving maps, ergodic theory, computational visualization, periodic sets, frequency analysis
52: 
53: %% --------------------------------------------------------------------------------------------------------------------
54: %% --------------------------------------------------------------------------------------------------------------------
55: %% --------------------------------------------------------------------------------------------------------------------
56: 
57: 
58: \section{Introduction} \label{Introduction}
59: 
60: Methods of computational investigation of complex dynamical systems are of crucial importance today, given the increasing range of interdisciplinary phenomena currently under examination \cite{wiggy}. As virtually none of the naturally motivated dynamical system can by entirely treated with analytical techniques, the necessity of numerical investigation is beyond doubt. When choosing from a diverse spectrum of available computational approaches, one takes into account the nature of the problem as well as the study direction that is to be followed.
61: 
62: Typically, when the dynamical systems are considered, the direct integration of system's trajectories is performed for long integration times, seeking to optimize the precision with respect to the numerical cost. The obtained trajectories are then analyzed, either in the context of specific trajectory-approach to the system, or by looking for their universal properties that report about global nature of the system under investigation. In particular, one is often interested in  \textit{frequency-analysis} of the trajectory done by computing the power spectrum of the trajectory's time-signal. Power (Fourier) spectrum of a time-signal gives a frequency decomposition of the trajectory, showing it in terms of its frequencies \cite{LL,GH}.
63: 
64: The idea of frequency analysis of time series inspired new approaches to study of the dynamical systems \cite{cohentheory}, specifically in the context of chaotic motion analysis \cite{laskar-1,chen}, high-dimensional dynamical systems \cite{laskar-2} and the study of celestial dynamics \cite{laskar-3}. Namely, an algorithm can be constructed based on generalization of power spectrum analysis that estimates the system's fundamental frequencies in a decreasing order \cite{laskar-1}. Approaches of this sort were very useful, both in the context of continuous-time \cite{cohentheory} and discrete-time \cite{laskar-4} dynamical systems. More recently, a new approach has been proposed based on wavelet frequency analysis that investigates the properties of specific chaotic orbits and detects resonance trappings and transitions \cite{chandre,uzer}. In particular, the method is suited for examination of weakly chaotic orbits. Furthermore, another recent time-frequency analysis method for chaotic time series based on the power spectrum estimator was suggested, that distinguishes between noisy flow and the colored noise \cite{jun}. 
65: 
66: The key downside of the mentioned approaches lies in their locality: the frequency analysis is usually performed on single trajectories/time-signals only. 
67: While providing a detailed analysis of trajectories under examination, the method remains focused on pre-defined ensembles of trajectories, unable to give conclusions regarding the global characteristics of the system, that would follow from comparison among frequency properties of many trajectories. In the present work, we extend the previously exposed idea of invariant sets visualization method based on ergodic partitioning \cite{visualization-paper-1}, to the domain of global frequency analysis of the dynamical phase space. We construct harmonic time averages of functions defined over the phase space, and produce color-plots reporting about frequency phase space structure by visualizing periodic subsets of prescribed frequencies. We therefore obtain algorithm that produces detailed analysis of phase space in terms of periodic sets resonating with a single frequency: by using more frequencies we extend the method to full phase space frequency analysis. By employing parallel computing we are able to save numerical time and obtain global phase space plots relatively fast.
68: 
69: As opposed to other approaches, our method is global in its nature, as it simultaneously provides insights into the entire phase space. Also, along the lines of our previous study \cite{visualization-paper-1}, this method is suitable for high-dimensional systems in terms of considering phase space sections of smaller dimensionality. Furthermore, as it will be shown, the method is applicable to visualization of the chaotic zone of the dynamical system. We will examine the method using well-known example of standard map, as this systems possesses a large variety of \per sets and a chaotic zone whose locations are known.
70: 
71: This paper is organized as follows: we briefly expose the theoretical background of our method in Section \ref{The Visualization Idea}. and show its implementation with single function in Section \ref{Phase Space Plots with a Single Function}. The convergence and precision issues are settled in Section \ref{The Convergence Study}. In Section \ref{The Phase Space Plots with Multiple Functions}. we show the application of multi-functional approach, designing a simple algorithm for visualization of periodic and chaotic partitions. We show the applicational extent of out method in Section \ref{Extended Standard Map}., and give a few concluding remarks in Section \ref{Conclusions}.
72: 
73: %% --------------------------------------------------------------------------------------------------------------------
74: %% --------------------------------------------------------------------------------------------------------------------
75: %% --------------------------------------------------------------------------------------------------------------------
76: 
77: \section{The Visualization Idea} \label{The Visualization Idea}
78: 
79: In this Section we present the concept of harmonic time averages \cite{mezicbanaszuk} that relate the ergodic theory ideas to the frequency analysis. We expose the basics of the mathematical background necessary for our study; for more rigorous details we however address the reader to \cite{mezicbanaszuk,petersen,walters}.
80: 
81: Let a discrete-time measure-preserving map $\x' = \T \x$ on a compact phase space $A \subset \mathbb{R}^n$ be denoted as: 
82: \begin{equation}
83:  \x_{n+1} = \T \x_n \;\;\; \mbox{or}  \;\;\;   \x_n = \T^n \x_0 \; \; n \ge 0 . \label{map}
84: \end{equation}
85: Our central aim is to visualize the \textit{\per sets} $B_p \subset A$ with the periodicity $p$ for the map $\T$, defined as:
86: \begin{equation}
87: \x_0  \in  B_p \;\; \Rightarrow \;\; \T^{p \times n} \; \x_0 \in B_p \; \;\; \forall n \ge 0 . \label{periodic-set}
88: \end{equation}
89: Periodic sets are essentially generalizations of the periodic orbits, with the period-1 set being  the usual \inv set. Note that there are always $p$ distinct period-$p$ sets $B_{p}^{1}, \hdots  B_{p}^{p}$ such that a phase space point $\x_0$ makes $p$ jumps among them before completing a whole cycle. Union of a sequence of such sets $\cup_{k} B_{p}^{k} = B$ is an \inv set composed of $p$ disjoint parts, that we will call a \textit{periodic chain}. In what follows we will expose a computational method based on ergodic theory designed to graphically visualize such set in the dynamics phase space, based on the methods described in \cite{visualization-paper-1}.
90: 
91: Consider $L^2$ real-valued functions on $A$ and let the \textit{harmonic time average} $f_{\omega}^{*} (\x_0)$ of a function $f \in L^2(A)$ for the frequency $\omega \in [0,\frac{1}{2}]$ corresponding to a phase space point $\x_0 \in A$, be defined as:
92: \begin{equation}
93: f_{\omega}^{*} ({\bf x}) = \lim_{n \rightarrow \infty} \; \frac{1}{n}\sum_{k=0}^{n-1} e^{i 2 \pi k \omega}
94: f (\T^k \bf x) .  \label{hta-definition}
95: \end{equation}
96: By the Ergodic Theorem this limit exists almost everywhere in the phase space for any measure-preserving map $\T$ \cite{petersen,walters,mane}. Harmonic time averages are a generalization of the time averages known from the standard ergodic theory , which is easy to see by observing that $f_{\omega=0}^{*} =f^*$ \cite{petersen-proc}. Furthermore, from the definition Eq.\,(\ref{hta-definition}) it follows:
97: \begin{equation}
98:  f_{\omega}^{*} (\T^n \x)  = e^{- i 2 \pi \omega n} f_{\omega}^{*} (\x) ,
99: \end{equation} 
100: which hence implies:
101: \begin{equation}
102:   |f_{\omega}^{*} (\T^n \x)|  =  |f_{\omega}^{*} (\x)| \; \;\; \forall n \ge 0 ,
103: \end{equation}
104: meaning that while $f_{\omega}^{*}$ is not an \inv function, its absolute value $|f_{\omega}^{*}|$ is. That is to say each trajectory (periodic or not) has a constant $|f_{\omega}^{*}|$ for each point. As throughout this work we will be considering only the absolute values of the harmonic time averages, we introduce the notation:
105: \[ h_{\omega}(\x) = |f_{\omega}^{*} (\x)|. \] 
106: We will refer to functions $h_{\omega}(\x)$ as harmonic time averages, despite really intending their absolute values.
107: 
108: Consider now the circle $S^1 \equiv [0, 2\pi[$ and the {\em shift map} $\Theta_{\omega}$ mapping the circle onto itself:
109: \begin{equation}
110: \Theta_{\omega} \theta = \theta + 2 \pi \omega, \label{shiftmap}
111: \end{equation}
112: for some constant angle $\omega \in [0,\frac{1}{2}]$. Given a map $\T : A \rightarrow A$ and a set $B \subset A$, a shift map $\Theta_{\omega}$ is called the \textit{factor map} to $\T$ on $B$ if there is a measure-preserving homeomorphism $F: A \rightarrow S^1$ such that:
113: \begin{equation}
114:  (F \circ \mathbf{T}) (\mathbf{x}) = (\Theta_{\omega} \circ F) (\mathbf{x}) , \label{factormap}
115: \end{equation} 
116: $\forall \x \in B$. This means the dynamics $\T$ on $B \subset A$ is topologically equivalent to a shift map, which implies that the set $B$ is a \per set or a union of periodic sets with the period $1/\omega$. The following results hold:
117: \paragraph{Theorem} Given a dynamics $\T: A \rightarrow A$ and $f \in L^2(A)$, if the harmonic time average $h_{\omega}$ is  non-zero on some set $B \subset A$ then there exists a factor map for $\mathbf{T}$ on the set $B$ given by the shift map with the angle $\omega$.
118: \paragraph{Theorem} If $\T: A \rightarrow A$ admits a shift map with the angle $\omega$ as a factor map on some set $B \subset A$, then there exists an  $f \in L^2(A)$ such that its harmonic time average $h_{\omega}$ is non-zero on $B$.\\[0.25cm]
119: Therefore, the harmonic time averages for the specific frequencies $\omega$ can be used for detecting the periodic sets and \per chains of the period $1/\omega$. If $h_{\omega}$'s frequency $\omega$ resonates with the frequency of a \per set, its final limit value for the points within this set will be non-zero; otherwise the summation of the complex phases $e^{-i2\pi\omega n}$ will average out its limit value to zero. Computing the harmonic time average $h_{\omega}$ over the whole phase space will therefore expose only the phase space subsets whose frequency resonates with $\omega$, otherwise $h_{\omega}$ will average out to zero (we will define the periodic sets mostly by their frequency that is inverse of their periodicity). 
120: 
121: Observe the relationship between a harmonic time average and a Fourier transform: while the later gives the entire frequency spectrum of a certain time-signal (a single trajectory), the former gives the phase space partition that resonates with the particular chosen frequency. A harmonic time average value for a given trajectory is simply the Fourier transform's value at that frequency for this trajectory. While the Fourier transform provides us with a full frequency analysis for a single trajectory, the harmonic time average gives a global phase space analysis, but for a single frequency only.
122: 
123: Furthermore, a shift map with an angle $\omega$ is also a shift map with all the angles that are integer multiples of $\omega$. Therefore, a harmonic time average of frequency $\omega$ reveals as non-zero all the \per sets with the periodicities that are integer multiples of $1/\omega$: a harmonic time average for $\omega=\frac{1}{2}$ will not only resonate with all the period-2 set, but also all the even-period sets. This reduced the sequence of interesting periods to the numbers that are \textit{mutually prime}. Throughout this work we will consider periodicities given by the sequence of prime numbers: 2,3,5,7 etc. We will not consider the period-1 sets (frequency $\omega=0$) as $h_{\omega=0}$  will simultaneously expose \per sets of all other periodicities (as expected given that  $h_{\omega=0} = |f^*|$), which does not allow a detailed analysis.
124: 
125: The final value of a harmonic time average over a resonating \per set will also be determined by the properties of the function $f$ in question: the limit value for a resonating \per set can happened to be zero due to location of the set itself with respect to the properties of the function. For this reason we will, in a way similar to our previous study \cite{visualization-paper-1}, employ the harmonic time averages of more functions for the same frequency in order to optimize the visualization of \per sets of that frequency. The computational algorithm and its implementation are described in the rest of this Section.
126: 
127: 
128: \subsection{The computing algorithm and the numerical details}
129: 
130: We construct the algorithm for the phase space partitioning into a \textit{periodic partition} of a given frequency using harmonic time averages of multiple functions. For example, the periodic partition for the frequency $\omega=\frac{1}{2}$ is constructed as a partition of all even-period \per sets (and of course the non-resonating rest of the phase space). Following \cite{visualization-paper-1}, we limit the discussion to the case of a two-dimensional map with the phase space $A = [0,1] \times [0,1]$. 
131: \begin{description}
132:     \item[step 1] Set up a grid (lattice) of initial grid-points $(x_0,y_0)$ on the phase space $A$ and select 
133:    the visualization frequency  $\omega$ in form $\frac{1}{p}$ with $p$ prime number 2,3,5,7 etc.
134:     \item[step 2] Pick $N$  linearly independent functions $\{ f_1, \hdots f_N \}$ from $L^2 (A)$ and calculate their partial harmonic time 
135:    averages for $n_{\mbox{final}}$ iterations for each initial grid-point, which approximate the real harmonic 
136:    time averages $\{h_{\omega}^{1}, \hdots  h_{\omega}^{N} \}$
137:     \item[step 3] To every initial grid-point $(x_0,y_0)$ associate the \textit{harmonic time average vector} corresponding to it: 
138: \begin{equation}
139: (x_0,y_0) \;\; \longrightarrow \;\;  \mathbf{\tilde h}_{\omega} (x_0,y_0) = \{ h_{\omega}^{1} (x_0,y_0), \hdots ,   
140:  h^N_{\omega} (x_0,y_0) \} \in [0,1]^N   \label{htavectors}
141: \end{equation}
142:     \item[step 4] Observe the distribution of the harmonic time average vectors $\mathbf{\tilde h}_{\omega} (x_0,y_0)$ 
143: throughout $\R^N$ and group them optimally into clusters. Divide $A$ into a union of subsets, with each subset being given by those grid-points $(x_0,y_0)$ whose harmonic time average vectors $\mathbf{\tilde h}_{\omega} (x_0,y_0)$ belong to the same cluster of vectors. This union of subset is the $N$-order approximation periodic partition of $A$ with frequency $\omega$. 
144: \end{description}
145: The optimal number of iterations $n_{\mbox{final}}$ is to be set in accordance with the harmonic time averages convergence properties that will be studied in the Section \ref{The Convergence Study}. Visualization also depends on the clustering procedure, that we will examine in the Section  \ref{The Phase Space Plots with Multiple Functions}. The choice of functions $\{ f_1, \hdots f_N \}$ is again done by looking at an orthogonal basis on $L^2(A)$ as it provides the simplest source of linearly independent functions. Throughout this work we will employ functions from the 2D Fourier orthogonal basis given as:
146: \begin{equation}
147:   \sin (\pi nx + \pi my) \;\;\; \mbox{with} \;\;\; n,m \in \mathbb{Z} . \label{fourierbasis}
148: \end{equation} 
149: These functions are among them linearly independent for any $n \neq m$.
150: 
151: In a way identical to \cite{visualization-paper-1} we will be using parallel processing to enhance the efficiency of computation.
152: We typically use the grid of  $800 \times 800$ initial grid-points and iterate the dynamics for $n_{\mbox{final}}=30,000$ iterations for each grid-point to approximate the harmonic time average value for each function. It takes about 10-15 minutes to compute one time average on a single processor for a grid of this size, a typical run was however done using 5-10 processors (depending on the availability) and took about 5 minutes for a single function. Computing more functions simultaneously insignificantly increases the computation time.
153: 
154: 
155: \subsection{The standard map as the testing prototype}
156: 
157: As in the previous work, we will rely on the Chirikov's standard map \cite{chirikov} for testing the described method, as this map possesses a variety of \per chains and sets and other dynamical behaviors for a wide range of parameters \cite{greene,LL,ja4}. The map is a homeomorphism on a 2D torus given by:
158: \begin{equation}
159: \begin{array}{lllc}
160:   x' &=& x + y  + \e \sin (2 \pi x)  \;\;\;  &[mod \; 1]  \\
161:   y' &=& y + \e \sin (2 \pi x)  \;\;\;  &[mod \; 1]
162: \end{array}
163: \label{mojasm}
164: \end{equation}
165: where $(x,y) \in [0,1] \times [0,1] \; \equiv [0,1]^2$ (the usual standard map's parameter $k$ is here $k=2\pi \e$). 
166: 
167: 
168: \section{Phase Space Plots with a Single Function} \label{Phase Space Plots with a Single Function}
169: 
170: In this Section we consider the simplest case of $N=1$ and show the color-plots of harmonic time averages for a single function under the dynamics of the standard map Eq.\,(\ref{mojasm}). As mentioned, we are using a grid of $800 \times 800$ initial grid-points and $n_{\mbox{final}}=30,000$ iterations.
171: For simplicity reasons, in this Section we will focus only on the perturbation value $\e=0.12$ and the function  $f(x,y)=\sin(2\pi x + 3\pi y)$. 
172: 
173: In Figs.\,\ref{fig-singlefourier}a,b\&c we show plots for the frequencies $\omega=\frac{1}{2}, \frac{1}{3}, \frac{1}{5}$ that are visualizing the periodic sets with the periodicities that are multiples of 2, 3 and 5 respectively. For clarity we are using a log-scale in for the $h_{\omega}$ value and stretching the colorbar from the smallest to the biggest value of $\log h_{\omega}$. 
174: \begin{figure}[!hbt] \begin{center}
175: $\begin{array}{cc}
176:     \includegraphics[height=5.5cm,width=7.5cm]{h-sin23-e012-om1kroz2.jpg} &
177:     \includegraphics[height=5.5cm,width=7.5cm]{h-sin23-e012-om1kroz3.jpg} \\
178:     \mbox{(a)} & \mbox{(b)} \\
179:     \includegraphics[height=5.5cm,width=7.5cm]{h-sin23-e012-om1kroz5.jpg} &
180:     \includegraphics[height=5.5cm,width=7.5cm]{h-sin23-e012-om1krozirr.jpg} \\
181:     \mbox{(c)} & \mbox{(d)} 
182: \end{array}$
183: \caption{Harmonic time averages $\; \log h_{\omega}$ of $\sin(2\pi x + 3\pi y)$ for the map Eq.\,(\ref{mojasm}) with $\e=0.12$ with the frequencies $\omega=\frac{1}{2}$ in (a), $\omega=\frac{1}{3}$ in (b),  $\omega=\frac{1}{5}$ in (c) and  $\omega=\frac{1}{\pi}$ in (d).} 
184: \label{fig-singlefourier}
185: \end{center}  \end{figure}
186: The chains (families) of periodic sets are correctly predicted in all the plots, together with the periodic sets of higher (integer multiple) periodicities. The final harmonic time average value $h_{\omega}$ is modulated by the values that the employed function is taking over the the periodic set in question, which explains why are some periodic chains better visible than the others. Recall that the large period-2 island around the elliptic fixed point  $(\frac{1}{2},\frac{1}{2})$ (cf. Fig.\,\ref{fig-singlefourier}a) is actually a nested set of infinitely many quasi-periodic orbits enclosing the fixed point. Each of these quasi-periodic orbits is of course a period-2 set, but the color-difference among them is less visible due to the use of the log-scale. By using the log-scale we are focusing on revealing the periodic chains themselves as phase space subsets, rather then trying to discern their internal sub-structure.
187: 
188: Some of the chains of periodic sets are visible in more plots (like period-6 chain in Fig.\,\ref{fig-singlefourier}a and Fig.\,\ref{fig-singlefourier}b), as their periodicities are common-multiples of various basic frequencies. On the other hand, some periodic chains (e.g. period-10 chain) are visible in one plot but not in the others (Fig.\,\ref{fig-singlefourier}a and Fig.\,\ref{fig-singlefourier}c) despite resonating with both frequencies: as already mentioned, this is due to the properties of the function used for averaging, and will be taken care of by using multiple functions (see the forthcoming Sections).
189: 
190: Also, observe that the chaotic zone (already locally present for this $\e$-value around the hyperbolic fixed point $(0,0) \equiv (1,1)$) is resonating at \textit{all} frequencies, although much more weakly. Moreover, the chaotic zone is also weakly resonating in case of an irrational frequency $1/\pi$ as visible in Fig.\,\ref{fig-singlefourier}d, at which no other \per set resonates at all (within the limits of the precision of numerically irrational number). As we shall see, this can be used for visualization of the chaotic zone itself using more functions.
191: 
192: 
193: 
194: \section{The Convergence Study} \label{The Convergence Study}
195: 
196: In this Section we study the convergence of the harmonic time averages addressing the questions of the precision of their final values and the optimal number of iterations required. We will distinguish between the regular (periodic) and chaotic orbits, and between rational and irrational frequencies, justifying the visualization results from the previous Section.
197: 
198: Consider the $n$-th partial harmonic time average for some frequency $\omega$ given by:
199: \begin{equation}
200:  f^n_{\omega}(x_0,y_0) = \frac{1}{n} \sum_{k=0}^{n-1} e^{i 2 \pi k \omega} f({\T}^k (x_0,y_0)) ,
201: \end{equation}
202: with $\lim_{n \rightarrow \infty} |f^n_{\omega}(x_0,y_0)| = h_{\omega} (x_0,y_0)$  assumed to exist for all the grid-points $(x_0,y_0)$. The difference: 
203: \begin{equation}
204:  \Delta_{(x_0,y_0)} (n) = | \; h_{\omega}(x_0,y_0) - |f^n_{\omega}(x_0,y_0)| \; |
205: \end{equation}
206: in function of $n$ is a sequence whose behavior is to be studied in relation to the orbits/frequencies mentioned above. We iterate the dynamics for $10^7$ iterations recording the first $10^6$ iterations and defining $|f^{n=10^7}_{\omega}| = h_{\omega}$. This gives the sequence $\Delta (n)$ whose asymptotic properties are investigated.
207: 
208: \textit{The Regular Region}.  As mentioned earlier, for all the regular points (trajectories), the harmonic time average converges to zero in case its frequency  
209: \begin{figure}[!hbt] \begin{center}
210: $\begin{array}{cc}
211:     \includegraphics[height=4.8cm,width=4.3cm]{h-conv-sin23-x051y049-e012-om1kroz2.jpg} &
212:     \includegraphics[height=4.8cm,width=4.3cm]{h-conv-sin23-x051y049-e012-om1krozirr.jpg} \\
213:     \mbox{(a)} & \mbox{(b)} \\
214:     \includegraphics[height=4.8cm,width=4.3cm]{h-conv-sin23-x002y001-e012-om1kroz2.jpg} &
215:     \includegraphics[height=4.8cm,width=4.3cm]{h-conv-sin23-x002y001-e012-om1krozirr.jpg} \\
216:     \mbox{(c)} & \mbox{(d)} 
217: \end{array}$
218: \caption{The convergence plots for $f(x,y)=\sin(2\pi x + 3\pi y)$ under the map Eq.\,(\ref{mojasm}) for $\e=0.12$ on log-log scale. The regular point $(0.51,0.49)$ with $\omega=\frac{1}{2}$ in (a) and $\omega=\frac{1}{\pi}$ in (b), plots fitted with -1 slope. The chaotic point $(0.02,0.01)$ with $\omega=\frac{1}{2}$ in (c) and $\omega=\frac{1}{\pi}$ in (d), plots fitted with $-\frac{1}{2}$ slope.}
219: \label{fig-convergence}
220: \end{center}  \end{figure}
221: mismatches the periodicity of the underlying set, and otherwise converges to some positive value smaller then 1. In analogy to what observed in \cite{visualization-paper-1,mezicsoti}, the convergence pattern of $\Delta (n)$ in this region neatly follows $1/n$ regardless of the frequency, as shown in the convergence plot Fig.\,\ref{fig-convergence}a. Moreover, this holds also in the case of irrational frequency, as illustrated in Fig.\,\ref{fig-convergence}b (all $h_{\omega}$s converge to zero). These results apply universally for all the regular points/\per sets independently from the $\e$-value, periodicity or the function involved, allowing a good precision estimation.
222: 
223: \textit{The Chaotic Region}. In further analogy to the previous studies \cite{visualization-paper-1,mezicsoti}, the convergence pattern exhibited by $\Delta (n)$ in this region is at best given by $1/\sqrt{n}$ and hence bounded by a $-\frac{1}{2}$ slope, which is in general better pronounced at bigger $\e$-values. At smaller $\e$-values $\Delta (n)$ is at best asymptotically bounded by the weak slopes between $-\frac{1}{2}$ and zero (see discussion of weakly chaotic region in \cite{visualization-paper-1}). These results hold uniformly for both rational and irrational frequencies, as shown in Figs.\,\ref{fig-convergence}c\&d regardless of the particular grid-point, $\e$-value or function involved.
224: 
225: Note that in analogy with the case of the usual time averages, the precision of (weakly) chaotic trajectories is to determine the lower precision bound of a harmonic time average phase space plot. We therefore set the iteration limit to $n_{\mbox{final}}=30,000$ having the overall precision of $O(10^{-2})$ or better. 
226: 
227: Furthermore, observe that in the case of an irrational frequency, a harmonic time average always converges to zero, but with a rate that depends on the nature of the underlying trajectory. For a \per set of any periodicity, this limit will converge to zero in way identical to the case of a harmonic time average with a non-matching frequency, whereas for any chaotic orbit it will always "weakly resonate" converging at a slower rate of $\Delta (n) \sim \frac{1}{\sqrt{n}}$. This provides a simple way to approximately visualize the chaotic zone as it will be shown later in this work.
228: 
229: 
230: \section{The Phase Space Plots with Multiple Functions} \label{The Phase Space Plots with Multiple Functions}
231: 
232: In this Section we consider the harmonic time averages corresponding to more linearly independent functions for the same frequency. In analogy with the construction of the ergodic partition \cite{visualization-paper-1}, we examine the correspondence given by the Eq.\,(\ref{htavectors}) and seek conclusions regarding the periodic sets phase space distribution by investigating clustering of the harmonic time average vectors. We also propose a simple algorithm for visualizing the \textit{periodic partition} for a given frequency $\omega$ and the phase space ergodic regions.
233: 
234: \subsection{Two-function scatter plots}
235: 
236: We start by $N=2$ case considering two linearly independent functions for a fixed frequency $\omega$:
237: \[ (x_0,y_0) \in \mbox{grid} \;\;\; \longrightarrow \;\;\; \{h^{1}_{\omega}, h^{2}_{\omega} \} \in [0,1]^2 , \] 
238: computed using the same grid and $n_{\mbox{final}}$ as before.
239: \begin{figure}[!hbt] \begin{center}
240:     \includegraphics[height=6.5cm,width=9.cm]{h-scatterplot-sin711-sin58-e012-om1kroz2-3-5-7} 
241: \caption{The scatter plot for $f^{1}(x,y)=\sin(7\pi x + 11\pi y)$ vs. $f^{2}(x,y)=\sin(5\pi x + 8\pi y)$ for $\e=0.12$ with four 
242: different frequencies defined by different colors and indicated in the legend.}
243: \label{fig-scatterplot}
244: \end{center}  \end{figure}
245: We construct a \textit{scatter plot} by plotting $h^1_{\omega}$ on one and  $h^2_{\omega}$ on the other axis, obtaining a 2D plot as the one in Fig.\,\ref{fig-scatterplot}. As each $h_{\omega}$ takes values from the interval $[0,1]$, with the values being zero (more precisely $\sim O(10^{-8})$) only for non-resonating sets, the plots in  Fig.\,\ref{fig-scatterplot} report about qualitative distribution of \per sets for four computed frequencies. Each branch of the scatter plot vectors for a given frequency (defined by a color) represents one periodic chain of periodicity integer multiple of the basic period. As the frequencies considered in Fig.\,\ref{fig-scatterplot} are mutually prime, the structure of the  entire scatter plot approximates the full periodic structure of the phase space at $\e=0.12$ (in the approximation of four frequencies). As opposed to scatter plots of usual time averages discussed in \cite{visualization-paper-1}, these scatter plots are less structured as they show the resonating periodic sets \textit{only}, disregarding the rest of the phase space.
246: 
247: Recall that each point in a scatter plot here has $x$-coordinate ($y$-coordinate) given by the value of $h^1_{\omega}$ ($h^2_{\omega}$). By clustering the scatter plot points of a given frequency, one can obtain a new correspondence between the (available) colors and the initial grid-points in a way analogous to what discussed in \cite{visualization-paper-1}, in order to obtain a better approximation of \per sets locations in phase space. Again, it is of interest to consider as many functions as possible, preferably with both small and large resolution numbers $n \& m$, in order to visualize both local and global phase space features. A phase space partition can be constructed this way, that visualizes all the \per sets of a chosen frequency, and therefore giving more insight into the phase space structure then a single-function approach discussed earlier. 
248: 
249: 
250: \subsection{Visualization of the single-frequency periodic partitions}
251: 
252: Consider $N$ linearly independent functions and their corresponding harmonic time averages $\{h^{1}_{\omega}, \hdots h^{N}_{\omega} \}$. Their scatter plot will be enclosed in the interval $[0,1]^N$ with a branching structure similar to Fig.\,\ref{fig-scatterplot}. Observe that each scatter plot point is actually a harmonic time average vector $\mathbf{\tilde h}_{\omega} (x_0,y_0)$ corresponding to some grid-point $(x_0,y_0)$. 
253: 
254: We introduce a norm on the scatter plot-space by considering the Euclidean norm defined on the harmonic time average vectors: 
255: \begin{equation}
256:  \Vert \mathbf{\tilde h}_{\omega} (x_0,y_0) \Vert =  \sqrt{\sum_{k=1}^{k=N} \big( h^{k}_{\omega} (x_0,y_0) \big)^{2} } 
257: \end{equation} 
258: There are clearly more scatter plot points, even with many functions, having the same (or very similar) norm $\Vert \mathbf{\tilde h}_{\omega} \Vert$. However, note that the correspondence: 
259: \[  (x_0,y_0) \in \mbox{grid} \;\;\; \longrightarrow \;\;\; \Vert \mathbf{\tilde h}_{\omega}  \Vert \]
260: maintains the key properties of the usual harmonic time average: $\Vert \mathbf{\tilde h}_{\omega} \Vert$ is zero for non-resonating periodic sets, it is very small for chaotic points and it is $O(10^{-1})$ order for resonating \per sets. On the other hand, the scalar field $\Vert \mathbf{\tilde h}_{\omega} (x_0,y_0) \Vert$ will yield better visualization of the frequency-$\omega$ \per sets as it "sums up" the visualization done by all considered $N$ functions: it approximates the \per partition of the phase space for the given frequency with the approximation-order given by the number of functions involved. It is enough for a periodic chain to resonate with at least one considered function, and it will be visualized by the $\Vert \mathbf{\tilde h}_{\omega} (x_0,y_0) \Vert$. The downside of this idea is that separate \per sets belonging to different \per chains might have the same (or very similar) colors assigned: as we are primarily interested in visualizing the \per chains as a whole, this issue will be neglected here. However, by applying phase space zooms (similarly to what discussed in \cite{visualization-paper-1}), one can analyze the sub-structure of \per sets at the desired scale.
261: 
262: We therefore construct a straightforward clustering algorithm of scatter plot points: let a new coloring-value for each grid-point 
263: $(x_0,y_0)$ be given by $H_{\omega} (x_0,y_0)$ defined as:
264: \begin{equation}
265:   H_{\omega} (x_0,y_0) =  \dfrac{\Vert \mathbf{\tilde h}_{\omega} (x_0,y_0) \Vert}
266: {\max_{(x_0,y_0) \in \mbox{grid}} \Vert \mathbf{\tilde h}_{\omega} (x_0,y_0) \Vert}, \label{clustering}
267: \end{equation} 
268: which is the field $\Vert \mathbf{\tilde h}_{\omega} (x_0,y_0) \Vert$ normalized by its biggest phase space value, and therefore with the values between 0 and 1. The field $H_{\omega} (x_0,y_0)$ approximates the \textit{\per partition} for the frequency $\omega$.
269: 
270: In Fig.\,\ref{fig-multifourier} we show approximations of period-2 and period-5 \per partitions done with four functions of different resolution numbers, and colored (clustered) using the algorithm described above. Harmonic time averages were computed for each function separately with the same grid $800 \times 800$ and $n_{\mbox{final}}=30,000$.
271: \begin{figure}[!hbt] \begin{center}
272: $\begin{array}{cc}
273:     \includegraphics[height=5.5cm,width=7.5cm]{h-sin23-sin37-sin58-sin711-e012-om1kroz2.jpg} &
274:     \includegraphics[height=5.5cm,width=7.5cm]{h-sin23-sin37-sin58-sin711-e012-om1kroz5.jpg} \\
275:     \mbox{(a)} & \mbox{(b)} 
276: \end{array}$
277: \caption{Period-2 (a) and period-5 (b) partitions visualized using $f^{1} = \sin(2\pi x + 3\pi y)$, $f^{2} = \sin(3\pi x + 7\pi y)$, $f^{3} = \sin(5\pi x + 8\pi y)$ and $f^{4} = \sin(7\pi x + 11\pi y)$ for $\e=0.12$. Log-scale was used for the $H_{\omega}$ field.}
278: \label{fig-multifourier}
279: \end{center}  \end{figure}
280: Observe the improved visualization with respect to the previously shown plots in Fig.\,\ref{fig-singlefourier}. By using diverse resolution numbers we managed to simultaneously visualize \per chains at all scales (including the integer multiple periodicities). Given the initial grid-point resolution, the pictures in Fig.\,\ref{fig-multifourier}a\&b are rather exhaustive in terms of the quantity of visualized period-2 and period-5 phase space subsets. However, as already mentioned, the price paid amounts to having red color for different unrelated periodic chains (essentially for all of them). But on the other hand, note the clear coloring difference between the resonating \per chains (red and dark red), chaotic zone (light green - yellow), and non-resonating \per chains (blue and dark blue). Period-5 partition in Fig.\,\ref{fig-multifourier}b even visualizes the secondary chaotic zone between the elliptic period-2 points in the middle.
281: 
282: 
283: \subsection{Visualization of the ergodic regions}
284: 
285: As observed in the previous Section, harmonic time averages for irrational frequency do not resonate with none of the periodic sets, while still resonate weakly with the chaotic zone points (just as any other harmonic time average resonates weakly within the chaotic zone). As shown in Fig.\,\ref{fig-singlefourier}d and examined in the Section \ref{The Convergence Study}., this can be used for visualization of the chaotic zone. Furthermore, from the discussion in the previous paragraph it follows that more functions can be used in order to improve the visualization, in a way analogous to the \per partition approximation.
286: 
287: In Fig.\,\ref{fig-chaoticzone} we show plots obtained by clustering according to the Eq.\,(\ref{clustering}) for three functions (of diverse resolution numbers). Each harmonic time average was computed separately with the same grid, but for a longer transient of $n_{\mbox{final}}=100,000$ and an irrational frequency.
288: \begin{figure}[!hbt] \begin{center}
289: $\begin{array}{cc}
290:     \includegraphics[height=5.5cm,width=7.5cm]{h-sin23-sin47-sin511-e012-om1krozirr.jpg} &
291:     \includegraphics[height=5.5cm,width=7.5cm]{h-sin23-sin47-sin511-e023-om1krozirr.jpg} \\
292:     \mbox{(a)} & \mbox{(b)} 
293: \end{array}$
294: \caption{Visualization of the chaotic zones for $\e=0.12$ in (a) and $\e=0.23$ in (b). Functions used are $f^{1} = \sin(2\pi x + 3\pi y)$, $f^{2} = \sin(4\pi x + 7\pi y)$, $f^{3} = \sin(5\pi x + 11\pi y)$ with irrational frequency $\omega=\frac{1}{\pi}$. Log-scale was used for the $H_{\omega}$ field.}
295: \label{fig-chaoticzone}
296: \end{center}  \end{figure}
297: Observe the precision in visualization of the chaotic zone, specially for the larger $\e$-value in  Fig.\,\ref{fig-chaoticzone}b. We see not only primar (diffusing) and secondary chaotic zones (located around the period-2 chain), but also higher-order ones like around the period-3 chain (Fig.\,\ref{fig-chaoticzone}a). Also, as opposed to previously shown one-function chaotic zone visualization (Fig.\,\ref{fig-singlefourier}d), in these plots the coloration of the chaotic zone is more uniform (yellow) and hence more visible. This is again due to more functions producing a better approximation for the final field $H_{\omega} (x_{0},y_{0})$.
298: 
299: In order to show the visualization properties of harmonic time averages in the context of differing between the periodic sets and the chaotic regions, in Fig.\,\ref{fig-alltogether} we show a histogram of  $H_{\omega} (x_{0},y_{0})$ values for pictures in  Figs.\,\ref{fig-multifourier}\&\ref{fig-chaoticzone}. We use the log-scale  for $H_{\omega}$ in order to have an analogy with the mentioned pictures. We indicate three clearly visible peaks common to all distributions: non-resonating periodic set always have values $\sim O(10^{-9})$, chaotic regions always resonate weakly with values $\sim O(10^{-5})$, and the periodic sets in the case of the appropriate frequency resonate having the values $\sim O(10^{-1})$. 
300: \begin{figure}[!hbt] \begin{center}
301:     \includegraphics[height=6.5cm,width=9.2cm]{h-hist-alltogether.jpg} 
302: \caption{Histograms of $H_{\omega}$ values used in Figs.\,\ref{fig-multifourier}\&\ref{fig-chaoticzone} with $\omega$ and $\e$ values indicated in the legend. Log-scale was used for $x$-axis in analogy with the previous pictures. Three zones with different dynamical behaviors and different resonating regimes are indicated.}
303: \label{fig-alltogether}
304: \end{center}  \end{figure}
305: Observe that both rational and irrational frequencies respect the mentioned range of $H_{\omega} (x_{0},y_{0})$ values in relation to the dynamical behaviors (for non-clustered values $h_{\omega}$ the same properties hold but less precisely). This proves that by using more functions we improve the quality of visualization in sense of better pronounced peaks.
306: 
307: Furthermore, a cut-off can be introduced between these peaks in order to visualize only one preferred dynamical zone, corresponding to the examined peak. For instance, a full picture of the regular phase space portion (all frequencies) could be constructed by cutting out the resonant peaks for many diverse rational frequencies/functions and considering corresponding phase space points. Alternatively, the same phase space portion could be observed if one considers many functions with irrational frequencies, focusing on completely non-resonating part of the phase space.
308: 
309: 
310: \newpage
311: \section{Extended Standard Map} \label{Extended Standard Map}
312: 
313: In this Section, we show the application of the exposed visualization method on the Extended Standard Map proposed in \cite{esm} and already studied in \cite{visualization-paper-1}. It is a three-dimensional measure-preserving action-action-angle map (a particular generalization of the standard map) defined as:
314: \begin{equation} \begin{array}{lllc}
315: x' &= x + \e \sin (2\pi z) + \delta \sin (2\pi y)      \;\;\;  &[mod \; 1]  \\
316: y' &= y + \e \sin (2\pi z)                             \;\;\;  &[mod \; 1]  \\  
317: z' &= z + x + \e \sin (2\pi z) + \delta \sin (2\pi y)  \;\;\;  &[mod \; 1]  
318: \end{array} \label{esm} \end{equation}  
319: It has been suggested that this map is ergodic for any non-zero values of perturbations $\e$ and $\delta$, backed by the observation that no invariant surface persists for any non-zero perturbation \cite{esm}. 
320: 
321: We follow the argumentation from \cite{visualization-paper-1} and add a further argument to the mentioned claim. We set a three-dimensional grid of $20 \times 20 \times 20$ points and evaluate harmonic time averages for two functions with the frequencies of $\omega=\frac{1}{2}, \frac{1}{3}, \frac{1}{5}$ and the transient of $n_{\mbox{final}}=10^{7}$. We then cluster the values  separately for each frequency following the exposed procedure Eq.\,(\ref{clustering})
322: \begin{figure}[!hbt] \begin{center}
323: $\begin{array}{cc}
324:     \includegraphics[height=5.5cm,width=7.5cm]{h-hist-esm-sin235-sin1168-eps001-delta0001-om1kroz2-3-5-trans10e7.jpg} &
325:     \includegraphics[height=5.5cm,width=7.5cm]{h-hist-esm-sin235-sin1168-eps02-delta005-om1kroz2-3-5-trans10e7.jpg} \\
326:     \mbox{(a)} & \mbox{(b)} 
327: \end{array}$
328: \caption{Histograms of $H_{\omega} (x_{0},y_{0},z_{0})$ obtained by clustering the values of harmonic time averages for $f^{1} = \sin(2\pi x + 3\pi y + 5\pi z)$ and $f^{2} = \sin(11\pi x + 6\pi y + 8\pi z)$, for the frequencies $\omega=\frac{1}{2}, \frac{1}{3}, \frac{1}{5}$ as indicated. The case of $\e=0.01$, $\delta=0.001$ in (a) and $\e=0.2$, $\delta=0.05$ in (b).}
329: \label{fig-esm}
330: \end{center}  \end{figure}
331: and plot the histograms for $H_{\omega} (x_{0},y_{0},z_{0})$ in Fig.\,\ref{fig-esm}. Two different examples of perturbation values are considered: there seems to be only a small difference in the profiles that resemble log-normal distributions, while they both tend to zero for all the investigated frequencies. This means that at the considered non-zero perturbation values there appears to be no persisting periodic sets of any periodicity, which confirms the proposed claim within the given range of precision. Moreover, the range of values for the distribution of $H_{\omega} (x_{0},y_{0},z_{0})$ (around $10^{-4}$) indicates presence of the chaotic dynamics, in the sense of a weak resonance for all the frequencies. We expect that for a longer time-evolution the distributions shrink towards zero, confirming the initial ergodic hypothesis. 
332: 
333: 
334: 
335: %% --------------------------------------------------------------------------------------------------------------------
336: %% --------------------------------------------------------------------------------------------------------------------
337: %% --------------------------------------------------------------------------------------------------------------------
338: \newpage
339: \section{Conclusions} \label{Conclusions}
340: 
341: We exposed a new method of frequency analysis of dynamical systems based on harmonic time averages \cite{mezicbanaszuk}, following the ergodic theory visualization technique previously proposed in \cite{visualization-paper-1,mezicwiggy}. Using the known properties of standard map, we showed how the method can be implemented in the context of discrete-time dynamical systems. Harmonic time averages for various frequencies were computed over the standard map's phase space and their precisions estimated. A simple algorithm suggesting a clustering method for improving visualization by using more functions was constructed and employed. The periodic partitions of different periodicities were correctly visualized, including the corresponding chaotic zones. The distribution of values of $H_{\omega}$ was analyzed, and the peaks corresponding to different types of dynamics were identified. The method was applied to the Extended Standard Map, confirming the previous suggestions regarding its dynamical properties.
342: 
343: The most clear improvement of the method lies in the optimization of the clustering algorithm discussed in Section \ref{The Phase Space Plots with Multiple Functions}. A better version should design a parametrization for all the scatter plot branches, in order have a continuous correspondence between the scatter plot vectors and the (available) colors. This would moreover solve the issue of same-coloring for the independent \per sets. Furthermore, the same discussion from \cite{visualization-paper-1} applies in the regard of optimizing the shape/volume of the clustering cells: in cases of more complex dynamical systems (higher dimensionality) where scatter plots are not showing the branching structure, cell division of scatter plot space might be the only choice. 
344: 
345: In addition, similarly to the case in \cite{visualization-paper-1}, relationships between the convergence properties and the nature of the underlying orbit is to be investigated. While the convergence slope gives rough estimate of the orbit's type, a detailed analysis of the convergence pattern for rational and irrational frequencies might yield further insights.
346: 
347: The method was here exposed using the standard map, as it is a very investigated case of 2D map. However, the full applicational extent of the method lies in high-dimensional systems, where 2D phase space sections can be considered, in analogy with the discussion in \cite{visualization-paper-1}. Furthermore, the method is fully applicable to continuous-time dynamical systems as well (ODEs), although the computation of harmonic time averages in these cases might be somewhat more demanding. Finally, it would be interesting to see if the method is applicable to complex systems like multi-dimensional coupled maps on networks \cite{ja4,altmann}.\\[0.3cm]
348: 
349: 
350: %% --------------------------------------------------------------------------------------------------------------------
351: %% --------------------------------------------------------------------------------------------------------------------
352: %% --------------------------------------------------------------------------------------------------------------------
353: 
354: \newpage
355: \n {\bf Acknowledgments.} This work was supported by the Program P1-0044 of the Ministery of Higher Education, Science and Technology of Republic of Slovenia and by AFOSR grant number?? Special thanks to prof. Bosiljka Tadi\'c for her guidance and useful comments. Thanks to Prof. Umesh Vaidya for constructive discussions.
356: 
357: \bibliographystyle{ieeetr}
358: \bibliography{bib-vis-2}
359: \end{document}