Contents: 1. Introduction ______3 2. ______4 2.1. General remarks on the calculation of magnetic fields ______4 2.2. Particle Beam Guidance ______8 2.3. Particle Beam Focusing ______10 2.4. Correction of Chromatic Errors ______14 2.5. Multipole Field Expansion ______17 2.6. Effective Field length ______21 3. Linear Beam Optics ______22 3.1. Equations of Motion in a moving Reference System ______22 3.2. Matrix Formalism ______27 3.2.1. Drift Space ______28 3.2.2. Dipole Magnets ______29 3.2.3. Quadrupole Magnets ______39 3.2.4. Particle Orbits in a System of Magnets ______41 3.3. Particle Beams and Phase Space ______43 3.3.1. Beam Emittance ______43 3.3.2. Twiss Parameters ______47 Terascale Accelerator School 2008 1 W. Hillert Accelerator Physics

3.3.3. Betatron Functions ______50 3.3.4. Transformation in Phase Space ______53 3.3.6. Dispersion Functions ______57 3.3.7. Path Length and Momentum Compaction ______59 4. Circular Accelerators ______61 4.1. Periodic Focusing Systems ______61 4.1.1. Periodic Betatron Functions ______61 4.1.2. Stability Criterion ______63 4.1.3. General FODO Lattice ______65 4.2. Transverse Beam Dynamics______68 4.2.1. Betatron Tune ______68 4.2.2. Filamentation ______69 4.2.3. Normalized Coordinates ______70 4.2.4. Closed orbit distortions ______71 4.2.5. Gradient Errors ______75 4.2.6. Optical Resonances ______78 4.2.7. Chromaticity ______81 4.3. Longitudinal Beam Dynamics ______86 4.3.1. Equation of Motion in Phase Space ______86 4.3.2. Small Oscillation Amplitudes ______89 4.3.3. Large Amplitude Oscillations ______93

Terascale Accelerator School 2008 2 W. Hillert Accelerator Physics

1. Introduction

Particles in electric and magnetic fields: Lorentz-force F = eE⋅+×( v B)

Energy increase is related to longitudinal electric fields: ⎛⎞ F iids= e⋅+×=⋅=⋅⎜⎟ E ds(v B) i ds e E ds e U ∫∫∫⎝⎠ ∫ Beam deflection due to perpendicular fields, has to cancel centrifugal force: ! v2 FmceEcBm==⋅+×=γβ β γ() ⊥⊥⊥00R Electric stiffness and magnetic stiffness: 1 epeR B == R E ⊥ v ⊥

Ultrarelativistic particles: v ≈ c ⇒⇔RB⊥ =1Tm RE⊥ ≈ 300 MV m

Terascale Accelerator School 2008 3 W. Hillert Accelerator Physics

2. Magnets

2.1. General remarks on the calculation of magnetic fields The calculation of magnetic fields is based on Maxwell’s equation ∇ ×=H j . We are interested in the magnetic field close to the particles orbit where j = 0 , thus yielding ∇ ×=H 0 . H may therefore be expressed in terms of a scalar potential ϕ by H = −∇Φ , giving ΔΦ=0 . The magnetic field usually is generated by an electrical current I in current carrying coils surrounding poles made of ferromagnetic material. A ferromagnetic re- turn yoke surrounds the excitation coils providing an efficient return path for the magnetic flux.

Terascale Accelerator School 2008 4 W. Hillert Accelerator Physics

The magnetic potential Φ is defined by its equipotential lines in the transverse plane and therefore by the surface of the ferromagnetic poles. Due to the relation B = μμ0 r H , the magnetic field in the gap of a magnet may be calculated from a closed loop integral nI⋅= Hds ⋅ = H ⋅ ds + H , ∫ ∫∫0 E gap yoke

Terascale Accelerator School 2008 5 W. Hillert Accelerator Physics where n is the number of windings and I the current of the excitation coil of the mag- net. At the surface of the magnetic poles, the continuity relation gives 1 HHEE=⇒00 HH . μr

Assuming a very large permeability μr , the second integral term may be neglected. We finally obtain for the magnetic field inside the gap B ⋅ ds=⋅⋅μ n I ∫ 0 gap

Concentrating on the major types of magnets (so called upright magnets) mainly used in particles accelerators and beam transport lines, it is sufficient to define the vertical component Gxz () of the magnetic field along the horizontal axis of the magnet (where we put z = 0 ) and to assume a constant field distribution along the longitudin- al axis (∂Bs∂=0 ). This leads to the set-up

Terascale Accelerator School 2008 6 W. Hillert Accelerator Physics

Bzz(,)xz= G () x + f ()z , and with B = −∇Φ , one has Φ(,)xz=− B ⋅ dz =− G () x ⋅ z −f ()zdz ⋅ , ∫ zz∫ and therefore dG2 () x dfz () ΔΦ=−z z − =0 dx2 dz

dG22() x 1 dG () x ⇒=−⋅=−f ()zzdzzzz2 ∫ dx222 dx Finally, we obtain for the scalar potential of the magnetic field:

1()dG2 x Φ(,)xz=− G () x ⋅ z +z ⋅ z3 z 6 dx2

Terascale Accelerator School 2008 7 W. Hillert Accelerator Physics

2.2. Particle Beam Guidance Guide fields are used to deflect particles along a predefined path. These fields, gener- ated by Dipole Magnets have to be homogenous, leading to the set-up dG2 () x Gx( )= B=⇒ const.z = 0 z 0 dx2 The corresponding magnetic potential follows to

Φ(,)xz=− B0 ⋅ z, defining the profile of the magnet poles to flat parallel poles at a distance h:

Terascale Accelerator School 2008 8 W. Hillert Accelerator Physics

Typical types of dipole magnets are the C-Magnet, the H-Magnet and the Window- Frame Magnet:

C-Magnet H-Magnet Window-Frame Magnet

The magnetic field inside the gap is related to the current of the coils by nI⋅ B = μ 00h The strength of a is usually normalized to the particles momentum, giving the inverse bending radiusκ 1 R or the curvature κ : 1 eenIμ ⋅ ==B = 0 R pph0

Terascale Accelerator School 2008 9 W. Hillert Accelerator Physics

2.3. Particle Beam Focusing Focusing fields are used to keep the particle beam together and to generate specifical- ly desired beam properties at selected points along a beam transport line. We need a magnetic field which increases linearly with increasing distance from the axis, leading to the set-up: ∂ B Gx()=⋅ gx with g = z z ∂ x generated by Quadrupole Magnets. The corresponding potential follows to Φ(,)xz =−g ⋅xz ⋅ , defining the profile of the magnet poles to four hyperbolic poles Φ a2 zx()=±0 =± g ⋅ xx2

at a distance a =Φ2 0 g from the axis.

Terascale Accelerator School 2008 10 W. Hillert Accelerator Physics

The magnetic field inside the gap is determined from the gradient of the magnetic ∂Φ ∂Φ potential, giving: Bg= −=⋅zBand =−=⋅g x xz∂∂xz

The “restoring” force acting on the particles is F =⋅eBe(vv ×) =g ⋅()xeˆˆx − zez

A is therefore focusing only in one plane and defocusing in the other; depending on the sign of g.

Terascale Accelerator School 2008 11 W. Hillert Accelerator Physics

The g-parameter may be related to the current of the coils by evaluating the closed 12 01 loop integral n⋅=⋅= I H ds H ⋅+ ds H ⋅+ ds H ⋅≈ ds H ⋅ ds, ∫∫∫∫∫000E 01 20

g 2⋅ μ0 ⋅⋅nI One obtains with Hds⋅= rdr ⋅: g = 2 μ0 a Again we would like to normalize g to the particles momentum, giving the quadru- eenI2 μ ⋅ pole strength k: kg== 0 ppa2

Terascale Accelerator School 2008 12 W. Hillert Accelerator Physics

The focal length of a thin quadrupole magnet of length L can be derived from the def- lection angle α of the particles beam and its relation to the quadrupole strength k,

x tanα = f LLe tanα == =g xL = xkL RpeBp()z

1 giving: = kL⋅ f

Here we have assumed the length L to be short compared to the focal length f such that R does not change significantly within the quadrupole magnetic field.

Terascale Accelerator School 2008 13 W. Hillert Accelerator Physics

2.4. Correction of Chromatic Errors To correct focusing errors of the quadrupole magnets we need the nonlinear magnetic fields of Sextupole Magnets, in which the field increase is quadratic with increasing distance from the axis: 1()∂22B dG x Gx( )=⋅ gx ´2 with g ´ =zz = z 2 ∂ xdx22 This setting yields f ()z ≠ 0!

We will therefore expect a coupling of particles motion in the horizontal and vertical plane due to the z-dependence of the vertical field. From the potential equation we obtain 1 Φ(,)xz =⋅−⋅⋅g ´()zxz32 3 , 6 defining the profile of the magnet poles to

