1 Introduction

The Heavy Ion Research Facility in Lanzhou (HIRFL) is composed of an injector, a beam transport line, a main ring (CSRm), an experiment ring (CSRe), and a radioactive ion beam line (RIBLL2) [1,2,3]. The superconducting electron cyclotron resonance ion source with advanced design in Lanzhou (SECRAL) was built to produce beams with highly charged ions for HIRFL. The SECRAL control system must manage several subsystems and devices with a high degree of accuracy to satisfy a variety of physical requirements. In the present paper, we discuss the development of a new control system framework to upgrade the data acquisition and control characteristics for SECRAL. Details of the system architecture, main test results, and resulting improved performance are described in the following sections.

2 Hardware architecture

To achieve highly accurate functionality for the complex SECRAL system, various devices and subsystems must be effectively controlled, which include, among others, the superconducting magnet power supplies, high-voltage (HV) power supplies, the vacuum system, beam monitoring system, water temperature and pressure system, and liquid helium circulation system. Figure 1 shows the HV platform installations of SECRAL. Regarding the special working requirements of SECRAL, a variety of approaches are necessary to control and monitor the overall SECRAL system, such as those for controlling the HV signal and weak micro-ampere-level signal current [4,5,6,7]. The devices employed in the HV platform always operate in an extremely harsh environment, where they can be exposed to a maximal voltage of 60 kV. In addition, all the devices and controllers operate in strong electromagnetic fields, high radioactive radiation levels, and high-voltage surroundings [8, 9]. These conditions can damage the controllers, drivers, or programmable logic controllers (PLCs), and thus, measures were taken to solve these problems [10, 11]. The controllers were designed with a transient voltage suppressor diode in the input port. Such voltage suppressors can prevent damage to the controllers from electrical surges [12]. Ferrite beads were fixed around the signal wires to suppress signal spikes arriving at the controllers, which further protect the controllers from electrical surge damage. In addition, communication between the controllers and the network switch was implemented through an optical-to-electrical signal converter. The cables between the converters were single-mode glass fibers.

Fig. 1
figure 1

(Color online) General view of the high-voltage platform installations

Owing to the continuous development of device technology, some of the devices employed in the SECRAL system, particularly HV power supplies and electric motors, have gradually become obsolete and fail to meet the continuing needs of beam debugging. To improve the performance of SECRAL, existing analog power supplies were discarded and were replaced by four digital power supplies installed at the HV platform. These supplies included two stove power supplies, a bias voltage–power supply, and a sputter power supply. In the SECRAL control system, all devices are controlled by network switches connected to an industrial PC, as illustrated in Fig. 2. Serial servers are employed to control the devices using RS232 or RS485 interfaces. Thus, related devices can be directly connected to the RS232 or RS485 ports, including, among other devices, the superconducting magnet power supplies, helium depth indicator module, helium temperature meter module, helium weight measurement module, a Keithley 6485 m (Keithley Instruments, USA) to measure beam current, and a secondary meter to measure water temperature and pressure [13]. In addition, other aspects of the system, such as a Pfeiffer TPG256 (Pfeiffer Vacuum, GER) six-port vacuum gauge, HV power supply, compressor, device-side high voltage, and a microwave unit, are controlled via an Ethernet system.

Fig. 2
figure 2

Schematic of the control system

Prior to deploying the upgraded control system at SECRAL, laboratory tests were conducted to confirm the proper functionality of the system. Status information for all devices and control signals were obtained and processed via the control software running on the central computer via the HIRFL intranet.

3 Software architecture design

At present, control system software development platforms in the field of accelerator control include mainly EPICS, LabVIEW, and SCADA. Each platform has its own characteristic deficiencies [14, 15]. The software architecture employed for the SECRAL control system conforms to the model-view-controller (MVC) design pattern. The MVC design pattern separates views and models by establishing a notification protocol. A view object must ensure that its appearance reflects the state of the model. The model object is independent of both the view and controller objects, so it is possible to have multiple views of the same model. All associated views can be subscribed to a model, and are notified by the model regarding its state changes. When a user interacts with a graphical user interface (GUI) based on the MVC design pattern, all events executed by the user are captured by a controller object. The controller then decides whether the executed event is related to changes in the state of a model or to changes in the state of a view.

The control software consists of four layers: the user interface (UI), system interaction (SI), problem domain (PD), and data management (DM), as illustrated in Fig. 3. The UI corresponds to the remote monitoring process, SI to the server control process, PD to the field control process, and DM to the database. These layers reflect the hierarchical structure of the system. Therefore, the control architecture is capable of extending system functions and upgrading devices. The SI plays a key role in the control system. The TCP/IP protocol was adopted for data transmission, and embedded SQL was used for data processing and storage. The network controls and monitors the parameters of the ion source to achieve a proper particle beam. The network is interconnected with the different types of control hardware and provides a means of communicating with any other system outside the SECRAL project scope [16].

