DEVELOPMENT OF TIMING AND CONTROL SYSTEMSFOR FAST BEAM SWITCHING AT KEK 8-GEV LINAC
K. Furukawa∗ , M. Satoh, T. Suwada, KEK, Tsukuba, 305-0801, JapanT. Kudou, S. Kusano, MELCO SC, Tsukuba, 305-0045, Japan
A. Kazakov, GUAS/SOKENDAI, Tsukuba, 305-0801, Japan
G. Lei, G. Xu, IHEP, Beijing, 100049, China
Abstract
The 8-GeV linear accelerator (Linac) at KEK provides
electrons and positrons to the Photon Factory (PF) and B
Factory (KEKB). Simultaneous top-up injections for both
PF and KEKB rings have been considered for improving
injection efficiency and experimental stability. To provide
these injections, fast beam-switching systems are being installed by upgrading the existing timing and control systems. While the old timing system provides precise timing
signals for 150 devices, many of those signals are now dynamically switched using an event system. A new scheme
has been developed and tested to enable double-fold synchronization between rf signals. Fast controls of the lowlevel rf system, beam instrumentation, kickers, gun, andbeam operation parameters have also been upgraded for thefast and precise tuning of those parameters. The system has
been under development since 2006, and is being deployed
for beam operation in 2008.

INTRODUCTION
The KEK Linac injects electron and positron beams withdifferent characteristics into four storage rings: KEKBHER, KEKB-LER, PF, and PF-AR. It takes 30 s to 2 min tochange the beam mode, depending on the degree of magnet standardization [1]. For example, when a beam development study is performed in the PF ring, the experimentat KEKB is disturbed. Owing to the crab cavities installedat KEKB, luminosity tuning is sensitive to the beam conditions at the both HER and LER rings. Therefore, it ispreferable to ensure the simultaneous injection of beams
to these rings. There is an increasing demand for top-up
injection in the PF ring in order to obtain high-quality experimental data.
In view of the above requirements, a system that can
rapidly switch between beam modes has been designed andimplemented [2]. Many hardware components, such as
pulsed magnets and fast microwave systems, have been installed in this system. The designing of beam optics is also
performed in parallel to support the wide dynamic rangeof the beam energy and charge, namely, 3-times different
energy and 100-times different charge.
The control and timing systems have also been upgradedin order to meet the requirement for performing beammode switching at 50 Hz (20 ms). An event system has∗ < kazuro.furukawa @ kek.jp >been introduced so that the entire 600-m Linac can be notified of a switching event [3]. The system has been undergoing testing since 2006 and is expected to commence
operation in autumn 2008.

FAST BEAM-MODE SWITCHING
The Linac employs several beam modes. It took morethan 30 s to switch more than 20 items. The following
beam modes are considered the most important modes forfast beam-mode switching:• KEKB HER: 8-GeV electrons, 1.2 nC, 2 bunches• KEKB LER: 3.5-GeV positrons, 1.2 nC, 2 bunches(10-nC primary electrons)• PF ring: 2.5-GeV electrons, 0.1 nC, 1 bunch
Here, 2 bunches in a beam pulse are separated in time by
96 ns. The fast switching of the above beam modes waschallenging because the dynamic range of the beam characteristics is very large. An adaptive beam optics scheme
has been developed to overcome the challenges. In orderto implement this scheme, several hardware components
have been improved. The parameters of system components listed below are changed within a period of 20 ms.
• Magnets: a pulsed bending magnet, several pulsed
steering magnets, and a pulsed positron capture coil
• Microwave: phase and timing of low-level rf (LLRF)
signals and timing of high-power rf signals• Gun: selection between grid-pulsers, bias voltage andpicosecond timing• Beam instrumentation: synchronized and fast beamposition-monitor (BPM) readout, pulse selection forwire-scanners and streak cameras• Injection: selection of septa and kickers, interface tobucket selection systems• Operation: beam stabilization feedback, beam-modesequence pattern generation, mode-dependent parameter manipulation and archiving
In order to achieve synchronized control over Linac andbeam transport lines for KEKB and PF, a global event notification system has been installed. Errors in control are notacceptable because of safety reasons. Safety is an important issue since the beam powers vary by a factor of 10 to
100 [4]. It should be easy to manipulate the parameters foreach mode to optimize beam tuning and the conditions forphysics experiments. The easy manipulation of parameters
for several beam modes is almost equivalent to building ofseveral virtual accelerators.

