Identification and characterization of high order incoherent space charge driven structure resonances in the CERN Proton Synchrotron

Space charge is typically one of the performance limitations for the operation of high intensity and high brightness beams in circular accelerators. In the Proton Synchrotron (PS) at CERN, losses are observed for vertical tunes above $Q_y=6.25$, especially for beams with large space charge tune shift. The work presented here shows that this behaviour is associated to structure resonances excited by space charge due to the highly symmetric accelerator lattice of the PS, typical for first generation alternating gradient synchrotrons. Experimental studies demonstrate the dependency of the losses on the beam brightness and the harmonic of the resonance, and simulation studies reveal the incoherent nature of the resonance. Furthermore, the calculation of the Resonance Driving Terms (RDT) generated by the space charge potential shows that the operational working point of the PS is surrounded by multiple space charge driven incoherent resonances. Finally, measurements and simulations on both lattice driven and space charge driven resonances illustrate the different behaviour of the beam loss depending on the source of the resonance excitation and on the beam brightness.


I. INTRODUCTION
Space charge effects in combination with betatron resonances can be one of the main performance limitations for high brightness beams in circular accelerators. The space charge force generates an incoherent tune shift that depends on the line density of the longitudinal beam profile and the transverse beam size evolution around the machine. Different tune shifts of individual particles lead to a tune spread in the transverse tune space. The interplay between the space charge tune spread and excited resonances was previously studied on a controlled normal octupole resonance [1][2][3]. The experimentally observed transverse emittance growth and beam loss was identified to be caused by the periodic resonance crossing and trapping of individual particles due to the modulation of the transverse space charge force through the synchrotron oscillations. More recently, the same mechanism was studied at a coupled sextupole resonance [4]. However, in addition to the induced incoherent tune spread, the nonlinear transverse space charge potential can also directly excite structure resonances, as shown in [5][6][7].
The CERN Proton Synchrotron (PS) provides an excellent test bench for the study of space charge effects due to its highly symmetric lattice and the long beam storage time required at low energy in normal operation [8]. Moreover, space charge is the major performance limitation for high brightness beams required in the context of the LHC Injectors Upgrade (LIU) project [9]. The PS consists of 100 combined function main magnets, each divided into a focusing and defocusing half unit, resulting in a total of 50 cells. The bare tunes of Q x = 6.25, Q y = 6.28 are determined by the quadrupolar components of the main magnets. The tunes can be adjusted either using dedicated quadrupoles or circuits of pole face windings (PFW) on the main magnet poles [10]. Each of these two options comes with disadvantages, namely a large perturbation of the periodicity of the machine for large tune adjustments with the dedicated quadrupoles (as they are not placed symmetrically around the ring), while the tune control through the PFWs also generates unavoidable higher order field components. In the usual operation of the PS, the dedicated quadrupoles are preferred for the tune adjustment at low energy, while the PFW are used to control tunes and chromaticities during the ramp. Even though the 50-fold periodicity of the bare lattice is slightly perturbed by the insertion of 20 long straight sections, the optics remain highly regular and the main harmonic of the lattice is 50, as can be seen through the optics and the harmonic analysis of the beam size in Fig. 1. The presence of this strong lattice harmonic suggests that resonances of the same harmonic, i.e. mQ x + nQ y = 50, where (m, n) are integer numbers indicating the order of the resonance, can be driven by systematic errors in the machine and even by space charge itself.
The maximum incoherent space charge tune shifts for the operational LHC beams at injection in the PS are ∆Q x ≈ −0.19 and ∆Q y ≈ −0.24 and the bare tunes are usually set to Q x = 6.20 and Q y = 6.24. The need to accommodate an even higher incoherent space charge tune shift of beams with even higher brightness in the course of the LIU project drives the need for detailed resonance and space charge studies in order not to exceed the allocated 5 % emittance growth and 5 % loss budgets.
To guide the choice of the optimal working point for these high brightness beams, dynamic tune scan measurements were performed using a low brightness beam with large transverse emittances in order to identify excited resonances through the recorded losses, as reported in the past for the PS [11] and the CERN Proton Synchrotron Booster (PSB) [12]. During the measurements one of the tunes is kept constant while the other is varied linearly to cover the available tune space. The procedure is repeated until the accessible tune space is fully covered, in all possible directions. Measuring the beam loss rate as a function of the tune settings allows the identification of excited resonances as shown in Fig. 2.
Various low order resonances up to 4 th order can be clearly identified. In particular, the strongest resonance seems to be the sum resonance 2Q x + Q y = 19, most likely excited by skew sextupole errors in the main magnets [13]. However, since the exact error remains unknown no skew sextupole-like errors are included in the nonlinear PS optics model. Other sextupole resonances such as the 3Q y = 19 skew resonance as well as the Q x − 2Q y = −6 normal sextupole resonance appear considerably weaker. Furthermore, the excitation of the resonances 2Q x + 2Q y = 25 and 4Q x = 25 indicates the presence of octupolar-like errors. On the other hand, the main region of interest around the operational working point Q x = 6.20, Q y = 6.24 seems free of resonances when considering the results from dynamic tune scans. Therefore, one could expect that working points above Q y = 6.25 could be suitable for operating high brightness beams in the PS. However, experimental studies to explore higher vertical tunes showed slow losses in the low energy part of the PS cycle as presented in Fig 3. It could be argued that the identification of resonances through dynamic tune scans is not sensitive enough to resolve relatively weak resonances. Instead, it was shown that the nonlinear space charge potential excites a structure resonance at Q y = 6.25 due to the high periodicity of the PS lattice [14,15]. As shown in the following sections, a detailed analysis of the space charge driven structure resonances in the PS reveals that the operational working point is actually surrounded by several space charge driven 8 th order incoherent structure resonances, as identified through experimental observations combined with simulations and analytical studies. This paper is organized as follows. In Section II, the initial studies leading to the identification of a space charge driven structure resonance at Q y = 6.25 are described. A detailed characterization through simulation studies is presented in Section III, clearly highlighting the incoherent nature of this resonance. With this result, the Hamiltonian resonance driving terms induced by the space charge potential of a Gaussian beam are calculated analytically in Section IV, revealing ad- ditional space charge driven structure resonances. The resonance excitation is also demonstrated using the Frequency Map Analysis (FMA) technique in Section V. The expected loss mechanism for bunched beams is discussed in Section VI. Section VII summarizes detailed experimental and simulation studies performed with low and high brightness beams, confirming the presence of various space charge driven structure resonances in the PS. Conclusions are given in Section VIII.

