Keywords: CERN, LHC injectors, HL-LHC, LIU, PSB, Space charge, Linac4, PTC-Orbit, PyOrbit, Tune spread, Tune shift, Chromaticity, Magnetic resonances, Fixed lines, high brightness, Simulations, Measurements. i CERN, Injecteurs LHC, HL-LHC, LIU, PSB, Charge d'espace, Linac4, PTC-Orbit, PyOrbit, Tune spread, Tune shift, Chromaticité, Résonances magnétiques, Lignes fixes, Haute brillance, Simulations, Mesures

As part of the LHC Injectors Upgrade Project, the CERN PS Booster (PSB) will be upgraded with a H -charge exchange injection system and its injection energy will be raised from 50 MeV to 160 MeV to obtain the beam brightness required for the LHC High-Luminosity Upgrade.

Space charge effects like beam losses and transverse emittance blow-up at injection are expected to be the main limitations towards the achievement of the required high brightness.

Studies of beam dynamics in presence of space charge in order to evaluate the performances of the PSB after the Upgrade have been performed. The first part of the work consists of measurements in the present machine, to study the effects of space charge and its interplay with resonances and to have a good set of data for code benchmarking. The code chosen for the beam tracking in presence of space charge is PTC-Orbit (and PyOrbit). Necessary numerical convergence studies are presented together with a benchmark with the PSB measurements.

Once assessed the code and its limitations, predictions for the 160 MeV injection with highbrightness beams are delivered in terms of beam losses and emittance blow-up. These studies include the optimization of the working-point, resonance compensation and/or chromaticity correction taking into account the expected magnetic errors in the machine.

Introduction

The discovery of the Higgs boson announced on 4 th July 2012 by the ATLAS (A Toroidal LHC ApparatuS) [START_REF]The ATLAS collaboration website[END_REF] and CMS (Compact Muon Solenoid) [START_REF]The CMS collaboration website[END_REF] collaborations opened the doors to completely new scenarios in the High Energy Physics field. The possibility of future findings through the LHC (Large Hadron Collider) [START_REF] Brüning | [END_REF] is strictly connected to the extension of its potential: an increase of the integrated luminosity, delivering 10 times more collisions in the same period of time, is being chased through an extensive renovation campaign which will last beyond 2020, in the frame of the High Luminosity LHC (HL-LHC) project [4]. The collisions rate dR dt can be expressed as:

dR dt = L × σ p (1)
where σ p is the interaction cross-section. L, defined as instantaneous luminosity, can be expressed for dimensionally equal beams as [5]:

L = k b f rev N 1 N 2 4πσ * x σ * y F = k b f rev N 1 N 2 βγ 4π β * x x β * y y F [cm -2 s -1 ] (2)
being N 1 and N 2 the number of particles of the two colliding bunches, k b the number of bunches per beam, f rev the revolution frequency, σ * x and σ * y the transverse beam sizes at the collision point, β *

x and β * y the betatron amplitude functions at the collision point, F a geometrical reduction factor depending on the bunches crossing angle at the interaction point, x and y the normalized tranverse beam emittances, β the ratio between the velocity of the particles and the speed of light c, γ the proton beam energy in unit of rest mass. β and γ are the relativistic (Lorentz) factors.

The ratio between the number of particles and the normalized emittance is proportional to the beam "brightness" and is an important figure of merit for the beam quality. The beam brightness at the entrance of the LHC is determined by the injectors chain. Thus, the future performances of the LHC rely on the renovation of its injectors chain as well.

The LHC Injectors Upgrade (LIU) project [START_REF]The LIU project website[END_REF] aims to renovate the LHC injectors chain, presently composed by Linac2, Proton Synchrotron Booster (PSB), Proton Synchrotron (PS) and Super Proton Synchrotron (SPS). The Linac2, which injects protons into the PSB at an energy of 50 MeV, will be substituted by the new Linac4 which will accelerate H -ions, then stripped into protons at 160 MeV at the entrance into the PSB. This renewal goes in the direction of producing brighter beams for the LHC experiments and increase, by this way, the luminosity. vii The beam brightness is defined in the PSB, which is the first circular accelerator in the LHC protons chain.

The chief drawback of high brightness machines is the presence of unwanted "collective effects", related to the fact that charged particles inside the beams are interacting with each other and with the environment through electro-magnetic fields.

Space charge (space charge) is one of these effects: it consists in the repulsive Coulomb interaction between charged particles being partially compensated by magnetic fields at high energies.

The space charge is a main concern if high brightness wants to be achieved in low energy machines like the PSB. Therefore, it represents the strongest physical bottleneck for the LIU beam performances requirements [7].

Without considering space charge, in a linear machine, the particles transversely oscillate around a closed orbit with the same frequency, called "tune". In presence of space charge forces the horizontal and vertical tunes feel a spread, occupying a larger frequency span, called "tune spread". This makes the single particles composing a beam to be scattered or trapped by magnetic resonance lines in the tune diagram and, eventually, getting lost. The fact that the particles are differently affected, according on their 6D time-varying location in the bunch, makes the evaluation of space charge related phenomena not trivial.

Given the objective of increasing the ratio intensity/emittance by a factor 2 [START_REF] Brüning | LHC Luminosity and energy upgrade: A Feasibility Study[END_REF], the space charge particles tune spread at 50 MeV would cause huge deterioration of the beam in terms of unwanted losses and emittance blow-up due to the interaction with many strong magnetic resonances.

Since the space charge tune spread scales down with the increase of the relativistic factor βγ 2 , it has been proposed to increase the PSB injection energy by a factor 2 in βγ 2 , corresponding 160 MeV with the new Linac4, in order to keep the tune spread similar to the present one.

The future LHC high brightness challenges impose a deep knowledge and understanding of the performance limitations carried by this phenomenon which can seriously undermine the beam quality in terms of intensity loss and emittance blow-up. The understanding of these phenomena strongly relies on numerical approaches.

The space charge in the CERN accelerators is object of dedicated study for the worldwide scientific community and, in particular, is the core activity of a working group in the CERN Beams Department. Yearly, a Space Charge workshop is organized and hosts more than 50 experts from all over the world. This thesis is related to the analysis of the new PSB beam dynamics including space charge effects at the future injection energy of the Linac4. It goes into the details exploring different possibilities in terms of achievable brightness of the future LHC beams.

The work that has been done goes from theoretical aspects related to the particles de-tuning in a space charge dominated regime to the benchmarking between present measurements and numerical tools, necessary to simulate the effects of space charge on bunched beams. The results obtained from the benchmarking process have given confidence in the codes, permitting to viii deliver reliable predictions for the future beam performances after LIU.

In the following, a more detailed summary of the thesis work is discussed.

In order to start guiding the reader, Chapter 1 gives an overview on beam dynamics concepts in synchrotron accelerators, focusing on the magnetic resonances effects and transverse direct space charge mathematical modelling, which are related to the electromagnetic self-fields generated by the beam itself.

Chapter 2 describes the new injection system. To host it, the PSB has to change its injection layout, while the periodic structure of the 4 rings constituting the accelerator will stay basically unaltered.

Simulation tools are the key to understand the complicated interaction of space charge and resonances. The PTC-Orbit simulation software program has been introduced in Chapter 3. The code has been widely tested for the purpose of this thesis: numerical convergence studies of its "Particle-In-Cell" (PIC) algorithms for the space charge fields calculations and velocity tests on different clusters have been performed to understand the computational limits for the PSB.

In Chapter 4, the space charge incoherent tune spread is analyzed as a function of the particles positions and chromaticities inside the bunch, with the help of the numerical simulations. Here, one of the original contributions of this thesis is the introduction of a method that looks at averaged tunes in order to better understand the relation resonances -space charge tune spread and identify the dangerous resonances which influence the beam behaviour.

Chapter 5 gives an overview on the benchmarking between measurements and numerical simulations. Different examples are examined for the dangerous integer lines Q x = 4 and Q y = 4, coupling (linear Q x -Q y = 0 or Montague 2Q x -2Q y = 0) and half-integer 2Q y = 9 resonances. A good machine linear model up to the linear errors is fundamental to achieve good simulation results with the half-integer resonance and the dynamic integer scan. Simulations of space charge effects in presence of chromaticity correction are proposed to evaluate the effectiveness of the correction for the brightness improvement.

The longitudinal dynamics affects the space charge tune spread: an analysis of the optimal longitudinal schemes for the realistic double RF injection is presented in Chapter 6 and two solutions with different bunch length are retained for the machine optimization in the following. This work is preceded by a benchmark of the longitudinal space charge effect between PyOrbit (a new version of PTC-Orbit based on Python), BlonD (a code developed at CERN by the RF Group) and analytical formula.

Finally, Chapter 7 summarizes the expected conditions for the PSB after the 160 MeV injection energy upgrade and the expected performances in presence of direct space charge on the future LHC beams. Using the optimal longitudinal schemes from the previous Chapter and different transverse injection schemes, the new multi-turn injection is simulated to predict the future brightness curves and see whether they respect the requirements imposed by the LIU project objectives.

Chapter 1

Beam dynamics in synchrotron accelerators

Beam dynamics is a wide topic in particle accelerators physics literature. There are many references available, see for example [START_REF] Lee | Accelerator physics[END_REF], from which some definitions are taken and the lectures at the CERN Accelerator Schools [START_REF] Herr | CAS -CERN Accelerator School: Advanced Accelerator Physics Course, ser. CAS[END_REF][START_REF] Holzer | Introduction to Transverse Beam Dynamics[END_REF].

The intent of the Chapter is to give to the reader a handbook of the main quantities and theoretical concepts on which the remaining part of the thesis relies. The transverse and longitudinal motions are introduced together with the definitions of phase advance, tunes, emittance, Twiss parameters, intensity and brightness.

The magnetic resonance lines and the derivation of the theory for the transverse direct space charge are, finally, presented.

Transverse single particle motion

The motion of the particles is described using the system of coordinates defined in Fig. 1.1: where:

• R is the average machine radius, machine circumference/(2π);

• ρ is the dipoles bending radius;

• x, y are the transverse coordinates (with respect to the closed orbit), horizontal and vertical, respectively;

• s is the longitudinal position in the ring;

• θ= s R is the angle at the accelerator centre.

The single particle with charge e, longitudinal synchronous momentum p 0 and zero transverse offset x, y, follows an ideal orbit, called "closed orbit", under the influence of magnetic fields:

dipoles and quadrupoles up to first order.

The dipolar magnetic guide field defines the closed orbit. To bend the particles on the closed orbit, a dipolar magnetic field B, proportional to the synchronous momentum, is needed:

B = 1 ρ p 0 e (1.1)
It is useful to define the quantity Bρ, defined as the "beam magnetic rigidity", i.e. the magnetic bending strength for given energy, directly proportional to the synchronous momentum:

Bρ = p 0 e (1.2)
where e is the electron charge (1.602×10 -19 C).

The quadrupoles provide focusing (and de-focusing) forces to keep the particle trajectories in a stable motion around ideal orbit through a linear increasing magnetic field:

B x = -g(s)y B y = -g(s)x (1.3)
where g is the gradient of the magnetic field. Particles perform transverse oscillations around the closed orbit according to the Hill's equations:

x -k(s) -1 ρ(s) 2 x = 0 y + k(s)y = 0 (1.4) where the derivatives with respect to the longitudinal coordinate are used: k(s) is the quadrupolar strength, which depends on the momentum:

• x = dx ds = 1
k(s) = g(s)
p 0 e = g(s) Bρ (1.5) Equation (1.4) can be generalized as:

x + K(s)x = 0 (1.6) where

K(s) =    K x (s) = 1 ρ(s) 2 -k(s) K y (s) = k(s) (1.7)
For each of the two transverse planes, the general solution of the Hill's equation is a pseudoharmonic oscillation:

x(s) = J x β x (s) cos(µ x (s) + χ x ) y(s) = J y β y (s) cos(µ y (s) + χ y )

(1.8)

where J x,y and χ x,y are constants determined by the initial conditions and β x (s), β y (s), called betatron functions, are periodic functions depending on the focusing structure β x,y (s) = β x,y (s + 2πR). Finally, µ x,y is the phase advance.

Courant-Snyder invariant and Twiss parameters

Combining the general solution (1.8) and its derivative with respect to s (here for the y direction) y (s) = J y β y (s) α y (s) cos(µ y (s) + χ y ) + sin(µ y (s) + χ y ) (1.9)

one obtains an important quantity, the Courant-Snyder invariant, i.e. a constant of motion, also called particle action, or single particle emittance J. For the vertical direction:

J y = 1 β y (s)
[y(s) 2 +(α y (s)y(s)+β y (s)y(s) ) 2 ] = γ y (s)y(s) 2 +2α y (s)y(s)y(s) +β y (s)y(s) 2 (1.10) where:

• α x,y (s) = -1 2 β x,y (s);

• γ x,y (s) = 1+αx,y(s) 2 βx,y(s) .

Equation (1.10) shows that particles, at any position s in the ring, during their motion, describe an ellipse in the phase space (x(s), x'(s)) and (y(s), y'(s)), as shown in Fig. 1.2. The ellipse, according to Liouville's theorem, is a constant of motion as long as only conservative forces are considered (i.e. no interaction between particles).

√ b J

x,y x,y √ J /b

x,y x,y √ g J

x,y x,y Slope -gx,y/ax,y Slope -a /b

x,y x,y

x (y)

x' (y')

√ J /g
x,y

x,y

Closed orbit The ellipsoidal motion of a particle with action J x,y in the phase space [START_REF] Lee | Accelerator physics[END_REF] for a certain position s. The red dots are the turn-by-turn locations of the particles in the phase space.

The β(s), γ(s), α(s) functions are better known as Twiss parameters. Each point defining the ellipse in Fig. 1.2 represents the coordinate of a particle of the beam at a certain s coordinate along the ring.

Emittance

The cumulative area in phase space in which the particles perform their motion inside the bunch is called geometrical emittance, g .

Considering for simplicity only the vertical plane (the approach for the horizontal is similar), from a statistical point of view, the root mean square (rms) value geometrical emittance can be computed as follows: Sometimes it is useful, in order to study particles at large transverse amplitude, to use the 95% (or the 99%) emittances, defined as the phase space ellipse areas into which the 95% (or the 99%) of the particles are located.

The normalized emittances, defined as

x,y = βγ g x,y (1.13) where β and γ are the relativistic factors, is an important parameter for the beam quality throughout the entire acceleration chain, as it is invariant with acceleration, i.e. it stays constant with the increase of energy. The geometrical emittance of the beam, instead, shrinks during the particles acceleration. Again here one can define rms, 95% or 99% normalized emittances.

The normalized transverse emittances in the PSB are in the range of x =1 to 15 mm•mrad and y =1 to 9 mm•mrad. Typical emittances for the LHC beams are ∼ 2 mm•mrad.

Intensity and beam brightness

A beam is made by particles: the number of particles I which constitutes the beam is called intensity or beam population. The PSB delivers to the users intensities in the order of 5×10 9 -1×10 13 p (protons). Presently, for the LHC standard beam productions, the intensity delivered by the PSB is I ∼ 1.65 × 10 12 p. The intensity over emittance ratio defines the brightness, which is a fundamental parameter that must be maximized to have a large number of collisions at LHC. In this thesis the beam brightness B is defined as the ratio between the intensity I and the half-sum of the horizontal and vertical normalized emittances, x and y : B = I 0.5( x + y )

(1.14)

Phase advance and tune

Plugging (1.8) in (1.6), the phase advance between the points 0 and s in the lattice is:

µ x,y (s) = s 0 ds β x,y (s) (1.15)
The number of oscillations per turn (phase advance per turn) is called tune:

Q x,y = 1 2π ds β x,y (s) (1.16)
In the PSB the typical transverse betatron tunes at injection are (Q x , Q y ) ∼ (4.3, 4.5).

Dispersion

A beam is made of particles with longitudinal momenta distributed around the synchronous momentum p 0 . A particle will have in general a momentum offset:

δ = p -p 0 p 0 = ∆p p 0 (1.17)
in the order of few per mil in the PSB.

The bending angle resulting from a dipole field is different for particles with different momenta, i.e. nonzero δ. This results into the equation:

x + K(s)x = δ ρ (1.18)
The solution of an nonhomogeneous linear equation is a linear superposition of the particular solution D(s) and the solution of the homogeneous Eq. (1.6) x β :

x = x β + Dδ x = x β + D δ (1.19) being D + K x (s)D = 1 ρ (1.20)
The solution of Eq. (1.6) is the betatron oscillation, while the solution of Eq. (1.20) is the so-called dispersion function D(s), which represents the off-momentum closed orbit.

Chromaticity

Since the quadrupole strength is also dependent on the momentum, the tune, defined as in Eq. (1.16), has a bandwidth:

Q x,y = ∂Q x,y ∂δ (1.21)
Q is called chromaticity and expresses the change of betatron tune for a given change of momentum. Sometimes the chromaticity is expressed in a relative way, with respect to the nominal tune, as

ξ x,y = Q x,y /Q x,y (1.22)
The natural chromaticity is the one due only to the elements of the linear lattice, i.e. quadrupoles and dipoles [START_REF] Guiducci | Chromaticity; rev. version[END_REF]. The chromaticity can be controlled through sextupole magnets. To date, the PSB is always operated with the natural (or uncorrected) chromaticities of (ξ x = -0.8, ξ y = -1.6).

Longitudinal single particle motion

The acceleration in synchrotrons is performed through Radio-Frequency (RF) cavities. A voltage is applied in the cavity gap in the form of:

V = V sin(φ(t)) = V sin(ω RF t) (1.23)
with the RF frequency

ω RF = hω 0 , (1.24)
being ω 0 the revolution frequency of the synchronous particle and h the harmonic number. The synchronous particle is defined as the "virtual" particle which has the nominal momentum p 0 , trajectory and frequency and experiences always the same voltage phase φ(t) = φ s when it passes through the cavity. φ s is called the synchronous phase.

The other particles are asynchronous and will generally arrive sooner or later in the cavity, experiencing at each turn a different voltage and performing oscillations around φ s .

The change in revolution frequency ∆f rev of a single particle is related to its momentum offset through the slippage factor η:

η ≡ ∆frev frev ∆p p 0 = 1 γ 2 -α c (1.25)
where α c is the momentum compaction factor, a machine property.

The energy at which η = 0 is called transition energy γ tr = 1 √ α . Above transition energy (η < 0), particles with lower momentum have higher revolution frequency than that of the synchronous particle. On the other hand, below transition energy (η > 0), particles with higher momentum have higher revolution frequency. In the PSB γ tr ∼ 4.1 and the machine operates always below transition energy.

The longitudinal particles motion is called synchrotron motion (see Fig. 1.3): below transition energy the particle B, arriving slightly after the synchronous one, experiences a positive kick (i.e. force), thus feeling an increase in momentum. Due to this acceleration, at the next turn the particle arrives a bit before than previously with respect to the synchronous particle, feeling this time a smaller accelerating positive kick by the RF voltage. When the phase offset with respect to the synchrotron phase ∆φ = φ -φ s changes sign, the particle gets a negative kick and is decelerated. This creates a stable oscillating motion around the synchronous particle, which is the "virtual" particle with constant revolution frequency ω 0 and energy offset ∆E = E -E 0 = 0. The iso-Hamiltonian trajectories in the (φ, ∆E ω0 ) phase space that define the bucket, in light green, and the separatrix, the dashed red contour. The particle B performs a synchrotron oscillation inside the bucket, in this case without acceleration (φ s = 0) and below transition energy (η > 0).

The equations of motion, in the state variables φ and ∆E ω 0 are:

         dφ dt = - hηω 2 0 β 2 E ∆E ω 0 d dt ∆E ω 0 = 1 2π e V (sin(φ) -sin(φ s )) (1.26)
The energy offset variable ∆E ω 0 is proportional to the momentum offset:

∆E ω 0 = β 2 E ω 0 δ (1.27)
From this system of first order equations, a second order equation can be derived for the RF phase φ. Under the approximation of small phase oscillations ∆φ 1 around the synchrotron frequency, one obtains:

d 2 dt 2 (φ -φ s ) + ω s 2 (φ -φ s ) = 0 (1.28)
with ω s being the angular synchrotron frequency.

As for the transverse plane, a synchrotron tune Q s , i.e. the number of synchrotron oscillations per turn, can be defined as:

Q s = ω s ω 0 = h e V |η cos φ s | 2πβ 2 E (1.29)
for particles with speed /betac, momentum p = E c and revolution frequency ω 0 = βc/R. In the PSB the synchrotron tune Q s is ∼ 0.001, much smaller than the transverse betatron tunes.

The Eq. (1.26) defines a stable region, called bucket, in the φ, ∆E/ω 0 phase space. This region, marked in light green in Fig. 1.3, defines the area in which particle can group together to form a bunch.

The contour surrounding the bucket is called separatrix and divides the stable from the unstable part of the motion.

The maximum number of bunches circulating in one revolution period in the machine is given by the harmonic number h.

The longitudinal position is often expressed through the variable z, i.e. the distance with respect to the synchrotron particle. One has:

dz = βc ω RF dφ [m] (1.30)
or, in the time variable

τ dτ = 1 ω RF dφ [s] (1.31)
The area that the particles distribution occupies in the longitudinal phase space is called longitudinal emittance and is expressed in electron-Volt-second [eVs]. In the PSB typical values go from 0.8 to 1.7 eVs.

The area of the bucket is called acceptance.

The double RF systems

In the PSB, a second cavity oscillating at a frequency which is twice the one of the main cavity, is used. This leads to an extension of Eq. (1.26).

Through this system, it is possible to obtain flatter bunches with reduction of the particles line density λ [C/m], an important parameter for the space charge studies (see Section 1.4). In the case without acceleration Eq. (1.26) is modified as:

d dt ∆E ω 0 = e 2π [ Vh=1 sin(φ) + Vh=2 sin(2φ + ∆φ)] (1.32)
where Vh=1 and Vh=2 are the peak voltages of the two cavities and ∆φ is the phase difference between them. An exhaustive treatment of double harmonic RF systems can be found in [START_REF] Lee | Accelerator physics[END_REF]. acceleration. This last case presents the peculiarity of having two separatrices, an "inner" one, surrounding the basins of attraction of the inner fixed points at ±1 rad, and an "outer" one, separating the stable trajectories from the unstable ones. The results were obtained using the PTC-Orbit simulation code, discussed in Chapter 3.

The magnetic field resonances

As derived in Appendix A, it is possible to describe the transverse motion using the Hamiltonian formalism [START_REF] Guignard | A General Treatment of Resonances in Accelerators[END_REF]. From this treatment one can derive a resonance condition expressed by the following expression: Moreover, if n y is even, the resonance is called to be "normal". Otherwise, it is "skew".

n x Q x + n y Q y = p,
The relation between magnetic resonances and particle motion in presence of space charge is of primary importance in this thesis. Particles hitting these lines, depending on the strength of the resonance, are perturbed in terms of amplitude and phase and will cause a degradation of the beam with emittance blow-up and, eventually, losses. The Eq. (A.17) represents the frequency condition that particles should avoid in presence of driving terms exciting a certain resonance line.

The resonance driving terms can appear from lattice periodicity and machine imperfections, such as magnets misalignments, magnetic field errors, power supply ripples. These lines cannot realistically be avoided, but, depending on their strengths and order, the deteriorating effect on the beam can be corrected (or minimized) using dedicated multipole correctors. The theoretical resonances, up to 4 th order, are shown in Fig. 1.5 for the working points (tunes) of interest for the PSB. Fortunately, not all the resonances are "important" or evident in the machine (see Section 5.3).

As shown in the next paragraphs, the particles suffer of a tune spread with respect to the bare working point. This tune spread is caused mainly by space charge in the PSB and can generate the crossing of dangerous magnetic resonance lines.

( -2 , 2 , 0 ) ( -1 , 1 , 0 ) (-1 , 2 , 4 ) (-1 , 2 , 4 ) (-1, 3, 8) (-1, 3, 9) (0, 1, 4) (0, 2, 8) (0, 2, 9) (0, 3, 12) (0, 3, 13) (0, 4, 16) (0, 4, 17) ( 1 , -1 , 0 ) (1, 0, 4) (1 , 3, 17 ) ( 2 , -2 , 0 ) (2 , -1 , 4 ) (2 , -1 , 4 ) (2, 0, 8) (2, 0, 9) (2 , 1 , 1 3 ) (2 , 1 , 1 3 ) ( 2 , 2 , 1 7 ) (3 , -1 , 8) (3 , -1 , 9) (3, 0, 12) (3, 0, 13) (3 , 1, 17 ) (4, 0, 16) (4, 0, 17) Q x Q y (1 , 2 , 1 3 )
Figure 1.5: Magnetic resonance lines, defined by (n x ,n y ,p), in the present PSB working point area. In solid are the normal resonance lines. In dashed are the skew resonance lines. The colour code represents the maximum order of the resonance up to harmonic 17: light blue, quadrupolar (2 nd order) -purple, sextupolar (3 rd order) -magenta, octupolar (4 th order).

Space charge theory and issues in the PSB

Space charge effects are important at injection of the beam in the PSB, because of the low energy (160 MeV) and the high brightness required for the future LHC beams.

Charged particles circulating inside an accelerator produce electromagnetic fields ( E and B)

acting back on the beam itself. The so-called space charge "self-fields" produce "self-forces" F s.f. which affect the motion of particles. Taken as example the vertical plane, the Hill's Eq. (1.6) is modified as:

y + K y (s)y = F s.f. y β 2 c 2 m 0 γ (1.34)
The self-fields (and forces) depend on:

• the beam current (intensity) and the 6D (transverse-longitudinal) particle distribution;

• beam velocity and charge;

• the vacuum chamber and machine elements geometry and optics.

The space charge effects can be divided in two, as sketched in Fig. 1.6:

• Direct space charge, regarding the interaction of the particles in free space;

• Indirect space charge. regarding the interaction of the particles with image currents and charges that are induced in perfect conducting walls and ferrogmagnetic materials close to the beam pipe. Here, only direct space charge effects are discussed, following the approach in [START_REF] Migliorati | Space Charge Effects and Instabilities[END_REF], Ferrario:2014, Schindl:941316. Since the PSB beams for the LHC are supposed to have small sizes with respect to the chamber of the machine, the indirect contribution is small (1 order of magnitude less than the direct one). In any case, considering that the indirect space charge model is sometimes used in the thesis, for a deeper look about its treatment the reader is invited to refer to [START_REF] Migliorati | Space Charge Effects and Instabilities[END_REF][START_REF] Ferrario | Space Charge Effects[END_REF][START_REF] Schindl | Space charge[END_REF].

The transverse direct space charge

The particles in a beam interact with each other continuously. Figure 1.7 shows that, if one consider a single charge q moving along the longitudinal z direction with velocity v, it is possible to make a transformation from the fixed frame (O, x, y, z) to the moving frame (O', x', y', z'), following the Equations:

           x = x y = y z = γ(z -vt) (1.35) x z, z' y' x' q v O' Figure 1.7:
The frame (O', x', y', z') is moving with respect to the fixed frame (O, x, y, z) [START_REF] Schindl | Space charge[END_REF].

Using Eq. (1.35), it is possible to transform the electro-magnetic fields between the frames.

The fields in the moving frame are:

E = q 4πε 0 1 x 2 + y 2 + z 2 3/2    x y z    B = 0 (1.36)
where 0 = 8.85 × 10 -12 F/m is the vacuum permittivity. One can go back to the rest frame (t = 0):

E = q 4πε 0 γ x 2 + y 2 + γ 2 z 2 3/2    x y z    B x = -vE y /c 2 B y = +vE x /c 2 B z = 0 (1.37)
where the components of the fields in the rest frame are:

                                       E x = γ E x + vB y E y = γ E y -vB x E z = E z B x = γ B x -vE y /c 2 B y = γ B y + vE x /c 2 B z = B z (1.38)
