Comparison of linear optics measurement and correction methods at the Swiss Light Source

A systematic analysis of linear optics optimization using various independent methods has been performed. Three independent techniques, namely quadrupole variation, linear optics from closed orbits, and turn-by-turn measurement, have been studied at the Swiss Light Source. Furthermore, the performances are compared from various aspects including a direct comparison of the corrected optics. The limitations of the three independent methods are also presented.


I. INTRODUCTION
The experimental determination of linear optics is a fundamental prerequisite to achieving a high performance storage ring. We have therefore performed a systematic study of linear optics optimization using various independent methods. The study is motivated by several goals: (1) to confirm the linear optics correction, (2) to establish precise control of the linear optics, which is the basis of both nonlinear optics manipulation and betatron coupling correction, and (3) to reveal the limitations of the various techniques for future accelerator research and development. The first goal is only achieved through a systematic comparison of results from the multiple methods.
The Swiss Light Source (SLS) is a 3rd generation light source in its 10th year of operation, providing light of high brilliance to a current 20 beam lines, 18 of which are dedicated to experimental users, with the remainder reserved for beam diagnostics. Its storage ring is equipped with a modern digital beam position monitor (BPM) system capable of measurements not only of the closed orbit but also as a function of turns. In addition, an optics measurement based on tune changes in response to variations in quadrupole gradient has been implemented, and now acts as the standard optics setup procedure. The SLS thus offers an ideal platform to perform a comparison of linear optics measurements and correction methods.
The optics measurement via tune response directly probes the average beta function over quadrupole magnets. The method is well known and documented in numerous literatures, for instance Ref. [1]. It requires quadrupole magnets to be powered independently as in most light sources. A single diagnostic tool, e.g. a tune monitor, is used to perform the measurement. The optics correction is intrinsically robust since the location and number of measurement points are identical to those of the knobs used in the correction, i.e., the quadrupole magnets. Nevertheless, despite the simple principle, the measurement procedure and data analysis must be undertaken with considerable care, as discussed later.
Linear optics from closed orbits (LOCO) [2] has been employed in many light sources and storage rings [3]. As the name suggests, the linear optics is inferred from the closed-orbit response to an excitation of dipole correctors in the ring. A large data set is obtained from the product of corrector and BPM numbers in both horizontal and vertical planes. The measured orbit response is fitted to that obtained from an optics model that includes quadrupole errors, which are the principal contributions to the orbit response distortion. Not only the quadrupole errors, but also the gain calibration constants of the correctors and BPMs, together with their tilts, are found due to the large amount of data. Skew quadrupole corrections that compensate the off-diagonal components of the response matrix are simultaneously determined for the betatron coupling correction. The unknown quantities appear as free parameters in the fitting procedure.
A partial orbit response, where only a limited set of correctors are analyzed to enable a more immediate measurement, may also be used to infer the linear optics [4]. However, this requires precise knowledge of the BPM calibration constants in advance since the partial response does not provide sufficient sensitivity for the determination of its errors. Since the orbit response measurement at the SLS can be performed within a reasonable time frame (about 20 minutes), no optics correction based on the partial orbit response is deemed necessary. Rather, the fitting algorithm of Ref. [4] is directly compared with LOCO using the full orbit response.
The linear optics can also be inferred from turn-by-turn (TBT) beam position data [5] where a betatron oscillation is excited by a single kick. A significant advantage of this approach is the speed with which measurements can be performed. Data for a few hundred or thousand turns may be amassed without varying machine components other than the kicker. A betatron oscillation may also be excited by resonant dipolar excitation near the betatron frequency [6].
Another advantage of TBT measurement is that it additionally allows us to probe the nonlinear optics as well [7,8].
The dispersion function, in general, is measured by varying the beam momentum and recording the corresponding orbit change with BPMs. The methods presented are thus intrinsically coupled through their use of a common set of diagnostics. For example, the optics correction based on the average beta measurement uses not only a tune monitor, but also the BPMs, in cases where the dispersion correction is included. To remove as many dependencies between the methods as possible, the dispersion correction is excluded in this study.
The methodology of the three independent methods is presented and their results compared. The SLS storage ring is briefly described in Sec. II, with emphasis on the parameters and diagnostics relevant to this study. The optics measurements and corrections are presented in Sec. III. The performances of the three methods are discussed with experimental results and simulations in Sec. IV. Finally, the conclusions drawn are summarized in Sec. V.

