1 Introduction

Future power plants based on magnetic fusion reactions will be surely operated with deuterium–tritium (DT) mixtures. However, for obvious safety reasons due to the radioactivity of tritium, the proportion of the latter in such mixtures has to be maintained under a determined threshold imposed by the regulation authorities. Nowadays, tokamaks and other devices devoted to magnetic fusion research are routinely operated with pure hydrogen (H), deuterium (D) or HD gas mixtures although the European Joint Tokamak JET is in some rare cases operated with DT mixtures [1,2,3]. Obviously to avoid exceeding the imposed limits in terms of tritium contents, it is mandatory to know the quantity of tritium inside the confinement vessel. One way to evaluate this is to determine the isotopic ratio T/D+T which represents the percentage of tritium density with respect to the total plasma density in a deuterium–tritium plasma. Furthermore, it may be necessary for the DT-operated fusion reactors to control the tritium content in real time for either safety or optimization purposes. In this case, a real-time knowledge of the T/D+T isotopic ratio would be required. Standard methods used to determine the isotopic ratio do not allow for real-time applications and here is where innovative methods can help. This is where precisely techniques based on artificial intelligence can be used. I discuss in this paper some ideas on the possibilities offered by machine learning techniques such as deep learning to be combined with present-day measurements in order to be used for predictions for future fusion plasma devices. The paper will focus on the combination of machine learning with hydrogen isotope emission spectroscopic measurements in connection with the deuterium D/H+D isotopic ratio and how can be extrapolated or extended to future DT plasmas. A proof of principle of a technique which combines machine learning with Balmer\(-\alpha \) emission of hydrogen isotopes to determine isotopic ratios has been recently demonstrated [4, 5]. This paper goes beyond by discussing the perspectives of this technique but also its limits and the way the constraints can be overcome.

2 Standard technique

The standard technique which is routinely used to evaluate the hydrogen isotopic ratio in magnetic fusion plasma consists in the analysis of the visible emission spectra of the Balmer-\(\alpha \) line, i.e. H\(\alpha \)/D\(\alpha \) line for HD plasmas. More precisely by fitting spectra of the H\(\alpha \)/D\(\alpha \) line measured along different lines of sight, one can determine the D/H+D isotopic ratio along each line of sight and hence draw a cartography of the deuterium content in a HD plasma. As there exist a large number of papers describing some aspects of this technique, it is not reasonable to provide an exhaustive list of such papers. However, one can find more references in the following papers [9,10,11]. For clarity, only a brief description of this technique will be presented in the following. For simplicity, the notation D/H+D is used here to represent the isotopic ratio defined as \(\frac{n_{\textrm{D}}}{n_\textrm{H}+n_{\textrm{D}}}\), where \(n_\textrm{H}\) and \(n_{\textrm{D}}\) stand, respectively, for the densities of hydrogen and deuterium. Note that the isotopic ratio can also be expressed as H/H+D (i.e. \(\frac{n_\textrm{H}}{n_\textrm{H}+n_{\textrm{D}}}\)) since the two formulations are equivalent since:

$$\begin{aligned} \frac{n_{\textrm{D}}}{n_\textrm{H}+n_{\textrm{D}}}+ \frac{n_\textrm{H}}{n_\textrm{H}+n_{\textrm{D}}}=1. \end{aligned}$$
Fig. 1
figure 1

A typical H\(\alpha \)/D\(\alpha \) line profile calculated for a parallel direction with respect to the magnetic field direction. Two populations of neutrals were considered here where the cold one was assumed to be dominant

