Simultaneous stabilization and control of the n = 1 and n = 2 resistive wall mode

DIII-D experiments demonstrate simultaneous stability measurements and control of resistive wall modes (RWMs) with toroidal mode numbers n = 1 and n = 2. RWMs with n > 1 are sometimes observed on DIII-D following the successful feedback stabilization of the n = 1 mode, motivating the development of multi-n control. A new model-based multi-mode feedback algorithm based on the VALEN physics code has been implemented on the DIII-D tokamak using a real-time GPU installed directly into the DIII-D plasma control system. In addition to stabilizing RWMs, the feedback seeks to control the stable plasma error field response, enabling compensation of the typically unaddressed DIII-D n = 2 error field component. Experiments recently demonstrated this algorithm’s ability to simultaneously control n = 1 and n = 2 perturbed fields for the first time in a tokamak, using reactor relevant external coils. Control was maintained for hundreds of wall-times above the n = 1 no-wall pressure limit and approaching the n = 1 and n = 2 ideal-wall limits. Furthermore, a rotating non-zero target was set for the feedback, allowing stability to be assessed by monitoring the rotating plasma response (PR) while maintaining control. This novel technique can be viewed as a closed-loop extension of active MHD spectroscopy, which has been used to validate stability models through comparisons of the PR to applied, open-loop perturbations. The closed-loop response measurements are consistent with open-loop MHD spectroscopy data over a wide range of β N approaching the n = 1 ideal-wall limit. These PR measurements were then fit to produce both VALEN and single-mode stability models. These models allowed for important plasma stability information to be determined and have been shown to agree with experimentally observed RWM growth rates.


Introduction
Two important tokamak fusion parameters, the bootstrap current fraction and the fusion power density scale favorably with increasing normalized plasma pressure, β N = βaB/I, with β the ratio of plasma to magnetic field pressure (%), a the plasma minor radius (m), B the confining field strength (T), and I the plasma current (MA). Consequently, future fusion reactors could potentially increase their fusion gain by maximizing β N . However, the elevated values of β N of interest for fusion may exceed the external kink mode pressure limit. Passive conducting structures outside the plasma, such as vessel walls, can significantly slow the evolution of the unstable kink mode from an Alfvénic time scale to one associated with the eddy current decay time scale of the wall, resulting in a resistive wall mode (RWM) [1]. While the RWM can be stabilized by large plasma rotation and a dissipation mechanism [2,3], there are concerns that future large tokamak devices will not have sufficient rotation to stabilize the RWM at the desired operating β N [4][5][6][7].
Luckily, because the growth rate of the RWM is on the order of the resistive dissipation of currents in the tokamak's conducting structures, active control is possible using magnetic feedback coils and power-supplies [8][9][10][11][12][13][14]. The area of active RWM control is now well developed in tokamaks and reversefield pinches [15][16][17][18][19][20][21][22][23][24], and recent efforts in the tokamak community have focused on refinement of n = 1 control through the use state-space algorithms to reduce the influence of noise and optimize actuator performance [25][26][27][28]. RWMs with n > 1 have been observed in DIII-D discharges following the successful feedback stabilization of the n = 1 mode, leading to collapses of the plasma rotation and β N [29,30]. These observations motivated the design and implementation of a novel feedback algorithm which is capable of simultaneously controlling n = 1 and n = 2 RWMs.
While rotationally stabalized RWMs have been observed in a wide variety of tokamak discharges the magnitude of these stabilizing effects is often difficult to predict in advance. This led to the development of a technique that allows for the real damping and rotation rate of the kinetically stabilized mode to be determined though comparison between experimental measurements and various models. This technique is known as active magnetohydrodynamic (MHD) spectroscopy and involves driving the mode with an open-loop magnetic perturbation at a variety of frequencies and noting the amplitude and phase of the driven plasma response (PR) [31,32]. Since the driven plasma field is a function of the amplitude of the applied field it is normalized to either the externally applied field at the sensors or the current in the driving magnetic coils. For the case of normalization to the external field at the sensors this response is known as the resonant field amplification (RFA) and when it is normalized to the current in the coils it is simply referred to as the PR [33].
This article highlights the development and experimental validation of an optimized, state-space RWM controller and observer that is based on the VALEN finite-element code [34,35]. This approach is similar to that followed in previous work [25,27,36,37], but introduces two new elements: (a) the controller and observer were implemented to allow for a potentially nonzero target-state, and (b) n = 1 and n = 2 plasma modes were included in the underlying VALEN calculations and propagated to the control algorithm. We will show that the new controller is able to not only suppress the n = 1 and n = 2 modes up to the n = 2 ideal-wall limit but is also able to drive a nonzero rotating PR while maintaining feedback control. Where the ideal-wall limits is the defined as the value of β N at which the mode is no longer slowed by currents induced in nearby conductors and therefore grows on an Alfvénic time scale. This limit therefore represents the highest obtainable value of β N for both rotational stabilization and active feedback control. The obtained PR measurements can then be compared to various stability models to infer the stability of the plasma at the time of feedback control as well as improve future modeling and control design.
The remainder of paper is divided into six sections. In section 2 the key DIII-D hardware used for RWM feedback is highlighted before VALEN PR simulations are discussed in section 3. The technique and key choices used to design the state-space controller and observer are then discussed in section 4 followed by multi-mode experimental results and observations in section 5 and comparisons to simulations in section 6. Finally conclusions and ideas for future work are presented in section 7.

DIII-D control hardware
DIII-D is an ideal test bed for the study of MHD phenomena and the application of three-dimensional fields to fusion relevant plasmas. These magnetic fields are measured using a variety of different pair differenced sensors [38,39]. The poloidal flux relative to a reference flux loop is measured using 43 axisymmetric loops, while the non-axisymmetric tangential and normal fields are measured using 66 Magnetic probe pairs and 86 Saddle loop pairs, respectively. Each nonaxisymmetric difference pair is composed of two sensors at the same poloidal location, but differing toroidal locations, so as to reject n = 0 pickup. The relative toroidal spacing of the pairs is such that sensitivity is maximal for a particular n-number fluctuation; eg a pair with 90 • spacing is most sensitive to n = 2.
In the multi-mode feedback work presented here 16 sensors with a variety of different n-number sensitivities were implemented. These feedback sensors sit above, below, and on the outboard midplane of the device and both the poloidal and radial field sensors span the entire range of toroidal angles and are shown in green in figure 1. A larger subset of sensors is also used to determine the magnitude and phase of the PR to an applied 3D field.
DIII-D is equipped with 3D field coils which are located both inside and outside of the vacuum vessel. The internal I-Coils, which are shown in red in figure 1, consist of two rows of six picture frame coils while the external C-Coils shown in blue are a single row of six rectangular coils. The control actuators for this work were primarily individually powered C-Coils for maximum reactor relevance, however the flexibility of the control design process would also enable a combination of I-coils and C-coils if desired. While external control coils were implemented all magnetic sensors used the presented feedback schemes were located inside the vacuum vessel due to machine limitations. The addition of I-coils into the control scheme is expected to significantly improve coupling with and control of the n = 2 mode.
Due to the significant time-dependence of the equilibriumfield coil currents during the DIII-D discharges presented here, vacuum coupling between sensors and coils, i.e. poloidal field coils, needs to be accounted for and eliminated prior to using these magnetic measurements for feedback. This vacuum field compensation calculation as well as all feedback calculations were computed in parallel using a real-time GPU installed directly in the DIII-D plasma control system (PCS). Previous related work used a standalone GPU separate from the PCS [28,36]. This new integrated approach allows for the improved coordination and signal passing between the work being performed for feedback and other related calculations being performed by other PCS processes. A second calculation of this type is the DIII-D open-loop error-field correction (EFC) algorithm [40], which was calculated on the standard PCS computers and then passed to the GPU where it is superimposed with the feedback currents calculated by the GPU. This signal passing was designed to be flexible such that any coil currents requested by the PCS can be seamlessly incorporated with the feedback control.