II. EXPERIMENTAL IDENTIFICATION OF STRUCTURE RESONANCES
The resonance at Q y = 6.25 leading to the losses observed in Fig. 3 could be driven either by random octupole-like errors of the PS lattice, or by the space charge potential due to the structure of the lattice. To experimentally identify the source of the excitation a couple of experiments were designed in order to correlate the observations to brightness and the 50 th lattice harmonic.
The dependence of the losses on the strength of the direct space charge force is demonstrated by an experimental study with beams of varying brightness. The beam parameters are summarized in Table I, the intensity is given in particles per bunch (ppb), the momentum deviation is noted as ∆p/p and the normalized transverse emittances as ε n x,y . During the experiment, the horizontal tune was kept at 6.23 and the vertical tune was ramped from 6.24 to 6.30 and it was kept constant for 300 ms, before ramping it down again to 6.24. The advantage of such a tune step is that beam loss starts and ends at precise times and can be clearly associated to the crossing of the resonance through the increase of the vertical tune. Figure 4 shows the relative intensity of the four beams along the cycle and the evolution of the vertical tune. It can be seen that the beam loss is directly correlated to the space charge force, demonstrated by the fact that the beam type 1 (blue) with the highest tune shift experiences the highest losses. To verify that the resonance is only excited at the 50 th harmonic, an experiment at different integer tunes was performed to probe the excitation at other resonance harmonics. The change of the vertical tune by one integer was achieved using an extra circuit installed in the main magnets referred to as Figure-of-8-Loop (F8L), which has the advantage of changing the quadrupolar field component of the combined function magnets without significantly exciting higher order field components [16]. The main limitation of this circuit is that it acts on both transverse tunes in opposite directions, as it increase the field in one half unit while decreasing it in the other. Hence, the experiment was conducted with the horizontal tune decreased by one integer unit and the vertical tune increased by one unit, which is referred to as (5, 7) optics according to the integer parts of (Q x , Q y ). It was verified that the integer part of the tune was indeed 5 in the horizontal and 7 in the vertical plane. The measured optics agreed with the model within 10% beta-beating and dispersion-beating [15].
The main measurement consisted of a tune-step in which the horizontal tune was kept constant while the fractional vertical tune was changed from 0.24 to a plateau value, where it was kept constant for 500 ms and then changed back to 0.24. The plateau value was varied between 0.24 and 0.3 in order to see the effect at the different working points, as shown in Fig. 5 (top). This measurement was performed in the (6,6) nominal optics and the (5,7) split-tunes optics. In the case of the nominal optics shown in Fig. 5 (center), the beam loss clearly increases for higher working points (since more particles cross the resonance due to the space charge induced tune shift). On the contrary, no beam loss was observed for the same range of fractional tunes in the case of the split-tunes (5,7) optics, as shown in Fig. 5 (bottom). The change of integer was found to be effective in mitigating against harmful effects of the resonance, confirming that the resonance at Q y = 6.25 is a space charge driven structure resonance. Unfortunately, the split-tunes optics (5,7) cannot be used in routine operation, as the available strength of the F8L is not sufficient to maintain this working point up to extraction energy. In addition, the impact on the gamma transition jump scheme [17] due to the change of phase advance between the special fast quadrupoles would require further studies.

