Injection orbit matching for CSNS/RCS

The Rapid Cycling Synchrotron(RCS) of China Spallation Neutron Source(CSNS) employs painting injection to achieve uniform beam distribution and suppress space-charge effects. In the painting injection, the mismatch between the injection beam orbit and circulating orbit could make the non-uniformity of beam distribution and emittance growth, which may lead to beam loss. To match the injection beam orbit and the circulating beam orbit, it is necessary to identify the orbit of injection beam relative to the circulating orbit in the injection point. However, it's hard to measure this relative injection orbit directly. Theoretically, the relative injection beam orbit can be deduced by measuring the turn-by-turn beam position of a single turn injection beam. However, the intensity of single turn injected beam is too low to be measured with sufficient signal-noise ratio by using beam position monitor(BPM). In this paper, two effective methods based on multi-turn injection and turn-by-turn BPM are given to perform the match between the injection and the circulating beam orbit. The simulation results and application in the beam commissioning of CSNS/RCS show the validity of the methods.


I. INTRODUCTION
China Spallation Neutron Source(CSNS) is a high intensity proton accelerator based 100 kW pulsed neutron source [1], its accelerators consist of an 80 M eV H-linac and a 1.6 GeV proton Rapid Cycling Synchrotron(RCS) with repetition rate of 25 Hz [2]. The schematic layout is shown in Fig. 1, the main parameters are shown in Table I. The layout of injection system is shown in Fig. 2, where eight painting bump magnets (BH1∼BH4 for horizontal and BV1∼BV4 for vertical), and four chicane bump magnets (BC1∼BC4) are accommodated in an uninterrupted straight section [3] [4]. The RCS employs painting injection to achieve uniform beam distribution and suppress the space-charge effects.
To control the painting process precisely, it is necessary to identify the orbit of injection beam relative to the circulating orbit, which are (∆x/∆y, ∆x /∆y ) in transverse phase space, in the injection point. Hereafter we choose (∆x, ∆x ) as the study object. With the identified relative injection orbit, the injection orbit and circulating orbit can be well matched upon the painting pattern. The mismatch between the injection beam orbit and circulating orbit could make the non-uniformity of beam distribution and emittance growth, which may lead to beam loss. Some simulations were done to show the effects of the injection orbit mismatch on the emittance growth and beam loss. In the simulation, taking the painting process of CSNS as an example, the anticorrelated painting process is simulated by using the particle tracking code ORBIT [5]. * wangs@ihep.ac.cn In the anti-correlated painting, horizontal painting fills RCS acceptance from center to outer phase space, and the matching conditions are ∆x = 0, ∆x = 0. In the simulation, let ∆x = 0, and sweep ∆x from 0 mm to 10 mm. The turn number of the injection painting process was 200 and the first 2000 turns in acceleration process were considered in simulation.
As shown in Fig. 3, the emittance increases with the increase of ∆x(mismatch) and the beam loss is significant increased when ∆x > 5 mm.
The identification of the relative injection beam orbit is critical to perform the good injection matching. However, the injection orbit belongs to the transport line and the circulating orbit belongs to the ring, and it's hard to measure the relative injection orbit directly. Theoretically, the relative injection beam orbit can be calculated by transfer matrix with turn-by-turn beam position of a single turn injected beam. But for CSNS, the maximum intensity of single turn injected beam is 15 mA, and it is too low to be measured with sufficient signal-noise ratio by using beam position monitor (BPM). So the beam current should be increased with multi-turn injection to gain in the signal-noise ratio of BPM, while the identification of the phase-space coordinates at the injection point becomes more complicated.
In this paper, two methods based on multi-turn injection and turn-by-turn data of beam position are introduced to identify the injection orbit relative to circulating orbit. The simulation results and application in the beam commissioning of CSNS/RCS show the validity of the methods. The matrix of betatron oscillation: where ∆x inj ,∆x inj and ∆x i ,∆x i are the transverse phase space coordinates relative to the circulating orbit at the injection point and the ith BPM in the ring respectively, and M i is the transfer matrix from the injection point to the ith BPM。 As the BPM detect the charge center of the beam, for m turns injection beam, the transverse phase-space coordinates at the jth BPM after n turns could be derived as: where ∆x j and ∆x j are the phase-space coordinates of the circulating beam, ∆x inj and ∆x inj are the injection beam coordinates at the injection point, M inj−j is the transfer matrix from injection point to the jth BPM, M is the one turn transfer matrix.
In the Eq. (2), ∆x j could be measured directly by using the turn-by-turn BPM, ∆x j could be obtained with a pair of BPMs which located in drift space [6]. Here a more general algorithm is introduced to obtain ∆x inj and ∆x inj , which is described as: where M j (n) = M inj−j M n−1 + M n−2 + · · · + M n−m is the transfer matrix from injection point to jth (j=1,2) BPM after n turns circulating. With the above algorithm, any BPM could be utilized in the measurement of machine study.

