A Magnetic Measurement Model for Real-Time Control of Synchrotrons

In this paper, we present a measurement model for estimating the magnetic field of a synchrotron-type particle accelerator, based on sensors installed in a reference magnet. The model combines the calibration of the individual sensors with the experimental characterization of the magnets to infer, in absolute terms, the value of the average field in the ring, as needed for the real-time feedback control of the accelerator. Implementation of this model at the extra low energy antiproton (ELENA) ring at the European Organization for Nuclear Research (CERN) is used as a case study. We describe first the measurement setup and method, followed by the detailed definition of the model, along with its parameters and an evaluation of their value and uncertainty. Next, we assess the combined uncertainty of the whole measurement chain. Finally, we discuss the results obtained so far during the machine commissioning phase and outline our plans for future improvement.


I. INTRODUCTION
P RECISE knowledge of the magnetic field B(t) is essential for controlling the particle beam in synchrotrons. This is especially crucial in the so-called bending dipole magnets, which have the function of steering the beam around a ringshaped path. The field produced by these magnets is cycled synchronously with the frequency of the accelerating cavity in a periodic fashion, with typical time scales of the order of 1 s up to 1 min. In the superconducting magnets of the large Hadron Collider (LHC) at the European Organization for Nuclear Research (CERN) [1] and the National Synchrotron Light Source [2], for example, mathematical models of the magnets based on production series test results achieve sufficient precision, typically around 200-500 ppm of the nominal peak field. In the case of iron-dominated resistive magnets, effects related to hysteresis, eddy currents, temperature drifts, and material aging could be much higher, so that feedback from measurement becomes necessary. At CERN, six real-time measurement systems known as "B-trains" are in operation [3]- [6], transmitting B(t) with a data rate up to 500 kHz to various users, including the synchrotron's radio frequency (RF) cavities and, in some cases, the dipole power supplies for field regulation. The work is underway to renovate these systems, some components of which date from the 1950s. Similar systems are also implemented at the Brookhaven National Laboratory [7] and at several hadrontherapy facilities, including the National Centre of Oncological Hadrontherapy (CNAO) [8], MedAustron [9], [10], and the Heidelberg Ion-Beam Therapy Center [11], [12]. Comparable techniques, albeit with higher precision and lower bandwidth, are also used for spectrometer magnets [13] and in the wider MRI magnet community [14].
Measurement systems for synchrotron applications are generally based on a narrow induction coil, inserted in the gap of a reference magnet identical to those in the ring, physically removed to be more easily accessible, and excited in series with them to produce the same field at any given time. This coil generates a voltage, V c , proportional to the field rate of change, which is first acquired using an analog-todigital (ADC) converter, then is integrated and scaled to obtain the average magnetic field, B. The integration constant is provided by a second sensor (a "field marker"), usually placed in the center of the magnet gap, providing a digital trigger when the field reaches a predetermined value. While individual calibration of these sensors is relatively straightforward, characterization of the system as a whole presents several difficulties. First, the coil can be offset from the desired central position in the magnet gap, due to alignment tolerances or space constraints. Second, the marker is usually a millimeter-size sensor, such as a Hall plate or a magnetic resonance probe, from which we must somehow infer an average over a path up to several meters long. Finally, unavoidable material and geometric uncertainties inherent in the fabrication process may lead to a difference between the field in the instrumented magnet and the average field seen by the particles in the ring. These error sources are usually compensated by means of an overall adhoc factor, ensuring as much as possible the experimental match between field, particle bending radius, and momentum, consistent with the well-known Larmor's expression [4]. Such a shortcut, however, is not fully satisfactory: in the context of an accelerator chain, absolute knowledge of the This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see http://creativecommons.org/licenses/by/4.0/ field would be far preferable to ensure energy matching and seamless beam transfer between rings.
Absolute calibration of our instrument is however not possible, since a suitable reference standard for the field along a path up to several hundred meters long is not available. The aim of this paper is rather to build an explicit measurement model, to infer indirectly the average field in the accelerator ring from the output of sensors placed elsewhere. In itself, model-based identification of the calibration parameters of magnetic sensors is a wide and popular topic [15]- [17]. In the context of Tokamak magnets, a problem conceptually analogous to our own arises to infer the magnetic field in the inaccessible interior of the vacuum vessel from flux loops placed on its surface, in order to allow vertical plasma control [18]. Similarly, for space applications, measurement models have been used to predict low-frequency fields radiated by components all around a satellite, with parameters identified from a set of discrete measurements done at specific positions in the far field [19], [20]. To the best of our knowledge, however, no comparable models have been documented in the field of accelerator magnets. The novelty of the work presented lies in two aspects as follows.
1) Emphasis on the absolute character of the measurement, as opposed to the mere reproducibility required from earlier systems, which resulted in painstaking trialand-error compensation of systematic errors during the accelerator commissioning phase. 2) A rigorous uncertainty analysis, which gives confidence to machine operators trying to trace back the cause of any observed beam instability to the magnetic field, or other sources. As a case study, we shall consider the measurement model for the magnets of CERN's extra low energy antiproton (ELENA) ring [21], [22]. ELENA is a new antiproton decelerator currently under commissioning, for which both a complete set of acceptance test results, and unrestrained access to the reference magnet and the sensors therein are available. The structure of this paper is as follows. In Section II, we describe the hardware of the system, whereas, in Sections III and IV, we formulate in detail the measurement model and the parameter identification methods. In Section V, an uncertainty analysis is carried out, and finally, in Section VI, we summarize our conclusions and outline future work.

