Optimization of the equilibrium magnetic sensor set for the SPARC tokamak

Accurate reconstruction of the plasma equilibrium is imperative for successful operation of the SPARC tokamak. In order to assess the expected reconstruction accuracy throughout the duration of design-point discharges, the EFIT equilibrium reconstruction code was deployed for SPARC. Reconstructions from SPARC baseline scenarios were compared with free-boundary equilibria generated by FreeGS, Toksys, and the Tokamak Simulation Code. The key geometric areas of interest, where design constraints are imposed, included: the inner and outer midplane gaps, the X-point locations, as well as the strike point locations. Successful reconstructions of various reference discharges, using deviations in these key geometric quantities as metrics, were calculated from synthetic signals considering an optimized equilibrium magnetic sensor set. The optimization process for this sensor set combined a scan of randomized sensor placement with a linear perturbation analysis to determine critical sensor locations, while simultaneously conforming to design constraints on the sensor placement. This optimized set was also successful in performing equilibrium reconstructions with the addition of error to synthetic measurements of magnetic flux and magnetic field, as well as contributions from eddy currents in conducting structures. These methods represent a workflow of optimization and validation that balances the engineering constraints of sensor placement with achieving sufficient reconstruction fidelity for science and operations missions for SPARC.


Introduction
In order to successfully operate future burning plasma experiments such as the SPARC tokamak [1], the plasma Original Content from this work may be used under the terms of the Creative Commons Attribution 4.0 licence.Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.position and the magnetic geometry must be sufficiently determined to prevent damage to plasma facing components, maintain plasma stability, and ensure proper heat exhaust in the divertor region.The main method widely used for determining the magnetic geometry, along with many other quantities vital for tokamak operation and plasma control, is a process known as equilibrium reconstruction.Reconstructions of tokamak equilibria generally involve solving the magnetohydrodynamic force balance between the kinetic pressure gradient and the electromagnetic Lorentz force captured in the Grad-Shafranov equation [2,3].In particular, the 2D axisymmetric Grad-Shafranov solver EFIT [4], is widely used throughout the fusion community [5], including on devices such as DIII-D [6,7], JET [8], C-Mod [9], KSTAR [10,11], NSTX [12], NSTX-U [13], Tore Supra [14], and EAST [15,16].In experiments, the EFIT code uses a Picard iteration method to solve the Grad-Shafranov equation by fitting the equilibrium solution to the input data provided by various diagnostics.One of the most important diagnostics, which are generally sufficient to reconstruct the shape of the plasma boundary, are the magnetic sensors.These include: flux loops, magnetic pickup coils (Mirnov probes), and Rogowski coils [17].In lieu of experimental measurements of real equilibria, since SPARC is still under construction, synthetic measurements sampled from equilibria generated by the Tokamak Simulation Code (TSC) [18], Toksys [19], and FreeGS [20] are used as inputs to EFIT.Using this method, the EFIT reconstructed equilibria can then be compared directly to these sets of synthetic equilibria to assess the reconstruction accuracy, given a reference magnetic sensor set.A similar process was also used in a recent study of ITER equilibrium reconstructions [21].
The design of the magnetic sensor set for SPARC requires that these equilibrium reconstructions sufficiently meet the design tolerances for various important geometric quantities such as the midplane inner and outer gap distances between the plasma boundary and the first wall, strike point locations, and X-point locations.To ensure that these tolerances are met, the magnetic diagnostic design process can be separated into two sequential segments.First, the magnetic sensor set placement and number of sensors can be optimized for high fidelity reconstructions.The two optimization methods that will be discussed here are randomized sensor location scans and a linear perturbation analysis, similar to the analysis described in [22].The second segment of the design process involves validating a given magnetic sensor set against possible sources of error, such as eddy currents in the surrounding conducting structures and sensor noise, as well as validating the sensor set for different operational scenarios (e.g.double null, single null, and X-point target [23,24] equilibria).SPARC also has a unique set of reconstruction challenges to surmount with its suite of diagnostics, which includes tight design tolerances due to a close-fitting conducting first wall and advanced divertor scenarios (strike point sweeping [25][26][27] and X-point target configurations).
The following sections are organized in a framework mirroring the design process itself.First, the methods for assessing the reconstruction error and the EFIT workflow organization will be laid out in section 2. Next, the two methods (randomized sensor scans and linear perturbation analysis) for optimizing the magnetic sensor set will be discussed in detail in section 3. The final design, considering the full engineering and spatial constraints on the possible sensor locations, will conclude section 3. Having determined an optimized sensor set, the diagnostic suite will be tested for several SPARC baseline scenarios with the addition of sensor noise, sensor drop-outs, and vessel eddy currents in section 4. A brief study of sensor redundancy using different numbers of toroidal sensor sets will also be presented in section 4. Finally, the main conclusions for the study will be summarized in section 5.