Fig. 3
figure 3

Module interface and interface constraints

The SI receives and interprets commands for managing the field devices. The field devices send the real-time status of SECRAL to the data servers, which also receive the experimental data acquired by the data acquisition subsystems. These data are processed and stored in the experimental database. The system also provides data services for users, such as experimental data archiving, data processing, and experimental data query, according to specific commands. The control software was designed as independent classes, including, but not limited to, the communication modules (TCP/IP or RS232/485), decoding module, display modules, and data storage modules. Therefore, new devices can be added easily. To add a new device, it is necessary to instantiate the classes and call the device functions.

The data-gathering module is employed to obtain data from the controllers. The module performs three functions: setting the appropriate parameters, sending the appropriate commands, and gathering data. The data processing module immediately decodes the data according to the data parameter format. The data-gathering module subsequently obtains the parameter information, and data are sent to the display module for presentation. The data storage module periodically samples and saves the device data to the disk of the data server according to an established protocol.

When SECRAL is operational, a malfunction in any of the devices can cause the unstable operation of the entire system, reduce the intensity of particle beams, or damage system devices. To ensure the steady operation of SECRAL, interlock protection and alarm hardware were added to the control system. When an error occurs, the module sends the Interlock Protection signal to the relevant controllers to avoid damage. At the same time, the alarm notifies the person on duty.

4 Database design

A distributed experimental data processing subsystem was developed for experimental data archiving, processing, and retrieving [17]. Data stored in the data server consist of historical experimental data and real-time data of the device status. Experimental data stored in the database, labeled with a SECRAL shot number, include engineering status (temperature, vacuum, and parameters of power supplies), status of subsystems, configuration of the devices, experimental results, status of the field devices, information about the alarms and faults, real-time feedback values of the key parameters, and status of the control software system. The system provides the data processing tools and a data analysis program for analysis, statistics, and visualization. The system also provides data processing and conversion tools along with data query capabilities and a backup program.

The control commands, timing sequences, and logic control orders of the SECRAL system are closely related to the operational conditions of the field devices. The interlock and protection system is responsible for protecting operators and devices from damage with interlocking status data.

5 Results and discussion

Figure 4 shows the interface of the control software that had been running normally in the central control room. The control system of SECRAL was tested with an aluminum chamber at double frequency heating (24 + 18 GHz). Parameters of the tested beam are shown in Table 1. The emphasis was put on optimization of very-high-charge-state U33+ ion beams. The typical input RF powers during optimization to the U33+ beams were 1.8 kW of 24 GHz and 0.1 kW of 18 GHz. SECRAL had reached a substantially low background vacuum of 1.0 × 10−6 mbar at injection side, 2.7 × 10−7 mbar at extraction side, and 1.8 × 10−7 mbar at beam side. The experimental result is shown in Fig. 5. The voltage was 15 kV.

Fig. 4
figure 4

(Color online) Remote control software interface

Table 1 Parameters of the test ion beam
Fig. 5
figure 5

(Color online) U33+ ion beam results

In practice, the control system was able to control and monitor all beam parameters. First, the reconstruction guaranteed the safe and stable operation of the control system. Second, the efficient control system reduced the frequency of maintenance for SECRAL. Finally, the upgraded system was supplied with stable ion beams for physics experiments for a period greater than 3000 h. Specifically, the hardest U33+ ion beam had been extracted successfully, as shown in Fig. 5. The reliability results for a Sn26+ ion beam are shown in Fig. 6. Experimental results demonstrated that the upgraded SECRAL control system met the requirements of all control functions and made the experimental operations more automatic and visual.

Fig. 6
figure 6

(Color online) Reliability results of the Sn26+ ion beam

6 Conclusion

In this paper, the latest performance, development, and operational statuses of the SECRAL control system were presented. The latest results and the reliable long-term operation of the accelerator demonstrated that SECRAL performance has been continually improved with the development of the optimized control system.

Much Visual C++ development experience has been accumulated while developing the superconducting ion source control system, the proton source control system, and the negative hydrogen ion source control software at the Institute of Modern Physics of the Chinese Academy of Sciences. In future efforts to further improve efficiency for the subsequent Visual C++ development of the control system and the robustness of the control software, it is necessary that the driver programs of the accelerator field devices be modularized, packed into dynamic libraries (DLL) or static libraries (LIB), and then called directly.