1 Introduction
Experimental Physics and Industrial Control System (EPICS) is a package of software tools, which has been widely used to provide a software infrastructure for building distributed control systems for scientific facilities such as synchrotron light sources [1,2], particle therapy systems [3], astronomical telescopes [4] etc. It has also been adopted in the project of International Thermonuclear Experimental Reactor, a huge fusion reactor based on tokomak [5,6].
The TMSR (Thorium Molten Salt Reactor) project is to develop a next generation research reactor in China. As an experimental facility, TMSR has about 6000 process variables (PVs), which integrates many kinds of devices and subsystems. As an open and flexible architecture with long life circle, TMSR shall be designed for changes in devices and experiment purposes. To meet these requirements, EPICS was chosen to build the TMSR control system for its good community and commercial supports, and long time existence (over 10 years). In this paper, we introduce the EPICS software development for full networking radiation monitoring and access control system of TMSR. In Sec.2, we discuss the system structure of the radiation protection and access control system. In Secs. 3 and 4, we show the system design and software components. And Sec.5 summarizes what we achieved.
2 The system structure
The TMSR radiation protection and access control system is comprised of 7 kinds of Fuji Electric instruments (Fig.1), including gamma environmental radiation monitor; contamination monitors for hand, foot and body; area radiation monitor, and access control gate [7-9]. An independent virtual local area network (VLAN) extending beyond the public network was essential to provide reliable physical and logical interconnection between servers and plant systems monitors. It also implements interfaces between servers and monitoring terminals.
-201602/1001-8042-27-02-015/alternativeImage/1001-8042-27-02-015-F001.jpg)
The EPICS input and output controller (IOC) server, serving as the dynamic database, provides asynchronous communication to monitors with the Fuji Electric private TCP/IP protocol. Channel access (CA) protocol is implemented to interconnect operator interface (OPI) clients and IOC servers, for command dispatching, state monitoring, data flow and configuration functions. The CA protocol is used to realize historical data preservation and alarm management through data archiving and alarm servers to communicate with IOC. Control system studio (CSS) is a user interface framework for EPICS systems based on Eclipse plug-ins. Among the features are synoptic/archive/trend/alarm displays. The “Data Browser” is used for strip-chart, “BOY” (Best Opi Yet) is used for OPI,“BEAST”(Best Ever Alarm System)is used for alarm display and management, and the “BEAUTY” (Best Ever Archive Toolset, Yet) is used for data retrieving[10].
3 Software design for radiation monitoring system
EPICS software packages can basically complete most radiation monitoring functions, including IOC dynamic database, alarm or historical archive server/client, human-machines interface, etc.[11].
3.1 Human machine interfaces
Human machine interfaces (HMIs), running in operator terminal, allow the user to monitor radiation environment around the campus, especially the control areas, and provide data browsing and analyzing utilities, configuration tools and alarm display. The HMI organized in a hierarchical manner, providing user with intuitive and convenient interfaces (Fig.2) [12,13].
-201602/1001-8042-27-02-015/alternativeImage/1001-8042-27-02-015-F002.jpg)
3.2. Alarm handling
The alarm annunciation (presentation to the operator) is to alert the operator to deviations from normal radiation condition [14,15].The key factors in operator response effectiveness are the speed and accuracy with which the operator can identify the alarms and its exact area or device. As shown in Fig.3, the radiation alarms are organized in a hierarchical manner. The operator can browse the alarm configuration detectors and their related alarm status in a tree-like structure, which by default includes all configured alarms, whether active or not.
-201602/1001-8042-27-02-015/alternativeImage/1001-8042-27-02-015-F003.jpg)
3.3. Data Archiving
The “BEAUTY” archive system is part of the CSS. “Archive Engine” takes PV data samples from front-end EPICS IOC servers via the Channel Access (CA) protocol, and places them in data storage. A 32 TB of Redundant Arrays of Independent Disks (RAID 0) server-attached storage was prepared to store 1200 PVs for five years, where the sampling frequency is less than 10 Hz. As described here, the storage is an oracle relational database, and all the PVs are separated into 9 groups according to their device type.
The CSS Data Browser is a generic client program for looking at archived data. As shown in Fig.4, changes of environmental gamma dose rate in 5 days were restored. The highest gamma dose rate appeared at 14:00 on August 5, 2015, a sunny day, and dose rates were significantly smaller on rainy or cloudy days.
-201602/1001-8042-27-02-015/alternativeImage/1001-8042-27-02-015-F004.jpg)
3.4. Monitor driver
The EPICS drivers of radiation monitor and access gate device were developed based on the SLS program logic controller (PLC) driver [16]. However, the data exchanging processes, according to Fuji private communication protocol, were quite different from Siemens PLC’s protocol especially after the TCP connection has established (Fig. 5). The radiation monitor driver plays the opposite roles of server and client. Most of the time, it acts as server to listen to connection requests from the monitors. After establishing the connection, the driver will receive data every 10 seconds and make a certainty answer. The received information will be assigned to different PVs, triggering changes in PV value. For parameter setting, the driver will actively request to connect to monitors as a client. When connection is established, the parameters from different PVs will be packaged to send to the monitor. If the IOC driver does not receive new data from the monitor in 16 seconds, it closes the connection and tries to reopen it.
-201602/1001-8042-27-02-015/alternativeImage/1001-8042-27-02-015-F005.jpg)
4 Software developed for access system
Using EPICS to access control system, software components that need to be developed include the private TCP protocol EPICS driver, access authorization and personal radiation limitation, database interface etc. [17,18].
4.1. Access control database
Oracle database maintains two tables (Fig.6). The first one manages personal information, including personal ID, password, department and entry or exit status, and is used for authentication and displaying staff information. The second one manages access information, including time, ID, information (entry, exit, gate fault, or pollution information), gamma dose, beta dose, and neutron dose, which will be used for the calculation of the cumulative radiation effective dose, or tracing back to historical information.
-201602/1001-8042-27-02-015/alternativeImage/1001-8042-27-02-015-F006.jpg)
4.2. Access gate driver
As shown in Fig.7, the EPICS IOC driver for the access gate was implied as a server. The driver binds a socket to listen to the TCP/IP connection requests from the access gates. After establishing the connection, a communication threads will be created to complete four kinds of data exchange, such as request of authentication, complete confirm of the gate action, pollution notification, unit except ion notification, and network connection check. The driver will trigger a consultation to the staff information database, using open source C library to connect the Oracle database (OCILIB), when it receiving an authentication requests. Otherwise, it will send a fixed format “certainty answer” to the device.
-201602/1001-8042-27-02-015/alternativeImage/1001-8042-27-02-015-F007.jpg)
4.3. Access procedure realization
As shown in Fig.8, the access procedure is realized as follow:
-201602/1001-8042-27-02-015/alternativeImage/1001-8042-27-02-015-F008.jpg)
(1) The staff inserts a personal dosimeter into a reader, and inputs the account and password on a touch panel.
(2) A data frame acceptance will trigger the IOC driver to extract information into a set of PVs (frame type, ID, password, gate number, dosimeter number, and personal dosimeter reading), and to query the database to judge the correctness of the identity and password. Before exiting, the staff should pass an additional detection of “hand and foot contamination” or “surface contamination”.
(3) The EPICS IOC driver will inform the gate to open according to a positive result.
(4) The gate sends a confirmation frame to inform the EPICS IOC server of the termination of its action.
(5)The EPICS IOC driver will trigger the database to record this process whenever it receives the confirm information.
(6) The relevant PVs are shown on a management HMI (Fig.9), displaying the gate status, number of people in the area, and the access records. The HMI also provides an interface to set the parameter of the personal dosimeter.
-201602/1001-8042-27-02-015/alternativeImage/1001-8042-27-02-015-F009.jpg)
(7) Another HMI provides JDBC interface to calculate the cumulative radiation effective dose, or trace back to historical access information.
(8) The HMI also provides JDBC interface to modify personal information, ID, password, department etc.
We added database interface package “org.csstudio.platform.utility.rdb” to ”org.csstudio.opibuilder” plug-in of CSS, to realize script trigger mechanism for database access.
5 Conclusion
The advantages of EPICS are open source code, clearly definition of interfaces between software components or hierarchical structure. In this paper, we developed detector driver and access control device driver, implement private protocol data transmission and access control with special process modes. EPICS up-layer software components were used for data parsing, PV transmission, data archiving, and alarm handling.
CMMI standard was used in the following processes: requirements analysis, systematic design, implementation and FAT (Factory Accept Test), SAT (Site Accept Test), etc. These processes comply with IEC standard safety category C requirement [19]. It has been proven that third-party test is helpful for improving quality and reliability of the software, and uncovering the bugs escaping the tests by us.
Improvements are needed to make the system more convenient and reliable. Such as configuring redundant IOCs and using fingerprint or worker identity card for authentication.
Development and application of the new BPM system data processing program at Hefei light source
. Nucl Sci Tech, 2012, 23: 261-266.DOI: 10.13538/j.1001-8042/nst.23.261-266EPICS data archiver at SSRF beamlines
. Nucl Sci Tech, 2014, 25: 020103. DOI: 10.13538/j.1001-8042/nst.25.020103Dose rate distribution of photoneutrons in an ID beamline of SSRF: simulations and measurements
. Nucl Sci Tech, 2014, 25: 050101. DOI: 10.13538/j.1001-8042/nst.25.050101A new beam loss detector for low-energy proton and heavy-ion accelerators
. Nucl Instrum Meth A, 2014, 767: 262-266. DOI: 10.1016/j.nima.2014.08.035Keck telescope control system upgrade project status
.Design and application of an EPICS compatible slow plant system controller in J-TEXT tokamak
. Nucl Eng Desig Fusion, 2014, 89: 604-607. DOI: 10.1016/j.fusengdes.2014.04.052Local government radiation surveillance system for nuclear power plant at post-Fukushima era in China
. Nucl Sci Tech, 2014, 25: S010603. DOI: 10.13538/j.1001-8042/nst.25.S010603Analysis of the influence on environmental radiation level of Qinshan area caused by Fukushima nuclear accident
. Nucl Sci Tech, 2014, 25: S010606. DOI: 10.13538/j.1001-8042/nst.25.S010606Atmospheric radionuclides from Fukushima Dai-ichi nuclear accident detected in Lanzhou, China
. Nucl Sci Tech, 2015, 26: 040604. DOI: 10.13538/j.1001-8042/nst.26.040604S7plc EPICS driver documentation
.The design of RMT-based IOC redundancy at RCPI experimental platform in TMSR
. Nucl Sci Tech, 2014, 25: 060402. DOI: 10.13538/j.1001-8042/nst.25.06040218.