Adaptive Control Algorithm for Unstable Vertical Plasma Position in Tokamak

— The problem considered includes the development and modeling of an adaptive control algorithm for unstable vertical plasma positioning in a vertically elongated tokamak. At each iteration, a new PID controller is automatically synthesized for the evolving plasma model identiﬁed using the least squares method. The parameters of the feedback controller were computed based on the desired placement of the poles of the closed-loop control system in the left half-plane of the complex plane. The initial control system model utilized was a robust system synthesized using Quantitative Feedback Theory (QFT). The system was simulated on a real-time digital test bed (https://www.ipu.ru/plasma/about).


INTRODUCTION
In a vertically elongated tokamak, plasma exhibits vertical instability, necessitating the synthesis and application of feedback control systems for managing the vertical position of the plasma.This is a crucial problem in the field of plasma control in tokamaks.
The physics of vertically elongating plasma in a tokamak entails a process that significantly increases plasma pressure under the same toroidal magnetic field.However, this vertical elongation of the plasma induces its vertical instability.This is explained by the creation of a radial magnetic field B R , directed towards the central axis in the upper half-plane of the vertical cross-section of the tokamak and outward in the lower half-plane, resulting in the elongation of the plasma in the vertical direction (see Fig. 1).
As a result, the magnetic field lines of the total magnetic field B are convex towards the central axis Z of the tokamak.The Ampere force is directed upward in the upper half-plane and downward in the lower half-plane.While the current distribution and magnetic field are fully symmetric with respect to the central axis, the total Ampére force is zero.However, if a disturbance occurs, such as plasma displacement upward from the central axis, there will be a redistribution of currents and fields, resulting in a net force directed upward.This imbalance causes the plasma to move upward, as the resultant force is directed upward [1].The problem of controlling the vertical position of the plasma is addressed using the example of the T-15MD tokamak [2].To suppress vertical plasma instability, the T-15MD tokamak design incorporates the Horizontal Field Coil (HFC) (see Fig. 2) [1].The HFC is situated between the vacuum chamber and the toroidal field coil.In the design of the T-15MD tokamak, the HFC has been relocated from its position between the PF coils to the location depicted in Fig. 2.This relocation was prompted by the internal instability caused by the initial positioning of the HFC in the control system for vertical plasma position feedback [3,4].In the feedback control system, the HFC, in the event of a disturbance in the plasma column, generates magnetic field distributions such that the net Ampere force acting on the plasma becomes zero (compensated), thus stabilizing the vertical position of the plasma.

CONTROL PLANT MODEL
The plant model for the T-15MD tokamak includes a major plasma radius R 0 = 1.48 m, a minor radius a = 0.67 m, elongation k = 1.7-1.9,triangularity δ = 0.3-0.4,plasma current I p = 2 MA, pulse duration of 1 s, and toroidal magnetic field on the plasma axis up to B = 2 T [2].When designing the plasma vertical position control system in the T-15MD tokamak, the plasma model (2) (the model justification history is provided in [5]) and the linear model of HFC (3) in state space were utilized: To simplify the plant model for subsequent adaptive control problem solving, the current inverter model from [6] was adopted as the actuator, which in the first approximation is modeled by a constant gain coefficient Then the transfer function of the plant model consists of the sequential connection of transfer functions of the current inverter model K i , the HFC model Kc Tcs+1 , the plasma model Kp Tps−1 with a disturbance input d < 1 kA (see Fig. 2) [1].When designing a robust controller, all coefficients in this model have uncertainties.Here in (2), (3) U , I are the voltage and current of the HFC, K p , T p , K a , T a are the gain coefficients and time constants of the plasma model and the multi-phase thyristor rectifier model respectively, Z represents the vertical displacement of the plasma center.
The inductance L and the active resistance R of the HFC were calculated to be L = 0.0042 H, R = 0.09 ohm based on the data from JSC D.V. Efremov Institute of Electrophysical Apparatus (NIIEFA) [1].Hence, the gain coefficient and time constant for the HFC model are respectively K c = 1 R = 11.11ohm −1 and T c = L R = 46.7 ms.The nonlinear plasma physics code DINA, presented by employees of the Joint Stock Company "State Scientific Center of the Russian Federation Trinity Institute of Innovative and Thermonuclear Research" (JSC "SSC RF TRINITY") (Troitsk), as referenced in [7], was identified in [8] with estimates of the time constant T p = 20.8ms and the gain coefficient K p = 1.78 cm/kA for the linearized DINA-L model at the selected point in the parameter space of the T-15MD tokamak.
For the initial control system with the adaptation algorithm, a robust control system was utilized, synthesized using the Quantitative Feedback Theory (QFT) [9].

THE SYNTHESIS OF THE ROBUST CONTROL SYSTEM OF PLASMA VERTICAL POSITION Z USING THE QFT METHOD AND TESTING IT ON A REAL-TIME DIGITAL TEST BED
The constant magnitude and constant phase lines of the closed-loop control system in the amplitude-phase coordinates are plotted on the Nichols chart using the QFT theory (see Fig. 3a).These characteristics are referred to as QFT-boundaries and are calculated for different system parameters, thus encapsulating all the information about the uncertain model (see Fig. 3a).Using the specified boundaries and the Nichols chart (see Fig. 3a), a robust PID controller was synthesized: with parameters P = 39, I = 563, D = 1.38,N = 12 291.The control system with this controller has no steady-state error, a settling time of about 300 ms (see Fig. 3b), and suppresses external disturbances within 300 ms (see Fig. 3c).
The obtained control system was discretized using the ZOH (zero-order hold) method with a sample time of 100 μs and tested on the Speedgoat Performance real-time target machine on the SimulinkRT operating system [10][11][12].The real-time target machines, connected in a feedback loop "plant model-controller", facilitate the fastest transition from control system modeling in the MATLAB/Simulink environment to real-time testing on the digital test bed (see Fig. 4a).The digital controller and digital plant model on the test bed exchange analog signals with each other using DAC and ADC (see Fig. 4b).
The real-time system's performance is determined by the task execution time (TET).It consists of the time required for calculating the models of tokamak components and control algorithms, as well as the time for polling input-output modules.For the developed control system with the robust controller, the TET was approximately 14.6 μs.For nominal real-time system operation, the TET should not exceed the sample time in the numerical algorithm solving difference equations (in this case, 100 μs).The graphs depicting the plasma position and the voltage, current, and power changes in the HFC are shown in Figs.5a and 5b.

ADAPTIVE PLASMA CONTROL DURING A SINGLE DISCHARGE
The problem involves identifying the changing plasma model and subsequently tuning the controller within one plasma discharge, which lasts approximately 1 s.
The plasma model with two time-varying parameters K(t) and T (t) was adopted as the control plant model: connected in series with the linear model of the HFC with known constant parameters While simulating the evolution of the plasma model ( 4), the coefficients of the plasma model change linearly from the lower bound to the upper bound during the algorithm's operationcoefficient K ∈ [1.78; 7.61] cm/kA, coefficient T ∈ [0.0208; 0.093] s.Simultaneously, plasma model identification and synthesis of a new PID controller are performed.Figure 6 depicts the system with the adaptive control algorithm for vertical plasma position throughout the discharge.
The parameter identification problem for the plasma model was solved using linear regression and the method of least squares [13].For thirty consecutive measurements at discrete points with a quantization step of the input and output signals Z(k), I(k), an estimate T of the parameter T and an estimate K of the parameter K are computed.These estimates are obtained by minimizing the following functional: By taking partial derivatives with respect to the estimated parameters in the functional (5), we can derive formulas for their estimation: Transform equations ( 6), (7): Express the estimates for the coefficients K and T from ( 8) and ( 9): After measuring the signals I and Z and estimating the parameters T and K of the changing plasma model, it is necessary to synthesize the controller.To solve this problem, a PID controller was chosen, as described in [14], which automatically adjusts itself using the method of placing the characteristic polynomial roots in the left half-plane of the complex plane at each iteration of controller tuning (every 0.023 s).During the first iteration of the control system modeling, a PID controller synthesized using the QFT method was employed.
Transform the transfer function of the PID controller with a filter (10) to a common denominator and introduce the following notations: where For the PID controller, the unstable control plant model will take the form: The transfer function of the closed-loop control system is given by: Write down the characteristic equation and equate it to the polynomial with the given coefficients: By comparing the coefficients of both sides of the polynomial, we obtain four linear equations: The parameters of the PID controller are found by solving the system of linear equations (11), which can be expressed as Figure 7 illustrates the adaptive control algorithm for the unstable vertical position of the plasma, consisting of two stages: measuring and storage the input and output signals of the plasma model, i.e., I and Z over 3 ms with a 100 μs sample time, and computing the parameters of the plasma model and, based on them, the parameters of the PID controller over 0.02 s.Thus, in the discrete system, there are two steps: the overall system operation step of 100 μs and the step of identifying the parameters of the plant model and tuning the controller parameters, which is equal to 0.023 s.Therefore, within one discharge, which lasts approximately 1 second, it is possible to perform 43 iterations of controller tuning (see Fig. 7).The results of the adaptive control algorithm in the closed-loop system are presented in Fig. 8.

CONCLUSION
During each iteration, the coefficients of the plasma model T p ∈ [0.0208; 0.093] s and K p ∈ [1.78; 7.61] cm/kA were linearly changed.The least squares method was used to estimate these coefficients, and the PID controller was adjusted using the root locus method to ensure stability of the closed-loop system in the left half-plane of the complex plane.The specified coefficients of the characteristic equation a 0 = −0.0004, a 1 = 6e − 08, a 2 = −4e − 12, a 3 = 1e − 16 were chosen for tuning the controller.The adaptation algorithm performs 43 controller adjustments within one second, which is sufficient for a real control plant like the T15-MD tokamak.
Currently, robust [15], adaptive [16], and robust-adaptive [17] control systems continue to evolve [18].Robust-adaptive control systems with the application of neural networks [19] deserve the most attention and can also be applied to plasma control in tokamaks in the near future.

FUNDING
The work was supported by the Russian Science Foundation, project no.21-79-20180.

FFig. 1 .
Fig. 1.Illustration of the instability of vertically elongated plasma in the tokamak.

Fig. 2 .
Fig. 2. Block diagram of the control system for the quantity Z without automatic tuning (PID controller with constant parameters).

Fig. 3 .Fig. 4 .Fig. 5 .
Fig. 3. (a) -Open-loop frequency response and Nichols chart boundaries, (b) -transfer functions of the feedback system for different parameters of the plant model when a setpoint input is applied, (c) -system transient responses when an external disturbance is applied.

Fig. 6 .
Fig. 6.The system with an adaptive control algorithm for the vertical position of the plasma during a discharge.

Fig. 7 .
Fig. 7.The adaptive control algorithm for the unstable vertical position of the plasma.

Fig. 8 .
Fig. 8. Results of simulating the control system for the unstable vertical position of the plasma, performing 43 iterations of controller tuning under the changing plasma model.