Terascale Accelerator School 2008 14 W. Hillert Accelerator Physics

zza2232Φ xz()=± ±0 =± ± 3´g zz 33

3 at a distance a =Φ6´0 g from the axis.

Terascale Accelerator School 2008 15 W. Hillert Accelerator Physics

Again the magnetic field is determined from the gradient of the magnetic potential, giving: ∂Φ ∂Φ 1 B (,)xz =− =g ´xz and B (,) x z =− =g ´()xz22 − xz∂∂xz2

The g’-parameter may be related to the current of the coils in the same manner as it was derived for the quadrupole magnets, yielding ∂2 B nI g´6==z μ ∂ xa230 Normalizing g’ to the particles momentum, we obtain the sextupole strength eenI6 μ mg==´ 0 . ppa3

Terascale Accelerator School 2008 16 W. Hillert Accelerator Physics

2.5. Multipole Field Expansion We will now derive a general form of the magnetic potential Φ using a cylinder coordinate system, in which the Laplace equation reads ∂Φ22211 ∂Φ ∂Φ ∂Φ ΔΦ= + + + =0 ∂∂∂∂rrrr2222ϕ z A useful setup of Φ is a Taylor expansion with respect to the reference path (r=0), neglecting the z-dependence of the magnetic potential:

1 ninϕ Φ=−(,rcrerϕ )∑∑nn =Φ (,ϕ ) nn>>00n! Inserting this set-up into the Laplace equation, we get 1(nn−+− 1) n n2 creninϕ 0 ∑ 2 n = n nr!

Every multipole Φn is therefore a valid solution of the Laplace equation.

Terascale Accelerator School 2008 17 W. Hillert Accelerator Physics

In cartesian coordinates, the multipoles of the magnetic potential read

n ccnnnknk− Φ=−+=−n (,)xz() x iz∑ x() iz nnkk!!!k=0 −⋅() Both the real and imaginary solutions are independent solutions:

n /2 k (−1) nk−22 k Re[]Φ=−⋅nn (xz , ) ∑ a ⋅⋅ x z k=0 ()()nk−⋅2!2! k

k−1 ()n+1/2 ()−1 ImΦ=−⋅ (xz , ) b ⋅⋅ xnk−21+− z 21 k []nn∑ ()() k=1 nk−+⋅−21!21! k Real and imaginary solutions differentiate between two classes of magnet orientation: • the imaginary solution has mid plane symmetry ImΦ (xz , )=− Im Φ ( x , − z ) and no horizontal field components in the mid plane → upright magnets • the real solution has mid plane symmetry ReΦ=+Φ− (xz , ) Re ( x , z ) and not vanishing vertical field components in the mid plane → rotated magnets

Terascale Accelerator School 2008 18 W. Hillert Accelerator Physics

The magnetic field components for the nth order multipoles are derived from upright magnets: rotated magnets: ∂ ∂ ∂∂ BB=−Im Φ , =− Im Φ BB= −ΦRe , =−Φ Re nx∂∂xz nz nx∂∂xz nz

A particle traveling in the horizontal mid plane through an upright magnet will re- main in the horizontal plane! We finally derive for the potential Φ and the magnetic field B of the nth multipole by setting aepSnn= −⋅, bepSnn= ⋅ with the multipole strengths Skmrn = −κ,, ,:

− e Φ=κ x −κ z Dipole p 1 z x −Φ=e −−1 k x22z + kxz Quadrupole p 2 2 ( ) −Φ=e − 1 mx3 − 3 xz2 +−1 m 3x23zz Sextupole p 3 6 ( ) 6 ( ) −Φ=e −+1 rx42− 6 xz2 z 4+ 1 r xz3 − xz3 Octupole p 4 24 ( ) 6 ( )

Terascale Accelerator School 2008 19 W. Hillert Accelerator Physics

Upright Magnets: e B =−κ eˆ Dipole p 1 x z e B =+kzeˆˆ kxe Quadrupole p 2 x z e B =+mxzeˆˆ1 m x22 − z e Sextupole p 3 x 2 ( ) z e B =−+−11rxzze3323ˆˆ rx 3 xze 2 Octupole p 4 66( ) x ( ) z

Rotated (Skew) Magnets: 0 e B = κ eˆ Dipole (90 ) p 1 zx 0 e B =−kxeˆˆ + kze Quadrupole (45 ) p 2 x z 0 e B =−1 mx22 − z eˆˆ + mxze Sextupole (30 ) p 3 2 ( ) x z 0 e B =−11rx32 −33 xzeˆˆ + r xz 23 − z e Octupole (22,5 ) p 4 66( ) x ( ) z

Terascale Accelerator School 2008 20 W. Hillert Accelerator Physics

2.6. Effective Field length The assumption of a constant field distribution along the longitudinal axis (∂∂=Bs0 ) is not valid in general due to the fringing fields at the end of the magnets. In order to simplify the calculation of the optics of particle accelerators, an effective field length leff of each magnet is usually defined, calculated from the path-integral

∞ B ⋅ ds=⋅ B l ∫ 0 eff −∞

and approximating the real longitudinal field by a rectangular shaped profile.

Terascale Accelerator School 2008 21 W. Hillert Accelerator Physics

3. Linear Beam Optics

3.1. Equations of Motion in a moving Reference System In order to have a meaningful formulation of the particles trajectories in the vicinity of a once defined ideal path, we will use a moving orthogonal, right-handed coor- dinate system (x, s, z) that follows an ideal particle traveling along its ideal path:

We will concentrate on ideal orbits, laying within the horizontal plane, therefore r = (Rxe+ )⋅ ˆx + z ⋅ eˆz

Terascale Accelerator School 2008 22 W. Hillert Accelerator Physics

Using this reference systemϕ moving with s = R ⋅ϕ , we obtain the following time de- rivatives of the coordinate vectors

ϕ 2 s s ⎫ 2 ⎛⎞ eˆ = ++ eeˆˆ= eeˆx =−ϕ ˆxx =−⎜⎟ eˆ x ssR ⎪ ⎝⎠R ⎬ ⇒ s 2 ⎪ 2 ⎛⎞s eˆs ==−− eeˆx ˆx ˆˆ ˆ ⎪ ees =− ϕs =−⎜⎟ es R ⎭ ⎝⎠R eˆz = 0 dx ds dz ds and by using xxs=⋅=⋅´ , zzs = ⋅=⋅´ , we obtain ds dt ds dt

⎛⎞x r =+xse´ ˆx ⎜⎟1+ seˆs +zse´ ˆz ⎝⎠R ⎧⎫ ⎧⎫2 ⎪⎪2 ⎧ ⎫ ⎪⎪2 ⎛⎞xs ⎪⎪s ⎛⎞x ⎪ 2 ⎪ r =+⎨⎬xs´´ −+⎜⎟1 +xs´ eˆx ⎨⎬2 xe´ + ⎜⎟1´+ s ˆs + ⎨zs´´ + zs ⎬eˆz RR R R ⎩⎪⎪⎝⎠ ≈≈00⎭ ⎪⎪⎝⎠ ⎪⎩ ⎭⎪ ⎩⎪⎪≈0 ⎭ Terascale Accelerator School 2008 23 W. Hillert Accelerator Physics where we neglect the second derivatives s due to very slow changes of the longitu- dinal component of particles velocity. We will further concentrate on linear magnetic fields, generated by upright dipole and quadrupole magnets: e ⎧ 1 ⎫ B =+k z eˆx ⎨−+kx⎬ eˆz , p0 ⎩⎭R and from simple geometrical considerations, we may link v to s :

sR = ϕ,v=+( Rx)ϕ Rx+ ⎛⎞ x ⇒=v1s =+⎜⎟s RR⎝⎠

and for pm=⋅≈v p0 we have 11⎛⎞Δp ≈−⎜⎟1 pp00⎝⎠ p

Terascale Accelerator School 2008 24 W. Hillert Accelerator Physics

The particles are deflected due to the Lorentz force mr⋅ =⋅ e(r × B), thus

⎛⎞xs2 ⎛⎞x 2 ⎛⎞ ⎛⎞ ⎜⎟xs´´−+⎜⎟ 1 ⎜⎟⎜⎟1+ sBz ⎜⎟⎝ RR⎠ ⎜⎟⎝⎠R 2 e ⎜⎟2 xs´ R =⋅⎜⎟szB()´´xz −xB ⎜⎟m ⎜⎟ 2 ⎛⎞x ⎜⎟zs´´ ⎜⎟−+1 s B ⎜⎟⎜⎟⎜⎟x ⎝ ⎠ ⎝⎠⎝ R ⎠ Usually, the effect of particle deflection on the longitudinally velocity may be neg- lected due to small deflection angles. We will concentrate on the transverse planes. With the corresponding multipole strengths and the momentum expansion we get

