CONTROL SYSTEM UPGRADE FOR SUPERKEKB INJECTOR LINAC
M. Satoh#, F. Miyahara, Y. Seimiya, K. Mikawa, T. Suwada, K. Furukawa, KEK/ SOKENDAI,Tsukuba, JapanT. Kudou, T. Ichikawa, Y. Mizukawa, K. Hisazumi, S. Kusano, Mitsubishi Electric System &Service Co., Ltd, Tsukuba, Japan
H. Saotome, M. Takagi, Kanto Information Service (KIS), Accelerator Group, Tsuchiura, Japan
Abstract
The KEKB project has successfully ended 13 years
operation in the June of 2010. The construction ofSuperKEKB main ring has almost completed for aiming
at the peak luminosity of 8 x 1035 cm-2s-1. The injector
linac upgrade is also going on for increasing the intensityof bunched charge with keeping the small emittance. The
key upgrade issues are the stable operation of a newpositron capture system, a low emittance photo-cathode rf
electron source, and the establishment of low emittancepreservation. The injector linac beam commissioning
started in the October of 2013. The control system
performance determines the beam operation efficiency of
injector linac, and it eventually has a strong impact on theexperimental results of physics. In this decade, the linac
control system has been gradually transferred from the inhouse system to the Experimental Physics and Industrial
Control System based one for the high availability ofbeam operation. In this paper, we present the detail ofSuperKEKB injector linac control system.

INTRODUCTION
The linac beam control system is based on a standard
client and server model with three layers. It comprises aclient, a server, and a local controller layers. At thebeginning stage of KEKB operation, the original linac
control system has been developed by using the in-house
software libraries based on the remote procedure call(RPC). The client user interfaces have been implemented
by a command line interface based on shell script and agraphical user interface based on Tcl/Tk scripting
language. Around a decade ago, the middle phase ofKEKB operation, the linac control system has been
upgraded to a new framework based-on the Experimental
Physics and Industrial Control System (EPICS) [1] toimprove the affinity between the linac and KEKB main
ring control systems. These improvements make itpossible to conduct the correlation analysis of linac andmain ring parameters in much easy way. Such analysis
can strongly help to find a source of injection rate
deterioration and any other troubles.
After introducing the EPICS framework, the new clientside user interfaces have been implemented by Python
scripting language since its rich library modules andfunctionalities can accelerate the software developmentprocess. For the simultaneous top-up injection of KEKB___________________________________________#e-mail address: masanori.satoh@kek.jp.

and PF rings, an event based timing system has been
installed to enable the pulse-to-pulse beam modulation [2].

OUTLINE OF CONTROL SYSTEM
Computer environment
In the beginning phase of KEKB project, the six
Compaq Alpha servers based on the Tru64 UNIX
operating system were utilized as the server computers.
All server programs were basically run on them. Two ofthem were connected to the RAID disk drive via SCSI
bus interface, and they can work as the active/standby
redundant NFS servers for aiming at the high availability
operation. Since the Tru64 UNIX was obsoleted, allserver machines have been gradually replaced by theLinux-based servers. Eventually, we made decision to use
the Linux base system without cluster functionality after
the evaluation of several different types of highavailability cluster system based on Linux. For keeping
the high availability of server machines without cluster
scheme, the blade server system was installed as the highreliability server. Currently, fifteen Linux based bladeservers are utilized as the server computers with CentOS
5.11 x86_64. Both of server and client side control
software are running on the server machines. CentOS 6.7
and 7.1 running on two blade servers are currently tested
by using VMware vCenter of the virtual computingtechnology.
The Tektronix X terminals and touch panel displays
based on PC9801/DOS machines have been originallyutilized as the operator terminals. These terminals werereplaced by the Linux based PCs and Windows based PCs
with the X server application software of ASTEC-X andFigure 1: Photograph of the KEK electron/positron
injector linac main control room.