Fitting the spectra of the H\(\alpha \)/D\(\alpha \) line emitted by the peripheral regions of tokamaks requires to account for the Zeeman effect, Doppler broadening as well as the coexistence of at least two neutral populations for each isotope. These populations reflect the release and relaxation of the H/D neutrals by different recycling mechanisms. An example of a typical H\(\alpha \)/D\(\alpha \) line spectrum is shown in Fig. 1. The emission was assumed to result from a mixture of \(10\%\) of hydrogen and \(90\%\) of deuterium, and for each isotope, two neutral populations were assumed: a cold population (Franck–Condon) and a warm one with typical temperatures of \(3\ \textrm{eV}\) and \(30\ \textrm{eV}\), respectively. Here, the cold neutral population was supposed to represent \(80\%\) and the warm ones \(20\%\) of the total neutral population. These populations originate from different recycling mechanisms as a consequence of the plasma–surface interactions taking place in magnetic fusion devices [6, 7]. Indeed, the cold population results from dissociation processes of \(\textrm{D}_{2}\) and \(\textrm{H}_{2}\) molecules which are chemically desorbed from the plasma facing components; the released atoms thermalize though collisions before emitting radiation. The warm population is attributed to neutrals which are released thanks to physical sputtering and charge exchange processes (for more details, see [8] and references therein). One can see clearly the Zeeman features of the D\(\alpha \) line (the two left peaks), and those of the H\(\alpha \) are less distinguishable (right shoulder). As it can be found in the references mentioned previously or even in other references, fitting experimental H\(\alpha \)/D\(\alpha \) line spectra measured in tokamaks will allow to determine for each isotope the different neutral populations and their relative contributions and more importantly the isotopic ratio.

Fig. 2
figure 2

A typical D\(\alpha \)/T\(\alpha \) line profile calculated for a parallel direction with respect of the magnetic field direction. The conditions are identical to those of Fig. 1

3 Using machine learning to determine the isotopic ratio

There are a number of motivations to use machine learning to determine the hydrogen isotopic ratios in magnetic fusion devices. One of the reasons is that the determination of the hydrogen isotopic ratio by the standard method requires long acquisition and analysis times as compared to the characteristic time of real-time applications (e.g. control). Another reason comes from the non-availability of experimental data from DT plasmas as well as the complexity of the D\(\alpha \)/T\(\alpha \) line spectra as compared to those of the H\(\alpha \)/D\(\alpha \) line. This is because the T\(\alpha \) line centre is about only 0.6 Å away from that of the D\(\alpha \) line, while the H\(\alpha \) line centre is distant by about 1.75 Å  from that of the D\(\alpha \) line centre. One aspect of this complexity is shown in Fig. 2 which represents the D\(\alpha \)/T\(\alpha \) line profile calculated for the same conditions as for Fig. 1 but for DT mixture instead of HD mixture. You can see in this case that the \(\sigma \) components of the D\(\alpha \) line are no longer symmetric and unlike Fig. 1 a shoulder is now visible on the short-wavelength side which represents the T\(\alpha \) line contribution.

Fig. 3
figure 3

A theoretical spectral profile of H\(\alpha \)/D\(\alpha \) where three spectroscopic features have been identified as input features of the deep learning regression algorithm used to predict hydrogen isotopic ratios

As the target here is the isotopic ratio which is a number, among the various algorithms of machine learning we are concerned by those related to regression. In our previous work [4], we have used a deep learning neural network algorithm from the open-access machine learning platform TensorFlow [12]. Six input features were provided as input nodes for the deep learning algorithm with three of them being spectral characteristics extracted from synthetic H\(\alpha \)/D\(\alpha \) line spectra. The latter are illustrated in Fig. 3 by red double arrows representing intensity ratios and wavelength separation: \(I_{DP}\), \(I_{HD}\) and \(\Delta \lambda _{HD}\). \(I_{DP}\) represents the intensity ratio between the sigma peak and the dip of the D\(\alpha \) line, while \(I_{HD}\) is the ratio of intensities between the extreme sigma components of H\(\alpha \) and D\(\alpha \) lines. \(\Delta \lambda _{HD}\) is the separation of the left sigma component of the D\(\alpha \) line from the unperturbed wavelength of the H\(\alpha \) line centre. A series of H\(\alpha \)/D\(\alpha \) line spectra were computed for typical conditions where the isotopic ratio value was varied in the range 1–25\(\%\). The three other input features were the strength of the magnetic field B and the temperatures \(T_\textrm{C}\) and \(T_\textrm{W}\) of the cold and warm neutral populations of each hydrogen isotope. For the present deep learning algorithm (artificial neural network), six hidden layers each with hundreds of nodes were used. Technically speaking, the following functions were used: RELU as the activation function, ADAM as the optimizer and the mean square error (MSE) as the loss function. About \(200\ 000\) and \(20\ 000\) data points were, respectively, used for training and testing the deep-learning algorithm. For both the training and test sets, the isotopic ratios predicted by the deep-learning algorithm were found to agree quite well with the real ones within a scattering estimated to less than \(8\ \%\) as a mean error and less than \(3\ \%\) for the median error.

4 Discussion: from hypothetic to practical cases

