Magnet Information Management System Based on Web Application for the
KEK e-/e+ Injector LINAC
M. Satoh†, 1, Y. Enomoto1, High Energy Accelerator Organization (KEK), Accelerator Laboratory,Tsukuba, Japan
1
T. Kudou , Mitsubishi Electric System & Service Co., Ltd (MSC), Tsukuba, Japan1
also at The Graduate University for Advanced Studies (SOKENDAI), Department of Accelerator
Science, Tsukuba, Japan
Abstract
The KEK injector LINAC provides e-/e+ beams to four
independent storage rings and a positron damping ring. An
accurate information management system of accelerator
components is very important since it is used for the development of a beam tuning model. In particular, an incorrectmagnet database could cause a large deterioration of thequality of beam emittance. At LINAC, a text-based database has long been used for the device information management of magnet systems. It comprises several independent text files that contain master information for generating EPICS database files and other configuration files
required for many LINAC control software programs. In
this management scheme, it is not easy for common users
except a control software expert to access and update anyinformation. For this reason, a new web application-basedmagnet information management system is developed with
the Angular framework and PHP scripts. In the new system,
the magnet information can be easily extracted and modified using any web browser by any user. In this paper, we
report the new magnet information management systemalongside future prospects.

700 m, the injector LINAC currently employs approximately 600 DC and pulsed magnets for the beam operation.
As a tool for magnet system information management, a
database using simple text files has been used for manyyears since the beginning of the KEKB project. The information contained within this database, such as magnet
names, corresponding power supply specifications, and excitation curve parameters, has been used for the many different control system software programs based on the Experimental Physics and Industrial Control System (EPICS)[9]. However, the modification of this database is not very
easy particularly for non-control software experts. ToINTRODUCTION
The KEK e-/e+ injector LINAC [1, 2, 3] established thesimultaneous top-up injection into five rings in 2019 tosupport both SuperKEKB particle collider experimentswith the DR, LER and HER rings [4], and photon science
experiments at the PF ring and PF-AR. Figure 1 shows thelayout of LINAC and the lepton accelerator complex. At
the most downstream part of LINAC, the third beamswitching yard, one LINAC beam line branches to thebeam transport lines with the deflecting pulsed bending
magnet, as shown in Fig. 2. We succeeded in improving theefficiency of SuperKEKB collision experiments by morethan 200% after the introduction of simultaneous top-up
injections [5]. This noble injection scheme became indispensable because the beam lifetime of the SuperKEKB
ring is quite short, especially at the LER positron ring,which was less than 10 min in 2021. The basis of this operation arrangement, LINAC gradually improved the injection performance and contributed to the achievement of theworld-record collision luminosity of SuperKEKB [6].
For the SuperKEKB project, significant updates havebeen made to the magnet system at LINAC. In 2017,
around 120 pulsed magnets were installed together with a
new magnet control system [7, 8]. With a total length of

Figure 1: Layout of the KEK e-/e+ injector LINAC
and the lepton accelerator complex.

Figure 2: Photograph of the third beam switchingyard at the KEK e-/e+ injector LINAC. The LINAC
beam line branches to the beam transport lines withthe deflecting pulsed bending magnet.

improve the usability of database handling, a new web application with a relational database was developed atLINAC.

ORIGINAL SYSTEMAt LINAC, the information of various devices, including
magnets, beam diagnostics, timing systems, and RF systems, is managed using simple text-based database files. In
particular, the precise control of magnets is very importantfor achieving good beam quality. The original magnet information management system comprised several independent database files. These database files are simple text
files. The database file names and their contents are listed
in Table 1.
The contents of these database files are the magnet
names, corresponding power supply specifications, controller information, excitation curves, and others. During
the maintenance in the summer of 2017, a substantial number of pulsed magnets were installed for simultaneous topup injections. At LINAC, the database files were updatedby control software experts, although the original device
information has been managed by hardware experts. Consequently, since the process of database modification is notvery simple, it takes time and could include incorrect parameters. To improve these inconveniences, a new web application was developed to consolidate the magnet information previously scattered across multiple database files
into a unified database. Using the new web application
with good usability, even non-control software experts canalso easily modify the magnet information database.

NEW SYSTEM
System Outline
The new magnet information management system has
been implemented as a web application to ensure easy access by any application user including non-control software experts. Figure 2 shows the software structure of thenew system. Angular is used for the implementation of thefrontend. Angular is a widely used open-source single-page
web application framework developed by Google [10]. At
LINAC, Angular has already been used for the electronic
operation logbook and archive viewer web applications.
The web server using Apache HTTP is running on HPE
SimpliVity as high-availability server computers. PostgreSQL is also running on the HPE SimpliVity server as
the backend database. Data communication among the webserver, frontend, and backend database components is conducted using PHP scripts, a widely used programming language for server-side web application development. It enables easy access to the database.

Features
The access permission to this system is fully controlled
through by the username and its corresponding password.
User Interface (Angular)
Vistual IP Address

HA Cluster
Corosync + PaceMaker

ApacheHTTP Server

Pgpool-II watchdog
Active/Standby

Table 1: Text-based Database Files for Previous Magnet
Information Management System・connection pooling・online recovery

PostgreSQL

File namemgtbl.tbl
mgbasetbl.tblmgpvtbl.tbl
mgbtbl.tbl
mgktbl.tbl
mgbptbl.tbl

contents
DC magnet controller (PLC) information
Pulsed magnet controller (PXI)
information
Magnet name/EPICS PV nametable
DC magnet excitation curve(magnetic field)
DC magnet excitation curve (kvalue)
Pulsed magnet excitation curve(magnetic field)