B. Numerical simulations
In the simulation and beam commissioning, the primary errors should be considered are the errors of transfer and BPM errors which related to the resolution. In beam commissioning, the tune deviation due to transfer matrix errors can be controlled to less than 0.005 by making optics measurement and correction with LOCO (Linear Optics from Closed Orbits) [7]. A simulation with transfer matrix errors was done by using Accelerator ToolBox (AT) which is a collection of tools to model particle accelerators in the MATLAB environment [8], the reconstructed ∆x inj and ∆x inj in Eq. (5) are less than ±0.5 mm and ±0.03 mrad, when the tune deviation due to transfer matrix errors is less than 0.005. So only the BPM errors are considered in the next simulations.
In the simulation, the random BPM errors, normally distributed, was generated with different BPM resolution, 0.5 mm, 1.5 mm and 2.5 mm respectively. In the simulation, 3 turns beam were injected and the preset horizontal phase-space coordinates at the injection point was (5 mm, 1 mrad). R4BPM12 and R4BPM02 were marked as the observation point during the tracking. Totally 200 sets of BPM errors were simulated, and the reconstructed phase-space coordinates at the injection point were obtained by using Eq. (5). The results were plotted in a histogram as shown in the Fig. 4, in which the left plots are the position of the phase-space coordinates and the right plots are the angle coordinates. The mean values (µ) and the standard deviation (δ) of the results were obtained by fitting each distribution to Gaussian function. The simulated means of (∆x inj , ∆x inj ) with different BPM resolution were close to the preset values of (5 mm, 1 mrad), which reflected the validity of the method. The standard deviations of (∆x inj , ∆x inj ) were found to be (1.65 mm, 0.457 mrad), (4.75 mm, 1.4 mrad), (9.13 mm, 2.68 mrad) for BPM resolution of 0.5 mm, 1.5 mm and 2.5 mm respectively. One can see that the simulation result is very sensitive to the resolution of BPM, and the high BPM resolution is required in this algorithm. For CSNS/RCS, the nominal BPM resolution is about 2 mm, and it is difficult to achieve high accuracy result by using this algorithm. To improve the accuracy, an improved algorithm is proposed, as discussed in section 3.

A. Basic principle
When the injection beam is deviated from the closed orbit of circulating beam at injection point, the betatron oscillation could be detected by BPM. Theoretically, the displacement from the reference orbit after n turns at one specified BPM could be obtained: where ∆x 0 and ∆x 0 are the initial phase-space coordinates at the specified BPM, υ x is the betatron tune, n is the turn number, α x and β x are twiss parameters. Generally, the above oscillation is simple harmonic oscillation with respects to the turn number n. Eq. (7) is the fourier transform of beam motion, where T is the cycle period of the ring. Assume that then Eq. (7) could be expressed as: In the Eq. (10) the real part Re[X(υ x )] and imaginary part Im[X(υ x )] depend on the corresponding parts of C(υ x ) and S(υ x ), which can be described as: where Based on the features of fourier transform, Re[X(υ x )] is actually the amplitude of the cosine component and Im[X(υ x )] is the amplitude of the sine component, the response matrix could be described as follow: According to Eq. (2), the transfer matrix from injection point to one specified BPM after n turn with m turn injection beam could be obtained as: where The real and imaginary parts of X(υ x ) could be described by matrix A = R(υ x )M m/n and the initial phasespace coordinates at injection point: υ x could be obtained from turn − by − turn data with fourier analysis, and the matrix A could be obtained by beam based measurement. Then the phase-space coordinates of injected beam relative to the circulating beam at the injection point could be obtained with the turn-by-turn data of a single BPM.

