Real-time software for the COMPASS tokamak plasma control

The COMPASS tokamak has started its operation recently in Prague and to meet the necessary operation parameters its real-time system, for data processing and control, must be designed for both flexibility and performance, allowing the easy integration of code from several developers and to guarantee the desired time cycle. For this purpose an Advanced Telecommunications Computing Architecture based real-time system has been deployed with a solution built on a multi-core x86 processor. It makes use of two software components: the BaseLib2 and the MARTe (Multithreaded Application Real-Time executor) real-time frameworks. The BaseLib2 framework is a generic real-time library with optimized objects for the implementation of real-time algorithms. This allowed to build a library of modules that process the acquired data and execute control algorithms. MARTe executes these modules in kernel space Real-Time Application Interface allowing to attain the required cycle time and a jitter of less than 1.5 μs. MARTe configuration and data storage are accomplished through a Java hardware client that connects to the FireSignal control and data acquisition software. This article details the implementation of the real-time system for the COMPASS tokamak, in particular the organization of the control code, the design and implementation of the communications with the actuators and how MARTe integrates with the FireSignal software.