mgbftbl.tbl

DC magnet fudge factor

mgbfptbl.tbl

Pulsed magnet fudge factor

・Streaming replication

ApacheHTTP Server

ApacheHTTP Server

Vistual IP Address
pgpool-II

PostgreSQL

pgpool-II

PostgreSQL

pgpool-II

PostgreSQL

Figure 2: Software structure of the new magnet information management system at the KEK e-/e+ injector LINAC.

Figure 3: Login page screenshot of the magnet information management system.

For each user, a specific permission can be assigned suchas read only or read-and-edit access. The access control ofthe database can be managed using the already existingLightweight Directory Access Protocol (LDAP) server at
LINAC. After authenticating by the username and password through the login screen as shown in Fig. 3, users canaccess the operational interface of the system. A screenshot

Figure 4: Main page screenshot of the magnet information management system.

Figure 5: Edit page screenshot of the magnet information management system.

Figure 6: Filter settings page screenshot of the magnet information management system.

image of the main page that appears after user authentication is shown in Fig. 4.
In this system, it is possible to manage approximately
100 data column components for each magnet, including
the magnet name, corresponding power supply specifications, controller information, and excitation curve. The
items listed in the web browser can be freely modified by
the user via the popup dialog box. Furthermore, these data
can be edited, added, and deleted directly within the webbrowser by the allowed users. A screenshot of the data editing page is shown in Fig. 5.
At the initial operation of this new system, many data
entries should be imported to the database. Performing
such tasks one by one through a web browser takes considerable amount of time and labor. Therefore, the bulk importfeature is implemented for handling a large number of databy batch processing with the CSV file format. In addition,
all data or the selected data can also be exported to the CSV
file for some other purposes.
Currently, the database of this system contains the information of 591 magnets at LINAC. The magnet types are
the DC steering, DC bending, DC quadrupole, DC sextupole, pulsed steering, and pulsed quadrupole magnets.
Since the total number of registered data is large, the user
can show only specific data by filtering against specific criteria. In this filtering feature, the user can use multiple keywords for a quick search of the desired results. A screenshotof the page with filter condition settings is shown in Fig. 6.
In device information management systems, one of thekey issues is to maintain a database with correct contents.
After the modification of the beam line, the updated information should reflect the contents of the database as
quickly as possible. Since some parts of the database contents are used by other control software programs andbeam simulation models, wrong contents of database cause
severe operational problems and the deterioration of beam
quality. Hence, the quality control of the database contents
is one of the critical issues. In this new system, the user
can easily check the database change log as shown in Fig.
7. In the previous system, the database change log wasmanually documented in the file header part of the databasefiles. However, since it may lead to incorrect contents, thenew system can automatically update the database change

Figure 7: Database change log page of the magnet
information management system.

log to maintein the correctness and reduce the user labor ofmanual input by user.

SUMMARYAt LINAC, the new web application has been developedand implemented for the management of magnet information. In the previous system, several independent text
files were used as the backend database. Using these database files, shell or Python scripts can automatically

REFERENCES[1] M. Akemoto et al., “The KEKB injector linac”, Prog. Theor.
Exp. Phys, vol. 2013, p.03A002, 2013. doi:10.1093/ptep/ptt011[2] K. Furukawa et al., “Rejuvenation of 7-GeV SuperKEKB injector linac”, in Proc. IPAC2018, Vancouver, Canada, 2018,
pp.300–303. doi: 10.18429/JACoW-IPAC2018-MOPMF073[3] K. Furukawa et al., “Achievement of 200, 000 Hours of Operation at KEK 7-GeV Electron 4-GeV Positron InjectorLinac”, in Proc. 13th Int. Particle Accelerator Conf.
(IPAC'22), Bangkok, Thailand, Jun. 2022, pp. 2465-2468(2022).
[4] K. Akai et al., “SuperKEKB collider”, Nucl. Instrum. MethodsA, vol.907, 2018, pp.188–199. doi:10.1016/j.nima.
2018.08.017[5] K. Furukawa et al., “Advanced acceleration mode switchingfor simultaneous top-up injection at KEK electron/positron
injector linac”, in Proc. PASJ2020, Matsuyama, Japan, 2020,
pp.1–6.
https://www.pasj.jp/web_publish/pasj2020/proceedings/PDF/WEOO/WEOOP01.pdf[6] Y. Ohnishi et al., “SuperKEKB operation using crab waistcollision scheme”, Eur. Phys. J. Plus, vol. 136, 2021, p.1023.
doi:10.1140/epjp/s13360-021-01979-8[7] Y. Enomoto et al., “Pulse-to-pulse Beam Modulation for 4
Storage Rings with 64 Pulsed Magnets”, in Proc.
LINAC2018, Beijing, China, Sept. 16-21, pp.609-614 (2018).
[8] Y. Enomoto et al., “Pulsed Magnet Control System Using
COTS PXIe Devices and LabVIEW”, in Proc.
ICALEPCS2019, New York, NY, USA, Oct. 5-11, pp.946949 (2019).
[9] EPICS;
https://epics.anl.gov/.

[10] Angular;
https://angular.jp/.

generate the files required for the EPICS database and configuration of various operation software programs. In thenew system, since multiple database files are consolidated
using PostgreSQL, the complexity of managing these database files is markedly reduced. In addition, even non-software experts can easily modify the database using the operational interface of the web application. In the near future,
we will expand this software framework to the information
management of other devices, such as an accelerating
structure, klystron, and a beam monitor.