From Eq. (1.37) one can see that, in the rest frame, the electric field generated by a source charge q loses spherical symmetry if γ >> 1, but stays symmetric with respect to the z-axis (see Fig. 1.8). In fact:

E x (z = t = 0) = q 4πε 0 γx x 2 + y 2 3/2 E y (z = t = 0) = q 4πε 0 γy x 2 + y 2 3/2 E z (x = y = t = 0) = q 4πε 0 1 γ 2 z 2 (1.39) z z z γ=1 γ>1 γ>>1 ~1/γ Figure 1.8:
The electric field created by a particle moving along z. For ultra-relativistic traveling particles, the electric field loses the spherical symmetry but stays symmetric with respect to the zaxis [START_REF] Schindl | Space charge[END_REF].

From (1.39), the electric field has radial symmetry in the transverse plane:

E r = q 4πε 0 γ r 2 (1.40)
And, from (1.37), the magnetic field has component:

B φ = βE r c (1.41)
Equations (1.40) and (1.41) represent the fields generated by a moving particles in polar coordinates (r, φ).

Now, if two particles traveling in parallel with the same velocity v are considered, knowing the fields generated by the "source" particle (in red in Fig. 1.9), it is possible to calculate the force acting on the "test" particle (in blue in Fig. 1.9) .

x q v v q z Figure 1.9: Two particles traveling with the same velocity: the "source" particle is in red and the "test" particle in blue [START_REF] Schindl | Space charge[END_REF].

In fact, given the general Eq. of the Lorentz force, which governs the motion of a single charge q in an electromagnetic field:

d(m 0 γ v) dt = F ext = q( E + v × B) (1.42)
where:

• m 0 is the particle rest mass;

• γ is the Lorentz factor;

• v = βc v | v| is the particle velocity.

Using (1.40) and (1.41) one can compute the radial component of the force on the "test" particle:

F ext r = q E r -vB φ = q E r -β 2 E r = qE r γ 2 = qq 4πε 0 γr 2 (1.43)
Equation (1.43) shows that particles at rest (β = 0) feel only the repulsive Coulomb force (Eq. (1.40)). In the case of β = 0, the attractive magnetic force generated by the particle tries to compensate the repulsive Coulomb force. This compensation is maximum when γ → ∞ (see Fig. 1.10). This result shows that the space charge forces are more important at low energies. In the case of cylindrical beam of radius a with uniform longitudinal distribution and transversely circular and uniform charge density η [C/m 3 ] (see Fig. 1.11), the space charge forces can be calculated through the electric and magnetic fields, derived from Maxwell's equations.

Magnetic

In particular the electric field is derived from the Gauss' law, considering a cylinder of radius r:

∇ • E = η ε 0 (1.44)
From the differential form (1.44) one can go to the integral form:

∇ • E dV = E d S (1.45)
Due to symmetry reasons and, in the hypothesis of r l, the electric field in a cylindrical surface of radius r < a has only radial component, satisfying the Eq.:

πlr 2 η ε 0 = 2πlrE r (1.46)
Defined the charge line density λ = πa 2 η [C/m], one obtains:

E r = λ 2πε 0 r a 2 (1.47)
From the Ampere's law:

∇ × B = µ 0 J (1.48)
where µ 0 = 1/ε 0 c 2 (= 4π × 10 -7 H/m) is the permeability of the vacuum and J = βcη = βcλ/πa 2 is the current density [A/m 2 ], it is possible to derive, through the Stokes' theorem, the integral form of Eq. (1.48):

B d s = ∇ × B d S (1.49)
Solving for the proposed geometry, one obtains the azimuthal magnetic field:

2πrB φ = µ 0 πr 2 J (1.50)
Finally, the formula of the azimuthal magnetic field is the following:

B φ = λβ 2πε 0 c r a 2 , for r< a (1.51)
Using the Lorentz equation (1.42) and substituting the fields components from the Equations (1.47) and (1.51), one obtains the force acting on a single particle of charge e, localized at a distance r from the beam axis:

F r = e E r -v s B φ (1.52)
where v s is the speed of the particles.

F r = eλ 2πε 0 1 -β 2 r a 2 = eλ 2πε 0 1 γ 2 r a 2 (1.53)
Finally the x and y component of the force in the transverse plane are:

F x = eλ 2πε 0 γ 2 a 2 x
(1.54)

F y = eλ 2πε 0 γ 2 a 2 y (1.55)
In this case, the direct space charge force is linear in x and y and is defocusing in both planes.

This force, being proportional to the transverse position, can be treated in the Hill's equations as an additive linear component, i.e. a quadrupolar error, thus producing a tune shift. In this case the right-hand side of Eq. (1.34) is given by:

F s.f. y β 2 c 2 m 0 γ = 2r 0 λ ea 2 (s)β 2 γ 3 y = K spacecharge y (s)y (1.56)
where the particle classical radius r 0 = e 2 /(4πε 0 m 0 c 2 ) is 1.54•10 -18 m in the case of a proton and 2.82 • 10 -15 m in the case of an electron.

This leads to

y + [K y (s) -K spacecharge y (s)]y = 0 (1.57)
It is possible to compute the tune shift integrating the weighted gradient errors around the circumference:

∆Q y = - 1 4π K spacecharge y (s)β y (s)ds = - 1 4π 2r 0 λβ y (s) ea 2 (s)β 2 γ 3 ds = - r 0 Rλ eβ 2 γ 3 β y (s) a 2 (s) (1.58)
One observes that the space charge tune shift a) is always negative because it is a defocusing effect; b) it scales down with β -1 γ -2 , so it tends to vanish for ultrarelativistic beams; c) it is proportional to the line density (important property for bunched beams); d) it is inversely dependent on the normalized emittance εx,y , since:

a(s) = β x,y (s)ε x,y /βγ
This leads to:

∆Q x,y = - r 0 Rλ eβγ 2 εx,y (1.59)
For a not round beam the linear space charge forces scale differently in the two transverse planes. Larger is the emittance in one plane (horizontal or vertical), smaller the tune shift in that plane.

Bi-Gaussian transverse distribution in a coasting beam

The treatment can be extended to a more realistic case of a bi-Gaussian transverse charge distribution, with elliptic cross-section:

η(x, y) = λ 2πσ x σ y e -x 2 2σ 2 x -y 2 2σ 2 y (1.60)
where:

σ x (s) = β x (s)ε x /βγ + D 2 x (s)δ 2 rms (1.61) σ y (s) = β y (s)ε y /βγ (1.62)
being D x the horizontal dispersion and δ rms the root mean square (rms) of the distribution of the particles momentum, called momentum spread.

Due to the non-linear charge density distribution, the fields and, thus, the forces are non-linear, too. Following the reasoning of [START_REF] Wiedemann | Particle Accelerator Physics, ser. Graduate Texts in Physics[END_REF], the following fields approximate the solution of Maxwell's equations for small amplitudes (x σ x and y σ y ):

             E x = λ 2πε 0 1 σx(σx+σy) x E y = λ 2πε 0 1 σy(σx+σy) y B x = -λβ 2π 0 c 1 σy(σx+σy) y B y = λβ 2π 0 c 1 σx(σx+σy) x (1.63)
These fields lead to the linearized Lorentz forces (see dashed blue line in Fig. 1.12). Taking as example the vertical plane:

F s.f. y = e(1 -β 2 )E y = 2eλ 4π 0 γ 2 1 σ y (σ x + σ y ) y (1.64)
In this case the right-hand side of Eq. (1.34) is given by:

F s.f. y β 2 c 2 m 0 γ = 2r 0 λ eβ 2 γ 3 1 σ y (σ x + σ y ) y = K spacecharge y (s)y (1.65)
Figure 1.12: The non-linear defocusing force produced in the case of a charge distribution with bi-Gaussian transverse profile. The dashed blue line represents the linearized term for small particle amplitudes.

In this case the expressions of the maximum space charge tune shifts become:

∆Q x = - r 0 λ 2πeβ 2 γ 3 β x (s) σ x (s) σ x (s) + σ y (s) ds ∆Q y = - r 0 λ 2πeβ 2 γ 3 β y (s) σ y (s) σ x (s) + σ y (s) ds (1.66)
The fact that, in general, the force is non-linear makes the tune shift non-linear too. In a generic way, considering also particles with bigger amplitude, the deviation from the bare tune is not simply a tune shift but an ensemble of points: a tune spread.

The role of the bunched motion in the space charge tune spread

In a bunched beam the line density λ, appearing in Eq. (1.66), is not generally constant, but a function of the longitudinal position z, therefore also ∆Q x,y is a function of the position inside the bunch. In the case of a bi-Gaussian transverse distribution, one has:

∆Q x = r 0 λ(z) 2πeβ 2 γ 3 β x (s) σ x (s) σ x (s) + σ y (s) ds ∆Q y = r 0 λ(z) 2πeβ 2 γ 3 β y (s) σ y (s) σ x (s) + σ y (s) ds (1.67)
An important consequence of Eq. (1.67) is that, while the particles perform synchrotron oscillations, they experience a different ∆Q. The line density variation contributes to the creation of the space charge tune spread. Chapter 2

The PS Booster (PSB) after the LIU Upgrade

This Chapter describes the CERN PS Booster, the first synchrotron in the LHC protons injectors chain (see Fig. 2.1).

Figure 2.1: The CERN injectors complex [START_REF]Schematic of the future accelerators complex at CERN[END_REF]. The PS Booster is in pink.

A particular focus is given to the new H -charge-exchange injection system in the frame of the LIU project.

The PSB main global characteristics are summarized in Table 2. For this reason the machine has "super-periodicity" equal to 16. The cycle length is 1.2 s.

The availability of two main cavities, the first one oscillating up to 2 MHz, for harmonic h=1 (h1), and the second one up 4 MHz, for harmonic h=2 (h2), makes the production of differ-ent longitudinal beam profiles possible through a double RF system (see Section 1.2.1): this configuration, with respect to a single harmonic one, is mainly used at low energy to flatten the profiles and reduce the line density, thus reducing the maximum space charge tune shift of Eq. (1.67). A cavity in h=16 is also available to blow-up the longitudinal emittance. The span of intensities and emittances for the different users is very large. As an example, high intensity beams are produced for the ISOLDE facility [START_REF]The ISOLDE facility website[END_REF]. The LIU Upgrade will bring the injection energy from 50 MeV (from Linac2) to 160 MeV (from Linac4). The beam, today extracted at 1.4 GeV, will be in the future extracted at 2 GeV, in order to mitigate s. c. at injection in the Proton Synchrotron (PS). Focusing on the LHC beams the present intensity is in the order of 1.65×10 The machine structure is going to be changed significantly at injection to host the new and more modern H -injection system. The future injection scheme will be based on a chargeexchange process with stripping foil from hydrogen ions H -to p+. The stripping foil, in carbon, allows a charge-exchange process whose transmission factor depends on its thickness: in order to limit the amount of H -ions and hydrogen atoms H 0 , to be collected in a dedicated dump located inside one of the injection dipoles (BSW4), to less than 2%, the foil thickness has been set to 200 µg/cm 2 (see Fig. 2.3). This should also allow less than 0.1‰ losses from both inelastic and elastic nuclear scattering processes and up to 12.5% transverse emittance growth through multiple Coulomb scattering [START_REF] Goddard | Stripping Foil Issues for H-Injection into the CERN PSB at 160 MeV[END_REF], with respect to to an LHC beam target normalized emittances x/y of 2/2 mm•mrad. A novelty introduced with the new system is that it is possible to inject turn-by-turn the beamlets (i.e. small beams) from the Linac4 at the same location in phase space. This can not be achieved with the present multi-turn injection of protons, which, at a first approximation, should obey the Liouville's theorem. This theorem states that the density in phase space of a bunch of particles is constant, if dissipative forces are neglected (generally forces depending on the particles velocity) [START_REF] Conte | An introduction to the physics of particle accelerators -2nd Ed[END_REF]. The injection system with H -particles hitting the foil is a dissipative system, so the Liouville's theorem can not be invoked.

As shown in Fig. 2.4, in order to hit the foil, the injected beam is horizontally displaced from the closed orbit to the external up to 81 mm, being the sum of 46 mm given by four new injection dipoles (BSW1-4) which define a "chicane" shape with a max deflection angle of 66 mrad, and 35 mm by a set of 4 fast kicker magnets (KSW), whose time constant is much faster with respect to the previous ones. The 46 mm chicane bump is needed to intercept the injected beam, while the 35 mm offset is designed to perform different shapes in phase space.

The total decay of the chicane to zero occurs in around 5 ms. This process is called "transverse painting": different emittances can be tailored using the flexibility of the KSWs whose typical times are tens of µs. View from top of the future injection "chicane" for the H -injection scheme, defined by the BSW magnets. The beginning of the process with the foil hits by the injected H -beam (red), which is stripped into the circulating H + proton beam (blue). The unstripped H -(light green) and the H 0 (magenta) hit a beam dump inside the BSW4 and are lost. [4].

On the vertical plane the baseline foresees an offset of ∼3 mm to increase the vertical emittance of the beam in order to mitigate the transverse space charge effects, respecting the target emittance requirements for the LIU project [7]. This offset is obtained through a vertical steering system at the end of the injection line, but it can be also reduced or removed if the space charge degradation will result to be overestimated. The results obtained will be shown through simulations in the following.

Finally, the longitudinal plane can be "painted" through different schemes, varying or not the turn-by-turn central energy modulation of the injected beam around 160 MeV. These have been studied in detail in the past by C. Carli and R. Garoby [START_REF] Carli | Active Longitudinal Painting for The H-Charge Exchange Injection of The Linac4 Beam Into The PS Booster[END_REF] and, more recently, by V. F. et al. [START_REF] Forte | Longitudinal Injection Schemes For the CERN PS Booster at 160 MeV Including Space Charge Effects[END_REF].

As already discussed, the brightness for the LHC beams is defined in the PSB. Therefore, in order to evaluate the performance of the PSB in presence of space charge, which is the main bottleneck for the PSB to reach the brightness and the luminosity required in the LHC in the future, it is fundamental to perform and optimize the injection process from the Linac4 using numerical simulations. An example of multi-turn injection in 6D after 20 turns with Linac4, with and without s. c., is shown in Fig. 2.5. In this example the beam is longitudinally injected with at different adjacent central energies at every turn (the red beamlet is the last one injected) [START_REF] Carli | Active Longitudinal Painting for The H-Charge Exchange Injection of The Linac4 Beam Into The PS Booster[END_REF]. The details of the injection simulations and the obtained results are described in the next Chapters.

PTC-Orbit

Numerical simulations of the s. c. effects in beam dynamics have been a challenge for accelerator physicists in the last 40 years. As a result, more than 30 software programs are actually used by the scientific community [START_REF] Prior | Code overview[END_REF]. The technological evolution of computing could make possible, in principle, to simulate from "start-to-end" a complete accelerators chain [START_REF] Prior | Code overview[END_REF].

At CERN, reliable space charge codes are needed to perform machines optimizations and study the limits in terms of brightness [START_REF] Schmidt | Code Requirements for Long Term Tracking with Space Charge[END_REF]. A huge effort has started in 2011 for the LHC injectors chain, aiming to optimize the brightness from the future PSB injection from Linac4. Since then, PTC-Orbit has been the baseline software program for tracking simulations including space charge in the CERN synchrotrons constituting the LHC injectors chain [START_REF] Molodozhentsev | PTC-Orbit Studies for the CERN LHC Injectors Upgrade Project[END_REF].

The PTC-Orbit software program

The PTC-Orbit software program [START_REF] Forest | Synopsis of the PTC and ORBIT Integration[END_REF] has been extensively used in the last four years for the PSB simulations. It constitutes the baseline for the recent development of PyOrbit [START_REF]PyOrbit[END_REF], which includes a modern and user-friendly Python interface and has been used in this thesis for the longitudinal optimization of the future LHC beams (see Section 6.2). PTC-Orbit is the fusion of two well-established codes: PTC [START_REF] Schmidt | Introduction to the polymorphic tracking code: Fibre bundles, polymorphic taylor types and exact tracking[END_REF] and Orbit [START_REF] Galambos | ORBIT: A ring injection code with space charge[END_REF]. The first is an optics code, which has been successfully used in the past in non-linear regimes for machines, such as the LHC, but does not include space charge routines. Orbit adds the required extensions for the space charge calculations and other collective effects. Orbit routines for space charge have been developed at SNS, Los Alamos (USA), and successfully bench-marked with measurements for the injection process in the Proton Storage Ring (PSR) [START_REF] Cousineau | ORBIT Code Review and Future Directions (oral contribution)[END_REF].

Important PTC-Orbit characteristics for the PSB simulations are:

• Possibility to introduce time-dependent elements (magnetic field components, RF cavities) to simulate precisely the injection process.

• The full non-linear machine model can be implemented through the MADX-PTC code [START_REF]MadX[END_REF], used to build the CERN machine models.

• Possibility to simulate stripping foil, realistic apertures (i.e. physical limits of the machine), double-harmonic RF.

• Several beam diagnostics can follow the evolution of the beam (to compute emittances, intensity, losses).

The "Particle-In-Cell" (PIC) method

The Orbit space charge routines use the "Particle-In-Cell" (PIC) method, which consists in following the trajectories of charged particles in self-consistent electromagnetic fields computed on a mesh (i.e. a grid) [START_REF] Dawson | Particle simulation of plasmas[END_REF].

Differently from other methods (e.g. the "frozen" approach [START_REF] Schmidt | Code Requirements for Long Term Tracking with Space Charge[END_REF]), "self-consistent" simulations do not require any imposition for the approximation of the fields. In a "self-consistent" simulation, the electro-magnetic fields are computed at every iteration, from the particles distribution, and the derived forces are applied to the particles themselves.

The PIC method is based on "macro-particles": each macro-particle can be seen as a "big" computational particle of charge I/N mp , where I is the intensity and N mp the number of macroparticles, usually in a range of 10 5 to 10 6 . This is done to lighten the computational cost of the simulations.

The space charge fields and relative "kicks" (i.e. forces) are calculated over a certain number of space charge "nodes" N sc , which are located all around the machine circumference. Usually, in the PSB simulations, ∼200 nodes per turn (in average one every 0.78 m) are used to perform the calculations.

The PTC-Orbit PIC method adopted in the thesis for the computation of the transverse space charge potential is explained in the following.

The bunch, which is composed by macro-particles, is represented for simplicity by the ellipsoid of Fig. 3.1 left. At every space charge node location in the ring, during the tracking, the computation of the space charge field is performed, through the following steps:

1. A grid is defined in the 3 spatial dimensions (x, y, z) on a mesh of dimensions (N x × N y × N z ). The macro-particles are given as input with certain state-space distributions and total number of charges (see Fig. 3. the electric and magnetic fields are computed on the (x, y) grid locations;

4. the space charge forces, derived by the fields computation, are scaled by the line density function λ(z), calculated over the N z longitudinal bins, and are applied to the macroparticles depending on their 3D position;

5. the macro-particles coordinates are updated;

6. the beam is transported to the next node;

7. the steps from 1 to 6 are repeated at the successive node until the end of the tracking.

PTC-Orbit computes the "direct" space charge, in "free space", through a PIC technique [START_REF] Holmes | Dynamic space charge calculations for high intensity beams in rings[END_REF].

This method adopts a "dynamic" (or "adaptive") grid, changing accordingly to the beam size.

As sometimes used in this thesis work, it is possible to add boundaries of various shapes (circular, elliptical, rectangular), whose dimensions are usually defined only once in accordance with the machine vacuum chamber. This second method uses a "fixed" grid [START_REF] Luccio | Progress of space charge calculation in the code ORBIT[END_REF] and allows to simulate also the image charges effect, thus the "indirect" space charge component [START_REF] Schindl | Space charge[END_REF].

Depending on the number of macro-particles used to calculate the intensity-dependent effects and the number of machine turns to be performed, from 100 to 1×10 6 , PTC-Orbit simulations can take from minutes to weeks. This is the reason why they are performed on dedicated clusters in multi-processor, through the Message Passing Interface (MPI) protocol [START_REF]MPI[END_REF].

Convergence studies

As for all the numerical methods based on grid discretization, it is important, in a PIC model, to perform a convergence analysis to set up correctly the simulation parameters. The parameters which have been optimized during the convergence study, were:

• N mp -the total amount of macro-particles;

• N sc -the number of space charge nodes;

• N x,y,z -the number of mesh points in the 3 spatial dimensions (x, y, z).

A convergence study based on the behaviour of rms emittances has been performed [START_REF] Molodozhentsev | PTC-Orbit studies for the LHC injectors[END_REF] to correctly setup the simulations in terms of mesh size and number of macro-particles that have to be tracked. This study has been done in a resonances "free" condition, where the beam is supposed to be stationary, so without any blow-up of the emittance nor losses.

Figure 3.2 shows, as an example, the effect on the rms emittance evolution of different combinations of N mp and mesh points. The intensity (1.65×10 12 p) and rms emittances have been chosen similar to the ones of the present LHC beams. One can note the artificial blow-up of the blue line, induced by an inaccurate transverse mesh choice. To correctly solve the fields equations, the dimensions of the number of transverse nodes N x,y should be higher in the method with fixed grid than in the one with dynamic grid. This because, in general, the beam occupies only a part of the vacuum chamber: if one wants to have a similar resolution with both methods, it follows that the "fixed grid", in accordance with the vacuum chamber dimensions, must have more nodes. The model that has been mostly used in the thesis is the one for direct space charge computation only through the "adaptive grid", as the LHC beams are very small compared to the vacuum chamber sizes.

The optimal parameters that have been found through the convergence study are reported in Table 3.1. It is stressed that an increase of the parameters could lead to a better resolution but also to the drawback of an increase of the computing time and, thus, of the length of the simulations.

Simulation speed and code scalability with the number of cores

The simulation speed and the code scalability with the number of cores depends much on the available computing power: different clusters have different simulation performances depending on the IT architecture.

At CERN, the simulations are run one the "spacecharge" cluster, an ensemble of 40 machines with 48 cores each, not interconnected between each other. This means that a single simulation can be run over a maximum of 48 simultaneous processes.

In collaboration with colleagues from CNAF-INFN in Bologna, Italy, a comparison for the PSB simulations has been performed with their own cluster, to compare the performances of two different architectures.

The CNAF cluster is composed of 10 machines with 16 physical cores each, eventually expandable to 32 cores (16 physical + 16 logical) through Hyper-threading [START_REF]Hyper-thread[END_REF], interconnected through the InfiniBand protocol [START_REF]Infiniband[END_REF]. The results are summarized in Fig. 3.3. Here, the red line shows the CERN cluster scalability, which is pretty good in the 48 cores limits, but it is evident for the CNAF cluster the importance of the nodes interconnection, which leads to a speed improvement of 20% for 32 cores and 230% for 128. Also, the absence of a Standard Output (S.O.) to be dumped on disk, is helping the speed (see difference between green and blue with high number of cores).

Further tests showed that the Hyperthread usage is detrimental with many cores and that the usage of the only physical cores improves more the efficiency of the cluster. 3.2), so an improvement is foreseeable in speedup by increasing furthermore the number of cores. This choice is clearly bounded by economical constraints for the cluster expansions (more cores implies higher economical costs)

and by an educated guess on how a tremendous speedup would be always necessary even for short-term simulations. The particles tune spread in a space charge dominated regime

As discussed in Chapter 1, the effect of the direct space charge is the creation of a tune spread (see Fig. 1.13). Each particle feels a space charge force, thus a de-tuning, which depends on the line density and the transverse displacement (see Fig. 1.12). This Chapter starts exploring the mapping of particles with certain phase space characteristics in the PSB (Q x , Q y ) space with the help of PTC-Orbit simulations, using a simple single-turn tune computation method. Initially, starting from bi-Gaussian transverse distributions, including dispersion in the horizontal plane, static phase space cuts are applied and their location in the single turn tune footprint is analyzed in Section 4.1. Afterward, in Section 4.2, the time-varying de-tuning of a single particle in one synchrotron period is introduced: particles with different line density variation in time have different tunes modulation. Section 4.3 shows that, in addition to the space charge tune spread, the chromaticity (see Eq. 1.22) also induces a de-tuning which is proportional to the particle momentum offset δ (see Eq. 1.17). This contribution sums up with the space charge and creates precise tune patterns.

A second method, a tunes averaging technique, is introduced in Section 4.4 for discovering resonance trapping mechanisms. These mechanisms play a key-role in the rest of the thesis.

This approach represents an original contribution of this thesis for 6D self-consistent space charge studies. The effects of the longitudinal and the transverse amplitudes are evaluated on the averaged tune spreads. This method, which "freezes" the longitudinal motion, filters out the components which correlate the transverse and the longitudinal motion, like the chromaticity and the dispersion.

The results presented in this Chapter have been shown in two educational talks at the space charge meetings [START_REF] Forte | Educational talk: Tunes modulation in a space charge dominated beam: the particles behavior in the "necktie[END_REF], at the 2014 CERN international space charge collaboration meeting [START_REF]PSB experiments, 6D tune evolution with space charge[END_REF] and through an oral presentation [START_REF] Forte | Chromaticity Effects For Space Charge Dominated Beams In The CERN PS Booster[END_REF] at IPAC15, the yearly International Particle Accelerators Conference. They are going to be published in [START_REF] Forte | 6D Tunes Computation For Space Charge Dominated Beams[END_REF].

Particles positions in the (single-turn) tune footprint

In order to analyze the location of the particles in the space charge tune spread necktie, a subset of particles with small transverse amplitudes has been selected. Figure 4.1 shows, in red, the particles that have been considered for the analysis. The two plots at top represent the particles phase space coordinates, while the two in the bottom show the same particles in the normalized phase space. The following transformation, using the Twiss parameters α x,y , β x,y and the dispersion D x , is applied:

           x = (x -D x δ)/ √ β x x = (x -D x δ) √ β x + xα x y = y/ β y y = (y + yα y /β y ) β y (4.1)
This transformation into "normal forms" subtracts the dispersive contribution in the horizontal plane, in order to put in evidence only the pure betatron motion and transforms the phase space ellipses in circles of radius J x,y , being J x,y the particle action of Eq. (1.10). Different samples of particles of this subset are then selected applying different cuts in the longitudinal plane (φ, ∆E).