II. EXPERIMENTAL SETUP
The measurement system, illustrated in Figs. 1 and 2, includes an operational and a spare acquisition chain with identical electronics but independent sensors. The reference magnet is installed at more than 50-m distance from the ring, which makes stray fields negligible. The major source of disturbance is the vertical component of the geomagnetic field, which, however, affects equally the reference and ring magnets. Each chain is based on a custom-made 594-turn litz-wire induction coil, 1650 mm long and 9 mm wide, which is curved to follow the nominal beam orbit and captures the totality of the vertical bending field component. The coils are screwed on to a fiberglass support, which is rigidly connected to the magnet's iron yoke [23]. Given the nominal peak field  Each chain also includes two Metrolab nuclear magnetic resonance (NMR) probes [24], fixed on the fiberglass support close to the magnet's center and set, respectively, at low (45 mT) and high (340 mT) field, as needed for acceleration of H − ions during machine commissioning and antiproton deceleration during normal operation, respectively, [25]. NMR probes are a well-known metrological standard and have been chosen on the basis of our long experience with similar applications. To be used as a field marker, the working point of each NMR probe is set by an ac reference signal at a fixed frequency that is inversely proportional to the proton's gyromagnetic ratio, and which has been fine-tuned as explained in [26]. The output signal of the probe is passed through an antialiasing filter and fed to a further FPGA-based electronic card that detects the transient resonance peak from the zero of the differentiated signal and generates a TTL trigger accordingly.

A. Objective
The measurement system is designed to output the average field B over each of the bending dipoles, assumed to be identical to each other where is the integral magnetic field produced by each magnet, B(t, s) is the field profile inside each magnet as a function of time and of the longitudinal coordinate, s (Fig. 2), and is the fraction of the circumference associated with each dipole, where ρ = 0.927 m is the nominal bending radius of the ring [27] and N B = 6 is the number of bending dipole magnets. The integration limits in (2) are extended for simplicity to infinity. This is warranted whenever, as in our case, the length of the coil allows to capture the whole magnetic field produced within the requested tolerance, and at the same time, there is no interference between adjacent magnets. In the following, we shall use interchangeably the time t and the excitation current I = I (t) as independent variables, assuming that only one cyclic waveform is used and that the inverse relationship t (I ) be uniquely defined on either branch of the hysteresis loop.

B. Field Integral Measurement
The integral field, I(t), is derived from the magnetic flux linked through the coil. At any given time, taking into account that the variation of the field in the direction transverse to each coil is negligible, we can express the flux as (4) where N T is the number of winding turns, w(s) is the winding width (variable along the coil due to manufacturing tolerances), and w eff is the effective width, defined by The effective width represents the average geometric coil width, weighted by the field profile and thus depending upon the magnet being tested. In general, as the field level increases, the iron yoke may get into saturation, increasing flux leakage and flattening the field profile, thus potentially affecting w eff . In our case, saturation is negligible, so we can use an average effective width, which is practically a constant and may be defined as where t is the time at which the nominal excitation current of the dipoles I = I (t) is attained.