VALEN model equations
The RWM is a consequence of the ideal external kink mode interacting with currents induced in the nearby conducting structures. It is therefore essential to understand the dynamics and structure of these currents in order to accurately model the RWM. One of the leading models for understanding these currents is the VALEN finite element code developed by Bialek which implements the circuit formulation of the RWM proposed by Boozer [34,35]. The VALEN model represents the conducting structures surrounding the plasma as a series of resistive and inductively coupled current loops. Once the plasma mode is added to this system as an additional set of current loops it allows for the entire system to be modeled as a series of time-dependent circuit equations.
A VALEN model is constructed by defining a set of nodes which span the surface of the three dimensional conductor of interest. These nodes are connected in order to define the current carrying loops which can either be triangles or quadrilaterals. These loops are then used to represent the conductors using the thin-shell approximation which is valid for presentday tokamaks like DIII-D, which possess relatively thin walls, finite wall thickness effects are there found to have relatively little influence on the RWM stability boundaries [41,42]. The resistance of these current loops is defined by the model designer and can vary across the model in order to capture the characteristics of different materials. Once a model is constructed for the conductors it is coupled with a plasma model and is then typicality used to either determine the eigenvalues of the system or the behavior of various induced currents as a function of time.
Obtaining the equations for the VALEN model begins with the equation for the linear PR, where ρ is known as the plasma reluctance, ⃗ I p is the current in the circuit representing the plasma mode, and ⃗ Φ ext p is the flux at the plasma surface from all external sources. The plasma mode structure is represented as a two dimensional surface current near the plasma boundary. The structure of this current is based on the mode structure from an experimental equilibrium obtained using the DCON stability analysis code [43,44] which enters into the VALEN equations through terms with the 'p' subscript such as L p and M wp (equations (2) and (4)). These simulations with the DCON code seek to maximize the linear ideal-MHD perturbed energy δW in the absence of a conducting wall [44]. The structure of the least stable mode from these DCON simulations is then used in VALEN [34].
In general an instability grows when its potential energy is absorbed into a sink mechanism. In reality for the kink mode this sink is the kinetic energy of the plasma which grows once the instability passes the marginal stability point. However, there is no convenient way to capture this in the circuit formalism used for VALEN and this energy sink is instead modeled by placing a dissipative shell near the plasma boundary. The current decay time of this shell is designed to correspond to the Alfvénic growth rate of an ideal-mode, but as with the kink mode it is slowed through inductive coupling to the currents induced in the nearby conductors. This coupling between the otherwise ideal-MHD growth rate mode and the nearby conducting wall allows the influence of induced eddy-currents on the behavior of the RWM to be captured in the VALEN model.
The reluctance matrix in equation (1) takes on a special form if the various plasma modes in the model are assumed to be independent of one another, where L p is the plasma inductance and P is the permeability matrix. The assumption of independent modes is true for the case of different toroidal n-numbers but breaks down for different poloidal m-numbers. For this reason multi-mode VALEN only allows for multiple n-numbered modes to be added to the model with each n-numbered-mode having a spectrum of m-numbers. Novel VALEN simulations completed for the work highlighted here have also verified that these multiple n-numbers are not coupled through any secondary mechanisms such as currents induced in the nonaxisymmetric vacuum vessel. Therefore, mathematical calculations in the work presented here assume all plasma modes in the VALEN model to be completely independent. Assuming independent modes the permeability matrix takes a diagonal form, where s and α are the Boozer stability and torque parameters respectively. These values are the primary user inputs into a given VALEN model. The s-parameter allows for the openloop stability of the plasma to be prescribed where negative and positive values correspond to a stable and unstable plasma, respectively (assuming α = 0). The α-parameter allows for stabilizing plasma rotation to be added to the model and nonzero values allows for a stable window to appear for s > 0. This α-parameters corresponds to the ⃗ j × ⃗ B torque between the plasma and the stabilizing conducting wall with a normalization factor. This torque results in an increase in the amount of energy required to perturb the plasma and is therefore always a stabilizing effect [45].
The external flux at the plasma surface comes from currents in three conductors: the wall (w), the external control coils (c), and the dissipative shell (d). These individual fluxes can be represented in terms of the currents in these structures and their mutual inductances with the circuit representing the plasma mode, where the subscript M xy corresponds to the mutual inductance between the x and y elements with p for plasma, w for wall, and d used to indicate the dissipative shell [34]. This method can be extended to represent the fluxes at the wall and control coils. These equations can then be merged to create a matrix equations relating all of the currents and fluxes of the system, where ⃗ Φ tot p = ⃗ Φ ext p + L p ⃗ I p and is the combination of the flux from external sources and the flux driven by the circuits self inductance.
Now that the relationship between the currents and fluxes has been established an equation relating the currents, voltages, and fluxes is required to capture the dynamics of the system. Ohm's Law for the currents in the system can be written as, where V c is the voltage on the control coils and the R's are the various resistance matrices. This form seems straight forward enough, however since the circuit corresponding to ⃗ I p has zero resistance the resistance matrix in equation (6) is potentially singular and therefore should be removed from the system. Luckily this is straightforward using a combination of equations (1) and (4), Plugging equation (7) into equation (5) and taking the time derivative gives the time rate of change of the fluxes of the system. This can be combined with the Ohm's Law equation (6) to give the final form,  Note that this equation is in the form of a general L-R circuit equation where the initial inductances of the system have been modified by the plasma through the reluctance matrix. For this reason this equations is usually rewritten in the terms of an effective inductance matrix, L, where these effective inductance matrices are defined in terms of the vacuum inductances and reluctance matrix Equation (9) is the final form of the VALEN equations and this continuous time form allows for the eigenvalues of the plasma-wall system to be determined using standard eigenvalue techniques. These matrices can also be converted to the discrete time domain, which allows for the values of each loop current to be determined for a given control voltage input versus time. These equations can also be modified to allow for the current in the control coils to be specified instead of the voltage. This can be accomplished by either specifying a model for a power supply or by eliminating the equation for V c which allows the equations to be rearranged such that I c is an independent variable. While this technique for modeling the RWM involves merging ideal-MHD results from DCON with a model for the resistive wall in VALEN it has been shown to describe the rotation and β N -dependence on plasma stability in rotating DIII-D plasmas [46,47].
For calculations in either the frequency or time-domain it is often pragmatic to obtain the sensor values for comparison with experimental results. In VALEN these values can be obtained using the mutual inductance between the modeled sensors and the currents in the system, where ⃗ Φ s is a vector of the flux at each sensor. Since ⃗ I p was removed from the state vector for the total system is convenient to do the same for the sensor equations by plugging equation (7) into equation (13), where again the vacuum inductances are replaced by an effective inductance which consists of the vacuum inductances modified by the plasma reluctance, The proximity of stable plasmas to the RWM marginal stability point can be assessed in experiments by applying a rotating magnetic perturbations with non-axisymmetric coils and measuring the PR as discussed in section 3.3 [31]. It is therefore convenient to express these VALEN equations in the frequency-domain to allow a straightforward comparison between these experiments and VALEN predictions. The first step of this transformation assumes that during these rotating field experiments the current in the coils will be controlled by external power supplies and we can therefore remove any This equation is the Fourier transformed to yield the VALEN equation in the frequency-domain: where ω is the Fourier transform variable and the frequency of the applied perturbation.

