BEAM SWITCHING AND BEAM FEEDBACK SYSTEMS AT KEKB LINAC
K. Furukawa , A. Enomoto, N. Kamikubota, T. Kamitani, T. Matsumoto,Y. Ogawa, S. Ohsawa, K. Oide and T. Suwada
High Energy Accelerator Research Organization (KEK)
Oho 1-1, Tsukuba, Ibaraki, 305-0801, JapanAbstract
The KEK 8-GeV electron / 3.5-GeV positron linac has been
operated with very different beam specifications for downstream rings, KEKB, PF and PF-AR. For the reliable operation among these beam modes, intelligent beam switching
and beam feedback systems have been developed and usedsince its commissioning.
A software panel is used to choose one of four beammodes and a switching sequence is executed in about twominutes. Most items in a sequence are simple operations
followed by failure recoveries. The magnet standardization
part consumes most of the time. The sequence can be easily
re-arranged by accelerator operators. Linac beam modes
are switched about fifty times a day using this software.
In order to stabilize the linac beam energy and orbits, aswell as some accelerator equipment, about thirty software
beam feedback loops have been installed. They have beenroutinely utilized in all beam modes, and have improved
its beam quality. Since its software interfaces are standardized, it is easy to add new feedback loops simply defining
monitors and actuators.

1INTRODUCTION

The KEK electron/positron linac had been upgraded for the
KEK (KEK B-factory) asymmetric electron-positron collider since 1994. Commissioning of the first part of thelinac started at the end of 1997 and has already achieved thedesigned beam parameters after its completion in 1998[1].
It has been providing beams for the B-physics experiment(Belle) of the CP-violation study at KEKB since 1999.
The performance of the experiment depends on the integrated luminosity at KEKB, which is largely dependent
on the stability and intensity of the linac beams. Since thelinac must provide four beam modes which are very different (KEKB e+ , KEKB e , PF-Ring, PF-AR), it had beenrealized that it was important to achieve reproducibility andstability of each of those four beam modes[2].

2 LINAC CONTROLSThe linac control system was also upgraded[3] to support
the upgraded high-intensity linac based on the system rejuvenation in 1993[4]. It consisted of layered componentsthat communicate with each other, where hardware andlower-layer information were hidden from the upper layer e-mail: <kazuro.furukawa@kek.jp>

and only useful features are exposed to the upper layers.
New components were added to accommodate new accelerator equipment and features for the KEKB injection. Especially, software for beam position-monitors was developed and the database for equipment and beam lines wasmuch enriched.
In the commissioning, many pieces of application software were developed as clients to the control system. Manyof them were designed with a user interface on X-Window
employing SAD-Tk or tcl/tk scripting languages for rapid
development and simple manipulation. They use common
library routines to facilitate maintenance as well as development. The number of application programs exceed 100,including those for beam studies.

3COMMISSIONING

In commissioning of the upgraded linac, the quality ofbeams had gradually improved as the beam study advanced, and the design values were achieved for the shortterm. It was, however, realized that much effort was required to reproduce the quality and to maintain it for alonger period.
One of the main reasons was switching between fourquite different beam modes.
The other was shortterm instabilities and long-term drifts of the equipment
parameters[2].
In order to cure these, the software for beam-mode
switching and feedback loops has been refined, while they
had been developed since the beginning of the commissioning.

4 SOFTWARE
The software has been developed with the tcl/tk scripting
language under the same environment as other application
software[3].

4.1Beam Mode Switch

In linac beam mode switching, as described above, it is important to select the operation conditions and parametersof the accelerator equipment reliably, and to achieve reproducible beam qualities. In order to meet this purpose, thesoftware was developed to be easily re-arranged, and it currently has the following switching items:

 Suspension of beam feedback loops and other subsystems.

 De-gauss of a bending magnet (only for PF injection)
 Simple standardization of magnets.
 Selection of a gun, magnets, and rf systems.
 Parameters for magnets (mostly magnetic fields).
 Parameters for rf systems (mostly phases).
 Parameters for timing systems.
 Parameters for guns.
 Operation on positron targets and chicane.
 Operation mode of beam instrumentations and theirdynamic ranges.
 Initial beam profile monitor selection.
 Initial beam repetition rate.
 Selection of beam transport lines.
 Information to downstream ring control systems.
 Review of equipment parameters.
 Display and record of equipment status and parameter
differences.
 Resumption of corresponding beam feedback loops.
 Information to operators via a speech processor.

Items related to the radiation safety are not included, andare handled by a separate safety-interlock system.
Fig. 1 shows an example of the software panel. Each
item on the panel can be enabled or disabled by any operator, and its status can be saved or restored. New items canbe introduced by adding entries to the database. If someproblems occur, which cannot be removed through the control system, that event is reported to the operator, who may
retry it after the problem has been removed.
The items listed as ‘Parameters’ are normally taken fromthe equipment parameters when the last time the same
beam mode was used, while other parameter sets can bechosen from the menu if a operator needs one.
For the initialization of the magnets following issues arerepeatedly tested: reproducibility of magnetic fields, tolerance of the power supplies to the steep current changes
and failure recoveries in control and application software.
Since this part consumes most of the time in the switch, it
is still being improved.

