# Linear Optics Calibration in a Storage Ring Based on Machine Learning
## 1 Introduction  
The synchrotron light source is one of the most powerful tools in modern science and technology, providing highly brilliant and highly stable synchrotron radiation to meet the advanced experimental conditions in frontier research [1, 2]. For 3 rd- or 4 th-generation synchrotron light sources to maintain good performance, it is important to maintain a highly stable electron beam, which involves orbit stability, current stability, source size stability, control of the collective effects, and energy stabilization [3, 4, 5, 6, 7]. This paper discusses linear optics calibration, which is an essential aspect of stable beams. During the design stage of a storage ring, considerable efforts were made to optimize the storage ring parameters such as the tune, lifetime, natural beam emittances, and dynamic apertures (DA). In an ideal state, the storage ring parameters are at the desired values and the beam moves in a closed orbit in the storage ring. However, the actual situation often differs from the theoretical model. Not only do magnetic field errors and magnet misalignments cause the closed orbit distortion, but thermal expansion and contraction, ground settlement deformation, and other factors can cause various displacements and mechanical vibrations of the storage ring magnets, leading to closed orbit distortion and tune shift [8]. These unwanted errors can lead to an increase in beam emittance and a decrease in dynamic and momentum apertures. In addition, they affect experimental results and quality in the beamline. Therefore, it is important to apply an effective method for measuring the beam optics parameters, complete the linear optics calibration, and, finally, ensure successful storage ring operation [9]. The Shanghai Synchrotron Radiation Facility (SSRF), located in Shanghai, China, is based on a 3.5 GeV storage ring with an average beam current of more than 200 mA [10]. The initial SSRF storage ring consisted of 20 standard double bend achromatic (DBA) cells with four super-periods, but its lattice was upgraded with two DBA cells with high magnetic field super-bends [11]. Sixty of these sextupoles generate skew quadrupole fields via auxiliary coils. Moreover, a total of 138 beam position monitors (BPM) and 80 correctors are distributed throughout the storage ring. In total, there are 206 quadrupoles, 140 sextupoles, 60 skew quadrupoles, and 48 bending magnets in the SSRF storage ring. As seen above, having so many magnets in the storage ring is a major challenge for SSRF commissioning. The linear optics from closed orbit (LOCO) algorithm is an effective tool for calibrating linear optics [12]. It is calculated on the basis of the orbit response matrix. The orbit response matrix represents the change in orbit at the BPM with the strength of the correctors. As long as the phase difference between the correctors and BPM is suitable, the closed orbit response matrix can reflect the linear optics information of the storage ring [13]. In this way, by adjusting the model lattice parameters and fitting the model response matrix to the measured matrix, we can determine the actual machine errors. The strength of quadrupoles can be accurately found to restore the actual machine to the designed state. Currently, machine learning is increasingly being used at accelerators worldwide [14; 15]. For example, machine-learning-based methods are used to optimize nonlinear storage ring problems and to find the multiobjective optimized Pareto front [16; 17]. A study at Lawrence Berkeley National Lab (LBNL) has shown that machine learning algorithms can be used instead of traditional feedforward methods to counteract the insertion device gap or phase motion-induced perturbations on the advanced light source (ALS) light source electron beam [6]. Furthermore, a new machine learning application is innovative polynomial neural networks for fitting beam dynamics parameters in accelerators [18].