C. Flux Integration
The flux through the coil is derived by combining the output of the two sensors in the following manner. The time axis is split into a succession of integration intervals t k ≤ t < t k + 1, with k = 1, 2, ... where each t k represents the time at which a field marker trigger is received. During each interval, ideally where without loss of generality, I 0 represents the integration constant at the field marker level being considered and, according to Faraday's law [28] ( In (8), δV refers to the unavoidable voltage offset caused by parasitic currents in the electronics and thermoelectric effects.
In our system, this can be high as 60 μV leading to a field drift of the order of 10 μT/s. As the offset is observed to fluctuate randomly over time scales of seconds and longer, an effective systematic correction is not possible. Several strategies to estimate and correct it dynamically are reviewed in [29]. The method adopted in all real-time CERN systems is to reset the integral at every t k ; at least one, or optionally more, marker triggers per cycle can be generated, at low and/or high field, the choice depending upon the characteristics of the magnetic cycle being run. Upon reception of a trigger, the output field value is artificially smoothed over a duration of 20 ms, in order to avoid discontinuities that could destabilize the beam. In this way, the field marker accomplishes the double task of providing both the coil integration constant and drift correction, and integration can proceed uninterrupted for up to several months.

D. Integration Constant
The integration constant I(t k ) cannot be measured directly, since the field marker provides only a local value B(t k , 0) (albeit highly accurate and reproducible). In the past, the constant was obtained by multiplying the local field by a quantity called magnetic length, typically expressed as a function of the excitation current l m (t (I )) = I(t (I )) such that I(t k ) = l m (I (t k ))B(t k , 0). As a qualitative example, we show, in Fig. 3, the hysteretic behavior of the magnetic length on a 200-A/s cycle, where the central field is measured continuously by a Hall probe. A fixed value of l m , corresponding initially to the field level of interest but adjusted by trial and error, is implemented in all of CERN legacy systems. A novel absolute calibration method that provides directly the value of I(t k ) is discussed in Section IV-B.

E. Model Definition
We can finally formulate the measurement model, by combining (1) and (7), adding in three further factors to represent nonideal effects The term in square brackets represents the field integral measured by the combination of induction coil and field marker, where the integrated flux is corrected by the coefficient 1 + η. This compensates for the total gain error in the coil acquisition chain, including the coil effective width, preamplifier, antialiasing filter, and the ADC. The coefficient 1+ accounts for the possible coil offset with respect to the beam path, which may cause a systematic error due to the nonuniformity of the field in the transverse direction. Finally, the coefficient 1+α accounts for any difference between the reference magnet and the average of the ring. The terms η, , and α are all nondimensional and much smaller than one.
IV. MEASUREMENT MODEL PARAMETER IDENTIFICATION We shall now proceed to discuss in detail each term in the model and the respective identification procedure, based on the results of the acceptance test campaign of the bending magnets for ELENA and on analysis of the acquisition chain.

A. Effective Coil Width, w eff
The effective width defined in (5) cannot be measured geometrically to the required precision; however, it can be calibrated magnetically in two different ways.
1) From (6), by comparing a flux change acquisition to an independent measurement of I(t), such as can be obtained, in a curved magnet, with a finely spaced Hallprobe map. This method is time-expensive and requires the Hall probe map to be cross-calibrated against a more precise absolute reference, such as NMR or stretchedwire measurements. 2) A relative cross-calibration can be obtained by comparing the ith coil in an array against a reference coil, placed on top of it symmetrically across the magnet midplane, so that it sees essentially the same field inside a dipole magnet gap. The ratio of the measured flux differences provides the effective width, according to [30] This method is effective to calibrate a large number of coils, when the absolute calibration of the reference coil is known. The latter calibration procedure was carried out for the coil used for the ELENA B-train, leading to an estimate of w eff = 2.84146 m with an uncertainty of 80 μm (2.8×10 −5 ).