Methods for assessing reconstruction error
The process for reconstructing a synthetic plasma equilibrium begins with the generation of an original or reference equilibrium using a free boundary, Grad-Shafranov solver.For this work, the three different codes used to generate synthetic equilibria for various different shapes and scenarios were TSC, Toksys, and FreeGS.An example of a FreeGS generated equilibrium is depicted in figure 1(a), along with the locations of the equilibrium magnetic field coils (including the central solenoid, poloidal field coils, coils for control of the magnetic geometry of the divertor, and the vertical stability coils) and the inner and outer vacuum vessel walls.It should be noted that TSC and Toksys allow for the inclusion of accurately simulated eddy currents in modeled conducting structures (e.g. the vacuum vessel and support structures) via the time dependent evolution of both the plasma and the equilibrium magnetic coil currents.Once an equilibrium with an appropriate geometry is produced by one of these codes, it is then sampled for the synthetic magnetic diagnostic input information to be given to EFIT.For all of the reconstructions in this study, the EFIT grid size was set to 65 × 65, and the current profile parametrization was set by a first order polynomial function for p ′ (ψ) and a second order polynomial function for FF ′ (ψ).This workflow is summarized in figure 1(b).
The two main categories of magnetic diagnostic signals for these reconstructions are magnetic flux (measured by flux loops) and magnetic field (measured by magnetic pickup coils).The magnetic field probes can be further broken up into two categories depending on their orientation: magnetic field sensors aligned parallel to the vacuum vessel wall (denoted B p here) and magnetic field sensors that are oriented normal to the vessel wall (denoted B n ).It should also be indicated that the vast majority of magnetic flux diagnostics on SPARC will be partial or saddle flux loops due to design constraints on the diagnostic set.These design constraints include spatial limitations due to vacuum vessel ports and support structures for the first-wall, as well as the practical challenges (both monetary and temporal) of installing full toroidal flux loops while the vacuum vessel is in two halves and then integrating them when the vessel is combined.However, it is possible to recover the full flux signals from the set of partial flux signals which wrap around the entire poloidal extent of the device via a system of coupled equations.Given this conversion, the work in this study will use the calculated full flux loop signals for the inputs to EFIT instead of the partial flux loop signals.It remains the task of ongoing work to implement partial flux loop signals into EFIT to further improve the accuracy of this analysis.The other inputs given to EFIT, besides these two main classes of magnetic diagnostics, are the poloidal field coil currents, the ohmic heating coil current, the vertical stability coil current, the plasma current, and the strength of the toroidal magnetic field.Diagrams of (a) the SPARC vacuum vessel and equilibrium magnetic field coils (excluding the toroidal field magnets) and, (b) the workflow for generating and comparing the equilibrium reconstructions from EFIT to the original synthetic equilibria.Note that changes to sensor locations (e.g. in the optimization process) and machine geometry require the Green's function tables to be regenerated through the EFUND module.
After sampling the synthetic equilibrium for this magnetic information, EFIT performs an equilibrium reconstruction; fitting to the synthetic diagnostic information.The reconstructed equilibrium is then compared with the original, reference equilibrium for geometric errors.The error in the plasma boundary is calculated via the method illustrated in figure 2, where the boundaries of the EFIT and reference equilibria are parametrized by poloidal angles centered on the magnetic axis of the reference equilibrium.The geometric distance between the contours of the two boundaries at each poloidal angle defines the EFIT boundary error.This error is represented in figure 2(a) by the distance between a point (marker) on the EFIT boundary (red) and a point on the FreeGS boundary (black) that lie at the same poloidal angle, as indicated by the radial rays (gray) emanating from the magnetic axis of the reference equilibrium.The main geometric quantities of interest, that have associated SPARC design tolerances, are summarized in table 1.
These include the plasma inner and outer gaps at the midplane, the strike point locations (indicated in figure 2), the Xpoint locations, and the coordinates of the current centroid.The strike points also have the constraint that their angles of incidence with the divertor targets must be within 1 • of the actual incidence angle in the reference equilibrium (this angle refers to the incidence angle in the poloidal plane).Errors in the geometric quantities that breach these initial design tolerances would indicate a failure of the magnetic sensor set to accurately reconstruct the equilibrium.Minimizing the error  The errors in some of the important geometric quantities of interest, including the strike points, X-points, and magnetic axis are also indicated using the same color scheme for the geometric distance between the reference equilibrium coordinates and the EFIT reconstruction coordinates.
in these geometric quantities is the goal of the optimization methods that will be presented in the next section.

