6.1 Introduction
Tokamaks are fusion machines that are under development to produce baseload power. Baseload power is the power that is produced 24/7 and provides the base for powering the electric grid. The International Thermonuclear Experimental Reactor (ITER) is an international project that will produce net power from a Tokamak. Net power means the Tokamak produces more energy than it consumes. Consumption includes heating the plasma, controlling it, and powering all the auxiliary systems needed to maintain the plasma. It will allow researchers to study the physics of the Tokamak which will hopefully lead the way toward operational machines. A Tokamak is shown in Figure 6.1. The central solenoid field coils act like a transformer to initiate a plasma current. The outer poloidal and toroidal coils maintain the plasma. The plasma current itself produces its own magnetic field and induces currents in the other coils.
The image in Figure 6.1 was produced by the function DrawTokamak which calls DCoil and SquareHoop. We aren’t going to discuss those three functions here. You should feel free to look through the functions as they show how easy it is to do 3D models using MATLAB.
One problem with Tokamaks is disruptions. A disruption is a massive loss of plasma control that extinguishes the plasma and results in large thermal and structural loads on the Tokamak wall. This can lead to catastrophic wall damage. This would be bad in an experimental machine and unacceptable in a power plant as it could lead to months of repairs.
- 1.
The poloidal beta (beta is the ratio of plasma pressure to magnetic pressure).
- 2.
The line-integrated plasma density.
- 3.
The plasma elongation.
- 4.
The plasma volume divided by the device minor radius.
- 5.
The plasma current.
- 6.
The plasma internal inductance.
- 7.
The locked mode amplitude.
- 8.
The plasma vertical centroid position.
- 9.
The total input power.
- 10.
The safety factor reaching 95%. The safety factor is the ratio of the times a magnetic field line travels toroidally (the long way around the doughnut) vs. poloidally (the short way). We want the safety factor to be greater than one.
- 11.
The total radiated power.
- 12.
The time derivative of the stored diamagnetic energy, which is energy stored by the magnetic fields of the plasma.
Locked modes are magnetohydrodynamic (MHD) instabilities that are locked in phase and the laboratory frame. They can be precursors to disruptions. The plasma internal inductance is the inductance measured by integrating the inductance over the entire plasma. In a Tokamak, the poloidal direction is along the minor radius circumference. The toroidal direction is along the major radius circumference. In a plasma, the dipole moment due to the circulating current is in the opposite direction of the magnetic field which makes it diamagnetic. Diamagnetic energy is the energy stored in a magnetized plasma. Diamagnetic measurements measured this energy.
We’ll find it to be more than complex enough! We will start with the dynamics of the vertical motion of a plasma. We’ll then learn about plasma disturbances. After that, we will design a vertical position controller. Finally, we’ll get to deep learning.
6.2 Numerical Model
6.2.1 Dynamics
For our example, we need a numerical model of disruptions [8], [7], [37]. Ideally, our model would include all of the effects in the list given earlier. We use the model in Scibile [38]. We will only consider vertical movement.
Model parameters from the Joint European Torus (JET). N/A is Newton (unit of force) per amp, in this case. Ω is Ohm, the unit of resistance; H is Henry, a unit of inductance; A is amps.
Parameter | Description | JET | Units |
LAA | Active coil self-inductance | 42.5 × 10−3 | H |
LAV = LV A | Passive coil self-inductance | 0.432 × 10−3 | H |
LV V | Active-passive coil mutual inductance | 0.012 × 10−3 | H |
RAA | Active coil resistance | 35.0 × 10−3 | Ω |
RV V | Passive coil resistance | 2.56 × 10−3 | Ω |
Mutual change inductance between the active coils and plasma displacement | 115.2 × 10−6 | H/m | |
Mutual change inductance between the passive coils and plasma displacement | 3.2 × 10−6 | H/m | |
APP | Normalized destabilizing force | 0.5 × 10−6 | H/m2 |
FP | Disturbance force normalized to the plasma current Ip | See ELM | N/A |
τt | Controller lag | 310 × 10−6 | s |
Ip | Plasma current | 1.5× 106 | A |
6.2.2 Sensors
We are going to assume that we can measure the vertical position and the two currents directly. This is not entirely the case in a real machine. The vertical position is measured indirectly in a real machine. We also assume we have available the control voltage.
6.2.3 Disturbances
6.2.4 Controller
6.3 Dynamical Model
6.3.1 Problem
Create a dynamical model of the Tokamak.
6.3.2 Solution
Implement the plasma dynamics model in a MATLAB function.
6.3.3 How It Works
and it will create the matrices. There are two warnings to prevent you from entering invalid parameters.
This value was chosen so that the roots match the JET numbers.
6.4 Simulate the Plasma
6.4.1 Problem
We want to simulate the vertical position dynamics of the plasma with ELM disturbances.
6.4.2 Solution
Write a simulation script called DisruptionSim.m.
6.4.3 How It Works
The results are shown in Figure 6.6. The currents grow with time due to the positive eigenvalue. The only disturbance is the ELMs, but they are enough to cause the vertical position to grow.
6.5 Control the Plasma
6.5.1 Problem
We want to control the plasma vertical position.
6.5.2 Solution
Write a simulation script called ControlSim.m to demonstrate closed loop control of the vertical position of the plasma.
6.5.3 How It Works
6.6 Training and Testing
6.6.1 Problem
We want to detect measurements leading up to disruptions.
6.6.2 Solution
We use a biLSTM (Bidirectional Long Short-Term Memory) layer to detect disruptions by classifying a time sequence as leading up to a disruption or not. LSTMs are designed to avoid dependency on old information. A standard RNN has a repeating structure. An LSTM also has a repeating structure, but each element has four layers. The LSTM layers decide what old information to pass on to the next layer. It may be all, or it may be none. There are many variants of LSTM, but they all include the fundamental ability to forget things. biLSTM is generally better than an LSTM when we have the full-time sequence.
6.6.3 How It Works
The training is shown in Figure 6.9. It takes over 42 minutes and converges after 10 epochs. Given this, if we rerun training with fewer MaxEpochs – perhaps 20 – training will be faster; this is left to the reader.
This chapter did not deal with recursive or online training. A disruption prediction would need to constantly incorporate new data into its neural network. In addition, the other criteria for disruption detection would also need to be incorporated.