EPICS-based control system forcompact-ERL and iBNCT
2017/05/16
Takashi OBINA
Control/Beam Diagnostics Group of Photon Factory and PF-AR
KEK, High Energy Accelerator Research Organization

Introduction• I would like to talk about the control system of two accelerators:– Compact Energy Recovery Linac (cERL) at KEK Tsukuba– Ibaraki Boron Neutron Capture Therapy (iBNCT) at Tokai (near J-PARC)• The reason for picking up the two accelerators are:
– They use “EPICS”, of course– Both accelerators is (relatively) compact– Limited human resource– Both facilities uses similar hardware (Field Bus, console, server, etc)
– I want to share the lessons learned with EPICS community...

2

Table of Contents

1. Introduction
2. Outline of cERL at KEK

3. Outline of iBNCT at Tokai
4. Commissioning, Tuning, Operation– Various tuning panel– CSS as an operation manual (procedure)– Software for rapid prototype– Hardware example : VME-Master3

Location

KEKTsukuba

J-PARC(KEK Tokai)
iBNCTKURRI
4

KEK Tsukuba Campus
Large Accelerators:

KEKB HER/LER

PF-AR 6.5 GeVcERL•Linac•KEKB : HER, LER (C = 3 km)

Synchrotron Radiation Facility• PF-Ring : 2.5 GeV (C = 187 m)• PF-AR : 6.5 GeV (C = 640 m)(Relatively) compact accelerator:
R&D Machinecompact ERL (～20 MeV, C = 90 m)

PF 2.5 GeV

Linac5

What is ERL?
Keyword : Linac-based, High Average Current, Brilliant electron source
Application : Future Light Source, Electron Cooling, EUV-Lithography,... etc(5GeV x 100mA = 500MW)

Beam Dump

High brilliant
electron gun(10MeV x 100mA = 1MW)

Super conducting cavity forAcceleration and deceleration

6compact ERL at KEK
R&D machine.
Key : Electron Gun, SC Cavity, Beam dynamics, THz,
Laser-Compton scattering, etc.

The first arc

Injector diagnostics beamline
LCS collision point
Beam dump
Dump chicane
Main-linac cryomodule
Merger

The second arc©Rey.Hori/KEK

Circumference: ~ 90 m

Injector cryomodule

Photocathode DC gun

Parameters of the cERL
DesignIn operation

Beam energy E

35 MeV

20 MeV

Injector energy Einj

5 MeV

2.9 - 6 MeV

Beam current

10 mA

1 mA

Normalized emittance[mmmrad]0.1 @7.7 pC
1 @77 pC

See, later page

Repetition frequency ofbunches

1.3 GHz1.3 GHz (usual)162.5 MHz (for LCS)

RMS bunch length

1-3 ps (usual)~ 100 fs (compress.)

1-3 ps (usual)

Eacc in main linac

15 MV/m

8.2 MV/m

Gun high voltage

500 kV390 kV7

Max. heat load at 2K

80 W

100 - 807W

Picture of cERL

Photocathode DC gun

Injector diagnostic beamline
Main-linac cryomodule

Recirculation loop
Injector cryomodule88

Control System : “Standard” Field Bus••In General, it is very difficult to force everyone to use one specific hardware,
while the control group wants to reduce the number of support hardware.
hardware selection depends on the requirement
If there are no special reason, we ask development team to use Yokogawa
PLC based module (FA-M3 Series) as a “standard” field bus.
– Long hardware lifetime– Reliability– Easy development: EPICS Ready!, Many experiences in KEK••

Ladder CPU for Real-time (or safety) application
Linux CPU (F3RP61) for EPICS IOC

Ladder CPU

Linux CPULinux CPU

9

Multichannel Data Logger•

For temperature sensor or analog voltage– Yokogawa MW100
http://tmi.yokogawa.com/products/data-acquisition-equipment/low-speed-daq-industrialrecorders/mw100-data-acquisition-unit/– Chino Network Logger
http://www.chino.co.jp/products/component/ke.html– Graphtec data logger
http://www.graphtec.co.jp/site_instrument/instrument/index.html

EPICS device support or protocol files (Stream Device) for theseequipment have been developed.

10Magnet Power Supply•

CAENels– LiAM6005, SY3634– Each power supply directly attached to control network– ASYN + StreamDevice

11

Control Room Photo• Two projectors to the wall
– mainly for demonstration (for Guests/visitors)•Desktop 27-inch display is mainly used for accelerator tuning.
– 2 PCs for operation/ Beam tuning.