Optimization of the magnetic sensor set
Given the tight requirements for equilibrium reconstructions on SPARC, as well as the need to minimize costs and space (both in-vessel and feedthrough) for an economical reactor concept, it is important to optimize the magnetic sensor placement and minimize the number of required sensors.This optimization must also be performed while maintaining some redundancy in case of sensor failure.The two methods employed here are: (1) scans of randomized sensor locations on the vessel walls to find an optimal set in combination and (2) a linear perturbation analysis, which indicates where small scale changes in the equilibrium cause the greatest changes to the magnetic signals.In this way, the linear perturbation analysis identifies which sensor locations (and orientations) would be the most sensitive for determination of the proper equilibrium geometry.

Method 1: randomized sensor location scans
The first method described here is a type of random optimization, in which the locations of the sensors in the set are randomly varied along the vessel contour for a given number of sensors.For each new random set of sensors, the necessary Green's function tables for the solutions to the Grad-Shafranov equation are regenerated in EFUND (a module of the EFIT code), and the synthetic or reference equilibrium is sampled given the new sensor locations or orientations (the angles of the B n and B p sensors are also recalculated given the new wall locations).After iterating through a sufficient number of random sensor sets (generally hundreds to thousands) and performing reconstructions with these sets, the set or top 5% of sets with the lowest error in the geometric quantities of interest defined in table 1 are taken to be the optimal sets.A similar procedure was performed for the design of the magnetic diagnostics on KSTAR [10].While all of the sensors in the set can be optimized at once via this randomization method, it was found that optimizing a certain subset of sensors, while keeping the other sensors in fixed locations, provided a more structured approach that provided some stability to the reconstructions.First, an initial reference sensor set was devised, which could accurately reconstruct the equilibrium to within the design tolerances, with magnetic sensors spread relatively uniformly along the vessel wall in locations that were reasonable given experience on previous tokamak experiments.Then, segments or subsets of the sensors, for example sensors located within the divertor region, had their locations randomized.This stabilizes the equilibrium reconstructions in the regions where the initial reference sensor set is held fixed, but allows the reconstructions to vary in the regions where the sensors are randomized in location.
An example of this method is shown in figure 3, where the B p sensors in the divertor region have been varied randomly, but the rest of the sensor set is held fixed.The randomization is performed by dividing the inner vacuum vessel contour for the divertor up equidistantly into 6 mm increments and placing the finite number of sensors randomly at these increments along the contour.No other geometric constraints, besides the vessel contour, were considered at this point.Clearly, the set in figure 3(a) represents an non-optimal sensor distribution with the sensors being aggregated on the inboard side of the device.This leads to larger errors on the X-point and strike point locations.In contrast, the optimized set in figure 3(b), is more evenly distributed throughout the divertor region and successfully reconstructs the X-point and strike point locations to within 1-2 mm of the reference equilibrium.The process illustrated here for the divertor region was repeated on the inboard and outboard subset of sensors near the device midplane, with a focus now centered on reducing the inner and outer midplane gap error (since changing these sensors hardly effects the reconstruction of the divertor region).The method was also repeated for flux loop locations and locations of the B n sensors in the different regions.The end result identifies the optimal locations for magnetic field sensors and flux loops for the best possible equilibrium reconstructions.However, it should be noted that in many cases, the placement of the sensors in the optimized set needed to be adjusted based on spatial limitations and engineering design requirements for SPARC.Thus, the results of this method represent a best case scenario for the magnetic sensor placement and a helpful guide in the final design locations.

