Using LQR controller for vertical position control on EAST

Vertical position control is essential for stabilizing plasma with elongated configurations. The EAST tokamak is equipped with a set of in-vessel control (IC) coils dedicated to this purpose. Currently, a PD controller with fixed parameters is used for the vertical position control of EAST plasma. However, the response of the plasma in the vertical position changes with changes in plasma configuration, which can result in different control parameter requirements. It is essential to develop a model-based fast-tuning control algorithm for ensuring stability in the vertical position under different configurations. In this study, a model-based vertical position controller tuning method based on a linear quadratic regulator algorithm (LQR) is proposed. Compared with contemporary PD controllers, the proposed model-based LQR controller can enable adjusting controller parameters based on the response of the system, achieving stable control under different vertical position responses. In the EAST experiment, the model-based LQR controller achieved stable control under a shot with a continuously increasing growth rate and reached a maximum controllable vertical displacement growth rate of 968 s−1. The robustness of the system was also demonstrated in a free drift experiment. The new vertical displacement control method can be adapted to different system states and plasma configurations and improve the controllability and safety of future devices.


Introduction
Elongated configurations can increase the cross-section of the tokamak plasma, which can enable improved performance at lower costs.However, elongated configurations can also lead to instability of plasma vertical displacement, which can cause Original content from this work may be used under the terms of the Creative Commons Attribution 4.0 licence.Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.
the plasma to touch the first wall and disrupt [1]; this generates considerable heat and electromagnetic force, which can damage the device.Thus, feedback control of the vertical position of plasma is essential to ensure stable vertical displacement.
Many algorithms have been proposed to control the vertical position of plasma.Scibile et al optimized the vertical position controller considering various aspects, which enhanced the controllability for large vertical displacement [2][3][4][5][6][7].In the DIII-D, an anti-windup compensator was implemented for a particular nominal plasma vertical controller, which ensured global vertical stabilization of the plasma in actuator saturation for all reference commands [8].In the SST1, the RZIP model is applied to the vertical position control, and the control system is evaluated for the effects of various disturbances [9].In the TCV, a structured H-infinity design extending classical H-infinity to fixed-structure control systems was applied to obtain an optimized controller using all available coils for position control [10].Recently, KSTAR developed improved fast vertical position control, which uses relative flux for the Z-position estimate and the loop voltage difference from a pair of up-down symmetric loops; it provided a sensitive and less noisy vertical estimate, and the control loop for the inner coil was decoupled from the slow motion controlled by the superconducting coils using a highpass filter in the control software [11].
In the EAST, the vertical displacement growth rate is >100 s −1 for typical discharge configurations, which means that the typical active control response time scale should be <10 ms.However, the PF coils protruding from the vacuum vessel are shielded by a passive structure (including the vacuum vessel and passive plates).Hence, a set of in-vessel coils connected in reverse series are used for vertical displacement control.A Bangbang and PD composite controller was designed in the EAST for the voltage mode based on the time optimal control theory and the RZIP rigid plasma response model with faster and enhanced controllability [12].An ITERlike VS algorithm was deployed and tested by Albanese et al.This deployment could successfully decouple the plasma vertical stabilization system from the plasma shape and position controller [13].They also proposed that an adaptive algorithm capable of adjusting controller parameters gains according to the experiment should be envisaged.
During the operation of the device, the magnetic configurations are constantly evolving, which also changes the response of the fast vertical position, and the controller with parameters set based on simply tuning with experiments or simulations may not achieve the expected performance or even be unstable for all configurations.Because the response is continuously changing during the discharge and it is impossible to tune the controller with simulation for the response at every time slice of the discharge, a model-based controller design algorithm is necessary to solve this problem.The linear quadratic regulator (LQR) is a model-based optimized control algorithm that is based on the minimum principle.Its objective is to design a state feedback controller to minimize the linear quadratic of the states (which are usually control errors) and outputs of the system.Therefore, when we give the vertical displacement response model, the LQR control algorithm can calculate the optimal control parameters under a given weight of the states and outputs.Belyakov et al designed a configuration control system for ITER using the LQR method and achieved satisfactory simulation results [14].We also designed and deployed a model-based LQR controller for the fast vertical control system.For better dynamical performance, strong adaptability, and robustness, vertical position control, the control parameters should be adjusted based on the scenario.Before the experiment, we calculated control parameters based on the LQR tuning algorithm according to a series of equilibriums given by the scenario and preset them into the EAST discharge settings.
This study presents a model-based LQR controller, with the results obtained at EAST during the 2022 experiment.In section 2, the modeling of the fast vertical position of EAST is introduced, and the benchmark results are shown.The modelbased LQR vertical stabilization control system is established in section 3. The results of the experiments are presented in section 4. Finally, conclusions are presented in section 5.