B. Numerical simulations
The simulation, similar as what done in section 2.2, was performed. Most of the simulation conditions were consistent with that of the simulation in section 2.2, except for that the tracking turn was increased to 20. The simulation results are shown in Fig. 5. For the different preset errors, the mean values of (∆x inj , ∆x inj ) are consistent and close to the preset values (5 mm, 1 So far, all the analysis and simulations are based on the linear condition. As mentioned in section 2.1, the BPM detect the charge center of the beam, so under the linear condition the beam position of the multi-turn injected beam is equal to the average of the beam positions of each single pulse. However, in reality, a few factors will break the linear condition, in which the space charge is one of the main non-linear factors. A simulation was performed to evaluate the effect of space charge on the beam position with multi-turn injection.
The process of the injection with space charge and without space charge were simulated by ORBIT respectively. The turn number of the injected beam was 3 and each turn of injected beam contained 40000 macro particles which corresponded to the peak current of 10 mA, and the first 20 turns were considered in simulation. The simulation results are shown in the Fig. 6, in which the left plot shows the tracking result in real space with space charge while the right plot shows the tracking result with- out space charge. It can be seen that for the 3 turns injected beam, and with peak current of 10 mA , after 20 turns of tracking, the effects of the space charge on the beam distribution, as well as the beam position, is very small, and can be ignored.

IV. MACHINE STUDY
The method was tested and applied in the beam commissioning of CSNS/RCS. The beam commissioning was still in the beginning state, and the closed orbit wasn't well corrected, so the machine study was conducted for only the second method.
The machine study was performed in the DC mode of RCS, in which the beam was injected and extracted in 80 M eV without acceleration. The harmonic number of RCS is 2, but in the machine study, the chopped beam was only injected into one of two buckets, and totally 3 pulses from the linac were injected into the RCS with the peak current of 12 mA. Two RF cavities were utilized to provide 24 kV voltage to the beam, and the synchrotron period is about 0.36 ms. After the injection , the first 18 turns BPM data were taken for utilization in calculation. The circulating period is about 1.96 µs, and the 18 turns circulating take about 0.035 ms, and is far less than the period of synchrotron oscillation, so the effect of synchrotron oscillation on the transverse position of the beam is negligible. The BPMs which in the dispersionfree area were selected to avoid the effect of the dispersion. The matrix A which was utilized in the calculation and described in section 3.1 was obtained from a beam calibrated model based on AT, the measured tune in horizontal direction was 4.822 and the tune calculated by the calibrated model was about 4.824, according to the simulation result in section 2.2, the errors of transfer matrix could be ignored.
Two BPMs were selected as the observation points. Fig. 7 shows the measurement results, and in which the betatron oscillation can be clearly observed.
The phase-space coordinates of injected beam at the injection point were reconstructed with turn-by-turn data from different BPMs, as listed in Table II. Con-  sidering the resolution of BPM, the consistency of the results obtained from two different BPMs is satisfactory. The relative position and angle of the injected beam at injection point can be corrected by the bump magnets in RCS and dipole correctors in the beam transport line. When the coordinates deviation of injected beam were corrected, with 3 turn injection beam, the oscillation of beam position in the BPMs can be depressed. Fig. 8 shows the detected betatron oscillation before and after correction.
Since the method is based on the turn-by-turn data of the BPMs and transfer matrix, the accuracy of the results depends on the resolution of the BPMs and errors of transfer matrix. However, in practice, the stability of the injection beam and the fluctuation of the bump magnets are also considerable factors. In the machine study, it is difficult to evaluate the effect of these factors individually. However, the overall influence of the fluctuation on the measurements could be extracted by repeatedly do the measurement. Fig. 9 shows the statistics results of 11 times of beam best, and the turn-by-turn data were obtained from 4 BPMs . The left plot is the position of phase-space coordinates and the right plot is the angle. The mean values of (∆x inj , ∆x inj ) were found to be 13.8 mm and -0.486 mrad, respectively. The standard deviations of (∆x inj , ∆x inj ), here are 1.77 mm and 0.285 mrad, could be used to estimate the effects of the overall errors.

V. DISCUSSION
These two methods were performed validly by simulation, and the second method was applied in the beam commissioning successfully. The phase-space coordinates relative to the circulating orbit at the injection point can be reconstructed effectively. However, there is obvious difference between the accuracy of the two methods. The first method is very sensitive to the BPM errors, and the accuracy of the result depends on both the BPM resolution and offset. The reason is that the errors are involved in calculation directly, and there isn't sub-process to depress the effects of the BPM errors. The second method is more robust, it's relatively not sensitive to the errors, and the standard deviation of the results is quite small with the relatively low BPM resolution. The key point is that the fourier fitting is utilized to calculate the real and imaginary parts of oscillation data, and the effect of BPM errors are depressed during the fitting.
Compare with the method which based on the single pass mode and BPM pairs, the present two methods based on multi-turn injection are more general. Any BPM of RCS could be marked as observation point in the calculation, and the accumulation of beam intensity could enhance the signal noise ratio of BPM data.

VI. CONCLUSION
In the painting injection, the mismatch between the injection orbit and the circulating orbit will result in emittance growth and non-uniformity of beam distribution, which may lead to beam loss. Due to the special location and limitation of detector, the identification of the phasespace coordinates of the injection beam at injection point is rather difficult. Two effective methods were introduced to obtain the phase-space coordinates at injection point base on the multi-turn injection and turn-by-turn data of beam position, and both methods are checked by simulation study. Due to the limit of accuracy and resolution of BPM, only the second method was applied in the beam commissioning of CSNS/RCS successfully, and the beam test results were satisfactory. The detected betatron oscillation was depressed obviously after correction, which means the injection orbit and circulating orbit were well matched.
The beam commissioning of CSNS/RCS is still in the beginning state, the further study will be conducted in the future to enhance the accuracy of the present methods for the application in the painting control.