II. SLS STORAGE RING AND SUBSYSTEM
The main parameters of the SLS storage ring, in particular those related to the optics measurement and correction, are listed in Table I. For the purpose of this study, the nominal user operation optics are measured and corrected with insertion devices deactivated. The entire complement of 177 independently powered quadrupoles at the SLS are used in the measurement and correction procedure [9]. The BPM system can be engaged in two different operating modes, namely closed-orbit mode and TBT mode. The measurement errors for the two modes are <1 m and $20 m, respectively. The corresponding beam condition for TBT mode is described in Sec. III C. The SLS BPM system is described in more detail in Ref. [10].

III. OPTICS MEASUREMENTS AND CORRECTIONS
In all three methods described below, the quadrupole corrections are computed by applying the well-known singular value decomposition (SVD) technique: First we measure the observables, for example the orbit responses in LOCO. A sensitivity of the observables to each quadrupole error is computed using an optics model. Then possible corrections are found asC whereC is a vector of possible quadrupole corrections, S À1 is a pseudoinverse of the sensitivity matrix, andM T is a transposed vector describing the deviation from the ideal model. The correction procedure is iterated until the deviation of observables is minimized. In each iteration step, the betatron tunes are adjusted to the nominal tune values. The tune correction required typically reaches a negligible value by the end of the iteration process. In the presence of measurement errors, small singular values need to be excluded by applying a singular value cut in order to ensure stability of the optics correction. Section IV discusses the determination of the optimum cuts for each method.

A. Quadrupole variation (QV)
The average beta function over a quadrupole magnet can be measured from the response of the betatron tune to a small variation in quadrupole strength. The measurement can be carried out with the nominal filling pattern and beam current. However, a measurement utilizing a short bunch train, for instance 100 bunches, results in a lower measurement error. This may be because the pulse length of the kicker magnet that excites the betatron oscillation is longer than the revolution period and exhibits a short flattop although the tune measurement should be valid for any coherent linear oscillation. The QV measurement is therefore normally performed using a short bunch train with the beam current of 50 $ 100 mA.
Since the fractional part of the horizontal tune is near to the half integer value, the tune response cannot be approximated by a linear function of the quadrupole variation. Consequently, the average beta function is computed as where hi is the beta function averaged over the quadrupole effective length, Q is the betatron tune, ÁKL is the change in integrated quadrupole gradient, and ÁQ is the corresponding response in the betatron tune. The measurement is performed by varying the gradient of each quadruple in turn and recording the resulting horizontal and vertical tunes. The range of quadrupole current is determined, based on an optics model, to limit the tune shift to within 0.02 in either the horizontal or vertical plane. The tune shift in the other plane is then smaller. When a linearized equation is employed instead of Eq. (2), the approximation error can reach $10% in the horizontal plane at a tune shift of 0.02, while being negligible in the vertical plane.
A rather elaborate measurement procedure is required in order to minimize both the systematic and statistical errors. First, the transfer function of quadrupole magnets is carefully described taking saturation effects into account. In addition, the quadrupole magnets are cycled before the measurement and the gradient is always increased so as not to deviate from the calibrated transfer function. Furthermore, by restoring tune values to their original set points after each tune response measurement, drifts in tune due to hysteresis effects are averted, allowing the optics to be kept constant. Second, the tune monitor realizes sufficient resolution by interpolating the fast-Fourier-transform spectrum, and the betatron tunes are measured at several points along increasing quadrupole gradients. The number of turns in the analysis is 1024. Occasionally, the detection of the tune spectrum fails, e.g., by mistakenly attributing the tune to a peak in close proximity to the true value. Such occurrence, however, can be easily recognized (due to an obvious inconsistency among the several measurements) and removed from the subsequent analysis.
Third, the measured effective length of quadrupoles is properly implemented into the optics model and used when computing the average beta. Nevertheless, a systematic error remains due to the correspondence between the effective length and the hard-edge approximation. The systematic error is evaluated, from a comparison of the computed average beta with measured edge profile (soft edge), to be negligible. Figure 1 shows the residual beta-beat (difference in beta function with respect to the ideal model) of the best optics correction achieved to date, with values of 4.0% rms and 3.2% rms in the horizontal and vertical planes, respectively. The average beta-beat, however, is seen to be offset from the origin despite the fact that the betatron tunes were reset to their nominal values before each measurement. The offset was examined from various aspects. For instance, the beta-beat was plotted for each quadrupole family, showing a negative offset for all of them.
To determine the quadrupole corrections, an m-by-n sensitivity matrix is first prepared from the optics model, where m is the total number of quadruples (177) acting as correction knobs, and n ¼ 2m is the total number of horizontal and vertical beta function observables (354). We apply the SVD matrix inversion with a high singular value cut of $0:02 to remove any dependency on the observed average beta-beat offset (further discussion in Sec. IV). A further reduction in the residual beta-beat is, however, restricted by our inability to fully understand the observed offset. Nevertheless, the elaborate measurement procedure gives a statistical error of <1% rms (Fig. 2). The statistical error is further discussed in Sec. IV.

