Accelerator Controls at KEK< kazuro.furukawa @ kek.jp >Event System at KEK
Kazuro Furukawa, KEK
KEKB and Linac Control Groups<kazuro.furukawa@kek.jp>
Jan. 2009.

EPICS Workshop 2009, RRCAT, India

Kazuro Furukawa, KEK, Jan.2009.

1

Linac Controls

Accelerator Controls at KEK

Linac; Original Physical Structure!Multi-tier, Multi-hardware, Multi-client, …

EPICS Workshop 2009, RRCAT, India

Kazuro Furukawa, KEK, Jan.2009.

2

Linac Controls

Accelerator Controls at KEK

Linac; Original Software Architecture! Base control software structure for Multi-platform" any Unix, OS9, LynxOS (Realtime), VMS, DOS, Windows, MacOS" TCP - UDP General Communication Library" Shared-Memory, Semaphore Library" Simple Home-grown RPC (Remote Procedure Call) Library" Memory-resident Hash Database Library! Control Server software" Lower-layer servers (UDP-RPC) for control hardware" Upper-layer server (TCP-RPC) for accelerator equipment" Read-only Information on Distributed Shared Memory" Works redundantly on multiple servers! Client Applications" Established applications in C language with RPC" Many of the beam operation software in scripting language,# Tcl/Tk# SADscript/Tk
EPICS Workshop 2009, RRCAT, India

Kazuro Furukawa, KEK, Jan.2009.

3

Available Technologies

Accelerator Controls at KEK

Network with only IP/Ethernet!The policy chosen when we upgrade Linac in 1993
"Make network management simpler#Faster switches, routing, network-booting, etc.

"Avoid Hardware failure and analysis effort with old field network#Home-grown field networks need much dedicated man-power"Cost for optical Ethernet went down at around 1995
#Linac has high-power modulator stations, noise source"Nowadays many facilities have this policy with GbE#J-PARC controls basically followed this"More and more intelligent network devices#ex. Oscilloscopes with Windows/3GHz-Pentium built-in#Even EPICS IOC, MATLAB, or others can be embedded"Network components can be replaced one-by-one"Security consideration will be more and more important

EPICS Workshop 2009, RRCAT, India

Kazuro Furukawa, KEK, Jan.2009.

4

Linac Network

Accelerator Controls at KEK

Communication Network at Linac!Fiber-optic Networks (1982~)#Because of High-power modulators for rf systems"~30 Loops to connect many equipment controllers#However, the fiber-optic Technology was not mature enough yet$Often Failed and Loop Topology made it difficult to identify the trouble!All IP network (1993~)"Still all Fiber-optic#(Faster Ethernet enables shorter packets and less failures)"Inherited at J-PARC Controls as well

!Gradual Transition of Technologies"From FDDI + 10Base-FL to 1000Base-LX + 100Base-Fx!Redundancy (1996~)#At more than 40 Ethernet links"Helped continuous operation in spite of a failure at night#Redundant Transceivers, then Rapid Spanning-tree and HSRP/VRRPEPICS Workshop 2009, RRCAT, India

Kazuro Furukawa, KEK, Jan.2009.

5Linac Controller

Accelerator Controls at KEK

Equipment Controllers at Linac!1982~(1997) (1st generation)"300 microprocessor-based controllers#Linked together with home-grown fiber-optic network!1993~now (upgrade of controls)"150 PLCs (programmable logic controller)#Linked via only Fiber-optic Ethernet/IP$Control communication with servers and program development!1995~now (upgrade for KEKB)#Direct Fiber-optic Ethernet/IP to each Controllers"30 VXI for rf measurement"7 VME / 10 CAMAC for Timing (will retire soon)"20 VME for Beam monitors (will retire soon)!2007~ (upgrade for 50Hz beam switching)"13 (increasing) VME for “event” handling, timing, llrf controls, etc.
"24 Oscilloscopes with WindowsXP IOC for 100 BPMs
#10Gs/s, 50Hz acquisition, local processing with 20 calibration parameter/BPM
EPICS Workshop 2009, RRCAT, India

Kazuro Furukawa, KEK, Jan.2009.

6

EPICS at Linac

Accelerator Controls at KEK