Closed-loop control simulations
The VALEN model was used for simulating both open and closed-loop RWM dynamics as well as designing a modelbased controller and observer for experimental feedback applications. The decision to incorporate a model-based controller was motivated by a desire to use the external C-Coils for feedback control instead of the internal I-Coils which are typically used for EFC and RWM feedback control on DIII-D, as will be explained in later sections. The development of RWM control and EFC using external coils is considered to be an essential step for future fusion reactors which will most likely not be able to accommodate internal magnetic coils due to the high heat and neutron flux close to the plasma. However, since shortly after internal coils were installed on DIII-D it has been observed that standard PID control on the internal coils allowed for significantly higher values of stable β N than the same control on the external coils [14]. This difference in performance can also be seen in VALEN modeling and is highlighted in figures 2(a) and (b). These simulations confirm that using standard proportional control, the external coils are only able to raise the stable value of β N slightly above the open-loop marginal stability point (no-wall limit), however when internal coils are used this same control raises the stable value to near the ideal-wall limit of the system. Note that for a ideal-MHD system with both n = 1 and n = 2 the upper limit of obtainable β N is set by the n = 2 ideal wall limit due to the fact that it is lower than the n = 1 ideal wall limit [29]. This lower limit is do to the radial structures of both the n = 1 and n = 2 modes with the n = 2 mode decaying more quickly and therefore having less coupling to the stabilizing wall currents. In the example shown in figure 2 the n = 2 ideal wall limit is β N ≈ 4.
The VALEN results summarized in figure 2(c) show that through the application of optimal VALEN model-based control the external C-Coils are able to stabilize the RWM up to the ideal-wall limit of the system. In the work presented here the term optimal controller is used to describe a combination of a optimal controller with a quadratic cost function and a Kalman filter often referred to as Linear Quadratic Gaussian (LQG) control with more details presented in section 4. This means that by using optimal control the external coils can match the performance of the internal coils with proportional control and approach the theoretical limit of β N with feedback control. This model-based control technique was first demonstrated using the internal coils by Katsuro-Hopkins et al [48] in 2007 and was predicted to allow robust control up of the RWM to the ideal-wall limit. Experimental tests were carried out by Clement et al [28] in 2018, showing that the RWM could be robustly controlled using only external coils.
Since the Boozer s and α-parameters allow information about both the plasma stability and external torque to be incorporated into the model it is crucial to have a method for determining these parameters from experimental measurements [45]. This is especially important for the Boozer α-parameter which allows stabilizing kinetic effects to included in the model. For the ideal-MHD case with α = 0 (no external torque) a mapping between the experimental β N and s can be obtained through polynomial fitting to values obtained from a series of DCON stability calculations, however this has yet to be extended to the non-ideal case to produce an estimate for an appropriate α-value. The equilibrium reconstructions used in these DCON calculations are modified to omit the separatrix by truncating the flux to a value just inside the last-closed flux surface [49]. Also note that not only is α modified by the inclusion of stabilizing kinetic effects but there is also evidence that the s-value is also potentially modified [45,50]. These effects are expected to be significant for high β N beam heated discharges like those produced in the experiments highlighted here. Therefore, a method is required which is capable of taking in experimental measurements and producing reasonable and robust s and α-parameters.

PR simulations and VALEN model fitting procedure
A method for determining the Boozer parameters though leastsquares fitting between the experimental data and VALEN model parameters has been developed, which should allow stabilizing kinetic effects to be included through the acquired Boozer s and α-parameters. This method was implemented using the nonlinear least-squares matlab fitting function 'lsqnonlin()' which seeks to find values of the Boozer s and α parameters and which minimizes the sum of the squared errors, These values of f in equation (18) correspond to values produced by a user defined function which in this case correspond to the difference between the real and imaginary components of the experimental and simulated PR ( ⃗ ∆B mod ), Note that a design choice was made for this work to include both the real and imaginary components of the PR measurements as separate elements in the cost function and therefore the length of f (x) is always 2 N where N is the number of sensors used in the fit. The modeled values are obtained through open-loop VALEN simulations in the frequency-domain and correspond to the PR measured at each sensor, where u m,0 (ω) is the calculated complex current in a single C-Coil and ⃗ y mod is a vector which includes both the poloidal and radial magnetic field sensors. Examples of the calculated PR versus both the Boozer s and α-parameters and frequency can be seen in figures 3 and 4, respectively. Note that while the amplitude of the PR is not unique in the either of these spaces the addition of the phase allows the least-squares fitting method to converge to the same unique parameters regardless of the initial guess. Another key take-away from these figures is that a nonzero α-value results in the maximum value of the PR amplitude occurring at a nonzero frequency value (figure 4). Therefore, for the case of a 20 Hz applied field shown in figure 3 the peak in the PR occurs at α > 0 with this peak moving to increasing values of α as the driving frequency is increased.