III. RESONANCE CHARACTERIZATION
The presence of the strong 50 th harmonic in the lattice and the excitation of the resonance at Q y = 6.25 through space charge was experimentally confirmed. However, the resonance could be excited either in 8 th order as an incoherent structure resonance 8Q y = 50, or in 4 th order, as a coherent parametric resonance 4Q y = 50/2 [18]. The order of the excitation and hence the nature of the resonance at Q y = 6.25 can be verified in simulation studies. For this purpose, the resonance was dynamically crossed [19,20] using a coasting beam. In particular, the simulations are performed with two different space charge models: 1) self-consistent space charge solvers, which take into account both the coherent and incoherent response of the beam, 2) frozen model without update using analytical solvers for Gaussian distributions based on the Bassetti-Erskine formula [21], which take into account incoherent effects only. Comparing the results obtained with these two simulation models allows to identify the nature of the resonance. Furthermore, long term tracking simulations are used to study the agreement of these two models for bunched beams and long storage times.

A. Simple FODO lattice (coasting beam)
Initially a simplified FODO lattice is used in order to study space charge driven resonances, like the one observed at Q y = 6.25 in the PS, without taking into account the full complexity of the PS lattice yet. The FODO lattice used here consists of 50 identical cells, which is similar to the PS lattice, but without the 20 slightly longer straight sections. It has the same periodicity, energy and circumference, and therefore it can be matched to the same working points and excite the same structural resonances. The optics functions, the beam size evolution and the lattice harmonics of the FODO lattice are shown in Fig. 6. The resonance at Q y = 6.25 is dynamically crossed by varying the tune in the vertical plane, while the horizontal tune is kept constant at Q x = 7.2. Note that the horizontal tune is moved to a different integer in order to avoid the crossing of the extra space charge driven resonances that will be discussed in Section IV. The lattice is matched in MAD-X [22] and the tracking simulation is performed with PTC [23] in PyOrbit [24]. A coasting beam is used in this study in order to avoid the complexity coming from the longitudinal motion, and to enhance any possible coherent response of the beam. The beam is generated with Gaussian transverse distributions. The space charge force is included in the simulations using either the fully self-consistent 2.5 D Particle-In-Cell (PIC) solver, in which the force is calculated using a Poisson solver on a grid and weighted using the longitudinal line density, or an analytic solver in which the space charge force is evaluated based on a frozen potential calculated from the lattice functions and the macroscopic parameters of the beam using the Bassetti-Erskine formula [21]. The beam parameters are chosen to obtain maximum tune shifts in the order of ∆Q x ≈ −0.24 and ∆Q y ≈ −0.34. Figure 7 summarizes the simulation results. Hardly any response of the beam is observed when crossing the resonance from below (top graphs) for both the self consistent PIC simulation (left) and the frozen model (right). The core of the beam is unaffected while only some minor tails in the vertical plane are formed, probably caused by the scattering of individual particles on the incoherent resonance, which result in a vertical emittance growth of a few percent. In fact, the phase space does not show any structure that would indicate the crossing of a strong resonance.
The situation is quite different when crossing the resonance from above (bottom graphs). A large increase of the vertical emittance is observed and the phase space shows the clear formation of 8 islands indicating the excitation of the resonance in 8 th order. This explains the formation of large tails, since particles trapped in the 8Q y = 50 resonance separate from the beam core as the resonance islands move outwards when the vertical tune is further decreased. It is worth pointing out that the qualitative beam behaviour between the fully self-consistent PIC simulation (left) and the frozen space charge solver (right) agrees very well. In fact, the main dynamics of the two models is equivalent, which confirms the incoherent nature of the resonance since the frozen space charge solver cannot reproduce coherent effects. However, the emittance blow-up in the frozen model is slightly more pronounced compared to the self consistent solver. This quantitative difference is due to the fact that the beam parameters used for the frozen potential are kept constant throughout the simulation while the change of the particle distribution is taken into account in the self-consistent PIC simulations.

