# Presentation: 688496

## Progress of the Controlsfor BEPCII

- EPICS Seminar
- Presented by J. Zhao
- 20 August, 2002

##   	Outline

- Progress
- System design

## Part I Progress

- What we have done
- What’s the next

## What we have done

- User requirement
- Functions
- Control accuracy
- Operating mode and sequence
- Requirement of OPI
- Device protection
- Tables:
- Device infor.
- Channels
- Name convention of DB

## What we have done

- System analysis
- System design
- International review meeting
- 13-17 May, 2002 SLAC
- Comments: pay attention to
- The modeling applications
- Developing the I/O drivers for special devices
- Timing system

## What we have done

- Installed hardware platform
- A SUN Ultra10 Workstation
- A PPC750 IOC:  MVME2431
- Built EPICS environment
- EPICS base and extensions

## What we have done

- Practice and evaluation
- DB configuration
- DM2K, MEDM
- StripTool
- Gnuplot
- Developed a Linux IOC on PC
-  PCI & ISA device driver on Linux Platform
- VME I/O driver on vxWorks

## The next step

- Build complete prototype system
- Order hardware interface
- VME-CANbus, VME-CAMAC
- VME-RS-485,232, VME I/O modules
- PSC-PSI
- Order CapFast
- Order Oracle
- To solve the key technologies

## The next step

- Selecting a Lab. from which the modeling applications will be transferred
- 	It might be KEKB or others
- Creating an EPICS platform for IHEP users  to learn EPICS

## Part II System design

- Introduction
- System architecture
- System development
- Subsystems
- Interlock system
- Oracle DB
- Timing system

## 1.  Introduction

- BEPCII
-  Injector Linac
-  Two transport lines
-  Two storage rings
- System data of BEPCII
- 1700 devices (800 at BEPC)
- About 9500 channels (4,500 at BEPC)
- should be a stable and practical system

## Function of the system

- Controlling and monitoring equipments
- 	in central and local control room
- Providing accelerator commissioning tools
- 	with a friendly man-machine interface
- Timing system to synchronize the accelerator equipment
- Storing raw data and information in DB
- 	for later analyses

##  System Components

- Computer control system
- Host and front-end computers
- Network links
- Device interfaces
- Operator console
- Database service
- Timing system
- Synchronizing the accelerator equipment for beam injection, storage and collision
- Safety interlock system
- equipment protect and personnel safety system

## Number of device and channels

| Device | Num. | AI | AO | DI | DO | WF | other | Sum |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
|  Power supply | 399 | 399 | 399 | 1596 | 798 |  |  | 3192 |
|  Vacuum | 517 | 957 | 398 | 814 | 994 |  | 488 | 3651 |
|  Injection kicker | 8 | 8 | 16 | 40 | 4 | 4 |  | 72 |
|  Radio frequency | 7 | 72 | 35 | 180 | 50 | 4 |  | 341 |
|  Beam diagnostic | 459 | 864 |  | 80 | 80 | 6 |  | 1030 |
|  Injector Linac | 325 | 559 | 198 | 228 | 198 | 36 |  | 1219  |
|  Summary | 1715 | 2859 | 1046 | 2938 | 2124 | 50 | 488 | 9505 |

## The current system

**BEPC control system **
-  Transferred from SLAC New Spear system in 1987
-  Upgraded in 1994
**A VAX4500 machine with CAMAC system controls**
**PC based subsystem**

## Upgrade plan

- New equipment have to be controlled
- BEPCII has double ring, the number of device will be increased
- Super-conducting RF cavities and magnets
- New magnet power supplies  and vacuum devices
- Upgrading software structure with EPICS
- The software structure of BEPC can not support BEPCII
- Experimental Physics and Industrial Control System
- Modifying timing system
- RF frequency will be changed from 200MHz to 499.8MHz

## Design Philosophy