Optimal controller and observer
A continuous, linear, and constant coefficient system of differential equations can always be expressed as a set of first order matrix differential equations in discrete-time as, where x ∈ R N is the state vector, u ∈ R M is the control input, the matrix A determines the open-loop unforced dynamics of the system, and the matrix B determines how the actuators influence the state. This form is known as the 'state space form' in control theory and will be the default form used in this discussion. The output of the system can be expressed as a linear combination of the state and input vectors, where y ∈ R P is the output of the system. For most control plant systems such as the VALEN model J can be excluded since the actuators can be assumed to have no direct influence on the measurements [51]. As highlighted in section 3.1 the VALEN model can be represented as a set of differential equations describing the dynamics of the R-L circuits which represent the RWM mode and surrounding conducting structures. Multiplying both sides of equation (9) by the inverse of the L matrix produces the state-space form shown in equation (21) where, These matrixes are then used along with user-defined design-matrixes to produce an optimal-control gain matrix, K r which is guaranteed to minimize the quadratic cost function, where Q 1 and Q 2 are the user-defined design matrixes. The weighting between these two gains determines the priority between sending a given state to zero and minimizing control effort. Nonzero weights are almost always necessary for the Q 2 matrix to avoid large components in the corresponding control gain, K, which will then attempt to drive the system at an nonphysically expedient rate. The Q 1 matrix is required to be positive semi-definite and the Q 2 matrix must be positive definite. In the experiments presented in this article this was accomplished by picking diagonal matrices where all the diagonal elements being positive. In general zero diagonal elements could be selected for the Q 1 matrix if there is no need to control a given state.
The resulting control gains are then used in real-time to produce feedback currents of the form ⃗ u = −K r ⃗ x, however since the value of the state-vector cannot be directly measured in experiment a method for estimating its value in real-time is required. This estimate is obtained using an optimal observer also known as a Kalman filter which like the optimal controller is optimized using a set of design matrixes which allow for the prioritization between measurements and modeled system dynamics to be set by the designer [52]. For example, in a system which is expected to have a high level of measurement noise the designer might prioritize the modeled system dynamics. In practice these weights are determine through a combination of analysis of the variance of the measurement noise from previous experiments and trial and error.
The design matrixes for both the optimal controller and Kalman filter were designed using a combination of the Bryson method [53,54], VALEN simulations with realistic current limits and time-delays, as well as dedicated control development experiments on the DIII-D device. A key assumption of the Kalman filter is that the noise in the system is pure white noise, however there are examples in tokamak feedback systems where this is not the case future work should look to improve upon this assumption. As will be discussed in section 5 sources of non-white noise such as ELMs and sawteeth will induce a response from the control system since they are not filtered out and are assumed to be unstable RWMs by the feedback.
The least stable n = 1 and n = 2 modes calculated by DCON were used to create VALEN plasma circuit models for high β N DIII-D discharge 158015. The structures of these plasma circuit models are visualized in figure 5 where the vectors indicate the direction of the current and the colorbar indicates the magnitude. This discharge experienced an unstable n = 2 RWM during active control of the n = 1 mode was therefore selected in order to create a VALEN model with both an unstable n = 1 and n = 2 mode at experimentally obtainable β N . Once the mode structure is determined from experimental equilibrium relevant Boozer parameters must then be selected.
Due to the high plasma rotation expected in the high β N feedback target discharges a nonzero value of α was selected. While it is possible to map between the highest expected experimental β N and the necessary Boozer s-values it is often considered best practice to design the controller to be as aggressive as possible without introducing deleterious effects. Following this mind-set the s-values were selected to correspond to the largest RWM growth rates measured during previous DIII-D high β N experiments (420 1/s) [28]. Note that since these Boozer parameters effect the dynamics of the model used to design the final multi-mode controller they are in fact additional feedback design parameters with two additional parameters (s, α) being introduced for each n-number in the control scheme. Therefore, these s-values were also scanned in both VALEN simulations and control development sessions and were determined to have a strong impact on feedback performance as expected.

