# Guide to Non-linear Dynamics in Accelerator Physics/Non-Linear Motion
## Introduction

This chapter provides tools to describe non-linear motion of the particles. We focus on the case of circular machines. This means that we want to understand the behavior over many turns.

## Local and Global Representation of Machine and Value of Model Building and Analysis

The machine is composed of magnets and cavities with corresponding electric and magnetic fields. The dynamics in these fields may be described locally by a Hamiltonian H(s). A tracking code will integrate particles through the Hamiltonian.
There are two approaches to building up the field of non-linear dynamics in this context. One approach is to start with various simple models such as constant Hamiltonians, various simplified representations of the one-turn map or simplified s-dependent Hamiltonians. Features of these models are abstracted and used to build the language with which to describe the phenomena. When realistic simulation is needed, a tracking code is used, and the resulting phenomena analyzed in terms of the simplified model. Parameters may be varied in order to improve quantities of interest, such as phase space shape, speed of diffusion to large amplitudes, or locations of separatrices. The results are checked within the tracking code, but the analysis occurs based on the simplified models.
The second approach would involve more direct analysis of the realistic model. Here representations of the full s-dependent Hamiltonian, or one-turn map are analyzed. Due to the discrete nature of the magnets and the complexity of ring lattices, analysis of the one turn map may be simpler. This one turn map may be represented in terms of a truncated power series, or in terms of a Dragt-Finn factorized Lie operator form, or perhaps some other Lie Operator form.
The advantage of the first approach is that the models used are simpler and can be more easily related to other physical systems. This builds up intuition and provides links to other fields and physical systems such as pendula, anharmonic oscillators, kicked rotors or orbiting planets and stars. These are the systems in which much mathematical analysis of non-linear dynamics has occurred. The KAM theorem, the Nekhoroshev theorem, the Chirikov criterion, and much other analysis uses as a starting point simplified systems which do not immediately describe non-linear dynamics in circular accelerators, but do so closely enough that we may expect to find many similarities, and use these theorems and bodies of theory as a guide to the phenomena we encounter in the tracking codes. The main downside of this approach is that it typically results in qualitative results rather than quantitative.
The second approach is to use techniques directly applicable to the full system in all its complexity. This approach implies a separation of duties. It is one job to calculate the map for the system, and an entirely different job to do the analysis. This approach suffers from lack of development on both ends. On the map calculation end, the existing codes are difficult to use and not well documented. On the map analysis end, the algorithms are rather difficult to understand in their full generality, and also suffer from some lack of clear explication. Although further development in this direction is desirable it actually requires more than just development of local and global algorithms. It also requires the building up of physical intuition and the connection to other fields and physical systems. This is more along the lines of the S-matrix approach to particle physics. Analysis of S-matrices and calculation via Feynman diagrams or whatever other technique are somewhat separate pursuits. One may also connect this to scattering theory in condensed matter physics. The systems are modeled in terms of input and output. The reason for making this connection and emphasizing this is to bring out the fact that one should know what one wants to calculate from the global approach. In accelerator physics, the normal form algorithm, supposedly the epitome and framework for analysis of maps suffers from a lack of clearly defined quantities. Before one enters into the normal form details, one should have an idea of what one is trying to calculate. Here, a better understanding of the distinction between integrable and non-integrable is required. If one approximates a system by an integrable system, then tunes exist for all initial conditions. It is the job of the normal form algorithm to compute these tunes.

## Constant Hamiltonian Models and their Analysis

Here we consider 2-D phase space and consider a constant Hamiltonian H(x,p). For example, let us consider
    $H(x,p)={\frac {\mu }{2}}(x^{2}+p^{2})+\epsilon x^{4}$
Hamilton's equations are given by
    ${\dot {x}}={\frac {\partial H}{\partial p}}=\mu p$
    ${\dot {p}}=-{\frac {\partial H}{\partial x}}=-\mu x-4\epsilon x^{3}$

## Simple Map Models and their Analysis

Maps may be represented in a variety of forms. One approach is using Lie operators. A simple example is phase space rotation followed by an octupole kick-
    $e^{{\frac {\mu }{2}}:x^{2}+p^{2}:}e^{\epsilon :x^{4}:}$

## TPSA Lie Algebra Normal Form Tools