Method 2: linear perturbation analysis
The second method employed to optimize the magnetic sensor set was a linear perturbation analysis, in which the equilibrium geometry was slowly varied in a Grad-Shafranov solver (here, FreeGS was implemented), with the intent of finding sensors that would be the most sensitive to these small scale changes.In the case presented in this study, slowly refers to a rate of perturbation to the plasma boundary or separatrix that does not exceed a few mm's to a few cm's per increment.A suite of virtual magnetic sensors including flux loops, B p sensors, and B n sensors were positioned all along the inner vessel wall in order to sample the signals that would be measured for each of the varying FreeGS equilibria.In the example case presented here, the divertor region will once again be the focus, however other regions (e.g. the outer and inner gaps) can also have the same analysis performed given a set of slowly varying synthetic equilibria.
For the first step of the process, a series of strike point sweep equilibria was chosen for the analysis.The slight changes in the magnetic geometry of the divertor region as the strike point locations are swept back and forth across the divertor targets make this sequence of altered equilibria similar to an oscillating perturbation about the standard double null equilibrium.The magnetic signals are then sampled from each point in the time series of the strike point sweep and are subtracted from the average of all of the signals from the time series to determine the perturbation in the signal.In this way, if very little change occurs in the sensor signal throughout the sweep, the perturbed signal will be near zero, whereas the sensors that see large changes in signal will be accentuated.
The next step in the process is to perform a singular value decomposition (SVD) on the perturbed signals measured on all of the sensors.This breaks the information down into constituent modes, which allows for the quick identification of regions with the highest sensitivity.Performing the SVD also reveals subtleties in the data, including lower order mode structures that might be obscured by simply identifying where the perturbed signal is largest from the previous step.The results for the singular value decomposition performed on the B p signals from the strike point sweep sequence are shown in figure 4. For this case, the SVD was performed on a 10×1560 matrix, corresponding to the ten time slices in the sweep and the 1560 different sensors along the vessel wall.From these results, the first mode has a corresponding singular value that is an order of magnitude larger than any of the other modes.This dominant mode structure, depicted along the inner vessel contour in figure 4(b), indicates that the B p sensors which would see the largest changes in the divertor geometry are located in the divertor region, near the strike point locations.While other sensors see changes in the measured signals, the overwhelming majority of the sensitivity is concentrated in the high amplitude regions of the divertor.The linear perturbation analysis therefore specifies these regions as important locations for B p sensors, where they are most likely to detect changes in the divertor geometry and which would be important to include in equilibrium reconstructions.
The same process outlined here for the divertor B p sensors was also carried out for the flux loops and B n sensors with similar results gleaned (areas in the divertor region were highlighted for sensor placement).With this analysis and the previous randomization analysis in hand, the optimal locations for the magnetic sensors have been identified.After determining these optimal locations and arrangements for the sensors, the final task is to determine where the sensors can be placed given design constraints and the available space on the vessel wall.

Sensor layout considering design constraints
After completing the two optimization processes for the magnetic sensor set, the spatial limitations due to the design of the vacuum vessel, first wall, and the necessary support structures were taken into consideration.This restricted the locations of the sensors, with many small adjustments required from the initial optimized, 'idealized' sensor set.It was important to perform this step last in the full design process as the space along the vessel wall can in some cases be negotiated or worked around.This is especially true for critical sensors identified through this analysis that are determined to be required to achieve the operation goals of SPARC.By first imposing the spatial limitations as constraints on the optimization process, crucial locations of sensors could possibly be missed (specifically in the randomized sensor location scan).
The final magnetic sensor set, shown in figure 5(a), takes all of the previous analysis into account, while also adhering to the available space along the inner vessel wall (including space limitations from vacuum vessel ports and first-wall support structures).From sensor redundancy analysis and design requirements for magnetohydrodynamic mode analysis beyond the scope of this paper, it was determined that the full SPARC equilibrium magnetic sensor set would also consist of four separate toroidal sets of this poloidal reference set of magnetic diagnostics (as shown in figure 5(b)).Using this new, optimized and adjusted magnetic sensor set, the next step in the design process is to determine if the set is capable of reconstructing several different SPARC baseline scenarios to within the required design tolerances.

Reconstructions of baseline scenarios
In order to determine if the reference magnetic sensor set is sufficient to satisfy the design requirements of SPARC, three major categories of tests based on SPARC baseline scenarios were devised to challenge the ability of the sensor set to reconstruct different equilibria.The first of these tests was to vary the magnetic geometry using three different baseline scenarios: the standard double null equilibrium, the X-point target scenario (which includes a more complicated divertor geometry), and finally, a lower single null equilibrium.The reconstruction of the lower single null equilibrium evaluates the ability of the sensor set to determine an up-down asymmetric equilibrium configuration.Since the sensors in the reference sensor set are duplicated between the upper and lower halves of the vacuum vessel wall (enforced symmetry in the design), the results from the analysis of the lower single null equilibrium would also directly translate to an analogous evaluation of an upper single null equilibrium.
The reconstructions of these primary equilibrium geometries using the reference magnetic sensor set are shown in figure 6.In all of these scenarios, EFIT is able to reconstruct almost the entire boundary of the equilibrium to within 1-2 mm, while also reconstructing the divertor geometry to within the design tolerances.The most challenging equilibrium to reconstruct was the asymmetric lower single null equilibrium, where the strike point incidence angles were near the design tolerances of ±1 • in the poloidal plane.In general, the tightest design tolerances on the outer midplane gap (±2 mm) and the strike point angles were the most difficult to meet in these reconstructions and are highly restrictive compared to present day machines.These tight tolerances are due to the need for effective coupling of the ICRF antenna on the outboard side of the machine in the case of the outer miplane gap and due to the need to control the position and spread of the heat load to the divertor in the case of the strike point angle.Even so, the successful reconstructions of all three of these baseline equilibrium geometries indicates that the reference sensor set has the capacity to perform high fidelity boundary and geometry determination for the various plasma shapes envisioned for SPARC.