B. Linear optics from closed orbits (LOCO)
At the SLS, the correction of the betatron coupling is based on the off-diagonal orbit response matrix [11]. This study extends the correction to the linear optics.
The nominal filling pattern, a bunch train with 390 bunches, and nominal beam current of 400 mA is employed in LOCO measurements because BPMs are optimized to realize the best possible resolution for the nominal beam condition. Furthermore, stable orbit response measurement requires a thermal equilibrium state of the machine. The corrector kick for the orbit response measurement is typically 50 rad, where the maximum orbit response is $0:5 mm. Although the sextupole magnets are switched on during the measurement, changes to the orbit remain in a linear regime. At the same time, they are sufficiently large to allow errors in the measurement to be ignored: the statistical measurement error expected from the BPM resolution is in the order of 0:01 m=rad while the maximum orbit response is approximately 10 m=rad in the SLS.
The LOCO algorithm allows one to configure Eq. (1) differently, i.e., including more parameters in the sensitivity matrix, and hence in the correction vector [2]. The measured orbit response is fitted with the following parameters: quadrupole corrections (177), BPM and corrector calibrations and tilts (2*2*73 and 2*73), the  momentum shifts due to the additional corrector dipole field at the dispersive section (2*73), and skew quadrupole components at each sextupole (24 or 120). The number of selected skew quadrupole knobs depends on the objective of the fit: 24 are used for the coupling correction and 120 when constructing an error model. When the LOCO method was first applied at the SLS, important calibration errors in the BPMs and correctors were revealed, subsequently initiating their recalibration. It is noted that, in the cases where only the beta function is to be corrected, the BPM and corrector tilts, and the skew quadrupole components are not necessarily included in the fit unless the tilts and/or the betatron coupling are large.
The application of an appropriate SVD cut of 0.001 (see Sec. IV) circumvented the need for a vigorous gradient correction such as that reported in Ref. [3].
An iteration of the LOCO optics correction procedure achieved the rms deviation of the orbit response from the ideal model of 0.034 and 0:13 m=rad for the horizontal and vertical planes, respectively. They are computed after applying the BPM and corrector calibrations to the measured orbit response, but not quadrupole corrections. Inclusion of the quadruple corrections, on the other hand, results in greatly improved values that are close to the measurement error. A further iteration was, however, observed to increase the deviation, rather than reduce it. Figure 3 shows the variation of the deviations with the number of iterations, together with the beta-beat reconstructed from the fitted quadrupole corrections, which corresponds to a ''calibrated model'' [3].
As is evident from Fig. 3, the deviation could be successfully corrected after three iterations. The residual orbit response deviation is, however, an order of magnitude larger than the expected measurement error in the vertical plane. The observation that the reconstructed vertical betabeat is increased by a factor of (at least) 4, from the third to fourth iteration, suggests significant differences between the optics model and the machine, which become evident when the beta-beat is corrected to the 2% rms level. This is further discussed in Sec. IV.
To confirm the LOCO results, the reconstructed beta-beat from LOCO is compared to the results obtained by the fitting algorithm in Ref. [4]. LOCO reproduces the measured orbit response through the determination of quadrupole errors, while the algorithm of Ref. [4] manipulates the beta functions and phases. The brute force approach of Ref. [4] was applied, wherein the beta functions and phases are iteratively updated from the ideal model until the measured response is finally reproduced. The comparison is shown in Fig. 4.  The fitting of the beta functions and phases is examined in two ways: (i) with raw data, and (ii) with the inclusion of BPM calibration errors as determined from LOCO. Since the BPM gain recalibration was incorporated into the control system only in cases of significant error, i.e. >5%, residual calibration errors in the order of a few percent are expected to enter in the measurement. This, however, is not relevant to LOCO where all fitting parameters are simultaneously fitted. In contrast, knowledge of the BPM gain calibration is crucial to the fitting of the beta functions and phases. The two methods show good agreement, at least in cases where the BPM calibration is not an ingredient, thereby validating LOCO's results.