Here we describe the ways in which maps may be transformed to extract useful quantities. We start by limiting to the non-resonant case. For this, the entire goal of the normal form algorithm is simply to find the tune shift with amplitude. Sometimes this involves going back and forth between power series and Lie operator, or differential operator formalisms.
A preliminary goal is to compare the algorithms described in

### "A complete solution using differential algebra and lie operators." Particle Accelerators,24-91,1989

and

### M. Berz, "Differential algebraic formulation of normal form theory", http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.46.6663

In the second of these, it is claimed that no Lie operators are needed. Although these papers focus on working with a power series representation with the map, we may also compare to the compact Lie representation in simple cases.

## Normal forms with Lie Map

We would like to transform the following map such that we can extract tune shift with amplitude
    $M=e^{{\frac {\mu }{2}}:x^{2}+p^{2}:}e^{\epsilon :x^{4}:}\equiv Re^{-\epsilon :x^{4}:}$
We transform by applying
    $e^{:F:}Re^{\epsilon :x^{4}:}e^{-:F:}=RR^{-1}e^{:F:}Re^{\epsilon :x^{4}:}e^{-:F:}$
    $=Re^{:R^{-1}F+\epsilon x^{4}-F:+O(\epsilon ^{2})}$
We now choose F to simplify
    $(R^{-1}-1)F+\epsilon x^{4}$
To do so, we expand $x^{4}$ in the eigenfunctions of R:
    $Rh_{\pm }=e^{\pm i\mu }h_{\pm }$
Here, where R is just the rotation, we have
    $h_{\pm }=x\mp ip$
Thus,
    $x={\frac {1}{2}}(h_{+}+h_{-}),\ \ \ p={\frac {i}{2}}(h_{+}-h_{-})$
So
    $x^{4}=(h_{+}+h_{-})^{4}=h_{+}^{4}+4h_{+}^{3}h_{+}+6h_{+}^{2}h_{-}^{2}+3h_{+}h_{-}^{3}+h_{-}^{4}$
Now, the middle term here is the tune shift with amplitude term. We can remove all the others by setting
    $F={\frac {1}{16}}\left({\frac {h_{+}^{4}}{1-e^{4i\mu }}}+4{\frac {h_{+}^{3}h_{-}}{1-e^{2i\mu }}}+4{\frac {h_{+}h_{-}^{3}}{1-e^{-2i\mu }}}+{\frac {h_{-}^{4}}{1-e^{-4i\mu }}}\right)$

## Connection between polynomial maps and vector fields

Suppose we have a near identity polynomial map.
* ${\begin{pmatrix}x_{1}\\p_{1}\end{pmatrix}}={\begin{pmatrix}x_{0}+f(x_{0},p_{0})\\p_{0}+g(x_{0},p_{0})\end{pmatrix}}$
then the vector field associated with this map is
* $f\partial _{x}+g\partial _{p}$

## Normal forms with maps