Reconstructions with random sensor errors
Building on the success of the previous test, the next step in the validation process is to add randomized sensor noise to all of the sensors and determine if the magnetic geometry of the equilibrium can still be determined to within the design tolerances.This Monte Carlo analysis was performed using hundreds of different configurations of error on the sensor set, with the range of error added to the signals defined by a normal distribution with a standard deviation of 2% error on the signals.The value of 2% was chosen based on previous observations of sensor errors on the C-Mod tokamak.This value is also in-line with magnetic sensor errors quoted for the DIII-D tokamak, which were found to be around 1% for the poloidal array of magnetic probes, as well as for the vacuum vessel flux loops [28].The uncertainty in the magnetic sensors measurements on DIII-D included a wide range of sources of error including: loop calibration, integrator calibration, toroidal pickup, sensor position, sensor tilt, as well as pick up from leads and port connectors [28].
A selection of the resulting errors in the reconstructions for the Monte Carlo error analysis on the double null equilibrium are summarized in figure 7. Here, it is clear that the spread in the error of the X-point coordinates in the reconstructions are well within the design tolerances (figures 7(e) and (f )).The same is true for the inner gap error and the spatial errors of the inner strike point in figures 7(c) and (g) respectively.
While the spread in the reconstructions errors in the Z and R-coordinates of the magnetic axis (figures 7(a) and (b)) reached ±2 mm, the lower tolerances and the systematic error of 1 mm on the Z-coordinate resulted in many of the reconstructions being above the ±2 mm restriction.The same is true for the outer gap, figure 7(d), where the spread in the distribution and the systematic error of −1 mm lead to several of the reconstructions breaching the tolerances.The upper, outer strike point also had a handful of reconstructions that were beyond the 1 cm spatial tolerance (figure 7(h)), however the angular design tolerance was breached for almost all of the strike point locations (figures 7(i) and (j)).In all of these cases of angular errors, if the systematic error was reduced, then the spread in the reconstruction error would be within the design tolerances (i.e.tolerable).The systematic errors in the reconstructions here (including the ∼1 mm downward shift in the equilibrium) can be attributed to inaccuracies in the sampling of the synthetic equilibria for magnetic sensor information, and the reality of using a finite sensor set with fixed sensor orientations for the reconstruction.These inaccuracies in sampling can stem from errors in the interpolation of the flux signals from the gridded poloidal flux from the reference FreeGS equilibrium, or the interpolation of the magnetic field signals from the gradients in the flux.Any asymmetries in these interpolation errors would introduce asymmetries in the reconstructed equilibrium.The results indicate that the addition of a reasonable amount of sensor noise results in reconstructions which deviate by roughly 1-2 mm for the spatial design tolerances, and fractions of a degree for the strike point incidence angles in the poloidal plane.This is an issue mainly for the outer gap and Zcoordinate of the magnetic axis, whose coordinates are restricted by a tight ±2 mm tolerance.If the systematic errors in these quantities are corrected, all of the reconstructions are within or near the design tolerances.These corrections could be made based on other diagnostics or observations during operation, for example coupling to the ICRF antenna for the determination of the midplane outer gap.Even so, these results suggest some of these tolerances are at the edge of what is achievable given a finite set of sensors having a set distance from the plasma and experimental error.
The same procedure outlined above was performed on the X-point target scenario, with similar results, to ensure that more complicated divertor geometries could also be reconstructed when error was present on the sensor signals (for the sake of brevity, these results will not be detailed here).Overall, the analysis shows that the equilibrium reconstructions of the plasma boundary and divertor geometry with this sensor set are robust (only a few millimeters or fractions of an angle deviation) to a reasonable amount of sensor noise, even with the incredibly tight tolerances and expectations placed on the system.

Reconstructions with missing sensors
Next, to determine the effect of sensor loss on the accuracy of the equilibrium reconstructions, an analysis was performed where random combinations of sensors in the poloidal set had their signals omitted from the inputs to the reconstruction.This is similar to the previous Monte Carlo error analysis however, now random sensors are removed from the reconstruction entirely.To clarify the effect of sensor loss alone, randomized sensor errors were not added as in section 4.2.The results of this analysis for hundreds of different sensor loss combinations are shown in figure 8.For the sake of brevity, only the cases with 5/58 (9%) and 17/58 (29%) of the sensors omitted are shown.Runs with several other percentages of sensors lost were also analyzed, but the trend is capture with these two cases.Additionally, only the quantities with the tightest tolerances that were shown to be prone to issues in section 4.2 are presented here.
The results indicate that as the number of sensors lost increases, the spread in the error in the plasma boundary reconstruction also increases.Indeed with only 9% of the sensors lost, almost all of the reconstructions are within the tolerances (even without removing the systematic errors).This spread begins to breach the design tolerance by an appreciable amount when the number of sensors missing approaches 30%, as indicated by the blue histogram bars in figure 8. Since there is redundancy inherit to this system, with four duplicates of each sensor of the poloidal set in the toroidal direction, all four of these sensors would have to be lost before a single poloidal sensor location would be unavailable for equilibrium reconstructions.A separate analysis, detailed in the next section, on the loss of sensors in each of the toroidal sets determined that a loss of up to 30% of the poloidal locations of magnetic sensors was incredibly unlikely.
Thus, the results of this sensors loss analysis show that the equilibrium reconstructions with the reference sensor set are still able to accurately reconstruct the plasma boundary and divertor geometry, even in the cases where an unrealistic number of sensors in the full set have been lost.Another important set of information provided by this analysis and the previous Monte Carlo analysis was the identification of the worst configurations of sensors lost and the worst configurations of errors on the sensors.This pin points the crucial combinations of sensors that, if lost, would be the most dangerous for operation given the impact on the reconstructions.