- Adopting distributed architecture
- Keeping the existing equipment in use
- CAMAC modules
- PCs
- Applying standard hardware interfaces
- VME, Feildbuses, PLCs etc.
- Cost-performance should be considered

## 2. System Architecture

- Distributed architecture
- Presentation layer
- Process control layer
- Device interface layer

## Presentation layer

- SUN Unix WS and PCs
- 	used as operator console
-  SUN or HP Server
- Database service
- Computing resources

## Process Control layer

- Seven subsystems:
- 	Power Supply system,
- 	RF, Vacuum, Beam diagnostic,
- 	injection PS and Linac controls
- Front-end computers (IOC)
- VME Power PC (MVME2431)
- PCs
- Real-time O.S. VxWorks
- IOC database in physical memory

## Device Interface Layer

- Provide interfaces to the hardware
- Hardware standards
- VME, CAMAC I/O modules
- Allen-Bradley PLCs
- FB remote I/O controller (made in China)
- PSC-PSI
- Field-buses serve data communication

## Data Communication

- The standard 100Mb Ethernet serves data communication in the high level
- The fieldbuses make data exchange in the low level
- ControlNet
- CANbus
- RS-485, RS232

## Hardware structure

**PCs**

**Vacuum**
**Linac**

**VME IOC**

**VME IOC **

**CAMAC**

**Ethernet**

**console**

**PS of TL**

**RF devices**
**PS of SR**
**Beam Feedback**

**VME IOC**

**GPIB**

**Waveform**

**Field bus**

## 3. System development

- Software engineering
- system development stages
- Asking for user requirement
- System design
- coding and testing
- Installation

## Development tool EPICS

**Developing BEPCII control system by EPICS****	**
- OPI (operator interface)
- UNIX WS or PCs/Linux with tools
- 	DM2K, ALH, Channel archiver,
- 	GDCT/Capfast, Knob manager
- 	SNL languige
- CA (channel access)/CDEV
- C/C++, Labview, tcl/tk,
- IOC (input/output controller)
- VME CPU board or PCs
- VxWorks
- real-time database
- device drivers

## System development plan

- Creating EPICS Prototype
- Installing hardware platform
- Software development
- Installing EPICS base and extensions
- Creating EPICS IOC database
- Developing
- operator consoles
- applications for device control
- Accelerator commissioning programs
- Transferred from KEKB or other Lab.
- Creating Oracle database service
- Upgrade of  timing system

## 4. Subsystems

- Power supply
- Vacuum
- RF control
- Linac control

## Power Supply Control

**PS on SR: **about** **350 new
- 10 VME IOCs are located in the local area
- ADC/DAC unit is inside the power supply to make settings and readings
**PS on TL: **53 old
- Connecting CAMAC system to VME IOC with VME-CAMAC interface
- Or VME I/O modules depends on the budget and man-power

## Power Supply Control 

- Monitor current, status (on/off, local/remote, normal/alarm)
- Control    on/off
- Settings
- Ramp, Directly, Synchronized, Table ramp
- Standardization
- knobs
- Interlock temperature of a magnet with its power supply

## Vacuum Control

- Two VME IOC
- Connecting intelligent device to VME IOC by RS-485 and RS-232
- Vacuum interlock system consists of
- Allen-Bradley PLC  (ControlLogix5555 and AB-1756 I/O)
- ControlNet  (SST-5136CN-VME or Ethernet)

## Vacuum Control 

- Monitor Vacuum pressure
- 		   Temperature of vacuum chamber
- 		   Current, voltage of pump
-                   Status (on/off, normal/alarm)
- Interlock vacuum pressure with section valves

## RF control

- VME IOC MVNE2431
- VME I/O modules
- Oscilloscope - GPIB- PC for collecting waveform signal
- 	EPICS PCAS on the PC
- RF interlock system including cryogenic system
- 	consists of  AB-PLC and ControlNet

## RF control