2 ⎛⎞x 1vex ⎛⎞p0 ⎛⎞1 ⎛⎞⎛⎞ x 1⎛⎞Δ p xkx´´−+⎜⎟ 1 = ⎜⎟ 1 +⎜⎟kx − = ⎜⎟⎜⎟ 1 + −⎜⎟ 1 − R RspR eR R R p ⎝⎠ ⎝⎠⎝ ⎠ ⎝⎠⎝ ⎠⎝⎠0 =Bz 2 exv ⎛⎞p0 ⎛⎞ x⎛⎞Δ p zkz´´=−⎜⎟ 1 +kz =− ⎜⎟ 1 +⎜⎟ 1 − sp Re R p ⎝⎠ ⎝⎠ ⎝⎠0 =Bx Terascale Accelerator School 2008 25 W. Hillert Accelerator Physics

Neglecting all nonlinear terms in x,, z andΔ p p0 , we obtain the linear equations of motion of a particle traversing through a system of magnets, the Hill equations:

⎛⎞11Δp xs´´( )+−⋅=⎜⎟2 ks ( ) xs ( ) ⎝⎠R ()sRsp ()

zs´´( )+⋅ kszs ( ) ( ) = 0

Note that these equations were derived for upright magnets only!

Terascale Accelerator School 2008 26 W. Hillert Accelerator Physics

3.2. Matrix Formalism We will characterize a particles state by a vector built from its relative coordinates: ⎛⎞x ⎛radial displacement ⎞ ⎜⎟ ⎜ ⎟ ⎜⎟x´radial ⎜angular displacement ⎟ ⎜⎟z ⎜axial displacement ⎟ X ==⎜⎟ ⎜ ⎟ ⎜⎟z´ ⎜ axial angular displacement ⎟ ⎜⎟s ⎜longitudinal displacement ⎟ ⎜⎟ ⎜ ⎟ ⎝⎠δ ⎝relative momentum deviation ⎠ Matrix formalism to describe particles trajectories: XX= M ⋅ 0 . Upright magnets:

xx xx´ 0 x ⎛⎞rr11 12 000r16 ⎛⎞00 δ ⎜⎟ ⎜⎟r r 000r xx´´ xx´ 00 0 x´ ⎜⎟21 22 26 ⎜⎟δ

⎜⎟00r33 r 34 00 ⎜⎟00 zz zz´ 00 M ==⎜⎟⎜⎟ 00r r 00 00z´´zzz´ 00 ⎜⎟43 44 ⎜⎟ ⎜⎟rr001 r ⎜⎟sx sx´ 00 ss sδ ⎜⎟51 52 56 ⎜⎟ ⎝⎠00000 1 ⎝⎠00 00 0 δ δ Terascale Accelerator School 2008 27 W. Hillert Accelerator Physics

3.2.1. Drift Space Due to 1()()0Rs== ks , the equations of motion transform to xs´´( )= zs ´´( )= 0 .

This gives xs´( )= x0 ´= const., zs´( )== z0 ´ const. For the longitudinal coordinate, we have for a drift of length L L Δv1ΔΔppLδ sll=−00 =()()vv − ⋅= t vv − 0 = L = L =22 L = vv00 β ⋅∂()pp ∂βγ γ Combining these two relations, we obtain the transformation for a drift space:

⎛⎞1 L 00 00 ⎜⎟ ⎜⎟01 00 00 ⎜⎟ ⎜⎟001 L 00 M = drift ⎜⎟000 1 00 ⎜⎟ ⎜⎟2 ⎜⎟00 00 1 L γ ⎜⎟0 000 ⎝⎠01 Terascale Accelerator School 2008 28 W. Hillert Accelerator Physics

3.2.2. Dipole Magnets Assuming a constant bending radius within the magnet, we have k = 0. Therefore, zs´( )== z0 ´ const. Thus in the vertical plane a dipole acts like a drift space if we neg- lect fringe field effects. The homogenous equation of motion for the horizontal plane (Δpp= 0 ) is solved by

xs()=⋅ a coss +⋅ b sin s h ( R) ( R) For a given (and therefore constant) δ = Δpp, a particular solution of the inhomo- geneous equation of motion is xsD ()= R⋅δ . This gives the general solution

xs()= x () s+=⋅+⋅+⋅ x () s a cosss b sin Rδ hD ( RR) ( ) The integration constants a, b are derived from the boundary conditions at s = 0 b xs(0)= =+⋅= a Rδ x ,´(0) x s = = = x ´, 00R

Terascale Accelerator School 2008 29 W. Hillert Accelerator Physics and by defining the bending angle ϕ = L R of the dipole magnet, we obtain :

xL( )= x⋅+⋅⋅+−⋅ cosϕϕ R x ´ sinϕϕδ R( 1 cos ) 00 zL()=+⋅⋅ z00 R z ´ For the longitudinal coordinate, we have for a drift length L = ϕ ⋅ R : Δv L s ≈−Δ=−L Lδ ds − ds γ2 ()∫∫D v0

The infinitesimal path length element along a trajectory sD in our curvilinear coordi- nate system is

2222 2 dsD =+++ dx dz( x R) dϕ and with ds=⋅ R dϕ we obtain for the path length difference ΔL in linear approxi- mation:

⎧⎫2 ds Δ=Lxz´´122 + + +x − 1 ⋅ dsx ≈ ⋅ ∫ ⎨⎬()R ∫ ⎩⎭R

Terascale Accelerator School 2008 30 W. Hillert Accelerator Physics

With the above derived general solution xs ( ) , this gives

xs0 s⎛⎞ s Δ=L ⋅cos ⋅ds + x0 ´ ⋅ sin ⋅ ds +δ ⋅⎜⎟ 1 − cos ⋅ ds RR∫∫∫ R⎝⎠ R ϕϕ ⇒Δ=⋅+⋅⋅−+⋅−Lx00sinϕ xR ´( 1 cosϕδ) ( R ϕ ϕ R sin ) Combining all these relations,ϕ we obtain for the transformation for a conventional sector dipole magnet: ϕ

⎛⎞cosR sin 00 01cosR()− ϕ ⎜⎟ϕ ⎜⎟−1sincoR ⋅ s 00ϕ 0sin ϕ ⎜⎟ ⎜⎟00ϕ1 R 00 M = dipole ⎜⎟0001 00 ⎜⎟ ⎜⎟2 ⎜⎟−−−sinR() 1 cos 00 1siRRϕ γϕϕ−−()n ⎜⎟0 0 ⎝ 00 01⎠ A sector magnet is therefore focusing in the horizontal plane. Terascale Accelerator School 2008 31 W. Hillert Accelerator Physics

This effect is purely geometric in nature:

Due to technical constraints, particle accelerators often use rectangular magnets which have parallel end faces. Commonly these magnets are installed symmetrically about the intended particle trajectory:

Terascale Accelerator School 2008 32 W. Hillert Accelerator Physics

For a deflection angle ϕ we have an entrance and exit angle ψ = ϕ 2. The orbit of a particle traveling with a radial displacement x0 at the position of the magnet pole of a rectangular dipole is shorter than the reference orbit (with x0 = 0) by

Δlx=⋅0 tanψ This leads to a decrease of the total deflection angle by Δlx Δ=ϕ =0 ⋅tanψ R R Terascale Accelerator School 2008 33 W. Hillert Accelerator Physics

Therefore the position of a particle while leaving a rectangular magnet remains unal- tered, whereas the radial angular displacement is increased by Δϕ :

⎛⎞10 ⎛⎞x ⎛⎞x =⋅⎜⎟0 ⎜⎟⎜⎟tanψ ⎜⎟ ⎝⎠x´ ⎜⎟1 ⎝⎠x0´ ⎝⎠R

A particle traveling with a vertical displacement z0 at the position of the magnet pole will be vertically deflected due to the horizontal magnetic field Bx in the fringe field region of length Δs by ΔsseΔ ΔzBs´tan===α =Δx rpeBp()x and with peRB= 0 we obtain 1 ΔzBds´=⋅ ∫ x RB0

Terascale Accelerator School 2008 34 W. Hillert Accelerator Physics

The integral may be easily calculated in a reference system rotated by the exit angle ψ = ϕ 2:

BB= cosψ +≈ B sinψψ B sin xu w w ≈0 and with ds= dw cosψ we obtain

B ds≈⋅tanψ B dw ∫ xw∫ Integration over a closed loop ABCD in the fringe field region leads to

Terascale Accelerator School 2008 35 W. Hillert Accelerator Physics

