Performing Real-Time Reconstruction of the Magnetic Flux in FTU Feedback Control Loop using Multi-Polar Current Moments Expansion in RTAI Virtual Machine
One of important issue of plasma equilibrium and control in a tokamak machine is to determine and reconstruct magnetic flux surface by using plasma boundary condition and this could be done by mean of multi-polar moment method to satisfy required condition by looking at the homogeneous solution of Grad-Shafranov equation. In other works [1,2] has been showed the relationships between the multi-polar moment and magnetic flux. The equilibrium code ODIN is based on the algorithm described  and is used to reconstruct magnetic flux and equilibrium in FTU experiment. The probe measurements of FTU experiment are based on the technique of axial symmetric equilibrium magnetic field measurements, in which full voltage loops and saddle coils measure the poloidal flux function and poloidal pick-up coils measure the normal derivative over a contour enclosing the plasma cross section. These two data are the Cauchy conditions to solve magneto-static problem and finding the plasma boundary starting from the measurement contour. One method of solving the equilibrium problem is to use multi-polar expansion in toroidal geometry. All the magnetic probes in FTU are located outside the circular cross-section vacuum vessel, on a toroidal contour of vessel with major radius m and minor radius m. The method by which the toroidal multi-polar expansion of the magnetic configuration is derived is a Fourier analysis that determines separately, order by order, the multi-polar moments. In the case of vacuum magnetic configurations, that are obtained without plasma by feeding currents into the various poloidal windings of FTU, both the flux measurements alone as well as the field measurements alone will provide two independent boundary conditions to the well posed Dirichlet or Neumann magneto-static problems for the domain inside the measurement contour. In both these cases, one can solve independently the two problems by using the appropriate measured boundary condition and then one can calculate the other boundary condition.
The FTU feedback control system hardware architecture consists of a Pentium II @ 433MHz VME board, fast AD/DA converters and timing module to catch the hardware gates.
The entire code running on the real time machine is written in C/C++ language, and it has been carefully optimized so that the related and complex algorithm takes less than 100 ?s to perform both real-time control calculations (position and plasma current control) and gas density regulation. During its control cycle loop, the Position and Plasma Current Feedback System (PPCFS) acquires , besides the plasma current measurement, the poloidal flux and the angular components of the magnetic field and, using a model based on  algorithm, calculates both the horizontal and vertical positions of the plasma. For next step, it calculates the errors with respect to the preprogrammed references and finally applies four PID (Proportional-Integral-Derivative) controllers  in order to give the appropriate current references to the power supply feeding all the coils.
The aim of our work is to develop a real-time code based on ODIN algorithm, that bring together reconstruction of magnetic flux and equilibrium fit. First of all we will present brief explanation of ODIN, algorithm and uses of the code. Then we will show the proposed real time algorithm and we will look more closely at real time processing. In this research we will discuss a few aspects about magnetic flux reconstruction base on experimental data. (for more information about the main idea, structure and complete explanation of the multi-polar current moments method regarding to reconstruction of magnetic flux see  and ).
Regarding to real-time reconstruction of magnetic flux we succeed to run the ODIN implementation using the magnetic probe data that comes from the feedback simulator  first on a Virtual Machine with characteristics of Pentium II 1.5 GHz using a Linux Kernel ver.2.4.18 patched with RTAI ver. 24.1.10 and then on a real VME CPU board equipped with an Intel Core 2 CPU 64 bit T7400 2.16 GHz with 2Gb RAM using Linux Kernel ver.2.6.23 x86_64 bit patched with RTAI ver.3.6.2. Finally, we will present some preliminary result of flux reconstruction in FTU real-time ODIN.
 Alladio, F., Crisanti, F., Nuclear Fusion 26, (1986) 1143.
 B. J. Braams, Plasma Physics and Controlled Fusion 33, (1991) 715.
 F. Crisanti and M. Santinelli, “Active Plasma Position and Current Feedback in the FTU Tokamak Machine,” Proc. 16th Symp. Fusion Engineering, London, UK, Sept. 3~7, 1990.
 F. Crisanti, C. Neri, and M. Santinelli, “FTU Plasma Position and Current Feedback,” presented at 16th Symp. Fusion Engineering, London, United Kingdom, Sept. 3~7, 1990.
 L. Boncagni, C. Centioli, L. Fiasca, F. Iannone, M. Panella, V. Vitale, and L. Zaccarian. Introducing a virtualization technology for the FTU plasma control system. Proc. of the 18th topical meeting on the technology of fusion energy (TOFE), San Francisco, USA, Sept. 2008.