Equations of Motion¶
- Authors
Helga Timko
Below, we shall derive the equations of motion (EOMs) for an energy kick given to the particle by the RF caviti(es) of a given RF station and the subsequent drift of the particle during one turn, see Figure. In the case of multiple RF stations, the drift equation should be scaled by \(\frac{L_i}{C}\), where \(C = \sum_{i} L_i\) is the machine circumference.
Definitions¶
Code-internal units are SI-units unless otherwise specified in the below table.
- Code-internal units
Energy \(E\) = [eV]
Momentum \(p\) = [eV]
Mass \(m\) = [eV]
Time \(t\) = [s]
Frequency \(f\) = [Hz]
Angular frequency \(\omega\) = [rad/s]
Just like in the real machine, we demand the user to define beforehand the energy programme, i.e. the synchronous (design) total energy at every time step \(n\) and RF station \((i)\), \(\left\{ E_{s,(i)}^n \right\}\). This will define the design momentum \(p_s\) through following relations:
where \(m\) is the mass of the particle, and energy, momentum, and mass are given in [eV].
For a given synchronous orbit with an average radius \(R_s\), the angular frequency will be \(\omega_0 \equiv \frac{\beta_s c}{R_s}\) and one turn will take \(T_0 \equiv \frac{2 \pi}{\omega_0}\) at the synchronous energy. The magnetic field programme is assumed to be synchronised with the design energy turn by turn. Hence, a particle leaving the RF station with the synchronous energy will always be on the synchronous orbit and return to the RF station after exactly one period, unless the actual magnetic field differs from the designed one.
We define then an external reference (clock) time
and as initial condition we choose the sinusoidal RF wave of the main RF system (harmonic \(h_0\) and RF frequency \(\omega_{\mathsf{rf},0}\)) to be at phase zero at time zero:
All phase offsets of all RF systems are defined w.r.t. this initial condition
and w.r.t. to the main RF system. Phase offsets can be programmed through the
phi_offset
parameter. In addition, RF phase noise
\(\phi_{\mathsf{noise},k}\) can be added through phi_noise
for each
system. For \(n_{\mathsf{rf}}\) RF systems in the RF station the total
voltage [eV] becomes:
We define the arrival time of an arbitrary particle to the RF station relative to the reference time in that turn,
The total phase offset at the reference time is tracked in the variable
phi_RF
, defined through
Energy kick¶
During the passage through an RF station, the energy \(E^n\) of an
arbitrary particle is changed by the total energy kick received from the
various RF systems in the station. The energy change due to the induced
electric fields in the magnets is negligible and beam-induced voltage is taken
into account in the impedance
module. The phase of the RF voltage of system
k at the arrival time \(t^n\) of any particle is:
Subtracting multiples of \(2 \pi\), which can be neglected,
Note that phi_RF
is determined through the above equation,
Thus the total energy change equation is
Note
Eq. (12) is intrinsically discrete; no approximation has been done.
Note
The RF phase (Eq. (11)) differs from the sum of phase offset and phase noise only if the RF frequency differs from the design RF frequency \(\omega_{\mathsf{rf},k}^n \neq \Omega_{\mathsf{rf},k}^n \equiv h_k^n \omega_0^n\), i.e. when feedback loops are active.
Rather than the absolute energy, we are actually interested in the energy offset of a given particle w.r.t. the synchronous energy \(\Delta E^n \equiv E^n - E_s^n, \, \forall n\). So we choose our coordinate system to be centred around \(E_s^n \, \forall n\). Substracting \(E_s^{n+1}\) from both sides of Eq. (12), we arrive at
Warning
As a consequence, during acceleration the coordinate system is non-inertial and a coordinate transform is done turn by turn.
Arrival time drift¶
The absolute arrival time of an arbitrary particle can be expressed as a recursion
with initial condition \(t^0 = t_0\) and where the revolution frequency of the particle \(\omega^n \equiv \frac{\beta^n c}{R^n}\) can differ from \(\omega_0^n\) due to energy and orbit deviations from the synchronous particle.
Note
Eq. (16) contains \(\omega^{n+1}\) as we chose to perform the energy kick first and the subsequent time drift happens according to the already updated energy.
Using Eq. (7), the recursion on the particle arrival time relative to the clock becomes
Using definition (14), the arrival time drift can be calculated as
If a zeroth order slippage is used, \(\eta(\delta) \approx \eta_0\), the
option solver = 'simple'
can be used to approximate the above equation as
In a newer implementation of the drift equation, default since 2020, we use the momentum compaction factors directly, instead of the slippage factors, to calculate the time slippage,
The synchronous particle¶
A particle is synchronous in turn n if it enters and leaves the RF station with zero energy offset, \(\Delta E^n = \Delta E^{n+1} = 0\), and thus gains exactly the designed energy gain \(E_s^{n+1} - E_s^n\). As a consequence, in the absence of induced voltage the synchronous particle will fulfil:
and in the presence of intensity effects, the induced voltage from the particles in front should be added on the left-hand side:
where \(\lambda(t)\) is the beam/bunch profile and \(W(t)\) the wake potential.
Warning
In general, these equations have \(n_{\mathsf{rf}}\) solutions. If the synchronous energy gain \(E_s^{n+1} - E_s^n\) changes from one turn to another, also the synchronous particle changes with it.
Note
Synchronous particle arrival time
As a consequence, the arrival time of the synchronous particle \(\Delta t_s\) is not necessarily constant, but can change from turn to turn. This might be counter-intuitive, as the synchronous particle drifts with exactly \(\omega_0\) along the ring. To see this effect, consider two subsequent turns with different synchronous energy gains \(E_s^{n+1} - E_s^{n} \ne E_s^{n+2} - E_s^{n+1}\) in a single-RF system. Let particle 1 be synchronous in turn n and particle 2 be synchronous in turn \(n+1\):
The arrival time of the synchronous particles in this case will be:
Thus, because the synchronous particle can be a different particle each turn, the recursion on the synchronous arrival time becomes in general
The difference in arrival time of the two particles in turn n can be determined from the energy equations
which in first-order approximation (see Small-amplitude oscillations) gives
Small-amplitude oscillations¶
Assuming a single-RF station and a simple solver (Eq. (19)), the EOMs in continous time can be written as
Assuming further a constant synchronous phase \(\sin{\varphi_s} \equiv \frac{\dot{E_s}}{V}\) and expanding the RF wave around it
we obtain for the sinusoidal term in first order
Derivating Eq. (29) a second time, and using Eq. (30)
Vice versa, derivating (30) another time, and substituting Eq. (29), an equivalent equation can be found for the arrival time w.r.t. to the arrival of the synchronous particle \(\Delta t_s\):
Equations (33) and (34) describe an oscillating motion in phase space if \(\eta_0 \cos{\varphi_s} < 0\), which for \(\omega_{\mathsf{rf}} = h \omega_0\) has the synchrotron frequency
Note
that energy and time are conjugate variables, whereas energy and phase are not. When forming time derivatives in phase, one should take into account the frequency correction from one turn to another: \(\dot{\varphi} \approx \varphi^{n+1} - \frac{\omega_{\mathsf{rf}}^{n+1}}{\omega_{\mathsf{rf}}^n} \varphi^n\).
Tracking utilities¶
Hamiltonian¶
To construct the Hamiltonian \(\mathcal{H}\) from the conjugate variables \(\Delta t\) and \(\Delta E\), let us first rewrite the equations of motion in continuous time (for a zeroth-order slippage factor):
from which we obtain the Hamiltonian by partial integration:
The constant of integration can be chosen such that
from which the Hamiltonian becomes
In case of a single-harmonic RF system with \(\omega_{\mathsf{rf}} = h \omega_0\), the second term can be replaced with \(\dot{E_s} = q V \sin{\varphi_s} / T_0\), and we obtain the know textbook formula
or in terms of particle phase \(\varphi\),
Separatrix¶
To construct the separatrix, first the unstable fixed point (UFP) needs to be determined. Its coordinates \((\Delta t_{\mathsf{ufp}}, \Delta E = 0)\) are calculated numerically by looking for the smallest (largest) zero crossing position in one period of the total voltage waveform above (below) transition. The separatrix is the equipotential line that goes through the UFP and is thus defined by the condition
Solving this equation we obtain
In the case of a single-harmonic RF system with \(\omega_{\mathsf{rf}} = h \omega_0\), the phase of the UFP is \(\varphi_{\mathsf{ufp}} = \pi - \varphi_s\). In addition, \(\dot{E_s} = q V \sin{\varphi_s} / T_0\), so the above equation reduces to
In practise, to calculate the separatrix for input arrays \(\Delta t_{\mathsf{sep}}\) that are longer than the period of the voltage waveform, the routine takes into account periodicity and projects the input array onto the ‘basic period’ of the waveform (that is \((-\pi,\pi)\) and \((0,2 \pi)\) on the first harmonic, below and above transition, respectively).