Redundancy of multiple sensor sets
The EFIT loss-of-sensor study in section 4.3 assumes that there is a single set of 58 equilibrium sensors (B p , B n , and saddle flux loops) distributed around a poloidal cross section on the SPARC vacuum vessel interior perimeter.However, SPARC will have several identical 58-element equilibrium sensor sets located at different toroidal locations around the torus.Therefore, the loss of a sensor, as envisioned in the EFIT study, actually entails the loss of the sensor at that specific poloidal location at every one of the multiple identical poloidal sensor sets.The likelihood of this is obviously reduced by having multiple sets of sensors, assuming that sensor loss is uncorrelated among the multiple sets.But, exactly how does the probability of complete sensor loss at any specific poloidal location depend on the number of sets, and what is the optimal number of equilibrium sensor sets?
This problem is conceptualized by starting with N × 58 sensors, where N is the number of redundant 58-element sensor sets (i.e.58-element sensor sets are installed at N toroidal locations).Each of the N × 58 sensors can have two possible states: 'good' or 'bad'.To begin with, all of the sensors are set to be 'good.'The state of the sensors is then switched to 'bad', one at a time, in random order, until all of the sensors are totally inoperative.This is meant to simulate the progressive failure of sensors during SPARC operation.Throughout the switching (i.e.failing) process, a running tabulation of the state of the N sensors at each of the 58 poloidal locations is maintained.When all N sensors at any particular poloidal location have become 'bad,' that represents a complete sensor loss at that specific poloidal location, as envisioned in the EFIT loss-of-sensor study.The metric of interest is the number of 'complete sensor losses' versus the total number of 'bad' sensors as operation progresses.An example of this computation is shown in figure 9(b) for the case where there are 4 toroidal sets of equilibrium sensors (i.e.N = 4), for a total of 4 × 58 = 232 sensors.The thick black line shows the fraction of the 58 poloidal locations that have complete sensor loss (vertical axis) versus the total fraction of 'bad' sensors (horizontal axis).For this particular case, we see that a complete sensor loss at 20% of the poloidal locations requires losing ∼ 67% of all the sensors, as shown by the dashed red lines.Recall that a complete sensor loss below ∼ 30% of the poloidal locations is acceptable in terms of the EFIT-determined plasma parameters of interest.To put it another way, if four toroidal sets of equilibrium sensors are installed in SPARC, and two thirds of all the individual sensors failed randomly, EFIT would still be able to reconstruct the key plasma parameters within the required tolerances.The plots in figure 9 qualitatively and quantitatively show the value of having redundant sensor sets.
Since this computation involves a random process to determine the ordering of sensor failure, it produces slightly different results each time it is run.By running multiple cases and averaging the results, the statistical variation can be significantly reduced.Thus, all of the solid curves shown in figure 9(b) represent averages over 100 such cases.
The same framework can be used to calculate the redundancy for any number of N toroidal sets.This is useful for determining if there is an optimal number of toroidal sets of equilibrium sensors to install in SPARC, given that resources such as space, cost, and installation time are limited.The plots of sensor loss for N = 2, 4, and 6 are shown in figures 9(a)-(c).In this analysis, 100 cases were averaged for each N value to improve the statistics.As expected, the resiliency against complete sensor loss continues to improve as the number of redundant toroidal equilibrium sensor sets is increased.As shown by the dashed red lines in figures 9(a)-(c), a complete sensor loss at 20% of the poloidal locations requires failures of 45%, 67%, and 77% of all the individual sensors for N = 2, 4, and 6 respectively.Although resiliency to sensor loss continues to improve as more and more toroidal sets are added, the marginal improvement is less and less as N increases.
Figure 10 shows the required percentage of failed individual sensors in order to have a complete sensor loss at 20% of the 58 poloidal locations for N ranging from 1 to 10. Compared to having just one equilibrium set (N = 1), the addition of a second or third set markedly improves the resiliency to individual sensor failures.But, for N > 6, the improvement has noticeably diminishing returns.The 'knee' of the curve is in the range of N = 3-5 (circled in red).This result, along with requirements including space restrictions, cost, and schedule, led to the decision to include four toroidal sets of equilibrium sensors on SPARC.
Although it is beyond the scope of this work, it should be mentioned that the neutron fluence to the walls and magnetic diagnostics from the fusion produced in SPARC will be greater than in currently operating tokamak experiments.This poses some risk of damage to the diagnostic set on SPARC, including sensor failure, throughout its lifetime.These risks related to damage from the radiation environment of a fusion reactor have already been addressed in various studies for the ITER magnetic diagnostic set [29][30][31].However, it should likewise be noted that the neutron fluence for a SPARC-like device has been calculated to be fifteen times smaller than that for ITER [32], and the pulse length (with a flat top of 10 s) is over a magnitude shorter than for ITER.Nevertheless, the magnetic diagnostic set on SPARC will use standard shielding techniques to mitigate the risk of radiation damage (e.g. through the use of mineral insulated cable), and will be installed in conjunction with other materials with known properties when exposed to radiation (e.g.stainless steel and ceramics).Assessing the possible radiation damage to the magnetic sensor set on SPARC is a topic of on-going research.