B. Integration Constant, I 0
The integration constant is derived with an identification procedure that benefits from the availability of a bipolar power supply and allows in situ absolute integral field measurements with an induction coil, which would normally only see field changes. As shown in Fig. 4, the magnets are first degaussed to attain a demagnetized reference state. The residual magnetization I res is measured with a Hall probe, cross-calibrated with a fluxgate magnetometer in the range below 1 mT and is about 0.03 mTm (80 ppm of the nominal field). Then, the excitation current is cycled and the flux change measured by the coil is integrated according to After an initial transient lasting three cycles, the magnet settles on a stable hysteresis loop that makes the field integral reproducible from cycle to cycle within a level of 400 ppm.
The assumption of loop closure, which has been validated by independent NMR measurements, allows a very effective integrator drift correction on the stable cycles. The integration constant is finally derived by averaging over n ≥ 7 stable cycles This calibration procedure has been carried out repeatedly at two different field levels, and the uncertainty of the result has been estimated from the standard deviation of the results as follows. 1) I 0 = 326.836 mTm @ 340 mT, u(I 0 ) = 13 μTm.
2) I 0 = 43.125 mTm @ 45 mT, u(I 0 ) = 12 μTm. The procedure should be repeated every time that the cycle waveform or the field marker level is changed; the impact of doing so on operation is minimal as the necessary time, including setup of the acquisition system, semiautomated postprocessing and results upload, is only a few hours.

C. Induction Coil Gain Error, η
The factor 1 + η accounts for errors in the gain of the electronic coil acquisition chain, schematically represented in Fig. 5, where R c and L c are the inductance and resistance of the coil, respectively, R in is the input resistance of the integrator electronics and C represents the sum of distributed capacitance between the coil windings and the shielded cable. Two major error sources are considered: the loading effect due to the finite input resistance of the integrator compared to the coil resistance, and the internal error k int of the input stage of the integrator (including an ADC and an antialiasing filter). We remark that the relevant frequency content of the magnetic field waveform does not exceed typically 100 Hz, so that the low-frequency approximation applies. Combining these parameters, the loading effect is defined in (14) as The identification procedure for these parameters can be summarized as follows.
1) The coil and input resistances can be easily obtained to the required accuracy using a multimeter [31]. For the ELENA system, we find that R c 5 k and R in 2 M. The nominal uncertainty of the resistance measurements in the range considered is 150 ppm, which is negligible compared to the standard deviation of ambient temperature, estimated around 0.7 • C over a year of machine operation. Taking into account the temperature coefficient of the resistivity of copper, i.e., 0.004 • C −1 , the relative uncertainty of R c is the order of 0.3%.
2) The integrator gain can be verified by applying a reference voltage source V at the integrator input for a precisely known time interval t, then comparing the measured flux to the expected result The uncertainties of both reference voltage and integration time are as low as a few parts per million and can be neglected. The major remaining source of uncertainty is the repeatability of the flux measurement, which is affected by integrator drift and is typically about 50 ppm.