Vertical position response model of EAST
EAST is the first superconductive tokamak with a two-layer vessel and a poloidal D-shape cross-section.Its major and minor radius are 1.8 m and 0.4 m, respectively, as shown in figure 1. EAST has 14 PF coils with 12 separate power supplies, of which PF7/PF9 are connected in series, and PF8/PF10 are connected in series.The control time scale for vertical instability was faster than that for shape control; therefore, the EAST uses two coils IC1 and IC2 inside the vacuum vessel, and these are connected in anti-series for vertical instability control.Passive conductors, including the double-layer vacuum vessel structure, influence plasma position and poloidal shape and are considered in the model and divided into 63 parts when modeling.
The design of the vertical position controller is based on control-oriented linear models, which can describe the dynamics of plasma vertical position.Among previous research [15][16][17], the RZIp model is well suited for model-based vertical position control.In previous studies of EAST, the 2D model equivalent to the 3D model can provide results that are sufficiently close to the reference, in terms of response [18].The growth rate calculated by TokSys has a good agreement with TSC results, which were validated by the experiment results.It is an effective way for the prediction of free drift and the investigation of in-vessel control (IC) control capacity [19].The RZIp model is an axisymmetric model in which plasma mass is not taken into account, and the plasma response is described as a rigid movement in vertical and horizontal degrees.The currents in the coils and passive conductors can vary and are coupled with each other and plasma.When ignoring the mass of the plasma, the horizontal and vertical forces on the plasma inevitably balance, as shown in equation ( 1): where I p , j p is toroidal plasma current and current density obtained from a reference Grad-Shafranov equilibrium, r p is the major radius of each plasma element, and G r ps , G z ps are the green function of horizon and vertical magnetic field related to coils or passive conductors.I s is the current on coils or passive conductors.F tor is the hoop force including the tire tube force, R represents the displacement in the horizontal direction of the plasma, a is the minor radius, κ is the elongation, β p is the poloidal beta and l i is the internal inductance.I s can be determined by circuit equations, as shown in equation ( 2): where M ss is the mutual inductances matrix, R s is the resistances matrix of coils and passive conductors, and V s is the terminal voltage of each circuit.ψ sp is the flux due to the plasma movement enclosed by each circuit, which can be given as: .
where Z represents the displacement in the vertical direction of the plasma.

∂R and
∂ψ sp ∂Z in equation ( 3) can be computed with the reference equilibrium.dR dIs and dZ dIs can be given by the force balance of plasma, which is: Combining equations ( 2) and ( 3), the vertical position response model can be written in state space form as: where x is the state of the model, u is the input of the model and y is the output of the model.The vertical position response model has 77 state variables (including coil currents, passive conductor currents, and the plasma current), 13 input (coils voltage), and one output (vertical position).Since the output y is completely determined by the state x, there is (no direct linear relationship) between the input u and the output y, so there is no feedthrough term (D matrix).