BC DA C 0 =⋅=B ds B dz + B dw + B dz + B dw ≈ z B + B dw ∫∫∫∫∫zw zw00 ∫ w AB CD B =zB0 0 =0 ≈0 and we obtain a total vertical deflection angle 1 C z Δ=zBdw´tan ⋅ψ ⋅ ≈−0 tanψ ∫ w RB0 B R Again the position of a particle while leaving a rectangular magnet remains unaltered, whereas the vertical angular displacement is changed by Δz´: ⎛⎞10 ⎛⎞z ⎛⎞z =⋅⎜⎟0 ⎜⎟⎜⎟tanψ ⎜⎟ ⎝⎠z´ ⎜⎟− 1 ⎝⎠z0´ ⎝⎠R The focusing / defocusing effect of the fringe fields (edge focusing) depends on the entrance (exit) angle ψ and may again be described by a linear transformation matrix

Terascale Accelerator School 2008 36 W. Hillert Accelerator Physics ψ ⎛⎞1 0 ⎜⎟ tan … 0 ⎜⎟1 ⎜⎟R ⎜⎟ ⎜⎟1 0 ⎜⎟ Mψ = tanψ ⎜⎟− 1 ⎜⎟R ⎜⎟ 10 ⎜⎟0 ⎜⎟01 ⎜⎟ ⎝⎠ We finally obtain for a rectangular dipole magnet with ψ = ϕ 2

MMMMrect= ψ ⋅⋅ dipole ψ and with the relations sinϕ = 2⋅⋅ sinψψ cos ,

cosϕ =− cos22ψψ sin Terascale Accelerator School 2008 37 W. Hillert Accelerator Physics this reads ϕ

⎛⎞1sinR 00 01cosR()− ⎜⎟ ⎜⎟01 00 0sin ⎜⎟ ⎜⎟Rϕ ϕ ⎜⎟1 − R 00f ϕ 00ϕ M rect = ⎜⎟ ⎜⎟00 RRϕϕ2 00 ϕϕ−−1 ⎜⎟ff2 f ⎜⎟ ⎜⎟−−−sin1cosR()00 1sinR 2 −−R() ⎜⎟ ⎜⎟ ⎝⎠0 0 0 0 0 1 where we have defined the focal length in the vertical plane ϕγ ϕ ϕ 11 ≈ tanψ fR

A rectangular dipole magnet is therefore focusing in the vertical plane. It acts like a drift space in the horizontal plane!

Terascale Accelerator School 2008 38 W. Hillert Accelerator Physics

3.2.3. Quadrupole Magnets Assuming a pure quadrupole magnet we set the bending term 10R = . The solution of the equation of motion depends on the sign of the quadrupole strength k. For k < 0 we get the solution of a quadrupole magnet, which is horizontal focusing and vertical defocusing:

xs()= a⋅⋅+⋅⋅ cos( ks) b sin( ks)

zs( )= c⋅⋅+⋅⋅ cosh() ks d sinh() ks

The integration constants a, b, c, d are derived from the boundary conditions at s = 0: xs(0)= == a x , x ´(0) s === b x ´ 00 zs(0)=== c z00 , z ´(0) s === d z ´ Substitution and building the first derivative, we obtain the transformation of a hori- zontal focusing (FQ) and a horizontal defocusing (DQ) quadrupole: where we put Ω=kL ⋅ with the quadrupole length L. Terascale Accelerator School 2008 39 W. Hillert Accelerator Physics

⎛⎞1 cosΩΩ sin ⎜⎟ ⎜⎟k 0 ⎜⎟− k sinΩΩ cos ⎜⎟1 ⎜⎟coshΩΩ sinh M = k < 0 FQ ⎜⎟k () ⎜⎟k sinhΩΩ cosh ⎜⎟2 ⎜⎟0 1 L γ ⎜⎟0 1 ⎜⎟ ⎝⎠

⎛⎞1 coshΩΩ sinh ⎜⎟ ⎜⎟k 0 ⎜⎟k sinhΩΩ cosh ⎜⎟1 ⎜⎟cosΩΩ sin M =>k 0 DQ ⎜⎟k () ⎜⎟−Ωk sin cos Ω ⎜⎟2 ⎜⎟0 1 L γ ⎜⎟01 ⎜⎟ ⎝⎠ Terascale Accelerator School 2008 40 W. Hillert Accelerator Physics

3.2.4. Particle Orbits in a System of Magnets With the derived matrixes particle trajectories may be calculated for any given arbi- trary beam transport line by cutting this beam line into smaller uniform pieces so that k=const. and R=const. in each of these pieces:

X E=⋅⋅⋅⋅⋅⋅⋅⋅⋅MMMMMMMMM DQDQDQDQD5443322110X

Terascale Accelerator School 2008 41 W. Hillert Accelerator Physics but:

Terascale Accelerator School 2008 42 W. Hillert Accelerator Physics

3.3. Particle Beams and Phase Space

3.3.1. Beam Emittance We consider a beam as a statistical set of points in the phase space. In linear beam optics, the horizontal and vertical planes are decoupled and we will therefore concen- trate on a two-dimensional phase space (,´)xx . A distribution of points can be trans- lated and rotated without changing its spread. We choose the origin of the two coor- dinate axes eˆx and eˆx´ at the barycentre of the points, such that the averages of their coordinates vanish: 1 N xx= = 0 N ∑ i i=1 1 N xx´´0= ∑ i = N i=1

Terascale Accelerator School 2008 43 W. Hillert Accelerator Physics

2 2 The variances σ X and σ X ´ are determined in a reference system (,´)X X which is rotated by a polar angle θ with respect to (xx,)´ in order to minimize (maximize) the sum of their squared distances to these axes:

X =⋅xxcosθ +⋅´ sinθ i ii X i´=−xxii ⋅sinθ +´ ⋅ cosθ

Terascale Accelerator School 2008 44 W. Hillert σ Accelerator Physics

The mean square distancesσ 1 N dX22== 2 =xxxx22cos22θ +´´ sinθθ + sin 2 XX´ N ∑ i i=1 N 221 22 2 2 2 d XX==´ ∑ X i´ =xxsinθ +´ cosθθ −xx´ sin 2 N i=1 ∂∂σσ22 are minimized with respect to the angle θ ( XX==´ 0) when ∂∂θθ 2 xx´ tan 2θ = xx22− ´

222 2 22 giving (from σσXX+=+´ xx´ and σσXX−=´ 2 xx´ sin 2θ )

2 12⎛⎞2 2 xx´ σ X =++⎜⎟xx´ 2sin2⎝⎠θ

2 12⎛⎞22 xx´ Xσ´ =+−⎜⎟xx´ 2si⎝⎠n2θ Terascale Accelerator School 2008 45 W. Hillert Accelerator Physics

We will define the spread of the distribution, which is called the emittance ε, by

2 ε ==⋅−⋅ ´ xx22´ xx´ σσXX It is important to note that this definition usually is used for beams, the emittance of proton beams is typically defined as 4ε !

The emittance can be considered as a statistical mean area:

NN NN 112 1 2 ε =−=∑∑∑∑()xxij´ x ji x´ 2 A ij NN2 ij==11 ij == 11

where Aij is the area of the triangle 0PiPj and ε is a measure of the spread of the points around their barycentre.

Terascale Accelerator School 2008 46 W. Hillert Accelerator Physics

The area of the envelope-ellipse is just π times the emittance ε

A = π ab ==π σ XXσ ´ π ε and its equation with respect to the axes X and X´ is

XX22´ XX 22´ 2222+ =+ =1 σσXX´ ab where a and b are the two semi-axes of the envelope-ellipse.

3.3.2. Twiss Parameters The emittance does not give all the information that is contained in the second-order moments. We will therefore define an ellipse with parameters involving the second- order momentsε of the particle spread in phase space. By an inverse rotation of angle −θ in phase space we obtain

2 22 22 22 22 =⋅−xxxxxxxxxrxσ x´ 2 ´´´ ⋅+⋅=⋅−σσxx´´2 σ´´ ⋅ xxx +⋅σ

Terascale Accelerator School 2008 47 W. Hillert σ Accelerator Physics where we have defined the correlation coefficient xx´ r = xx22⋅ ´ We may define the so called Twiss-parameters α, β, and γ such that

2 σ x ==x βε

2 σ x´ ==x´ γε

rxxσ xxσαε´ ==−´ and the equation of the envelope-ellipse reads in the “conventional” form:

γ xxxx22+ 2´´αβ+= ε

The meaning of the Twiss-parameters can be read off from the graphical representa- tion of the envelope-ellipse:

Terascale Accelerator School 2008 48 W. Hillert Accelerator Physics

• β represents the r.m.s. beam-envelope per unit emittance,

• γ represents the r.m.s. beam divergence per unit emittance,

• α is proportional to the correlation between x and x´.

Terascale Accelerator School 2008 49 W. Hillert Accelerator Physics

3.3.3. Betatron Functions In the following, we will first concentrate on the situation where Δpp= 0 . With