Nonzero control design
Due to potential kinetic stabilization effects it is often difficult to determine if a given experimental discharge with active feedback control was unstable to the n = 1 or n = 2 RWM even if its measured β N was well above the calculated nowall limits. This inhibits the evaluation of feedback performance and often leaves the feedback operator asking the question, 'Did the feedback work well or was the RWM just stable for the entire discharge?' This motivated the addition of an optional nonzero reference into the feedback scheme. This reference allows for the feedback performance to be more easily quantified by calculating the difference between the requested and acquired controller and observer state. It also allows the controller to drive a nonzero PR which when compared to existing stability models allows for the open-loop stability of the plasma to be determined.
A reference state can be added to the optimal controller and observer through a small addition to the standard optimalcontrol law, where ⃗ x(k) ⇒x(k) when an observer is combined with the optimal controller to make a complete LQG system and ⃗ x r is the desired reference state. Note that while the a standard state-space controller attempts to drive the statex to zero this new nonzero controller instead attempts to drive the differencê x(k) −⃗ x r to zero and therefore attempts to enforcex = ⃗ x r . The two additional steps needed to obtain a complete nonzero LQG controller are to apply this control law to the Kalman filter equations and to determine a method for reliably obtaining a reference state ⃗ x r . In order to understand how this change in the control law effects the entire LQG system first consider the updateequation for the discrete-time Kalman filter, wherex This termx(k + 1) corresponds to the updated state as predicted by the model dynamics based on the previous Kalman filter estimatex(k). This differs slightly from ⃗ x(k) which is the true state of the system which this Kalman filter is attempting to estimate. This update can then be used to get a sensor value, y = Cx, as appears in equation (26). The Kalman filter equations are then modified to include a nonzero reference by plugging equation (25) into the equations (26) and (27), where⃗ y(k + 1) in this case means the most recent sensor measurement. As implemented in previous experimental work as well as the results presented here a simplifying assumption is made that the difference betweenx(k) andx(k) is very small, which was verified in VALEN simulations and was shown to produce robust feedback gains in a variety of experiments. This assumption produces a reduced set of Kalman filter equations, Figure 6. A block diagram illustrating the algorithm used to produce a nonzero reference state at a desired frequency and n-number. ⃗ u OL are currents applied in open-loop to a stable VALEN model which then produces ⃗ y OL which are the VALEN magnetic sensor measurements. The measurements are then used with a modified Kalman filter to produce the reference state ⃗ x r,0 , which is then scaled to the desired amplitude to produce the final reference state ⃗ xr.
A method is now required which is capable of producing a reference state that will drive the desired PR. This method will need to drive a response at a particular n-number and frequency and have an amplitude large enough to produce a plasma field well above the noise level but not so high as to overwhelm the coil power-supplies. Ideally this reference would be constructed using a VALEN model that contains only the desired n-numbers. However, during the model reduction process required for real-time model-based control the composition of the newly created reduced-states depends on the controllability and observability of that particular model. Since these values are dependent on the dynamics of the model and the implementation of the plasma reluctance matrix in the VALEN model results in all aspects of the model being modified by the plasma, it is not possible to use a reference state produced from a different VALEN model. This is a problem because in order to model the driven response from open-loop MHD spectroscopy a stable plant model is required however the controller must be designed using an unstable plant. A method is therefore desired that allows the reduced state produced by one VALEN model to be transformed into the form required by another model. This is done by leveraging ideas from the Kalman filter.
A novel algorithm was developed to produce a timedependent nonzero reference-state for a VALEN based optimal controller and observer. First a stable VALEN model is produced which includes only the plasma modes with the nnumbers the designer wishes to control at a nonzero amplitude. The internal I-Coils in the model are then used in open-loop to drive a large PR which rotates at the desired frequency and the resulting sensor values ⃗ y OL are then saved as a function of time 3 .
The controller and observer design matrices used for the final nonzero controller are then used to produce the Kalman filter gain L. This gain will produce an estimate of the state in the form needed for the final reduced-state controller. Recall that a typical Kalman filter incorporates information about the model dynamics as well as the feedback law and measurements from the sensors. The goal is to drive a filter using openloop PR calculations from VALEN however the model used to create these values had different dynamics (stable plant) than the model used to design the final controller and observer.
There was also no control law used since these currents were applied in open-loop therefore these terms in the Kalman filter update equation can be eliminated so that only the sensor drive term is retained, wherex is the same as ⃗ x r,0 and ⃗ y is the same as ⃗ y OL in figure 6. When this simplified Kalman filter is driven with the desired open-loop response measurements ⃗ y OL it results in a estimated state which is of the form needed for the final nonzero control reference ⃗ x r,0 . Since the C matrix used in this Kalman filter expects a system with an unstable n = 1 and n = 2 mode the produced nonzero reference will contain a small nonzero component of the secondary n-number, but the states corresponding to the primary mode will be much larger and therefore prioritized by the feedback. References produced using this method are verified through closed-loop simulations using the VALEN model used to design the controller and observer and are scaled linearly to produce the desired state amplitude. This algorithm is illustrated in figure 6 with the primary inputs to the algorithm being: the open-loop currents ⃗ u OL which should have the n-number and frequency of the final nonzero state and the Kalman filter design matrices which were determined through trial and error.
This method reliably produces reference states which have been shown experimentally to produce driven PR at the desired n-number and frequency with an example of driven feedback currents from a controller implementing references designed with this technique can be seen in figure 6. Note that this method for obtaining the reference-state can be expanded to include multiple n-numbers or frequencies simultaneously by simply adding the sensor measurements from two different single-mode models ⃗ y OL = ⃗ y OL,n1 +⃗ y OL,n2 .
The superposition of multiple references worked well in VALEN-based simulations but has yet to be verified in experiment. An important take-away from this discussion is that since the amplitude of the reference is based on a VALEN model with an assumed stability, in experiment the driven PR will typically not match the amplitude used to scale the state. Therefore, the amplitude is not a reasonable method for assessing the effectiveness of the controller and instead a measure of the difference between the measured Kalman-state and prescribed reference state should be used to evaluate controller performance.

Discharge formation technique
DIII-D experiments were completed to verify an optimal VALEN model-based controller and observer capable of controlling both the n = 1 and n = 2 RWM simultaneously. The primary multi-mode discharges were designed such that the minimum local safety factor (q min ) was above one and a half with high triangularity and confinement time and β N ≈ 3.7 with important plasma parameters of an example discharge shown in figure 7. In this discharge the toroidal field was ramped to drive off-axis current and the neutral beam power was steadily increased to drive β N towards the n = 1 and n = 2 ideal-wall limits. These parameters were chosen to match the DIII-D equilibrium which was used to design the model-based controller and observer. As previously mentioned this equilibrium was selected for controller design because it suffered a β N -collapse induced by a n = 2 RWM and therefore captures the physics of a n = 1 and n = 2 mode which are both near their marginal stability point.
The new discharges varied slightly from the design discharge with the primary difference being an additional offaxis neutral beam which was used during the new experimental campaign. This allowed for additional off-axis current-drive, which when coupled with the designed ramp in the toroidal magnetic field resulted in a current density profile with a peak significantly off-axis. This results in a lower normalized plasma inductance l i , which typically results in a lower no-wall limit as well as a higher ideal-wall limit [55]. Also note that while several discharges are highlighted in this work the controller and observed discussed in this work was applied robustly to dozens of high β N discharges with a variety of current and pressure profiles. The novel RWM feedback algorithm was the primary focus of the experiment for discharges 185384-185397 and 186105-186121 where a variety of data was obtained using feedback with a zero amplitude target. This algorithm was also utilized to support other experiments where it allowed for stable operation at elevated values of β N in discharges: 186523-186537, 186538-186557, 186630-186641, and 186974-186985. It was during these support experiments that some of the best data for the nonzerotarget feedback was obtained. These discharges also demonstrated the ability of this technique to get PR data during feedback control without interfering with other aspects of the experiment.