B. The PS lattice (coasting beam)
A similar study as shown above for the FODO lattice was repeated using the actual lattice of the PS. The main difference between the simple FODO lattice and the PS is that the latter consists of combined function mag- nets, and therefore the modulation of the lattice functions along the machine is less pronounced. In addition, the symmetry of the PS lattice is slightly modified by the 20 long straight sections as described in Sec II. Although extra quadrupole magnets are installed in the PS, in these simulations the tune matching was done using only the quadrupolar components of the PFW to preserve the periodicity as much as possible. The nonlinear field components introduced by the PFW in the real machine were omitted, in order not to excite any additional resonances. Hence, only the linear PS model is considered with space charge as the only nonlinearity in the lattice. The results for both crossing directions and the two solvers are shown in Fig. 8.
Similar to the observations for the simple FODO lattice, the response of the beam as the tune increases from FIG. 7. Dynamic crossing of the Qy = 6.25 resonance using the simple FODO lattice. The tracking is done using the selfconsistent PIC 2.5 D space charge solver (left) and the frozen model (right). The resonance is crossed as the tune increases from Qy = 6.24 to Qy = 6.45 (top) and vice-versa (bottom). For each solver and crossing direction, the vertical beam profiles are shown as function of turns and tune, using a second axis, color coded to the particle density (top). Likewise, the transverse emittances are given as a function of turns (and tunes on the second axis), while the vertical phase space is shown color-coded to the particle density for the turn and tune corresponding to the vertical line, at 900 and 2000 turns for the two crossings (bottom).
FIG. 8. Dynamic crossing of the Qy = 6.25 resonance using the PS lattice. The tracking is done using the self-consistent PIC 2.5 D space charge solver (left) and the frozen model (right). The resonance is crossed as the tune increases from Qy = 6.24 to Qy = 6.45 (top) and vice-versa (bottom). For each solver and crossing direction, the vertical beam profiles are shown as function of turns and tune, using a second axis, color coded to the particle density (top). Likewise, the transverse emittances are given as a function of turns (and tunes on the second axis), while the vertical phase space is shown color-coded to the particle density for the turn and tune corresponding to the vertical line, at 900 and 2000 turns for the two crossings (bottom). Note the different scale of both profiles and emittance plots between the top and bottom graphs. Q y = 6.24 to Q y = 6.45 is minimal and no significant vertical emittance increase is observed (top graphs). On the contrary, crossing the resonance in the opposite direction results in significant vertical emittance growth (bottom graphs). With both space charge models the vertical phase space shows particles in the tails of the beam distribution trapped in 8 islands that detach from the core, spread out and eventually collapse at high amplitudes. The profile evolution shows this trapping and collapse as the tails expand to very large amplitudes. The fact that both solvers demonstrate the same behaviour confirms again the incoherent nature of this resonance.

C. Long term behaviour (bunched beam, simple FODO lattice )
The simulations of the dynamic crossing have shown that in both lattices the incoherent response of the beam is by far dominating, even in the absence of longitudinal motion. In order to study the long term behaviour in the presence of synchrotron motion, a bunched beam was tracked in the FODO lattice for 10 5 turns (corresponding to about 0.2 s and more than 140 synchrotron oscillations in the PS). The FODO lattice is chosen, since the PS lattice has significantly more elements and tracking with the PIC solver is unfeasible for so many turns due to the excessive simulation time required. The beam behaviour at tunes in the vicinity of the working point regime of interest is explored, namely Q x = 6.2 and Q y = 6.24 − 6.31. The scan is static, i.e. the tunes are kept constant throughout the simulations and the initial beam distributions are Gaussian in the transverse planes while the longitudinal profile was parabolic, similar to the operational beams in the PS. For the simulations with the PIC solver, 4 × 10 5 macro-particles were used, while in the simulations with the analytic solver already 3 × 10 3 macro-particles were enough to resolve the beam profiles. To ensure that the analytic space charge solver is not overestimating the resonance excitation when the beam is degrading, the beam parameters used for calculating the space charge kick (intensity, transverse emittances, longitudinal line density profile and momentum spread) were updated every 100 turns.
A comparison of the transverse emittance and intensity ratios (ratio final over initial) between the two solvers is shown in Fig. 9. The intensity and horizontal emittance values seem to agree very well between the two models for all tested working points. However, a disagreement of a few percent (up to ≈ 9%) is observed in the vertical emittances, especially for Q y > 6.29. The larger blow-up observed in the PIC simulations could be partially coming from the noise on the grid [25], and partially from the fact that the Bassetti-Erskine formula used in the analytic solver is describing exact Gaussian distributions. Overall, the agreement between the solvers is very good. The analytic solver with parameters updated every 100 turns, which is referred to as adaptive frozen model in what follows, is therefore the simulation model of choice as it provides good enough agreement with the PIC model and allows tracking of less particles and consequently leads to much shorter simulation times.
It should be noted that, besides the agreement between the solvers, the results of this simulation study hint at the excitation of additional space charge driven resonances, indicated by the vertical lines in the graph, which will be discussed in more detail in the following section.