Ks()=− 1 R2 () s ks () the equation of motion reads xs´´( )+ Ksxs ( )⋅= ( ) 0 It describes a transverse oscillation with position dependent amplitude and phase, which is called betatron oscillation. We try to solve this equation with the set-up

xs()=⋅ε us ()cos ⋅(φϕ () s +0 ) and obtain: ⎡⎤2 ⎣⎦uu´´−⋅φφϕφφφϕ ´ + Ku ⋅ ⋅ cos( +00) −[ 2 ⋅ u ´ ⋅+⋅ ´ u ´´] sin( +) = 0 This relation is valid for any given phase φ()s at any given position s, therefore

uu´´− ⋅+⋅=φ ´2 Ku 0

2´´⋅uu⋅+⋅φφ ´´0 =

Terascale Accelerator School 2008 50 W. Hillert Accelerator Physics

s ds By integration of the second equation we obtain φ()s = ∫ 2 0 us() 1 and by using this relation uKu´´− +⋅= 0 . u3 With the definition of the betatron-function β ():s = us2 () we derive for the ampli- tude and phase of the oscillation:

xs()=⋅ε βφϕ () s ⋅ cos() () s +0 s ds ()φs = ∫ 0 ()s β β´(s ) Building the first derivative and defining α():s =− , we obtain 2

ε xs´( )=−{} ( s ) ⋅ cos()() ( s ) + + sin ( s ) + β()s αφϕφϕ00

Terascale Accelerator School 2008 51 W. Hillert Accelerator Physics

The equation for x can be transformed to x2 cos2 ()φϕ+= , 0 ε ⋅ β which can be used in combination with the equation for x´ to obtain

φϕ 2 ⎛⎞βα sin2 + =⋅+⋅xx ´ ()0 ⎜⎟ ⎝⎠ε β εβ Using cos22+ sin= 1 we derive β γαβε α γ 2 xs2 ⎛⎞α() + ⋅+xsxβ () ⋅ ´ =ε ⎜⎟ ()s ⎝⎠()s γ 1()+α 2 s which can be transformed by defining ():s = to: β()s

β´1+α 2 xxxx22++=2´´ ,where =−= and 2 β Terascale Accelerator School 2008 52 W. Hillert Accelerator Physics

3.3.4. Transformation in Phase Space According to Liouville’s theorem, all particles enclosed by an envelope-ellipse will stay within that ellipse. The transformation of the horizontal and vertical ellipse pa- rameters along the beam line may be derived from the transport matrixes in the hori- zontal and vertical plane. Starting at s=0, we have

2222 γ 00xxxx++==++2´´αβεγαβ 000 00 xxxx 2´´ Any particle trajectory starting at s=0 transforms to s≠0 by X = M ⋅ X 0 Defining the Beta-matrix B

⎛⎞βα− 2 BB= ⎜⎟,1=−= ⎝⎠− αγ the equation of the envelope-ellipse can be transformedβγ α to: TT−−11 ε = X 00⋅⋅=⋅⋅BBXX 0 11 X 1 Terascale Accelerator School 2008 53 W. Hillert Accelerator Physics where the inverse of the Beta-matrix is

−1 ⎛⎞γ α B = ⎜⎟ ⎝⎠α β and displacement-vector X transforms according to TT TT XXX101= MMM⋅=⋅=⋅, ( XX 00)

By inserting 1M=⋅−1 M, we obtain: TTT−−−111 ε =⋅⋅⋅⋅⋅⋅XX000MM B M M TT−−−111 =⋅⋅⋅⋅⋅⋅()MMBMMX 00()()X 0 TT−1 =⋅⋅⋅⋅XX10()MB M 1 and we can read off the transformation of the Beta-matrix:

T BMBM10=⋅⋅

Terascale Accelerator School 2008 54 W. Hillert Accelerator Physics

This can e.g. be used to derive the beta-function around a symmetry-point of a trans- fer-line where α = 0 in a simpleβ way: ⎛⎞s2 s β ⎜⎟βsym + ⎛⎞110s ⎛⎞0 ⎛⎞ B ()s =⋅sym ⋅=⎜⎟sym sym 1 ⎜⎟⎜⎟ ⎜⎟⎜⎟ββ ⎝⎠01⎝⎠01sym ⎝⎠s 1 s 1 ⎜⎟ ⎝⎠sym sym ββ This gives the relations for the Twiss-parameters around a symmetry-point: s2 ββ()s =+ sym β sym s α()s =− sym β The corresponding beam size scales with

σεβx =⋅()s !

Terascale Accelerator School 2008 55 W. Hillert Accelerator Physics

The transformation matrix M can be derived also from the Twiss-parameters. With

ε xs()=⋅⋅εβ{ φcos ϕ ⋅ cos φ00 − ϕ sin ⋅ sin } β xs´( )=− ⋅{}α ⋅[] cosφϕ ⋅ cos00 − sin φϕ ⋅ sin − φϕ sin ⋅ cos φϕ 0 + cos ⋅ sin 0

and the starting conditions xxxx(0)= 00 , ´(0)== ´,φ (0) 0 , which transform to

x0 cosϕ0 = 0

εβ⎛⎞ 1 00x sin000ϕβ=−⎜⎟x ´ + ε ⎝⎠β0

⎛⎞β α ⎜⎟()cos+ 00 sin sin ⎜⎟ββ ββ β β0 φα φββ φ we obtain: M()s = ⎜⎟ αα−+ αα1 ⎜⎟00cosφ −− sinφφαφ cos sin ⎜⎟() ⎝⎠000

Terascale Accelerator School 2008 56 β W. Hillert Accelerator Physics

3.3.6. Dispersion Functions Δp Including a relative momentum deviation = δ , we may use the principal solutions p Cs(),() Ss to find a particular solution Ds() of the equation of motion where we have set δ =1: 1 Ds´´( )+⋅ KsDs ( ) ( ) = R()s

s 1 Ds()= ⋅[]Ss()⋅⋅ Cs ()− C ()sSs ()⋅ ds ∫ R()s 0 Gss(,) Forming the second derivative and using the properties of the Wronskian, we finally obtain 11ss 1 Ds´´( )=+⋅⋅⋅−⋅⋅⋅S´´(sCs ) Csds ( )´´( ) Ssds ( ) Rs() ∫∫ Rs () R (s) =−⋅K SKC00 =−⋅

Terascale Accelerator School 2008 57 W. Hillert Accelerator Physics and verify the validity of the setup using the Green’s function Gss ( , ) defined above. We may then generally calculate the dispersion function Ds() from the principal so- lutions by solving

ss11 Ds()= Ss ()⋅⋅⋅−⋅⋅⋅∫∫ Cs () ds Cs () Ss () ds 00Rs() Rs ()

This relation may also be used in order to derive the parameter rx16 = δ in the transport matrix of dipole magnets. The parameter rx26 = ´ δ is then calculated by forming the derivative Ds ´( ).

Terascale Accelerator School 2008 58 W. Hillert Accelerator Physics

3.3.7. Path Length and Momentum Compaction

The path length of a particle with horizontal orbit displacement xD is influenced by the curved sections of the beam line. The total path length is therefore given by ss⎡⎤Rs()+ x () s x () s L ==+DDds L ds ∫∫⎢⎥Rs()0 Rs () ss00⎣⎦

With a given relative momentum deviation δ = Δpp, we have xsD ()= Ds ()⋅δ and obtain the deviation Δ=L LL −0 from the ideal path length

s Ds() Δ=L δ ds ∫ Rs() s0

This variation is determined by the so called momentum compaction factor αc, de- fined by

ΔLL1()s Ds α ==⋅0 ds c Δpp L∫ Rs() 0 s0

Terascale Accelerator School 2008 59 W. Hillert Accelerator Physics τ τβ The travel time is given by ττ = L (βc), and its relative variation is obtained from the logarithmic differentiation β ΔΔΔL ⎛⎞1γ Δ=ln =− =⎜αc −−2 ⎟ ⋅=δ η ⋅δ L ⎝⎠ where we have defined the slip factor η by 1 η =−γ2 αc

The momentum compaction factor therefore characterizes a critical energy 1 γ tr = , αc which is called the transition energy, where the slip factor vanishes.

Terascale Accelerator School 2008 60 W. Hillert Accelerator Physics

4. Circular Accelerators

4.1. Periodic Focusing Systems After the discussion of linear beam optics of beam transfer lines which in principle can be made of an irregular array of magnets, we will now discuss a repetitive se- quence of a special magnet arrangement, which is called a periodic lattice.

4.1.1. Periodic Betatron Functions Periodic solutions of a periodic lattice of period-length L will be

β ()()sL000+ ==ββ s α()()sL+=αα s = 000 Ds()()000+= L Ds = D

Ds´(000+= L ) Ds ´( ) = D ´

Using the transformation of the Beta-matrix and the 2x2 transport matrix M2 (for the horizontal or vertical plane), these relations transform to Terascale Accelerator School 2008 61 W. Hillert Accelerator Physics