- Monitor volts, power, phase, tuning,
- 		   temperature and vacuum pressure,
- 		   status of water, gas and cryo. System information
- Control  on/off RF power source
- 		   setting volts
- 		   adjusting tuning system
- 		   adjust RF phase continuously 0-360 degree
- Interlock vacuum, Temp., Cryogenic system with RF devices

## Linac Control

- Functions
- Power supply control (Upgrade,new PS)
- Klystron&modulator control (Upgrade)
- Interlocking vacuum pressure of outside/inside windows of klystron
- 	with modulator HV
- Measuring RF phase and amplitude of output envelop
- Phase-shift control (rebuild)
- Adjusting/monitoring the stroke of electromotor of phase-shift and attenuators
- Vacuum control (Upgrade,60 new pump)

## Linac Control

- Functions
- Electron gun control  (new)
- Monitoring current, vacuum pressure
- Adjusting current and choose operation mode
- e+ target control (rebuild)
- Display beam parameters (Part task)
- Beam optics and orbit correction system
- 	(Part task)
- Measuring parameters of RF power source, power supplies, and BPM etc.
- Making feed back control for Q&corrector PS

## Linac Control

- Current system
- Front-end: PC WIN98
- Field bus: CANbus
- Device controller: FB remote I/O modules

- RS232-CANbus

- CANbus / RS422

- PC-P3 550 WIN98

- Remote I/O

- Device

##  Linac control

- VME IOC in Linac control room to replace the PCs
- FB series remote I/O controller for device control
- CAN bus serves data communication
- Oscilloscope and PC for waveform signal collection (EPICS/PCAS)

## 5. Interlock system

**Layers of the interlock system **

## 5. Interlock system 

**Functions of central interlock system**
**Making interlock between systems **
**Treating emergency accident**
**Displaying alarm summary in central control room**
**Publish alarm information to corresponding area **

## 5. Interlock system

**Flow chart of interlock system**

## 6. Database

- Two databases
- IOC real-time database to store real-time data
- Oracle database  to store a lot of information
- Information in database
**Static parameters**
- Machine parameters
- Device data
- Configuration parameters of control system
**Dynamic parameters**
- Device status
- Alarm data
- Beam parameters
**Management information**
- Project management
- Technical files
- Personal information

## 6. Database

- Name convention
- Domain name
- RI Storage ring (inner ring)
- RO Storage ring (outer ring)
- 		TL Transport line
- 		L   Injector Linac
- Sub-domain  PS, VC, RF, MK, K, B etc.
- Device name B,Q,S, Pump etc.
- Signal type AI, AO, DI, DO, CALC etc.
- Description   string

## 6. Database

- Relation between IOC database and Oracle

## 7. Timing System

- Functions
- Synchronize the equipment of the accelerator
- the electron gun, klystron, modulators and the injection kickers -- the bunch -- injected into -- bucket
- Provide reference time
- for beam diagnostic system and other system
- The timing system has to be upgraded
- RF frequency will be changed from 200MHz to 499.8MHz
- There are two revolution frequency for
- collision mode (1.264MHz)
- Synchrotron radiation mode ( 1.242MHz)
- Send people to go to KEKB learning timing system and order the hardware modules from Japan

## 8. key technologies

- key technologies
- Creating system architecture with the EPICS
- merging existing system to the EPICS
- Developing front-end applications
- Transferring modeling Applications
- Build a prototype to study the key technologies
- Making international and domestic cooperation

## 9. Man power

- The Man Power
- Total 15 persons for 4 years
- Project manager    		1
- Hardware engineer		4
- Software engineer 		10
- The computer and EPICS system manager
- EPICS database manager
- VxWorks expert with Front-end I/O
- Programmers for applications (PS,RF,Vacuum,Linac...)
- Oracle Database manager
- Network manager

## 10. CPM plan

- R&D   8 month
- Detailed design    4 month
- System development   28 month
- Installation & testing     8 month
- Total 4 years

## Summary

- Progress
- System design
- 	  	**Thank you!**