scieee AI-readable full text Open interactive document viewer

Forward modeling of collective Thomson scattering for Wendelstein 7-X plasmas: Electrostatic approximation

Abramovic, I.; Pavone, A.; Moseev, D.; Lopes Cardozo, N.J.; Salewski, M.; W7-X Team; García Muñoz, Manuel

Abstract

In this paper, we present a method for numerical computation of collective Thomson scattering (CTS). We developed a forward model, eCTS, in the electrostatic approximation and benchmarked it against a full electromagnetic model. Differences between the electrostatic and the electromagnetic models are discussed. The sensitivity of the results to the ion temperature and the plasma composition is demonstrated. We integrated the model into the Bayesian data analysis framework Minerva and used it for the analysis of noisy synthetic data sets produced by a full electromagnetic model. It is shown that eCTS can be used for the inference of the bulk ion temperature. The model has been used to infer the bulk ion temperature from the first CTS measurements on Wendelstein 7-X.

Full text

Rev. Sci. Instrum. 90, 023501 (2019); https://doi.org/10.1063/1.5048361 90, 023501 © 2019 Author(s). Forward modeling of collective Thomson scattering for Wendelstein 7-X plasmas: Electrostatic approximation Cite as: Rev. Sci. Instrum. 90, 023501 (2019); https://doi.org/10.1063/1.5048361 Submitted: 13 July 2018 . Accepted: 17 January 2019 . Published Online: 07 February 2019 I. Abramovic, A. Pavone , D. Moseev, N. J. Lopes Cardozo , M. Salewski , H. P. Laqua, M. Stejner, T. Stange, S. Marsen, S. K. Nielsen, T. Jensen , W. Kasparek, and W7-X Team ARTICLES YOU MAY BE INTERESTED IN Collective Thomson scattering diagnostic at Wendelstein 7-X Review of Scientific Instruments 90, 013503 (2019); https://doi.org/10.1063/1.5050193 Towards a new image processing system at Wendelstein 7-X: From spatial calibration to characterization of thermal events Review of Scientific Instruments 89, 123503 (2018); https://doi.org/10.1063/1.5045560 Collective Thomson scattering model for arbitrarily drifting bi-Maxwellian velocity distributions AIP Advances 9, 035252 (2019); https://doi.org/10.1063/1.5088949 Review of Scientific Instruments ARTICLE scitation.org/journal/rsi Forward modeling of collective Thomson scattering for Wendelstein 7-X plasmas: Electrostatic approximation Cite as: Rev. Sci. Instrum. 90, 023501 (2019); doi: 10.1063/1.5048361 Submitted: 13 July 2018 •Accepted: 17 January 2019 • Published Online: 7 February 2019 I. Abramovic,1,a) A. Pavone,2D. Moseev,2N. J. Lopes Cardozo,1M. Salewski,3H. P. Laqua,2M. Stejner,3 T. Stange,2S. Marsen,2S. K. Nielsen,3T. Jensen,3W. Kasparek,4and W7-X Teamb) AFFILIATIONS 1University of Technology Eindhoven, Eindhoven, The Netherlands 2Max-Planck Institut fur Plasma Physik, Greifswald, Germany 3Technical University of Denmark, Kongens Lyngby, Denmark 4University of Stuttgart, Stuttgart, Germany a)Electronic mail: [email protected] b)Members of the W7-X Team, listed in R. C. Wolf et al. Nucl. Fusion 57, 102020 (2017). ABSTRACT In this paper, we present a method for numerical computation of collective Thomson scattering (CTS). We developed a forward model, eCTS, in the electrostatic approximation and benchmarked it against a full electromagnetic model. Differences between the electrostatic and the electromagnetic models are discussed. The sensitivity of the results to the ion temperature and the plasma composition is demonstrated. We integrated the model into the Bayesian data analysis framework Minerva and used it for the analysis of noisy synthetic data sets produced by a full electromagnetic model. It is shown that eCTS can be used for the inference of the bulk ion temperature. The model has been used to infer the bulk ion temperature from the first CTS measurements on Wendelstein 7-X. Published under license by AIP Publishing. https://doi.org/10.1063/1.5048361 I. INTRODUCTION The most advanced concepts for energy generation by controlled nuclear fusion rely on the magnetic confinement of a hot plasma of the hydrogen isotopes deuterium and tritium in a toroidal geometry. The international flagship project ITER, a reactor of the tokamak-type, has been designed to produce 500 MW of fusion power, ten times more than the power needed to sustain the reaction. While the tokamak is the furthest developed in terms of performance, another toroidal magnetic confinement concept, the stellarator, is thought to offer advantages over the tokamak. Perhaps the most important one is the fact that it is intrinsically steady state. The latest and most advanced stellarator, the Wendelstein 7-X (W7-X) experiment in Greifswald (Germany), came into operation in 2015.1–3 The mission of W7-X is to explore the potential of the optimized stellarator concept as a fusion reactor. Of fundamental importance in this programme is the adequate diagnostic of the key plasma parameters, ranging from basic plasma parameters such as density and temperature to the radial electric field, the distribution function of fast ions (due to external heating), and to processes such as turbulence driven transport or magnetohydrodynamic instabilities. This paper concerns the development of a diagnostic system for W7-X based on the collective Thomson scattering (CTS) of a probing beam of mm-waves. This technique in principle gives access to a variety of fundamental core plasma properties, including the ion temperature,4–6 the radial electric field, the fast ion distribution function,7–10 and the composition.11–14 The CTS diagnostic for fusion plasmas has originally been proposed in Ref. 15, and important theory developments have been made in Refs. 16–19. CTS has been applied in several fusion experiments7,8,11 and is foreseen for ITER.20 The CTS diagnostic is a fairly complex plasma Rev. Sci. Instrum. 90, 023501 (2019); doi: 10.1063/1.5048361 90, 023501-1 Published under license by AIP Publishing Review of Scientific Instruments ARTICLE scitation.org/journal/rsi diagnostic. Apart from the already complex collective Thomson scattering process, the mm-wave beam diffracts in the inhomogeneous and fluctuating plasma and may encounter resonances and cutoffs. These depend on the plasma state, the wave polarization, and the angle with respect to the magnetic field. One must ensure that the diffracting viewing line and the probing beam intersect despite these effects, and these effects must be taken into account in the interpretation of the detected signal. CTS is also challenging because the scattering cross sections are small, resulting in low signal levels, while there is a background radiation from electron cyclotron emission (ECE) as well as the stray light from the probing beam. Even if the signal-to-noise ratio is high, the interpretation of the recorded signal remains a complex task. This first requires a computer code which simulates the CTS spectra for the given geometry of the setup and a set of plasma parameters, based on a physics model of the microscopic wave-plasma interaction. Second, this forward model must be combined with an integrated data analysis system which provides all required additional information, such as the density profile, measured by independent diagnostic systems, as well as the information on the (modulated) probing beam. The W7-X integrated data analysis environment Minerva is a conglomeration of (Bayesian) probability theory and graph theory.21 It provides a standardized data analysis infrastructure, taking into account the measurements of every implemented diagnostic. In addition, it facilitates the exchange of any physics models underlying a particular diagnostic. This feature will allow the comparison of CTS physics models in a completely new way. To implement the CTS model into Minerva, it was necessary to build a new CTS code as pre-existing CTS codes are not open source. It should be remarked here that there is no common view in the literature on what the most appropriate physics model of CTS is. The basis is formed by plasma kinetic theory and Maxwell’s equations. A physics model is then constructed either by considering the full electromagnetic response of the plasma to the fluctuations or by making the electrostatic approximation. The adequacy of the two descriptions (electromagnetic vs. electrostatic) in a particular experimental situation has been debated in the past by several authors,22–25 who independently developed CTS codes. Despite these efforts, it remains ambiguous in which situations the electrostatic approximation suffices and when the full electromagnetic model is required. Although it has been reported that the choice between the two models depends on the scattering geometry,25,26 the choice is also dependent on the plasma parameters. One purpose of this paper is to contribute to resolving this ambiguity for W7-X plasmas by adopting a systematic approach to CTS modeling. We will adopt the electrostatic approximation and discuss its applicability to the bulk ion temperature measurements. To our knowledge, such a discussion is lacking in the literature. Concerning the numerical implementation of the model, we note that theoretical expressions contain infinite summations of modified Bessel functions, exponentials, and the plasma dispersion function. We present formulas to evaluate these sums effectively, which are otherwise not found in the literature. In this paper, we will •describe the newly developed CTS code, in particular the numerical methods employed to deal with infinite sums (Sec. II) •demonstrate the modeling of CTS spectra on the new fusion experiment Wendelstein 7-X (Sec. III) •outline the implementation of our CTS code into the Bayesian data analysis framework Minerva (Sec. IV) •compare the results of the code to the output generated with a code based on the full electromagnetic treatment25–27(Sec. V) •present the first CTS spectrum measured on Wendelstein 7-X and analyzed by our model (Sec. VI) •discuss the implications of the results (Sec. VII) •conclude and give the outlook in Sec. VIII. II. METHOD A. Theoretical framework From a diagnostic point of view, it is necessary to estimate the power received by a diffraction limited receiver. Let Psand Pibe the scattered and incident power and ωiand ωsbe the angular frequencies of the incident and the scattered waves, respectively. The spectral power density received is then given by18 ∂Ps ∂ω =PiOb ωiωs 2πc2r2 eneGS(k,ω), (1) where reis the classical electron radius, cis the speed of light in vacuum, neis the electron density, Obis the beam overlap volume, Gis the geometrical form factor, and S(k,ω) is the spectral density. The beam overlap is defined as the volume integral of the normalized incident and scattered beam intensities, Iiand Is. In the case of uniform beam intensities and perfect intersection, the overlap can be approximated by the ratio of the overlap volume, V, and the product of the beam cross sections, Aiand As, and is given by25 Ob=IiIsdV ≈V AiAs. (2) The spectral density S(k,ω) is a function of the scattering wave vector kand the frequency ωwhich are defined as ω=ωs−ωi, (3) k=ks−ki. (4) To specify the scattering geometry (see Fig. 1), we introduce the angle between the incident and the scattered waves, θ=∠(ki,ks), and the angle between the scattering wave vector and the local magnetic field vector φ=∠(k,B). The spectral density S(k,ω) contains the plasma response to the microscopic fluctuations. The geometrical form factor Gaccounts for the response to the incident and the scattered waves. As most spectral variation of the received power comes from the product GS(k,ω), the calculation of this product is the main objective of the CTS theory. We thus define the scattering function as Σ=GS(k,ω). The geometrical form factor is given by the following expression:28 Rev. Sci. Instrum. 90, 023501 (2019); doi: 10.1063/1.5048361 90, 023501-2 Published under license by AIP Publishing Review of Scientific Instruments ARTICLE scitation.org/journal/rsi FIG. 1. The scattering geometry is defined by the angles indicated in the figure on the left: φi,φs, and the angle χbetween the planes defined by Band ki, and Band ks, respectively. When φi+φs=π, the scattering geometry is uniquely defined by angles φand θindicated in the figure on the right. Gλν = ω2 sω2 i ω4 pe µsνµiλ|(e∗ sν·(ˆ I−ˆi)·eiλ)|2 (e∗ sν·ˆs·esν)(e∗ iλ·ˆi·eiλ), (5) where ωpe =(nee2/me0)1/2is the plasma frequency, the subscripts sand iindicate the scattered and the incident wave, respectively, the subscripts νand λspecify the polarization (the O mode or X mode propagating in the plasma), edenotes the polarization vector, and ∗denotes the complex conjugation. The corresponding refractive index is denoted by µ, and ˆis the cold plasma dielectric tensor. Assuming that the equilibrium distributions for both electrons and ions are isotropic Maxwellian distributions without drifts, the expression for the spectral density function for a magnetized plasma, in the electrostatic approximation, is given by23 S(k,ω)=     1−He l      22√π |kk|ve× +∞ X l=−∞ e−k2 ⊥r2 le Il(k2 ⊥r2 le)e−(ω−lωce)2 k2 kv2 e +     He l      22√πZ2 ini ne|kk|vi +∞ X l=−∞ e−k2 ⊥r2 li Il(k2 ⊥r2 li)e−(ω−lωci)2 k2 kv2 i, (6) where niand nedenote ion and electron densities, 3eand 3iare the electron and ion thermal velocities, respectively, ωce and ωci denote the cyclotron frequencies, and rle and rli denote Larmor radii. The parallel and the perpendicular wave vectors are defined with respect to the direction of the magnetic field B0, and they are given by k⊥=ksin φand kk=kcos φ, respectively. The summation is performed over the order of the modified Bessel function of the first kind, Il, and the cyclotron harmonics. l=1+He(k,ω) + Hi(k,ω) is the longitudinal dielectric function in which Heand Histand for the electron and the ion susceptibilities, respectively, He(k,ω)=α2 +∞ X l=−∞ e−k2 ⊥r2 le Il(k2 ⊥r2 le) 1 + ω kkve Z ω−lωce kkve!!, (7) Hi(k,ω)=α2Z2 iniTe neTi +∞ X l=−∞ e−k2 ⊥r2 li Il(k2 ⊥r2 li) 1+ ω kkvi Z ω−lωci kkvi!!, (8) where Z(ω−lωce kkve)≡Z(yl) is the plasma dispersion function which is defined as29 Z(yl)=i√πe−y2 l−2e−y2 lyl 0 ep2dp. (9) In Sec. II B, we outline the numerical approach for the computation of summations in Eqs. (6)–(8). B. Infinite summations We can identify three types of sums in Eqs. (6)–(8), +∞ X l=−∞ e−xIl(x)=1, (10) +∞ X l=−∞ e−xIl(x)Z(yl), (11) +∞ X l=−∞ e−xIl(x)e−y2 l. (12) The modified Bessel functions of the first kind are normalized, and given the property Il(x) = I−l(x), the normalization relation30,31 is given by +∞ X l=−∞ Il(x)=Io(x)+2 +∞ X l=1 Il(x)=ex. (13) From Eq. (13), it follows that the sum in Eq. (10) is trivial and equal to 1.30,31 To compute the remaining sums, we will use an algorithm for summing orthogonal polynomial series.32,33 The sums in Eqs. (11) and (12) have to be rewritten in a form which facilitates the use of the chosen algorithm. Using the normalization of the modified Bessel functions (13), we can rewrite Eq. (11) in the following way: +∞ X l=−∞ e−xIl(x)Z(yl)=P+∞ l=1e−xIl(x)(Z(yl) + Z(y−l)) + e−xI0(x)Z(y0) exe−x =P+∞ l=1Il(x)(Z(yl) + Z(y−l)) + I0(x)Z(y0) Io(x)+2P+∞ l=1Il(x) = 1 I0(x)P+∞ l=1Il(x)(Z(yl) + Z(y−l)) + Z(y0) 1+2 1 I0(x)P+∞ l=1Il(x). (14) Adopting the nomenclature from Ref. 32, we will first compute the sum from the denominator in Eq. (14), B0= 1 I0(x) +∞ X l=1 Il(x)= 1 I0(x) * . , +∞ X l=0 Il(x)−I0(x)+ / - = 1 I0(x) +∞ X l=0 Il(x)−1 = 1 I0(x) * . ,I0(x) + I1(x) + +∞ X l=2 Il(x)+ / -−1= I1(x) I0(x) * . , 1 I1(x) +∞ X l=2 Il(x)+1+ / - = I1(x) I0(x)(B1+ 1). (15) Rev. Sci. Instrum. 90, 023501 (2019); doi: 10.1063/1.5048361 90, 023501-3 Published under license by AIP Publishing Review of Scientific Instruments ARTICLE scitation.org/journal/rsi This result is easily generalized, and a recurrence relation is obtained, Bl= Il+1(x) Il(x)(Bl+1 + 1) ≡rl+1(Bl+1 + 1). (16) The ratios of consecutive modified Bessel functions, rl+1, are defined by rl+1 ≡Il+1(x) Il(x) = 1 rl+2 + 2(l+ 1)/x. (17) This relation follows directly from the recurrence relation for the modified Bessel functions, Il+1(x)=−2l xIl(x) + Il−1(x), l≥1. (18) Starting from Bessel’s equation, pairs of lower and upper bounds on rlcan be derived for each l.33 The common bounds for all lare found to be 0 and 1. We use this result to set the starting value for backward recursion in Eq. (17): rN+2 = 1, where Nrepresents the number of steps. The condition BN+1 = 0 enables us to calculate B0by successively evaluating Bl,Bl−1,. . .,B1. The sum from the numerator of Eq. (14) S0≡1 I0(x)P+∞ l=1Il(x)(Z(yl)+Z(y−l)) satisfies a similar recurrence relation but with the initial condition SN= 0, Sl=rl+1(Sl+1 +Z(yl+1)+Z(y−l−1). (19) For the eCTS code application to Wendelstein 7-X plasmas (see Sec. III), we found that N= 200 produces satisfactory results over the entire parameter range of interest. This result is derived by the same reasoning used in the calculation of B0in Eq. (15). Both Sland Blare thus calculated by successive evaluation, and the final result can be written in a concise manner, +∞ X l=−∞ e−xIl(x)Z(yl)= S0+Z(y0) 1+2B0 . (20) The same approach is used to calculate (12). The only difference in the procedure is the substitution of e−y2 lfor Z(yl). The errors do not build up because they satisfy the same recurrence relations as the quantities Bland Sl. Thus the errors are bounded.32,33 III. MODELING CTS AT W7-X The eCTS code is applied to model a Wendelstein 7-X plasma. The purpose of this section is to demonstrate the sensitivity of the forward model to the ion temperature and to the plasma composition. The scattering function has been defined previously as the product of the geometrical form factor and the spectral density function Σ=GS(k,ω). The geometrical form factor Gcontains the response of the plasma to the incident and scattered waves, and the spectral density function S(k,ω) contains the response to the fluctuations. These two quantities can be modeled separately, as we show in Secs. III A and III B. A. Calculations of the geometrical form factor We calculated the geometrical form factor for four scattering channels X→X,X→O,O→O, and O→Xin the density range typical for W7-X. From the results of the calculation, we can estimate the density range within which the diagnostic can operate as well as the potential benefits and disadvantages of using a specific scattering channel. The limits of this range depend on the locations of the cutoffs and the resonances where reflection and absorption occur in the plasma. The cutoffs and resonances will differ for different modes of the propagating radiation and thus differ for different scattering channels. Formally, we say that a resonance is the point at which the refractive index of the plasma goes to infinity, and a cutoff is the point at which the refractive index goes to zero. The geometrical form factor is a function of the plasma refractive index, and its value is therefore strongly influenced by the cutoffs and resonances of the incident and scattered waves. The abrupt change of the value of the G factor is an indication of the absorption or reflection of the probing radiation. Ideally, the scattering volume of the CTS diagnostic will not be in the vicinity of a cutoff or a resonance. In addition to the dependence on the plasma parameters, the cutoff frequency also depends on the strength of the external magnetic field. The field strength can vary up to 5% along the direction of propagation of the incident radiation through the plasma. On the magnetic axis, the strength varies between 2.1 T and 2.5 T. This has been taken into account. The results are depicted in Figs. 2–5. Note that the calculations given here show the density dependence of the G factor for the probing frequency of 140 GHz. One can also look at the frequency dependence for a fixed density. From the results, we see that the G factor has a significantly lower value for O→Oor mixed mode scattering in comparison to X→Xscattering. However, one advantage of O→Oscattering is the ability to measure at higher densities. From these results, it follows that if the density is below 1.2 ×1020 m−3for B= 2.5 T (or below 1.0 ×1020 m−3for B= 2.1 T), X→Xshould be used. The strength of the ECE for FIG. 2. Geometrical form factor for X to X mode scattering for two magnetic field configurations. Rev. Sci. Instrum. 90, 023501 (2019); doi: 10.1063/1.5048361 90, 023501-4 Published under license by AIP Publishing Review of Scientific Instruments ARTICLE scitation.org/journal/rsi FIG. 3. Geometrical form factor for X to O mode scattering for two magnetic field configurations. each polarization should also be compared when selecting the polarization. The strength of the ECE has not been taken into account in the calculations. B. Calculations of the spectral density function The CTS diagnostic on W7-X will have the receiver at a fixed position but will be able to switch between two ports through which the probing beam can be injected into the plasma. This flexibility allows for a range of scattering angles. Sensitivity of the model to the plasma composition and the bulk ion temperature is demonstrated in Figs. 6 and 7. The model correctly reproduces the ion cyclotron structure of the FIG. 4. Geometrical form factor for O to O mode scattering for two magnetic field configurations. FIG. 5. Geometrical form factor for O to X mode scattering for two magnetic field configurations. spectrum.34 This structure results from the hot electrostatic waves known as the ion Bernstein waves driven by the ion cyclotron motion in a magnetized plasma. The ion cyclotron structure can be observed only when the scattering geometry is such that φ≈90, the ion Bernstein waves are strongly damped otherwise. As can be seen in Fig. 6, the separation between the peaks corresponds to the ion cyclotron frequency of hydrogen (blue) and deuterium (red). Figure 6 also shows that the hydrogen spectrum is broader than the deuterium spectrum as is expected for lighter species. In Fig. 7, we calculate the spectral density for two different values of the ion temperature while keeping all other parameters fixed. FIG. 6. Sensitivity of the output of the code to the plasma composition: separation between the peaks corresponds to the ion cyclotron frequency of the given ion species, for deuterium ≈18.3 MHz and for hydrogen ≈36.5 MHz at B= 2.4 T. Rev. Sci. Instrum. 90, 023501 (2019); doi: 10.1063/1.5048361 90, 023501-5 Published under license by AIP Publishing Review of Scientific Instruments ARTICLE scitation.org/journal/rsi FIG. 7. Sensitivity of the output of the code to the ion temperature. Spectra are calculated for a deuterium plasma with the following parameter values: ne=ni= 6 ×1019 m−3,B= 2.4 T, θ= 100, φ= 130, and Te= 10 keV. The observation angle is φ= 130◦, and there is no ion cyclotron structure as expected. The appearance of the peak in the spectrum is related to the ratio Te/Ti. When this ratio is small, the effect of Landau damping is significant and the peak is not pronounced.17 Notice that the hump in the spectrum is also an enhancement of the scattered power. Such enhancements are expected at (ω,k) which satisfy the dispersion relation l≡1 + He(k,ω) + Hi(k,ω) = 0. When there is a significant difference in the ion and electron temperatures, such as in Fig. 7, the enhancement which appears in the spectrum corresponds to the ion acoustic wave. Observation of the ion acoustic wave allows one to quickly and easily obtain the value of the ion temperature from the following relation: facoustic = k 2πsTe+ 3Ti mion . (21) For this example, the values k/2π≈620 1/m, Ti= 3 keV, Te= 10 keV, and mdeuterium = 3.3435·10−27 kg substituted into Eq. (21) give facoustic ≈0.592 GHz. This is the frequency at which the enhancement appears in Fig. 7. Given the electron temperature, the ion temperature can be recovered from the result of the calculation. In order for the developed model to be used in a real data analysis on Wendelstein 7-X, it is necessary to integrate it into the data analysis framework Minerva. IV. INTEGRATION OF THE CTS FORWARD MODEL INTO THE MINERVA FRAMEWORK The implementation of the CTS forward model into the Minerva framework will allow the inference of the model parameters, given the measured data, in a Bayesian fashion. Several other plasma diagnostic models operational on W7-X are already implemented in the framework. It has also been used in a number of other experiments.21,35 The physics model of each diagnostic is represented in the Minerva framework as a graphical model. In a forward model of a diagnostic, measured data are derived from the model parameters by using the code implementation of physical processes. According to Bayesian probability theory, the Bayes formula can be used to solve the inference of the parameters of the model, P(M|D)= P(D|M)P(M) P(D), (22) where P(M|D) represents the posterior probability distribution for the model parameters Mwith respect to the measured data D,P(D|M) is the likelihood of the data given model parameters, P(M) is the prior probability distribution assigned to the model parameters before data acquisition, and P(D) is a normalizing factor. Figure 8 shows a sketch of the implementation of CTS forward model into Minerva. The measured data are represented in the graphical model by an observation node (blue circle). Model parameters can be inferred via a Maximum A Posterior (MAP) algorithm: the parameters which maximize the left-hand side of Eq. (22) can then be found. The inversion can be pushed a step further. The strength of Bayesian analysis lies in the fact that the result of the inference is not just one single set of model parameter values; instead it is the whole posterior probability distribution which quantifies uncertainties in the inversion process. The posterior distribution can be sampled by using a Metropolis-Hastings Markov Chain Monte Carlo algorithm.36 In this way, the confidence of the inferred model parameters is determined from the distribution of the samples. At the end, the aim of the Minerva framework will be to exploit the central point of Bayesian probability theory: more data bring more information which in turn increases the accuracy of the parameter estimation. This can be performed by joining together the information coming from the different diagnostics which are used to infer the same parameter(s).21 In this way, the uncertainties of the inferred FIG. 8. Scheme for Minerva implementation of the CTS model. The green circle represents the free parameters in the model; the blue circle represents the observed quantities. The inversion process is indicated with a dashed arrow. Rev. Sci. Instrum. 90, 023501 (2019); doi: 10.1063/1.5048361 90, 023501-6 Published under license by AIP Publishing Review of Scientific Instruments ARTICLE scitation.org/journal/rsi values, given by the posterior distribution, take into consideration all the possible information coming from the different diagnostics. Consequently, one such integrated framework is able to give the most reliable estimation of a parameter by running a joint Bayesian analysis that takes into account uncertainties in every step of the inference. It is with this in mind that the CTS model is implemented in the Minerva framework. V. ANALYSIS OF SYNTHETIC CTS DATA An essential part of the implementation of the CTS forward model into the Minerva framework is the creation of the model builder class. In this class, we specify the dependencies between the input parameters, the forward model, and the observed data. The model builder creates a graph object which contains the representation of the model. Once the graph is created, the operations can be performed directly on the nodes of the graph. The nodes on the graph can be parameter values, computational nodes, and observed data. We can assign a prior probability distribution to the parameters which we want to infer by inversion from the observations. Prior distributions are defined by the mean and the variance. For the analysis of synthetic CTS data, we created the model depicted in Fig. 9. Prior distributions have been put on the electron and ion temperatures and on the geometrical form factor G. To generate noisy synthetic spectra, we have considered the following: during a CTS measurement, the probing radiation is modulated, and the signal recorded during the periods when the probing beam (the gyrotron in our case) is turned off is the background noise (an ECE of 100 eV up to 300 eV) which may or may not be Gaussian. When this recorded noise signal is subtracted from the signal recorded when the source is on, and calibration is applied, what remains is thermal noise. Only after such pre-processing is the spectrum ready for further analysis requiring the use of the forward model and Bayesian inference. The synthetic data have thus been generated by the addition of Gaussian noise to the spectra produced by the fully electromagnetic code.25 The data have then been fed into the node Spectrum (see Fig. 9), and the parameter values have been inferred from this node. Depending on the data set, Minerva fits either the scattering function, Σ(k,ω), or the scattered FIG. 10. Gaussian noise (5% of the maximum value) was added to a spectrum obtained by the full electromagnetic code25 for the scattering channel X→Xin a deuterium plasma (black and blue dots). The spectrum has been fitted by the MAP inversion (the red line). Final temperatures obtained by fitting are indicated in the legend. power Ps. In order to fit the data, Minerva performs the maximization of the posterior probability distribution (MAP) on the free parameters and updates the input to the integrated CTS forward model at each iteration. The process is repeated until convergence. A. Scattered power Analysis of actual data will require the scattered power [see Eq. (1)] to be fitted rather than the scattering function. In Fig. 10, we have fitted the power scattered by a deuterium plasma. For this purpose, we added the value to the node Pi= 100 kW (incident power). Other nodes were set to the following values: ne=ni= 6 ×1019 m−3,B= 2.4 T, φ= 100.7◦, and θ= 169.7◦. The final obtained value of the bulk ion temperature was Ti= 1.2 ±0.2 keV, while the observed data have been produced with the value Te=Ti= 1.3 keV. Note that there is a tilt of the baseline in the negative frequency FIG. 9. Probability graphical model produced by the ModelBuilder. The squares indicate either constants/input files or calculation nodes (the eCTS code for example is in the CTS node). The blue nodes indicate free parameters with a prior distribution. The gray node indicates the data to be fitted. The arrows do not indicate the direction of information flow. Rev. Sci. Instrum. 90, 023501 (2019); doi: 10.1063/1.5048361 90, 023501-7 Published under license by AIP Publishing Review of Scientific Instruments ARTICLE scitation.org/journal/rsi region in Fig. 10. In the electrostatic approximation, the calculated baseline of a spectrum is always at 0. This is not the case for the electromagnetic treatment where the spectrum can be tilted as in Fig. 10. To fit such a spectrum in the electrostatic approximation, we can prioritize the fitting of the higher frequency side to obtain a result for the bulk ion temperature. Additionally, one can in experiments observe an offset of the baseline which results from the background radiation. The spectra have to be pre-processed by making a background subtraction, applying calibration, and averaging over a number of data acquisition periods before Minerva inversions can be employed. Otherwise, Minerva will try to increase the width of the spectrum sufficiently attempting to create a tilt or an offset in a particular spectral range. This will result in unrealistically high ion temperatures. Performance of the model for low signals (below 5 eV) and in the reactor relevant temperature range have been tested on a data set containing 29 synthetic spectra in the range from Ti=Te= [1, 15] keV. The results are given in Fig. 11. Error bars indicate the discrepancy between the recovered ion temperature and the temperature used as input for the production of the synthetic spectra. The graph can be divided into three regions according to the input temperature: 1. [1, 8] keV 2. [8.5, 10] keV 3. [10.5, 15] keV In the first region, there were no tilts or offsets of the baseline of the spectra. The error is below 10%. In the second region, the electromagnetic effects gave rise to tilting of the baseline in the low frequency range. Preferential fitting of the high frequency part of the spectra was made in order to get FIG. 11. Recovered ion temperature as a function of the input ion temperature for 29 spectra. The Gaussian noise added to the synthetic spectra is 5% of the maximum value. feasible values of the ion temperature. The third region is outside of the foreseen W7-X ion temperature range. It is also the region where the electromagnetic effects become more prominent which results in a significant increase in error bars (the largest one is at Ti= 14 keV, where we have an error of approximately 20%). B. Applicability of the electrostatic approximation A forward model of collective Thomson scattering (eCTS) has been developed based on the approach in Sec. II. In this section, we compare the results of our code to the output of a full electromagnetic treatment.25–27 The spectra have been generated by the electromagnetic model and analyzed by the electrostatic one in an attempt to explore the plasma conditions under which the electromagnetic effects become relevant for CTS on Wendelstein 7-X. For a given plasma state, different features appear in a CTS spectrum depending on the observation angle. The benchmark spectra have been produced for two observation angles φin a homogeneous deuterium plasma while keeping the following input parameters fixed: ne=ni= 6 ×1019 m−3,Te=Ti= 1 keV, and B= 2.4 T. The incident and scattered radiation is assumed to be polarized either in Xor in Omode. We give the result for the X→ Xscattering channel in Figs. 12 and 13, for which the largest discrepancy between the two models is observed. The observable discrepancy in the width which can lead to an increase in the error of the inferred bulk ion temperature is caused by the underlying difference of the physics models. This is a systematic effect. In the case of φ≈90◦, depicted in Fig. 13, we note that our code reproduces the expected ion cyclotron effects on the CTS spectrum. Although less pronounced, also in this case, there is a difference in the width of the two FIG. 12. Comparison of our code (eCTS) with the result obtained with a full electromagnetic treatment.25 The spectrum is calculated for a deuterium plasma without impurities, with the following values of input parameters: ne=ni= 6 ×1019 m−3, Te=Ti= 1 keV, B= 2.4 T, X→X,θ= 100◦, and φ= 130◦. Rev. Sci. Instrum. 90, 023501 (2019); doi: 10.1063/1.5048361 90, 023501-8 Published under license by AIP Publishing