C. Turn-by-turn (TBT) measurement
The TBT measurement at the SLS requires electron beams to be injected into a short bunch train, typically utilizing 100 bunches, with a total current of $50 mA. This is because of the same reason as for the QV measurement. The typical number of turns in the TBT measurement is $1000.
There are a number of ways in which the linear optics can be inferred from the TBT data. For instance, the beta function can be found from the oscillation amplitude, with the precise BPM calibration required for this measurement provided by LOCO. 1 In order to ensure that the TBT measurement is independent of LOCO, the phase advances between neighboring BPMs are measured in terms of BPM calibration independent observables. A minimization of the phase-beat corresponds to a minimization of the beta-beat [12]. The quadrupole corrections are computed from Eq. (1) with a singular value cut of 0.01 (see Sec. IV).
The initial optics measurements using TBT BPM data disclosed a serious mis-synchronization of the BPM triggers, which was subsequently solved by installing delay cables that accounted for the time of flight of the electron beam around the ring. Figure 5 shows phase-beat measurements before and after the cable installation. The large artifacts that were initially present in the betatron phase measurements were eliminated once the BPM triggers were properly synchronized.
Another undesirable effect of the TBT BPM data acquisition is the overlap (or mixing) of signals from individual turns. With the present BPM configuration, approximately 20% of each signal is displaced into that of the neighboring turns. The global trigger timing can be adjusted so that at least an equal fraction of signal is displaced into each of the two neighboring turns (previous, future). In this way, the displaced proportion of the signals may cancel in the phase measurement. Assuming the validity of a linear sum, a BPM signal for turn n, which also contains some signal component from neighboring turns, can be represented by ð1 À 2s n ÞA n sin2Qn þ s nþ1 A nþ1 sin½2Qðn þ 1Þ þ s nÀ1 A nÀ1 sin½2Qðn À 1Þ ¼ ½ð1 À 2s n ÞA n þ s nþ1 A nþ1 cos2Q þ s nÀ1 A nÀ1 cos2Qsin2Qn þðs nþ1 A nþ1 sin2Q À s nÀ1 A nÀ1 sin2QÞcos2Qn; where A is the oscillation amplitude, s is the ratio of mixed signals, and Q is the betatron tune. The initial phase is assumed to be zero for simplicity. The amplitude, A, remains approximately constant over a number of turns, unless the chromaticity is very high. We note that the second term disappears when the ratio of mixed signals in neighboring previous/future signals are the same, s nÀ1 ¼ s nþ1 , and therefore the phase carried in sin2Qn can be retrieved. Another approach might be to correct the turn-by-turn BPM data by applying a filter which deconvolves the mixture [13]. However, once the mixture is equalized, a filter applied to turn n also has a mirror symmetry about this turn, such that the betatron phase is not varied. Provided measurements are confined to the betatron phase only, the equalization process is all that is required to compensate for the overlap in signals. Note that the betatron amplitude must be properly corrected by the deconvolution. The SUSSIX [14] algorithm is used to analyze TBT data. However, this may not be the optimum approach for determining the betatron phase since its phase accuracy scales proportionally to the inverse of the number of turns, 1=N. On the other hand, alternative algorithms, which in principle are able to determine the phase with an accuracy scale of 1=N 2 or even 1=N 3 , are also limited to 1=N in the presence of noise [15]. As shown in Fig. 6, the statistical error of the phase measurement at the SLS is $0:001 rms in units of 2 when an SVD data cleaning [16] is applied.
An iteration of TBT optics correction achieved a residual rms phase-beat of 0.0015 and 0.0036 in units of 2 in the horizontal and vertical planes, respectively. The residual phase-beat is shown in Fig. 7. In the horizontal plane it is gratifyingly close to the statistical error of the phase measurement. The asymmetry in the phase-beat achieved implies that overlaps in signals between turns persists in the vertical plane, given that the second term in Eq. (3) may not be negligible for a fractional tune of 0.74. Otherwise a difference between the optics model and the machine presents as previously suggested by LOCO results.

