Controlling the RF cavities#
Table of Contents#
Selection of the target cavities
A lattice may contain multiple RF cavities, grouped according to different RF systems:
main cavities, harmonic cavities… AT provides simple tools to tune them.
Lattice properties#
Lattice properties are used to describe global properties of the lattice. They are stored as attributes of a RingParam
element, ideally located in the 1st position in the lattice.
The lattice properties can be accessed with the atSetRingProperties / atGetRingProperties functions.
Several lattice properties are used for cavity control. They act on the “main” cavities, defined as follows:
if there is a
cavpts
ring property (set using atSetRingProperties),cavpts
is used to select the main cavities,otherwise, the main cavities are the cavities with the lowest frequency
‘Periodicity':
read/write - The number of times the lattice cell is repeated to build the ring,
‘rf_frequency':
read/write - The frequency of the main cavities
‘rf_timelag':
read/write - The time lag of the main cavities expressed in values of path lengthening “cτ”, the 6th particle coordinate [m].
‘rf_voltage':
read/write - The sum of the voltages of all main cavities over the full ring
‘cell_rf_voltage':
read/write - Sum of the voltages of all main cavities over one cell
'cavpts'
: read/write -
select the cavities used by default, as explained below.
Cavity access function#
More control of the cavity parameters can be acheived with the atsetcavity function.
newring=atsetcavity(ring,'Name',Value,...)
specifies cavity properties using one or more Name,Value
pair arguments. The values handled by the function concern the full ring ( periodicity
\(x\) cell).
Selection of the target cavities#
The cavpts
argument is used to select the cavities driven by the command.
newring=atsetcavity(ring,___,'cavpts',cavpts)
It is used as follows:
cavpts
is a “refpts” type (integer or logical array): it is used to select the cavities,cavpts
is empty (default value), and the lattice has a'cavpts'
ring property: the ring property is used to select the cavities,cavpts
is empty, and the lattice has no'cavpts'
ring property (or it is empty): the cavities with the lowest frequency are selected.
So the easier way to use it is:
single RF system (main cavities): forget the
cavpts
argument. The default is to use all cavities,main RF system + harmonic system: set the lattice
'cavpts'
attribute to the location of the main cavities, so that the default behaviour is to drive the main system. Use the function’s'cavpts'
argument to drive the harmonic cavities.
Cavity attributes#
newring=atsetcavity(ring,___,'Frequency',frf)
newring=atsetcavity(ring,___,'Frequency','nominal')
If the frequency is 'nominal'
, the function will set the frequency to the nominal value, according to the revolution frequency and harmonic number. An optional off-momentum may be applied using the ‘dp'
or ‘dct'
arguments. The frequency shift is then computed using the linear slip factor \(\eta_c =1/\gamma^2 -\alpha_c\) , so that the resulting dp may slighly differ from the specified value.
newring=atsetcavity(ring,___,'Voltage',Vrf)
Set the total voltage (all cells) [V]. The voltage is equally distributed over all selected cavities in all cells. So the voltage of each cavity is Vrf / n_cavities / Periodicity.
newring=atsetcavity(ring,___,'cell_voltage',Vrf)
Set the voltage of one cell [V]. The voltage is equally distributed over all selected cavities in the cell. So the voltage of each cavity is Vrf / n_cavities.
newring=atsetcavity(ring,___,'Timelag',time_lag)
The time lag is expressed in values of path lengthening “cτ”, the 6th particle coordinate [m].
newring=atsetcavity(ring,___,'dp',dp)
newring=atsetcavity(ring,___,'dct',dct)
Set the off-momentum used to compute the nominal RF frequency.