Identification of RWM instabilities
In DIII-D discharge 186109 the plasma suffered a significant β N collapse as a result of an apparent n = 1 RWM 300 ms after the calculated n = 1 ideal-wall limit was exceeded which is shown in figure 9. There was a n = 2 tearing mode (TM) present in the plasma at this point in the discharge, however it was not responsible for this β N -collapse since it never locked with a rotation frequency maintained above 10 kHz. The growth rate of this RWM was determined through a fit to an exponential and was calculated to be between 1838 and 2043 1/s. 4 This growth rate is compared to the expected RWM growth rate for the VALEN model obtained through the fitting technique highlighted in section 3 ( figure 8). This measured growth rate closely matches the growth rate expected for a marginally unstable RWM with the values of s and α obtained by least-squares fitting for discharge 186110, which has a nearly identical discharge evolution to 186109. This further improves confidence in the VALEN model and suggests that the plasma was approaching the ideal-wall limit at this time.
This marginally stable RWM was most likely triggered after the feedback failed to damp the n = 1 perturbed field induced by a large Edge Localized Mode (ELM) at 2608 ms [30,[56][57][58]. An example of the feedback successfully damping this response is highlighted in section 5.3 where it is shown that the ELM-induced spike in D α emissions is quickly followed by a fast time-scale increase in the n = 1 control current. This response is absent following the large ELM near 2608 ms and the feedback currents then attempt but fail to suppress the RWM as it exceeds 20G before the feedback is able to drive significant current. This failure is most likely due to limited response time of the power supplies, the fast growth rate of the mode due to its proximity to the ideal-wall limit, as well as the growth rate being much larger than the growth rate used to design the controller (420 1/s). As mentioned previously there is a tension between aggressively controlling the mode with a higher gain and having a dangerously large response to transient events like ELMs. While this transient event damping is an additional benefit of multi-mode control there is a risk of saturating power-supplies is the response is too aggressive.

Simultaneous n = 1 and n = 2 control
The primary experimental goal of this work was to demonstrate the simultaneous control of both the n = 1 and n = 2 RWMs for the first time in a tokamak device. In order to demonstrate the effectiveness of this control at driving the mode amplitude to zero the β N of discharge 186109 was ramped to values approaching and even exceeding the n = 1 and n = 2 no-wall limit with the result of this scan is shown in figure 9.
The n = 1 and n = 2 components of the applied currents are shown in the bottom row of figure 9 demonstrating that the optimal controller and observer were attempting to control both n-numbered fields simultaneously once the feedback was initiated at 1000 ms. Early in the discharge the ideal-MHD limits are based on calculations and kinetically modified equilibrium reconstructions using discharge 186110 , which had an evolution nearly identical to that of 186109. The limits for 186109 were then calculated near the end of the discharge where the normalized beta values varied between the two discharges and an unstable n = 1 RWM grows uncontrolled in 186109 as previously discussed. In figure 9 the dark blue and light blue points correspond to the no-wall and ideal-wall limits for each n-number, respectively.
The n = 1 no-wall limit is surpassed in both 186109 and 186110 near 1500 ms and control is robustly maintained well above this limit for over a second or hundreds of walltimes τ W . The wall-time is approximately 5 ms for the n = 1 mode according to fitting to the single-mode model discussed in section 6 and this value is expected to vary slightly depending on the n-number of the mode. Plasma rotation remained constant across the plasma cross-section even as the n = 1 no-wall limit was exceeded indicating that the feedback was successfully controlling any amplification of the DIII-D intrinsic error field. The n = 2 no-wall limit was also briefly exceeded near 2500 ms according to analysis for the discharge 186110.
Throughout the experimental campaign several discharges were taken without RWM feedback as well as with only the standard PCS controller which incorporates a proportional n = 1 controller. These discharges still used the open-loop EFC algorithm which was applied using the C-Coils as in the optimal control case with the values of these currents shown in figure 10. This view also highlights the multi-mode feedback's ability to apply an n = 2 correction to the otherwise unaddressed DIII-D n = 2 error field component. These various feedback cases allowed for the effect of both single and multi-mode feedback on the ELM-driven magnetic perturbations to be assessed. Due to the localized nature of the ELM it produces a field with a broad n-spectrum and multi-mode feedback will therefore attempt to damp both the n = 1 and n = 2 induced fields.
There are several reasons for controlling the ELM-driven field which can not only trigger RWMs and TMs but also have the potential to produce a torque capable of dragging down the plasma rotation [59,60]. Another troubling consequence of leaving this field unaddressed is there are instances where the ELM-driven field does not return to zero immediately after the spike in D α emission. This can lead to a gradual ratcheting up of the field furthering deleterious effects. An example of this field ratcheting effect can be seen for the no feedback case in figure 10(left). While the ability of feedback to damp the n = 1 ELM response has been highlighted in previous works [57,58,61]. Figure 10 shows that incorporating n = 2 into the feedback scheme allows for additional control over the ELMdriven n = 2 field. This can be seen through the comparison of two discharges: 184209 which had just n = 1 proportional control using the C-Coils (middle) and 186109 which used multimode VALEN-based optimal control (right).
Even with a simple proportional controller the effect of the feedback is clear with the n = 1 ELM component being driven to zero significantly faster than the natural decay rate of the n = 2 component. There are also several cases where the n = 2 field is unable to decay to zero before the following ELM as seen in the no feedback case as well as discharge 184209 near 1940 ms. As mentioned previously this nonzero field following a series of ELMs has been observed as a potential trigger for RWMs in the n = 1 case and it is usually considered as an additional benefit of RWM control. Numerous additional benefits over the standard PCS feedback can also be seen for the optimal multi-mode case.
The first clear benefit is through leveraging the VALEN model the optimal controller is able to respond quicker and more preciously to the ELM-driven field, with a clear n = 1 and n = 2 response in the feedback currents immediately following the beginning of the ELM-driven perturbation. The optimal controller is also able to respond and damp the ELMs using significantly less control current lowering the risk of overwhelming the coil power-supplies which are also being used to apply open-loop EFC and RWM feedback.  The effect of the addition of the n = 2 mode into the feedback scheme can be seen in 186109 where both the n = 1 and n = 2 ELM response are quickly damped away by the feedback. For the case of two approximately 7G n = 2 ELMs at 1943 ms in 184209 and 1912 ms in 186109 the field is promptly damped in approximately 1.0 ms with n = 2 feedback and decays naturally in 2.4 ms in the no feedback case in shot 184209. Even when the n = 2 ELM is twice as large such as the 14G n = 2 ELM in 186109 at 1920 ms the feedback is still able to damp the field in about half the time as the no feedback 7G case. These observations not only verify that the feedback is damping the ELM-driven field but also serves as additional validation that the optimal controller and observer was maintaining strict control of both the n = 1 and n = 2 perturbed fields while using significantly less current than the non-model-based controller. The next section will explore results which highlight the benefits of multi-mode control which has been expanded to include an additional nonzero rotating reference.

Nonzero target control
The ability to determine the amplitude and phase of the PR to an applied field allows for information about the plasma stability to be determined through comparison with various models. Historically, measurements of the PR have been obtained through open-loop applications of 3D fields known as MHDspectroscopy [31][32][33][62][63][64]. The results highlighted here constitute the first measurements of PR obtained via closedloop optimal nonzero-reference control. In a series of high β N discharges a n = 1 target rotating at 20 Hz was applied while the value of β N was gradually increased towards the ideal-wall limits ( figure 7). This allowed for the PR to be obtained for a wide range of β N /l i where higher values of β N /l i typically correspond to weaker RWM stability. The values obtained through these scans are shown in figure 11 along with values obtained using open-loop MHD spectroscopy for a similar high β N discharge (184207).
The purple closed-loop points are from a data-set using two distinct equilibria with significantly different current and pressure profiles, however despite these differences the amplitude and phase of the PR closely match those of the open-loop method. This suggests that β N /l i in this case is more important to stability than details of the current and pressure profiles. It should also be noted that most of these PR measurements were obtained for values of β N exceeding the n = 1 no-wall limit and several were exceeding the n = 2 no-wall as well as approaching both the n = 1 and n = 2 ideal-wall limits. Applying open-loop spectroscopy techniques near the marginal stability point would not be advisable without risking driving an unstable RWM to large amplitudes and likely leading to discharge termination.
This demonstrates that through the application of a closedloop rotating nonzero target it is possible to obtain PR measurements which are comparable to those obtained by openloop MHD-spectroscopy. This PR data can then be used to access the proximity of the plasma to the marginal stability point during feedback control as well as create improved models which can then be used to improve future model-based feedback algorithms.

Comparisons with simulations
Due to the low amplitudes of the currents applied by the nonzero controller it is safe to apply to the vast majority of experiments which require active RWM control or EFC. This allowed a significant PR data-set to be obtained with a broad range of PR amplitudes and frequencies. The first application of this data-set was to create a VALEN model using the method highlighted in section 3 which captures the stability of DIII-D discharge 186110 (figure 7) at 2600 ms.

VALEN fitting results
Nonzero feedback PR data was then used to validate the least-squares fitting technique which can be used to determine VALEN parameters introduced in section 3.3 with details of the fitting obtained using data from DIII-D discharge 186110 shown in figure 12. The two free parameters (s 1 , α 1 ) used in the fit resulted in a model with good overall agreement with the poloidal and radial magnetic field sensor measurements for with VALEN parameters s = −0.005 21 and α = 0.130 64 for the n = 1 mode. Note that VALEN models were studied with both n = 1 and n = 2 however only models with a single nnumber were used for these fittings since only single n-number nonzero control was implemented in the experiments. This choice was supported by verifying that adding additional nnumbers to the VALEN model did not significantly alter the quality of the fit. Also note that while the user designed cost function defined in equation (19) is designed to match the real and imaginary PR the resulting fit also reproduces the measured amplitude reasonably well.
The right side of figure 12 shows the values of the fitting quality defined in equation (18) obtained during the least-squares scan. The fitter is able to quickly find a minimum in this value which corresponds to the red arrow in figure 12 and does so regardless of the user selected initial conditions. Note that the range of s-values explored by the scan is designed to include s > 0 in order to allow situations where a plasma which is unstable in ideal-MHD is stabilized by kinetic effects incorporated through the α-parameter. While this obtained svalue is approaching marginal stability for α = 0 the obtained α-value provides significant kinetic stabilization. To attempt to understand this α-value the open-loop growth rate versus s is shown in figure 8 for both α = 0 and the value obtained by the fitting. With an α = 0.130 64 the plasma is stable in open-loop up to s ≈ 0.18 with the ideal-wall limit near s ≈ 0.25, according to the second derivative of the zero rotation curve. Note that the ideal-wall limit is not expected to be affected by kinetic stabilization since the RWM turns back into the ideal-kink above this value.
This result of a plasma which is robustly stable for values of β N approaching the n = 1 ideal-wall limit with a large stabilizing kinetic contribution is consistent with experimental results. This discharge operated safely near the ideal-wall limit with feedback control before disrupting due to a locked tearingmode at 2740 ms. Another confirmation of this obtained model is highlighted in figure 8 where the measured growth rate of an RWM observed in discharge 186109 (purple line), which has a nearly identical β N evolution to 186110, is compared to the predicted RWM growth rate predicted by VALEN with excellent agreement between the two. Similarly, high quality and robust fits were found for numerous additional high β N discharges from the nonzero control data-set.
As mentioned in section 3, there is no straight forward method for obtaining an experimental α-value, however a value for s can be acquired through a calculation in the VALEN code. This value is produces an estimate for s of the form, where δW surf is the perturbed energy of the VALEN plasma surface current, Φ B = (¸s urf B 2 da¸s urf da) 1/2 is the Boozer flux, and I B =¸s urf κBda ΦB is the Boozer current where κ is the surface current potential on the plasma surface in units of Amps. This calculated s-value was then used in a single n-number least-squares fit where only α was allowed to vary in order to determine if it was possible to match the experimental data with this theoretical s-value. This procedure was able to produce a close fit of the data with s = 0.069 86 and α = 0.161 60, where note that s > 0 as expected since the β N is above the nowall limit at this point in the discharge. The quality of this fit was then compared to to the previously obtained fit with two free parameters using the reduced chi-squared, where y fit are the fitted sensor values from the VALEN model, y exp are the experimental measurements, n is the number of measurements, m is the number of free parameters, and σ y is the error on the experimental measurements. This fitting parameter was determined to be approximately the same for both the single and double free-parameter case. This indicates that the method which sets the s-value according to its ideal-MHD value fits the data just as well as a method which is able to freely chose both the s and α-value. This has the potential to allow for a kinetic stabilizing modification to ideal-MHD to be determined using experimental data and should be explored for a range of discharges with different levels of neutral beam torque and therefore different levels of expected kinetic stabilization.

Closed-loop frequency response
The closed-loop response data-set was then leveraged to assess the effect of different target-state frequencies on the driven PR with the results highlighted in figure 13 and compared to the PR values calculated using VALEN model obtained through least squares fitting. The negative frequency values shown were obtained from DIII-D discharge 186982 and the positive values were obtained in 186983. Note that due to the details of these discharges the normalized beta value varied significantly during these scans. Therefore the results are compared to VALEN models with two different sets of input parameters designed to match the stability at two distinct values of β N /l i . These parameters were chosen to fit the measurements obtained at the highest β N /l i value of 186983 (red in figure 13) and the lowest β N /l i value (blue) which was identical for both discharges. The values of the colorbar shown in figure 13 are designed to correspond to the colors of the least-suqares fit where R{γ} is the growth rate of the mode, I{γ} = ω RWM is the natural rotation rate of the RWM, M sc is a coupling factor for the given coil and sensor geometry which is determined through least-squares fitting to the data, and ω ext is the frequency of the externally applied perturbation. Once the M sc and τ W parameters are determined this equation is rearranged to solve for γ(ω ext , τ W , RFA, M sc ), which allows for RFA data acquired at a single applied reference frequency to determine the real growth and rotation rate as a function of time.
The real and imaginary components of c s and γ as well as the wall-time τ w in equation (36) were fit using data from several discharges where the frequency of the applied reference was varied. Once these values were obtained, equation (36) was reorganized so that the real and imaginary components of γ could be determined given the real and imaginary component of the PR as well as the applied frequency. These results are highlighted for the 20 Hz PR data obtained during discharge 186110 in figure 14 where the wall-time for n = 1 perturbations applied using the C-Coils was determined to be τ W ≈ 4.72 ms.
The growth rates calculated using the single-mode model approach marginal stability as the β N and PR values increase as expected [65][66][67]. These growth rates are compared to the calculated Haney-Freidberg (HF) growth rate, which is defined as: γ HF ≡ − δWnw δWiw and corresponds to an ideal-MHD approximation of the RWM growth rate [68]. These growth rates are calculated using the DCON ideal-MHD code and closely match the fitted growth rates until the calculated n = 1 no-wall limit is exceeded at which point the HF growth rates become large and positive as expected. Above the no-wall limit these two growth rates differ significantly due to the high levels of kinetic stabilization which is not accounted for by the ideal HF growth rate.

n = 2 nonzero control experiments
Since the work discussed here constitutes the first experimental verification of multi n-number control extra attention was paid to the verification of n = 2 nonzero control. A n = 2 Figure 14. The growth and rotation rate of the n = 1 RWM calculated using a least-squares fit to the single-mode model in equation to plasma response data obtained during nonzero optimal control. This fitted growth rate is compared with the ideal-MHD Haney-Freidberg (HF) growth rate calculated using the DCON code. These growth rates match closely until the no-wall limit is exceeded at which point the HF growth rate becomes large and positive. This discrepancy is most likely do to kinetic stabilizing effects which are not accounted for in ideal-MHD. target rotating at 20 Hz was applied to discharge 186985. The currents in the six external C-Coils are shown in figure 15 along with the corresponding 20 Hz waveform shown in red. They have excellent agreement except for slight deviations when the feedback responds to the ELM-driven n = 1 and n = 2 perturbation as discussed in section 5.3. The plasma field resulting from this externally applied field is measured using poloidal field sensors and indicates a nonzero n = 2 response well above the level of the noise with an amplitude of about 1G and a normalized phase corresponding to a pure driven n = 2 mode. This indicates the feedback's ability to apply a nonzero target while simultaneously driving all other perturbations to zero.
As was conducted for the n = 1 mode, a nonzero rotating n = 2 reference was applied as β N /l i was gradually increased. Similarly to the n = 1 case the amplitude and phase of the observed n = 2 PR agree well between the open and closedloop cases. The low PR (approximately 1G kA −1 ) for this wide range of β N /l i is most likely due to the less than ideal coupling between the n = 2 mode and the C-Coil. This is confirmed by VALEN simulations which indicate that the same applied currents would generate significantly higher PR using the I-Coils due to their more optimal geometry as well as their closer Figure 15. Fit of the applied n = 2 current showing that the feedback was successfully applying an n = 2 field during nonzero control. Note that the spiky features on the C-Coil currents corresponds to the multi-mode controller damping the magnetic perturbations driven by the ELMs.
proximity to the plasma. This prediction will be explored in future nonzero-reference control experiments.
The PR measurements were then used to determine VALEN input parameters needed to reproduce the experimental measurements. This fit determined that s = −0.020 29, α = 0.079 28 produces a VALEN model that closely fits both the radial and poloidal field measurements. These fitted values also indicate that the n = 2 was below its no-wall limit with additional stabilization from a large kinetic contribution. This confirms that not only is the optimal controller and observer capable of controlling the n = 2 response at nonzero amplitude but also verifies that this technique is also a promising tool for assessing the stability of various n-numbered plasma modes.

Conclusions
A novel optimal model-based controller and observer has been developed for DIII-D which is capable of simultaneously controlling both the n = 1 and n = 2 RWM for the first time in a tokamak device. This was motivated by previous experimental observation where during active control of the n = 1 mode the n = 2 grew uncontrolled resulting in either a severe β Ncollapse or a complete disruption of the plasma. This algorithm has been verified through its application to high β N tokamak plasmas. During these experiments the multi-mode feedback allowed for values of β N above to calculated n = 1 no-wall limit to be sustained for hundreds of wall-times and the n = 1 and n = 2 ideal-limits to be approached and even exceeded briefly in some cases. During operation above the no-wall limit the plasma rotation was sustained across the plasma minor radius indicating that the feedback algorithm was successfully being applied in coordination with open-loop EFC and possibly improving upon the n = 1 component as well as the previously unaddressed n = 2 intrinsic error-field.
These experiments were conducted using feedback applied using only the external C-coils on the DIII-D device. The use of external coils for EFC and feedback control will be necessary in future fusion devices which will not be able to accommodate internal coils due to the large heat and neutron fluxes. The use of external coils was enabled by the choice of optimal model-based feedback control which VALEN simulations have shown allow feedback on the external coils to suppress the RWM up to the ideal-wall limit. The ability of the feedback to control the perturbed n = 1 and n = 2 fields was further validated through analysis of the ELM-driven magnetic perturbations. The optimal feedback was shown to quickly damp both the n = 1 and n = 2 fields which if left unaddressed can lead to numerous deleterious effects. The optimal controller was also able to suppress the n = 1 field with significantly less control-current than the standard PID algorithm currently used by the DIII-D PCS.
The optimal controller and observer was also designed to allow for a nonzero target-state to be prescribed, enabling the stability to be assessed by driving a rotating PR while while driving all other perturbations to zero amplitude. This nonzero state control also allows for the performance of the controller to be accurately quantified through a comparison of the realtime Kalman state and the desired reference state. This novel technique can be viewed as a closed-loop extension of active MHD spectroscopy, which has been used to validate stability models through comparisons of the PR to applied, openloop perturbations. The closed-loop response measurements are consistent with open-loop MHD spectroscopy data for both n = 1 and n = 2 over a range of β N approaching the n = 2 idealwall limit, demonstrating the potential of this technique as a useful tool for measuring stability while maintaining control even as the marginal stability point is approached.
These n = 1 PR measurements obtained using the nonzero controller were then fit to both the VALEN model and the single-mode RWM model presented in equation (36). Fitting to the single-mode model allows the wall-time as well as the natural growth and rotation rate of the RWM to be determined. This growth rate agrees with the ideal-MHD HF growth rate before the no-wall limit is surpassed, at which point the ideal growth rate becomes large and positive. This difference between the ideal and fitted growth rates after the no-wall limit is exceeded can be attributed to kinetic stabilizing effects which are not accounted for in ideal-MHD.
The fitting of experimental PR data to the VALEN model then allowed for the VALEN input parameters needed to capture key stability physics to be determined. The VALEN model produced by these parameters can then be used to simulate the stability of the RWM at the point in the discharge where the PR measurements were taken. These VALEN models were shown to not only reproduce the values of sensor measurements during nonzero control experiments but also accurately predict the growth rate of a marginally unstable RWM which was observed in high β N a discharge 186109.
While the work presented here demonstrates the control of the n = 2 mode near its ideal-wall limit it is still unclear why the n = 2 mode is sometimes stable without feedback control above its calculated marginal stability point. Future work should endeavor to understand this discrepancy which may be due to the structure of the n = 2 mode which is more significantly modified by kinetic effects than the n = 1 mode according to preliminary kinetic DCON simulations. Future work should also attempt to improve the robustness of multimode feedback control through a systematic study of why the feedback power-supplies fail to follow the calculated commands during some ELM events. This loss of control has been shown to drive unstable RWMs in high β N discharges on DIII-D.