IV. COMPARISON
A comparison is made of the performance of the three methods from various aspects.
We first examine the capability of the different methods to identify a single, specified quadrupole error intentionally introduced into the machine. Measurements for each method were undertaken both with and without inclusion of the quadrupole error. The quadrupole corrections corresponding to the introduced error are shown in Fig. 8.    Figure 8 also shows the predictions from a numerical simulation, wherein error-free fake data are generated from the optics model incorporating the introduced error. Good agreement is seen with the experimental results, which further endorses the application of the singular value cuts for the removal of the adverse effects of the measurement errors. These cuts were also applied in the iterative correction procedure described in Sec. III. Their values were selected as follows.
The optimum cut for QV is known empirically. It is $0:02 of the maximum singular value that results in a successful optics correction in the presence of the observed average beta-beat offset. The corrections determined from TBT data tend to be aggravated for cuts below 0.01. The singular value cut in LOCO is experimentally determined to simultaneously minimize the effect of measurement noise and the degeneracy issue [3]. Since the number of quadrupoles exceeds that of the BPMs, correctors, and betatron waves, the neighboring quadrupoles, which are a few meters apart, may therefore serve as an equivalent knob. The SVD algorithm then acts to distribute the quadrupole corrections over a given knob. Figure 9 shows the fitted quadrupole corrections for various SVD cuts.
Beam position measurements can be provided to LOCO and TBT only at the physical locations of the BPMs, which inevitably leads to a degeneracy issue. However, the correction in QV, on the other hand, can be equally determined with the average betas measured at the quadrupoles to be corrected by the very same quadrupoles. This is particularly apparent when corrections are computed in the absence of a singular value cut for an error-free data set, generated from an optics model, as is evident in Fig. 10. In an ideal QV measurement, the single quadrupole error can be perfectly identified. Only quadrupole corrections are used as fitting parameters in LOCO. The SVD algorithm would otherwise additionally distribute the quadrupole correction to the BPM and corrector calibrations in contradicting to the ideal values set in the simulation data.
The statistical error is next examined by repeating the measurements under the same conditions. Table II   the resulting beta-beat are then computed. These numbers correspond to the limitations in the beta-beat correction due to the statistical measurement error. It is seen that the measurement errors are consistent with the expected values either from the single measurement or the resolution of the diagnostics. The statistical error of beta-beat in LOCO, which comprises the largest data set, is smallest among these three methods. Particularly interesting is the smaller fluctuation in the quadrupole correction in QV when compared to that in LOCO. However, this effect originates at a relatively high singular value cut that regulates the absolute correction values.
The identification of single quadrupole error remains uncertain, especially in QV and TBT where a higher SVD cut is imposed, as seen in Fig. 8. In evaluating the limitation in beta-beat correction, however, account should be taken of the iterations applied in the correction. The performance of the three methods, when iterated, are simulated for various measurement errors following the procedure described in Sec. III. The initial quadrupole errors as well as the measurement errors are determined using random numbers. The quadrupole corrections are then computed with the cut values listed in Table II. The results of the simulation are shown in Fig. 11.
The beta-beat can be corrected to the 1% level in QV and TBT with the measurement error listed in Table II despite its poor single error identification capability. The results from LOCO show a residual beta-beat that is well below 1% at the measurement error of $0:01 m=rad.
The residual beta-beat with an error-free measurement is determined from the degeneracy issue together with the finite cut value (Fig. 11). It is noted that the optimization of the singular value cut is dependent on the measurement error. Since this dependency has not been accounted for, the performance results at the higher measurement errors displayed in Fig. 11 are consequently underestimated. Nevertheless, the sensitivity of the residual beta-beat to the measurement error for the different methods may be qualitatively compared. The method utilizing the larger data set is naturally less sensitive to the measurement error. The raw TBT data volume is large, but the quadrupole corrections are based on a subset of only 2*73 phase advances between BPMs.
Continuation of the optics correction iteration after convergence results in fluctuations in the experimental measurements that are expected to be within the statistical error. In the event of the fluctuation, and/or the residual deviation from the ideal model, being significantly greater than the statistical error, the correction is deemed to be limited by systematic error(s). The analyses presented here demonstrate that QV is limited by the observed offset, while the LOCO and TBT results are each limited by the remaining systematic error, particularly in the vertical plane. In the LOCO case, the calibrated model obtained may underestimate the beta-beat, when taking its minimum value (Fig. 3).
Finally, the best corrected optics with LOCO and TBT were measured with QV. Figure 12 shows the residual betabeat for these measurements together with the measurement and correction from QV alone. The offset is subtracted for the comparison. From the QV point of view, LOCO and QV both result in a similar optics correction quality. TBT generated some local beta-beats which were not observed in the phase-beat.