IV. RESONANCE DRIVING TERMS
Since the nature of the resonance at Q y = 6.25 is purely incoherent, as revealed by the simulations discussed above, its strength can be studied by applying classical perturbation theory on the nonlinear Hamiltonian of a stationary beam [26]. In fact, the leading order Resonance Driving Terms (RDTs) of incoherent space charge driven resonances can be calculated [5,7] for the perturbation coming from the space charge potential V sc of a Gaussian (bunched) beam, which is given by [27] where r 0 is the classical particle radius, N b the bunch intensity, β, γ, the relativistic factors and σ s,x,y the longitudinal, horizontal and vertical beam sizes, respectively. The evaluation of the above method was implemented in a Python module [28] to calculate the RDTs and the nonlinear detuning terms for the potential of Eq. (1). This code was used to study the 8 th order structure resonances in the PS in the vicinity of the operational working point, as discussed below. The optics functions of the PS lattice, required for the calculation of the RDTs, were obtained from MAD-X. A detailed explanation of the driving term calculation can be found in Appendix B.
The RDTs for the 8 th order resonances in the full tune space around the nominal working point of the PS, namely 8Q y = 50, 2Q x + 6Q y = 50, 4Q x + 4Q y = 50, 6Q x + 2Q y = 50, 8Q x = 50 and 4Q x − 4Q y = 0, were evaluated for a high brightness beam with the parameters given in the first column of Table II and the results are shown in Fig. 10. The coupling resonance 4Q x − 4Q y = 0 is driven in 8 th order through the 0 th harmonic and is the strongest resonance of the ones discussed here. Note that this resonance is also excited in 4 th order, (i.e. Montague resonance [29]), but for the purposes of this study only the 8 th order resonance driving term is shown. The 8 th order driving terms for the remaining resonances, increase significantly when the tune values are set on the 50 th harmonic. This harmonic coincides with the periodicity of the PS optics modulation and consequently, the corresponding resonances are excited. On the other hand, the resonances at harmonics not present in the variation of the optics functions of the lattice are not excited and the respective RDT goes to 0. It should be emphasized that the strength of the excitation, indicated by the amplitude of the RDT, is not the same for all resonances. The 8Q y = 50, 2Q x + 6Q y = 50 and 6Q x + 2Q y = 50 resonances appear to be the strongest ones, while the 8Q x = 50 and especially the 4Q x + 4Q y = 50 resonances are much weaker. The difference comes from the different beam sizes in the horizontal and vertical planes due to the emittances and the presence of dispersion, and from the different parts of the space charge potential driving them.

V. FREQUENCY MAP ANALYSIS
The excitation of the space charge driven resonances can also be studied using the Frequency Map Analysis (FMA) technique [30] for tracking data including space charge. The PS lattice is matched using MAD-X and the tracking is done with PTC in PyORBIT. The space charge is included using the PyORBIT frozen model without update. The parameters of the high brightness beam in the first column of Table II are used for the calculation of the space charge kicks in the simulations. For each FMA, test particles with the same longitudinal action are tracked for two consecutive synchrotron periods. The tunes of each particle are calculated applying the Python implementation of the Numerical Analysis of Fundamental Frequencies (NAFF) [31,32] to the turn by turn data. The indicator for the resonance excitation is the tune diffusion coefficient [33], which is defined as d = log 10 (Q x,2 − Q x,1 ) 2 + (Q y,2 − Q y,1 ) 2 , where the indices (1), (2) refer to the first and second synchrotron period, respectively. For on-momentum particles, the resulting FMA is shown in Fig. 11 (top). The excitation of the structural resonances is shown in the tune and configuration spaces. The same technique is applied to off-momentum particles, initialized longitudinally at ≈ 1.2σ, and the resulting FMA is shown in Fig. 11 (bottom). In this case the tunes are modulated through the synchrotron motion due to the varying space charge potential along the longitudinal line density profile of the beam and the chromaticity, which is kept at the natural values. Therefore, the resonances appear broader compared to the on-momentum case, since they are crossed by a larger number of particles through synchrotron motion. Additionally, the calculated tune diffusion for all particles crossing resonances appears larger.