In the previous section, a brief description of the functioning of the deep learning algorithm was given and it was mentioned that the number of input features which we have used for our regression problem was six; three of them were spectroscopic features extracted from computed spectra. These three last features were used because they were known as they were used to generate a dataset of \(200\ 000\) synthetic Zeeman–Doppler profiles of the H\(\alpha \)/D\(\alpha \) line. However, for experimental spectra, the values of the \(T_\textrm{C}\) and \(T_\textrm{W}\) temperatures need to be determined prior to their use as input features for the deep learning algorithm. More precisely, their determination goes through the fit of the H\(\alpha \)/D\(\alpha \) line spectra, while the strength of magnetic field can be easily determined from the separation of the sigma components when resolved. In practical situations where real-time control may be necessary, these neutral temperatures cannot be used as input features. Therefore, the approach proposed in [4] cannot be used in its original form but should be considered as a pathway towards a deep-learning-based technique to determine hydrogen isotopic ratio first in HD plasmas. Such a technique must allow to provide predictions of isotopic ratios in a time sufficiently short to allow real-time feedback and control. Achieving such a technique requires to proceed through few steps. The first step, already used in [4], consists in choosing some input features for the deep learning technique. Some features were proposed, but not all of them are appropriate as discussed previously. Therefore, one has to identify the most appropriate features that can be fast extracted from the measurements like intensity ratios. We have first focused our attention on input features which can be easily extracted from H\(\alpha \)/D\(\alpha \) line spectra because the latter are fitted though a standard technique to determine the isotopic ratio and this technique constitutes an independent diagnostics which we have used to validate our deep-learning-based prediction technique. For more rigour, even if one uses H\(\alpha \)/D\(\alpha \) line profiles computed with predetermined parameters, attention needs to be paid in order to cover all possibilities of these parameters by extending the values of the temperatures, for instance. Once this first step is correctly validated, one can move to the second step which consists in considering D\(\alpha \)/T\(\alpha \) line spectra from DT plasmas. Of course, to overcome the weakness of the database in terms of D\(\alpha \)/T\(\alpha \) which does not contain a sufficient number of spectra, one can adopt the solution proposed in [4] which consists to use as an independent diagnostic method the generation of theoretical D\(\alpha \)/T\(\alpha \) line profiles using known parameters which cover typical conditions encountered in DT plasma discharges. The few available experimental DT data may then be used to strengthen the validation of the adopted deep learning algorithm. The ultimate step would be to avoid using input features extracted from observed emission spectra but instead to use more accessible plasma parameters such as pressure, electric current for instance. Of course, such parameters still remain to be identified and checked. However, the strength of artificial intelligence algorithms is that they can allow to find underlying correlations between features and the target which is the isotopic ratio in the case considered in this paper. Besides combining simple spectroscopic features of the Balmer \(\alpha \) line emitted by hydrogen isotopes with deep learning algorithms for prediction of the isotopic ratio, one may legitimately ask whether the large experimental spectroscopic data observed in HD plasma discharges cannot be analysed with machine learning techniques and then be used directly for predictions for DT plasma discharges assuming that the later correspond to similar conditions as for HD discharges. This point is different from what has been discussed in the beginning of this section. This point and the other steps mentioned above deserve to be tackled. The work on these issues is ongoing, and the results will be published in the future. However, one should note that artificial intelligence techniques are not expected to replace physical model but to help improving our understanding of the underlying physics as well as to predict some physical quantities when their access is not granted or prior to experiments.

5 Conclusion

This short paper focuses on the introduction of machine learning in fusion plasma physics for predictions prior to future experiments in device under construction like ITER. More precisely, an approach based on the use of simple spectroscopic features of the H\(\alpha \)/D\(\alpha \) line as input features of a deep learning algorithm was briefly presented. Its purpose is to predict isotopic ratios for hydrogen–deuterium mixtures (HD plasmas) from the above-mentioned input features. The validation of this approach was previously done through the use of a set of \(200 \ 000\) line spectra generated for typical conditions of tokamak divertors. In the present paper, a discussion was given about the move from generated to observed spectra and also the extrapolation that can possibly be done from HD to DT plasma discharges. A number of issues were pointed out and which still need to be tackled to achieve a robust technique based on deep learning able to predict with the best accuracy physical quantities such as the hydrogen isotopic ratio in fusion plasmas operated with DT mixtures in the future magnetic fusion-based power plants.