EPICS Transition at Linac!Home-grown RPC at Linac (1990~/1993~)"Bad timing but no choice because of end of old mini-computer support!No real transition to EPICS yet at Linac"There are middleware and applications!LynxOS Transition was developed (1994~1996)"To cover both RPC and EPICS with pthread, posix#Mostly working, Failed to get funding for Hardware/Software upgrade!Gateways to EPICS in several ways
"Software-only IOC and Gateway (Clients to both RPC/CA)"Portable Channel Access Server of EPICS-3.12 (1995~)"Soft-IOC with device support to Linac RPC (2002~)!Real IOCs are increasing"PLC(rf,vacuum,magnet) and Linux, Oscilloscope(bpm) with Windows,VME(llrf and timing)"RPC servers read EPICS IOCs, EPICS gateways read RPC servers
EPICS Workshop 2009, RRCAT, India

Kazuro Furukawa, KEK, Jan.2009.

7

Accelerator Controls at KEK

Recent Improvements!PLCs with Embedded EPICS (Linux)"from Ethernet-only to Channel-Access-only!Event system introduction"Single fiber to distribute synchronized, 10ps timing, 50Hz
interrupts, data, etc!EPICS-embedded Oscilloscopes (Windows)!FPGA-based EPICS-embedded controllers (Linux)!Zlog operation log improvements"Used also at J-PARC, RIKEN, and BINP

!Reliability improvement studies"Redundant IOC, ATCA and EPICS, Test systems
EPICS Workshop 2009, RRCAT, India

Kazuro Furukawa, KEK, Jan.2009.

8

Accelerator Controls at KEK

Linac & PF & KEKB
!Simultaneous Continuous Injection to PF, KEKB-HER and KEKB-LER"50Hz Beam Pulses are Shared between 3 Rings#With very different Beam Properties, in Energy, Charge, etc.

"50Hz Beam Instrumentation (Beam Position Monitor)#Only Passive Components other than Oscilloscope (Tek-DPO7104)$Windows-embedded (3GHz Intel), EPICS-3.14.9, VC++

#One Oscilloscope reads 2-5 BPMs, 24 Oscilloscopes Installed$Synchronized 100-BPM Read-out"Introduction of Event System, EVG230-EVR230RF from MRF#10 EVR’s Installed, 1/3 of Old Timing Stations Replaced

EVG & Timing$VxWorks-5.5.1, EPICS-3.14.9, (Gave-up with RTEMS)#Event drives Low-level RF in VME, BPM Oscilloscopes over Network#Gun Parameters, Pulsed Magnets, Kickers, etc are Controlled 50Hz
#Beam Pattern Rules on Client Script, can be Downloaded every second"More Development Needed#Flavoured Beam Feedback Systems#Event System Integrity Monitor
EVR & LLRF
EPICS Workshop 2009, RRCAT, India

Kazuro Furukawa, KEK, Jan.2009.

9

Accelerator Controls at KEK

Event System!Quasi-simultaneous Injection"to KEKB-HER, KEKB-LER, and PF"2.5GeV to 8GeV, 0.1nC to 10nC!Stable stored beam current at three rings"Should improve collision tuning with Crab cavities"Should improve the quality of experimental data at PF!Fast switching of many device parameters"In 20ms / 50Hz
"Should be reliable because beam power is much different!MRF Series 230 Event Generator / Receiver"VxWorks 5.5.1, MVME5500, (Originally with RTEMS but…)"Timing precision less than 10ps (TD4 provides 3ps)
"Multi-mode fiber and single-mode fiber for longer distance

EPICS Workshop 2009, RRCAT, India

Kazuro Furukawa, KEK, Jan.2009.

10

Accelerator Controls at KEK

Event System!Many accelerator system require timing signals andaccompanying information (event)" Several facilities combined and used at KEKB and Linac# Fast Timing signals are provided with delay module TD4/TD4V$ Need timing trigger and rf clock# (Slow) Events are provided in another facility$ Combining Hardware and Software" Event/Timing Systems which distribute the both timing and event aredeveloped at Argonne/SLS/Diamond, and are employed at many
institutes (Event Generator/Receiver)# Fast Timing, rf clock, Hardware event, Software Interrupt, can be handledin one combined system with a single fiber cable# Especially in EPICS, event can be connected EPICS Event directly, sorecord/database programming is possible
RfAC or trigger

Eventgenerator

Event code

FanoutEvent receiver
Event receiver
Event receiver