EAST vertical position control system
In the EAST, due to vertical instability and the growth rate γ which is usually >100 s −1 , the response time for vertical position control should be <10 ms.Due to the shielding effect of passive conductors, the response time of PF coils cannot meet the requirements of fast control.Therefore, EAST divides the vertical position control system into fast and slow vertical position control systems.Slow control is implemented using PF coils, which are mainly responsible for maintaining the accurate position in the vertical direction and have a slow response time.Fast control is controlled by IC coils, which are mainly responsible for stabilizing the plasma in the vertical direction.This study discusses vertical position fast control.
In EAST, to ensure control cycle, the magnetic diagnostic signal is multiplied by the E-matrix to calculate the vertical position z of the plasma [13].The difference between z and the target position is the error E z , and it is multiplied by a PD controller to obtain the IC voltage command.The control logic of EAST fast vertical position is shown in figure 2.
To reduce the impact of noise from magnetic measurement, the controller adopted a filtered PD controller, which was expressed using equation ( 6): where G p and G d are the PD gains, τ p is the time constant for the low-pass pre-filtering, and τ d is the time constant for the derivative action.In the EAST discharge, the τ p and τ d are both 10 −4 s, which have negligible effects on the design of the vertical position controller.Usually, the control parameters G p and G d are adjusted through a large number of experiments, which not only takes up a lot of experimental opportunities, but also relies on the experience of the control operators.More importantly, when configuration changes, the vertical displacement response (especially γ) also changes.
The control parameters set based on previous experiments may  not meet the control requirements and may cause the control system to lose stability.Figure 3 describes a vertical displacement event using a PD controller based on experimental tuning.During discharge, the vertical growth rate γ increased by continuously increasing the elongation κ.When the growth rate was <200 s −1 , the vertical position control system was in a stable state, no oscillations were seen on the vertical displacement and fast control power supplies, as shown in figures 3(a) and (b).However, when the growth rate was ⩾200 s −1 , the control system gradually started oscillating with a small amplitude.As the growth rate continued to increase, the oscillation amplitude of the control system increased, and eventually, the vertical displacement of the plasma was out of control and plasma disruption occurred at 1.59 s.At this time, γ was 289.22 s −1 .

LQR vertical position controller design
As shown in figure 3, the response of the vertical displacement system changes greatly during the discharge process, which leads to the control parameters which was set previously cannot meet the control requirements, so it is necessary to adjust the control parameters according to the changed response.The LQR algorithm [20] is a linear state feedback control algorithm, which can quickly obtain the optimal control parameters according to the response model.However, due to the high order of the RZIP model, the direct use of the LQR control algorithm will get a high-order state feedback controller, and most of the high-order states are difficult to observe.Therefore, it is necessary to simplify the response model and select the state quantity.Then, based on the reduced-order model, the LQR control algorithm was used to adjust the controller parameters for meeting the control requirements for the given vertical displacement responses.The control logic of EAST LQR algorithm is shown in figure 4.

