Closed orbit correction at synchrotrons for symmetric and near-symmetric lattices

This contribution compiles the benefits of lattice symmetry in the context of closed orbit correction. A symmetric arrangement of BPMs and correctors results in structured orbit response matrices of Circulant or block Circulant type. These forms of matrices provide favorable properties in terms of computational complexity, information compression and interpretation of mathematical vector spaces of BPMs and correctors. For broken symmetries, a nearest-Circulant approximation is introduced and the practical advantages of symmetry exploitation are demonstrated with the help of simulations and experiments in the context of FAIR synchrotrons.


I. INTRODUCTION
The closed orbit correction has been an integral part of synchrotron and storage ring in light sources as well as in hadron machines for stable beam operations [1][2][3]. Closed orbit correction methods are typically classified as "local" or "global" given the spatial extent of their correction. Local bumps generated by three to four correctors are utilized for orbit correction in a localized region of a synchrotron while global correction methods rely on the effect of each corrector throughout the synchrotron. The global effect of a single dipole kick θ c located at a longitudinal location s 1 is described by the solution of the Hill's equation [4,5] z(s − s 1 ) = θ c β(s 1 )β(s) 2 sin(πQ z ) cos (Q z π − |µ(s 1 ) − µ(s)|) where s − s 1 is the longitudinal separation from the source of dipolar kick and z is the transverse orbit position in either plane (i.e. z is either x or y). β and µ denote the lattice beta function and phase advance, respectively and Q z is the coherent betatron tune in either plane. For a finite number of beam position monitors (BPMs) and correctors, Eq. 1 takes the shape of a matrix referred to as the orbit response matrix (ORM) such that: where Θ is the corrector settings vector and z is the beam positions vector at the BPM locations. In nutshell, the main concept of global correction is to calculate the corrector strengths that can counteract the existing dipolar field errors such that the orbit distortion measured with the BPMs is minimized.
Historically, four distinct methods have served the global orbit correction which include sliding bump method [6], MICADO [7], harmonic correction [8] and singular value decomposition (SVD) [5]. A variant of the SVD type correction referred to as eigenvalue decomposition has also been reported [9,10]. Sliding bump method involved forming independent local bumps in order to achieve the required positions at the BPM locations and has been phased out in usage. MICADO also referred to as orthogonal matching pursuit (OMP) in the signal processing literature [11,12] was devised to find out some most effective correctors for minimizing the orbit distortion and has robustness and computational issues. Harmonic correction was the first method to discuss the notion of mode-based correction by means of a decomposition of the perturbed orbit into Fourier harmonics which can be corrected individually. However, the validity and efficacy of this method for non-periodic lattices was not explored. In literature, it seems to have been used only when the correction is intended for few specific spatial modes of the perturbed orbit, e.g. modes around the coherent tune frequency. Singular value decomposition (SVD) is a generalized technique based upon diagonalization and inversion of the matrices and superseding all the above-mentioned methods, has become the de-facto algorithm for orbit correction. The SVD of a real-valued matrix R is given as [13] where U and V are the left and right orthogonal matrices and S is the diagonal matrix whose diagonal entries are called singular values. Like harmonic analysis, SVD also provides the liberty of mode-by-mode orbit correction on top of mode-truncation and matrix inversion using a transformation of perturbed orbit vector z and corrector settings vector Θ into the mode-space as [5] wherez = U T z andΘ = V T Θ are the BPM and corrector vectors in the transformed modespace, respectively. The solution of Eq. 4 gives the required corrector settings for a given perturbed orbit. SVD also has some limitations particularly when dealing with uncertainty in the process model as it is a numerical technique and there is no apparent analytic way of associating uncertainties in the lattice parameters to the singular values [14]. Moreover, a lack of physical interpretation of SVD modes, their mutual phase relationship and dependence on singular values makes the uncertainty modelling complicated [15,16]. The inter-dependence between U, S and V matrices also poses a special challenge for systems where matrices need to be updated during orbit correction i.e. on the acceleration ramp in synchrotrons [17].
In this paper, we present a one dimensional Discrete Fourier Transform (DFT)-based diagonalization and inversion of the ORM for symmetric lattices. The technique is based upon the exploitation of Circulant symmetry in the lattice and provides computational benefits, information compression into a diagonal matrix only and physical interpretation of the ORM mode-space. This method serves as the transition between previously discussed harmonic analysis and SVD with an exact equivalence for symmetric lattices. Further, a nearest-Circulant extension is discussed for broken symmetries making most of the ideas discussed for symmetric matrices applicable to those of non-symmetric lattices.
In the next section, the DFT-based decomposition and inversion of the ORMs for full sym- layout for BPMs and correctors was found in [10] but was limited to finding eigenvalues for eigenvector-based orbit correction. Any discussions towards the matrix inversion, relations to SVD and application to broken symmetry were not made. These issues will be discussed in this report. In this section, we will discuss two kinds of ORM symmetries which exist in two different synchrotrons of the FAIR project, the SIS18 and SIS100. We use them as practical examples and to extend our findings to broken symmetries.
where i is the order of the permutation matrix. As an example, Eq. 6 shows the SIS18 vertical ORM calculated by MAD-X [19] for triplet optics in the units of mm/mrad: A circulant matrix can be decomposed as where F is a standard Fourier matrix which is identical for all Circulants of same size with elements given as [20] ( for i, f ∈ [0, .., n − 1] where i represents the sampling points, f is the discrete frequency of each Fourier mode (column of F), j is the imaginary unit and n is the size of the square Circulant matrix. Λ is a diagonal matrix containing the discrete Fourier coefficients σ f of the first row or column of R C on its diagonal positions, which are given as In the case of an ORM, n is the total number of BPMs or correctors while the columns of matrix F represent the mode space of BPM and correctors comprised of pure sine and cosine functions. In this way, a DFT-based decomposition gives a physical interpretation to the mode-space of an ORM and would be equivalent to the harmonic analysis. The inverse of R C can be written as where Λ −1 is the diagonal matrix having inverses of Fourier coefficients at its diagonal positions.

B. Equivalence of SVD and DFT for Circulant symmetry
For the general matrices, there is no analytic information available to interpolate the SVD modes between discrete elements of U and V matrices, as SVD is a numerical technique and it is free to choose any mode structure in order to satisfy the orthogonality of the U and V matrices. In case of Circulant matrices, there exists an equivalence between SVD and DFT by introducing the discrete Hartley transform matrix H. Following equation 7 and using the theorem 4.1 of [21] which states that the SVD of a Circulant matrix can be written as where H(F) = Re{F} + Im{F} The diagonal matrix Λ of the DFT-based decomposition can be written as with Σ and |Λ| being the diagonal matrices containing only the phases φ di and magnitudes of each Fourier coefficient, respectively. The matrices U, S and V are calculated below by solving the right hand side of Eq. 11 element-wise. The last term can be solved as where φ = − π 4 . The singular values of the SVD matrix S are the moduli of the Fourier coefficients of DFT diagonal matrix Λ: Similarly, the U matrix is equal to the following first part of the right hand side of Eq. 11 as Combining equations 14, 15 and 16, equation 11 can be written as This conversion shows a significant difference between the two techniques in terms of information spread. SVD distributes the information in all three matrices while DFT-based decomposition compresses all the information into one diagonal matrix. SVD-like mode truncation is also possible here by removing the Fourier coefficients of absolute values below a certain threshold along with corresponding columns of F thus preserving the main benefit of SVD while adding the benefits of harmonic analysis.

C. Broken symmetry and nearest-Circulant approximation
In many scenarios, the Circulant symmetry of the ORM can be broken due to the odd placement of BPMs and correctors, presence of insertion devices, beta beating etc. For example, two horizontal correctors in SIS18 are placed in the second dipoles of the 4 th and 6 th sections while all others are in the first dipoles, hence breaking the Circulant symmetry in the corresponding columns highlighted with red color in the ORM below calculated by MAD-X [19] for triplet optics in the units of mm/mrad: In this case, a DFT of only one row or column cannot be used directly for the decomposition and inversion of the ORM. However, a slight modification of the ORM in order to find a nearest-Circulant approximation is proposed as an alternate for broken symmetries. This is based upon the fact an iterative correction implemented for most orbit correction systems can still converge with a modified process model at the cost of more iterations or correction speed [17,22]. A recent example being the use of Tikhonov regularization [23] in order to improve the robustness and stability margins of the controller by modifying the gain for higher order modes of ORM by factors p i given as [14] p where s i are the singular values and an appropriate value of µ > 0 serves to decrease the condition number of the ORM defined as the ratio of its largest to smallest singular values [25].
The theory of nearest-Circulant approximation is discussed in detail in [24] but has never been explored for ORM inversion before. For a given square matrix R, its nearest-Circulant can be found by the Frobenius inner product of R with permutation matrices π i n as where n is the size of the matrix and the order of the permutation matrix is i = 0, ..., n − 1.
Eq. 20 is equivalent to the averaging of the diagonal elements of R and for the resultant approximation, the theory discussed in section II A holds. Figure   on the orbit correction can be quantified in terms of the residual after one iteration of orbit correction, given as [5,17] where R M is the actual machine ORM and Θ N C is the corrector settings vector calculated using the nearest-Circulant approximation R N C of the original model ORM R. Figure 3 shows the experimentally measured closed orbit before and after one iteration of correction in the horizontal plane of the SIS18. The difference in the RMS of the residual orbit is 9% of the initial distortion for using the original ORM and its nearest-Circulant approximation.
It is likely that a controller which is capable of orbit correction for the original ORM will also provide the correction for its nearest-Circulant approximation.

D. Block Circulant symmetry of SIS100 ORMs
The SIS100 is the largest synchrotron of the FAIR project with a six-fold symmetry.
Each of the six sections has 14 BPMs and 14 correctors while in one section, the cold quadrupole is replaced by a warm quadrupole [26]. The warm quadrupole results in a beta beating (peak-peak ≈ 10%) and hence a loss of symmetry in the ORM as calculated by MAD-X [19]. The beta function at BPM locations in y-plane has been plotted in Fig. 4 for three consecutive sections with and without beta beating (by replacing the warm quadrupole by a cold quadrupole in MAD-X [19]). The block symmetry of the SIS100 ORMs can be explored in two ways; either by a) ignoring beta beating or by b) finding the nearest-block Circulant approximation by averaging the diagonal blocks. In either case, the ORM attains a plotted for three cells, with beta beating (red('*')) and without beta beating (blue('x')).
The abscissa is the distance along the synchrotron.
block-wise symmetry such that identical blocks of elements appear at the diagonal locations: Such a matrix is referred to as block Circulant matrix (BCM) [18]. Here where F m and F n are the standard Fourier matrices defined in Eq. 8. The symbol ⊗ denotes the Kronecker product of the matrices. M i are the square matrices of dimension n which contain all the information of the block Circulant matrix and can be calculated using only the first row of blocks as reproduced from [18] in appendix B. Equation 23 can be solved to calculate the inverse or pseudo-inverse (R + BC ) of the ORM as where    Such a reduction in numerical complexity becomes meaningful for the larger ORMs and for the on-ramp orbit correction. SIS18 is an example [17] of the later, where lattice settings as well as ORM change systematically during the ramp. For SVD, one has to update all three matrices U, V and S for the ORM variation while for DFT, it is a set of only n numbers to be updated in the diagonal matrix. This could lead to significant memory usage reduction if the matrix multiplication for a continuously changing matrices is implemented in an FPGA.