Reflection X. Figure 1 shows a photograph of the linac
main control room. Three large liquid crystal displays(LCDs) with 55’’ show the alarm, operation, and interlock
statuses. Sixteen LCDs with 27’’ are used for running thebeam operation software and its development.

Network environment
In the previous linac control network system, Cisco
Catalyst 4506 and 3750 have been utilized as the master
network core and slave switches, respectively, forenabling the active/standby failover. Each of them wasindependently connected to 45 edge switches of Catalyst
2950 via single or multi-mode optical fibers with 100
Mbps bandwidth. For the network connection between theedge switches and the local controllers like aprogrammable logic controller (PLC), the optical fiber isused for avoiding the noise generated by the klystron
modulators.
Toward SuperKEKB operation, the core switch system
was replaced by 6 of Cisco Catalyst 3750X. They canwork as the active/active redundant system based on thevirtual switching system technology. We replaced also theedge switch by Catalyst 2960S, and the network
connection speed was improved up to 1 Gbps bandwidth.
In addition, the wireless network was installed into thebeam line tunnel for improving maintainability.

reduction of number of timing modules improves thesystem availability. The PLCs used for the klystron
modulator control have been gradually replaced by thenew embedded controller of Armadillo. The EPICS
Input/Output controller (IOC) can run on it. The Windows
based digital oscilloscope as the BPM readout system will
be replaced by a new one based on VME card soon. Its
measurement precision is around 3 m [3].

EPICS ENVIRONMENT
Overview
In the linac control system, the EPICS IOCs wereoriginally implemented with the base R3.14.9 forwrapping the existing in-house control system. Table 2shows the total number of IOCs for each subsystem. The
EPICS process variables (PVs) are just communicatingwith the existing system based on RPC when the software
access any PVs. Toward higher reliability, the server
applications
wereremodeledfor
thedirect
communication between the IOCs and local controllers by
EPICS base R3.14.12. All EPICS IOCs are running inside
the vncserver sessions as shown in Fig. 2.
Table 2: Number of EPICS IOCs used for eachsubsystem.
Subsystem
SafetyMonitor
RFMagnet
VacuumOperation
TimingTemperature
Total

Local controller
For the injector linac control system, many kinds ofdifferent local controllers are utilized for the injector linac
component control as listed in Table 1. The ladder PLCs
control the magnet power supplies, vacuum pumps, andsafety related signals. About one hundred seventy
CAMAC and VME based timing delay cards have been
replaced by the 25 event timing cards based on VME64x
bus for the pulse-to-pulse beam modulation. The# of ICOs
248
57
191
3
212
153

Table 1: List of the network attached localcontrollers used for the linac control system.
Devices

VME64xPLC