Model simplification by balanced truncation
As described in section 2.1, the RZIP model was a high-order model with 77 orders.Although it is already in a linear form, controller design is challenging.Therefore, the RZIP model was simplified to a lower-order model.The balanced truncation method [21] was used for model reduction, and it effectively maintained the controllability and observability of the model.Model simplification based on observability and controllability can retain the model response to the maximum extent and meet the requirements of controller design.
Vertical position control model obtained from RZIp model: The controllability and observability gramian matrices of the model are defined as follows: Their singular values respectively represent the controllability and observability of the model.The gramian matrix should be the solution of the following Lyapunov equation: The Hankel singular value (HSV) of the system is defined as: There existed a similarity transform x = T −1 x, such that the controllability gramian and observability gramian matrices of the transformation system were equal, and there was a diagonal matrix comprising HSV [22]: This process is called the internal balance of the system, and the singular values of the transformed gramian matrix represent the observability and controllability of the system.By retaining the parts with larger singular values, the controllability and observability of the model can be ensured, while ignoring the weak controllability and observability of the model.Specifically, the vertical displacement model is unstable, so the unstable part should be removed before balanced truncation.The balanced truncated outputs are k and P 2 , combined with the previously removed unstable pole P 1 to form the simplified vertical displacement response model.In the simplified model, k represents the gain of the system, P 1 is the positive pole, representing the growth rate of the system, and P 2 is the negative pole, representing the comprehensive delay of the system.
As shown in figure 5, the singular value σ 1 is much larger than others, so the balanced truncation preserves 1 order.We formulate an evaluation function: S represents the percentage of the truncated part of the total controllability and observability of the model, which S = 0.141 in the case that figure 5 shown (#114504 at 3.0 s).
For the convenience of representation, the simplified model was transformed into a transfer function form: The input of the transfer function is the requested voltage of the IC power supply and the output of the transfer function is the vertical position of plasma.Figure 6 shows the evolution of response parameters.

LQR vertical stabilization control system
The reduced-order model, which is a two-order system, was obtained with input-output behavior similar to that of the original system.The control goal to be achieved was to design a control system that can adjust the controller parameters according to the model parameters and ensure the stability and dynamic performance of the system.This subsection provides an LQR controller to solve this problem.According to equation ( 13), the selected feedback state variables were z and ż, and then, equation of state of the system was obtained: where U IC is the request voltage of IC power supply.We designed state feedback control to stabilize the system: The design of K was a tradeoff between the transient response and the control effort.The optimal control approach to this design tradeoff was to define the performance index (cost functional): where x represents the states of the system, and u represent the inputs of the system.When the model state was selected as x and ẋ (z and ż in this study), the PID control parameters G p and G d were K 1 and K 2 , respectively, which enabled convenient deployment of our control system.Q and R were the weight matrices, which were performance index or cost function associated with the states, and control input, which determined the input and output behavior of the system.The vertical stabilization control system was only responsible for stabilizing the vertical displacement of the plasma; therefore, it was not necessary to evaluate the final state of the system.Constructing Hamilton-Jacobi-Bellman function: Using Hamiltonian Function to Express Cost Function According to the minimum principle, when equation ( 18) reached the minimum value: Matrix P was calculated by solving the Riccati equation: In general, the numerical solution of the Riccati Equation was calculated using the iterative method.Figure 7 shows the controller parameters calculated using the LQR method based on shot 114504, the cycle of controller parameter updates is 100 ms.
The Q and R are free parameters for the optimization and correspond to a generalization of controller gains.According to the signal error and simulation results, we selected the weight matrix: This weight matrix is used in all subsequent experiments without adjustment.This also shows that for a device, after selecting a suitable weight matrix, the weights Q and R can meet the requirements of vertical position stability control under different states of the plasma, and do not need to adjust the weight.

Experimental results
In this section, we present the results obtained during the test of the LQR vertical position control system on EAST during the 2022 experimental campaign.
The first presented experiment aims to prove that the control algorithm can achieve plasma stability when the system response changes, and the range of growth rate that can be stabilized was expanded considerably.During shot #115333, By reducing the current of PF13,14 and maintaining R and Ip, a discharge with an increased elongation ratio and an increased growth rate is achieved.The LQR control was started at 1.5 s.During this discharge, the system was stably controlled till 5.3 s, and a controllable growth rate of 968 s −1  was achieved, which was the maximum controllable growth rate implemented on EAST, and it was 93.6% higher than the maximum range in history.For comparison, as shown in shot #114453, the same target configuration and shape control parameters were adopted, with only different vertical displacement control, and its maximum vertical displacement growth rate was only 400 s −1 .As shown in figure 8, the control system remained stable during the enable time of the LQR controller.
In all experiments, γ was estimated by TokSys.The setting paraments of shot #115895 were the same as in shot #115333, the result is shown in figure 9.The only difference was that the vertical control was 'opened' at t = 5.0 s, to obtain an open loop response corresponding to the VDE.As shown in figure 10, by fitting the curve after 5.0 s, we determined the estimated growth rate γ = 824 s −1 .At this time, γ was estimated to be 848.25 s −1 ; this was carried out using TokSys.Comparing the results of TokSys [23], we observe that the estimation results of TokSys growth rates can be used as a reference.The LQR vertical position control system maintained the stability of the plasma when  the vertical position response model changed considerably, which greatly improved the operating range of the experimenter.When γ increased to nearly 1000 s −1 , the vertical displacement response time constant decreased to 1 ms.However, the delay caused by the characteristics of EAST power supply and the communication delay time of PCS were 0.4 ms and 0.3 ms, resulting in excessive phase difference between the fast control voltage and the vertical displacement, and the vertical displacement control was not stabilized.In any case, under the existing environment of EAST, the LQR control system considerably improved the control performance.
The free drift and recovery test for LQR controller was also presented in the experiment, and it could maintain controller performance during large VDE.In shot #115327, the LQR control was started at 1.5 s, and the elongation continuously increased till 4.5 s.The estimation for the growth rate γ at t = 4.5 s carried out with the TokSys resulted in γ = 621 s −1 .In the discharge, the vertical displacement controller was briefly turned off for a specified period of time, the vertical displacement increases freely, and after a certain period of time, the controller was turned on to test the controllable vertical displacement ∆Z max .Changes in vertical position were related to the change rate of vertical displacement when the controller was closed; therefore, we focused on the value of ∆Z max instead of the length of time the controller was closed.As shown in figure 11, ∆Z = 0.031 m was generated at t = 5.6 s, where the minor radius of the plasma was a = 0.394 m (∆Z max /a = 0.0787).According to previous research [18], achievement of comparable robustness of vertical control may require similar maximum controllable vertical displacement capability >5% of the minor radius.This proved that the system can maintain stability despite high growth rates.

Conclusions
In this study, a plasma vertical position control on EAST using LQR controller was proposed and successfully tested in the experiment.The control algorithm was based on the LQR optimal control theory.Under different plasma states, the controller parameters were adjusted according to the response model to achieve the vertical stability of the plasma.The experimental results showed that when the growth rate γ increased to over 900 s −1 , the control system maintained the stability of the plasma, which considerably increased the operating space of EAST experimental personnel, and it is of great significance for the future fusion reactors like CFETR.The next optimization plan is to estimate the system parameters in real time through system identification or deep learning methods to complete the deployment of real-time adaptive LQR control.

Figure 1 .
Figure 1.Schematic diagram of EAST conductor and plasma positions.

Figure 2 .
Figure 2. Control logic of EAST fast vertical position.

Figure 3 .
Figure 3. Evolution of EAST control parameters using PD controller: (a) centroid of plasma vertical displacement, (b) voltage of fast control supply, (c) current of fast control coil, (d) vertical growth rate, (e) elongation.

Figure 4 .
Figure 4. Control logic of EAST LQR algorithm, the arrow on block LQR controller indicates adjusting its control parameters through the model-based LQR controller synthesis.

Figure 5 .
Figure 5. Hankel singular values of the system before balanced truncation.

Figure 6 .
Figure 6.The evolution of response parameters: (a) the gain of system k, (b) positive pole P 1 , (c) negative pole P 2 , (d) evaluation function S.

Figure 7 .
Figure 7. Temporal evolution of LQR control parameters (a) vertical growth rate, (b) controller parameter G d , (c) controller parameter Gp.

Figure 8 .
Figure 8.Comparison of plasma control parameter evolution between using PD controller (line in red #114453) and LQR controller (line in blue #115333); (a) centroid of plasma vertical displacement, (b) voltage of fast control supply, (c) current of fast control coil, (d) vertical growth rate.

Figure 9 .
Figure 9. VDE free drift experiment: (a) centroid of plasma vertical displacement, (b) voltage of IC supply, (c) current of IC coils, (d) vertical growth rate calculated by TokSys.

Figure 11 .
Figure 11.Free drift experience using LQR control algorithm: (a) centroid of plasma vertical displacement, (b) voltage of IC supply, (c) current of IC coils, (d) vertical growth rate.