B. Orbit correction in the case of malfunctioned BPMs
The physical interpretation of BPM and corrector mode space provided by DFT-based decomposition of ORM can be used to interpolate the closed orbit at the location of some malfunctioning or "missing" BPM. This is demonstrated for the SIS18 in vertical plane using MAD-X for a scenario of two consecutive BPMs being excluded. The operational scenario of BPM electronics failure due to radiation shower happens often in hadron synchrotrons and can lead to local bumps if there is not enough redundancy in the number of BPMs.  plotted in black color. The orbit correction taking the orbit position "zero" at the "missing" BPM locations and using a Circulant matrix is also plotted as a blue curve for comparison.
The robustness against "missing" BPMs is shown by the overall improved correction obtained using an estimated beam position instead of using the non-Circulant matrix. Besides the better global correction one can also get the benefits of Circulant symmetry and DFT-based decomposition (e.g. online decomposition during ramp) even when the symmetry has been broken due to the "missing" BPMs.

C. Uncertainty description in spatial process model
Uncertainties appear into ORMs through various sources e.g. BPM and corrector calibration errors, tune variation due to magnet gradient errors or during acceleration ramp [17].
For SVD, the uncertainty in the ORM appears in all the three matrices of SVD represented by ∆ [16] ( Alternatively, Fourier coefficients of harmonic analysis given as [14] σ where f is the discrete frequency and Q z is the betatron tune in either transverse plane, have also been used to express uncertainty in the betatron tune. But this method cannot be accompanied with matrix inversion and Fourier coefficients given in Eq. 28 have no quantitative relation with SVD singular values. The information compression into one diagonal matrix in case of DFT-based diagonalization, can provide a significant simplification of the uncertainty description as

D. Momentum mismatch and orbit correction
A mismatch between RF frequency and the dipole field results in a relative mismatch in the average momentum of the beam ∆p p and the closed orbit deviates from the equilibrium position primarily in the x-plane (in the absence of coupling between the two planes) [28]: Here D x (s) is the dispersion function and ∆x D (s) is the resultant DC (constant) shift in the closed orbit. Fig. 11 shows a set of measured horizontal closed orbits for the induced relative momentum mismatch in the range of -2% to 2% with a step size of 0.5% in SIS18 at extraction energy. One can see a shift of the mean value of the closed orbit as a function of     The following appendix is adopted from [18] (Theorem 56.4) as it is, where a BCM can also be written with the help of fundamental permutation matrices by replacing the numbers with matrices A i in Eq. 5 as Let B i = F n A i F * n , the Eq. B1 becomes The middle term in Eq. B3 has a form of a diagonal matrix as .
and Eq. B3 becomes Appendix C: Block Circulant symmetry in case of n bpm = 2n corrector The concept of DFT-based decomposition of ORM can also be extended to the matrices where n bpm = 2n corrector and the orbit response matrix can be arranged in the form of two Circulant blocks each of dimension n as a 0 a 1 a 2 a 3 . . a n−1 a n−1 a 0 a 1 a 2 . . a n−2 .
and can be diagonalised by the DFT of the first rows of each block as where F is the standard Fourier matrix of size n. F c is a 2n × 2n matrix constructed using the standard Fourier matrix of size n as and Λ c is a rectangular matrix composed of two diagonal block matrices as where σ a,i and σ b,i are the Fourier coefficients of the first rows of each block of R, respectively.
The final decomposition can be written as and the pseudo-inverse of R can be calculated as Moreover, the SVD singular values of the matrix R also have a direct relation to the Fourier coefficients of individual blocks as