Output/Input

Coax Cable or Optical fiber link
EPICS Workshop 2009, RRCAT, India

Kazuro Furukawa, KEK, Jan.2009.

11

Accelerator Controls at KEK

Event System! Distribution mechanism of timing with data/information! Developed based on experiences at several accelerator institutes# APS at Argonne (ANL/APS)# Swiss Light Source (PSI/SLS)#DIAMOND#(TRISTAN, KEKB, Linac)" New Event System (EVG/EVR-200/230)# Employment at many accelerator institutes$$

DIAMOND, SLS, BEPCII, LCLS, Shanghai, KEK-Linac, Australia, …
(SNS), (LANL), (BNL), …

# Many functionalities$$

Bit rate up to 2.5Gbps, Event rate 50-125MHz, ~10ps precision,8bit signal, 2kbyte data buffer, EPICS support

Rf

Eventgenerator
AC or trigger

Event code

FanoutEvent receiver
Event receiver
Event receiver

Output/Input

Optical fiber links

The stimulus to send an event can be:-pulse on a hardware input-software event (write to a register)-an entry in an event playback RAM
EPICS Workshop 2009, RRCAT, India

When an event code is received the receiver can:-output a pulse, of specified delay and width-trigger a software action (process an EPICS record)
Each event receiver can be programmed to respond in adifferent way to the same event code.
Kazuro Furukawa, KEK, Jan.2009.

12

Accelerator Controls at KEK

Basic synchronization outside of EVG

Control

EPICS Workshop 2009, RRCAT, India

Kazuro Furukawa, KEK, Jan.2009.

13

Accelerator Controls at KEKEvent system configuration, autumn 2008

EPICS Workshop 2009, RRCAT, India

Kazuro Furukawa, KEK, Jan.2009.

14

Accelerator Controls at KEK

Beam mode pattern generation!Every pulse (every 20ms) corresponds to a beam mode.
!10 different beam modes are defined (for KEKB e+, etc).
!One beam mode may contain many event codes.
!About 50 event codes are defined.
!Some events correspond to many functions, and others to specificdevices.
!Beam pattern buffer length (n) can be 2 to 500 (20ms x 500 = 10 seconds).
!A new pattern is loaded at the end of the previous pattern.
!Otherwise, the pattern repeats forever.
!Pattern generator software arbitrates requests from downstream rings.
!There are many pattern rules due to pulse device features andlimitations.

EPICS Workshop 2009, RRCAT, India

Kazuro Furukawa, KEK, Jan.2009.

15

Accelerator Controls at KEK

Beam mode pattern generation

Manual pattern designer
EPICS Workshop 2009, RRCAT, India

A version for current operation
Kazuro Furukawa, KEK, Jan.2009.

16

Accelerator Controls at KEK

LLRF!Timing and analog signals are essential for absolute energy,
energy spread, and dual-bunch energy equalization.
!Signals can be switched pulse-by-pulse.
!Driver klystrons (SB), energy tuner klystron (KL), andsub-harmonic bunchers (SH) are managed
by the event system.

EPICS Workshop 2009, RRCAT, India

Kazuro Furukawa, KEK, Jan.2009.

17

Accelerator Controls at KEK

BPM!DPO7104 can acquire data in 50Hz .
!Beam modes are recognized by events through network.
!Clients can monitor data of an interested beam mode.
!100 BPMs are synchronized.

EPICS Workshop 2009, RRCAT, India

Kazuro Furukawa, KEK, Jan.2009.

18

Accelerator Controls at KEKParameters!Parameters switching via Event system"RF Timing x~35
"LLRF x~11
"Gun voltages, fast delays, x4"Pulsed magnets x~12
"Injection system x~4"BPM over channel access x~100!Basically sufficient for fast beam mode switching!More parameters next year
!Integrity monitors!Improved slow beam feedback, fast feedback, etc.

EPICS Workshop 2009, RRCAT, India

Kazuro Furukawa, KEK, Jan.2009.

19

Accelerator Controls at KEK

Thank you

EPICS Workshop 2009, RRCAT, India

Kazuro Furukawa, KEK, Jan.2009.

20

Accelerator Controls at KEK

Thank you

EPICS Workshop 2009, RRCAT, India

Kazuro Furukawa, KEK, Jan.2009.

21