4.2

Beam Feedback Loops

Software feedback loops installed in the linac are categorized into three groups: stabilization for equipment parameters, the beam energy and the beam orbit. Their basic software structure is the same and is built of following parts:

Figure 1: An example of the linac beam mode switch panel.
In this example, KEKB e+ injection was selected. The
check-buttons on the left are used to select items to go
through. Pull-down-menus are used to choose parameter
files. The boxes on the right show the execution status.

Figure 2: Energy feedback panel at the R sector as an example. The parameters and processing specifications canbe modified anytime.

 Check the conditions of beam modes, beam current,parameter limit, etc.
 Read the monitor value applying moving average,limit check and other specific post-processing.
 Derive the feedback amount applying conversion factors, gain and limit check.
 Set the actuator value applying limit check and otherspecific pre-processing.
 Flow control, graphics display, recording and interface to other software.
Fig. 2 shows an example panel for one of the energy
feedback loops. Each parameter in the panel can be modified at any time.
Energy feedback loops are composed of a monitor of abeam position at a large dispersion and an actuator of rf
phases at two adjacent klystron stations, in order to maintain a small energy spread. This type of energy feedback
is installed at 4 locations at 180-degree arc and the end of
the linac. Some parameters are different, depending on thebeam modes[5].
Orbit feedback loops use beam positions as monitor values and steering magnets as actuators. A monitor value
is actually a weighed average of beam position monitors(BPM’s) over a betatron wavelength according to the response function for the corresponding steering magnet.
Normally, two subsequent regions, which are apart by 90degree betatron phase, are grouped as in Fig. 3. Some feedback loops read only one BPM, and are used to maintain the
beam position at the end of the linac.
Beam Orbits
Steerings

software libraries provide an environment to tune those
new loops, even during operation.
In order to manage a large number of feedback loops,
several software panels were developed, such as a global
feedback status display and a feedback history viewer.

5 CONCLUSIONSSoftware was developed to stabilize the linac beam, andsuccessfully improved the beam reproducibility and reliability. Since it was designed to be re-arranged easily, operators could solve problems by modifying the softwareparameters, even when a beam operation mode had to bemodified.
The beam-mode switching panel has become very reliable, and has reproduced beams sufficiently with switching
more than 50 times a day. The switching time, which isimportant for the integrated luminosity, was shorten to be
90 to 120 seconds.
Feedback loops cured both the short-term instabilities
and long-term drifts of the beam energy, orbits and equipment parameters. Depending on the accelerator status, they
suppressed the beam instability to one half and drifts to one
fifth without any operator manipulations. It was also useful to keep beams when beam studies were carried underunusual beam conditions and to find some anomalies in theaccelerator.
Those software systems were used in routine operationand contributed to enhance the KEKB experiment efficiency.

6REFERENCES[1] A. Enomoto et al., “Performance of the KEK 8-GeV ElectronLinac”, Proc. EPAC2000, Vienna, Austria, to be published.

Weighed Average of BPM'sFigure 3: Group of orbit feedback loops. The weighed average of BPM’s over a betatron wavelength as a response
function is fed into a steering magnet strength.
This type of orbit feedback loop is installed at many sectors, and the current number of groups has reached 15.
Since BPM’s can be read at 1 Hz, most of the beam
feedback loops are operated at this speed[6]. The feedback
gains are chosen to be small, 0.2 to 0.5, in order to avoidoscillation.
The same feedback software has been applied to stabilize the accelerator equipment. Although these loops may
be gradually moved to local controllers, or even to the hardware, they are effective to suppress newly found instabilities in the accelerator equipment. Recently, it was applied
to suppress a long-term drift of the trigger timing of theelectron gun, and were found to be effective[7].
New feedback loops can be easily built simply by defining monitors, actuators and some parameters. Standard[2] K. Furukawa et al., “Towards Reliable Acceleration of HighEnergy and High-Intensity Electron Beams”, these proceedings.
[3] K. Furukawa et al., “Accelerator Controls in KEKB Linac
Commissioning”, Proc. ICALEPCS’99, Trieste, Italy, 1999,p.98.
[4] K. Furukawa et al., “Upgrade Plan for the Control Systemof the KEK e /e+ Linac”, Proc. ICALEPCS’91, Tsukuba,Japan, 1991, p.89.
[5] K. Furukawa et al., “Energy Feedback Systems at KEKB
Injector Linac”, Proc. ICALEPCS’99, Trieste, Italy, 1999,p.248.
[6] N. Kamikubota et al., “Data Acquisition of BeamPosition Monitors for the KEKB Injector-Linac”, Proc.
ICALEPCS’99, Trieste, Italy, 1999, p.217.
T. Suwada et al., “New Data-Acquisition System of BeamPosition and Wall-Current Monitors for the KEKB”, Proc.
APAC’98, Tsukuba, Japan, 1998, p.531.
[7] S. Ohsawa et al., “Pre-injector of the KEKB Linac”, Proc.
EPAC2000, Vienna, Austria, to be published.