An Automatic Procedure to Find and Set the Shift Phases for theSuperconducting Resonators in the ALPI Accelerator
Stefania Canella
Istituto Nazionale di Fisica Nucleare - Laboratori Nazionali di Legnaro
Via Romea, 4 - 35020 Legnaro (PD), Italye-mail: canella@lnl.infn.it
Abstract
ALPI is a linear post-accelerator (Linac) of a 15 MV
XTU Tandem, and its accelerating elements are 59 quarterwave superconducting resonators. The Linac may boost
beams of several ion species, with different state of charge,
at various injection energies.
The Linac set-up procedure, involving the magnets, thediagnostics and the RF control systems, takes from 10 to48 hours of continuous work. From 5 to 10 hours areusually necessary to find the shift phases for the
resonators.
A procedure was recently developed to perform this lasttask, in order to decrease time and man-power necessary
for the Linac set-up.

period of 24 hours but from 5 to 10 hours are stillnecessary for the manual phase locking procedure.
Because of the effort necessary to find the set of correct
shift phases, and because human errors in this procedure
may produce a final beam of bad quality, a decision was
taken to develop an automatic procedure to perform thistask.

1 Introduction
The superconducting Linac ALPI was designed toaccelerate bunched beams of several ion species, injectedfrom the Tandem. All its RF resonators operate in selfexcited loop mode and are independently phased throughdigital phase shifters with respect to a common reference at
160 and 80 MHz, [1]. The resolution of the digital phaseshifters is 1.4°.
To achieve the maximum available energy gain with ahigh transmission rate each resonator has to be set to an
unique accelerating or bunching phase, which is -20° withrespect to the top of the RF common reference for theaccelerating elements and -90° or +90° for the bunchingand de-bunching elements, see Figure 1.
The correct set of shift phases depends on the type ofbeam (ion mass, state of charge), on the injection energy
and on the configuration of the pulsing system. Even forbeams of the same type, the sets of fields and shift phases
for the resonators cannot be generally re-used in different
runs, because small differences in the initial sections of the
Linac may produce great differences of the beamcharacteristics in the final sections. This is due to various
reasons: for instance the beam injection energy may beslightly different form run to run. An other reason is thatthe cavities can not always be all powered at the sameaccelerating fields: sometimes the fields must be decreased
for some resonators, or, if further RF conditioning could be
performed, they may be set again to higher values.
Therefore for each new run all the resonators are always
phased from the first to the last, one by one, in sequence,[2].
During the commissioning of the ALPI accelerator thewhole Linac set-up have been a procedure lasting about 48
hours. Now this period has been decreased to an average

Figure 1: the standard accelerations and bunching phases
for ALPI.
2 The method
In the ALPI Linac the resonators are placed in twoparallel arrays connected by a U-bend; after a final L-benda transport line brings back the beam to the experimentalrooms. Two special wider beam profile monitors (30 mm
grids) each including an horizontal grid of 39 wires areplaced immediately after the first 90° bending magnet in
the U-bend at the end of the first low-energy branch(diagnostic box DU2) and after the L-bend at the end of thehigh-energy branch (diagnostic box DE2) as shown in
Figure 2.
To find the resonator shift phases, the 90° bending
magnet in the U-bend and in the L-bend are operated in adispersive mode and, for each of them, the following steps
are executed:• the beam profile is centred on the horizontal grid withthe resonator switched off;
• the resonator is switched on, it is locked and the phaseshifter is scanned as long as the beam profile is broughtback in the centre of the horizontal grid (this a "zeroacceleration phase", -90° or +90°);• by the displacement of the beam profile as aconsequence of a small positive change of phase, thetwo different "zero acceleration phases" may be
distinguished and the -20° "standard" shift phase may
be found and set;

Figure 2 - ALPI Linac layout•

the bending magnet is adjusted to centre again the
beam on the horizontal grid; a new cavity may now be
set (see Figure 3).

In(tk) = 1/T.{ Σj=0,T-1 in(tk-j) } (wire n, time tk)•

a hand-set linear interpolation was added, to correct
zero or saturated wire currents (corresponding tobroken or short-cut wires on grids):
In(tk) = [ In-1(tk)+In+1(tk) ]/2 (wire n, time tk)•