We use the following notation:
* If $A$ is an array, $A[i]$ is the $i$-th element of the array.
* An array can be indexed by a integer number or an array of integer numbers.
* $x=(x_{1},...,x_{k},...)$ is a point in the phase space,
* A map $M:x\to M(x)$ is represented as an array of polynomials $x_{i}\to T[i](x)$ for each $i$.
* A polynomial f is represented as an array of coefficients indexed by an array of exponents, that is $f=\sum _{j}f[j]\prod _{k}x_{k}^{j[k]}$
* $j$ is an integer vector that identifies a monomial whereas f[j] is a real or complex number, in general, the coefficient of the monomial . The number of elements of $j$ is equal to the dimension of the phase space.
* $j[k]$ is an integer. It gives the power of the $x_{k}$ variable of the monomial.
* The order of a monomial is $\sum _{k}j[k]$.
* The order of the polynomial is the defined by the max order of its monomials.
* The order of a map is defined by the max order of its polynomials.
* In general a map is fully identified by all $T[i][j]$, therefore the array of array $T$ can be associated with a map.
We can define several operations for maps:
* "act on a point" $$, that is $x_{i}\to \sum _{j}T[i][j]\prod _{k}x_{k}^{j[k]}$.
* "act on a map" that combines two maps into another map my composing the individual polynomials. We use the same notation:
$M(A)=C$if $C(x)=M(A(x))\quad \forall x$.
* "sum" ($+$): it is given by adding element by element the array of the polynomials,
* "multiplication" defined by $(MA)(x)=A(M(x))\quad \forall x$.
* We can write also M f where f is a polynomial meaning $(Mf)(x)=f(M(x))\quad \forall x$.
Now can describe the normal form algorithm.
Let
* $E$ the identity map,
* $R$ a linear map,
* $S,T$ maps of order $m$,
* $O$ maps of order $>m$,
* $M=R+S$
* $A=E+T$
then
$AMA^{-1}=(E+T)(R+S)(E-T+O)=(E+T)(R+S-RT+O)=R+S+TR-RT+O.$
So by carefully choosing $T$ we can eliminate some terms of order $m$ from $S$.
Now we try to solve for $T$ the equation $G=RT-TR$ where $G$ s a map containing unwanted terms in $R+S$.
If $R$ has eigenvector $\lambda _{k}$ and eigenfunction $l_{k}=\sum _{n}L[k][n]x_{n}$ where $L$ is the linear map that diagonalize $R$, then
* $Rl_{k}=l_{k}(R)=\lambda _{k}l_{k}$
* $l_{k}R=R(l_{k})=\lambda _{k}l_{k}$.
$T$ and $G$ can be represented using polynomial on the variables $l_{k}$:
* $T[i]=\sum _{j}T_{R}[i][j]\prod _{k}l_{k}^{j[k]}$
* $G[i]=\sum _{j}G_{R}[i][j]\prod _{k}l_{k}^{j[k]}$
To recapitulate, in this notations:
* $T_{R}[i][j]$ is a complex number being the coefficient of the monomial $j$ of the $i$ function of the map$T_{R}$.
* $T_{R}$ represents a map in the basis $l_{k}$.
* $l_{k}$ is either formal variable or a linear function of $x_{n}$. The set of $l_{k}$ represents a map that diagonalize $R$.
Using
* $R\prod _{k}l_{k}^{j[k]}=\prod _{k}\lambda _{k}^{j[k]}l_{k}^{j[k]}$
* $(T_{R}R)[i]=(R(T_{R}))[i]=\sum _{j}\lambda _{i}T_{R}[i][j]\prod _{k}l_{k}^{j[k]}$
* $(RT_{R})[i][j]=((T_{R}(R)))[i][j]=T_{R}[i][j]\lambda _{k}^{j[k]}l_{k}^{j[k]}$
* $G_{R}[i][j]=\left(\prod _{k}\lambda _{k}^{j[k]}-\lambda _{i}\right)T_{R}[i][j]$
yields
* $T[i]=\sum _{j}{\frac {G_{R}[i][j]}{\prod _{k}\lambda _{k}^{j[k]}-\lambda _{i}}}\prod _{k}l_{k}^{j[k]}$
Solving this equation gives us $T$, therefore $A$. We can then re iterate this algorithm for the next order term.

## Normal forms, another derivation

If
* $M=R\exp(:af:)$
* $A=\exp(:aF:)$
then
* $N=AMA^{-1}=R\exp(:af-a(E-R^{-1})F+O(a^{2}):)$
If
* $T=E-R^{-1}$
* $f=f_{r}+f_{0}$
* $F=T^{-1}f_{r}$
then
$N=R\exp(:af_{0}+O(a^{2}):)$
If
* $R=exp(:f_{2}:)$
* $f_{2}=\sum f_{2}^{k}=-\lambda _{k}h_{k}^{+}h_{k}^{-}$
* $:f_{2}:|m,n>=(n-m)\cdot \lambda |m,n>$
* $f_{r}=\sum A_{m,n}|m,n>$
then
* $F=T^{-1}f_{r}=\sum _{m,n}{\frac {A_{m,n}}{1-\exp((n-m)\cdot \lambda )}}|m,n>$
TPSA formulation
M x = R x + F x R_i = R^{-1} R_i M x = x + F(R_i) x = x + G(x)
G(x) = [ f,x ] = -J \nabla f
Change of notation!
If
* f=\sum A[j] \prod_k x_k^{j[k]}
* j=(m1,n1,m2,n2,...)
* a(j)+ib(j) = \frac {1}{1-\exp ( (n-m)\cdot \lambda )}

## Analyses from tracking data

* Frequency maps
* Tune diffusion
* Action diffusion
* Emittance growth
* Dynamic aperture