Network
attached power
supplyLinux based
PLC
EmbeddedLinux
Data logger
Oscilloscope
NIM modules
TotalAcceleratorcomponents (# ofcomponents)
Event based timing
system (MRF EVG230, EVR-230RF)
Magnet (363)
Vacuum (333)
Klystron (5)Charge interlock
Magnet (105)# of localcontrollers

Profile monitor (100)30

Klystron (66)66

Temperature (690)
BPM (90)
Timing watchdog (15)

28
23
15
385

25
59
26
5
3105

Figure 2: All EPICS IOCs are running in thevncservers.

Alarm
The independent in-house alarm applications wereoriginally developed and utilized for each subsystems.
For the comprehensive alarm management, we adopted
the EPICS Control System Studio (CSS) [4] alarm 3.0.0together with PostgreSQL 9.1.4 as a backend databaseengine. Around 1000 PVs are currently registered to theCSS alarm. The graphical user interface (GUI) showing
the alarm status was developed by the Python scripting
language. The panel shows the both of summary anddetailed information of alarm status. The more detailed
historical list of alarmed PVs can be also displayed in theother windows. Since the total number of registered PVs
will be increased toward SuperKEKB operation, we areevaluating the speed performance and the robustness ofCSS alarm with the large number of PVs.
Figure 3: Web-based linac operation status.

ArchiverIn the original linac control system, we developed thesimple archiver tool recording the parameters into a text
file together with the dedicated viewer software. After theimplementation of an EPICS based control system, theEPICS channel archiver and CSS archiver 3.2.2 together
with PostgreSQL 9.1.4/9.3.3 have been utilized. The total
number of PVs registered to each archiver is currently
44063. The daily disk space usages are approximately 2
GB and 4.5 GB for channel and CSS archiver,respectively.
The web based data browser is utilized for the CSS
archiver though the standard java based viewer is used forthe channel archiver. The web based one was developedwith Flex 4.6, PHP 5.3.6, and Amfphp 1.9. It can provide
the easy access to archiver data from the any client
devices including mobile one. It has the functions ofcorrelation plot, multiple vertical axes, PV name search,
and autocomplete for the quick parameter analysis.
The data retrieve speed of CSS archiver is slower thanthat of channel archiver. For improving these issues, thepg_reorg option was added into PostgreSQL database. It
can reduce the CSS archiver database size by 33%, andimprove the data retrieving time to a certain extent. For
the further improvement of data retrieving speed, anotherscheme using the NoSQL type database of Casandra as abackend is now being evaluated.

OPERATION SOFTWARE
OutlineThe original linac operator interface was developed by
the Tcl/Tk scripting language and command line interface.
For the rapid application development, the main softwaredevelopment language was transferred to Python scriptinglanguage. The communication between the operation
software and EPICS PVs can be established via
PythonCA module developed for the KEKB project.

Operation status display and electronic logbook
The real-time linac operation status is given through theWeb-based application which can be run on the multiple
operating system without installing specific software.
This web application was implemented by using
WebSocket together with Node.js and Socket.IO library.
WebSocket can reduce the CPU load on the servermachines in comparison with the other technologies like
Ajax or Comet since its protocol can provide a full-duplex

communication channels over a single TCP connection.
This application shows the information of present beam
repetition, high power klystron status, radiation monitor
status, and so on as shown in Fig. 3.
The electronic operation logbook system (OPELOG)
can enable the rapid operation information sharing
between the accelerator operation team and hardware
group. We developed an OPELOG system with Flex 4.6,
PHP 5.3.6, Amfphp 1.9, and PostgreSQL 9.4.0. It
comprises the summary and detailed information screen
for each operation shift. OPELOG can automaticallyrecord the all routine operation state transition like thestatus change of beam repetition and klystron failure. Inaddition, a snapshot of operation GUI image can be easily
imported into the detailed information screen. Moreover,
OPELOG has the quick search function of past log by akey word combination set during a specific time period. It
can be a strong help to find a solution of similar trouble
occurred in the past.

CONCLUSION
Towards SuperKEKB project, the injector linac
upgrade and commissioning are now on going for aiming
at the 4 ring simultaneous top-up operation. Since themiddle phase of KEKB operation, the linac beam controlsystem has been gradually transferred from the in-housesystem based on RPC to the EPICS based one. Many
operation software are developed by the Python scripting
language. The data retrieving speed performance ofarchiver and the rapid development of advanced
commissioning tools are recent main issues.

REFERENCES[1] http://www.aps.anl.gov/epics/.
[2] K. Furukawa et al., “Pulse-to-pulse Beam
Modulation and Event-based Beam Feedback
Systems at KEKB Linac”, in Proceedings ofIPAC’10, Kyoto, Japan, pp.1271-1273 (2010).
[2] http://ics-web.sns.ornl.gov/kasemir/archiver/.
[3] F.
Miyaharaetal.,"HIGH POSITIONRESOLUTION BPM READOUT SYSTEM WITH
CALIBRATION PULSE GENERATORS FOR KEK
e+/e- LINAC" in Proceedings of IBIC2015,
Melbourne, Australia, September 13-17, TUPB023(2015).
[4] http://controlsystemstudio.org/.