on-line computation of the beam area (I), of the beam
position (Xc), and of the beam width (Xw) were added,
to detect the presence of the beam on the horizontal
grid and to check its position and width, at time tk:

I(tk) = Σn=-N,+N In(tk)Xc(tk) = {Σn= -N,+N[n.dx.In(tk)]}/I(tk)
Xw(tk) = sqrt{1/I(tk).Σn=-N,+N[(n.dx)2.In(tk)]-Xc2(tk)}Figure 3 - The search method for the correct shift phase
3 Automation and first tests
In 1995 the development of an automatic procedure
working through the same steps performed by theoperators was started. For this aim some changes had to bedone on the control system: a software communication
path had to be established between the RF control system,
where the phase shifters are to be scanned, and the
diagnostic system, where the beam profile data are
available. A client/server mechanism using UDP/IP
protocol was added to the two systems to connect them andto have the beam profile data readable from the RF control
system.
Some data filtering had to be added to the diagnostic
system, to reduce the various types of noise on raw data
and to summarise the beam shape on the horizontal gridwith two parameters to be used in the search algorithm:•

a customisable time averaging was added, to reduce
white noise on data, based on past T samples (i(tk)):

where dx is the distance between wires and 2N+1=39
is the total number of wires in a grid.
This first automation of the Linac set-up does not
involve the operations on the magnets, which have to be
adjusted manually after the shift phases have been found: it
only searches for the shift phases in sequence, on demand.
The search algorithm is based on the following steps:
•
•

•

•

•

the horizontal beam area I on the horizontal grid iscomputed with the resonator off,the shift phase is set to an initial value, then theresonator is powered on and locked (usually the beam
disappear from the horizontal grid, i.e. the area I
decreases to zero),the shift phase is scanned as long as the beam area I
grows to a minimum value (usually 50% of the initialarea); this means the beam is again on the horizontal
grid; the position Xc of the profile is then monitored,
the first shift phase that sets to zero the horizontal
beam position Xc (beam centred on the horizontal grid)is the first "zero phase", this phase, its type (-90° or+90°) and the horizontal beam width Xw in thissituation are recorded,
the second "zero phase" is found and recorded with the•same technique,the "zero phase" corresponding to the most narrow
shape is used to calculate the shift phase.

This algorithm was tested several times at the end of runs
where the Linac had been put in operation manually; theresults of these initial tests were satisfactory, showing ageneral good agreement between the two sets of shiftphases (not more than 2° of difference).
4 Problems, solutions, future developments
While testing the above described automatic procedureseveral unexpected problems arose.
The first is that for certain beams and for some positionsof the resonators the horizontal profile may become verylarge, often exceeding the size of the grids; in this situation
the values of convergence thresholds for the searchalgorithm may be critical. This problem was at first solved
with a fine tuning of these thresholds, but will be betterovercome by an auto-tuning mechanism.
An other initial random source of faults came from the
RF power amplifiers, which may suddenly shut down(because of a hardware protection) as a consequence of achange in the shift phase (simulating a "false" zero phase).
A check had to be added on the status of the amplifier at
each research step. A recovery mechanism should be also
added to start again the search when this kind of error
occurs.

The most difficult problem to be solved comes from thedigital phase shifter, which may have infrequent but
sudden faults whose consequence is a "jumping" behaviourof the horizontal movement of the beam, a situation whichis rather difficult to be detected automatically. Probably thebest solution to this still open problem will be a separated
check procedure to be performed on all the phase shifters
just before run-time.
In the next months the development of new code has beenplanned that will allow to adjust automatically the bending
magnets after the correct setting of each resonator.
5 Conclusions
After some first adjustments the above described
procedure proved to be reliable enough to be used innormal Linac set-up and has become a standard tool during
the ALPI runs.
A further reduction in the time and man-power necessary
for the whole Linac set-up is expected by the automatic
adjusting of the bending and focusing magnets.
References[1] G. Bassato, A. Battistella, M. Bellato and S. Canella,
Nucl. Instr. and Meth. A328 (1993), pp. 195-198[2] A. Dainelli et al., Nucl. Instr. and Meth. A382 (1996),
pp. 100-106