EVENT NOTIFICATION SYSTEM
In the old system, beam modes were broadcast throughtwo mechanisms. Four separate cables were connected toimportant control stations in order to broadcast four independent pulse characteristics: beam existence and the synchronized beam measurement. Detailed information wastransferred using standard control features through control
networks. Timing signals were transferred to 15 timing stations through a coaxial cable, which transmitted a 50-Hz
pulse and a 571-MHz clock signal [5].
When the beam mode was changed, more than 500 parameters were changed. The switching took over 30 s
mainly because many magnets had to be standardized.
The series-230 event system that was developed for Diamond light source was introduced in the new event notification system [6]. In this event system, an event generator(EVG230) is installed at the central station and event receivers (EVR200/EVR230RF) receive information throughoptical fibers. Each EVR can provide the following:• A sequence of programmed events in a pulse• A regenerated clock signal (in our case, 114.24 MHz)
• Up to 14 delayed timing signals (with a precision ofless than 10 ps)• Shared data buffer up to 2 k-bytes
Since the signals are transmitted using a single fiber connection, the maintenance of the signal quality is expected
to be straightforward.

and 1/25th of the main Linac frequency. The rf signal of
114.24 MHz is fed into the EVG230 and used to transfer events and other data to EVRs that are arranged ina star-like topology. Most of the EVR stations are connected through fan-out modules with multi-mode opticalfibers that were laid more than 10 years ago. Some of further EVR stations are connected with single-mode opticalfibers; small-form-factor pluggable (SFP) modules werereplaced at the fan-out modules and EVRs.
The EPICS driver software is used and is extended tosupport the new features of the series-230 system. The
CPU and the operating system of the VME computers for
EVG/EVR are MVME5500 and VxWorks-5.5.1, respectively. This combination was chosen to satisfy the requirements of real-time operation of the system.

BEAM-MODE PATTERN GENERATION
Approximately 50 event codes have been defined so far.
Some of them directly correspond to one of the beammodes, while some others correspond to a component of
the accelerator equipment. A beam pulse is generated every
20 ms, and it is accompanied by a sequence of several eventcodes. The codes contain information on at least one event
related to the beam mode of the present pulse and that of
the next pulse. Some event codes received at an EVR station trigger the EPICS software to control the equipment
connected to it.
Some of the equipment can respond to 50-Hz controls.
However, other equipment responds to a restricted set ofpulses. The beam-pulse request from each ring depends
on the beam conditions and experimental conditions in thering. Thus, the design and arbitration of the beam-mode
train pattern is a complex task.
Since the modification of the software on the EVG system may interrupt the beam operation, it was decided togenerate the pattern using a separate program. The present
pattern generation scheme has been implemented using ascripting language in order to enable rapid prototyping.

Figure 1: Layout of the new event system.
Figure 1 shows 11 EVRs installed along the Linac.
These EVRs are believed to be sufficient for the control ofthree beam modes. Seven of these EVRs are located close
to the existing timing stations, whose functionalities will
be taken over by those EVRs. Consequently, the numberof components in the system will reduce since an EVR cangenerate 14 precise delayed timing signals. Thus, most of
the remaining old timing stations will be replaced by EVRsin the near future. Some devices such as streak cameras
require high timing precision. For this purpose, a precise
re-synchronization module is being developed.
The event rate is chosen to be 114.24 MHz, which is
identical to the frequency of the first sub-harmonic buncher

Figure 2: Beam-mode pulse pattern. A specific beam modeis assigned to each beam pulse, and several event codes
accompany each beam mode.
A pattern such as Fig. 2 is designed using the program.
The length of the pattern should be less than 500 pulses (10s), and the pattern can be downloaded into the EVG system at any time. Once a pattern is loaded, it repeats until
it is replaced. The new pattern replaces the previous one at
the end of the pattern. The EVG system automatically generates an event code sequence following the beam-modepattern.

EQUIPMENT CONTROLRF SYNCHRONIZATION