T BMBM0202=⋅⋅ 2r which yields to β = 12 0 22 22−−rrrr11 12 21 − 22

rr11− 22 α00= β 2r12 The dispersion function is obtained from the transformation using the 3x3 transport matrix M3 (in case of upright magnets for the horizontal plane only):

⎛⎞DDrrrD0 ⎛⎞⎛ 0 11 12 13 ⎞⎛⎞ 0 ⎜⎟DDrrrD´´=⋅M ⎜⎟⎜ = ⎟⎜⎟ ⋅ ´ ⎜⎟0302122230 ⎜⎟⎜ ⎟⎜⎟ ⎜⎟ ⎜⎟⎜ ⎟⎜⎟ ⎝⎠110011 ⎝⎠⎝ ⎠⎝⎠

rr21 13+− r 23(1 r 11 ) yielding: D0´ = 2 −−rr11 22

rD12 0´+ r 13 D0 = 1− r11

Terascale Accelerator School 2008 62 W. Hillert Accelerator Physics

If the periodic lattice includes a symmetry point, we will have α0 = 0 and D0´0= for this point. We then get the simple solutions rr β sym==12, D sym 13 002 1− r 1− r11 11

4.1.2. Stability Criterion If M()L is the transformation matrix for one periodic cell we will have for N cells:

N MM()NL⋅=⎣⎡ () L⎦⎤ We derive the eigenvalues from MI− λλ⋅=2 − λTr{ M} ⋅+= 1 0

±iφ With the substitution Tr{M}= 2⋅ cosφ we obtain λφφ1,2 =±cosie sin = We require that the eigenvalues remain finite yielding a real betatron phase φ . This gives the general stability condition:

Tr{M} = rr11+≤ 22 2

Terascale Accelerator School 2008 63 W. Hillert Accelerator Physics

For a full lattice period, we have β = β0 , α = α0 and therewith

⎛⎞cosφα+ 00 sin φ β φ sin M = ⎜⎟ ⎝⎠−−γ 00sinφφαφ cos sin Defining the Twiss-matrix

⎛⎞αβ 2 ⎛⎞−10 JJI= ⎜⎟, ==− ⎜⎟ ⎝⎠−−γα ⎝⎠01 − the transformation matrix for one period can be expressed by MI= ⋅+⋅cosφ J sinφ Similar to Moivre’s formula we get for N equal periods

N MIN =⋅( cosφ +⋅ J sinφφφ) =⋅ I cos(NN) +⋅ J sin( ) and

Tr{M N } = 2⋅≤ cos(Nφ ) 2

Terascale Accelerator School 2008 64 W. Hillert Accelerator Physics

4.1.3. General FODO Lattice

The FODO geometry can be expressed symbolically by the sequence

1111QF, D, QD, QD, D, QF 2222 ==MM−12 12

It is sufficient to use the thin lens approximation (lQ f ). We will set the focal lengths to ff2 = 2 D , ff1 = 2 F , the drift length to L. Defining

* 111fffLff= 12+−() 12 ⋅ Terascale Accelerator School 2008 65 W. Hillert Accelerator Physics the transformation matrix of half a FODO cell is ⎛⎞L 1− L 101 L 10⎜⎟f ⎛⎞⎛⎞⎛⎞ ⎜⎟1 M12 =⋅⋅=⎜⎟⎜⎟⎜⎟ −−11ff01 11⎜⎟ 1 L ⎝⎠⎝⎠21⎝⎠ −−1 ⎜⎟* ⎝⎠ff2 Multiplication with the reverse matrix gives

⎛⎞LL⎛⎞ ⎜⎟12−⋅−* 2L ⎜⎟ 1 ff⎝⎠2 4L MM==−<⎜⎟and Tr 2 2 FODO ⎜⎟{} * 2 ⎛⎞LL f ⎜⎟−⋅−112 − ⎜⎟**⎜⎟ ⎝⎠ff⎝⎠1 f L L L This is equivalent to 01< * < , and defining u = , v = we get f f1 f2 01< uvuv+−⋅ <

Terascale Accelerator School 2008 66 W. Hillert Accelerator Physics from which we derive the boundaries of the stability region u uv==1, 121− u

u vv==1, 131+ u which gives the famous necktie-diagram for thin lens approximation:

Terascale Accelerator School 2008 67 W. Hillert Accelerator Physics

4.2. Transverse Beam Dynamics

4.2.1. Betatron Tune The betatron tune Q is defined as the number of oscillations per revolution: 1 ds Q =⋅ xz, ∫ 2()πβxz, s

If one regards the phase space at an arbi- trarily chosen point, a single particle moves on its phase space ellipse ,where the points represents the parameters after 1,2, … 5 revolutions.

Terascale Accelerator School 2008 68 W. Hillert Accelerator Physics

4.2.2. Filamentation

If the envelope ellipse σ b of the beam is not matched to the ellipse σ m of the periodic lattice, it will start to rotate with a phase advance per revolution of 2π Q

Due to effects of higher order the quadrupole strengths and therefore the phase ad- vance depends on the amplitude (horizontal and vertical displacements). In case of mismatch, the beam phase space distribution starts to filament. After a large number of revolutions, the distribution may be surrounded by a large ellipse. Terascale Accelerator School 2008 69 W. Hillert Accelerator Physics

4.2.3. Normalized Coordinates It is useful to transform the oscillatory solution with varying amplitude and frequency xs()=⋅ε βφϕ () s cos( () s +0 ) to a solution which looks exactly like that of a har- monic oscillator. We introduce Floquet’s coordinates through the transformation: ψ φ()s ()s = Q

ηψ xs() ()= ()s β The angle ψ advances by 2π every revolution. It coincides with θ at each β max and

β min location and does not depart very much from θ in between. Using these normalized coordinates, the equation of motion can be transformed to

2 d η 2 2 + Q = 0 d ψ η

Terascale Accelerator School 2008 70 W. Hillert Accelerator Physics

The solution transforms to

η (ψη) = 0 ⋅+cos ψλ(Q ) and the phase space ellipse becomes an invariant cycle of radius η0 . The use of normalized coordinates is convenient in the discussions of perturbations and aberrations:

4.2.4. Closed orbit distortions Let us assume a dipole field error produced by a short dipole which makes a constant δ δ (Bl) angular kick in divergence x´ = B R which perturbs the orbit trajectory which elsewhere obeys

2 d η 2 2 + Q = 0, with η =ηψλ0 cos(Q + ) d ψ η

Terascale Accelerator School 2008 71 W. Hillert Accelerator Physics

We choose ψ = 0 to be diametrically opposite to the kick. Then by symmetry λ = 0 and the disturbed orbit oscillates around the ideal path

ψ dη Differentiation gives =−η QQ ⋅sin()ψη =− Q ⋅ sinπ Q () at ψ = π . d 00 dψ 1 dx dη With = and = β0 ⋅ , we may relate the orbit displacement η0 to ds Qβ0 ds ds Terascale Accelerator School 2008 72 W. Hillert Accelerator Physics ψ δ xdxdd´ ηψ η 0β the real kick by =− =−β0 ⋅ ⋅ = ⋅sin()πQ 2 ds d ds 0

β0 giving η0 = π δ x´ 2sin()Q

Returning to physical coordinates, we obtain the closed orbit displacement xsc () at position s for a field error at s0 with x = β ⋅η and φ()ssQQ−φπψ (0 )+=⋅: ⎡⎤ β ()ss (0 ) (Bl) xsc ()==β ηψ0 cos()QssQ φφ⎢⎥ π ⋅−+ cos() ()(0 ) ⎢ 2isn()QBR⎥ ⎣⎦ = amplitudeβ at position s δ The effect of a random distribution of dipoleπ errors can be estimated from the r.m.s. β average, weighted according to the β0 values of the kicks δ xi : π ()s β δ Bl xs()=⋅⋅⋅−+⋅()s cos() ( s)() s Q ds c 2sin()Q ∫ 0 BR 00 s φφ π Terascale Accelerator School 2008 73 W. Hillert Accelerator Physics

Using matrix algebra, the displacement of the closed orbit at the position of the field error can be calculated fromδγφφαφ the displacement vector just before and just after the

⎛xx00 ⎞ ⎛⎞⎛cosφα+ 000 sin φ β φ sin ⎞⎛⎞ x kick element: ⎜ ⎟=⋅M ⎜⎟⎜ = ⎟⎜⎟ ⋅ ⎝xx00000´´−−− ⎠ ⎝⎠⎝ x ´ sincossin´ ⎠⎝⎠ x

β0 δ x´ xQ0 = cos() 2sin()πQ with φ = 2πQ , giving π xδ´ xQQ´sincos=−()⎡⎤() () 002sin Q ⎣⎦ π πα π The closed orbit displacement xsc () is calculated from xsc ()= M( ss00 ,)⋅ x