VI. LOSS MECHANISM
The excitation of the space charge driven resonances due to the 50 th harmonic of the lattice functions (cf. Fig. 1) has been confirmed in the simulations shown in Fig. 8, the analytical calculation of the driving terms shown in Fig. 10 and the FMAs of Fig. 11 as discussed above. To identify the underlying mechanism that leads to the beam loss observed in the measurements presented in Figs. 3 and 5, test particles were simulated using the frozen space charge solver without update. The test particles were initialized with relatively small horizontal initial amplitudes, x < 10 mm, and varying vertical initial amplitudes from y = 6 mm to y = 20 mm, i.e. up to 5 σ of the beam size. Longitudinally, all particles were initialized with the same action and in-phase, at ≈ 1.2 σ rms s and dE = 0. The simulations were performed for a working point above the 8Q y = 50 resonance, namely Q x = 6.18, Q y = 6.28, and particles were tracked for 2000 turns corresponding to ≈ 2.5 synchrotron periods.
The turn-by-turn data of the simulations were used to calculate the tunes of each particle as described in Section V. The tunes were evaluated using a sliding window of 50 turns and their evolution versus the number of turns and synchrotron period is shown in Fig. 12 (top). The tune modulation is characteristic of the dependence of the transverse space charge force on the longitudinal line density. An additional contribution to the tune modulation comes from chromaticity, which is kept at the natural values of Q x ≈ −5.7 and Q y ≈ −7.6 in the simulations. Under these conditions the tune modulation is ∆Q = ∆Q sc + ∆Q chroma , where the ∆Q chroma varies from −0.01 to 0.01 depending on the synchrotron motion. Hence, in the first half of the synchrotron period the chromaticity gives a positive tune shift while in the second half a negative one, similar to space charge, which results in a different tune modulation depth during the two halfs of each synchrotron period. Figure 12 (bottom) shows the evolution of the vertical betatron action for the same test particles using the same color code. As expected, particles with smaller amplitude have lower tunes due to the incoherent space charge tune shift. More interestingly, it turns out that the "space charge induced periodic resonance crossing", which was extensively studied in the context of magnet driven resonances in presence of space charge [1][2][3][4], is also the mechanism resulting in losses here: for the chosen vertical machine tune, the test particles with high amplitude periodically cross the 8Q y = 50 resonance. In some cases the crossing of the resonance leads to a rapid diffusion also referred to as "scattering" of the particle trajectory on the resonance [3], as can be observed by a change of the particle's action. In other cases, the resonance crossing leads to a trapping of the particle on the resonance islands so that the particle actions are transported to large amplitudes.
The trapping can be nicely observed in Fig. 13, which shows the vertical phase space portrait for the same test particles using the same color code as before. The phase space clearly shows the formation of 8 islands, similar to Fig. 8. Trapped particles follow a spiraling trajectory with increasing action in phase space, since the position of the resonance islands is moving to higher amplitudes due to the increasing space charge detuning when the particle is approaching the longitudinal center of the bunch during its synchrotron oscillation. Note that the trapped particles leap into every second resonance island due to the fractional tune of 0.25. This simulation was performed without mechanical aperture limitations in order to illustrate the particle dynamics. However, in the real machine the particles trapped on the resonances islands would be lost when reaching the vertical machine aperture limitation, which is indicated by the vertical lines in the phase space plots. The betatron phase of the particle at the moment of the resonance crossing determines in which set of islands a particle is trapped in. Furthermore, beam loss in the machine will occur continuously, as the particles have different longitudinal phases, in agreement with the experimental observations shown in Fig. 3. It should also be emphasized that, in the absence of any positive detuning sources such as chromaticity, the losses due to the 8Q y = 50 resonance occur only for machine working points with Q y > 6.25, since only then the particle tunes are shifted towards the resonance and thus can get trapped and scattered at the resonance islands due to the space charge induced periodic resonance crossing.

