Page 10 - Positional stability of field-reversed-configurations in the presence of resistive walls
P. 10

Simulink Model
writes
Q2D
10
growth rate by picking the right rigid volume - no matter what plasma equilibrium has been used for linearization. In order for the linear model to be useful, one thus needs some mechanism to select the appropriate rigid volume. Unfor- tunately, the data indicates that such a mechanism must depend on the plasma equilibrium: the rigid volume that best reproduces the observed non-linear growth rate for a perturbation at 1 ms is different from the rigid volume that produces the best match for a perturbation at 2 ms or 3 ms. For example, it seems that if the plasma is perturbed after 1 ms or 2 ms, the non-linear behavior is reasonably well de- scribed by linear displacement of a cylinder volume with ra- dius 46 cm and half-length 92 cm. However, if the plasma is perturbed after 3 ms, it’s non-linear behavior corresponds more to linear displacement of a spheroid with the same dimensions. In this case, predictions from both rigid vol- umes are within error bars, but it is concerning that (espe- cially for larger volumes) the relative magnitudes for differ- ent initial times differ from the non-linear result. The ob- served growth times for perturbations at 1 ms, 2 ms, and 3 ms are approximately 10 μs apart, but the linear predic- tions are much slower at 3 ms than at 1 ms or 2 ms, and for some rigid volumes the growth time at 2 ms is actu- ally faster than at 1 ms. In other simulations using a differ- ent initial plasma state (not plotted), the linear predictions for different perturbation times are quite similar, while the non-linear growth rates differ significantly. If we assume that the rigidity assumption is nevertheless valid, this im- plies that the volume depends on the equilibrium, and thus may change over time.
Adding to the complications, there seems to be no pro- cedure to derive the correct rigid volume from the plasma equilibrium without a-priori knowledge of the expected non-linear growth rates. As far as the determination of growth rates is concerned, the suitability of the linear model is thus limited to the computation of upper and lower bounds by trying a variety of rigid volumes. When consid- ered from this point of view, the conclusion that one would draw from the results show in figure 10 is that growth rate of plasma is somewhere between 50 μs (smaller rigid volumes would cut into the separatrix) and 600 μs (even larger rigid volumes don’t significantly change this value).
However, a linear model has potential uses beyond the prediction of uncontrolled growth rates. In particular, lin- ear models are useful for the design of feedback control sys- tems because they allow fast evaluation of the performance of a prospective control algorithm. Therefore, we shall now consider the suitability of the linear model for the design of a feedback control system for the axial separatrix loca- tion. From here on, we will assume that we have identi- fied the appropriate rigid volume by running a non-linear simulation and matching the fitted growth rate. The perti- nent question is: is the assumption of rigid displacement correct, so that the right choice of rigid volume will give cor- rect predictions for stability under active control, or is the instability not rigid? In the latter case, we would expect that even with a rigid volume that gives the correct uncontrolled growth rate, we still would not get correct predictions un-
Feedback Algorithm
Supervisor Process (Python)
Generate
Synthetic Measurements
Plasma Model
Initial Plant State
implementation (in Fortran)
implementation (in Simulink)
code generation (automatic)
compilation
instantiation (CFFI)
reads
compilation
writes
Final Plant State
C Code
Update Actuator State
Executable
calls
reads
Step Controller Model
Step Plant Model
Shared Object
Controller State
FIG. 11. Closed-loop simulations are run by using a supervisor process to combine a feedback algorithm developed in Simulink with a full-fledged plasma simulation code.
der feedback control (because the agreement of the uncon- trolled growth rates would just be the result of fitting a single free parameter to a single output variable).
V.
IMPLEMENTATION OF CLOSED-LOOP SIMULATIONS
For many control system engineers, Mathworks’ Simulink is the tool of choice for control algorithm design. It’s use for plasma control, however, is not as straightforward as for other applications. This is because many plasma models (called plant models in the context of control algorithm de- sign) are too complicated to be implemented in Simulink so that they are instead modeled as generic linear systems (with the linearization done outside of Simulink). Further- more, external simulation codes are typically unable to in- terface to Simulink, so that closed-loop simulations require re-implementation of the algorithm to integrate it into the plasma simulation code. Finally, the algorithm may need to be re-implemented a third time for deployment on real- time hardware in an experiment.
For this work, we have used a different method to run non-linear, closed-loop simulations that avoids most of these drawbacks. Instead of attempting to integrate the plant model into Simulink, or the control algorithm into the plasma simulation code, we run both in parallel under the control of a third, supervisor process. This requires no spe- cial support either Simulink or the plasma simulation code (in this case Q2D).
Figure 11 illustrates this technique. The plasma model (described in section IV A) is implemented in Fortran, com- piled into a standalone executable and runs on an MPI cluster. There is no support for implementing any sort of feedback control. However, the code has (and needs to have for this technique to work) the capability to save the plasma state and restart from a saved state. The con- trol algorithm, on the other hand, is implemented in a Simulink model. This model has input ports correspond- ing to measurements, and output ports corresponding to


































































































   8   9   10   11   12