⎛⎞β ()s ⎜⎟()cos+ 00 sin (s ) sin xs() x ⎛⎞c ⎜⎟β0 φα β φ β φ ⎛⎞0 ⎜⎟=⋅⎜⎟ ⎜⎟ ⎝⎠xsc´( )1+− ()sssαα αα 1 β () () ⎝⎠ x0 ´ ⎜⎟−+00sin cos() cos − sin ⎜⎟0 ()ssββ ββ () 0 ⎝⎠00φφφαφ

Terascale Accelerator School 2008 74 W. Hillert β Accelerator Physics

4.2.5. Gradient Errors Consider a small gradient error which affects a quadrupole at position s in the lattice of a circular accelerator. Translated to matrix algebra, we have to multiply a perturba- tion matrix ⎛⎞10 δQ()s = ⎜⎟ ⎝⎠−⋅δ ks() ds 1 with the unperturbed matrix for one circle staring at s (where α(s)=α0, …)

⎛⎞cosφα00+ sin φ β0 φ 0 sin 0 M0 = ⎜⎟ ⎝⎠−−γ 00sinφφαφ cos 000 sin giving: M()ss=⋅δQM () 0

⎛⎞cosφα00+ β sin φ φ 0 0 sin 0 = ⎜⎟ ⎝⎠−+−−+−δ kds()cosφα00 sin φ 0 γ φ 0 sin δ 0 β φ kds φα 0 sin 0 φ cos 00 sin 0

Terascale Accelerator School 2008 75 W. Hillert Accelerator Physics

From 12⋅= Tr{}M cosφ we can calculate the change in cosφ :

1 Δ=−Δ⋅=−()cosφφφ sin000 sin φβδkds 2 1 2()()Δ=Δ=Qsksds πφβδ2 Integrating over the length of the quadrupol perturbation, one obtains 1 Δ=Qsksdsβδ() () 4 π∫ A gradient error will not influence the closed orbit but the betatron function of the lattice. In order to calculate the betatron amplitude modulation, we have to determine the single turn transport matrix starting at a given observer position s, introducing a small gradient perturbation at position s0: bb10 aa ⎛⎞11 12⎛⎞ ⎛ 11 12 ⎞ MMs =⋅⋅=(,ss000 )δQM ( s ) ( s ,) s ⎜⎟ ⋅⎜⎟ ⋅ ⎜ ⎟ ⎝⎠bb21 22⎝⎠−δ kds0 1 ⎝ aa 21 22 ⎠ Terascale Accelerator School 2008 76 W. Hillert Accelerator Physics

It is only necessary to evaluate the element r12 which is

rbabkdsaa12=+−⋅+=−⋅ 11 12 12( δ 12 22) rkdsab 12δ 0 12 12 where r12 from the unperturbed matrix found by putting δ kds0 = 0 . Thus the varia- tion in the r12 term due to the perturbation is

Δ=−⋅−⋅−⎣⎦⎡⎤βπ()sin2sQ()000 δββ kdsssssss () ( )sin () ( 00φφ ( ) sin( ( ) () )) φφ

() () =−kdsss00()()sin()()sin2 ⋅ s − s 0 ⋅⎣⎡ Q 0 − ()() s − s 0⎦⎤ 1δββ φφ π φφ Using sinα ⋅= sinβαβαβ⎡ cos()() −−+ cos ⎤ the left-hand and right-hand sides 2 ⎣ ⎦ β can be expanded to give π Δ+()sisQn(2 ) βπ()sQ⋅2 Δ⋅Q cos2( ) = 0 0 π↑ ↓ 1 kds00() s ()s {}cos()2 Q0 −−−cos⎣⎡ 2 (sQ)()()s0 0 ⎦⎤ 2 δ β Terascale Accelerator School 2008 βπ 77 W. Hillert

φφ π Accelerator Physics

This leaves the final expression for the betatron amplitude modulation (the so called beta-beating): ()s Δ=βδφφ()s ⋅ks ( )()s cos2⎡⎤ ( s)() − s − Q ⋅ ds ∫ 00000 ⎣⎦() 2sinβ() 2 Q0 s π 4.2.6. Optical Resonances β Dipole errors will give a large closed orbit displacement when the tune is close to an integer number which will be unstable in case of an integer Q. π Gradient errors will produce an average tune shift ΔQ and an amplitude modulation of the beta function which will explode for half integer Q values. These phenomena are called resonances. Due to the turn by turn modulation of the tune, there exist regions of instability called stop bands around the resonance condi- tions. The width of these stop bands are given by the tune modulation amplitude:

Terascale Accelerator School 2008 78 W. Hillert Accelerator Physics

Dipole Errors: Gradient Errors:

1 Average tune shift Δ=Qklβδ() No average tune shift ΔQ = 0 4 π Tune modulation amplitude dQ Tune modulation amplitude dQ= Δ Q

Any particle whose unperturbed Q lies in the stop band width dQ will lock into re- sonance and is lost.

Terascale Accelerator School 2008 79 W. Hillert Accelerator Physics

We may generalize and give a list of resonances and their driving multipoles: resonance type driving multipole integer resonance: Qn= dipole errors half-integer resonance 2 ⋅Qn= quadrupole errors third-integer resonance 3⋅Qn= sextupole errors ... Due to betatron coupling, perturba- tions may depend on the betatron am- plitude in both planes. These coupling terms lead to the generalized reson- ance condition

j ⋅QkQNxz+⋅ = where j+k indicates the order of the resonance.

Terascale Accelerator School 2008 80 W. Hillert Accelerator Physics

4.2.7. Chromaticity The variation of tunes is called chromaticity and is defined by the factor ξ in

Δp Δ=⋅Qxz, ξxz, p0 We distinguish between natural chromaticity created by the chromatic aberration of quadrupole magnets and perturbations derived from non linear perturbations in the particles trajectories (e.g. produced by sextupole magnets). Natural Chromaticity: The quadrupole strength scales with the particles momentum:

Δ=−⋅kkΔp p0 and the tune shift can therefore be calcu- 1 Δp Δ⋅Q = −⋅⋅β ()sk () sds xz, π∫ xz, xz, lated from: 4 p0 =ξxz, Terascale Accelerator School 2008 81 W. Hillert Accelerator Physics

Chromaticity produced by sextupoles: A beam of particles moving on a dispersion orbit through a sextupole magnet is “fo- cused” by the nonlinear field due to horizontal displacement xD=⋅Δp . We can p0 derived a position dependent focusing strength from e B =+mxzeˆˆ1 m x22 − z e p sext x2 () z giving a dispersion dependent kx and kz to: eB∂ Δp k =⋅z =⋅m xD=⋅m ⋅ x px∂ p 0 eB∂ x Δp kz =⋅ =⋅=⋅m x m D ⋅ p ∂z p0 This adds to the natural chromaticity and gives in total: 1 ξβ=−⎡⎤ksmsDs() − () () ⋅ () sds xz,,4 ∫ ⎣⎦ xz xz , Terascale Accelerator School 2008 π 82 W. Hillert Accelerator Physics

In order to avoid a large tune spread, chromaticity has to be corrected by the use of additional sextupole magnets right after focusing and defocusing quadrupoles where the horizontal dispersion does not vanish:

This correction will have an influence on the stability of the beam and th maximum aperture given by nonlinear effects (so called dynamic aperture):

Terascale Accelerator School 2008 83 W. Hillert Accelerator Physics

The dynamic aperture can be calculated from a tracking of the particles orbit through the accelerator where the nonlinear effect of sextupole magnets has to be treated as step by step correction in linear beam matrix optics:

Terascale Accelerator School 2008 84 W. Hillert Accelerator Physics

The orbit vector is transformed from s0 to s1 by matrix transformation X110= M ⋅ X A sextupole of length l will produce an angular kick in the horizontal and vertical or- 1 Δ=xmlxz´ ⋅()22 − bit of 1112

Δ=zmlxz111´ ⋅ which gives an orbit vector right after the sextupole of

⎛⎞x1 ⎜⎟xx´´+Δ ⎜⎟11 X 2 = ⎜⎟z1 ⎜⎟ ⎝⎠zz11´´+Δ By this method a randomly chosen distribution of start vectors X 0 is tracked through the accelerator for many revolutions and the resulting dynamic aperture is derived from the phase space representation. Terascale Accelerator School 2008 85 W. Hillert Accelerator Physics

4.3. Longitudinal Beam Dynamics

4.3.1. Equation of Motion in Phase Space From the discussion of the momentum compaction (chapter 4.3.7.) we have obtained for the relative variation of the travel time ΔTT0 and the angular revolution frequen- cy Δω ω0 : ω ω ΔTppΔΔΔ⎛ 1 ⎞ = −=−⎜⎟γ2 −αηc =−⋅ Tpp00⎝⎠00