12Software tools used••

Linux Server Machine / Windows console
CSS for GUI, Archive/Retreival, AlarmThanks for Kay Kasemir for his great contribution!!
••

EPISS 3.14
CSS KEK version– http://www-linac.kek.jp/cont/epics/css/– Tutorial, documents, etc– Version 3.2.16 for cERL

13

wiki
•

We want to share know-how in Japanese : EPICS Users JP wiki
– http://cerldev.kek.jp/trac/EpicsUsersJP– For advanced researcher/programmer : send e-mail to tech-talk!!
– Mailing List (in Japanese) ... not so active like tech-talk• epics-users@ml.post.kek.jp

14Machine Status Panel•

Figure15

Status Panel Example•

Thanks for the Java environment, we can use Japanese on the panel.
– nice feature for operator (not good for scientists from foreign countries)

16

Archive•

Almost 9,000 PVs are stored in archive

cERL
Disk usage:
2012 (1.7 TB)
2013 (3.5 TB)
2014 (4.5 TB)2015 (6.1 TB)
2016 (3.0 TB)

17

Table of Contents

1. Introduction
2. Outline of cERL at KEK

3. Outline of iBNCT at Tokai
4. Commissioning, Tuning, Operation– Various tuning panel– CSS as an operation manual (procedure)– Software for rapid prototype– Hardware example : VME-Master18

What is iBNCT?
•Location

About 1 hour by the shuttle-bus (via Highway)
KEK
Tsukuba

J-PARC(KEK Tokai)
iBNCTKURRI
19

map
•

iBNCT

iBNCT Location : near
the entrance of J-PARC

J-PARC Entrance

J-PARC

20

What is iBNCT?
••

Ibaraki Boron Neutron Capture Therapy
Figures from : http://bnct.kek.jp/eng/index.html

The affected site is irradiated with anenergy-adjusted neutron beam.

21Courtesy Dr. Kumada, University of Tsukuba

Principle (cont.)

n + B(10) = Li + α + γ

22Brief History of BNCT••••KURRI is the leading facility
Reactor-based BNCT  Accelerator-based BNCT in the hospital
It is very difficult to develop new reactor-based facilities in Japan
There are several candidates in energy, target material and moderator:– Cycrotron / Linac (RFQ or RFQ+DTL): 2.5 MeV or 8 MeV or 30 MeV– Beryllium / Solid Lithium / Liquid Lithium•

There are no time to explain the detail today. Please refer to M. Yoshioka’stalk at IPAC16 : “Review of Accelerator-based Boron Neutron Capture
Therapy Machines”, THXB01, Proc. IPAC2016, p 3171

Today, I would like to talk about control related topics of Ibaraki BNCT.
Machine layout: Ion Source + RFQ + DTL + (Transfer Line ) + Be Target

23

accelerator layout
50 keV Ion Source
3 MeV RFQ

5 MeV DTLBe Target

8 MeV Beam Transport Line24

Photo•3 MeV RFQ + 5 MeV DTL

25

Control room•

2 PCs for Operation and beam tuning. Large (wall-mount) display for status

26

Control System•Requirement for the control system is “Reliable System”••

Accelerator control system is developed by Cosylab.
First beam is reported in the Cosylab newsletter– T. Nakamoto and T. Zagar– http://www.cosylab.com/db/cosylab/file/controlsheets/controlsheet_2015-marchno22.pdf•Excellent work done by the company– No major trouble in the basic control system•

I need to follow-up some software tools such as– Beam Loss monitors– Utilities for beam tuning– Software to share information : wiki, NAS, etc27

Fieldbus•Yokogawa PLC– most of the accelerator equipment are controlled by PLC.
– Ladder CPU + WideField (development environment)•Yokogawa SL1000– CT, BPM, Loss Monitor, etc– VXI-11 protocol•

EVG/EVR (mrf) for timing system

28

GUI Example•

Magnet status/direct set (Cosylab)

Status Panel (Cosylab)

29

Number of PVs, Archiver, etc

30
no disconn. channels during operation

Optics tuning (reduce beam loss)

Transmission rate after DTL  near 100%
(CT resolution)iBNCT passed the radiation facility
safety inspection in December 2016

Table of Contents

1. Introduction
2. Outline of cERL at KEK