V. CONCLUSION
A comparison of linear optics measurements and correction methods, namely QV, LOCO, and TBT, has been performed at the SLS. The limitations of each of these techniques were clarified. Although the QV analysis includes a beta-beat offset of 2% or 3% that is not well understood, the statistical error in the elaborate procedure of $1% corresponds to the achievable beta-beat of 1%. In LOCO, the limitation due to the measurement noise is largely overcome by a large data set. In this respect, the LOCO method has a potential to achieve a residual beta-beat at the 0.1% rms level. The phase accuracy of the TBT method sets a beta-beat limit of $1% rms. In addition, the phase measurements may still be disturbed by the overlap in signal between turns.
When the correction iteration is continued after convergence, the measurement results should fluctuate within the statistical error. If the fluctuation and/or the residual deviation from the ideal model is far above the statistical error, the correction is presumed to be limited by systematic error(s). In the analyses presented, all methods show limitations arising from systematic errors when the beta-beat is corrected down to a few % level. In the case of LOCO, the calibrated model may underestimate the betabeat, when its minimum value is taken. A direct comparison between QV and LOCO showed consistent residual beta-beats, verifying the validity of the standard linear optics correction procedure. TBT was found to generate local beta-beats which were not observed in the phase-beat. It is, however, noted that a new BPM system that has a modified filter to suppress the overlap in signal between turns, has been developed at ESRF [17]. TBT thus remains an attractive procedure, because of its immediate measurement capabilities and its potential for a complete online optics characterization.