The revolution frequency ω0 is linked to the RF frequency ωRF by the number h of circulating bunches, which is called the harmonic number. Using this relation we obtain for the phase shift Δϕ =−ϕϕ0 with respect to a reference particle (with refer- ence phase ϕ0 ):

Δϕ =⋅Δ=⋅⋅ΔωωRF Th0 T

Terascale Accelerator School 2008 86 W. Hillert Accelerator Physics

The phase shift per revolution can be linked to the relative momentum deviation by using the η-parameter: ΔppΔ Δ=−ϕηωhT =−2 hπη ()rev 00 pp00 and may be expressed in terms of the relative energy deviation using dE dp E22422=+ m c p c ⇒⋅=⋅⇒=⋅⇒=22 E dE pc 2 dp dEββ c dp 2 0 E p which gives: ϕ 2π hEη Δ ()Δ=− rev β2 E0 So far, we have expressed the phase shift Δϕ per revolution in terms of ( )rev

Δ=EEE −0 . In order to relate this to the energy gain per turn produced by accelera- tion, we first have to divide by the revolution time T0 to get the change of the phase shift per unit time Δϕ : Terascale Accelerator School 2008 87 W. Hillert Accelerator Physics

ϕ Δϕ dh( )rev 2 Δ ==−⋅Δ2 E dt T000πη T E We then have to built the second derivative to expressβ this variation in terms of the energy gain ΔE per turn ()rev ΔE =−=eU()ϕ W () E eU sinϕ − W () E ()rev 0 where WE() represents the radiation losses per turn due to radiation and U ()ϕ is the acceleration voltage for a given phase ϕ . The energy gain per turn

ΔE is linked to the energy deviation ΔE with respect to the reference particle by ()rev d 1 Δ=E ⋅ΔE ()rev dt T0 This gives dhdE2ΔΔϕπη2 22+ ⋅=0 dt T00 E dt β Terascale Accelerator School 2008 88 W. Hillert Accelerator Physics and we finally obtain

dh2Δϕπη2 + ⋅+Δ−=⎡⎤eUsin W ( E ) 0 222⎣⎦00() dt T00 E β

ϕϕ 4.3.2. Small Oscillation Amplitudes For small deviations Δϕ from the synchronous phase we can expand the acceleration voltage into a Taylor series and get ϕ dEΔ 1()⎧ dUϕ0 dW( E0 ) ⎫ ΔEϕ =≈⎨eU()0 +eE ⋅Δ− W() E0 − ⋅Δ⎬ dt T0 T0 ⎩ dϕ ϕ dE ⎭

At equilibrium we have eU()ϕ00= W () E and obtain the phase equation ϕ 2 ddΔΔ⎛⎞1()dW E0 ⎛⎞2πηhe +⋅2 ⎜⎟⋅ ⋅ +⎜ ⋅U00cos ⎟ ⋅ Δ = 0 dt2 2T dE d t β22TE ⎝0 ⎠ ⎝0 0 ⎠ ϕ =αS =Ω2 S ϕ

Terascale Accelerator School 2008 89 W. Hillert Accelerator Physics

Particles orbiting in a circular accelerator therefore perform longitudinal oscillations with the angular frequency ΩS , which are called synchrotron oscillations. These phase oscillations are damped or antidamped depending on the sign of the damping decrement αS . For small oscillation amplitudes the movement can be described by a damped harmonic oscillator. In most cases we find the damping time much longer than the phase oscillation period 12π 1 τ S == SSSΩ Q α and the synchrotron tune QS , defined by the number of longitudinal oscillations per turn, much smaller than the transverse tunes QX , QZ .

The oscillations are stable for a real angular frequency ΩS and therefore for a posi-

22 tive product η ⋅ cosϕ0 . From η =−11γγtr and the equilibrium condition eU00sinϕ = W ( E 0 )> 0 we derive the condition for stable phase focusing: Terascale Accelerator School 2008 90 W. Hillert Accelerator Physics π π 0for<<ϕ0 γγ 2 0 tr Neglecting the small damping term the equation of motion reads d 2 Δϕ + Ω⋅Δ=2 0 dt 2 S ϕ and is solved by a harmonic oscillation Δϕ =Δϕφ ⋅cos( ΩSt + ) ϕϕφ ηω Building the first derivative and relating Δϕ to the relative energy deviation ΔEE0 , we obtain for the amplitude Δϕ of the oscillation 2π hEη Δ Δ p Δ=−Ω⋅Δ⋅ sin Ω+t =− ⋅ = ⋅ SS()β2 RF TE00 p 0

Terascale Accelerator School 2008 91 W. Hillert Accelerator Physics

⎛⎞ ⎛⎞ ϕ ηωηω RFΔΔEp RF ⇒Δ= ⋅⎜⎟ = ⋅ ⎜⎟ 2 ΩΩEp β SS⎝⎠00max ⎝⎠ max

All particles of a beam perform incoherent phase oscillations about a common reference point and generate thereby the appearance of a steady longitudinal distribution of particles which we call a particle bunch.

The total bunch length lb can be determined from the maximum longitudinal excur- sion of particles from the bunch center and is twice the amplitude of the phase varia- tion.: πω lcλ bRF= ⋅Δϕ = ⋅Δϕ 22 h 0 Using the equation derived above, this gives

cEE2πη ⎛⎞Δ l =⋅2 ⋅0 ⋅ b ϕβω ⎜⎟ 0000heUcos ⎝⎠ E

Terascale Accelerator School 2008 92 W. Hillert Accelerator Physics

4.3.3. Large Amplitude Oscillations We will ignore the small damping term for the following discussions. This allows us to rewrite the equation of motion (without any further approximation) to

2 ΩS ϕϕϕ + []sin−= sin0 0 cos 0 ϕ with the synchrotron frequency Ω defined above and ϕ = ϕϕ+Δ . ϕ S 0 This can easily be integrated to the potential equation 2 ⎧⎫Ω2 +=−+Sϕ cosϕ sin const. ⎨ []ϕϕ0 ⎬ 2 ⎩⎭cos 0 kinetic energy potential energy The potential energy function corresponds to the sum of a linear function and a sinu- soidal one. An oscillation can only take place if the particle is trapped in the potential well:

Terascale Accelerator School 2008 93 W. Hillert Accelerator Physics

max ϕ10=−πϕ is an extreme elongation corresponding to a stable motion. The corres- ponding curve in phase space is called separatrix and the area delimited by this curve is called the RF bucket. Part of this area is filled with particles, forming the bunch. Terascale Accelerator School 2008 94 W. Hillert Accelerator Physics

The equation of the separatrix is

22 2 ϕ ΩΩSSϕϕ −+⋅=−−+−⋅[]cosϕ ϕϕ sin πϕ0000 πϕ⎣⎦⎡⎤ cos()() ϕ sin 2cos00 cos

Terascale Accelerator School 2008 95 W. Hillert Accelerator Physics

max The other extreme elongation ϕ2 (second value for which ϕ = 0 ), is such that

max max cosϕ22+⋅ϕ ϕ πϕ sin 0 πϕ = cos ϕ( −+−⋅ 0) ( 0) sin 0

Terascale Accelerator School 2008 96 W. Hillert Accelerator Physics

From the equation of motion it is also seen that ϕ reaches a maximum when ϕ = 0 corresponding to ϕ = ϕ0 . This gives the maximum stable values of ϕ and the maxi- mum energy spread ΔEmax , which is called the RF acceptance:

22 ϕmax=Ω22S ⎣⎡ −(πϕ − 2tan 0) ⋅ ϕ 0 ⎦⎤ πη ⎛⎞ΔEeU0 ⎜⎟=±β ⋅⎡2cosϕπϕ000 −() − 2 ⋅ sin ϕ⎤ EhE⎣ ⎦ ⎝⎠00max

In accelerator physics one usually defines an over voltage factor q by maximum RF voltage1eU q ===0 desired energy gaineU00 sinϕ sinϕ 0 Using this factor, we can rewrite the RF acceptance to

Terascale Accelerator School 2008 97 W. Hillert Accelerator Physics

ββ ⎛⎞ΔE 2sineUϕ ⎛⎞2 1 2 eU ⎜⎟=⋅−−≤ πηπη 00q 1arccos 0 E hE⎜⎟ q hE ⎝⎠00max ⎝⎠ 0

−2 2 Using η =−(γαC ), αCx≈1 Q and ωRF = h ⋅ω0 we finally note the important scal- ing:

γ 1 ⎛⎞ΔΔΔEEEeU1n ⎛⎞ ⎛⎞ 00si ϕ ⎜⎟∼∼∼, ⎜⎟QS , ⎜⎟ ⎝⎠EEEE0000ωRF ⎝⎠ ⎝⎠ max max max

Terascale Accelerator School 2008 98 W. Hillert