EVR modules directly drive timing signals in response toevent codes. The timing delays are modified according tothe event codes that correspond to a particular beam mode.
These timing signals are fed to devices such as pulsed magnets, LLRF systems, high-power sources, beam instrumentation, and injection systems in order to adjust the beamcharacteristics.
The LLRF parameters are essential in order to define theprofile, absolute value and spread of the beam energy. At
the end of each pulse, the LLRF parameters are changed toproduce the next LLRF pulse, as in Fig. 3.

The rf frequencies in both rings are independently andcontinuously adjusted in order to compensate for the variations in the ring circumference. KEKB and Linac frequencies have a common source because the tolerance of theinjection timing jitter is less than 30 ps. For the PF ring, adouble-fold synchronization module was developed in order to choose a timing that synchronizes the PF revolution
frequency and the Linac frequency within a certain jitter.
Currently, the jitter is set to 300 ps.

Figure 3: Six LLRF stations are managed by EVR systems.
Currently, the following six pulsed magnets are installedin Linac: a bending magnet to feed the beam to the transport lines, a pulsed coil to efficiently capture positrons,and pulsed steering magnets to guide the beam around thepositron target by creating a beam orbit bump. These magnets are separately triggered by timing signals from nearby
EVR systems, depending on the beam mode.
The beam instrumentations are also important for obtaining the desired beam properties. Approximately 100 BPMs
are utilized to monitor, stabilize, and analyze the beam [8].
The old system reads the beam positions only once in a second. However, the beam characteristics must be acquired
for every pulse when the beam is switched.
The new system employs 24 oscilloscopes (TektronixDPO7104) [9]. EPICS software is embedded on to thoseoscilloscopes, and it can acquire the BPM signals in 10Gsamples/s and analyze the beam properties by using morethan 20 coefficients per BPM. They can process the signals
for every pulse, recognize the beam modes, and distinguishbetween two bunches that are 96 ns apart. Since the event
system cannot be embedded in the oscilloscope, event information is delivered through the normal control network.
For some of the beam instrumentation such as streak
cameras that do not recognize 50-Hz switched signals, atiming signal is delivered only for a selected beam mode.

CONCLUSION
The features of this new event-based control system arebeing evaluated in the beam operation. It has been provedthat the system satisfies the requirements for fast beamswitching. The system is expected to provide sensitive andstable tuning of KEKB with crab cavities for simultaneously achieving higher luminosity and a top-up injection tothe PF ring. Further software development may be required
to support the beam operations with those three virtual accelerators enabled by the event system. An integrity monitor is being developed for the system in order to ensuresatisfactory operation.

ACKNOWLEDGMENTS
The authors would like to thank E. Björklund of LANL,
T. Korhonen of PSI and J. Pietarinen of MRF for providing
us with the EPICS event software as well as for valuable
discussions.

REFERENCES[1] K. Furukawa et al., “Beam Switching and Beam Feedback
Systems at KEKB Linac,” Proc. LINAC 2000, Monterey,USA, 2000, p. 633.
[2] M. Satoh et al., “Present Status of the KEK Injector Upgrade
for the Fast Beam-mode Switch,” these proceedings.
[3] K. Furukawa et al., “Timing System Upgrade for Top-up Injection at KEK Linac,” Proc. EPAC 2006, Edinburgh, UK,2006, p. 3071.
[4] T. Suwada et al., “Operational Performance of a New Beamcharge Interlock System for Radiation Safety at the KEKB
Injector Linac,” these proceedings.
[5] K. Furukawa et al., “The Timing System of KEKB 8-GeV
Linac,” Proc. ICALEPCS 2003, Gyeongju, Korea, 2003,
p. 130.
[6] Micro-Research Finland Oy, <http://www.mrf.fi/>.
[7] EPICS Home, <http://www.aps.anl.gov/epics/>.
[8] K. Furukawa et al., “Beam Feedback Systems and BPM
Read-out System for the Two-bunch Acceleration at theKEKB Linac,” Proc. ICALEPCS 2001, San Jose, USA, 2001,p. 266.

Figure 4: Twenty-four oscilloscopes are installed in orderto read 100 BPMs at 50 Hz, recognizing the beam modes.

[9] M. Satoh et al., “Fast BPM DAQ System Using Windows
Oscilloscope-based EPICS IOC,” Proc. ICALEPCS 2007,Knoxville, USA, 2007, p. 469.