D. Reference-to-Ring Error, α
The magnets of a series production will often differ slightly due to assembly tolerances, or possible errors in the number of yoke laminations (even if these are usually shuffled to minimize the impact of material property variations). In the case of ELENA, for contingent reasons, the yoke of the reference magnet was made of a different type of steel than the other seven magnets (the six in the ring, plus a spare), making them substantially different. Introducing an appropriate scaling factor is thus especially important in this case. To define it, we must consider that presently operational magnetic cycles are optimized at a lower maximum current level than the cycles used during the acceptance tests, which were intended to cover the full design range. The following magnetic measurement campaigns were carried out: 1) acceptance cycles up to 326 A at 200 A/s: all magnets; 2) operational cycles up to 276 A at 115 A/s: reference and spare magnet only. The relationship between magnets is best expressed as a function of the current in terms of the so-called integral transfer function [shown in Fig. 6(a)] that is, for a cycle with a given nominalİ , the ratio between field and excitation current. (Note that this expression and the following ones have two values, one for each branch of the hysteresis loop.) The measurements show a good linearity on the up-ramp but a width of the hysteresis loop of about 2%, very large when compared to other accelerators (e.g., 0.5% in the Proton Synchrotron (PS) Booster). This is especially relevant since ELENA is the only machine expected to accelerate and decelerate particles on the same cycle (as needed for commissioning of the electron cooler. Parameterization in terms ofİ is needed to account for the impact of eddy current losses on the width of the hysteresis loop, as well visible in Fig. 6(b). The scaling factor can then be defined as a function of the excitation current I Operation cycles include some plateaus, during which the field varies while the current is constant and eddy currents decay; therefore, the curves have been smoothed to avoid discontinuities. The result can be used to extrapolate acceptance test results to the operational conditions according to [see the example for ramp-down in Fig. 6 The computed scaling factor is reasonably stable on the down-ramp of the antiproton decelerating cycle, which is the most important operational condition. Since, at the moment, the hardware does not implement variable coefficients in real time, an average value is being used for operation, while the standard deviation of the residual is taken as an estimate of the associated uncertainty On the other hand, the variation of the scaling factor on the up-ramp of the accelerating cycle appears to be much larger, about 0.5%, leading to a larger uncertainty u(α) ≈ 1.45 × 10 −3 . This might be attributed to a different level of the remanent field in the reference and ring magnets, since this quantity has an impact on the up-branch of the hysteresis loop of the transfer function, as this approaches the midrange linear region.

E. Coil Offset Factor,
The factor accounts for the difference x between the transversal position of the induction coil and the nominal beam path, as shown in Fig. 2. The coil of the operational system lies approximately on the magnet's axis, while for the spare system x = 22 mm. The major contribution to the nonuniformity is given by the in-built integrated field gradient This is due to the sector shape of the poles and plays an important role in keeping the beam focused. The associated field error for the central coil, relative to the integrated field, can be expressed as for which the dependence upon the field level, hence the time, is well below 300 ppm and may thus be neglected. The uncertainty on is dominated by the uncertainty of the transversal offset, which was obtained by measuring the position of the induction coil relative to the magnet with a 3-D laser tracker and can be quantified to about 0.2 mm.

V. UNCERTAINTY ANALYSIS
The formulation of an explicit measurement model makes it possible to obtain a rigorous quantitative estimation of the final measurement uncertainty. This is important not only as a working tool for machine operators and end users of the measurement system but also for instrumentation developers to identify critical components in the acquisition chain. To apply the law of forward uncertainty propagation, we first compute the partial derivatives of the average field with respect to each one of the six arguments p i appearing in (10), including five parameters plus the measured flux According to [32], we then derive the combined standard uncertainty of the average field measurement u c (B) as where we shall assume that all variables are normally distributed and independent of each other. We remark that α, w eff , and represent a systematic influence on the measurement, rather than a random effect like integrator drift. Table I shows the individual standard deviation of each parameter for the ELENA measurement system at injection level, when a decelerating cycle is applied. The resulting combined uncertainty at injection is as follows. These figures, which are dominated by the error inherent in the extrapolation from the reference magnet to the average of the ring, represent the uncertainty at beam injection; in fact, the uncertainty varies as a function of time, although this aspect goes beyond the scope of this paper.

VI. CONCLUSION
We formulated a measurement model which can predict the average bending magnetic field of a synchrotron, based on real-time magnetic field measurements from sensors located within a distinct reference magnet. This model is currently implemented in a simplified form in the ELENA decelerator ring at CERN, where all parameters have been assigned suitably averaged constant values as listed in Table I. So far, the accuracy of the measurement has proven adequate for operation of the machine during the commissioning phase, with no need for additional empirical adjustment. This successful result is a first in the decade-spanning history of these systems at CERN. Providing an absolute value of the field, qualified with a formally derived uncertainty, represents an important shift of perspective as it gives operators a clear hint whether to investigate first the magnetic field, or other subsystems, whenever beam instabilities or other issues arise. In addition, we have developed a calibration procedure for the integration constant I 0 that allows to use reliably an induction coil to obtain precise absolute measurements and that can be effectively repeated in situ to adapt to new accelerator cycles.
The measurement uncertainty is dominated by the errors inherent in the extrapolation to the ring and the position of the coil. As discussed earlier, both these factors are highly specific to ELENA, so substantially better performance can be expected for the other similar systems currently under commissioning. The impact of the uncertainty of α can be mitigated by selecting a different optimal value, typically corresponding to the critical time of particle injection, for each different magnetic cycle. A new software facility to update automatically the parameters in real time has been implemented and is currently being tested, as a part of the ongoing commissioning of the machine in a wide variety of operational configurations.
As a logical future extension, the possibility of implementing dynamically the scaling factor 1+α in the real-time postprocessing FPGA firmware is being considered as a way to reduce considerably this error source, bringing u(α) down to the level of the noise of the curves of Fig. 6(d). We also plan to upgrade the FPGA hardware of the system to replace all constant parameters with functions of the excitation current or, equivalently, of the measured field. This will add the flexibility to adapt automatically the calibration constants such as I 0 to any arbitrary cycle. Finally, the model will be expanded to include the effects of a constant background and time-varying stray fields from other magnets, which may affect the result to a level up to about 100 ppm.