3. Outline of iBNCT at Tokai
4. Commissioning, Tuning, Operation (for cERL and iBNCT)– Example of tuning panel– CSS as an operation manual (procedure)– Software for rapid prototype– Hardware example : VME-Master32

High Level Application : Software for beam tuning•

In case you need accelerator optics knowledge : Use SAD

KEKB Optics (Tune) Panel

PF-AR Injection bump panel

other accelerator laboratories
may use elegant, matlab/AT, etc
33Basic instruments control panel

Direct set with K or I

DirectDiffmonitor value

34

save/restore

Screen Monitor

36

X-Y plot OPI : (example : RF Phase scan)•General-purpose plot tool
– main part is written CSS python script– disadvantage : difficult to move newer version of CSS!  should be implemented
in software sequencer or other IOC

37

CSS as operation manual?
•••Operator (non-programmer, non- accelerator Physicist) can create panels.
I surprised they start to create “operator manual” using CSS.
Using “Japanese” is mandatory for them38

Table of Contents

1. Introduction
2. Outline of cERL at KEK

3. Outline of iBNCT at Tokai
4. Commissioning, Tuning, Operation– Various tuning panel– CSS as an operation manual (procedure)– Software for rapid prototype– Hardware example : VME-Master39

IPython (Jupyter) Notebook•••

Suitable for equipment control that does not need Accelerator optics.
IPython core is running on server machine, client use web browser only.
Intensively used in cERL and iBNCT

40

Rapid prototyping with IPython Notebook••

ex: RF conditioning and DTL tuner (slow) feedback control for iBNCT
Need to adjust input voltage and pulse height, repetition rate, etc.
– monitoring tuner position, RF frequency, power, .... and many other parameters.
– Some patterns have been tried at the beginning.
– “Quick and Dirty” approach required•

IPython Notebook has nice feature such as– easy to understand (script).
– can execute a part (block) or whole script••

After the parameters are fixed, the script is migrated to EPICS sequencer,
then create a CSS panel.
Notebook is used like a “requirement definition document” + “Prototype”.

41

Misc. Hardware : VME-Master•

Commercial Product of “BeeBeans Technologies” Co.
– http://www.bbtech.co.jp/•(KEK Venture Company)

SiTCP (Silicon TCP in FPGA) for communication. No operating system.
We can use VME boards like a network-attached I/O module.
Standard “Stream Device/Asyn” for communication.
Linux Server
EPICS IOC
Socket Client

CAOPI, Archiver, etc
EPICS Client

TCP
VME Chassis
I/O Board

I/O Board

I/O Board

VME-Master

Socket Server42

Outline of operation procedure•Please refer to the manual for details.

Packet Format

VME access flow
Start Address :Access Length :
MODE:
ID#:
CRC8:

VME Address
data length
VME access mode
read/write, A16/24/32, etc
for verify CMD packet and ACK packetfor verify packet
43protocol file example•read pulse counter# Example protocol file for VME-Master SiTCP# REPIC 100MHz OCTAL CALER#addr= 0x00 0x10 0x06 0x00; # board base address 0x100600
leng= 0x00 0x00 0x00 0x04; # data length 4 byte
mode
= 0x05 0x40;# modemode_r= 0x05 0x48;
id= 0x01;#
getCounter {out $addr $leng $mode$id "%<crc8a>";
in $addr $leng $mode_r $id $crc_r "%4D";}

Default CRC8 checksum uses different initial value from SiTCP format.
We defined a new checksum pseudo-converter.
44

Comments on VME-Master••

VME-Master has been used for cERL and iBNCT
Very good for small experiment because...
– We can utilize many old VME boards– No need to setup development environment . Just use a socket communication.

••

Latest version can support VME bus interrupt.
Fast enough for non-realtime application•

We plan to use the VME-Master board to replace magnet power-supply
controller for KEK-PF electron storage ring in coming summer.
– Present : Linux CPU (IOC, non-realtime) + VME Bus-Bridge– Total 10 VME chassis

45

Summary• Introduction of two accelerator control system– cERL– iBNCT• Overview of control room, field bus, other hardware• Software for accelerator commissioning, tuning, operation– EPICS Application– CSS GUI
– IPython notebook• Some hardware (example : VME-Master)• Other software/hardware (excluded from today’s talk)– wiki for internal information sharing– Status display (CATV-like)– HipChat– Beaglebone Black as ioc– Yokogawa F3-HA12 module (12 channel 16 bit ADC)
– .... and more46