VII. DETAILED MACHINE STUDIES
Detailed machine experiments were performed in order to study the interplay between space charge and the resonances excited either by space charge itself or other lattice nonlinearities. The measurements consist of static tune scans, during which the beam was injected directly on the matched tunes and stored for 1.2 s at injection energy. The intensity along the cycle was recorded and compared to macro-particle simulations using the adaptive frozen space charge solver.
The tune scan shown in Fig. 4 had already suggested the correlation of the beam brightness to measured losses, while other measurements [34,35] suggested the presence of multiple 8 th order structure resonances around the operational working point of the PS. The present study aims to clearly show the presence of these resonances [36] and establish the source of excitation by correlating the beam loss and the beam brightness not only to the space charge driven resonances but additional controlled lattice driven ones.
In this respect, two different types of beams were used for the measurements, namely a high-brightness and a medium-brightness beam. The parameters for both beams are summarized in Table II. It should be emphasized that the longitudinal parameters as well as the transverse emittances and consequently the beam sizes were kept the same for both beams. The change of the bunch intensity results in a proportional change of the beam brightness and the space charge force. This choice ensures that the RDTs, indicating the resonance strength, are only scaled with the intensity while the relative strength of the excitation between the resonances remains unaffected. Hence, the different response of the beams on the space charge driven resonances can be directly associated to the change in the space charge force, providing a clear correlation between resonance strength and brightness. To explore the dependence of the beam losses on the beam brightness on a magnet error driven resonance, the 3Q y = 19 was excited in a controlled manner. In fact, a different behaviour of the losses along the controlled resonance compared to the losses from space charge driven resonances can further help to classify the various resonances. As the 3Q y = 19 is naturally excited in the PS as shown in Fig. 2, this resonance had to be compensated before it could be used as a controlled resonance. The compensation procedure is described in Appendix A.
The incoherent space charge tune spreads for both beams were calculated analytically from the potential [28] and are illustrated in Fig. 14, together with the tune space covered in the measurements and the resonances of interest. The tested working points range from 6.24 to 6.37 in steps of 2 × 10 −2 in Q x , and 6.11 to 6.21 in steps FIG. 14. Analytically calculated tune footprints at the nominal working point for the high-brightness (top) and mediumbrightness (bottom) beams. The normal 8 th order resonances are shown in red, the 3 rd order skew resonance is indicated by the dashed blue line and the solid blue lines correspond to the integer resonances. The green markers correspond to the working points studied in the experiment. of 5 × 10 −3 in Q y for the high-brightness beam, while for the medium-brightness the scan is extended to even lower tune values in Q x , i.e. 6.09 to 6.21. The reason for this is that the medium-brightness beam with its smaller tune shift could be injected at lower horizontal tunes, while remaining unaffected by resonances at the integer tune of Q x = 6.0. The beam loss was determined using the intensity values measured with the beam current transformer at 15 ms and at 1115 ms after injection. To keep the PS lattice as linear as possible, the chromaticity was kept at the natural values, Q x ≈ −5.7 and Q y ≈ −7.6, the linear coupling was corrected using the closest tune approach method and the transverse damper was used to stabilize the beam [37] from the head-tail instability on the injection plateau [38].
A. Tune Scans with 3Qy Resonance Compensated Figure 15 shows the results of the static tune scans with the high-brightness and medium-brightness beams when the 3Q y = 19 resonance was compensated. The measured total losses over the 1.2 s long injection plateau are extracted for each measurement and the results are interpolated on a grid to identify the resonances, as shown in Fig 15 (left). Likewise, each experimentally tested working point was simulated for 5 × 10 5 turns, corresponding to the full PS injection plateau, using 3000 macroparticles with the adaptive frozen space charge solver in Py-Orbit. Figure 15 (right) shows the resulting losses interpolated on the same grid as before. The PS model used in the simulations include systematic normal higher order field components obtained by matching the measured nonlinear chromaticity [11]. Since the excitation of the resonance 3Q y = 19 was compensated in the measurement, no extra skew sextupole-like components are needed in the PS model.
The measurements with the high-brightness beam show losses of about 7% along tune values parallel to the 8 th order resonance at 6.25. Losses of similar magnitude are also observed along a line parallel to the coupled 8 th order resonance at 2Q x + 6Q y = 50. Note that the offset between the resonance lines and the machine tunes at which losses are observed is a typical feature of the space charge induced periodic resonance crossing mechanism, as also discussed in Sec. VI. The maximum losses are observed for large horizontal tunes Q x > 6.18 because the two resonances overlap and the bunch is affected by both of them at the same time. In addition, losses of similar magnitude are observed in the vicinity of the antidiagonal line. Since along this line losses are observed also with the low brightness beam during the dynamic tune scans discussed in Fig. 2, and in addition the expected space charge induced RDT for the 4Q x +4Q y = 50 shown in Fig. 10 is weak, these losses are most likely caused by the 4 th order resonance 2Q x + 2Q y = 25 excited by octupole errors present in the ring.
The measurements with the medium-brightness beam show losses along parallel lines to the space charge driven resonances 8Q y = 50 and 2Q x + 6Q y = 50, but in this case the observed losses of about 3 − 4% are about half compared to the high-brightness beam, suggesting that the resonances are weaker due to the reduced space charge force. On the other hand, losses on the resonance 4Q x +4Q y = 50 or rather 2Q x +2Q y = 25 appear instead enhanced. This further supports the excitation of the resonance in 4 th order, since lower brightness beams are more sensitive to magnet error driven resonances. Note also that the losses appear much closer to the respective resonances, since the incoherent space charge tune shift is smaller for the medium-brightness beam.
Comparing the experimental data with the corresponding simulations shows good agreement concerning the tune offset between the observed losses and the resonances causing them. Concerning the magnitude of losses, the space charge driven 2Q x + 6Q y = 50 resonance seems to be very well reproduced both qualitatively and quantitatively. The quantitative agreement is not as good for the 8Q y = 50 resonance, which results in slightly higher losses in the simulations compared to the measurements. No losses are observed in the simulations along the 4Q x + 4Q y = 50 resonance. This is expected, since the analytic RDT calculation showed that the excitation of the 4Q x +4Q y = 50 resonance from space charge is weak, and no octupolar components are included in the model that could excite the 2Q x + 2Q y = 25 res-onance. The fact that the modeling of the octupolar components appears to be incomplete could also affect the resonance at Q y = 6.25, contributing to the higher losses observed in the simulations compared to the measurements. Presently, there are not enough independent octupole correctors available in the PS to compensate octupole-like resonances. It should be noted that the resonance 2Q x + 6Q y = 50 would remain unaffected by such components as in 4 th order it would be Q x + 3Q y = 25 and thus a skew and not a normal resonance.