Reconstructions during start-up
Finally, to assess the effects of eddy currents on the ability of the sensor set to perform accurate reconstructions, a time series of equilibria from start-up simulations in TSC were selected for analysis.This type of eddy current analysis may be crucial, given the proximity of SPARC's solid conducting vacuum vessel walls to the sensors.Since TSC includes time dependent calculations of the eddy currents in specified conducting structures, the magnetic fields produced by these eddy currents are also taken into account in the equilibrium files produced from the simulation.Two approaches were taken in EFIT to look at the impact of eddy currents on the reconstruction accuracy.First, the equilibria were directly sampled and the signals were given as inputs to EFIT without using a vessel model in EFIT to attempt to include the eddy currents in the reconstruction process.The results of this first approach are shown in figure 11, where the start-up equilibria from TSC have been reconstructed.In these cases, the reconstruction of the plasma shape is also complicated by the fact that the inner wall limited equilibria (especially in the earlier time sequences) have plasma boundaries that are farther away from the magnetic sensors located in the divertor region and on the outboard side of the machine.
Even with all of these complications and with the omission of the eddy currents in the EFIT reconstruction, the resulting errors in figure 11 are still within or close to the design tolerances.The main issue found from this analysis is a progressively worse reconstruction of the X-point location in the earlier time slices and a worsening of the reconstruction of the upper and lower plasma boundaries (by over 1 cm in the worst cases).However, accurate reconstructions of the X-point locations are not as important in the early parts of the time series, when the plasma is limited on the inboard wall.
When including the actual eddy currents from the initial TSC simulation into the EFIT reconstruction, very little change was found.The conclusion from this and the above analysis was that the eddy currents induced in the conducting structures (as simulated by TSC) during the ramp-up phase of the SPARC discharge were insufficient to greatly impact the reconstruction of the plasma boundary.This suggests that the reference sensor set will not be highly susceptible to large errors induced by eddy currents encountered during standard SPARC operation.One point of current research on this topic which would further this conclusion is the assessment of the impact of eddy currents during strike point sweeps.These relatively fast changes in the magnetic geometry and currents in the poloidal field coils may also provide a source of eddy current contributions that could impact the fidelity of the reconstructions.

Conclusion
Through an optimization process involving the randomization of sensor locations and a linear perturbation analysis, a reference equilibrium magnetic sensor set has been developed for the SPARC tokamak.This sensor set has been successful in reconstructing a variety of SPARC reference equilibria within the design tolerances laid out for successful operational goals.Monte Carlo analysis of the effect of added sensor noise shows that the reference sensor set can still accurately reconstruct the reference equilibria with low amounts of error on the geometric quantities of interest.To remain within the design tolerances, the error must be less than the 2% error assumed (i.e. the error distribution must have a standard deviation below 2%).A similar analysis with random sensor loss also shows that the reference sensor set can perform accurate reconstructions, even with an appreciable number of sensors omitted.These error analyses, along with the optimization process, have identified key sensors and sensor combinations necessary for high accuracy boundary reconstructions.The results from reconstructions of time dependent simulations of tokamak start-up, including eddy currents, similarly demonstrate that the magnetic sensor set devised for SPARC can perform successful reconstructions of the magnetic geometry through adverse phases of the planned discharge.Moreover, the techniques employed here to optimize and validate an equilibrium magnetic sensor set can be directly used for future devices, which may have constrained budgets, tight design tolerances, and engineering challenges that require high accuracy geometric information from equilibrium reconstructions determined by a limited sensor set.In addition, the future goals expanding on this work are focused on real-time applications (e.g.reconstructions using this reference sensor set for position and shape control), analysis of kinetic EFIT reconstructions using internal profile information from synthetic diagnostics, and implementation of more accurate wall models to further increase the accuracy of the reconstructions.