Particles sitting at the edges of the bunch, in Figure 4.2 left, are located close to the bare tune in the necktie, as shown in Figure 4.2 right. In this longitudinal region, in fact, the beam line density is smaller with respect to the center of the bunch, therefore also the space charge de-tuning is small. Particles that sit longitudinally in the center of the bunch (see Fig. The shape of a coloured "boomerang" is recognizable in Fig. 4.3 right: the dispersion brings the particles off-center in the horizontal direction, causing a more vertical de-tuning. For this reason the particles cover mainly the bottom-right part of the necktie. The chromaticity, negative in both planes in this example, generates a de-tuning which is opposite to the space charge one for ∆E<0. For ∆E>0, instead, the de-tunings go in the same direction (see Section 4.3). The colourcode is the energy offset. On the right it is shown the position evolution of such particle in the footprint.

The tune modulation of a single particle

Particles experience different tune modulation depending on the evolution of their longitudinal position during the synchrotron motion. Due to the fact that the line density varies with the longitudinal position, also the space charge detuning feels a turnbyturn variation (Eq. 1.67). oscillations. In the left plot it is represented its path in the longitudinal plane ( one synchrotron period.

In this case, being the particle close to the

Effect of large transverse amplitude

Particles with large transverse amplitude feel a lower space charge kick and a tune modulation much closer to the bare tune. As an example, Figure 4.8 shows the tune modulation of a particle at 3σ x and 3σ y in the normalized phase space. Again, one can see the two branches due to the chromaticity Q .

The role of the chromaticity in the space charge tune spread

The chromaticity (see Section 1.1.6) has an effect on the tune spread in combination with space charge [START_REF] Forte | Chromaticity Effects For Space Charge Dominated Beams In The CERN PS Booster[END_REF]. • Branch AB -the space charge and chromatic de-tunings are large. For positive δ (and negative chromaticity, such as in the PSB) both effects are defocusing and they sum up;

• Branch BC -in the vicinity of the bare tune, when the particle is sitting in the head or the tail of the bunch, the space charge component is almost zero and the tune is moving on a line which slope depends on the ratio between horizontal and vertical chromaticity.

• Branch CD -the space charge component is large again. However, for negative δ and negative Q', the chromatic de-tuning is positive, i.e. goes in the opposite direction with respect to the space charge one.

The orientation and the length of these three "branches" depend on the chromaticity value, on the synchrotron amplitude and on the particle actions in the horizontal and vertical planes.

Average tune spread computation

An original contribution of this thesis is the adoption of averaged tunes for space charge studies.

The method is based on the Average Phase Advance (APA) technique [START_REF] Bartolini | Tune evaluation in simulations and experiments[END_REF], which can be used in alternative to Fast Fourier Transform (FFT) analysis of trajectories. The usage of the method is, according to our knowledge, a novelty for resonances identification in 6D self-consistent space charge studies.

PTC-Orbit performs the particles tune computation in one turn, tracking the particles phase advances along the machine elements, in order to obtain the integer part of the tunes too. The single turn tune computation process can be iterated for many turns N , at least one synchrotron period T synch , and then averaged, using the formula:

Qx,y = 1 N N i=1 Q x,y (i) (4.2)
As an example of the method, the large modulation of a particle performing a very large synchrotron oscillation and small transverse amplitudes is shown in Fig. 4.12. The black cross is the averaged value over one synchrotron oscillation. The averaging process "freezes" the longitudinal motion for every single particle.

Effect of the longitudinal amplitude

The single particle dynamics in a bunch is very sensitive to the particle synchrotron amplitude [START_REF] Franchetti | Modeling of Space Charge Induced Resonance Loss[END_REF]. Figure 4.15 shows that particles with large synchrotron amplitudes are the ones with a major risk of interaction with resonance lines close to the bare tune. These resonances are the most difficult to treat, as sometimes it is not possible to vary the bare tune of an amount which is large enough to avoid them with the complete tune spread. Therefore, in order to cure these resonances, proper correction schemes through corrector magnets have to be applied.

Mixed transverse amplitudes

In the following the results of the analysis of particles with mixed transverse amplitudes are discussed. Figure 4.17

-0 < J x < σ x , green -σ x < J x < 2σ x , magenta -2σ x < J x < 3σ x , purple - 3σ x < J x < 4σ x ; (b)
small normalized horizontal phase space with 0 < J y < σ y ; (c) the global averaged tune spread computation (grey scatter plot) and the averaged tunes computation of the particles (horizontal amplitudes colour-code). The black dot is the bare tune.

Chromaticity in the averaged tune spread computation

The tunes, averaged over multiples of the synchrotron period are not sensitive to the chromatic change. A synchrotron period scatter-plot over a longitudinal distribution is shown in Fig. Chapter 5

PSB measurements and simulations at 160 MeV

Several Machine Development (MD) studies have been performed in the PSB, on a special cycle at the future injection energy of 160 MeV. The campaign [START_REF] Forte | Space charge studies in the PSB -MD report[END_REF] was aimed at collecting a good set of space-charge related measurements for understanding the beam behaviour and for the PTC-Orbit benchmarking in order to check the validity of the software for the prediction of future beams, as discussed in Chapter 7.

The instrumentation and the observables, together with the machine settings, are presented in Sections 5.1 and 5.2. Main quantities are intensity evolution, beam profiles, emittances, closed orbit, tune and chromaticity.

The measurements and, thus, the simulations have been performed to explore the effect of some special resonances. First of all, tune scans have been performed to identify important resonances, excited by machine errors, lattice periodicity and the beam itself. The scans, presented in Section 5.3, have been also useful to propose the most effective set of correctors to be used in machine operation.

Measurements and benchmark with PTC-Orbit simulations have been performed on:

• the vertical half integer resonance 2Q y = 9 (Section 5.4);

• the integer resonances Q x = 4 and Q y = 4 (Sections 5.5 and 5.6);

• the coupling resonance Q x -Q y = 0 (Section 5.7).

Other space charge-related measurements are presented in Appendix B.

Observables and instrumentation

Space charge effects have been evaluated in terms of transverse and longitudinal bunch profiles, rms emittances and intensity loss.

Beam intensity

Beam Current Transformers (BCTs) [START_REF] Gelato | Beam current and charge measurements[END_REF] are used in the PSB to measure the intensity.

Longitudinal profile and bunch length

Longitudinal pick-ups are used to derive the longitudinal bunch shape [START_REF] Forck | Lecture Notes on Beam Instrumentation and Diagnostics[END_REF]. From this signal it is also possible to compute the total bunch length, through a foot-tangent algorithm [START_REF] Hancock | A pedestrian guide to online phase space tomography in the CERN complex[END_REF],

similar to the one presented later in Section 6.2.

Longitudinal phase space and tomography

Tomography is used to reconstruct the longitudinal phase space of the bunch. The underlying principle of tomography is to combine the information from a large number of beam current 1D

projections to be able to reconstruct unambiguously the fuller picture with the extra dimension reinstated [START_REF] Hancock | Tomographic measurements of longitudinal phase space density[END_REF]. On each turn around the machine, a pick-up provides a "snapshot" of the bunch projected at a slightly different angle. Combining such profiles with a tomography, it is possible to obtain a two-dimensional picture of phase space density, with the help of a longitudinal tracking algorithm, as shown by the measurement reconstruction in Fig. 5.1 for the case of double harmonic RF settings. From a tomography it is possible to derive the longitudinal emittance and the momentum spread δ rms of the bunch.

In simulations the reconstruction of the phase space profile measurements [START_REF] Hancock | Algorithm for longitudinal phase space reconstruction[END_REF] is an important input, as it directly provides the 2D longitudinal distribution of the macroparticles.

Transverse beam size and emittance

The beam emittance is measured through the wirescanner. This instrument measures the quantity of secondary particles generated by the scattering of the beam with a tiny wire, which passes through the beam at a speed of 10 or 15 m/s [START_REF] Burger | The PS booster fast wire scanner[END_REF]. From this measurement it is possible to reconstruct the beam profile (at the wirescanner position s ws ), in one transverse plane, and the beam size through a Gaussian fit. Finally, knowing the value of the momentum spread δ rms , obtained with the longitudinal tomography, and the optics functions β x,y and D x at the instrument position, one can estimate the transverse normalized rms emittances through the formulas:

x = βγ σ 2 x (s ws ) -D 2 x (s ws )δ 2 rms β x (s ws ) y = βγ σ 2 y (s ws ) β y (s ws ) (5.1)
In simulations the emittances can be calculated either through the statistical definition (see Eq. 1.11) or from a Gaussian fit of the particles distribution profiles, thus with the same approach of the wirescanner. Both methods are used in the following.

The starting 6D distributions in (x, x', y, y', φ, ∆E) for the simulations have been generated

as bi-Gaussian for the horizontal and vertical phase spaces, matching them to the initial beam transverse emittances and Twiss parameters.

Transverse position and closed orbit

Beam Position Monitors (BPMs) [START_REF] Shafer | Beam position monitoring[END_REF] are used in the PSB to measure the transverse position of the beam centroid. Actually there are 16 BPMs per ring installed in the machine which can measure the position with an accuracy of 0.1 mm. The BPMs are needed to evaluate the closed orbit excursions and, if needed, as input to introduce an orbit correction with dedicated steering magnets ( see Appendix C).

Tune

The tune measurement is performed by kicking the beam in the transverse plane. As a result, the beam start oscillating around its closed orbit at a frequency f = 2πQ x,y . This oscillation is recorded turn-by-turn through a dedicated BPM. A Fast Fourier Transformation (FFT) algorithm, applied to the transverse position signal over many turns, gives the noninteger part of the tune.

Chromaticity

Since Q x,y = ∂Qx,y ∂δ (see Eq. 1.21), by measuring the tune at different energy offsets, it is possible to derive the first order chromaticity as the slope of the linear regression in the plane (δ, Q x,y ). The different energy offsets are generated through the variation of the beam radial position.

Machine settings

Beam intensity and transverse settings

The bunch population for the measurements was usually around 1.65 × 10 12 p, the same of the present LHC 25 ns beam, if not otherwise specified. This intensity was obtained through a multi-turn injection of 2-3 turns. The corresponding average transverse normalized emittances was ∼ 2 mm•mrad or higher, varying for the different measurements.

Longitudinal settings

Long bunches are produced setting the cavities voltages in anti-phase. The shape depends on the ratio of the two RF peak voltages. Figure 5.3 shows the typical longitudinal phase spaces for V h1 = 8 kV and V h2 = 8 kV.

For the MD purposes, the cavities, with voltages in-phase have been used to produce shorter bunches, thus enhancing the betatron tune spread. Figure 5.4 shows the typical longitudinal phase space for V h1 = 8 kV and V h2 =8 kV in phase.

Chromaticity settings

In the PSB the chromaticity is controlled via one family of 16 normal sextupoles, distributed one per period along the machine. This setting leads to a coupled control of the horizontal and vertical chromaticities, as shown in Fig. 5.5. By increasing the current, ξ x increases and ξ y decreases. On the other hand, changing polarity, ξ x decreases and ξ y increases.

The interaction between chromaticity and space charge has been studied for negative chromaticities, to avoid the development of coherent instabilities [START_REF] Chao | Physics of collective beam instabilities in high-energy accelerators[END_REF]. Table 5.1 reports the horizontal and vertical chromatic tune spread for three different sextupole settings, assuming a maximum momentum spread of δ rms =5×10 -3 . The maximum de-tuning due to chromaticity is of the order of 0.03 to 0.07. This should be compared with a space charge tune spread of more than 0.3 measured in the present PSB at 160 MeV.

Tune scans

In order to know the effective resonance lines in the machine, a series of tune scans has been performed at 160 MeV. The method has been derived from the one used in other CERN synchrotrons like the PS [START_REF] Huschauer | Working point and resonance studies at the CERN Proton Synchrotron[END_REF].

The measurements are performed ramping down the programmed vertical tune, with a change rate of 2.2×10 -3 [1/ms], at fixed horizontal tune steps and by recording the intensity. The intensities and the programmed tunes, imposed changing the current in the main quadrupoles, are used to build the plots. The loss rate is calculated through the smoothed time derivative of the intensity, that, in percentage with respect to the initial intensity, is used as an indicator of the presence of a resonance. The plots show the beam loss as function of the programmed tune.

A strong loss rate (red colour-code) indicates a destroying effect of the resonance on the beam, while the blue colour-code represents a stable region.

In order to obtain a map with best resolution, it is necessary to have large starting beam size and long bunches (for lower space charge tune spread). Unfortunately, for the PSB, it is not possible to have a nice probe beam with low intensity and high emittance as in the PS. The initial average emittance for the scans is around ∼ 5 mm•mrad and the starting intensity is ∼ 1.8 × 10 12 p. The double RF cavities in anti-phase guarantee the maximum possible bunch length, leading to tune spreads of the order of 0.1.

The measurements have been initially performed with the multipolar correctors OFF (bare machine condition). The description of the multipolar magnets can be found in [START_REF] Baribaud | The new PSB multipole magnet system[END_REF]. (skew) and Q x + 2Q y = 13 (normal). The coupling line Q x -Q y = 0 is also very strong.

The resonance lines are often shifted above the resonance because the moment in time when the losses occur, during the scan, depends on the tune footprint extension. Particles in the lower part of the tune spread get indeed lost before the programmed tune crosses the line [START_REF] Schindl | Space charge[END_REF]. Table 5.2 shows the list of the correctors which have been used to reach the situation in Fig. 5.7. On the plot in Fig. 5.7, a vertical line is still visible at Q x = 4.3 and we discovered that it is caused by an horizontal instability. These frequencies look compatible with a large quadrupolar power supply ripple that was observed [START_REF] Mcateer | Observation of Coherent Instability in the CERN PS Booster[END_REF], but it has yet to be verified. Figure 5.8 shows the exponential growth of the horizontal beam centroid. The instability has been cured increasing the strength of the transverse feedback [START_REF] Carter | THE TRANSVERSE FEEDBACK SYSTEM FOR THE CERN PS BOOSTER[END_REF]. The final result is shown in Fig. 5.9.

The resonances correction procedure, presently followed in operation, has a more complex approach, because it requires a careful time-varying optimization of the correctors strengths at the different values of the magnetic ramp, taking into account that the programmed tune varies during the cycle. Usually, in the PSB, the correction is performed "empirically" through a fine tuning of a small set of effective correctors. One must say also that, in a strong space charge regime, as in the PSB, the presence of one or few local correctors might not be enough to correct completely the resonance, as the tune spread extends up to ∆Q y = 0.6 at injection energy. In order to facilitate the choice of these correctors, the tune scan analysis has proven to be an useful tool to give a first indication of the most effective correctors to be powered in operation. A methodological novelty that has been introduced in the tune scans technique, during the work for this thesis, is the "radial" tune scan, explained in Appendix D, and implemented in collaboration with E. Matli (CERN Operations team) [START_REF] Forte | Space charge studies in the PSB -MD report[END_REF].

Studies on the vertical half-integer resonance 2Q y = 9

The vertical half-integer line is, together with the integer lines, the most dangerous in the PSB operations (see Fig. 5.6). In order to gain space for the large tune spread at injection, the nominal working point is, in operation, placed above this line (at Q y =4. 55-4.6). Thus, the upper part of the tune spread is concerned about this resonance, which is driven by quadrupolar field errors. These terms, constituting the linear errors of the machine, have been measured in the PSB by M. McAteer (see Appendix C) [START_REF] Mcateer | Linear optics measurements in the fermilab booster and the CERN PS booster[END_REF] and their proper modelling in simulation is fundamental to understand how the beam is affected by space charge. In operation, a normal quadrupolar corrector is used to partially compensate the resonance effects.

Measurements

Measurements of beam intensity, transverse and longitudinal profiles evolution have been performed on the 160 MeV plateau (see Section 5.2) at a programmed (or bare) static working point of (4.28, 4.53), during the measurement window from 450 ms to 620 ms. The programmed tune is defined as the one that is set in the control room through the nominal current of the main quadrupoles in the machine, excluding possible error contributions. To reach the initial conditions, the beam has been injected at 50 MeV with a vertical tune below the half integer, then accelerated to 160 MeV. The working point has been raised above the Q y = 4.5

line by keeping a single normal quadrupolar corrector ON in order to be able to cross the resonance minimizing losses and beam deformation; measurements start at 450 ms, as soon as the normal corrector is switched off. Two different longitudinal bunch settings with a double RF harmonics are considered for long bunch and short bunch, as described in Section 5.2.2. Table 5.3 shows the initial beam parameters.

Figure 5.10 shows the measured intensity evolution during the cycle time for both cases. For this specific working point, at 620 ms, the beam survival for the short (long) bunch is of 65% (15%). The losses are evident in the longitudinal plane and concern, at the beginning, mainly the large synchrotron amplitude particles, as shown in Fig. 5.11. The beam size -both horizontal and vertical, remains similar over the 170 ms. Figures 5.12 and 5.13 show the transverse profiles measurements, referred as Particle Density Function (PDF) for the long and short bunch cases, respectively. The distributions are normalized with respect to the maximum values, where one can note that the 1σ beam size and the Gaussian shapes are preserved. The asymmetric behaviour of some of the profiles can be due to artifacts in the wire-scanner measurements due to large losses occurring during the measurements.

Simulations

Simulations have been set up including both the dipolar and quadrupolar misalignments and the quadrupolar (gradient) errors, described in Appendix C, which are necessary to excite the Table 5.4 shows the simulations settings that have been used in PTC-Orbit. To compare the losses profiles for the same starting conditions, the simulated initial intensity and emittance for the short bunch have been put equal to the one of the long bunch (see Table 5.3), even if they slightly differ in the measurements: this should only marginally affect the quality of the effects confirmed by the simulations in terms of profile shapes and quantities. Considering space charge, if only quadrupolar errors -but no misalignments -are included, a qualitative agreement is achieved (solid magenta line). Then, if also the misalignment errors are considered, there is a significant improvement with also better quantitative agreement (black line). The last improvement is given by the results of simulation with realistic quadrupolar errors only and a slightly lower programmed vertical tune of Q y =4.525 (dashed magenta line), which brings the effective tune down to Q y =4.512. This result shows that the distance of the tune to the resonance line is a critical parameter of the benchmarking. The effective tune is equal to the programmed tune plus the fields errors components.

The simulated black curve agrees dramatically with the measured intensity evolution, including the time values at which the intensity slopes change.

As shown in Fig. 5.15, the 1σ Gaussian beam size remains the same during the simulation window and reflects the measurements of Fig. 5.12. Simulations, moreover, revealed the form-ation of tails starting from 600 ms, visible in Fig. 5.15 right. This effect was not seen in the measurements, most likely due to the noisy baseline in the wire-scanners profiles. In the longitudinal plane as well, simulations agree with measurements (see Fig. 5.16 to be compared with Fig. 5.11): at early times, larger longitudinal amplitude particles are mainly lost, then the ones closer to the ±1 rad longitudinal fixed points. This phenomenon is the equivalent of "bunch shortening" [START_REF] Franchetti | Experiment on space charge driven nonlinear resonance crossing in an ion synchrotron[END_REF] for a double-harmonic longitudinal bucket, and will be discussed in Section 5.4.3.

Short bunch

Very good qualitative and quantitative (<10%) agreement is found also for the short-bunch case: Figure 5.17 shows the nice matching in the measured and simulated intensity evolutions when all measured quadrupolar and misalignment errors are taken into account, starting from a programmed tune of (4.28, 4.53) as in the previous case. The beam core (1σ) remains constant as in the measurements (see Fig. 5.18), similarly to the long bunch case. Figure 5.19 illustrates the bunch shortening effect taking place in the longitudinal plane.

Effect of errors and working point

Additional simulations studies were performed for the long bunch case to further explore the effect of errors and to identify what are the key parameters to take into account, e.g. to make prediction if the real set of machine errors is not known. The loss rates are different and depend on the beta-beating, i.e. the beta function perturbation induced by the quadrupolar field errors. Figure 5.21 shows, for 10 sets of random quadrupolar errors, the correlation between the vertical beta beating values and the initial loss rate, calculated as the (opposite) intensity derivatives when the curves are at I=130×10 10 p, normalized with respect to the value of the smallest loss rate one, where the beta beating is minimum. For similar tunes, as in this case (standard deviation 1.1 × 10 -3 ), the higher the beta beating, the faster the losses. This confirms in the simulations that beta beating correction, possible in the machine through dedicated normal quadrupoles, is effective for loss minimization.

Discussion

Simulations reproduce and explain losses, up to the detail of the change of slope for the longbunch case, by correlating them to the specificity of the longitudinal motion in a double harmonic bucket in the presence of space-charge and in interaction with the 2Q y = 9 lattice resonance.

The bunch shortening process described e.g. in [START_REF] Franchetti | Experiment on space charge driven nonlinear resonance crossing in an ion synchrotron[END_REF] implies that particles at large synchrotron amplitude feel a large tune modulation induced by space-charge while they sample different bunch line densities during their synchrotron motion. Since the tune footprint overlaps the half-integer line, these particles, which are periodically crossing the resonance line, are the candidates to be trapped or scattered and eventually to be lost. The phenomenon is evident in the longitudinal plane as a shortening of the bunch. Moreover, the loss of particles at large synchrotron amplitude has the consequence of reducing the space-charge tune spread, therefore repopulating the regions affected by the interaction with the resonance and subjected to losses.

In a double-harmonics system, i.e. in the long-bunch case, the effect is similar, with the complication of having three fixed points at φ=0 and φ≈±1 rad. Particles around the unstable point φ=0 have a larger synchrotron period and cover bigger areas with respect to the ones that rotates in the limit cycles around ±1rad.

The variation of the synchrotron period has an effect on the loss rate, as soon as the particles outside the inner separatrix are lost and the remaining ones which oscillate around the ±1 rad equilibrium points start to be affected. As one can see in Fig. 5.16 this happens at around 560 ms, where there is a change of slope in the intensity evolution.

At this regard, one can see in From now on, the simulations will be done assuming quadrupolar field errors only, i.e. no misalignmet errors (magenta curve of Fig. 5.14). The behaviour is qualitatively similar to the full simulation (black), but it has the advantage to have the possibility to compute the tunes, as the algorithm is failing in presence of misalignments.

Figure 5.24 shows the tune footprint at 485 ms (a) and at 565 ms (b), computed averaging the phase advance per turn over 1500 turns. Thanks to this method to compute the tune footprint (see Section 4.4), in both plots, one can note the depletion along the half integer line.

A closer look at the Poincaré Section in the (y, y') plane of a particle before it gets lost at around 485 ms (see Fig. 5.25 left), puts in evidence the "trapping-scattering" phenomenon [START_REF] Franchetti | Modeling of Space Charge Induced Resonance Loss[END_REF], which leads the particles to eventually hit the vertical aperture. Figure 5.25 right shows the turn by turn phase advance of the particle, and its averaged tune, which is sitting exactly on the vertical half integer.

A stable and steady-state condition occurs at 565 ms, as soon as the intensity is reduced to almost 20%, where the space charge forces are significantly small. The averaged tune footprint of the remaining particles (see Fig.

5.5

The horizontal integer resonance Q x = 4 (static tunes)

The strongest and most dangerous resonances in any accelerator are the integer ones: in the case of the PSB, at the present working point, they are the lines Q x = 4 and Q y = 4. In particular, the horizontal integer resonance Q x =4 is a big limitation for the future LHC beams brightness and quality [START_REF] Benedetto | CERN PS Booster Upgrade and LHC Beams Emittance[END_REF]. By adjusting the working point close to one of these two resonances, it is possible to observe a sensible rms emittance growth in the plane of the resonance, occusrring in a time-scale of up to 20 ms.

Measurements

To put in evidence the effect of the integer resonance, a first set of measurements has been done

varying the horizontal tune and keeping fixed the vertical one. Table 5.5 reports the starting parameters.

Initial beam parameters Horizontal integer

Bunch population [10 As the working point is brought closer to the resonance line, the horizontal rms emittance blows up more and more. A second set of measurements with a lower beam intensity has been done and reported with simulations. In a regime of zero losses, the transverse profiles have been measured over 75 ms for two different values of the horizontal chromaticity, ξ x =-0.15 and ξ x =-0.73. The horizontal tune is brought down to the constant value of (Q x , Q y )=(4.06, 4.29) at 575 ms in the cycle, which is the first point of the measurements. Table 5.6 shows the parameters of the two sets of measurements. The maximum space charge tune shift is about ∆Q x ∼-0.11 and ∆Q y ∼-0.13.

Figure 5.29 shows the evolution of the horizontal measured emittance. The vertical emittance is constant, as expected, while the horizontal is increasing and reaching a different value for the two different chromaticities. The horizontal profiles and their Gaussian fits at 575 ms and 580 ms are reported in Fig. 5.30, together with the residuals (i.e. difference between the two). In addition to the blow-up, one can note also an increase of the residuals between the measured profile and its Gaussian fit, as in the previous set of measurements. The blue line is the measurement, the dashed red line is the Gaussian fit and, in gray, the residuals between the two, in arbitrary units.

Simulations

Table 5.7 reports the simulation settings.

Effect of quadrupolar field errors

Simulations with realistic quadrupolar errors (see Appendix C) have been done. The errors move the horizontal tune farther from the resonance, to Q x =4.066. This difference, in the order of 10 -3 , is sufficient to reduce the blow-up. The agreement of the simulations with the measurements results improved.

Discussion

Both measurements and simulations show that, for a working point close to the Q x = 4 line, the horizontal profile blows up and loses its Gaussian shape. Moreover, different values of horizontal chromaticity, by modifying the footprint, lead to a different final emittance. In general, a reduction of the chromatic spread helps in reducing the beam degradation due to the interaction with a specific resonance (see also Appendix B.2 showing the influence of the chromatic spread close to a sextupolar line).

The initial simulations are done with an optics lattice without errors, which does not fully represent the PSB machine, and afterwards by adding a realist set of quadrupolar field errors.

In the first case, the simulations show a similar trend with respect to the measurements, but with quantitative discrepancies. In the second case, the error set moves the tune horizontally slightly farther from the line of 6×10 -3 . In this case the simulated emittance blow-up has better agreement with the measurements, for both the chromatic values. A third set of simulations has demonstrated that, re-matching the lattice with errors to the original tune Q x = 4.06, the results are very similar to the case without errors.

The sensitivity of the observables close to an integer resonance is very high. The tune in particular, more than the errors themselves, seems to be a very sensitive parameter. Moreover this line is excited at various orders. In particular, the 4Q x = 16 octupolar resonance, which can be also excited by the non-linear octupolar space charge fields, is "structural" in the machine, as p = 16 is the number of periods composing the PSB super-period.

5.6 Dynamic working point variation close to Q y = 4

Measurements

In the following experiment, the vertical tune has been moved towards and then far from the vertical integer resonance, while the horizontal has been kept constant as shown in Fig. 5.39.

The function of the programmed tune has been set up to have losses only for few milliseconds: a triangular modulation in time has been imposed to the vertical tune starting from 500 ms, going down until 535 ms and then back again to the initial working point at 570 ms. The programmed tunes differ from the measured ones due to machine errors and the intensitydependent coherent tune shift. This dynamic variation had the intent to obtain, in the same experiment, a contemporary evaluation of losses and emittance blow-up. Two sets of measurements have been taken with and without the correction of the closed orbit distortion (COD) in the machine. The COD is the deviation of the particles trajectory from the design orbit and is generally excited by dipoles errors and quadrupoles misalignments. The vertical orbit, if not corrected through vertical steerers (see Appendix E), blows up due to a dipolar effect caused by the integer resonance approach, as shown in Fig. 5.40. Table B. 1 shows the initial beam parameters:

Initial beam parameters

Dynamic Q y = 4

Bunch population [10 The closed orbit correction has been performed in order to disentangle vertical beam emittance blow-up from losses.

The measured intensity profiles, in the time window of the losses, with and without COD correction, are shown in Fig. 5.41. Without COD correction the losses started before and were more drastic with respect to the case with COD correction. This suggested that, in addition to space charge induced emittance blow-up provoking losses, part of these were the result of the closed orbit distortion, which was pushing the beam centroid toward the vertical aperture of the machine. Without COD correction, it was impossible to obtain good vertical profile measurements due to the huge losses. Once corrected the COD, instead, it has been possible to retrieve emittance measurements. These showed, as expected, a clear increasing trend in the vertical plane (see

Simulations

Simulations are performed including measured quadrupolar and misalignment errors and by applying additional kicks through 13 available vertical orbit correctors (DVTs), as explained in Appendix C, to get the same COD as in the measurements. To reproduce the measurements with COD correction, on top of this "matching", some of these DVTs have been powered with the current used for the measurement (see Appendix E). Simulations have been performed including or not this last COD correction. Table 5.9 shows the initial simulation settings. The tracking without space charge (purple dashed curve) shows no losses, while the simulation including the direct space charge and measured errors shows an exceptional overlap with the measurements. Moreover, to confirm that the correct quadrupolar field errors are important for these simulations, a set of normally distributed random errors has been generated for the quadrupolar fields (focusing and defocusing), with the same standard deviation of the real errors σ(δK)=0.7×10 -3 . In this case simulations do not show such a good agreement (pink errorbar) and neither if no field errors are considered, i.e. only misalignments and dipole errors in the steerers are present (green continuous line). A big contribution to the losses is due to the COD, which increases as the beam approaches the integer resonance. It was not possible to measure the transverse profiles through the wire-scanners in this situation, due to large losses, so the quantities for the corrected-COD analysis have been chosen as starting beam parameters.

Figure 5.45 shows that, in case the complete error set is applied and the space charge calcula-tion is OFF, the beam only shifts due to the COD blow-up (a), while when space charge is ON, there is also an emittance blow-up (b), as expected in proximity of the integer resonance.

With COD correction

Simulations have been performed also for the case with the COD correction (measurements are the blue solid line in Fig. 5.46), in order to disentangle the space charge-related effects from the COD ones. As before, if space charge is not included in the calculations, the behaviour of the intensity is pretty flat (black dashed line), while in case space-charge is added to the tracking, losses occur: the simulation with direct space charge (red dashed curve) underestimates the losses, while the one using the PTC-Orbit module including the boundaries with the smallest vertical aperture (rectangular with dimensions ±61 mm × ±29.5 mm), slightly overestimates them (dashed green line).

As seen in Section 3.1.1, the space charge model with the boundaries takes into account also the indirect space charge contribution, which induces a small increase of the tune spread and a coherent tune shift [START_REF] Schindl | Space charge[END_REF]. The indirect space charge contribution strongly depends on the beam size (compared to the fixed chamber size): for small PSB beams, like the ones for the LHC, the indirect space charge contributions are negligible, while for larger beams, these should be taken into account in the analysis. In this particular case, the vertical beam profile suffers a huge blows up since the beginning due to the interaction with the integer resonance. Therefore it has been chosen to study the case also through the space charge model with boundaries. Different error distributions generate different intensity results: the green errorbar represents the simulations behaviour in case a random error-set is chosen, while the simple dashed green line is a similar simulation, but using the errors as they have been calculated on the real machine.

The dashed orange line represents the intensity profile obtained in case no field errors are considered.

The rms emittance evolution is shown in Fig. 5.47: the vertical measurements, with error-bar, are the pink band, while the simulations are dashed in case of statistical computation, or represented with markers in case of Gaussian fit, as it is commonly performed in the PSB control room. The discrepance between the statistical and the Gaussian fits is an indication that the lost of Gaussian shape is caused by the lower part of the tune spread approaching the integer resonance. One must say that the initial measured distribution is not completely Gaussian, while in the simulations a Gaussian starting profile has been used in every case. This leads to small errors in the computation of the initial space charge tune spreads.

Calibration of the boundary conditions

The PTC-Orbit code permits the definition of only one single set of boundary conditions of a defined shape (circular, rectangular, elliptical), considering it equal all around the machine.

An accelerator has usually different vacuum chamber sizes and shapes along the machine, so

an "equivalent" one has to be defined for the tracking with transverse indirect space charge.

The method here used intends to find the conditions for which the simulations overlap the measurements in the case with COD correction, in which the beam deformation is dominated by direct and indirect space charge. For this reason different simulations have been launched

with different heights for a rectangular shape, having fixed the horizontal one to ±61 mm, scanning between 29.5 and 80 mm. The tune shift effect can be also correlated to what happens in the case without COD correction:

Discussion

The vertical integer resonance Q y = 4 has been approached dynamically: the coupled effect of space charge and closed orbit distortion (COD) on beam losses has been observed and reproduced with simulations. This case has exhibited both rms and COD blow-up during the procedure. Without the COD correction the simulation results have been excellent, showing high sensitivity to the COD induced by the realistic machine errors.

On the other hand, with the COD correction, the direct space charge simulation model did not fully describe the measurements. The PTC-Orbit model including the boundaries for the indir-ect space charge computation has been also adopted, as the beam became very large during the blow-up induced by the integer resonance. Moreover, an improvement of the model has been reached by a simulated equivalent chamber calibration, that has been performed to retrieve an optimal equivalent distance in the vertical plane. The calibration has shown good results for the case with COD correction. However, in the case without COD correction, the presence of a coherent tune shift, caused by the indirect space charge component, induced a deviation of the closed orbit from the beginning, with respect to the measured one. This had the effect of anticipating the losses for smaller chamber sizes, causing a disagreement. A re-matching of the COD, compensating the indirect space charge induced variation, may improve the results.

The coupling resonance 5.7.1 Measurements

A transverse emittances sharing has been observed in operation approaching the Q x -Q y = 0 line. This phenomenon could be generated by linear coupling between the transverse planes, excited by tilts of the magnets (mainly the main quadrupoles), tilted space charge fields when the Twiss parameters α x = 0 and/or α y = 0 in the ring ( [START_REF] Franchetti | Space Charge in Circular Machines[END_REF], [START_REF] Franchetti | Collective emittance exchange with linear space charge forces and linear coupling[END_REF]), and/or by the 4 th order Montague space charge resonance 2Q x -2Q y = 0 [START_REF]Simple theory of emittance sharing and exchange due to linear betatron coupling[END_REF].

In order to evaluate the single particle linear coupling strength, the "closest tune" approach [START_REF] Minty | Measurement and control of charged particle beams, ser. Particle acceleration and detection[END_REF] has been followed: programming a tunes crossing at low intensity, the method evaluates the minimum distance for which the transverse planes are not coupled; the larger is the distance, the bigger is the coupling effect. Figure 5.53 shows the measured tunes evolution where the tunes were programmed to cross each other: close to the crossing the tunes and modes cannot be associated any more with the horizontal and vertical planes [START_REF] Carli | Emittance exchange by crossing a coupling resonance[END_REF]. In this case the measured point at 520 ms showed the same vertical and horizontal tune. The minimum distance between the two tunes is then evaluated from the non-linear fits of the remaining measurement points (grey dashed lines) and it is ∆Q min ≤ 0.008. This value is an indication of the resonance stop-band extension. To study the coupling resonance at 160 MeV a set of measurements has been performed setting the working point to (4.18, 4.23), above the resonance line. Again, the choice to be far enough from the resonance stop-band has been done to explore the resonance effects in correlation with the space charge tune spread. The longitudinal settings are the ones for long bunches with V h1 =8 kV and V h2 = 4 kV.

The wirescanner measurements, in Fig. 5.54 showed the horizontal/vertical rms emittance sharing, typical of the interaction of the footpirnt with the diagonal line. The skew quadrupolar correctors that are generally used to compensate the linear coupling were ON, but putting them OFF did not show important effects. Table B.1 shows the initial beam parameters:

Table 5.10: The coupling resonance: measured initial parameters.

Initial beam parameters Coupling resonance

Bunch population [10

Simulations

The effects of the coupling, caused mainly by the space charge itself for the LHC 25ns type beam, have been reproduced by the simulations, performed for the corresponding lattice tunes (Q x , Q y ) = (4.18, 4.23). The measured and simulated rms emittance evolution for this case is presented in Fig. 5.54 assuming an optics lattice without errors. Different sets of the random tilts of the PSB quadrupole magnets (up to 1 σ tilt = 4.28 × 10 -5 rad) have been also used but did not change significantly the simulation results. The emittance exchange in the transverse planes has been observed during the time period. Figure 5.55 shows the tune (magenta dot)

with the relative spread (from PTC-Orbit simulation) caused by the space charge.

Discussion

The coupling line represents a difference resonance which is always present in the machine (see the tune scans in Fig. 5.3). The line can be excited by tilts of the magnets, which are always present in a real machine (even if small), and also by space charge itself.

The emittance sharing is caused by an energy exchange between the two planes when they are correlated, i.e. coupled.

The emittance exchange has been simulated in an error-less lattice and also with random tilts of the main quadrupoles. In all the cases, an exchange has been observed in the range of the measurements. The random tilts did not give a significant contribution for the emittance sharing in the simulation.

Therefore space charge appeared to excite the resonance, as it is connected to it through the linear space charge "self-skew" fields that arise when the beam tilts during its tracking and/or through the higher order non-linear interaction with the Montague resonance. Further studies are required to understand which resonance order is the main responsible of the emittance exchange.

The coupling line is a very important source of balancing for the emittances and it will be discussed again during the predictions for the new Linac4 injection, in Chapter 7.

Chapter 6

Longitudinal studies for the Linac4 injection

The future train of Linac4 bunches, injected at every turn in the PSB, will have a rather uniform profile in phase. This may lead to important longitudinal space charge effects at the edges of the bunch, as they depend on the derivative of the line density [START_REF] Wang | Longitudinal space charge impedance[END_REF].

Below transition, as in the PSB, the effect of the longitudinal space charge force is defocusing, i.e. the bunch length increases: this effect gets very important, for example, for very long bunches which approach the unstable region close to the outer separatrix, with consequent risk of longitudinal losses for "bunch leakage" over the effective bucket, i.e. the one including the space charge effect. This Chapter aims at fixing the longitudinal beam characteristics for the future injection scenarios. Section 6.1 shows an introduction to the longitudinal space charge issue, focusing on a simplified case of a short parabolic bunch injected in a single harmonic bucket without acceleration.

Afterwards, a benchmark between PyOrbit and Blond on the longitudinal space charge calculations is proposed, together with a comparison with analytical formulas.

Relying on the benchmark results, PyOrbit has then been used to optimize the longitudinal settings of the realistic future multi-turn injection for the LHC beams in double RF, including longitudinal space charge effects (see Section 6.2). The optimization work has required different iterations in order to optimize the energy spread and the chopping factor, i.e. the percentage of the beam which is injected at each turn, which determines the number of injection turns for a given intensity. A large longitudinal emittance and bunch length together with a longitudinally "matched" profile after 10 ms of tracking have been pursued. This is done in order to relax the peak line density (and the transverse space charge), while staying fairly far from the outer separatrix of the RF bucket.

Longitudinal space charge benchmark between PyOrbit and Blond

To evaluate longitudinal space charge contributions, a benchmarking has been performed between the PyOrbit and BlonD [START_REF]BlonD[END_REF] simulation programs. The choice of using PyOrbit for pure longitudinal studies, instead of PTC-Orbit, goes in the direction of using the first as baseline for future full 6D tracking including space charge effects.

For a beam current I = eM N f 0 (M = number of bunches, N = number of particles per bunch, f 0 = revolution frequency), the voltage induced by the longitudinal space charge is equal to:

V s. c. = dI dφ |Z s. c. | (6.1)
The longitudinal space charge field modifies the RF voltage in Eq. (1.26), adding the V s. c. component (6.1). The longitudinal imaginary space charge impedance Z s. c. , by definition, is equal to the voltage drop per revolution in a unit beam current [START_REF] Lee | Accelerator physics[END_REF] due to the longitudinal space charge effect. For round uniform beams in circular chambers, this longitudinal impedance is defined as [START_REF] Wang | Longitudinal space charge impedance[END_REF]:

Z s. c. n = -j Z 0 g 2βγ 2 = -j Z 0 2βγ 2 1 + 2 log b a (6.2)
where n is the harmonics number, j is the imaginary unit, Z 0 = µ 0 c = 4π × 10 -7 c = 377 Ω is the impedance in free space, a is the beam radius and b is the machine chamber radius.

Considering the PSB at 160 MeV, assuming a = 2σ = 11 mm (σ ≈ 5.5 mm for the LHC beams) and b = 30 mm (approximately the lowest half-height of all the chambers), Z s. c. is -j795.8 Ω. This value has been used in the following simulations. Successive and more accurate analysis, through numerical codes, taking into account the real geometrical variation of the vacuum chambers (the PSB has not round chambers all along the machine), have shown that this value can be better approximated with -j633 Ω [START_REF] Quartullo | Longitudinal space charge simulations with blond at injection in the CERN PS Booster[END_REF].

The simple case of a single harmonic bucket with no acceleration and a parabolic bunch has been analyzed. This kind of bunch, being quadratic, has linear derivative of the line density, thus linear space charge forces along the bunch. In this case, the shift in synchrotron frequency f s , induced by the longitudinal space charge, can be modeled with the following analytical expression [71]:

f 2 s = f 2 s0 1 - 3I π 2 hM V cosφ s 2πR l 3 Z s. c. n (6.3)
where f s0 is the synchrotron frequency in absence of self-forces, φ s is the synchrotron phase angle, l is the total bunch length, 2πR is the ring circumference. Below transition, cosφ s > 0, thus the longitudinal space charge induces a synchrotron frequency reduction.

Figure 6.1 shows the relation between the synchrotron frequency and the intensity for some chosen initial conditions, considering l = l 0 , where l 0 is the initial bunch length. Over a certain intensity limit (from ∼10 12 p) there is not analytical solution of Eq. ( 6.3) any longer.

Thus, the detuning must be solved through numerical simulations. The synchrotron frequency decrease vs. intensity [START_REF] Forte | Longitudinal injection studies for the PSB at 160 MeV[END_REF], following the formula (6.3) [START_REF] Hansen | Effects of Space Charge and Reactive Wall Impedance on Bunched Beams[END_REF].

Image courtesy of D. Quartullo [START_REF] Forte | Longitudinal injection studies for the PSB at 160 MeV[END_REF].

Moreover, the bunch suffers a lengthening due to the self-forces, which is related to the phase oscillation frequency through the relation [START_REF] Hansen | Effects of Space Charge and Reactive Wall Impedance on Bunched Beams[END_REF]:

l l 0 = f s0 f s (6.4)
For the simulations, a short parabolic bunch of 150 ns (0.93 rad) has been chosen to stay in the small amplitudes approximation. Figure 6.2 shows the simulated space charge kick with different binnings of the ring current: this produces a dephasing already from the first turn of tracking, thus a synchrotron frequency reduction. The trajectories along the full machine length are represented (in black) by test particles, i.e. special macro-particles which feel the s. c. field but do not actively contribute to it. 256 longitudinal bins along the machine length have been generally sufficient for the longitudinal space charge studies in this Chapter, both for the parabolic and the realistic injection train case (see Section 6.2). A very small number of longitudinal bins may cause an underestimation of the space charge effects, as it would smooth the derivative of the line density, filtering out high frequency components. On the other side, a very large number of bins could allow to resolve high frequency components, but, as usual, would also enhance numerical noise problems if the number of macro-particles is not contemporary increased [START_REF] Forte | Longitudinal injection studies for the PSB at 160 MeV[END_REF]. The bunch and bucket distortion effect, induced by the longitudinal space charge, is visible in Fig. 6.3. PyOrbit simulations are on the left, while the correspondent BlonD simulations on the right. The trackings start from a short 150 ns (0.93 rad) parabolic bunch, matched without space charge and recognizable from the zero intensity trajectories in synchrotron amplitude colour code at top-left. By increasing the intensity, the bunch and the bucket trajectories are affected by the longitudinal space charge field which distorts their shape. Test particles, placed along the machine length, have been used to put in evidence the bucket trajectories inside and outside the bunch. The simulations, performed for three different intensities, show that, at 2.95×10 12 p (bottom), the particle trajectories are completely distorted but they are qualitatively similar for both codes. show similar results in de-tuning and bunch lengthening even at high intensity, when the solution is purely numerical. The results show good agreement with the analytical estimates of Eq. 6.3 in its range of validity (horizontal black lines), i. e. until the bunch is not significantly distorted (up to 2.95×10 10 p). p; E -2.95×10 12 p. The initial bunch length is indicated by a vertical grey line and the synchrotron frequency by the horizontal black line (obtained by the analytical formula of Eq. 6.3). BlonD simulations courtesy of D. Quartullo [START_REF] Forte | Longitudinal injection studies for the PSB at 160 MeV[END_REF].

Max f [rad] Max f [rad] Max f [rad] Max f [rad]

Longitudinal optimization for the future LHC beams

After the benchmark, PyOrbit has been used to predict the longitudinal space charge effects on the future Linac4 beams. The Linac4 will give the opportunity to tailor the longitudinal beam profiles in order to minimize the space charge effects in terms of losses and longitudinal/transverse emittances. The PSB has to produce large variety of beams. For the future standard HL-LHC beams, which will be produced injecting few tens of turns [7], it is important to minimize the number of foil hits and blow-up due to the scattering at the screen. The main concern of the longitudinal injection scheme, keeping constant the central injection energy, is the inhomogeneities and beating of the bunch shape, leading to a dense core and less populated tails [START_REF] Carli | Active Longitudinal Painting for The H-Charge Exchange Injection of The Linac4 Beam Into The PS Booster[END_REF].

The future magnetic cycle will start at 160 MeV, with the same acceleration rate as of today, Ḃρ=10 T m s in the first 10 ms. The simulations which include the acceleration, from now, are performed in this time window, where the highest part of the total emittance blow-up induced by space charge is supposed to happen.

Several simulations without space charge have been run through the ESME [73] and PyOrbit [START_REF]PyOrbit[END_REF], assuming Linac4 realistic bunches to optimize the bunch length and the energy spread ∆E of the injected beams. In operation, these variations will be performed by changing the chopping factor and by modifying the Linac4 debuncher settings, respectively [START_REF] Arnaudon | Linac4 technical design report[END_REF]. imizing the bunch length for the three cases. Figure 6.6 shows the results of the trackings for the 113 keV and 336 keV options. From this analysis, at a first approach, the solution at 336 keV (616 ns initial bunch length) is preferable, as it minimizes the peak line density due to the rotation in the longitudinal phase space of the mismatched beam, with respect to the 113 keV (680 ns initial bunch length) case. The bunch rotation after 143 turns, where the line density has a peak, is shown in Figs. 6.7 and 6.8. On the other extreme, the 592 keV rms case, the energy spread is too large and would exceed the acceptance for a realistic bunch length of ∼600 ns. In this case, to avoid beam leaking out of the bucket, the bunch length should be much smaller, but this leads to a reduction of the chopping factor and an increase of the number of turns in the multi-turn injection. For these reasons, this solution has been discarded.

As a second step of the optimization, Table 6.1 shows the results of the tracking at 336 keV rms energy spread for different chopping factors. As proposed already by C. Carli and R.

Garoby ( [START_REF] Carli | Active Longitudinal Painting for The H-Charge Exchange Injection of The Linac4 Beam Into The PS Booster[END_REF], [START_REF] Carli | [END_REF]), it is desirable to stay below 80% of the total acceptance, which in the PSB is ∼ 1.7 eVs for the proposed RF settings. This is wanted in order to be distant from the separatrix, which can be deformed by the longitudinal space charge.

Two bunch length evaluation methods have been considered: one is called "min-max", being the difference between the particles position at the extrema of the bunch. The second is a "foot-tangent" method: this approach aims to emulate the method that is used by S. Hancock for the tomoscope in control room ( [START_REF] Hancock | A pedestrian guide to online phase space tomography in the CERN complex[END_REF], [START_REF]Hancock, steven[END_REF]), but following a slightly different algorithm.

In control room a linear interpolation of few points around the 15% of the maximum current level is calculated to approximate the tangent lines and then intersect them with the 0 current level, in order to obtain the total bunch length. Instead, the foot-tangent algorithm, which is here presented, chooses as total bunch length the intersections with the zero current axis of the maximum and minimum derivatives of the filtered current profile, which is obtained from the raw profile through a low-pass moving average filter, as shown in Fig. 6.9.

-500 0 500 0 0.5

Raw profile Filtered profile

Figure 6.9: The foot-tangent principle: the raw (blue) and the filtered (green) current profiles together with the maximum and minimum derivatives (dashed red lines), which intersect on the zero-current axis and define the minimum and maximum extensions (black asterisks) of the bunch profile, i.e. the total bunch length. PyOrbit simulations for the 47% chopping factor case (403 keV rms).

The "matched area" is defined as the area of the iso-Hamiltonian contour which passes through the minimum and the maximum of the bunch length: it changes between the two bunch length evaluations.

A solution between 47% and 63% chopping factor could be suitable. The first, leading to an initial bunch length of 474 ns, implies that 29 turns of injection are needed to accumulate the required intensity for a standard HL-LHC beam, starting from 40 mA un-chopped from the Linac4.

The phase spaces after 10 ms for the 47% and 63% bunch chopping factors at 336 keV rms are plotted in Fig. 6.10: it is clear that, in the first case, the bunch is well matched to the longitudinal phase space but the longitudinal emittance (and the bunch length) is rather small. In the other case, at 63%, the longitudinal emittance is much larger but the bunch is not perfectly matched to the phase space yet: this is understandable from the large (30%) difference in matched area between the min-max and the foot-tangent methods for this case (see Tab. 6.1). Fixed the initial bunch length, e.g. 47%, aiming to increase the longitudinal emittance and the final bunch length, and to obtain a better matching already in the first 10 ms of tracking, a second iteration in the energy spread tuning can be done without overcoming the limits of 700 ns and 1.3 eVs for max 80% bucket filling.

As shown in Fig. 6.11, going from 403 keV rms up, the peak line density saturates toward lower values (left), while the "min-max" total bunch length increases (right). On the other hand, decreasing the initial energy spread, a big overshoot in the peak line density quickly arises, similar to the one in Fig. 6.6, and the bunch length decreases. Looking at the peak line density, going above 403 keV, the sensitivity to a higher energy spread is smaller, while the risk of getting too close to the outer separatrix increases. Due to the closeness to the outer separatrix, increasing too much the energy spread is detrimental because it generates automatically longer bunches, even for short trains injected (see Fig. 6.11 right). A higher margin for the chopping factor is, instead, desired. For this reason, 403 keV rms has been chosen as a reasonable baseline solution. After this analysis, an initial tuning at 47% chopping factor and 403 keV rms, would generate a peak of ∼620 ns "min-max" bunch length and ∼1.2 eVs matched area, after 10 ms. The "min-max" bunch length computation is characterized by large variations especially during the initial filamentation time, as one can see in Fig. 6.11 right. In order to smooth these oscillations, which are artificial, the "foot-tangent" algorithm has been used. Figure 6.12 shows the beating reduction for the 47% chopping factor case through the "foot-tangent" method, with respect to the "min-max" method. The filtering process helps to eliminate the large beating in the "min-max" computation of the total bunch length. Moreover, since it filters out particles sitting at the longitudinal edges of the bunch, whose amount is usually negligible compared with the rest of the bunch, the total bunch length is also reduced by a ∼10% with respect to the "min-max" one. "Min-max" algorithm Foot-tangent algorithm Figure 6.12: Total bunch length computations with the "min-max" method and the foot-tangent algorithm. PyOrbit simulations for the 47% chopping factor case (without s. c.) and 403 keV rms.

In order to profit of a longer bunch, thus less turns of injection for a given intensity, a solution at 61% chopping factor and 403 keV rms has been analyzed. Figure 6.13 shows the normalized line density evolution during the tracking with PyOrbit, with and without s. c.. The intensity (I=3.42×10 12 p) has been taken all in a single shot, even if, in reality, it will be injected over 23 turns. This approach is justified by the fact that the synchrotron period is much larger than the number of injection turns, thus the bunch is not evolving significantly in this time frame. A peak in line density is always foreseen during the initial filamentation time, which lasts ~3 ms, but the value along the tracking is in the order of 10% below the correspondent one with 47% chopping factor of Fig. 6.11 left. Figure 6.14 shows the tracking results after 10000 turns (~10 ms) of two beams captured with and without longitudinal space charge: on the top plots, the solution at 47% shows an evident bunch lengthening due to space charge, that brings the bunch length from 550 ns to 570 ns, with matched area going from 0.8 to 1 eVs. The final choice of an injected train of 609 ns (61% chopping factor) at 403 keV rms produces a total bunch length of 602 ns after the first 10 ms of acceleration, leading to a computed matched area of 1.1 eVs, δ rms =1.35×10 -3 and no losses during the tracking.

The 61% chopping factor solution produces higher initial longitudinal emittance. This mitigates the effects of bunch lengthening and noise due to the longitudinal space charge (see Fig. 6.14, bottom right), because concentrates less particles inside the inner separatrix and at the edges of the bunch, thus reducing the derivative of the line density. However, simulations including s. c. show already a dangerous approach of particles to the outer separatrix. Table 6.2 shows the final (foot-tangent) bunch lengths and matched areas to be expected without and with the longitudinal space charge. One could note that for the highest chopping factor case, the computed total bunch length is slightly lower in the case with space charge: this is understandable from Fig. 6.14 bottom-right and is due to the particular turn that has been considered in the analysis. The rms bunch length column has been added to put in evidence the statistical bunch lengthening caused by space charge.

For the purpose of the optimization, the 61% chopping factor has been considered as a reasonable upper limit to avoid further expansion of particles towards the outer separatrix. However, during the commissioning phase with Linac4, a fine tuning of the energy spread and chopping factor will be performed, reasonably in a range of 5-10%, in order to obtain as large as possible longitudinal emittance (i.e. matched area) and mitigate transverse space charge, while avoiding longitudinal losses. In addition, the future introduction of a new Finemet® based RF system in the 4 rings of the PSB may allow more power in the RF cavities so possibly larger acceptances from injection, thus extra margin to reduce the transverse space charge tune spread both in the PSB and in the PS. In the next Chapter, both chopping factor solutions (47% and 61%) will be used as a knob for the machine optimization to evaluate the influence of bunch length and longitudinal emittance on the beam brightness. Machine and beam optimization for the Linac4 injection

In this last chapter, after the benchmark of PTC-Orbit, the code has been used to make a full 6D (transverse and longitudinal) tracking to predict performances for the upgrade scenario with the Linac4 multi-turn injection at 160 MeV. Simulations have been performed starting from an emittance value of 0.4 mm•mrad in both planes, as expected from the Linac4.

An important figure of merit is the brightness: this parameter is the ratio intensity over the half-sum of the transverse emittances (Eq. 1.14). The dependence of the emittance with the intensity has been measured in the past at extraction and is reasonably linear for the PSB [START_REF] Mikulec | Performance reach of LHC beams[END_REF].

The dashed grey line in Fig. 7.1 is the measured LHC brightness curve scaled by a factor 2 with respect to the achieved grey dots, in order to indicate a future double brightness, thanks to the increase of injection energy. The brightness upper limits are determined by the LIU project specifications [7] and are shown in star markers. The green star marker represents the expected limit for the LHC 25 ns beam, which is supposed to be the brightest one in the future for the collider. This limit is lower than the grey line because it takes into account a 5% budget in emittance blow-up and losses, which may occur from injection to extraction during the machine cycle, as a margin foreseen by LIU. In Section 7.1, the simulated brightness curves are presented in comparison with the LIU requirements up to the HL-LHC intensity, 3.42×10 12 p. By using two transverse emittance painting options, a parametrization has been performed for two different working points and the two possible chopping factors from the previous Chapter (47% and 61%), at the optimal energy spread of 403 keV rms from the Linac4.

The influence of the chromatic correction has been explored in Section 7.2. In Section 7.3, an injection offset matrix has been implemented to show the possible transverse emittance combinations which can be reached in presence of space charge for the future standard HL-LHC intensity. From this analysis, the role of the coupling, in combination with the integer resonances, has been discovered as fundamental for the final emittance values. The averaged tunes methodology, introduced in Chapter 4, has been essential to study the phenomenon.

Moreover "fixed lines", i.e. multidimensional attractors in the 4D Poincaré maps, whose theory has been recently developed for single particle motion, are shown in Section 7.4 for the first time also in presence of space charge around the coupling line.

The multi-turn injection

The PSB intensity, which is required for the different users, is obtained through an injection which lasts several turns (multi-turn). Depending on the current injected from the Linac4, foreseen at 40 mA unchopped, it is possible to inject and tailor emittances and intensities with higher flexibility with respect to the present "betatron-stacking" technique [START_REF] Scholz | Simulations of the H-charge exchange injection into the CERN proton synchrotron booster with Linac4[END_REF].

An initial simulation approach of the future brightness curves has already been proposed by E. Benedetto et al. [START_REF] Benedetto | CERN PS Booster Upgrade and LHC Beams Emittance[END_REF] in simplified hypothesis, i.e. without multi-turn injection. The simulations presented here are based on the same lattice model, which includes the compensation of the beta beating pertubation induced by the chicane magnets and also of the feed-down (i.e. quadrupolar) effect of the sextupolar fields induced by the Inconel® coating of the vacuum chamber [START_REF] Benedetto | Detailed Magnetic Model Simulations of the H-Injection Chicane Magnets for the CERN PS Booster Upgrade, including Eddy Currents, and Influence on Beam Dynamics[END_REF]. In addition to the work done in the past [START_REF] Benedetto | CERN PS Booster Upgrade and LHC Beams Emittance[END_REF], the realistic multi-turn injection is here modeled and the initial longitudinal distribution is the outcome of the optimization presented in Chapter 6.

Considered as final baseline a chopping factor of 61% (and ∆E=403 keV rms), the standard HL-LHC intensity (3.42×10 12 p [7]) can be achieved through 23 turns. In this process, which lasts about 23 µs at 160 MeV, the fast KSW magnets will "paint" the beam on the foil, as explained in Chapter 2.

Two transverse injection schemes, called, respectively, "on-axis" and "transverse painting" can be implemented (see Fig. 7.2). The first option considers injecting the beam exactly on the machine orbit, while the second one envisages a fixed offset in the vertical plane and a modulation of the KSWs in the horizontal plane [START_REF] Abelleira | KSW waveforms for PSB users with H-injection[END_REF]. The beam is horizontally injected always in the same point of the foil, thus with a constant offset of -35 mm in addition to the -45.9 mm already imposed by the BSWs, which decay much slower, in 5 ms (see Chapter 2). In the vertical plane, instead, an injection offset of 3 mm from the closed orbit is applied on the incoming beam in case of transverse painting, while no offset is foreseen for the "on-axis" option. After the 23 turns have taken place, the currents in the KSW magnets decay rapidly to make the beam leave the foil as soon as possible and avoid further transverse blow-up due to the interaction with it. The modulation of the KSW waveforms allows a controlled mismatch for initial emittance tailoring during the initial 23 turns [START_REF] Bracco | Studies on Transverse Painting for H-Injection into the PSB[END_REF].

Another possibility to obtain an initial emittance control is keeping constant the KSW strengths, like in the "on-axis" option, while injecting the beam with an horizontal and vertical offsets with respect to the closed orbit. This option will be treated more in detail in the further paragraphs with a final parametrization.

x offset KSW [mm] transverse painting The KSW offsets decay for the "on-axis" (solid blue line) and "transverse painting" (dashed red line) options. The beam is injected at -35 mm, with respect to the -46 mm imposed by the BSWs, over the first 23 turns to gather I=3.42×10 12 p at 61% chopping factor.

"On-axis" injection: simulation results

Simulations over the first 10 000 turns (~10 ms) have been performed for two different tunes

(Q x ,Q y )= (4.28, 4.55), nominal, and (Q x ,Q y )=(4.43, 4.60)
. On top of this, a second parametrization has been performed through the chopping factor. An injection of 29 turns (47% chopping factor) has been simulated together with the 23 turns baseline (61% chopping factor).

Figure 7.3 shows the results of the simulations in terms of emittance reached after 10 ms, as a function of the initial intensity, for the "on-axis" scheme. Such scheme implies an emittance blow-up which is completely space charge dominated.

A larger longitudinal emittance, i.e. the one generated from 61% chopping factor (black curve), improves the beam brightness with respect to the lower longitudinal emittance case of the 47% chopping factor (in red). The increase of the working point to (4.43, 4.60) guarantees better results, as expected getting farther from the integer lines.

"Transverse painting" injection: simulation results

Since the beam will naturally blow-up due to space charge for the "on-axis" solution, it is possible to tailor the starting emittance by applying a "transverse painting", in order to obtain the less beam deformation possible due to space charge itself. This scheme provides the tailoring of the emittances through an offset mismatch between the beam, injected always at the same location, and the closed orbit as it is defined by the KSW waveforms. Using the modulation proposed in Figure 7.2 (dashed red curve) and a vertical offset of 3 mm, one obtains a final emittance which is ∼1.5 mm•mrad, 25% higher than the on-axis case. In particular, for the lower working point (4.28, 4.55), the simulation results give no margin with respect to the LHC 25 ns limit, as shown in Fig. 7.4.

As one can see in Fig. 7.5, the transverse painting solution does not modify much the transverse profiles with respect to the ones without space charge. The particles tune spread at injection is very large. The on-axis situation gives, after 10 ms, a maximum space charge tune shift of (-0.59, -0.73) due to a final emittance of ∼1.2 mm•mrad, as shown in Fig. 7.6. The transverse painting solution proposed, instead, shows a reduced maximum tune shift of (-0.50, -0.59), related to a larger final emittance of ∼1.5 mm•mrad. A decrease of the vertical offset could lead to lower average emittances for the transverse painting scheme. However, in order to establish a trade-off between these two schemes, which are in the project baseline, a new injection offset scheme including a parametric study is going to be discussed in the next paragraphs, from Section 7.3.

Working point optimization: chromaticity correction

The chromaticity correction, proven to be effective to change blow-up conditions, as discussed in the previous Chapters and in [START_REF] Forte | Chromaticity Effects For Space Charge Dominated Beams In The CERN PS Booster[END_REF], has not shown a dramatic improvement of the simulated blow-up at injection with Linac4 induced by the interaction between the tune spread and the integer resonance lines. Figure 7.7 shows the results of the simplified simulations, as discussed by E. B. in [START_REF] Forte | Chromaticity Effects For Space Charge Dominated Beams In The CERN PS Booster[END_REF].

Simulations at the injection working point of (4.28, 4.55), I=1.755×10 12 p have been performed. Two settings of chromaticities, (ξ x , ξ y )=(-0.8, -1.6) -natural -and (ξ x , ξ y )=(-0.15, -2.8) have been chosen. The blow-up in the horizontal plane is reduced by a few %, as expected, due to the correction of the horizontal chromaticity. However, the vertical emittance is increasing by a similar amount, due to the fact that chromaticity, at present, is controlled by only one family of sextupoles, which causes the vertical chromatic spread to become larger (see Section 4. 3). An intermediate chromatic working point might be more effective. It is stressed that the chromatic spread is quite smaller than the space charge tune spread, as shown in Tab. 5.1, thus the related gain in brightness is not expected to be dramatic. Moreover, the presence of only one family of sextupoles for chromaticity correction allows to lower the chromaticity in one plane, while increasing it in the other plane. A change in injection tunes, as previously shown, allows a better improvement in the expected brightness.

Parametric analysis of the injection process

A simulation scan, consisting of simulations with 23 turns of injection (to achieve an intensity of 3.42×10 12 p. with 61% chopping factor) and bare tunes at (Q x ,Q y )=(4.43, 4.6), has been performed, without and with space charge. For all these cases the KSW function has been kept constant during the first 23 turns of the injection process, as shown by the blue line of Fig. 7.2, before decaying to remove the beam from the foil. This process defined an initial fixed closed orbit position at (x,y)=(-80.9, 0) mm. Positive offsets in the horizontal and vertical directions, in steps of 0.5 mm up to 5 mm with respect to the closed orbit position, have been considered in the analysis.

Without space charge

The results in terms of final emittances after 10 000 turns without space charge are shown in Fig. 7.8. These plots show how, increasing the mismatch amplitude, very large emittances can be achieved in both planes in a decoupled way, and also that round beams (i.e. x = y ) can be obtained, moving along the green path (right).

-80 -78 -76 0 The profiles after injection (at 100 turns), without space charge, reflect the mismatch, especially in the vertical plane, where "double-horn" shapes arise from large vertical offset conditions. Figure 7.9 shows the profiles for three different transverse mismatches in (x, y). In blue the simulated profiles, in red the Gaussian fit curve, in gray the residuals between the two. Injecting at (x, y)=(-80.4, 5), two peaks are evident in the vertical plane because of the large vertical offset and the programmed tunes close to the vertical half-integer tune (top). Inverting to a big horizontal offset, i.e. injecting at (x, y)=(-75.9, 0), centre, the horizontal profile is flattened with respect to the Gaussian fit, while in the vertical plane the shape is Gaussian. At bottom, injecting at (x, y)=(-80.4, 0), with almost no offset, the shapes are Gaussian in both planes.

With space charge

The scenario changes in presence of space charge. The results of the scan in terms of emittances half-sum and ratio, considering an intensity I=3.421×10 12 p, present a different pattern, as shown in Fig. 7.11. As one can see on the left, for a wide range of initial mismatches in both directions (up to 3.5 mm in horizontal and 3 mm in vertical), the beam blows up and reaches a final emittance (half-sum) around 1.2 mm•mrad (yellow colour code). Only for higher offsets, the half-sum starts to increase until it exceeds the limit the HL-LHC standard production of 1.7 mm•mrad (from the orange to the red colour codes). Again, Fig. 7.11 right, shows that round beams are obtainable in this area for a wider offsets region with respect to the case without space charge. Moreover, the presence of space charge prevents the formation of the double horn and keeps the beams more Gaussian-like, with respect to the situation without space charge, as shown in Fig. 7.12 and 7.13. The evolution of the half-sum of the rms emittances is shown in Fig. 7.14, starting from different initial values corresponding to the different offsets. In red, the line at 1.7 mm•mrad corresponds to the upper limit for the HL-LHC Standard beam emittances [7]. This plot, again, confirms that a large variety of initial emittances and initial mismatches allows to reach the final desired performances: the minimum (half-sum) emittance value of 1.2 mm•mrad gives a 30% of margin below the design limits.

Due to the persistent interaction with the integer resonances, a perfect steady state condition of the normalized transverse emittances is not yet obtained in this time window. However the acceleration rate, so the β 2 γ 3 factor in the space charge tune shift formula (Eq. 1.67), is foreseen to be increased in the next 10 ms of at least 30% [START_REF] Blas | Automatic magnetic cycle editor for the CERN PSB[END_REF], accelerating also the space charge tune spread reduction process. This means that the slow persistent blow-up is going to be quickly suppressed. The corresponding maximum tune shifts, computed through PTC-Orbit (see Fig. 1.13 in Chapter 1) after 10 ms, are shown in Fig. 7.15 -right. One can see that, injecting with very small offsets in horizontal and vertical, the maximum tune shift is in the order of (∆Q x , ∆Q y ) = (-0.6,-0.7), reflecting the one of "on-axis" injection, which has been previously discussed. Larger mismatches generate smaller tune shifts, clearly depending on the emittances and their ratio.

Figure 7.15 also shows the interesting feature that the maximum tune shifts never overcome the coupling line. For this reason, a deeper investigation has been performed to better understand how the coupling influences the tune spread and, therefore, the emittances.

An extreme case, i.e. a simulation with very large horizontal 7 mm offset (and, thus, large emittance) and no vertical offset, thus the smallest possible initial vertical emittance, has also been performed. In this case, if there was no coupling, one would expect the vertical spread to be much larger than the horizontal one, thus the maximum tune shift to be below the diagonal. This simulation has been performed with initial conditions (x, y)=(-73.9, 0) and is represented with a square marker in the plots of Fig. 7.15. The results of the simulations show that also this point lays on the coupling. 7.4 Single particle analysis and fixed lines with space charge and coupling

Single particle analysis and coupling

The method of the averaged tune spread, discussed in Chapter 4, has been very useful to study this extreme case with injection at (x, y)=(-73.9, 0). As shown in Fig. 7.17, one can see that the right part of the averaged tune spread lays on the coupling line and never overcomes the coupling itself. The 45°projection clearly shows the accumulation of particles on the diagonal.

The same analysis has been performed for the case of injection at (x, y)=(-80.4, 0), very close to the closed orbit, thus with the largest footprint. As shown in Fig. 7.18 for this case as well, the space charge necktie leans on the coupling line, but it also interacts with the integer resonances. The lattice that has been used for the simulations has no evident sources of coupling (no skew quadrupoles nor tilt of the magnets), nevertheless the beam through the space charge itself can generate a driving term for the linear coupling resonance when the beam tilts in the machine, i.e. when α x = 0 and α y = 0 [START_REF] Franchetti | Space Charge in Circular Machines[END_REF], or via the Montague resonance, which is driven by high order (octupolar) components of space charge too (see also Section 5.7).

In real machines there are always sources of coupling. Tiny tilts of the magnets generate skew components, so it has to be expected that coupling driving terms will always play a role in the beam dynamics.

Fixed lines with space charge

A further analysis can be performed by isolating the particles sitting on the diagonal for the two previous injections at (-73.9, 0) -small tune spread -and at (-80.4, 0) -large tune spread. The particles selected on the average tunes around the coupling resonance for the case with smaller tune spread injecting at (x, y)=(-73.9, 0), left, and for the larger tune spread at (x,y)=(-80.4, 0), right. In both the plots, there are no particles around the inner separatrix because, in this region, the algorithm for the computation of the synchrotron period T synch fails.

In the case of coupled resonance an analysis of the motion of a given particle in the 6D phase space, as described in Chapter 4, has to be performed in higher order hyperplanes.

The theory about fixed lines, recently developed by G. Franchetti and F. Schmidt [START_REF] Franchetti | Extending the Nonlinear-Beam-Dynamics Concept of 1D Fixed Points to 2D Fixed Lines[END_REF], shows that particles on coupled resonances perform specific geometrical shapes in 4D Poincaré maps of the state variables (x, x', y, y') trackings.

In this thesis, this concept has been extended for the first time including space charge, and the presence of time-varying forces due to the space charge kick modulation during the synchrotron motion.

The periodic resonance crossing of the coupling line over one synchrotron period, imposed by the time-varying space charge kicks, puts the particles around the resonance, performing exotic trajectories. Four cases are presented: Case 1: Figures 7.20 and 7.21 show the classical behaviour of a particle which covers tunes that, along one synchrotron motion, are far from the coupling and the integer resonance, for which no colour-code polarization nor exotic geometrical shape is recognizable in the 4D maps (3D scatter plot representation plus colour code for the 4 th state variable). One can observe that the motion does not present special trajectories and there is no polarization in the colour code, which looks noisy.

Case 2: For a particle performing its tune modulation around the coupling resonance (see Fig. 7.22), a scattering-trapping mechanism from the resonance makes the particle paint a proper geometrical shape in the 4D Poincaré Section (see Fig. 7.23) and also colour code polarization is visible. The trapping in this case is not optimal (a sort of double circular shape is recognizable) because the space charge de-tuning brings the particle, during some parts of its synchrotron period, quite far from the resonance.

Case 3: For a particle whose tune modulation induced by space charge is very narrow around the coupling line (see Fig. 7.24), the Poincaré maps (see Fig. 7.25) show that the previous double circular shape converges to a circle and also the phase space evolution in time (see Fig. 7.25) presents a very distinguishable geometrical behaviour in both planes. This condition represents a full trapping from the coupling.

Case 4: The last particle presented is selected from the large tune spread case (see Fig. 7.18). This shows the double effect of the vertical integer Q y = 4 and the coupling line, as one can see from the tunes modulation along one synchrotron period (see Fig. 7.26). The particle initially feels a vertical amplitude blow-up induced by the interaction with the vertical integer and, later in the synchrotron period, it starts having amplitude exchange between the two planes: the projection in time of the horizontal trajectories in (x,x') shows an enlargement (see Figure 7.27, bottom-left), while the vertical trajectories in (y, y') initially blow-up and then shrink in time due to the coupling effect (see Figure 7.27, bottom-right).

To put in evidence this effect, Fig. 7.28 shows the (x, x') and (y, y') views of the particle motion in the time variable colour-code. Here one can observe that, at the beginning (blue dots), the particle interacts with the vertical integer resonance (right), feeling an increase of its action. In this phase there is no effect on the horizontal beam size (center).

Later in the cycle (red), due to the tune modulation induced by the space charge forces, the particle is scattered around the coupling line and an exchange process takes place: the horizontal action increases while the vertical one decreases. Through this analysis it has been confirmed that coupling plays a role in the multi-turn injection. The linear coupling resonance is not a concern in terms of losses and brightness reduction for low emittance beams, like the ones for the LHC, considering that the average emittance is preserved. Nevertheless, it could be a concern for the high intensity (and large emittance) beams, like the ones for the ISOLDE facility. Horizontal and vertical phase space over one synchrotron period (bottom). A sort of double circular shape is recognizable on top. This is due to the fact that the particle is not narrowly bounded around the coupling line. Left -phase advance per turn ( colour code dots), injection tune (magenta cross), average tune close to the coupling (grey cross), and the integer and coupling lines (solid black lines). Center -the horizontal phase space. Right -the vertical phase space.

Chapter 8

Conclusions

The CERN LHC Injectors Upgrade (LIU) project aims to improve the performances of the LHC injectors chain, to provide the LHC with beams of unreached brightness (a factor 2 higher than the present one). Main purpose is to reach higher luminosity in the frame of the High Luminosity-LHC (HL-LHC) project. This in order to make the experiments gather 10 times more events at the LHC in the same amount of machine running time.

The PSB is the first synchrotron of the LHC protons injectors chain and has the role to define the highest beam brightness.

Main concern for the PSB is constituted by space charge effects at injection, due to the low energy and high brightness desired. This can lead to beam degradation in terms of unwanted emittance blow-up and losses. The increase of the injection energy to 160 MeV through the new Linac4 and the new H -injection system is wanted to mitigate space charge effects.

This thesis had the objective to evaluate the future performances of the PSB with the new H - injection. As space charge is an important bottle neck, this effect had to be carefully evaluated through a benchmarking between simulations and measurements of the present machine at 160 MeV.

The PTC-Orbit simulation program has been most extensively used in the thesis work for 6D tracking simulations including space charge: it combines the features of the PTC tracking and the calculation of collective effects (space charge in particular) from Orbit.

The numerical code convergence has been set up for beams like the ones for the LHC to fix the 3D grid parameters, number of space charge nodes and macro-particles to minimize numerical artifacts not related to the physics of the phenomenon.

The space charge tune spread and the time-dependent de-tuning of single and subsets of particles have been analyzed in detail. In particular, the possibility to compute the tune spread as the average phase advance over many turns, at least one synchrotron period, has been introduced: this novel approach for space charge has been useful to characterize resonance trapping phenomena.

Moreover, the contribution of the de-tuning due to the chromaticity has been analyzed, as an additive component to the space charge one.

A series of machine development studies, measurements and simulations have been performed on a special cycle on a 160 MeV energy plateau. An extended campaign of tune scans has been performed to identify the most dangerous resonances and to perform a first correction scheme.

An instability, already seen in the past, has been cured through the transverse feedback available in the machine. The nature of this instability is still unclear and has to be studied in the future.

The blow-up and losses induced by the integer resonances Q x = 4 and Q y = 4, the losses with bunch shortening of the vertical half-integer 2Q y = 9, the linear coupling resonance For most of the previous cases, simulations have been performed in order to benchmark PTC-

Q x -Q y =
Orbit. An important input to the simulations has been given by the optics measurements, which have provided a realistic misalignment and quadrupolar field error model.

The machine model, including the realistic errors, has been fundamental to simulate the long term losses (over ~200 ms) induced by the vertical half-integer line 2Q y = 9. The trappingscattering mechanism [START_REF] Franchetti | Modeling of Space Charge Induced Resonance Loss[END_REF] has been identified as responsible for the beam degradation and very good qualitative and quantitative agreement has been achieved in simulations with two different longitudinal profiles.

Additional simulations with random errors have shown that the loss rate scales with the betabeating. This is a confirmation that the beta-beating correction through the normal quadrupoles available in the machine is effective.

The simulations close to the horizontal integer resonances showed an emittance blow-up comparable to the measurements, including the chromaticity effect close to the resonance. Different transverse blow-ups occur in case the chromaticity is changed, similarly to the ones shown by the measurements. The chromaticities variation, coupled in the machine because related to a single sextupoles family, could be helpful as a knob for the future injection process. In this case a second sextupoles family should be installed in the future to have independent corrections in the two planes.

The vertical integer, approached dynamically, has given very good agreement in a case without closed orbit distortion (COD) correction, where the closed orbit and vertical beam size blowups generate losses when approaching the line. Promising results have been obtained in case of corrected COD changing the space charge model to the one including boundaries. A calibration of the simulated chamber size has been performed through the measurements.

A good agreement between measurements and simulations has been obtained also for the coupling line with its typical effect of emittance exchange. Additional investigations are needed to clarify whether this resonance is due to space charge-induced linear coupling or by the 4 th order Montague resonance, also driven by space charge.

The longitudinal space charge effect has been benchmarked through the comparison between PyOrbit, a brand new simulation program derived by PTC-Orbit, BlonD, a purely longitudinal simulation program developed at CERN, and analytical formula. Comparisons in single harmonic and constant energy for a parabolic bunch, where the analytical expression of the synchrotron frequency reduction is well known, have shown good agreement between the two codes in a wide span of intensities and also for pure numerical solutions, where the analytical synchrotron frequency reduction is not defined by the analytical formula.

A longitudinal injection scheme without energy modulation has been chosen for the LHC beams, in order to minimize the interaction with the foil and create an easier scheme to be implemented in operation for the beam commissioning. After an optimization of the chopping factor and the energy spread of the beam coming from the Linac4 to minimize the peak line density, a solution with 609 ns beam injected (61% chopping factor from 40 mA unchopped current from the Linac4) and 403 keV rms bunch trains from the Linac4 has been chosen as optimal one, being clear that a fine tuning up to 10% will be eventually performed around this solution during the commissioning phase. In fact, a small increment of the longitudinal emittance can be a very useful knob to reduce the transverse space charge effect, but exceeding it can be detrimental for possible longitudinal losses induced by longitudinal space charge.

The satisfactory results of the benchmarks have generated confidence in PTC-Orbit, which has then been used for the prediction of the future injections from the Linac4. The results of the simulations showed that the desired double brightness is feasible up to the Standard HL-LHC intensity (I=3.42×10 12 p). The nominal tune has been demonstrated to be at the limit with the LIU requirements. The higher tune, instead, gave better results, because farther from the integer lines that drive the transverse emittances blow-ups. This provided more brightness margin with respect to model uncertainties, in particular in terms of unknown error sources in the machine.

The on-axis injection gave smaller final emittance after the first 10 ms, but this time window was not sufficient to reach a completely steady-state condition of the rms emittances, especially at the HL-LHC intensity. The transverse painting option allowed to tailor a larger emittance since the beginning and obtain more stationary conditions. However the tracking studies of this last option showed a reduced margin with respect to the HL-LHC brightness objectives. A further optimization of the vertical offset may improve this aspect.

A parametric study over a transverse offset matrix and constant KSWs during the injection has been performed without and with space charge at the HL-LHC intensity. Simulations including space charge gave average normalized emittances in the order of 1.2 mm•mrad injecting within a few millimetres margin from the closed orbit. This result provided a final maximum 30% margin in emittance with respect to the HL-LHC target of 1.7 mm•mrad.

Moreover, the particles dilution process, induced by the space charge fields, helped the transverse profiles to stay Gaussian-like for a wide range of initial transverse mismatches.

The maximum space charge tune shifts after 10 ms for the different horizontal and vertical offsets showed that these tunes never overcome the coupling resonance. The maximum tune shift was in the order of (-0.6, -0.7). By injecting with very large horizontal emittances and very small ones in the vertical plane, we obtained that the final average tune spread leaned on the coupling line, even if the model that has been used for the injection studies did not contain sources of coupling between the horizontal and vertical planes, like tilts of the magnets.

This suggested that space charge itself can cause coupling conditions (exciting linear and/or Montague resonances) which induce emittance sharing/exchange.

An analysis of particles sitting around the coupling has shown the presence of fixed lines, i.e. 4D attractors in the transverse Poincaré Sections. The theory of fixed lines has been very recently developed for single particle studies [START_REF] Franchetti | Extending the Nonlinear-Beam-Dynamics Concept of 1D Fixed Points to 2D Fixed Lines[END_REF]. As a novelty in this thesis work, simulations demonstrated the presence of fixed lines also in a space charge dominated regime with bunched non-linear motion and self-consistent 6D space charge simulations. The trapping of the particles on the resonance coupling line has been shown through the averaged tune spread method. This effect is not a problem for the final brightness of the LHC beams, because it preserves the average emittance, but could eventually be an issue for large emittance beams.

Next steps for the machine simulations include the re-definition of the resonance driving terms in the machine to higher order (at least sextupolar). This analysis will improve the machine model toward a non-linear one and make possible the understanding of higher order non-linear phenomena in relation with space charge.

The results for the upgrade scenario will be then verified during the commissioning of the PSB with the Linac4. I would like to thank the Space Charge working group, that I am proud to have been part of since the beginning, for all the discussions and presentations that contributed to make my knowledge more solid. Big thanks to the Machine Operations group for giving me all the support needed in night and day measurements and for the lot of fun during these. My sincere thanks go to the LIU project management, who gave me the "precious" support to conduct this research about such a hot topic in beam physics.

I want to thank my lab-mates, too many to name singularly, whose friendship and support during all these years has been fundamental to make me keep smiling even in the hardest times. I am grateful for having shared with them so many funny (and not-so-funny) moments that I will never forget.

And now, last but not least, my biggest thanks go to Claudia and to my family, especially my mother and my father: he would be so proud of this achievement, I know. They are the love and the sunshine of my life.

The integrals of Eq. (A.7) can be written in the form:

                       x(θ) = a 1 √ 2R β x (θ)exp +i θ 0 R β x (ζ) dζ x(θ) = complex conjugate y(θ) = a 2 √ 2R β y (θ)exp +i θ 0 R β y (ζ) dζ y(θ) = complex conjugate (A.8)
being a 1,2 the complex constants of the transverse motion, β x,y (θ) the betatron functions and the integral the phase advance (see Eq. 1.15).

A.2 The perturbed motion

The Hamiltonian H 1 of Eq. (A.2) can be obtained by subtraction from the total Hamiltonian (A.3)

H 1 = 1 2 - 2R 2 |Bρ|c A θ - 2R |Bρ|c (p x A x + p y A y ) + 2R 2 Φ |Bρ|c + RA x |Bρ|c 2 + RA y |Bρ|c 2 + RΦ |Bρ|c 2 (A.9)
where A θ is now the longitudinal component of the potential vector A minus its stabilizing part due to focusing fields in Eq. (A.5).

If now one makes the assumption that the perturbing fields are small enough to neglect the square terms Φ 2 , A 2

x and A 2 y with respect to the linear ones, this simplifies into:

H 1 = 1 c|Bρ| R 2 Φ β A θ -R(p x A x + p y A y ) (A.10)
At this point it is possible to develop the Eq. (A.10) as a series of terms which are homogeneous polynomials of degree N in the four canonical variables:

H 1 = N H (N ) 1 (x, p x , y, p y , θ) = N N J,K,L,M =0 J+K+L+M =N b (N ) JKLM (θ)x J p K x y L p M y (A.11)
Changing now the name of the Hamiltonian H 1 into U, the terms H (N ) 1 can be expressed in terms of exponentials like follows:

U (a 1 , a 2 , θ) = N N j,k,l,m=0 j+k+l+m=N h (N ) jklm a j 1 āk 1 a l 2 ām 2 exp i[(j -k)Q x + (l -m)Q y ]θ (A.

B.2 The effect of the chromaticity on the 3Q y =13 resonance

To investigate the effect of a larger order resonance on the upper part of the tune footprint, the 3Q y =13 resonance has been excited through a single skew sextupole powered at 30 A. A systematic tune scan has been performed: the horizontal tune was kept at Q x =4. the bunch formation in the capture process, which lasts less than 2.5 ms (filamentation time). The footprint has been simulated through the PTC-Orbit program (see Chapter 3).

2.1 The CERN injectors complex [START_REF]Schematic of the future accelerators complex at CERN[END_REF]. The PS Booster is in pink. . . . . . . . . .

6.1

The synchrotron frequency decrease vs. intensity [START_REF] Forte | Longitudinal injection studies for the PSB at 160 MeV[END_REF], following the formula (6.3) [START_REF] Hansen | Effects of Space Charge and Reactive Wall Impedance on Bunched Beams[END_REF].

Image courtesy of D. Quartullo [START_REF] Forte | Longitudinal injection studies for the PSB at 160 MeV[END_REF]. . . . . . . . . . . . . . . . . . . . . . . .

Top -the bunch shape histogram for different longitudinal binningsBottom -

The tracking of the first turn for particles starting with no energy offset in a longitudinal space charge field. The black trajectory is the case without space charge, while the coloured ones reflect the longitudinal space charge kick applied with different binnings (i.e. frequency resolution). PyOrbit simulations. .

6.9

The foot-tangent principle: the raw (blue) and the filtered (green) current profiles together with the maximum and minimum derivatives (dashed red lines), which intersect on the zero-current axis and define the minimum and maximum extensions (black asterisks) of the bunch profile, i.e. the total bunch length. Py-Orbit simulations for the 47% chopping factor case (403 keV rms). . . . . . . .

6.10

The longitudinal phase spaces of the bunches (red) injected at 336 keV rms with 47% (left) and 63% (right) chopping factor, after 10 ms of tracking. The bucket iso-Hamiltonian contours (for a bucket without space charge) are in the background (grey). The black line is the iso-Hamiltonian which encloses the foot-tangent matched area. Py-Orbit simulations. . . . . . . . . . . . . . . . .

6.11

The fine tuning of the peak line density, normalized by its initial value (left) and the "min-max" bunch length (right) with 47% chopping factor. The colour code is the starting rms energy spread value (in keV). PyOrbit simulations. . . . 6.12 Total bunch length computations with the "min-max" method and the foot- The tune spread is represented in colour-code in the (Q x , Q y ) working plane, together with its projections along the Q x and Q y axes. The colour-code is the particle density (blue -small density; red -high density). The magenta dot is the injection tune and the lines are the important resonances in the machine. . .

Introduction vii 1

 1 Beam dynamics in synchrotron accelerators 1.1 Transverse single particle motion . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.1 Courant-Snyder invariant and Twiss parameters . . . . . . . . . . . . . 1.1.2 Emittance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.3 Intensity and beam brightness . . . . . . . . . . . . . . . . . . . . . . 1.1.4 Phase advance and tune . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.5 Dispersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.6 Chromaticity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Longitudinal single particle motion . . . . . . . . . . . . . . . . . . . . . . . . 1.2.1 The double RF systems . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 The magnetic field resonances . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4 Space charge theory and issues in the PSB . . . . . . . . . . . . . . . . . . . . 1.4.1 The transverse direct space charge . . . . . . . . . . . . . . . . . . . . 1.4.1.1 Uniform charge density distribution in a coasting beam . . . 1.4.1.2 Bi-Gaussian transverse distribution in a coasting beam . . . . 1.4.1.3 The role of the bunched motion in the space charge tune spread 2 The PS Booster (PSB) after the LIU Upgrade 3 PTC-Orbit 3.1 The PTC-Orbit software program . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.1 The "Particle-In-Cell" (PIC) method . . . . . . . . . . . . . . . . . . . 3.2 Convergence studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Simulation speed and code scalability with the number of cores . . . . . . . . iii

Figure 1 . 1 :

 11 Figure1.1: Coordinate system for transverse motions in a synchrotron[START_REF] Guignard | A General Treatment of Resonances in Accelerators[END_REF]. The dashed line is the closed orbit (see the text).

βc dx dt and x = d 2 x ds 2 = 1 β 2 c 2 d 2 x dt 2 ;= 1 β 2 c 2 d 2 y dt 2 .

 1212 • y = dy ds = 1 βc dy dt and y = d 2 y ds 2

Figure 1 . 2 :

 12 Figure 1.2:The ellipsoidal motion of a particle with action J x,y in the phase space[START_REF] Lee | Accelerator physics[END_REF] for a certain position s. The red dots are the turn-by-turn locations of the particles in the phase space.

g y,rms = σ 2 y σ 2 y -σ 2 yy( 1 . 11 )

 22111 where σ y = yy is the rms transverse beam size, σ y = y y and σ yy = yy .The generic expression yy indicates the second order momenta of the distributions y, y , composed by I particles, with respect to their first order momenta:i) -ȳ][y (i) -ȳ ] (1.12) where ȳ = 1 I I i=1 y(i) and ȳ = 1 I I i=1 y (i). The beam emittance is expressed in the unit of mm•mrad, or mm•mrad, or µm.

Figure 1 . 3 :

 13 Figure 1.3: Top, the RF voltage waveform. Bottom: The iso-Hamiltonian trajectories in the (φ, ∆E ω0) phase space that define the bucket, in light green, and the separatrix, the dashed red contour. The particle B performs a synchrotron oscillation inside the bucket, in this case without acceleration (φ s = 0) and below transition energy (η > 0).

Figure 1 .

 1 Figure 1.4 shows two examples of buckets, that can be generated in the PSB (for h=1 and 2), setting the harmonics in phase (∆φ = 0, top) and in antiphase (∆φ = π, bottom), without

Figure 1 . 4 :

 14 Figure 1.4: Top -longitudinal phase spaces of the double harmonic RF bucket from two cavities in phase (∆φ = 0), with V(h=1)=V(h=2)=8 kV. Bottom -the double harmonic RF bucket from two cavities in anti-phase (∆φ = π), with V(h=1)=8 kV and V(h=2)=6 kV. The magenta dots are the starting conditions for the profiles simulations. PTC-Orbit (see Chapter 3) simulations.

  where n x , n y , p are integers(1.33) which defines the magnetic resonance lines in the (Q x , Q y ) diagram (see Fig. 1.5). The sum N * = |n x | + |n y | is called order of the resonance and can directly be related to the order of the field (N * = 1 dipolar, N * = 2 quadrupolar, N * = 3 sextupolar,...) generating it. If n x and n y have the same sign, they are called sum resonances. If, instead, they have opposite sign, they are difference resonances.

Figure 1 . 6 :

 16 Figure 1.6: The direct (left) and indirect (right) electric field lines from a particle.

Figure 1 . 10 :Figure 1 .

 1101 Figure1.10: The repulsive (Coulomb) and attractive (magnetic) forces exercised between two moving particles at the same speed as a function of β.[START_REF] Schindl | Space charge[END_REF].

Figure 1 .Figure 1 . 13 :

 1113 Figure 1.13: Typical "necktie" shape of a simulated "footprint": the particles form a tune spread (grey dots). The bare tune (black dot) and the maximum tune shift (red dot) are indicated. The coloured lines represent the resonance lines of Fig. 1.5. The footprint has been simulated through the PTC-Orbit program (see Chapter 3).

1 .

 1 The machine has a circumference of 157 m and the unique characteristics to have 4 superposed rings. Each of them hosts 1 bunch per cycle. This allows to have 4 times the intensity delivered to the PS for each pulse of the Linac. Every ring has 16 equal periods (i.e. sequence of components) of 9.8 m each.

Figure 2 . 2 :

 22 Figure 2.2: The stripping carbon foil [20].

Figure 2 . 3 :

 23 Figure 2.3: H -, H 0 and p + yield as a function of the stripping foil thickness at 160 MeV [21].

  Figure 2.4: View from top of the future injection "chicane" for the H -injection scheme, defined by the BSW magnets. The beginning of the process with the foil hits by the injected H -beam (red), which is stripped into the circulating H + proton beam (blue). The unstripped H -(light green) and the H 0 (magenta) hit a beam dump inside the BSW4 and are lost.[4].

Figure 2 . 5 :

 25 Figure 2.5: Simulation. The injected beam 6D evolution without (left) and with (right) space charge after 20 turns of injection with central energy modulation. Different colours are the particles injected at every turn. It is clear how the space charge affects transversely the beam.

Figure 3 . 1 :

 31 Figure 3.1: On the left, a 3D view of the bunch, with line density colour code. On the right, the longitudinal projection of all the particles in a single slice.

Figure 3 . 2 :

 32 Figure 3.2: Rms emittance determinations as a function of the machine turns. The results were obtained for different transverse mesh sizes, number of macro-particles and grid type. Legend: A -mesh size 64x64 -number of macro-particles 10 6 (fixed grid); B -mesh size 256 x 256 -number of macroparticles 10 6 (fixed grid); C -64 x 64 -number of macro-particles 500×10 3 (adaptive grid); D -128 x 128 -number of macro-particles 500×10 3 (adaptive grid).

Figure 3 . 3 :

 33 Figure 3.3: CPU time for the CERN (red) and the CNAF (blue and green) clusters as a function of the number of cores for a typical PSB simulation. The magenta line is the perfect scalability reference line.

Figure 4 .

 4 Figure 4.1 bottom shows the normalized phase spaces normalized by the standard deviations of the variables x and y: as one can see the particles that have been considered for the analysis, the red ones, are the ones inside 1σ of the normalized x and y variables.

Figure 4 . 1 :

 41 Figure 4.1: Horizontal (left) and vertical (right) transverse phase space scatter plots for the normalized (bottom) and un-normalized (top) phase spaces. In red the particles at small transverse amplitude that have been selected for the following analysis.

Figure 4 . 2 :

 42 Figure 4.2: Left: the longitudinal phase-space (φ, ∆E) scatter plot of the bunch (grey). The particles with small transverse amplitudes, at the longitudinal edges of the bunch, are in ∆E colour-code. Right: in colour the position of those particles in the global tune footprint (in gray). The black dot is the bare tune.

  Fig. 4.3 right). This because the line density has a peak at φ = 0.

Figure 4 . 3 :

 43 Figure 4.3: Left: the longitudinal phase-space (φ, ∆E) scatter plot of the bunch (grey). The particles with small transverse amplitudes, around φ = 0, are in ∆E colour-code. Right: the position of those particles in the global tune footprint. The black dot is the bare tune.

Figures 4 .

 4 Figures 4.4 and 4.5 show how the energy spread affects the thickness of the footprint. The position in the necktie (see Fig. 4.4 right) of the particles with small values of |∆E| , corresponding to Fig. 4.4 left, covers the region between the bare tune and the maximum tune shift (φ = 0).

Figure 4 . 4 :

 44 Figure 4.4: Left: the longitudinal phase-space (φ, ∆E) scatter plot of the bunch (grey). The particles with small transverse amplitudes, around ∆E=0, are in φ colour-code. Right: the position of those particles in the global tune footprint. The black dot is the bare tune.

Figure 4 .

 4 5 left shows that, for increased energy offset limits, the relative particles tune shifts cover a thicker area of the tune spread, as shown in Fig. 4.5 right .

Figure 4 . 5 :

 45 Figure 4.5: Left: the longitudinal phase-space (φ, ∆E) scatter plot of the bunch (grey). The particles with small transverse amplitudes, with bigger offset around ∆E = 0, are in φ colour-code. Right: the position of those particles in the global tune footprint. The black dot is the bare tune.

Figure 4 .

 4 Figure 4.6 right shows the tune modulation of a single particle, performing small synchrotron oscillations. In the left plot it is represented its path in the longitudinal plane ( φ, ∆ E) during one synchrotron period. The colourcode is the energy offset. On the right it is shown the position evolution of such particle in the footprint. In this case, being the particle close to the center of the 6D phase space (x, x , y, y , φ, ∆ E), it oscillates in tunes around the maximum tune shift.

Figure 4 . 6 :

 46 Figure 4.6: Left: the longitudinal phasespace ( φ, ∆ E) scatter plot of the bunch (grey). The particle small synchrotron oscillation is in ∆ E colourcode. Right: the modulation of the particle tunes (in colourcode) in the global tune footprint (grey scatterplot). The black dot is the bare tune.

Figure 4 . 7 :

 47 Figure 4.7: Left: the longitudinal phasespace ( φ, ∆ E) scatter plot of the bunch (grey). The particle synchrotron oscillation is in ∆E colourcode, covering larger positions in phasespace and, thus, line density. Right: the modulation of the particle tunes (in colourcode) in the global tune footprint (grey scatterplot). The black dot is the bare tune.

Figure 4 . 8 :

 48 Figure 4.8: Left: the longitudinal phasespace ( φ, ∆ E) scatter plot of the bunch (grey): the particle synchrotron oscillation is in ∆ E colourcode. Right: the modulation of the particle tune (in colour code) in the global tune footprint (grey scatterplot) is very close to the bare tune in this case. The black dot is the bare tune.

Figure 4 .

 4 Figure 4.9 shows the path of a particle with large transverse and synchrotron amplitudes, which goes from regions in which both the line density (space charge component) and the momentum offset (chromatic component) are large, to the head or the tail of the bunch, in which the space charge tune shift is almost zero while the momentum offset δ can have a large excursion. As shown in the Figure, one can consider three "branches" in its motion:

Figure 4 .

 4 Figure 4.10 shows in red the different tune paths of particles performing large synchrotron oscillations, for two values of chromaticities (ξ x , ξ y ). The results can be compared with the ones of Fig. 4.9, obtained for the PSB natural chromaticities component values. According to the chromatic working point, indeed, the entire tune footprint changes, as is shown in Fig. 4.11. As shown in the figure, for the same bare tune it may or may not touch a given resonance line. These phenomena will be explored in the measurements and simulations of Sections 5.2.3 and 5.5.3.

Figure 4 . 9 :

 49 Figure 4.9: Zoom of the tune footprint close to the bare tune (dot marker). In red the path of a particle performing large synchrotron oscillation. In blue the bare tune. The results were obtained using the PSB natural chromaticity values (ξ x , xi y )=(-0.8, -1.6).

Figure 4 . 10 :

 410 Figure 4.10: Path of a particle performing large synchrotron oscillations for varying chromaticities. The plots were obtained using different values pairs of the chromaticity components.

Figure 4 . 11 :

 411 Figure 4.11: The tune spread (grey scatter plot) for different chromaticities: (a) (ξ x , ξ y )=(-0.05, -3.17); (b) (ξ x , ξ y )=(-0.8, -1.6); (c) (ξ x , ξ y )=(-1.55, -0.12). The black dot is the bare tune at (Q x ,Q y )=(4.2, 4.31). The footprints are overlapped to the magnetic resonance lines, discussed in Chapter 1.

Figure 4 . 12 :

 412 Figure 4.12:The large turn-by-turn modulation of a particle tune during one synchrotron period (magenta scatter-plot) in the global tune footprint (grey scatter-plot) and its averaged tune (black cross). The black dot is the bare tune.

Figure 4 . 13 right

 413 shows a comparison between the tune spread obtained using the single turn tunes computation and the average tune computation: in gray the space charge footprint computed turn by turn, in colour the averaged one. The averaged spread is shrinked with respect to the single-turn one.

Figure 4 . 13 :Fig. 4 .

 4134 Figure 4.13: Left: the longitudinal phase-space of the bunch with synchrotron period colour-code.Right: the single turn tunes computation in grey scatter-plot and the averaged tune spread computation in one particle synchrotron period (in synchrotron period colour-code). The black dot is the bare tune.

Figure 4 . 14 :

 414 Figure 4.14: An example of tune spread (particle density colour code -blue, low density -red, high density), without (left) and with (right) the averaging over many turns, in which particles are trapped on the 2Q y = 9 resonance line. The projections of the tunes distributions along the x andy axes are shown. One can appreciate the presence of a narrow peak in correspondence of the 2Q y = 9 resonance on the Q y projection (right) and its absence for the single turn tunes computation. See Section 5.4.3.

Figure 4 .

 4 Figure 4.15 shows that particles with small synchrotron amplitude cover almost all the necktie extension, while going towards larger synchrotron amplitude layers, the particles are mapped along necktie regions which are closer and closer to the bare tune: this is due to the fact that, in general, the averaged line density decreases.

Figure 4 .

 4 Figure 4.15: Left: the longitudinal phase-space with 3 different layers of synchrotron amplitude A synch (in colour-code): 0 < A synch ≤ 0.7 rad, in blue, 0.7 < A synch ≤ 1.4 rad, in cyan, 1.4 < A synch ≤ 2.1 rad, in yellow. Right: the corresponding averaged tune spread computation. The black dot in (b) is the bare tune.

4. 4 . 2

 42 Effect of the transverse amplitude 4.4.2.1 Similar amplitudesThe transverse amplitudes determine the length and the direction of the particles averaged detunings. Figure4.16 shows the effects of the intersections between particles with similar levels of amplitudes in the normalized horizontal and vertical planes. As one can see, small amplitude particles in the horizontal and vertical planes sit on a long line going from the bare tune to the maximum tune shift (far from the bare tune). Particles with larger transverse amplitude map into lines that end far from the maximum tune shift. The lowest part of these de-tunings corresponds to particles with bigger average line density, thus close to φ = 0.

Figure 4 .

 4 Figure 4.16: (a) normalized horizontal phase-space with 3 different amplitude layers in colour-code: orange -0 < J x < σ x , green -σ x < J x < 2σ x , magenta -2σ x < J x < 3σ x ; (b) the normalized vertical phase-space with the same layers in colour-code; (c) the global averaged tune spread computation (grey scatter plot) and the averaged tunes computation of the particles with the previous colour-code in the horizontal and vertical plane.

( 4 .

 4 [START_REF]Schematic of the future accelerators complex at CERN[END_REF] shows the case of small horizontal (vertical) amplitudes and different vertical (horizontal) amplitudes values: the average tune spread of the selected particles paints the lower (upper) side of the global averaged tune spread.

Figure 4 .

 4 Figure 4.17: (a) small normalized horizontal phase space with 0 < J x < σ x ; (b) normalized vertical phase-space with 4 different amplitude layers in colour-code: orange -0 < J y < σ y , green -σ y < J y < 2σ y , magenta -2σ y < J y < 3σ y , purple -3σ y < J y < 4σ y ; (c) the global averaged tune spread computation (grey scatter plot) and the averaged tunes computation of the particles (vertical amplitudes colour-code). The black dot is the bare tune.

Figure 4 .

 4 Figure 4.18:(a) the normalized horizontal phase-space with 4 different amplitude layers in colourcode: orange -0 < J x < σ x , green -σ x < J x < 2σ x , magenta -2σ x < J x < 3σ x , purple -3σ x < J x < 4σ x ; (b) small normalized horizontal phase space with 0 < J y < σ y ; (c) the global averaged tune spread computation (grey scatter plot) and the averaged tunes computation of the particles (horizontal amplitudes colour-code). The black dot is the bare tune.

4 . 19 .

 419 Due to the fact that the chromatic de-tuning is symmetric with respect to the momentum offset, the averaged tune spreads are the same, even if the single turn tunes computation are not, as shown in Fig.4.20 (to be also compared with Fig.4.11).

Figure 4 . 19 :

 419 Figure 4.19: The longitudinal distribution of the particles for a double RF bucket in short bunch mode (see Figure 1.4 bottom in Chapter 1). The colour-code is the synchrotron period in number of turns.

Figure 4 . 20 :

 420 Figure 4.20: The (simulated) averaged tune spreads are not affected by the chromaticity change, while the single turn computations (grey) are much changing. a -(ξ x , ξ y )=(-0.05,-3.17); b -(ξ x , ξ y )=(-0.8,-1.6); c -(ξ x , ξ y )=(-1.55,-0.12). The black dot is the bare tune and the colour code is the synchrotron period in number of turns.

5 #

 5 of particles [a. u.]

Figure 5 . 1 :

 51 Figure 5.1: Longitudinal phase space (tomography) for "long bunches" with voltages values V h1 = 8 kV and V h2 = 4 kV, in anti-phase. The colour-code indicates the particles density (yellow -low density, black -high density). The projections along the phase φ, , i.e. the line density, and the energy offset ∆E are shown.

AFigure 5 . 2 :

 52 Figure 5.2: The PSB cycle prepared for the measurements on the 160 MeV plateau: cycle time vs. kinetic energy.

5 #

 5 of particles [a. u.]

Figure 5 . 3 : 5 #

 535 Figure 5.3: Longitudinal phase space (tomography reconstruction, see Section 5.1.2.1) for "long bunches", with voltages values V h1 = 8 kV and V h2 = 8 kV, in anti-phase.

Figure 5 . 4 :

 54 Figure 5.4: Longitudinal phase space (tomography reconstruction, see Section 5.1.2.1) for "short bunches", with voltages values V h1 = 8 kV and V h2 = 8 kV, in phase.

Figure 5 . 5 :

 55 Figure 5.5: Measured vertical (red) and horizontal (blue) chromaticities vs. current in the chromatic sextupoles.

Figure 5 .

 5 Figure 5.6 shows the map of the bare machine resonances. The most dangerous resonances are the integers Q x,y = 4 (the stop-band of the vertical one is partially visible in the lower part of the scans), the vertical half-integer 2Q y = 9 and the sextupolar: 3Q y = 13, 2Q x + Q y = 13

Figure 5 . 6 :

 56 Figure 5.6: Bare machine resonances. A small correction of the half-integer resonance has to be applied to be able to cross it during the scan.

Figure 5 . 7 :

 57 Figure 5.7: The resonances correction and the instability at Q x = 4.3.

Figure 5 . 8 :

 58 Figure 5.8: The horizontal centroid exponential growth caused by the "coherent" instability at Q x = 4.3.The amplitude of the motion (in arbitrary units) vs turns is represented for the horizontal (blue) and vertical (red) oscillations. Screenshot from the control room application.

Figure 5 . 9 :

 59 Figure 5.9: The resonances correction with the instability cured at Q x = 4.3.

Figure 5 . 10 :

 510 Figure 5.10: Half-integer measurements: intensities vs. time for the long (red) and the short (grey) bunch with their errorbars (standard deviation over multiple measurements).

Figure 5 .Figure 5 .Figure 5 .

 555 Figure 5.11: Half-integer (measurements): waterfall of the longitudinal profile colourplot in the time window [450-620] ms for long (left) and short (right) bunches. The colour-code is the particle line density (blue -low density; red -high density), scaled by the peak line density of the first profile. The comparison of the colourplot with the vertical dashed black lines puts in evidence the bunch shortening in the short bunch case.

  2Q y =9 resonance. The gradient errors are applied to the lattice and, in addition to exciting the resonance, they shift the original working point (4.28, 4.53) toward the half-integer line (4.285, 4.517). The misalignment errors have also a contribution in the vertical de-tuning (4.284, 4.513), due to the introduction of slight skew component and longitudinal lattice changes, and in the losses distribution along the machine.

Figure 5 . 14 :

 514 Figure 5.14: Half-integer (long bunch simulations): PTC-Orbit simulations vs. measurements. Legend: (A) Simulation without errors but with space charge; (B) Simulation with errors but no space charge; (C) Simulation with only quadrupolar field errors (matching to Q y =4.53) and space charge; (D) Simulation with space charge and quadrupolar field and misalignment errors; (E) Simulation with only quadrupolar field errors (matching to Q y =4.525) and space charge.

Figure 5 .

 5 Figure 5.15: Half-integer (long bunch). Simulated horizontal (left) and vertical (right) transverse profiles in [450-620] ms, normalized with respect to the max value.

Figure 5 .

 5 Figure 5.16: Half-integer (long bunch simulations). Simulated beam current waterfall plot with bunch shortening, to be compared with the measurements in Fig. 5.11. The colour-code is the particle line density (blue -low density; red -high density), scaled by the peak line density of the first profile. The vertical dashed black lines represent the initial bunch tails.

Figure 5 .Figure 5 . 18 :

 5518 Figure5.17: Half-integer (short bunch). PTC-Orbit simulations vs. measurements. Grey error bands are measurements, the red solid line represents simulations with misalignment and quadrupolar field errors.

Figure 5 .

 5 Figure 5.19: Half-integer (short bunch simulations). Simulated beam current waterfall plot with bunch shortening, to be compared with measurements in Fig. 5.11. The colour-code is the particle density (blue -low density; red -high density). The vertical dashed black lines represent the initial bunch tails.

Figure 5 .

 5 Figure 5.20 shows, in addition to the lines in Fig.5.14, the one matching at Q y =4.535 (blue dashed line) with only the realistic quadrupolar error applied and space charge. A change of tune in the order of 10 -2 causes a very different final value in the intensity profile. Figure5.20 shows also simulations with space charge and including random quadrupolar field errors, with the same standard deviation of the realistic ones, matched at the same final Twiss tune as in Fig.5.14 E (4.2857, 4.512). The average effective tunes of these random-seed simulations are Q x = 4.2856 ± (5 × 10 -4 ) and Q y = 4.5115 ± (1.1 × 10 -3 ). From the losses profiles one can observe that, being the tunes so close, the behaviour in time, including the intensity level at which the slopes change, and the final values are very similar.

Figure 5 . 20 :Figure 5 . 21 :

 520521 Figure 5.20: Losses for different random errors. Legend: (A) Measurements; (B) Simulation with quadrupolar field and misalignment errors; (C) Simulation with only quadrupolar field errors (matching to Q y =4.525); (D) Simulation with only quadrupolar field errors (matching to Q y =4.535); (E) Simulation with random quadrupolar field errors and relative beta beating=3.46% rms; (F) Simulation with random quadrupolar field errors and relative beta beating=19.51% rms. All the simulations include space charge.

Figure 5 .

 5 [START_REF] Conte | An introduction to the physics of particle accelerators -2nd Ed[END_REF], from simulations, puts in evidence the non-linearity of the double harmonics RF bucket: different synchrotron periods of particles belong to different iso-Hamiltonian trajectories in the longitudinal phase space.

Fig. 5 .

 5 [START_REF] Carli | Active Longitudinal Painting for The H-Charge Exchange Injection of The Linac4 Beam Into The PS Booster[END_REF] that losses are faster when the synchrotron period of the interested particles becomes smaller. Here, in red, one can see the loss rate, computed as the derivative of the intensity along the cycle, and, in blue, the average synchrotron period of the lost particles, sampled every 5 ms. There are two main regimes: before 558 ms particles are lost slower and in the interval [480-540] ms with an almost constant loss rate. These particles are the ones external to the inner separatix. When, after 558 ms, as consequence of the bunch shortening, the remaining particles are only the ones inside the basins of attraction around ±1 rad (see Fig.5.16 right), the loss rate increases as the synchrotron period is faster.

Figure 5 . 22 :Figure 5 . 23 :

 522523 Figure 5.22: The synchrotron period variation in a double harmonics RF bucket.

Figure 5 . 24 :Figure 5 . 25 :Figure 5 . 26 :

 524525526 Figure 5.24: The PTC-Orbit simulated tune footprint (averaged over 1500 turns) at 485 ms (left) and 565 ms (right), with particle density colour-code (blue, low density -red, high density). The projections of the tunes along the x and y axes are shown: at right, note the narrow peak on the 2Q y =9 line.

Figure 5 .Figure 5 . 27 :

 5527 Figure 5.27: Wirescanner measurements of the horizontal beam profiles and their Gaussian fit for Q x = 4.11 (a), Q x = 4.065 (b) and Q x = 4.044 (c).

Figure 5 .

 5 Figure 5.28 shows the behaviour of horizontal rms emittance vs. horizontal tune, keeping constant the vertical tune at Q y = 4.21. The emittance is increasing by going toward lower tunes, until for Q x < 4.04 losses occur.

Figure 5 . 28 :

 528 Figure 5.28: The measured horizontal rms emittance vs horizontal tune for constant Q y = 4.21 at 475 ms. From Q y = 4.03 (red marker) losses occur. The relative error is in the order of ±5% (1σ).

Figure 5 . 29 :

 529 Figure 5.29: Measured normalized horizontal (empty diamond marker) and vertical (empty circle marker) emittances evolution vs time for different chromaticities: ξ x =-0.73 -blue; ξ x =-0.15 -red.

Figure 5 . 30 :

 530 Figure 5.30: Wirescanner measured horizontal profiles at 575 ms -left -and 580 ms -right with ξ x =-0.73. The blue line is the measurement, the dashed red line is the Gaussian fit and, in gray, the residuals between the two, in arbitrary units.

Figure 5 .

 5 [START_REF] Galambos | ORBIT: A ring injection code with space charge[END_REF] shows, for the case with horizontal chromaticity ξ x = -0.73, the simulated horizontal emittance blow-up and the vertical emittance, which remains constant, in an error-less lattice. The results reproduce qualitatively the measurements. The profiles, together with their Gaussian fits and the residuals, are shown in Fig-ure5.32 at the beginning of the simulations and after 5 ms: here the increase of the residuals is evident.The simulated emittance evolutions for a different value of chromaticity, ξ x = -0.15, are plotted in Figure5.33. Even for this case, a qualitative agreement is obtained. Moreover, with respect to the previous one, a reduced horizontal emittance blow-up occurs in measurements and simulations.

Figure 5 .

 5 Figure 5.34 shows the different tune spreads shape due to the difference in chromaticity. In both cases they overlap the horizontal integer.

Figure 5 . 31 :Figure 5 . 32 :

 531532 Figure 5.31: Normalized horizontal (measurements -empty diamonds; simulations -full diamonds) and vertical (measurements -empty circles; simulations -full circles) emittances evolution for the case with ξ x = -0.73 (Gaussian fit).

Figure 5 . 33 :

 533 Figure 5.33: Normalized horizontal (measurements -empty diamonds; simulations -full diamonds) and vertical (measurements -empty circles; simulations -full circles) emittances evolution for the case with ξ x = -0.15 (Gaussian fit).

Figure 5 . 34 :

 534 Figure 5.34: The simulated single-turn tune spreads for the different chromaticities: ξ x =-0.73 -left; ξ x =-0.15 -right. On top the space charge tune spreads at the beginning of the tracking (575 ms) and, at bottom, at the end of the tracking (650 ms). The colour code is the same in all the histograms and represents the particle density (red -high density, blue -low density).

Figures 5 .Figure 5 . 35 :

 5535 Figure 5.35: Normalized horizontal (measurements -empty diamonds; simulations -full diamonds) and vertical (measurements -empty circles; simulations -full circles) emittances evolution for the case with ξ x = -0.73 (Gaussian fit) Q x = 4.066.

Figure 5 . 36 :Figure 5 . 37 :

 536537 Figure 5.36: Normalized horizontal (measurements -empty diamonds; simulations -full diamonds) and vertical (measurements -empty circles; simulations -full circles) emittances evolution for the case with ξ x = -0.15 (Gaussian fit) and Q x = 4.066.

Figure 5 . 38 :

 538 Figure 5.38: Normalized horizontal (measurements -empty diamonds; simulations -full diamonds) and vertical (measurements -empty circles; simulations -full circles) emittances evolution for the case with ξ x = -0.15 (Gaussian fit) and rematching the lattice including the quadrupolar field errors to Q x = 4.06.

Figure 5 . 39 :

 539 Figure 5.39: The dynamic approach to Q y =4: horizontal (top) and vertical (bottom) tunes vs. time. The relative error for the measured tunes is less than ±2% (1σ).

Figure 5 . 40 :

 540 Figure 5.40: The closed orbit without and with correction for the lowest (Q y = 4.09) vertical working point.

Figure 5 . 41 :

 541 Figure 5.41: The losses with and without the COD correction. The relative error for the measured intensities is less than ±5% (1σ).

Fig. 5 Figure 5 . 42 :

 5542 Fig. 5.42).

Figure 5 .

 5 Figure 5.43 shows the vertical profiles before and after the blow-up provoked by the interaction with the resonance.

Figure 5 . 43 :

 543 Figure 5.43: The measured vertical beam profiles before and after the blow-up induced by the resonance.

Figure 5 .

 5 Figure 5.44 reports the measured intensity evolution in case the closed orbit distortion correction is not applied (blue solid line).

Figure 5 . 44 :Figure 5 . 45 :

 544545 Figure 5.44: The dynamic approach to Q y =4: intensities vs. time without COD correction. Legend: (A) Measurements; (B) Simulation without space charge; (C) Simulation with direct space charge and no quadrupolar errors; (D) Simulations errorbar with direct space charge and random quadrupolar field errors distributions (see Appendix C); (E) Simulation with measured quadrupolar field errors and direct space charge.

Figure 5 .

 5 48 b shows the simulated profiles including direct and indirect space charge, to be compared with the measurements in Fig.5.48 a. As in the previous case, without COD correction, the beam blow-up is clear and fast and the beam becomes non-Gaussian already after 1 ms (∼1 synchrotron period), as shown in Fig.5.49.

Figure 5 . 46 :Figure 5 . 47 :

 546547 Figure 5.46: The dynamic approach to Q y =4 in case of corrected COD: intensities vs. time with vertical boundaries at ±29.5 mm. Legend: (A) Measurement; (B) Simulation without space charge; (C) Simulation with direct space charge; (D) Simulation with space charge (with boundaries) without field errors; (E) Simulation with space charge (with boundaries) and measured quadrupolar field errors; (F) Simulation with space charge (with boundaries) and random quadrupolar field errors distributions.

Figure 5 .

 5 Figure 5.48: (A) Simulation: initial vertical profile at 500 ms; (B) Vertical profile at 560 ms (with direct space charge); (C) Vertical profile at 560 ms (space charge with vertical boundaries at ±40 mm); (D) Vertical profile at 560 ms (space charge with vertical boundaries at ±29.5 mm) .

Figure 5 . 49 :

 549 Figure 5.49: The vertical beam profile, its Gaussian fit and residuals after 1000 turns (1 ms).

Figure 5 .Figure 5 . 50 :

 5550 Figure 5.50 shows the simulation (with COD corrected) with 3 different heights of the vacuum pipe. The ±40 mm solution is the most suitable in comparison with the measurements and reflects the average vertical aperture size of the machine, while the ±29.5 mm corresponds to the minimum distributed vertical aperture, which is defined by the beam scrapers before and after each bending magnet.

Figure 5 .

 5 Figure 5.51 shows the effect of the different shape boundaries on the coherent tunes. In these plots the coherent tunes are computed through FFT of the first order momenta along the simulation window. In case of small boundaries (±29.5 mm) the FFT is more broadband and the vertical tune is closer to the integer. When the boundaries become larger the vertical coherent tunes are slightly farther from the resonance and more narrow-band, with higher amplitudes as one moves toward the direct space charge condition (and also for very large chambers).

Figure 5 . 51 :

 551 Figure 5.51: Vertical coherent tunes waterfall simulations with COD correction. From bottom to top the following space charge modules have been used: vertical boundaries ±40 mm; vertical boundaries ±29.5 mm; direct space charge. The magenta dots represent the peaks in the FFT of the first order momenta.

Figure 5 .

 5 Figure 5.52 shows different simulation results for different chamber sizes. Here, as previously shown, the orbit blow-up influences considerably the losses pattern: a different coherent tune shift toward the vertical integer causes a deviation of the COD from the beginning, anticipating

Figure 5 . 52 :

 552 Figure 5.52: Dynamic integer without COD correction: simulations with different chamber heights. On top it is represented the intensity comparison between measurement and simulations for different chamber heights. The statistical rms emittances from the simulations are compared in the central plot and the vertical beam centroid (i.e. the first order vertical beam momentum) is represented in the plot at the bottom.

Figure 5 . 53 :

 553 Figure 5.53: The "minimum tune" approach (intensity 60 × 10 10 p): measured vertical (blue circles) and horizontal (red circles) tunes vs. cycle time. The programmed horizontal and vertical tunes are represented by dashed red and blue lines, respectively. The measurement at 520 ms showed the same vertical and horizontal tune (blue and red circle).

Figure 5 .

 5 Figure 5.54: Measurements (empty markers with error-bars) and simulations (full markers) for the normalized horizontal (blue), vertical (red) and average (orange) emittances evolution in time (Gaussian fit).

Figure 5 . 55 :

 555 Figure 5.55: The simulated single-turn tune footprint at the beginning of the tracking (the colour bar represents the particles density -highest density in red). The black solid lines are the integer and the coupling resonances. The magenta dot is the bare tune.

Figure 6 . 1 :

 61 Figure 6.1:The synchrotron frequency decrease vs. intensity[START_REF] Forte | Longitudinal injection studies for the PSB at 160 MeV[END_REF], following the formula (6.3)[START_REF] Hansen | Effects of Space Charge and Reactive Wall Impedance on Bunched Beams[END_REF]. Image courtesy of D. Quartullo[START_REF] Forte | Longitudinal injection studies for the PSB at 160 MeV[END_REF].

Figure 6 . 2 :

 62 Figure 6.2: Top -the bunch shape histogram for different longitudinal binningsBottom -The tracking of the first turn for particles starting with no energy offset in a longitudinal space charge field. The black trajectory is the case without space charge, while the coloured ones reflect the longitudinal space charge kick applied with different binnings (i.e. frequency resolution). PyOrbit simulations.

Figure 6 . 3 :

 63 Figure 6.3: Longitudinal phase spaces after ∼ 2 ms with PyOrbit (left) and BlonD (right). Simulations without longitudinal space charge (top), with a bunch population of 2.95×10 11 p (centre) and with 2.95×10 12 p (bottom). BlonD simulations courtesy of D. Quartullo [72].

Figure 6 .

 6 Figure 6.4 shows the PyOrbit and BlonD benchmarking results. The plots, indicating the synchrotron frequency, derived through an FFT of the test particles phases vs their max phase,

Figure 6 . 4 :

 64 Figure 6.4: The synchrotron frequency vs. max particle phase between PyOrbit (blue marker) and BlonD (red marker) at different intensities: A -0 p; B -2.95×10 9 p; C -2.95×10 10 p; D -2.95×10 11 p; E -2.95×10 12 p. The initial bunch length is indicated by a vertical grey line and the synchrotron frequency by the horizontal black line (obtained by the analytical formula of Eq. 6.3). BlonD simulations courtesy of D. Quartullo[START_REF] Forte | Longitudinal injection studies for the PSB at 160 MeV[END_REF].

Figure 6 .

 6 Figure 6.5 shows the three initial Linac4 microbunches trains, represented in different colours and characterized by a different energy spread: 113 keV, 336 keV and 592 keV rms, which are used as input of the PyOrbit and ESME simulations. Simulations have been performed max-

Figure 6 . 5 :

 65 Figure 6.5: Linac4 bunches at injection in the PSB spaced by 2.84 ns. Red -113 keV rms. Blue -336 keV rms. Green -592 keV rms. Data courtesy of A. Lombardi [72].

Figure 6 . 6 :

 66 Figure 6.6: The normalised peak line density vs. turns for the 113 keV and 336 keV rms case -ESME simulations.

Figure 6 . 7 :

 67 Figure 6.7: The initial (left) phase space and after 143 turns (right) for the initial 336 keV rms cases -ESME simulations.

Figure 6 . 8 :

 68 Figure 6.8: The initial (left) phase space and after 143 turns (right) for the initial 113 keV rms case -ESME simulations.

τ

  [ns] # of m.particles[arb. units]

Figure 6 . 10 :

 610 Figure6.10: The longitudinal phase spaces of the bunches (red) injected at 336 keV rms with 47% (left) and 63% (right) chopping factor, after 10 ms of tracking. The bucket iso-Hamiltonian contours (for a bucket without space charge) are in the background (grey). The black line is the iso-Hamiltonian which encloses the foot-tangent matched area. Py-Orbit simulations.

Figure 6 . 11 :

 611 Figure 6.11: The fine tuning of the peak line density, normalized by its initial value (left) and the "minmax" bunch length (right) with 47% chopping factor. The colour code is the starting rms energy spread value (in keV). PyOrbit simulations.

Figure 6 . 13 :

 613 Figure 6.13: The normalized peak line density with (green) and without (blue) longitudinal space charge (I=3.42×10 12 p), for 403 keV rms and 61% chopping factor settings. PyOrbit simulations.

Figure 6 . 14 :

 614 Figure 6.14: The bunch without space charge (left) and with I=3.42×10 12 p (right) for the 474 ns (top) and 609 ns (bottom) injection after 10 ms. The bucket iso-Hamiltonian contours (for a bucket without space charge) are in the background (grey). The black line is the iso-Hamiltonian which encloses the matched area. PTC-Orbit simulations.

Figure 7 . 1 :

 71 Figure 7.1: Upper limits for LHC beams: achieved (grey dots), future (50 ns spacing -blue stars, 25 ns spacing -green stars). The dashed grey line is the measured LHC brightness curve scaled by a factor 2.

Figure 7 . 2 :

 72 Figure 7.2:The KSW offsets decay for the "on-axis" (solid blue line) and "transverse painting" (dashed red line) options. The beam is injected at -35 mm, with respect to the -46 mm imposed by the BSWs, over the first 23 turns to gather I=3.42×10 12 p at 61% chopping factor.

  Figure 7.3: The "on-axis" injection simulation results (black for the 61% chopping factor, red for the 47% chopping factor) for the working point (4.28, 4.55). The results for the working point (4.43, 4.60) are in dashed lines. The green stars and the dashed grey line are the LHC 25 ns beam limits, as shown in Figure 7.1.

( 4 .

 4 43, 4.60) -61% chopping factor -transverse painting (4.28, 4.55) -61% chopping factor -transverse painting Limit LHC 25 ns Scaled measured LHC 25 ns (4.28, 4.55) -61% chopping factor -on-axis (4.43, 4.60) -61% chopping factor -on-

Figure 7 . 4 :

 74 Figure 7.4: The "on-axis" and the "transverse painting" results starting from 1.3 mm•mrad in filled black dots for (Q x ,Q y )=(4.28, 4.55) and filled black diamonds for the best solution at (Q x ,Q y )=(4.43, 4.60). The green stars and the dashed grey line are the LHC 25 ns limits, as shown in Figure 7.1.

Figure 7 . 5 :

 75 Figure 7.5: The resulting transverse profiles after 10 ms for the "on-axis" injection (top) and the transverse painting solution (bottom) for the case without space charge (blue) and with I=3.42×10 12 p (green).

Figure 7 . 6 :

 76 Figure 7.6: The largest tune spread (single-turn computation) after 10 ms for the on-axis injection with programmed tune at (Q x , Q y )=(4.43, 4.6) and I=3.42×10 12 p. The tune spread is represented in colourcode in the (Q x , Q y ) working plane, together with its projections along the Q x and Q y axes. The colour-code is the particle density (blue -small density; red -high density). The magenta dot is the injection tune and the lines are the important resonances in the machine.

Figure 7 . 7 :

 77 Figure 7.7: Emittance evolution with different chromaticities. Simulations courtesy of E. Benedetto [43].

Figure 7 . 8 :

 78 Figure 7.8: The simulated final emittances after the injection process without space charge: left -halfsum emittance colour code; right -emittances ratio colour code. The black cross marker at (x, y) = (-80.9, 0) is the closed orbit value. Empty spots reflect unfinished simulations.

Figure 7 . 9 :

 79 Figure 7.9: The transverse beam profiles after 100 turns with 3 different offsets without space charge: (x, y)=(-80.4,5), top -(x, y)=(-75.9,0), centre -(x, y)=(-80.4,0), bottom. In blue the simulated profiles, in red the Gaussian fit curve, in gray the residuals between the two.

Figure 7 .Figure 7 . 10 :

 7710 Figure 7.10 shows the standard deviation of the residuals along the profiles with respect to the Gaussian fits. One can see that the blue range is an optimal condition and the blue dots are wider in the horizontal than in the vertical plane, due to different tunes and the presence of horizontal dispersion.

Figure 7 . 11 :

 711 Figure 7.11: The simulated final emittances after the injection process with space charge (with intensity I=3.42×10 12 p): left -half-sum emittance colour code; right -emittances ratio colour code. Empty spots reflect unfinished simulations. The black cross marker at (x, y)=(-80.9,0) is the closed orbit value.

Figure 7 . 12 :Figure 7 . 13 :

 712713 Figure 7.12: The transverse beam profiles after 10 000 turns with 3 different offsets, with space charge: (x, y)=(-80.4, 5), top -(x, y)=(-75.9, 0), centre -(x, y)=(-80.4, 0), bottom. In blue the simulated profiles, in red the Gaussian fit curve, in gray the residuals between the two.

Figure 7 .

 7 Figure 7.14: Half-sum of the normalized transverse emittances vs. time for different mismatches with space charge (intensity I=3.42×10 12 p). The dashed red line is the HL-LHC limit emittance at 1.7 mm•mrad [7].

Figure 7 . 15 :

 715 Figure 7.15: Half-sum emittances (left) and the correspondent simulated maximum tune shifts after 10 ms tracking (right): the maximum tune shifts never overcome the coupling line. The magenta cross (right) is the injection bare tune, while, on the left, the black cross marker at (x, y)=(-80.9,0) is the closed orbit value.

Figure 7 .

 7 Figure 7.16 shows the evolution of the transverse emittances and the typical emittance sharing behaviour associated with coupling. This phenomenon starts occurring before the end of the 23 turns injection.

Figure 7 . 16 :

 716 Figure 7.16: Normalized emittances evolution vs time for the entire capture process (10ms) -right. A zoom of the first 100 turns -right. The coupling effect starts before the end of the accumulation process (23 turns).

  m.particles [a.u.] nr. of m.particles [a.u.] n r . o f m . p a r t i c l e s [ a . u . ]

Figure 7 . 17 :Figure 7 . 18 :

 717718 Figure7.17: The space charge averaged tune spread in the case with injection very far to the closed orbit at (x, y)=(-73.9, 0) in the (Q x , Q y ) working plane. The colour-code is the particle density (bluesmall density; red -high density). The magenta dot is the injection tune and the lines are the important resonances in the machine. Top: the projection of the particles tune spread along the Q x axis. Right: the projection of the particles tune spread along the Q y axis. Top-right: the 45°projection, along the orthogonal direction with respect to the coupling line.

Figure 7 .

 7 Figure 7.19) shows, in light green, the particles at an orthogonal distance of ±0.005 from the resonance line. The large spread case (right) has more particles whose average tunes sit close to the resonance, due to the fact that a bigger spread means a larger number of particles which are interacting with the resonance. Another difference is that, in the large tune spread case (right), these particles are longitudinally distributed all around the bunch, while in the small spread case (left) they are mainly concentrated inside the inner islands of the longitudinal phase space, where the space charge modulation is almost constantly stronger because of the higher line density.

Figure 7 .

 7 Figure7.19: The particles selected on the average tunes around the coupling resonance for the case with smaller tune spread injecting at (x, y)=(-73.9, 0), left, and for the larger tune spread at (x,y)=(-80.4, 0), right. In both the plots, there are no particles around the inner separatrix because, in this region, the algorithm for the computation of the synchrotron period T synch fails.

Figure 7 . 20 :

 720 Figure 7.20: Case 1. The phase advance per turn of a particle which moves in the tune diagram far from the coupling resonance. The magenta dot is the average phase advance over the particle synchrotron period (in colour-code).

Figure 7 . 21 :

 721 Figure 7.21: Case 1. 4D Poincaré maps in different planes (top). Horizontal and vertical phase space versus time over one synchrotron period (bottom).

Figure 7 . 22 :

 722 Figure 7.22: Case 2. The phase advance per turn of a particle being very close to the coupling resonance.The magenta dot is the average of the phase advance over the particle synchrotron period (in colourcode), almost on the coupling line.

Figure 7 . 23 :

 723 Figure 7.23: Case 2. 4D Poincaré maps in different planes (top). Horizontal and vertical phase space over one synchrotron period (bottom). A sort of double circular shape is recognizable on top. This is due to the fact that the particle is not narrowly bounded around the coupling line.

Figure 7 . 24 :

 724 Figure 7.24: Case 3. The phase advance per turn of a particle which performs a motion around the coupling resonance. The magenta dot is the average of the phase advance over the particle synchrotron period (in colour-code), sitting on the coupling line.

Figure 7 . 25 :

 725 Figure 7.25: Case 3. 4D Poincaré maps in different planes (top). Horizontal and vertical phase space over one synchrotron period (bottom).

Figure 7 . 26 :

 726 Figure 7.26: Case 4. The phase advance per turn of a particle interacting with the integer resonance and the coupling resonance. The magenta dot is the average of the phase advance over the particle synchrotron period (in colour-code).

Figure 7 . 27 :

 727 Figure 7.27: Case 4. 4D Poincaré maps in different planes (top). Horizontal and vertical phase space over one synchrotron period (bottom).

Figure 7 . 28 :

 728 Figure 7.28: Case 4. The particle evolution in one synchrotron period under the influence of the vertical integer and the coupling resonances. The colour bar represents one synchrotron period of the particle.Left -phase advance per turn ( colour code dots), injection tune (magenta cross), average tune close to the coupling (grey cross), and the integer and coupling lines (solid black lines). Center -the horizontal phase space. Right -the vertical phase space.

  0 (or Montague 2Q x -2Q y = 0) have been observed. In general, both static and time-varying working points have been used. In this last case, regarding the vertical integer resonance Q y = 4, a clear correlation with the dipolar closed orbit enhancement effect has been observed. The Q x = 4 line has been excited with different chromaticities, leading to different blow-up, as expected.

  Multi-turn injections and beam dynamics during the fall of the orbit chicane imposed by the bump magnets (BSW) have been simulated for two different working points, the nominal one (Q x , Q y )=(4.28, 4.55) and (Q x , Q y )= (4.43, 4.60), farther from the integer resonances. Two chopping factors (47% and 61%) have been compared as well. Moreover, two different solutions for the transverse injection, "on-axis" and with transverse painting, make possible a large tailoring of the initial (and final) transverse emittances.

  supervisor at CERN, for having believed in me at the very beginning and having brought me at CERN, and Alexander Yu Molodozhentsev (Sasha), whose early support in the understanding of the code really gave an important speed-up to my work. I feel very lucky to have had such beautiful people as mentors during my Ph.D. work.Thanks to all the CERN Accelerator Beam Physics group in the Beams Department (BE-ABP) for the continuous support, discussions and encouragement found: I have met many talented and experienced people during these years, like Gianluigi Arduini, Elias Metral and Frank Schmidt. I think I received something from each of them and this is priceless. When I came to CERN I was expecting and looking for a unique place to discuss science and technology and I must say that I was quickly and fully satisfied.

12 )Figure B. 1 :

 121 Figure B.1: Static vertical integer measurements: rms emittance (top) and intensity (bottom) evolutions in time. The coloured error-bands represent the standard deviation of the measurements.

  Fig. B.2.

Figure B. 2 :

 2 Figure B.2: The chromaticity change in the measurements window.

Figure B. 3

 3 Figure B.3 shows the losses for different fixed vertical tunes Q y , from 4.31 to 4.34. The change of chromaticity modifies the footprint and, in particular, a larger |ξ x | increases the chromatic spread which is extended above the vertical bare tune (see the overshoot in Section 4.3). This leads to a wider upper part of the tune spread interacting directly with the resonance line and more losses are being found:

2 Figure B. 5 :Figure B. 6 :

 256 Figure B.5: Bunch length measurements varying the intensity. The legend is the total injected intensity: A -67×10 10 p; B -233×10 10 p; C -496×10 10 p; D -813×10 10 p; E -1057×10 10 p.

Figure C. 2 :

 2 Figure C.2: Transverse and longitudinal alignment errors and tilts of triplet quadrupoles and bending magnets in Ring 2, from May 2013 tunnel survey. Images courtesy of M. McAteer [85, 86].

Figure D. 1 :

 1 Figure C.3: The vertical COD (y avg ) without (a) and with (b) measured COD matching for the lowest (Q y = 4.09) vertical working point. Images courtesy of M. McAteer [86].

Figure D. 2 :

 2 Figure D.2: A "radial" tune scan example around the programmed tunes origin (Q x0 ,Q y0 )=(4.25,4.25) over a 0.2 radius P . The black dots are the measured tune patterns performed at intervals ∆ζ=10°.

1. 11 A

 11 cylindrical beam (left) of length l and radius a with uniform circular crosssection (right) [16]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.12 The non-linear defocusing force produced in the case of a charge distribution with bi-Gaussian transverse profile. The dashed blue line represents the linearized term for small particle amplitudes. . . . . . . . . . . . . . . . . . . . . . 1.13 Typical "necktie" shape of a simulated "footprint": the particles form a tune spread (grey dots). The bare tune (black dot) and the maximum tune shift (red dot) are indicated. The coloured lines represent the resonance lines of Fig. 1.5.

2. 2

 2 The stripping carbon foil[START_REF] Weterings | Possible issues during stripping foil exchange[END_REF]. . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 H -, H 0 and p + yield as a function of the stripping foil thickness at 160 MeV[START_REF] Goddard | Stripping Foil Issues for H-Injection into the CERN PSB at 160 MeV[END_REF].2.4View from top of the future injection "chicane" for the H -injection scheme, defined by the BSW magnets. The beginning of the process with the foil hits by the injected H -beam (red), which is stripped into the circulating H + proton beam (blue). The unstripped H -(light green) and the H 0 (magenta) hit a beam dump inside the BSW4 and are lost. [4]. . . . . . . . . . . . . . . . . . . . . . 2.5 Simulation. The injected beam 6D evolution without (left) and with (right) space charge after 20 turns of injection with central energy modulation. Different colours are the particles injected at every turn. It is clear how the space charge affects transversely the beam. . . . . . . . . . . . . . . . . . . . . . . . 3.1 On the left, a 3D view of the bunch, with line density colour code. On the right, the longitudinal projection of all the particles in a single slice. . . . . . . . . . 3.2 Rms emittance determinations as a function of the machine turns. The results were obtained for different transverse mesh sizes, number of macro-particles and grid type. Legend: A -mesh size 64x64 -number of macro-particles 10 6 (fixed grid); B -mesh size 256 x 256 -number of macro-particles 10 6 (fixed grid); C -64 x 64 -number of macro-particles 500×10 3 (adaptive grid); D -128 x 128 -number of macro-particles 500×10 3 (adaptive grid). . . . . . . . . 3.3 CPU time for the CERN (red) and the CNAF (blue and green) clusters as a function of the number of cores for a typical PSB simulation. The magenta line is the perfect scalability reference line. . . . . . . . . . . . . . . . . . . . 4.1 Horizontal (left) and vertical (right) transverse phase space scatter plots for the normalized (bottom) and un-normalized (top) phase spaces. In red the particles at small transverse amplitude that have been selected for the following analysis.

4. 2

 2 Left: the longitudinal phase-space (φ, ∆E) scatter plot of the bunch (grey).The particles with small transverse amplitudes, at the longitudinal edges of the bunch, are in ∆E colour-code. Right: in colour the position of those particles in the global tune footprint (in gray). The black dot is the bare tune. . . . . . . 4.3 Left: the longitudinal phase-space (φ, ∆E) scatter plot of the bunch (grey). The particles with small transverse amplitudes, around φ = 0, are in ∆E colourcode. Right: the position of those particles in the global tune footprint. The black dot is the bare tune. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4 Left: the longitudinal phase-space (φ, ∆E) scatter plot of the bunch (grey). The particles with small transverse amplitudes, around ∆E=0, are in φ colour-code. Right: the position of those particles in the global tune footprint. The black dot is the bare tune. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5 Left: the longitudinal phase-space (φ, ∆E) scatter plot of the bunch (grey). The particles with small transverse amplitudes, with bigger offset around ∆E = 0, are in φ colour-code. Right: the position of those particles in the global tune footprint. The black dot is the bare tune. . . . . . . . . . . . . . . . . . . . . . 4.6 Left: the longitudinal phase-space (φ, ∆E) scatter plot of the bunch (grey). The particle small synchrotron oscillation is in ∆E colour-code. Right: the modulation of the particle tunes (in colour-code) in the global tune footprint (grey scatter-plot). The black dot is the bare tune. . . . . . . . . . . . . . . . . 4.7 Left: the longitudinal phase-space (φ, ∆E) scatter plot of the bunch (grey). The particle synchrotron oscillation is in ∆E colour-code, covering larger positions in phase-space and, thus, line density. Right: the modulation of the particle tunes (in colour-code) in the global tune footprint (grey scatter-plot). The black dot is the bare tune. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8 Left: the longitudinal phase-space (φ, ∆E) scatter plot of the bunch (grey): the particle synchrotron oscillation is in ∆E colour-code. Right: the modulation of the particle tune (in colour-code) in the global tune footprint (grey scatter-plot) is very close to the bare tune in this case. The black dot is the bare tune. . . . . 4.9 Zoom of the tune footprint close to the bare tune (dot marker). In red the path of a particle performing large synchrotron oscillation. In blue the bare tune. The results were obtained using the PSB natural chromaticity values (ξ x , xi y )=(-0.8, -1.6). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.10 Path of a particle performing large synchrotron oscillations for varying chromaticities. The plots were obtained using different values pairs of the chromaticity components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.11 Half-integer (measurements): waterfall of the longitudinal profile colourplot in the time window [450-620] ms for long (left) and short (right) bunches. The colour-code is the particle line density (blue -low density; red -high density), scaled by the peak line density of the first profile. The comparison of the colourplot with the vertical dashed black lines puts in evidence the bunch shortening in the short bunch case. . . . . . . . . . . . . . . . . . . . . . . . . 5.12 Half-integer (measurements): horizontal (left) and vertical (right) profiles in [450-620] ms for the long bunch case, normalized with respect to the max value. 5.13 Half-integer measurements: horizontal (left) and vertical (right) profiles in [450-600] ms for the short bunch case, normalized with respect to the max value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.14 Half-integer (long bunch simulations): PTC-Orbit simulations vs. measurements. Legend: (A) Simulation without errors but with space charge; (B) Simulation with errors but no space charge; (C) Simulation with only quadrupolar field errors (matching to Q y =4.53) and space charge; (D) Simulation with space charge and quadrupolar field and misalignment errors; (E) Simulation with only quadrupolar field errors (matching to Q y =4.525) and space charge. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.15 Half-integer (long bunch). Simulated horizontal (left) and vertical (right) transverse profiles in [450-620] ms, normalized with respect to the max value. . . . 5.16 Half-integer (long bunch simulations). Simulated beam current waterfall plot with bunch shortening, to be compared with the measurements in Fig. 5.11. The colour-code is the particle line density (blue -low density; red -high density), scaled by the peak line density of the first profile. The vertical dashed black lines represent the initial bunch tails. . . . . . . . . . . . . . . . . . . . . 5.17 Half-integer (short bunch). PTC-Orbit simulations vs. measurements. Grey error bands are measurements, the red solid line represents simulations with misalignment and quadrupolar field errors. . . . . . . . . . . . . . . . . . . . . 5.18 Half-integer (short bunch). Simulated horizontal (left) and vertical (right) transverse profiles in [450-600] ms, normalized with respect to the max value. . . . 5.19 Half-integer (short bunch simulations). Simulated beam current waterfall plot with bunch shortening, to be compared with measurements in Fig. 5.11. The colour-code is the particle density (blue -low density; red -high density). The vertical dashed black lines represent the initial bunch tails. . . . . . . . . . . . 5.20 Losses for different random errors. Legend: (A) Measurements; (B) Simulation with quadrupolar field and misalignment errors; (C) Simulation with only quadrupolar field errors (matching to Q y =4.525); (D) Simulation with only quadrupolar field errors (matching to Q y =4.535); (E) Simulation with random quadrupolar field errors and relative beta beating=3.46% rms; (F) Simulation with random quadrupolar field errors and relative beta beating=19.51% rms. All the simulations include space charge. . . . . . . . . . . . . . . . . . . . . . 5.21 Loss rate vs. vertical beta beating at 130×10 10 p for the different loss profiles. The curves are normalised with respect to the slowest loss rate (green dot). Coloured points are the values of the loss rate for two different beta beating seeds as shown in Fig. 5.20. The gray points are all the other simulated seeds. . 5.22 The synchrotron period variation in a double harmonics RF bucket. . . . . . . . 5.23 Half-integer (long bunch simulations). The loss rate (red) vs. the synchrotron period of the lost particles (blue). One can observe the different regimes before and after 558 ms, where the bunch shortening starts to interest only the particles inside the inner separatrix (with faster synchrotron period). . . . . . . . . . . . 5.24 The PTC-Orbit simulated tune footprint (averaged over 1500 turns) at 485 ms (left) and 565 ms (right), with particle density colour-code (blue, low density -red, high density). The projections of the tunes along the x and y axes are shown: at right, note the narrow peak on the 2Q y =9 line. . . . . . . . . . . . . 5.25 Left: a particle tracked at 485 ms (on the solid magenta line in Fig. 5.14) before getting lost by scattering. The trajectory in the vertical phase space indicates that the particle overcomes the vertical acceptance (at y=±30 mm) of the machine and gets lost. Right: the turn-by-turn tune modulation of the particle around the resonance. The black dot is the bare tune, while the red cross is the averaged tune, sitting on the line. . . . . . . . . . . . . . . . . . . 5.26 Left: a particle trapped into quadrupolar islands in the vertical phase space at 565 ms (on the solid magenta line in Fig. 5.14). Right: the turn-by-turn tune modulation of the particle around the resonance. The black dot is the bare tune, while the red cross is the averaged tune, sitting on the line. . . . . . . . . . . . 5.27 Wirescanner measurements of the horizontal beam profiles and their Gaussian fit for Q x = 4.11 (a), Q x = 4.065 (b) and Q x = 4.044 (c). . . . . . . . . . . . 5.28 The measured horizontal rms emittance vs horizontal tune for constant Q y = 4.21 at 475 ms. From Q y = 4.03 (red marker) losses occur. The relative error is in the order of ±5% (1σ). . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.29 Measured normalized horizontal (empty diamond marker) and vertical (empty circle marker) emittances evolution vs time for different chromaticities: ξ x =-0.73 -blue; ξ x =-0.15 -red. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.42 The horizontal (pink) and vertical (blue) normalized emittances in the case with COD correction. The errorbar is the standard deviation of many measurements. During the losses (from 525 ms to 540 ms) profile measurements could not be taken. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.43 The measured vertical beam profiles before and after the blow-up induced by the resonance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.44 The dynamic approach to Q y =4: intensities vs. time without COD correction. Legend: (A) Measurements; (B) Simulation without space charge; (C) Simulation with direct space charge and no quadrupolar errors; (D) Simulations errorbar with direct space charge and random quadrupolar field errors distributions (see Appendix C); (E) Simulation with measured quadrupolar field errors and direct space charge. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.45 The simulated vertical profiles with un-corrected COD, without (a) and with space charge (b). The dashed lines are the Gaussian fits. . . . . . . . . . . . . . 5.46 The dynamic approach to Q y =4 in case of corrected COD: intensities vs. time with vertical boundaries at ±29.5 mm. Legend: (A) Measurement; (B) Simulation without space charge; (C) Simulation with direct space charge; (D) Simulation with space charge (with boundaries) without field errors; (E) Simulation with space charge (with boundaries) and measured quadrupolar field errors; (F) Simulation with space charge (with boundaries) and random quadrupolar field errors distributions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.47 The dynamic approach to Q y =4: the normalized horizontal (a) and vertical (b) rms emittances evolution in time for the space charge simulations including and excluding the boundaries (±61 mm×±29.5 mm). The simulations represent the case with the vertical steerers ON. Legend -top: (A) Measurements (Gaussian fit); (B) Simulated statistical emittance (with space charge with boundaries); (C) Simulated statistical emittance (direct space charge). Legend -bottom: (A) Measurements; (B) Simulated statistical emittance (with space charge with boundaries); (C) Simulated emittance from Gaussian fit (with space charge with boundaries); (D) Simulated emittance from Gaussian fit (with direct space charge); (E) Simulated statistical emittance (with direct space charge). . . . . . 5.48 (A) Simulation: initial vertical profile at 500 ms; (B) Vertical profile at 560 ms (with direct space charge); (C) Vertical profile at 560 ms (space charge with vertical boundaries at ±40 mm); (D) Vertical profile at 560 ms (space charge with vertical boundaries at ±29.5 mm) . . . . . . . . . . . . . . . . . . . . . . 5.49 The vertical beam profile, its Gaussian fit and residuals after 1000 turns (1 ms).

5. 50

 50 Dynamic integer with COD correction: simulations with different chamber heights. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.51 Vertical coherent tunes waterfall simulations with COD correction. From bottom to top the following space charge modules have been used: vertical boundaries ±40 mm; vertical boundaries ±29.5 mm; direct space charge. The magenta dots represent the peaks in the FFT of the first order momenta. . . . . . . . . . 5.52 Dynamic integer without COD correction: simulations with different chamber heights. On top it is represented the intensity comparison between measurement and simulations for different chamber heights. The statistical rms emittances from the simulations are compared in the central plot and the vertical beam centroid (i.e. the first order vertical beam momentum) is represented in the plot at the bottom. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.53 The "minimum tune" approach (intensity 60 × 10 10 p): measured vertical (blue circles) and horizontal (red circles) tunes vs. cycle time. The programmed horizontal and vertical tunes are represented by dashed red and blue lines, respectively. The measurement at 520 ms showed the same vertical and horizontal tune (blue and red circle). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.54 Measurements (empty markers with error-bars) and simulations (full markers) for the normalized horizontal (blue), vertical (red) and average (orange) emittances evolution in time (Gaussian fit). . . . . . . . . . . . . . . . . . . . . . . 5.55 The simulated single-turn tune footprint at the beginning of the tracking (the colour bar represents the particles density -highest density in red). The black solid lines are the integer and the coupling resonances. The magenta dot is the bare tune. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6. 3

 3 Longitudinal phase spaces after ∼ 2 ms with PyOrbit (left) and BlonD (right). Simulations without longitudinal space charge (top), with a bunch population of 2.95×10 11 p (centre) and with 2.95×10 12 p (bottom). BlonD simulations courtesy of D. Quartullo [72]. . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4 The synchrotron frequency vs. max particle phase between PyOrbit (blue marker) and BlonD (red marker) at different intensities: A -0 p; B -2.95×10 9 p; C -2.95×10 10 p; D -2.95×10 11 p; E -2.95×10 12 p. The initial bunch length is indicated by a vertical grey line and the synchrotron frequency by the horizontal black line (obtained by the analytical formula of Eq. 6.3). BlonD simulations courtesy of D. Quartullo [72]. . . . . . . . . . . . . . . . . . . . . 6.5 Linac4 bunches at injection in the PSB spaced by 2.84 ns. Red -113 keV rms. Blue -336 keV rms. Green -592 keV rms. Data courtesy of A. Lombardi [72]. 6.6 The normalised peak line density vs. turns for the 113 keV and 336 keV rms case -ESME simulations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.7 The initial (left) phase space and after 143 turns (right) for the initial 336 keV rms cases -ESME simulations. . . . . . . . . . . . . . . . . . . . . . . . . . . 6.8 The initial (left) phase space and after 143 turns (right) for the initial 113 keV rms case -ESME simulations. . . . . . . . . . . . . . . . . . . . . . . . . . .

  tangent algorithm. PyOrbit simulations for the 47% chopping factor case (without s. c.) and 403 keV rms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.13 The normalized peak line density with (green) and without (blue) longitudinal space charge (I=3.42×10 12 p), for 403 keV rms and 61% chopping factor settings. PyOrbit simulations. . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.14 The bunch without space charge (left) and with I=3.42×10 12 p (right) for the 474 ns (top) and 609 ns (bottom) injection after 10 ms. The bucket iso-Hamiltonian contours (for a bucket without space charge) are in the background (grey). The black line is the iso-Hamiltonian which encloses the matched area. PTC-Orbit simulations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1 Upper limits for LHC beams: achieved (grey dots), future (50 ns spacing -blue stars, 25 ns spacing -green stars). The dashed grey line is the measured LHC brightness curve scaled by a factor 2. . . . . . . . . . . . . . . . . . . . . . . . 7.2 The KSW offsets decay for the "on-axis" (solid blue line) and "transverse painting" (dashed red line) options. The beam is injected at -35 mm, with respect to the -46 mm imposed by the BSWs, over the first 23 turns to gather I=3.42×10 12 p at 61% chopping factor. . . . . . . . . . . . . . . . . . . . . .

7. 3

 3 The "on-axis" injection simulation results (black for the 61% chopping factor, red for the 47% chopping factor) for the working point(4.28, 4.55). The results for the working point(4.43, 4.60) are in dashed lines. The green stars and the dashed grey line are the LHC 25 ns beam limits, as shown in Figure 7.1. . . . . 7.4 The "on-axis" and the "transverse painting" results starting from 1.3 mm•mrad in filled black dots for (Q x ,Q y )=(4.28, 4.55) and filled black diamonds for the best solution at (Q x ,Q y )=(4.43, 4.60). The green stars and the dashed grey line are the LHC 25 ns limits, as shown in Figure 7.1. . . . . . . . . . . . . . . . . 7.5 The resulting transverse profiles after 10 ms for the "on-axis" injection (top) and the transverse painting solution (bottom) for the case without space charge (blue) and with I=3.42×10 12 p (green). . . . . . . . . . . . . . . . . . . . . . 7.6 The largest tune spread (single-turn computation) after 10 ms for the on-axis injection with programmed tune at (Q x , Q y )=(4.43, 4.6) and I=3.42×10 12 p.

7. 7

 7 Emittance evolution with different chromaticities. Simulations courtesy of E. Benedetto [43]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.8 The simulated final emittances after the injection process without space charge: left -half-sum emittance colour code; right -emittances ratio colour code. The black cross marker at (x, y) = (-80.9, 0) is the closed orbit value. Empty spots reflect unfinished simulations. . . . . . . . . . . . . . . . . . . . . . . . . . . 7.9 The transverse beam profiles after 100 turns with 3 different offsets without space charge: (x, y)=(-80.4,5), top -(x, y)=(-75.9,0), centre -(x, y)=(-80.4,0), bottom. In blue the simulated profiles, in red the Gaussian fit curve, in gray the residuals between the two. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.10 Parametric study of the standard deviation of the residuals between the transverse profiles and their Gaussian fits. The black cross marker at (x, y)=(-80.9, 0) is the closed orbit value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.11 The simulated final emittances after the injection process with space charge (with intensity I=3.42×10 12 p): left -half-sum emittance colour code; rightemittances ratio colour code. Empty spots reflect unfinished simulations. The black cross marker at (x, y)=(-80.9,0) is the closed orbit value. . . . . . . . . . 7.12 The transverse beam profiles after 10 000 turns with 3 different offsets, with space charge: (x, y)=(-80.4, 5), top -(x, y)=(-75.9, 0), centre -(x, y)=(-80.4, 0), bottom. In blue the simulated profiles, in red the Gaussian fit curve, in gray the residuals between the two. . . . . . . . . . . . . . . . . . . . . . . . . . . 7.13 Parametric study of the standard deviation of the residuals between the transverse profiles and their Gaussian fits for most of the considered mismatched profiles with space charge (intensity I=3.42×10 12 p). . . . . . . . . . . . . . . 7.14 Half-sum of the normalized transverse emittances vs. time for different mismatches with space charge (intensity I=3.42×10 12 p). The dashed red line is the HL-LHC limit emittance at 1.7 mm•mrad [7]. . . . . . . . . . . . . . . . . 7.15 Half-sum emittances (left) and the correspondent simulated maximum tune shifts after 10 ms tracking (right): the maximum tune shifts never overcome the coupling line. The magenta cross (right) is the injection bare tune, while, on the left, the black cross marker at (x, y)=(-80.9,0) is the closed orbit value. . 7.16 Normalized emittances evolution vs time for the entire capture process (10ms) -right. A zoom of the first 100 turns -right. The coupling effect starts before the end of the accumulation process (23 turns). . . . . . . . . . . . . . . . . . 7.17 The space charge averaged tune spread in the case with injection very far to the closed orbit at (x, y)=(-73.9, 0) in the (Q x , Q y ) working plane. The colourcode is the particle density (blue -small density; red -high density). The magenta dot is the injection tune and the lines are the important resonances in the machine. Top: the projection of the particles tune spread along the Q x axis. Right: the projection of the particles tune spread along the Q y axis. Top-right: the 45°projection, along the orthogonal direction with respect to the coupling line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.18 The space charge averaged tune spread in the case with injection very far to the closed orbit at (x, y)=(-80.4, 0) in the (Q x , Q y ) working plane. The colourcode is the particle density (blue -small density; red -high density). The magenta dot is the injection tune and the lines are the important resonances in the machine. Top: the projection of the particles tune spread along the Q x axis. Right: the projection of the particles tune spread along the Q y axis. Top-right: the 45°projection, along the orthogonal direction with respect to the coupling line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.19 The particles selected on the average tunes around the coupling resonance for the case with smaller tune spread injecting at (x, y)=(-73.9, 0), left, and for the larger tune spread at (x,y)=(-80.4, 0), right. In both the plots, there are no particles around the inner separatrix because, in this region, the algorithm for the computation of the synchrotron period T synch fails. . . . . . . . . . . . . . 7.20 Case 1. The phase advance per turn of a particle which moves in the tune diagram far from the coupling resonance. The magenta dot is the average phase advance over the particle synchrotron period (in colour-code). . . . . . . . . . 7.21 Case 1. 4D Poincaré maps in different planes (top). Horizontal and vertical phase space versus time over one synchrotron period (bottom). . . . . . . . . .

  12 , to be doubled for the future HL-LHC operations. The transverse emittances are around 2 mm•mrad for each plane, and the longitudinal emittance is ∼1 eVs. The injection tunes are chosen to be as far as possible from the dangerous integer resonances in order to host

a large tune spread: they are placed at (Q x , Q y )∼(4.3, 4.5).

Table 2 .

 2 1: The CERN PS Booster main characteristics today and after the upgrade.

	Value

Table 3 . 1 :

 31 The optimal parameters from the convergence study.

	Method	N mp	N sc N x × N y N z
	Direct space charge (adaptive grid) 500×10 3 199 64 × 64	128
	With boundaries (fixed grid)	1×10 6	199 256 × 256 128

Table 3

 3

	.2 summar-

Table 3 .

 3 2:The CNAF best performances for the PSB with only physical cores and removing the Hyperthread and the Standard Output which were slowing down the performances.

	# cores # hosts CPU time per turn (s) speedup efficiency (%)
	1	1	120	1.00	100.00
	16	1	8.5	14.12	88.24
	32	2	4.7	25.53	79.79
	48	3	5.3	22.64	47.17
	64	4	4.1	29.27	45.73
	80	5	3.46	34.68	43.35
	96	6	3	40.00	41.67
	112	7	2.68	44.78	39.98
	128	8	2.45	48.98	38.27
	144	9	2.27	52.86	36.71
	160	10	2.11	56.87	35.55

Table 5 .

 5

	1: The maximum chromatic de-tuning for tunes (4.2, 4.31), max ∆p/p=5×10 -3 and for 3
	sextupole current settings
	[A]	ξ x	ξ y	∆Q x	∆Q y
	85 -0.0026 -3.26	0	±0.071
	0	-0.82	-1.6 ±0.017 ±0.035
	-80	-1.6	-0.02 ±0.034	0

Table 5 .

 5 2: PSB ring 2 correctors (with nominal current settings at 160 MeV). The magnets are named as in the control room application.

	Magnet name	Magnet type	Resonance lines	Current [A]
	QNO412L3, QNO816L3	Normal quadrupole	2Q y =9	-0.5, 2.09
	XNO4L1, XNO12L1	Normal sextupole Q x +2Q y =13, 3Q x =13 6.94, -20
	XSK6L4, XSK2L4, XSK11L4 Skew sextupole 2Q x +Q y =13, 3Q y =13 -4, 4, 12

Table 5 .

 5 3: Half-integer case -measured initial beam parameters.

	Initial beam parameters	long bunch	short bunch
	Intensity [10 12 p]	1.39	1.32
	x , y [mm•mrad]	2.64, 2.05	3.24, 2.13
	RF voltage (h=1, h=2) [kV]	8, 8	8, 8
	RF cavities relative phase	π	0
	Total bunch length [ns]	634	400
	Momentum spread (1σ)	1.35×10 -3	2×10 -3
	Tune Q x , Q y	4.28, 4.53	4.28, 4.53
	Max space charge tune shift -Eq. (1.67) ∆Q x , ∆Q y	-0.17, -0.2	-0.26, -0.36

Table 5 .

 5 4: Simulation settings for the half-integer case.

	Long. space charge	ON (128 bins)
	Transv. space charge	PIC w/o boundaries
	N. of bins [x, y]	128, 128
	N. of macrop.	500×10 3
	N. of space charge nodes	201
	5.4.2.1 Long bunch

Figure 5

.14 shows the simulated intensity evolution compared with the measurements, in case of the long bunch. The simulations are terminated when an apparent steady state situation occur. One should note that all the ingredients need to be included in the simulations. Here, if no errors are included, space charge alone does not drive losses (blue line). If errors are included-but no space charge, the losses are due only to chromaticity and saturate (green line).

Table 5 .

 5 5: Horizontal integer case -measured initial beam parameters at (Q x , Q y ) = (4.11, 4.21).

Table 5 .

 5 6: The Q x =4 resonance (lower intensity): initial parameters

	Initial beam parameters	Horizontal integer
	Bunch population [10 12 p]	0.695
	x , y [mm•mrad]	1.67, 1.6
	RF voltage (h=1, h=2) [kV]	8, 8
	RF cavities relative phase	π
	Total bunch length [ns]	630
	Momentum spread (1σ)	1.445×10 -3
	Tune Q x , Q y	4.06, 4.29
	Max space charge tune shift -Eq. (1.67) ∆Q x , ∆Q y	-0.11, -0.13
	Chromaticity ξ x , ξ y	-0.73, -1.7 -0.15, -2.8

Table 5 .

 5 7: The Q x =4 resonance -Simulation parameters.

	Simulation parameters
	Long. space charge	ON (128 bins)
	Transv. space charge	PIC w/o boundaries
	N. of bins [x, y]	128, 128
	N. of macrop.	500×10 3
	N. of space charge nodes	201

Table 5 .

 5 8: Dynamic vertical integer resonance: measured initial parameters.

Table 5 .

 5 9: Simulation settings for the dynamic integer case (with and without boundaries).

	N. of macrop.	500×10 3
	N. of space charge nodes	201
	Long. space charge	ON (128 bins)
	Transv. space charge model	PIC without boundaries
	N. of bins [x, y]	128, 128
	Transv. space charge model	PIC with boundaries
	Chamber type	Rectangular
	Chamber size	±61 mm × ±29.5 mm (±40 mm)
	N. of bins [x, y]	256, 256
	5.6.2.1 Without COD correction

Table 6 .

 6 1: The 336 keV rms case with different chopping factors (without longitudinal space charge).

	Chopping factor	Min-max total b. length [ns] after 10 ms	Min-max matched area [eVs]	Foot-tangent total b. length [ns] after 10 ms	Foot-tangent matched area [eVs]
	39%	540	0.7	510	0.6
	44%	546	0.7	514	0.63
	47%	547	0.8	520	0.65
	63%	672	1.3	583	1

Table 6 .

 6 2: The final (foot-tangent) bunch lengths and matched areas for the 47% and 61% chopping factors (403 keV rms) after 10 ms.

	Chopping factor		Total bunch length [ns] rms bunch length [ns] Matched area [eVs]
	47%	Without space charge	552	138	0.8
		I=3.42×10 12 p	572	143	1
	61%	Without space charge	609	149	1.1
		I=3.42×10 12 p	602	152	1.1

Table B .

 B 1: Static vertical integer resonance: initial beam parameters.

	Initial beam parameters	Close to Q y = 4
	Bunch population [10 12 p]	1.66
	x (rms), y (rms) [mm•mrad]	3.7, 7.13
	RF settings (h=1, h=2) [kV]	8, 8
	RF cavities relative phase	π
	Total bunch length [ns]	634
	Momentum spread (1σ)	1.40×10 -3
	Tune Q x , Q y	4.21, 4.08
	Max space charge tune shift -Eq. (1.67) ∆Q x , ∆Q y	-0.11, -0.09

Acknowledgements

I would like to thank my supervisors: Elena Benedetto and Claudio Santoni, for following and supporting me with passion, motivation and patience. Their guidance helped me a lot during the Ph.D. studies and the writing of this thesis. I would also like to thank Christian Carli, my first

Chapter 9

Appendix A

The Hamiltonian formalism

The advantages of using the Hamiltonian formalism are many:

• the approach is fully generic, treating linear and non-linear forces;

• it solves non-linear problems without restrictions to small perturbations;

• when using a complete set of canonical variables, aiming to phase space transformations, the approach is symplectic;

• It gives both explicit solutions and invariants of motion.

The general perturbation problem can be stated as follows: given the general solution for the canonical Equations in case of unperturbed motion,

it is required to obtain the motion for the total Hamiltonian H = H 0 (q i , p i , t) + H 1 (q i , p i , t)

where H 0 is the unperturbed and H 1 is the perturbed component of the motion.

In the following the procedure is applied to describe the motion of charged particles in a circular machine.

Since the bending radius ρ is large, the effect of curvature can be neglected and the Hamiltonian in the variables x, y and θ can be written as follows:

where:

• Φ is the electric potential;

• A x,y,θ are magnetic potential vector components;

• p x,y,θ are the momentum vector components.

The Hamiltonian is here associated with two-dimensional motions in the presence of an electromagnetic field, so in this case the Hamiltonian theory can be applied with n=2 and the positions q and momenta p can be chosen as follows:

A.1 The unperturbed motion

Using the Eq. (A.3) it is possible to derive the Hamiltonian for the unperturbed motion H 0 . In presence of dipolar and quadrupolar components to stabilize the transverse motion of particles, the fields are considered up to the linear term, which requires a quadratic potential vector A.

Since these fields have to be transverse, the only component of the potential which is different from zero is the longitudinal one:

where G 1 and G 2 are gradients which are functions of θ. Due to the fact that the electric field is supposed to be null, the Eq. (A.3) for the unperturbed motions gets simplified:

|Bρ| . Applying the general solution of the canonical Equations (A.1) one obtains the Hill's Equations, similar to (1.6), in the form of a first order differential equation system:

Due to the fact that the electromagnetic fields have the ring periodicity in a circular accelerator, a development in Fourier series of the function U is possible:

where

Plugging Eq. (A.13) into Eq. (A.12), one has:

The expansion of the Hamiltonian presents frequency terms:

In the assumption that the amplitudes of a 1 and a 2 change little in an oscillation or turn, these changes occur at low frequencies. At zero frequency, for example:

and for the terms in which the wave numbers Q x and Q y satisfy:

where n x , n y , p are integers (A.17) being j -k = ±n x , l -m = ±n y and q = ∓p. This equation represents dangerous resonance lines in the tune diagram.

For further details and a more complete treatment, the reader is referred to [START_REF] Guignard | A General Treatment of Resonances in Accelerators[END_REF][START_REF] Schoch | Theory of linear and non-linear perturbations of betatron oscillations in alternating-gradient synchrotrons[END_REF]. The longitudinal profiles are for long bunches. The results presented here were obtained using the long beam setting V h1 = 8 kV and V h2 = 8 kV in anti-phase. The initial emittance is much higher in the vertical plane than in the horizontal, approaching the final working point starting from the coupling line. The beam size is comparable to the minimum physical vertical aperture (∼ ±30 mm in the PSB). Table B.1 summarizes the beam parameters.

B.3 Longitudinal space charge

The longitudinal space charge has the effect of inducing bunch lengthening. Beam current profile measurements have been taken at 50 MeV for the first 10 ms from the present injection process: the RF capture at the present injection process and s.c. induced bunch lengthening, varying the number of injected turns, has been analyzed. McAteer [START_REF] Forte | The CERN PS Booster Space Charge Simulations with a Realistic Model for Alignment and Field Errors[END_REF][START_REF]The CERN PS Booster Space Charge Simulations with a Realistic Model for Alignment and Field Errors[END_REF].

Appendix D

Design and implementation of "radial" tune scans

A novelty that has been introduced in the tune scans technique, during the work for this thesis, is the "radial" tune scan, implemented in collaboration with E. Matli (CERN Operations team) [START_REF] Forte | Space charge studies in the PSB -MD report[END_REF].

It is known that resonance lines interact with the beam in different ways depending on the direction they are crossed. The Cartesian method allows only two directions of crossing, i.e. along vertical or horizontal paths.

The radial scan, instead, makes every directional approach possible, because it is based on tune paths moving radially from the center C, along a certain radius P, covering an arbitrary angle span ζ inside [0,360]°, at fixed steps of ∆ζ. The radial scan could also facilitate, in the future, the tune paths optimization during the operations in control room.

Appendix E Vertical COD correctors currents

The DVT correctors currents in the 160 MeV plateau are summarized in the following table.

These correctors have been used in the dynamic vertical integer benchmarking of Section 5.6.

Magnet name Current [A]