B. Tune Scans with 3Qy Resonance Excited
The results of the static tune scans with the highbrightness and medium-brightness beams in the presence of controlled skew sextupolar components are presented in Fig 16. The controlled excitation of the 3Q y reso- nance is achieved using a skew sextupole, the "XSK52", powered at 2 A corresponding to an integrated normalized skew sextupole strength of k 2S l = 0.0125 m −2 . Two more sextupoles, "XSK10" and "XSK14", were always set to the compensation configuration described in Appendix A. The data analysis and presentation is identical to the one described in the previous section and is given in Fig 16 (left). The simulations shown in Fig 16 (right) are performed as discussed in the previous section, but in this case the sextupole "XSK52" was excited with the same strength as in the measurements.
The experimental data as well as the simulation results of both beams show the same behaviour as before for working points close to the space charge driven resonances, note the different scale of the color-code between Figs. 15 and 16, since their excitation is not affected by the addition of skew sextupolar components. Furthermore, the losses related to the 4 th order 2Q x + 2Q y = 25 observed in the experiment are also not affected by the nonlinearities introduced by the skew sextupole and as expected the simulations also show no response on this resonance. In addition, the offset between the resonances and the tunes at which the losses are observed remain unaffected as no extra tune shifts are introduced.
The chosen excitation of the 3Q y = 19 resonance results in much higher losses compared to the space charge driven structure resonances. It is worth pointing out that the relative losses from the 3Q y = 19 resonance are higher for the medium-brightness beam compared to the high-brightness beam, while the space charge driven resonances 8Q y = 50 and 2Q x +6Q y = 50 resulted in higher losses for the high-brightness beam. This is another confirmation for the fact that the strength of the structure resonances depends directly on the space charge potential and is therefore proportional to the beam brightness.

VIII. CONCLUSION
Structure resonances driven by the space charge potential and the periodicity of the lattice were identified in the CERN PS. By means of measurements at different integer tunes the dependency on the resonance harmonic and thus the lattice periodicity was verified. Simulation studies of a simple FODO structure and the PS lattice itself demonstrated the incoherent nature of the high order space charge driven resonances and the periodic resonance crossing as the dominant loss mechanism. Furthermore, the resonance driving terms of the space charge potential, calculated for resonances in the vicinity of the operational working point of the PS, showed the excitation of multiple 8 th order resonances. The presence of the 8Q y = 50 and 2Q x + 6Q y = 50 resonances was confirmed in a detailed experimental campaign, where it was demonstrated that their strength depends on the strength of the space charge potential and thus on the beam brightness. Moreover, the difference in the behaviour of the losses from the space charge compared to the lattice driven resonances further confirms the identification of the 8 th order incoherent space charge driven structure resonances in the PS. The experiment could be reproduced using the simulation model of the PS. There are some slight differences between the measurements and the simulations, in particular concerning the beam loss in the vicinity of the anti-diagonal line not reproduced in the simulation, and the less good quantitative agreement for the 8Q y = 50 resonance. This is, however, most likely attributed to the incomplete model of octupole-like errors in the PS lattice as the beam loss at those resonances could not be reproduced with the medium-brightness beam either. The fact that the resonances in the vicinity of the nominal working point of the PS are space charge driven, justifies the higher injection energy in the scope of the LIU project as a means to accommodate higher brightness beams. and "XSK10" sextupoles were selected for compensating the resonance, since their RDT vectors are almost orthogonal. Therefore, the full RDT space is accessible by powering them at different strengths in order to determine the best setting to compensate the unknown skew sextupole component in the lattice. The described technique was applied using the medium-brightness beam so that any effects connected to space charge would be negligible. The beam was injected at Q y = 6.38 and the (0,3) resonance was dynamically crossed from 400 ms to 650 ms, as the tune was changed to Q y = 6.31, while the currents of the selected skew sextupoles were varied shot after shot. The losses as a function of the current configuration of the two sextupoles are shown in Fig. 17 (centre). The sextupole XSK10 seems to be more effective, however, the magnets are identical so this difference is only correlated to the unknown phase and amplitude of the excitation and the locations of the sextupoles and the errors. The configuration giving the least amount of losses was used for the correction, i.e. powering XSK10 with 1 A and XSK14 with −3 A. The effectiveness of the the compensation with the configuration chosen is demonstrated by the change of the slope in the intensity from 400 ms to 650 ms for the natural excitation and after the correction, as shown in Fig. 17 (bottom).
Appendix B: Calculation of resonance driving terms from space charge potential The RDTs are derived using the description and code in [28]. This work is a generalization of the Hamiltonian description used in [5,7,26] for any ring and any space charge RDT or detuning term. In [26] the Hamiltonian description is used for the derivation of RDTs of any resonance, while the works in [5] and [7] study 4 th order space charge driven resonances. Reference [5] refers to the calculation of the resonance width of the 4Q x space charge driven resonance in the KEK Proton Synchrotron, and in [7] the RDTs of all 4 th order space charge driven resonances in a FODO lattice with a periodicity of 24 are calculated. A short description of the derivation follows.