Figure 1 .
Figure1.Diagrams of (a) the SPARC vacuum vessel and equilibrium magnetic field coils (excluding the toroidal field magnets) and, (b) the workflow for generating and comparing the equilibrium reconstructions from EFIT to the original synthetic equilibria.Note that changes to sensor locations (e.g. in the optimization process) and machine geometry require the Green's function tables to be regenerated through the EFUND module.

Figure 2 .
Figure 2. Diagrams showing (a) the poloidal angle parametrization of the EFIT reconstruction and FreeGS (reference) equilibria boundaries and (b) the EFIT reconstruction boundary error given the geometric distance between the contours using this parametrization method.The errors in some of the important geometric quantities of interest, including the strike points, X-points, and magnetic axis are also indicated using the same color scheme for the geometric distance between the reference equilibrium coordinates and the EFIT reconstruction coordinates.

Figure 3 .
Figure 3.Comparison of the reconstruction errors for (a) a poor set and (b) an optimized set of magnetic field sensors in the divertor region.The magnetic field sensors and their orientations are indicated by the arrows and the region that was scanned for the randomized sensor locations is indicated in light blue.Note: almost all of the error in the suboptimal set is concentrated in the strike point and X-point locations (i.e. in the reconstruction of the divertor magnetic geometry).

Figure 4 .
Figure 4. Results of the linear perturbation analysis in the divertor region showing (a) the magnitude of the singular values for each of the SVD mode numbers and (b) the mode structure for the largest SVD mode for the perturbed magnetic field signal oriented parallel to vessel wall.

Figure 5 .
Figure 5. (a) Diagram of the magnetic sensor set devised from the optimization process, while taking into account the design constraints on sensor locations.Also indicated are several of the poloidal field coils and the contours of the inner and outer vacuum vessel walls.(b) Three dimensional diagram of the four sets of partial flux loops (shown in blue) and full flux loops (shown in orange).

Figure
Figure EFIT reconstruction errors for three SPARC baseline scenarios, including (a) a double null configuration, (b) the X-point target scenario, and (c) a lower single null configuration.

Figure 7 .
Figure 7. Histograms from the Monte Carlo error analysis showing the spread in (a) and (b) the error in R and Z-coordinates of the magnetic axis, (c), (d) the inner and outer midplane gap errors, (e) and (f ) the lower and upper X-point coordinate errors, (g) and (h) the spatial errors on the upper and lower strike points, and (i) and (j) the angular errors (in the poloidal plane) on the upper and lower strike points for all of the reconstructions.The design tolerances are indicated with grey dashed lines.

Figure 8 .
Figure 8. Histograms from the random sensor loss analysis showing the in (a) the Z-coordinate of the magnetic axis, (b) the midplane outer gap, (c) the outer strike point spatial location, and (d) the outer strike point incidence angle (in the poloidal plane).Orange histograms indicate results with 9% of the sensors in the poloidal set missing, and blue histograms indicate results where 29% of the sensors were missing.The design tolerances are indicated with grey dashed lines.

Figure 9 .
Figure 9. Plots showing (a)-(c) the number of inoperative or 'bad' sensors in each toroidal set against the percent of the total number of sensors that are bad, considering a total of 2, 4, and 6 toroidal sets of sensors respectively.The black line indicates the number of sensors that are bad in all of the toroidal sets (averaged over all 100 of the cases considered), while the grey shaded area indicates the standard deviation.The colored, solid lines denote the percent of failed sensors in each individual sensors set (averaged over 100 different possible cases), while the red dashed lines indicate the point at which 20% of the poloidal locations of sensors are bad (considering all of the toroidal sets).

Figure 10 .
Figure 10.Plot of the total number of sensor losses required to lose 20% of the poloidal sensor locations for different numbers of toroidal sensor sets.Resiliency against individual sensor failures continues to improve with increasing number of toroidal sets, but with diminishing returns.The red ellipse highlights the 'knee' of the curve.

Figure 11 .
Figure 11.EFIT reconstruction errors for a time series during start-up from (a)-(e) 1 s to 5 s into the discharge.Note: the reference equilibria from TSC include eddy currents in the vessel wall and conducting structors.

Table 1 .
SPARC equilibrium geometric quantities with initial design tolerances.