Initial operation and data processing on a system for real-time evaluation of Thomson scattering signals on the Large Helical Device
K. C. Hammond, F. M. Laggner, A. Diallo, S. Doskoczynski, C. Freeman, H. Funaba, D. A. Gates, R. Rozenblat, G. Tchilinguirian, Z. Xing, I. Yamada, R. Yasuhara, G. Zimmer, E. Kolemen
RReal-time Thomson scattering evaluation on LHD
Initial operation of a real-time Thomson scattering evaluation system onthe Large Helical Device
K.C. Hammond, a) F.M. Laggner, A. Diallo, S. Doskoczynski, C. Freeman, H. Funaba, D.A. Gates, R. Rozenblat, G. Tchilinguirian, Z. Xing, I. Yamada, R. Yasuhara, and E. Kolemen
1, 3 Princeton Plasma Physics Laboratory, Princeton, NJ, USA National Institute for Fusion Science, Toki, Japan Princeton University, Princeton, NJ, USA (Dated: 12 January 2021)
A scalable system for real-time analysis of electron temperature and density based on Thomson scattering signals,initially developed for and installed on the NSTX-U experiment, was recently adapted for the Large Helical Device(LHD) and operated for the first time during plasma discharges. The system consists of fast digitizers and a serverwith multiple parallel-operating CPUs, each of which infers temperature and density values for a spatial point in theLHD plasma. During its initial operation, it routinely recorded and processed signals for four spatial points at the laserrepetition rate of 30 Hz, well within the system’s rated capability for 60 Hz. We present examples of data collectedfrom this initial run and describe subsequent adaptations to the analysis code to improve the fidelity of the temperaturecalculations.
I. INTRODUCTION
The ability to determine plasma temperature and densityprofiles in real time is valuable to plasma control systemsseeking to optimize plasma properties or maintain devicesafety. The Thomson scattering diagnostic is an attractivecandidate for real-time profile evaluation due to its ability tomake non-invasive measurements of electron temperature T e and electron density n e throughout a typical fusion plasma. In addition, the localized nature of the measurement obviatesthe need for intermediate analysis such as tomographic inver-sion or equilibrium modeling to infer the profiles.Systems for evaluation of T e and n e from Thomson scat-tering data in real time have been developed for a number ofdevices over the years. In this work, we use a frameworkdeveloped recently for NSTX-U. Its main components are aset of fast digitizers and a multi-core server. The digitizerscollect signals from the detection electronics. The server em-ploys real-time software to calculate T e and n e from the signalsbetween subsequent laser pulses, supporting repetition rates ofup to 60 Hz. The server outputs values of T e , T e uncertainty, n e , and n e uncertainty for each scattering volume as analogsignals that may be fed into real-time control systems.The setup was subsequently replicated and installed on theLarge Helical Device (LHD) to evaluate signals from the LHDThomson scattering system. This system currently employsfour Nd:YAG lasers that enable pulse repetition rates rangingfrom 10 to 100 Hz. As depicted in Fig. 1, the laser beamline extends radially through a horizontally-elongated plasmacross-section. The collection optics observe backscatteredlight, which is transmitted through optical fibers to a set of 144polychromators.
Within each polychromator, the scat-tered light is passed through bandpass filters to six avalanchephotodiodes (APDs). Signals from five of these APDs areused for T e and n e evaluation during plasma discharges, and a) Electronic mail: [email protected]
FIG. 1. Schematic of the LHD Thomson scattering system. Repro-duced with permission from Ref. 12. the remaining signal is used for Rayleigh calibration. Asthe polychromator setup used in LHD is similar to what isemployed in NSTX-U, the real-time framework could beadapted for use on LHD with minor software modifications.During its initial operation on LHD, the real-time systemcollected and evaluated signals from four polychromators. Forthese experiments, laser pulses occurred at a 30 Hz repeti-tion rate. In addition to performing T e and n e calculations foreach pulse, the real-time system archived the polychromatorsignals at the end of each discharge, thereby enabling a post-mortem assessment of the real-time calculations. In this paper,we describe this assessment, with a focus on the methods usedfor processing the raw polychromator signals. In Sec. II, weassess the peak detection method originally developed for theNSTX-U setup, as well as two additional integration-basedmethods that are closer to the typical signal processing usedat LHD. Then, in Sec. III, we compare the values of T e derivedfrom each of these methods with the values calculated by thestandard LHD methods performed after each discharge. a r X i v : . [ phy s i c s . p l a s m - ph ] J a n eal-time Thomson scattering evaluation on LHD 2
600 700 800 900 1000 1100
Wavelength (nm) T r an s m i ss i v i t y ( A . U . ) , sc a tt e r ed pho t on s ( A . U . ) r = 3.683 m Ch. 1Ch. 2Ch. 3Ch. 4 Ch. 5 T e = 0.05 keV T e = 0.5 keV T e = 5 keV FIG. 2. Transmissivity spectra of the five channels of the polychro-mator surveying the scattering volume at r = .
683 m, along withThomson scattering spectra for three example electron temperatures.
II. SIGNAL PROCESSING METHODS
The real-time system computes T e and n e values in a least-squares spectral fitting technique that optimizes T e and a scal-ing factor c to minimize χ , defined as follows: χ = N c ∑ i = ( s i − cF i ( T e )) σ s i + s i σ F i (1)Here, N c is the number of polychromator channels (five forLHD) and F i ( T e ) is the expected relative signal strength fromthe i th channel for electron temperature T e . The electron den-sity n e can then be determined from c along with calibrationdata. s i is a measure of the signal strength from the i th poly-chromator channel. σ s i is the standard error in the s i measure-ment, and σ F i is the (dimensionless) fractional error in F i .As described in Ref. 7, the values of F i are pre-computedfor a range of T e by integrating the measured transmissivityspectrum of the i th polychromator channel with the Thomsonscattering spectrum as predicted by the Selden model. Fig. 2shows measured transmissivity curves for the channels of onepolychromator, along with scattering spectra for selected val-ues of T e . Evaluation of F i ( T e ) between laser pulses simplyinvolves querying a look-up table of the pre-computed values.The first derivative of F i ( T e ) , also required for the fitting pro-cedure, is estimated via finite differencing. s i in Eq. 1 must be proportional to the number of scatteredphotons received by the channel. In this section, we will de-scribe three procedures that we have implemented for derivingvalues for s i from time-resolved polychromator signals andcompare their accuracy and computational requirements. Theprocedures, which include peak detection, direct integration,and curve fitting, are displayed schematically in Fig. 3 for twoexamples of raw signals from a polychromator channel. A. Peak detection
As originally designed, the real-time processing codeworked on the assumption that the integrated photon flux toeach polychromator channel would scale directly with thepeak amplitude of the raw signal. Hence, it would be suffi-cient to define the signal strengths s i simply as the peak am-plitudes in order to determine T e . Provided that the signalsfrom Rayleigh and/or Raman calibrations are evaluated in thesame way, a consistent scaling factor may be determined forextracting n e from the scaling parameter c .The real-time code determines the amplitude of thescattered-light signal during each laser pulse by subtractingthe peak value of the signal from the average of the back-ground signal recorded prior to the laser pulse. The proce-dure is illustrated in Fig. 3a for the case of a single laser pulseand in Fig. 3d for a case when two lasers were fired in rapidsuccession. To correct for stray laser light due to reflectionswithin the plasma vessel, this amplitude would be adjusted bysubtracting the average signal amplitude recorded during laserpulses prior to the beginning of the discharge.This approach has the advantage of simplicity, and, there-fore, computational speed. However, the amplification cir-cuitry, which in this setup includes a high-pass filter to reducethe background level, may exhibit a dispersive or nonlinear re-sponse that would give rise to distortions of the scattered lightsignal that can vary from one channel to another.The effect of such distortions in the fitting of the polychro-mator output spectra is visible in Fig. 4a, which compares fit-ted data s i / c with the predicted signals F i ( T e ) acquired fromone scattering volume during an example plasma discharge.These fits contain substantial systematic errors. In particular,the fitted signal amplitudes are mostly lower than the modelprediction for polychromator channels 3 and 5, whereas theyare mostly higher than the model prediction for polychroma-tor channel 4. Interestingly, there there appears to be no cleardifference in the offsets observed for the single- and double-laser-pulse data. B. Numerical integration
In the presence of distorted signals from the polychroma-tor, the integrals of the signals may provide a more accuraterepresentation of the detected scattered light than the ampli-tudes alone. To test this, we implemented a modified versionof the signal processing function that performs trapezoidal in-tegration on an interval of the signal of pre-determined lengthcentered around the peak value. This procedure is illus-trated schematically in Fig. 3b and 3e. Analogously to thecase of pulse amplitude determination, the integrals of signalsrecorded during the plasma discharge were corrected by sub-tracting the average integral value of a set of stray laser lightsignals obtained before the beginning of the plasma discharge.The switch from pulse-amplitude determination to numer-ical integration has minimal impact on computation time,which is an important consideration for real-time applications.The time for each numerical integration was typically ≤ µ seal-time Thomson scattering evaluation on LHD 3 S i gna l ( V ) (a) Peak detection DataPulse amplitudeBackground Level (b) Numerical integration
DataIntegrated regionBackground Level (c) Gaussian fitting
DataIntegrated regionBackground Level t (ns) S i gna l ( V ) (d) Peak detection DataPulse amplitudeBackground Level t (ns) (e) Numerical integration
DataIntegrated regionBackground Level t (ns) (f) Gaussian fitting
DataIntegrated regionBackground Level
FIG. 3. Typical signal from a polychromator channel along with depictions of the three methods for evaluation considered in this work: (a)peak detection, (b) numerical integration, and (c) Gaussian curve-fitting for a signal arising from light scattered from a single laser pulse;(d)-(f) like (a)-(c) but for a signal arising from light scattered from two overlapping laser pulses. greater than the time for amplitude determination; hence, toevaluate the five polychromator outputs necessary for a spec-tral fit, the added time would not exceed 5 µ s. This is negli-gible compared to the laser firing period of 16 . C. Curve fitting
One way to avoid contributions from background fluctua-tions is to use the integral of a waveform fitted to the signalrather than the integral of the raw signal itself.
To thisend, we implemented an additional function that fits Gaussian curves to the raw signal and outputs the integrals computedanalytically from the fitting parameters. Specifically, signalsfrom single laser pulses were fit to functions of the form f single ( t ) = p + p exp (cid:20) − ( t − p ) p (cid:21) (2)with free parameters p ... , and signals arising from doublelaser pulses were fit to functions of the form f double ( t ) = p + p exp (cid:20) − ( t − p ) p (cid:21) + p exp (cid:20) − ( t − p ) p (cid:21) (3)with free parameters p ... . The true signal waveform is notexpected to exactly match the Gaussian form of the laser pulsedue to the effects of the amplifier circuitry. However, a moreprecise model would be more computationally expensive, andwe expect that the Gaussian fits will provide sufficient accu-racy for the purposes of real-time analysis.The parameters p i are determined in a least-squares fittingprocedure. The integrals of the fitted curves follow from theparameters as √ π p p for single pulses and √ π ( p p + p p ) for double pulses. The choice of whether to fit to f single or f double can be made based on signals recording the energyof the lasers, which the system also uses in the calculation of n e : if two laser energy channels record nonzero signals, f double is employed; otherwise, f single is applied.The success of the fits relies upon reasonable choices ofinitial guesses for the free parameters. Initial values for thebackground level p , amplitude p , and time offset p canbe determined easily from the peak-detection and backgroundeal-time Thomson scattering evaluation on LHD 4 P o l yc h r o m a t o r s i gna l ( a r b . un i t s ) (a) Peak detection Ch. 1Ch. 2Ch. 3Ch. 4Ch. 5Data(single)Data(double) P o l yc h r o m a t o r s i gna l ( a r b . un i t s ) (b) Numerical integration T e (keV) P o l yc h r o m a t o r s i gna l ( a r b . un i t s ) (c) Integration of fitted pulse Shot: 160038, r = 3.683 m
FIG. 4. Comparison of calibration spectra with fitted polychroma-tor signals collected from the scattering volume at r = .
683 m, nearthe magnetic axis. Solid curves represent the expected relative sig-nals F i ( T e ) from each polychromator channel. Circles represent thesignals s i from each channel, divided by the scaling factor c and po-sitioned to T e according their respective spectral fits. Filled circlesarise from single laser pulses; open circles arise from double pulses.(a) Signals determined through peak detection; (b) numerical inte-gration; and (b) integration of an integrated Gaussian fit curve. averaging procedures described in Sec. II A. Since the pulsewidths are relatively consistent across laser pulses, the param-eter p (and p for double pulses) is initialized to a presetvalue. Finally, for double pulses, the time offset p is ini-tialized based on a preset fixed offset relative to p and theamplitude p is initialized based on a preset ratio to p .While this curve-fitting approach usually yields a more ac-curate estimate of the scattered light received by each poly-chromator channel than simple integration, the procedure re-quires more computation time. Within each least-squares it-eration, the exponential function must be evaluated at leasttwice for every time point within the integration window. Inaddition, an n × n matrix inversion must be performed, where n is the number of free parameters. With good choices ofinitial guesses, fits typically require three to five iterations toconverge. We employed the Armadillo C++ linear algebralibrary to ensure efficient matrix inversion.A survey of processing times over five example shots indi-cated that 95% of fits of signals to f single took less than 30 µ s.Fits to f double took less than 65 µ s for 75% of signals and less than 175 µ s for 95% of signals. The time to processthe signals from five polychromator channels, then, would be ≤ µ s for single laser pulses and ≤ µ s for double laserpulses. Given that the system was previously qualified to per-form all data acquisition and analysis within 16.7 ms or less(a 60 Hz repetition rate) with the pulse amplitude method, itshould still be able to accommodate a 30 Hz repetition rateeven with an additional 1 ms for curve fitting. III. TEMPERATURE MEASUREMENT COMPARISON
Fig. 5 shows a comparison of temperature estimates usingscattered light signal levels evaluated with the three differentmethods described in Sec. II. Fig. 5a shows the temperaturesdetermined for the scattering volume near the magnetic axisat r = .
683 m during discharge 160038. As a reference,we have also included values output from the standard LHDpost-processing software. Fig. 5b shows the differences be-tween T e evaluated by the three methods and the referencepost-processed values for each laser pulse.Overall, the values of T e as computed by all three meth-ods track well with the reference values, almost always agree-ing to within 0.5 keV. However, the sources of error for thepulse amplitude and numerical integration methods as dis-cussed in Sec. II A and II B are also apparent. The valuesdetermined from the pulse amplitudes exhibit a positive dis-crepancy (288 ±
181 eV) with the reference values arisingfrom systematic errors in the spectral fitting. The values de-termined from numerical integration exhibit a larger scatter(standard deviation of 280 eV) than the other two methodsdue to the impacts of noise on the integration. Finally, the val-ues of T e determined through Gaussian curve fitting exhibita level of scatter (207 eV) closer to the pulse amplitude ap-proach (181 eV) but without a systematic offset from the ref-erence values. The tendency of curve-fitting analysis methodsto produce T e values with less scatter than direct signal inte-gration has also been observed, for example, in the Thomsonscattering system at KSTAR. IV. CONCLUSIONS AND FUTURE WORK
In summary, we have adapted and commissioned a real-time evaluation system for Thomson scattering on the LHDexperiment, representing the first in situ operation of the sys-tem. We have implemented and compared three differentapproaches to evaluating the polychromator signals, each ofwhich offers advantages and disadvantages. The curve fittingapproach generally provides the greatest accuracy and preci-sion, but at the expense of extra computational time. For allmethods, isolated spikes in the fitted temperature due to unex-pected features in the signal are rare but unlikely to be com-pletely avoidable. Hence, filtering of the output—through cir-cuitry or additional software features—is advisable. Never-theless, initial comparisons of T e output by all three methodsmostly exhibit good agreement with values calcuated by thestandard post-processing software.eal-time Thomson scattering evaluation on LHD 5 T e ( k e V ) (a) Pulse amplitudeNumerical integrationGaussian fittingPost-processing0 1 2 3 4 5 time (s) D i ff. f r o m r e f e r en c e ( k e V ) (b) Shot: 160038, r = 3.683 m
Mean offsets (1.0 s - 4.0 s):Pulse amplitude: 288 ±
181 eVNumerical integration: 112 ±
280 eVGaussian fitting: 31 ±
207 eVMean offsets (1.0 s - 4.0 s):Pulse amplitude: 288 ±
181 eVNumerical integration: 112 ±
280 eVGaussian fitting: 31 ±
207 eV
FIG. 5. Comparison of T e calculated by the standard LHD post-processing routines to T e calculated by functions from the real-timecode employing different methods for handling polychromator sig-nals. (a) T e calculated for the scattering volume at r = .
683 m dur-ing discharge number 160038; (b) Difference between T e calculatedby the different methods and the post-processing values. The shadedregion indicates the uncertainty of the post-processing values. Themeans and standard deviations of the differences for the methods forsamples between 1.0 s and 4.0 s are shown in the inset. In addition to providing estimating T e , the system calculates n e for each laser pulse using the fitting parameter c (Eq. 1)along with data from Rayleigh or Raman calibrations. Nextsteps will include benchmarking n e output against the valuesfrom standard Thomson post-processing. We then plan to uti-lize the system’s outputs to assist in experiments. One appli-cation will be to provide input for regulation of the electrontemperature profile with electron cyclotron heating. The sys-tem may also help to inform experiments to shape the densityprofile with pellet fueling. The findings in this study will alsoinform the deployment of the original implementation of thesystem in the upcoming operation phase of NSTX-U. ACKNOWLEDGMENTS
The authors would like to thank B. P. LeBlanc for thehelpful discussions. This work was supported by the USDepartment of Energy under contracts DE-AC02-09CH11466and DE-SC0015480. The data that support the findings ofthis study are available from the corresponding author uponreasonable request. I. Hutchinson,
Principles of Plasma Diagnostics , 2nd ed. (Cambridge Uni-versity Press, 2002). C. M. Greenfield, G. L. Campbel, T. N. Carlstrom, J. C. DeBoo, C.-L.Hsieh, R. T. Snider, and P. K. Trost, Review of Scientific Instruments ,3286 (1990). S. Shibaev, G. Naylor, R. Scannell, G. McArdle, T. O’Gorman, and M. J.Walsh, Fusion Engineering and Design , 683 (2010). S. Shibaev, G. Naylor, R. Scannell, G. J. McArdle, and M. J. Walsh, in
Proceedings of the 17th IEEE-NPSS Real Time Conference (2010). E. Kolemen, S. L. Allen, B. D. Bray, M. E. Fenstermacher, D. A.Humphreys, A. W. Hyatt, C. J. Lasnier, A. W. Leonard, M. A. Makowski,A. G. McLean, R. Maingi, R. Nazikian, T. W. Petrie, V. A. Soukhanovskii,and E. A. Unterberg, Journal of Nuclear Materials , 1186 (2015). H. Arnichand, Y. Andrebe, P. Blanchard, S. Antonioni, S. Couturier,J. Decker, B. P. Duval, F. Felici, C. Galperti, P.-F. Isoz, P. Lavanchy, X. Llo-bet, B. Marlétaz, P. Marmillod, J. Masur, and the TCV team, Journal ofInstrumentation , C09013 (2019). F. M. Laggner, A. Diallo, B. P. LeBlanc, R. Rozenblat, G. Tchilinguirian,E. Kolemen, and the NSTX-U team, Review of Scientific Instruments ,043501 (2019). R. Rozenblat, E. Kolemen, F. M. Laggner, C. Freeman, G. Tchilinguirian,P. Sichta, and G. Zimmer, Fusion Science and Technology , 835 (2019). I. Yamada, H. Funaba, R. Yasuhara, H. Hayashi, N. Kenmochi, T. Minami,M. Yoshikawa, K. Ohta, J. H. Lee, and S. H. Lee, Review of ScientificInstruments , 11E531 (2016). K. Narihara, K. Yamauchi, I. Yamada, T. Minami, K. Adachi, A. Ejiri,Y. Hamada, K. Ida, H. Iguchi, K. Kawahata, T. Ozaki, and K. Toi, FusionEngineering and Design , 67 (1997). K. Narihara, I. Yamada, H. Hayashi, and K. Yamauchi, Review of ScientificInstruments , 1122 (2001). I. Yamada, K. Narahara, H. Funaba, T. Minami, H. Hayashi, T. Kohmoto,and the LHD experiment group, Fusion Science and Technology , 345(2010). I. Yamada, K. Narihara, H. Hayashi, H. Funaba, and the LHD experimentgroup, Plasma and Fusion Research , S1106 (2007). B. P. LeBlanc, R. E. Bell, D. W. Johnson, D. E. Hoffman, D. C. Long, andR. W. Palladino, Review of Scientific Instruments , 1659 (2003). A. Diallo, B. P. LeBlanc, G. Labik, and D. Stevens, Review of ScientificInstruments , 10D532 (2012). A. C. Selden, Physics Letters , 405 (1980). B. Kurzan, M. Jakobi, H. Murmann, and the ASDEX Upgrade team,Plasma Physics and Controlled Fusion , 299 (2004). S. A. Bozhenkov, M. Beurskens, A. Dal Molin, G. Fuchert, E. Pasch, M. R.Stoneking, M. Hirsch, U. Höfel, J. Knauer, J. Svensson, H. Trimiño Mora,R. C. Wolf, and the W7-X team, Journal of Instrumentation , P10004(2017). C. Sanderson and R. Curtin, Journal of Open Source Software , 26 (2016). C. Sanderson and R. Curtin, “A user-friendly hybrid sparse matrix class inC++,” (Springer, 2018) p. 422. J. H. Lee, H. J. Kim, I. Yamada, H. Funaba, Y. G. Kim, and D. Y. Kim,Journal of Instrumentation12