Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
BE/Note/2010/NNN (sub ref) 2017-05-07 [email protected] Automatic magnetic cycle editor for the CERN PSB Alfred BLAS / BE-RF Magnetic cycle, synchrotron. Summary The main horizontal bending field in the CERN PSB synchrotron is programmed as a function of time called magnetic cycle. The creation of such a cycle takes into account enough parameters to unease its empirical elaboration. In the present context with Linac 2 as the injecting machine, there is typically only one operational cycle used for all proton beams. The foreseen operation of the PSB with an extraction kinetic energy of 2 GeV (instead of 1.4 GeV as at present), together with a possible doubling of the injected beam charge with Linac 4, pushes the rf and the magnetic setups towards new limits. Using the existing hardware to achieve higher performances means an optimisation of the magnetic cycle. This note describes an application creating the synchrotron magnetic cycle from different input parameters, either equipment or beam related. The excel file used for the simulations can be found here: https://blas.web.cern.ch/blas/Publications/PSB_Cycle.xlsm Table of Contents 1. Introduction .................................................................................................................................. 3 2. Magnetic cycles obtained with the automatic editor and simulation results .......................... 4 2.1 Fastest cycle achievable in the present PSB context (50 MeV at injection up to 1.4 GeV at extraction) ..................................................................................................................................... 4 2.2 Maximum intensity possibly accelerated from 160 MeV to 2 GeV with the present bendings and rf setup, but with a new 5 kV MPS ....................................................................... 7 2.3 Maximum LHC intensity (ultimate beam) accelerated on h=2, with the present bendings and rf setup, but with a new 5 kV MPS ..................................................................... 10 2.4 Rf power required to accelerate 2.5 E13 protons per ring to 2 GeV. ............................... 14 3. 4. Global approach used for the cycle editor.............................................................................. 17 3.1 Definition of the system ..................................................................................................... 17 3.2 Main constraints and core processing ............................................................................. 18 Description of the different ingredients or sub-systems that need to be considered....... 21 4.1. Power supply feeding the PSB bending magnets .......................................................... 21 4.1.1 4.2 MPS model.................................................................................................................. 22 Magnetic circuit driven by the MPS................................................................................. 22 4.2.1 MPS load model ......................................................................................................... 25 4.3 RF system ............................................................................................................................. 26 4.4. Beam dynamics ................................................................................................................... 29 4.4.1 Basic formulas ................................................................................................................... 29 4.4.2 Incoherent tune shift [10, 12] ........................................................................................... 31 4.4.3 Momentum p [eV/c] ........................................................................................................ 35 4.4.4 Beta...................................................................................................................................... 35 4.4.5 Adiabaticity........................................................................................................................ 36 4.4.6 Beam signal spectrum (cosine bunch shape) ................................................................ 36 4.4.7 Beam signal spectrum (rectangular bunch shape) ....................................................... 41 4.4.8 Space charge voltage ........................................................................................................ 42 4.4.9 MPS model ......................................................................................................................... 43 5. Required precision of the bending field ...................................................................................... 46 6. Tune shift and losses ...................................................................................................................... 48 Conclusion ........................................................................................................................................... 49 Acknowledgements ............................................................................................................................ 49 References ............................................................................................................................................. 50 Annex β Visual basic functions used in the Excel cycle editor..................................................... 51 -2- 1. Introduction The future Linac 4 beam will be injected into full height rf buckets in the PSB, using optionally a process allowing for a shaping of its surface in the longitudinal phase space (longitudinal painting [1]). The created bunched beam current, with various possible intensities, will induce space charge effects superimposed to the cavities rf driving voltage, thus impacting the rf acceptance. The acceleration needs to fulfil adiabatic conditions and be such as to maintain the acceptance above the beam emittance despite its reduction due to the change of stable phase. The acceleration rate should also be limited in order not to require an rf current above the capabilities of the rf system. A contrario, the acceleration needs to be as fast as possible, within the limits imposed by the magnetic circuit hardware, in order to limit the power dissipation within the dipoles in the ring and also to reduce the time spent at low energy where high space charge forces dominate. An automatic cycle editor that takes into account the different requirements and constraints is described in this note. -3- 2. Magnetic cycles obtained with the automatic editor and simulation results Results are presented here first without explanations on how they are obtained. This will allow those only interested in the PSB 2 GeV upgrade feasibility study, to have the result they are looking for, without being overwhelmed by details. How the simulations have been carried out, is presented in the following chapters. 2.1 Fastest cycle achievable in the present PSB context (50 MeV at injection up to 1.4 GeV at extraction) This first example depicts a cycle accelerating particles injected the from Linac 2 output kinetic energy of 50 MeV up to the present extraction energy of 1.4 GeV. The beam intensity is chosen to be equal to the typical maximum intensity obtained in the PSB (1.1 E13 particles accelerated on harmonic 1). This example is proposed in order to allow making a direct comparison with the cycles being presently used. The assumptions being made here are: single h=1 accelerating voltage (no dual harmonic), maximum C02 cavity current available for acceleration = 2.5A, maximum bucket filling during acceleration = 80%. Figure 2.1.1: 50 MeV to 1.4 GeV magnetic cycle or current in the main dipoles [A] (in red or top trace) with 1.1E13 protons accelerated with a single h=1cavity; 20 ms flat-top. The bottom trace is the RMS average current [A] remaining well below the present accepted limits. Injection at C275, extraction at C595 (C805 with the actual 1.4 GeV cycles) -4- Figure 2.1.2: Part of the cavity (C02 for a single harmonic h=1 beam) rf current dedicated to acceleration. The available limit is 3 A and the cycle is designed in order to maintain a 0.5 A margin that allows for some tuning errors. Do not take into account the line corresponding to the C04 limit, which is not involved here. Figure 2.1.2 shows only the current required from the cavity amplifier in order to accelerate the beam. Note that the cycle editor has limited the ramp to limit the current to 2.5 A as specified. The value required to create the nominal 8 kV without beam is about 3A but does not appear here although it is supplied by the amplifier. Figure 2.1.3: Effective rf voltage when space charge effects have been deduced (bottom trace); The top trace is the cavity voltage (8 kV peak) -5- Figure 2.1.4: h=1 bunch emittance [eV.s] bottom red trace compared to the h=1 rf bucket acceptance (top trace). The part of the curve after extraction should not be considered. The emittance remains below 80% of the acceptance as required by a programmable input parameter Figure 2.1.5: Vertical incoherent tune spread. A weighting coefficient has been applied to the results of the formulae that provide the tune shift, in order to obtain the tune spread value actually encountered in the machine. This weighting coefficient (0.4) take into account the percentage of the tune shift that is actually a tune spread, the effect of the real transverse distribution and the beneficial effect of the dual harmonic acceleration. This curve will be used as a reference to evaluate losses due to tune spread in the following simulations. -6- 2.2 Maximum intensity possibly accelerated from 160 MeV to 2 GeV with the present bendings and rf setup, but with a new 5 kV MPS This simulation describes a cycle accelerating, from 160 MeV to 2 GeV, the maximum possible intensity (1.1E13 p) on h=1 and achievable with the new foreseen MPS when respecting the other present hardware limits (power dissipation in the bendings, maximum rf current and voltage). At injection, the bucket is filled up to 80% and the filling ratio remains below this value during the entire cycle. Figure 2.2.1: 160 MeV to 2 GeV magnetic cycle or current in the main dipoles [A] (in red or top trace) with 1.1E13 protons accelerated with a single h=1cavity; 20 ms flat-top. The bottom trace is the RMS average current [A] remaining just below the present accepted limits. Injection at C275, extraction at C675 (C805 with the actual 1.4 GeV cycles) -7- Figure 2.2.2: Part of the cavity (C02 for a single harmonic h=1 beam) rf current dedicated to acceleration. The available limit is 3 A and the cycle is designed in order to maintain a 0.5 A margin that allows for some tuning errors. Do not take into account the line corresponding to the C04 limit, which is not involved here. Figure 2.2.2 shows only the current required from the cavity amplifier in order to accelerate the beam. The value required to create the nominal 8 kV without beam, about 3A, does not appear here although it is supplied by the amplifier. -8- Figure 2.2.3: Effective rf voltage when space charge effects have been deduced (bottom trace); The top trace is the cavity voltage (8 kV peak) Figure 2.2.4: h=1 bunch emittance [eV.s] bottom red trace compared to the h=1 rf bucket acceptance (top trace). The part of the curve after extraction should not be considered. The emittance remains below 80% of the acceptance as required by a programmable input parameter Figure 2.2.5: Vertical incoherent tune spread. A weighting coefficient has been applied to the results of the formulae that provide the tune shift, in order to obtain the tune spread value actually encountered in the machine. This weighting coefficient (0.4) take into account the percentage of the tune shift that is actually a tune spread, the effect of the real transverse distribution and the beneficial effect of the dual harmonic acceleration. The maximum tune spread of -0.14 at 160 MeV compares favourably with the β 0.38 obtained at 50 MeV (see figure 2.1.5 ) -9- 2.3 Maximum LHC intensity (ultimate beam) accelerated on h=2, with the present bendings and rf setup, but with a new 5 kV MPS This second example depicts a cycle accelerating the maximum LHC foreseen intensity (3.25E12 p per ring on LHC 25 Ultimate), from 160 MeV to 2 GeV, on h=2. At Injection the h=2 buckets are filled up to 80 %. This intensity value corresponds to about 13 injected turns from Linac 4. Figure 2.3.1: 160 MeV to 2 GeV magnetic cycle or current in the main dipoles [A] (in red or top trace) with 3.25 E12 protons accelerated with a single h=2 cavity; 20 ms flattop. The bottom trace is the RMS average current [A] remaining just below the present accepted limits. Injection at C275, extraction at C645 (C805 with the actual 1.4 GeV cycles) - 10 - Figure 2.3.2: Part of the cavity (C02 for a single harmonic h=1 beam) rf current dedicated to acceleration. The available limit of 2.5 A is not reached for this beam intensity. Figure 2.3.3: Effective rf voltage when space charge effects have been deduced (bottom trace); The top trace is the cavity voltage (8 kV peak) - 11 - Figure 2.3.4: h=2 bunch emittance [eV.s] bottom red trace compared to the h=2 rf bucket acceptance (top trace). The part of the curve after extraction should not be considered. The emittance remains below 80% of the acceptance as required by a programmable input parameter Figure 2.3.5: Vertical incoherent tune spread. A weighting coefficient has been applied to the results of the formulae that provide the tune shift, in order to obtain the tune spread value actually encountered in the machine. This weighting coefficient (0.5) take into account the percentage of the tune shift that is actually a tune spread and the effect of the real transverse - 12 - distribution. The maximum tune spread of -0.31 at 160 MeV compares favourably with the β 0.38 obtained at 50 MeV (see figure 2.1.5 ) - 13 - 2.4 Rf power required to accelerate 2.5 E13 protons per ring to 2 GeV. In order to achieve the acceleration of the maximum intensity foreseen in the Linac 4 era with the present dipole cooling setup (2267 A RMS max), the C02 rf power needs to be increased such that the cavity amplifier supplies 6.3 amperes for the acceleration only (this value corresponds to a strict minimum without margin). The results with such improved rf characteristics are shown below: Figure 2.4.1: 160 MeV to 2 GeV magnetic cycle or current in the main dipoles [A] (in red or top trace) with 2.5E13 protons accelerated with a single h=1cavity; 20 ms flat-top. The bottom trace is the RMS average current [A] remaining just below the present accepted limits. Injection at C275, extraction at C675 (C805 with the actual 1.4 GeV cycles) - 14 - Figure 2.4.2: Part of the cavity (C02 for a single harmonic h=1 beam) rf current dedicated to acceleration. The required 6.3 A are well above the present C02 limits. Figure 2.4.3: Effective rf voltage when space charge effects have been deduced (bottom trace); The top trace is the cavity voltage (8 kV peak) - 15 - Figure 2.4.4: h=1 bunch emittance [eV.s] bottom red trace compared to the h=1 rf bucket acceptance (top trace). The part of the curve after extraction should not be considered. The emittance remains below 80% of the acceptance as required by a programmable input parameter Figure 2.4.5: Vertical incoherent tune spread. A weighting coefficient has been applied to the results of the formulae that provide the tune shift, in order to obtain the tune spread value actually encountered in the machine. This weighting coefficient (0.4) take into account the percentage of the tune shift that is actually a tune spread, the effect of the real transverse distribution and the beneficial effect of the dual harmonic acceleration. The maximum tune spread of -0.34 at 160 MeV compares well with the β 0.38 obtained at 50 MeV (see figure 2.1.5 ), meaning that low energy transverse losses are likely to be of the same order. - 16 - 3. Global approach used for the cycle editor 3.1 Definition of the system The required PSB incoming beam parameters Injection energy Ion type with mass and charge Longitudinal and transverse emittance at injection with a possible increase law along the cycle The rf system (only the narrow band ferrite tuned cavity case is treated here) Maximum cavity voltage Maximum available current for beam acceleration Harmonic of the accelerating signal (w.r.t. the revolution The main power supply (MPS) with its bending magnets circuit Maximum voltage Maximum and minimum currents R, L, C impedance values Maximum power dissipation Maximum Vdot (voltage variation rate) - 17 - 3.2 Main constraints and core processing The main goal is to increase the magnetic field up to the extraction value as fast as possible in order to limit the power dissipation within the bending magnets and also to keep the PSB cycle length within the 1.2 s present value. At each time step, when increasing the field, the following parameters will have to be checked for: Bucket filling ratio below the maximum allowed value Bucket_Fill_max Cavity rf current requirement below I_RF_max Current requirements in the bendings below the MPS limits Bendings power dissipation below limits Rf bucket changes to be βadiabaticβ List of the effects encountered when the bending field ramp is increased (faster cycle): The power dissipation within the bendings is lowered The rf bucket and the bunch length shrink meaning more peak current and more space charge effects (longitudinally and transversally), and the risk that the acceptance goes below the beam emittance with induced losses The rf cavity current required for acceleration is increased The variation d2IMPS/dt2 causes a bucket shape change with induced non-adiabatic effects - 18 - Requirements for the flat-top duration. On the extraction plateau, the beam needs to be synchronized and beforehand optionally splitted. The required time for the synchronisation is in theory null as there are (not yet tested) means to prepare this process during the end of the acceleration with the new digital low-level rf hardware. For information, the synchrotron frequency at 2 GeV, h=1 with 8kV rf voltage is 256 Hz. The splitting process takes about 10 ms in the present 1.4 GeV context. Although this might not be the shortest possible value (no one has yet tried to make it shorter), we can estimate that by multiplying these 10 ms by the ratio of synchrotron frequencies (1.74 = 447 Hz/256 Hz), we get a safe estimation of the required time (17.4 ms). Another way of approaching the problem would be to estimate the splitting process time by comparing it to the time required for bunching at injection. At 50 MeV, with a maximum synchrotron frequency of 2 kHz at the final voltage of 8 kV, the bunching takes 1 ms (this is an optimized time). Multiplying this value by the ratio of synchrotron frequencies (7.81 = 2kHz/256 Hz) one gets 7.81 ms. This value could be multiplied by two for a even more conservative approach by considering that the splitting could be compared to a de-bunching followed by a re-bunching. With this comparison, the splitting would last 16 ms. In the simulations that are presented at the end of the document, the value of 20 ms for the flattop has been used. The above constraints have been included in an ExcelTM simulation program to provide results precise enough to elaborate strategies for a future upgrade of the PSB to 2 GeV. The global processing is described in figure 3.2.1. The 1.2 s cycle is divided into time intervals of an arbitrary duration along which the different calculated values are averaged. At each time sample corresponds a value of all the required parameters needed for a good overview of the acceleration process. Note that the adiabaticity does not appear as a constraint within the processing loop depicted in figure 3.2.1. This is just due to the fact that it didnβt appear as a critical parameter (the value is nevertheless observed in the Excel spreadsheet); it could be easily added in the script. The MPS power also doesnβt appear. The integrated energy is plotted and observed sideways. If it exceeds the limits, the user needs to lower the constraints by either lowering the beam current or by increasing the maximum allowed bunching factor. He can also decrease the injected beam longitudinal emittance. The core script depicted in figure 3.2.1 allows defining the maximum field increase in order to fulfil the basic rf current and Bucket filling constraints. The demanded B value is then loaded into an MPS model that determines the value that can actually be reached. The obtained field is then used to calculate all the beam and rf parameters for the actual time sample and for the next. - 19 - Step = 1E-4 * Bdot_max / (t0 β t -1) i=0 B = B -1 Bdot = Bdot -1 Bunch Length = Bunch_Length -1 B = B + i * Step Bdot = B - B -1 / (t0 β t -1) Ion charge Ion Mass rho Radius Beta Gamma eta Frev P ΞVrf / turn Obtained B0 i=i+1 Bunch_Q Beam pipe size Beam transverse size VRF set-point IBEAM RF VSpace charge Sin Οs VMAX, VdotMAX MPS Model NewBunch Length IRF_MAX BF >= BFMAX YES IRF_MAX BFMAX YES EXIT use B as required value BF = Bucket Filling NO Bunch Emittance Figure 3.2.1 Bucket Area Bucket filling Core process used to calculate the accelerating cycle - 20 - B_over_I R, L I RF I RF >= IMAX, IMIN 4. Description of the different ingredients or sub-systems that need to be considered Each sub-system will be depicted with a summary of the constraints related to cycle edition. The resulting Visual basic code employed in Excel is available in the annex. 4.1. Power supply feeding the PSB bending magnets In order to edit a magnetic cycle, the limitations of the power source need to be known. The main power supply (MPS) is presently constructed [2] using 5 sets of thyristors in charge of rectifying a high voltage 3-phase source in order to supply a maximum output voltage of 1 kV. 4 of these sets are combined so as to add-up their voltage for a maximum of 4 kV. The fifth and last thyristorβs cell is used as a spare. The system block diagram is available using https://edms.cern.ch/file/1070963/1/1070963_V1_TEEPC_A2.pdf the following link: Using a thyristor means changing its angle of conduction by means of changing its firing time. This allows transforming duration into the integral of a sine wave voltage along the same time duration. The thyristor setup being followed by a low-pass filter, only remains the DC value of the voltage. In summary, the MPS is basically a time to voltage converter. As the MPS finally allows creating a magnetic field (to a certain extent proportional to the electric current), it was found convenient to use a current probe within a feedback loop so as to make the system controlled as a current source. In the near future (within the Linac 4 era), the dipolar field measurement will be used into the loop so as to make the MPS a horizontal bending field source, which is finally the most convenient option. This will allow cancelling the non linear effects of magnet saturation together with the eddy current induced field ripple. For the cycle editing, parameters in table 3.1.1 need to be taken into account [3] and [4]. MPS parameters Present limits Future (Linac 4) limits Maximum voltage + 3800 / -3400 V +/- 5000V Maximum current + 4200 A + 5500 A Minimum current 100 A 100 A Maximum Voltage ramp 0.14 kV/ms 1 kV/ms Table 4.1.1 List of PSB MPS limiting parameters - 21 - Note in table 4.1.1 that a minimum current value is required for the MPS to maintain the current (or field) control loop into a stable state. The given empirical value [2] needs to be confirmed after a deeper analysis. 4.1.1 MPS model The 4 parameters in table 4.1.1 were selected as they represent a restriction to what can be achieved for the cycle. Table 4.1.1.1 summarizes how these values will be used in a context were they will limit the value of the field or its rate of change. MPS limiting parameters Employment within the cycle editor Max voltage VMPS MAX Limits the rate of field Max current IMPS MAX Limits the maximum field achievable Min current IMPS MIN Gives the minimum field value Max voltage ramp (dVMPS/dt)MAX Table 4.1.1.1 4.2 Limits the rate of field change Impact of the MPS limiting factors on a cycle edition Magnetic circuit driven by the MPS The power source having been described with its limitations, now comes the turn of the load that includes the bending magnet. These two ingredients will finally allow estimating the total field dynamics. The main power supply (MPS) is feeding a circuit [5] including different magnetic elements: the horizontal dipoles (BHZ and reference magnet), the focusing quadripoles (QFO) and the defocusing quadripoles (QDE). The βtrimβ power supplies have been represented; their aim is to provide adjustments to change the tune of the synchrotron (QFO, QDE) or to compensate the saturation effect of the bendings. - 22 - TRIM A BHZ (64x) Ring 1+4 TRIM QFO QFO (128x) 4 Rings Reference magnet MPS TRIM QDE 5 kΞ© QDE (64x) 4 Rings BHZ (64x) Ring 2+3 Figure 4.2.1 Magnetic circuit driven by the PSB main power supply [2] From the MPS viewpoint the circuit can be represented as in figure 4.2.2. Rm Ie Ip Im MPS Figure 4.2.2 Eddy current model Lm Ie1 Ie2 Re1 Re2 Le1 Le2 Cp Equivalent electric circuit driven by the PSB main power supply [5] - 23 - The electrical components represented in figure 4.2.2 have values that can be found in table 4.2.1. Below 600 kHz, this model gives less than +/- 5% error on the estimation of Eddy current effects. Table 4.2.1 Rm 400 mΞ© Re1 110 Ξ© Re2 1420 Ξ© Lm 191 mH Le1 0.957 mH Le2 0.583 mH CP 280 pF List of values to be used in figure 3.2.2 [4] [5] From table 4.2.1 it can be noted that the circuit elements used to model the eddy current effect (Lm, Le1, Le2, CP) can be neglected during most of the cycle where the current transitions are slow. Things are different during transients, like when approaching the flat-top with a high current slope and then abruptly changing this slope to zero, where resonant effects have been observed [6]. Figure 4.2.3 current ramps [6] Current fluctuations observed on the PSB flat top for different initial - 24 - Figure 4.2.3 shows how the field can fluctuate at the flat top for durations up to 100 ms depending on the initial dI/dt slope. This effect has not yet been analysed in terms of interaction with the beam, but is likely to be deleterious for the splitting process. Knowing the equivalent circuit (figure 4.2.2), these parasitic transients can be avoided by adapting the shape of the cycle close to the magnetic plateau, at the price of a slower cycling together with an associated increase of the dissipated power in the magnets. This latter effect is not wanted as the thermal situation is already critical presently at 1.4 GeV. Hopefully, in the foreseen PSB MPS setup, the feedback control loop will be using the field measurement as the observed variable. This means that these parasitic current/field oscillations will be removed. In terms of power, figure 4.2.3 suggests that the MPS will be asked to lower its voltage to compensate the Eddy current effect. Simplifying the equivalent load circuit of the MPS described in figure 4.2 by removing the components corresponding to the Eddy current thus doesnβt imply an underestimation of the power requirements. The resulting circuit (figure 4.2.4) is finally more precise in a context with a feedback loop using the value of the actual magnetic field. Rm Im Lm MPS Figure 4.2.4 The MPS with its load equivalent circuit in the context of the measured field feedback control A major characteristic of the magnetic circuit is the B = f(H) curve. This function allows to estimate the field as a function of the current. As the saturation effects in the PSB are delt with the trim power supplies the magnetization curve can be approximated by a straight line. 4.2.1 MPS load model The simple R/L load obtained after simplification means only 2 parameters need to be taken into account for the edition of the magnetic cycle, as summarized in table 4.2.1.1. - 25 - MPS load parameters Employment within the cycle editor Rm [Ξ©] Lm/Rm time constant, required MPS voltage, actual bending field and dissipated energy are a function of Rm. Lm [H] Lm/Rm time constant, required MPS voltage and actual bending field are a function of Rm. B_over_I [T/A] Allows estimating the field as a function of the current = 2.14 * 10-4 T/A in the PSB Table 4.2.1.1 4.3 List of the MPS load values to be used for the cycle editor RF system This paragraph depicts how the cavity power setup limits the rate of acceleration due to its limit in available current from the final amplifier. Only the narrow band ferrite loaded cavity case is treated here. The energy required to accelerate the beam is supplied by an rf cavity. The present cavities are narrow-band ferrite loaded cavities tuned to the required frequency by a current loop that applies a magnetic field to the ferrite. This slow-changing field, varying with the accelerating frequency, changes the permeability of the ferrite and thus the cavity resonant frequency. Figure 4.3.1 gives a simplified overview of the cavity setup with the different involved currents. Fast Feedback RF TETRODE CAVITY BEAM Power Amplifier Set point Low Level RF RPD Tuner Filter Reactive Power Detector Figure 4.3.1 Block diagram of the PSB ferrite cavity setup - 26 - The bunched beam in the ring corresponds to an rf current in quadrature phase with the cavity rf signal. In a below transition case as encountered in the PSB, the beam current is actually in quadrature advance (= lag due to the sign of the proton charge) and is thus perceived by the power amplifier (equivalent current source using a tetrode) as an extra capacitive load. The effect is depicted in figure 4.3.2 where the different signals are represented as vectors in the context of a non-accelerated beam. TETRODE INDUCED VOLTAGE CAVITY DETUNING SET-POINT VOLTAGE CAVITY TETRODE TOTAL VOLTAGE CURRENT BEAM CURRENT Figure 4.3.2 BEAM INDUCED VOLTAGE BEAM INDUCED VOLTAGE Vector diagram of rf signals within a cavity (non-accelerating case) Figure 4.3.2 shows how by detuning the cavity, the tetrode current can be in phase with the cavity voltage despite the presence of beam. The reactive (capacitive) effect of the beam is compensated by an increase of the cavity inductance. The cathode current is multiplied by the out of tune cavity impedance to create the tetrode induced voltage and the beam current undergoes the same effect. The closed-loop system is stabilized when the voltage sum of these two vectors is in phase with the driving signal (set-point voltage). One interesting effect of such a technique is that, in a non-accelerating case, the tetrode current isnβt required to increase to compensate for the presence of beam. Actually, when the cavity is detuned to compensate for the beam presence, its impedance modulus is lower, implying more current for the same voltage, but this effect is counteracted by the beam induced voltage, which due to the cavity detuning, has a beneficial effect on the required rf voltage. When the beam is accelerated, its rf vector component turns toward the real axis in opposite phase with respect to the cavity rf voltage. This effect is depicted in figure 3.3.3. CAVITY DETUNING SET-POINT VOLTAGE BEAM CURRENT Figure 4.3.3 TETRODE INDUCED VOLTAGE BEAM INDUCED VOLTAGE CAVITY TETRODE TOTAL VOLTAGE CURRENT BEAM INDUCED VOLTAGE Vector diagram of rf signals within a cavity (accelerating case) - 27 - As the beam current is less reactive in the accelerating case, the tuning loop needs to compensate less, up to a theoretical point where the stable phase is 90o and the rf beam current is real and in opposite phase with respect to the cavity voltage. In such an extreme case, no tuning compensation is required and the tetrode current needs to be increased by an amount equal to the beam current in order to maintain the expected rf cavity voltage. The required tetrode current can be expressed from a geometrical description, like in figures 4.3.2 and 4.3.3, as a function of the number of charges, particle velocity, stable phase value and cavity Q value. It can also be estimated with enough precision (in the context of power requirements estimation) as the value IB*sin(ΟS); IB being the amplitude of the rf component of the beam current and ΟS the stable phase. Note that the stable phase is also an approximation of the beam vector angle, valid in the case of short bunches. Longer bunches have an asymmetric shape and thus the stable phase does not represent precisely the beam phase. This long bunch effect translates into a beam phase that is larger than the actual stable phase. The approximation ITETRODE = ITETRODE NO BEAM + IB*sin(ΟS) remains nevertheless valid in our context. Table 4.3.1 summarizes the information required to establish the magnetic cycle Cavity parameters Employment within the cycle editor RC Cavity resistive value, required to evaluate the tetrode current necessary to create the expected rf voltage without beam. ITETRODE 0 peak = VRF peak / RC ITETRODE MAX peak Maximum tetrode current value (measured at the cavity gap) which allows to check for the following requirement: ITETRODE MAX peak - ITETRODE 0 peak > IB peak*sin(ΟS) Table 4.3.1 band cavity only) List of the cavity related values to be used for the cycle editor (narrow - 28 - 4.4. Beam dynamics This paragraph depicts how different beam dynamics related parameters are evaluated in the Excel application 4.4.1 Basic formulas R [m] = synchrotron radius = 25 m for the PSB c [m/s] = velocity of light = 2.99792458 * 108 Ξ±(ΞS) [ ] = moving bucket function with ΞS = |sin(ΟS)| and ΟS [rad] the stable phase. Using Ξ±(ΞS) = 1 gives the stationary bucket area. Ξ±(ΞS) is approximated with less than 0.5% error by the polynomial: Ξ±(ΞS ) = β4.869298085 β ΞS7 + 21.563437656 β ΞS6 β 38.304144731 β ΞS5 + 35.560953904 β ΞS4 β 18.839475275 β ΞS3 + 6.323558981 β ΞS2 β 2.435032449 β ΞS + 1 e [ ] = elementary charge = 1 when eV is used as the energy unit VRF [V] = peak rf voltage at the cavity gap ES [eV/u] = πΎ β πΈ0π’ = total energy per atomic mass unit (amu) of the synchronous particle ΞΆ [ ] = total charge Ar [ ] = ion mass relative to the amu Ξ· [ ] = 1β 2 β 1βπΎ 2 = frequency slip factor πΎπ h [ ] = harmonic number (number of rf period per revolution) πΎ= 1 β1 β π½ 2 πΉπ πΈπ = p= π½βπ 2π β π βES2 β E02 eV ππ = βES2 β E02 when p expressed in [ ] c c E0 [eV] is the energy of the rest particle - 29 - Moving_Bucket_Area [eV.s/nucleon] = 16 β π β πΌ (ΞS )β π πβππ πΉ βπΈπ βπ 2πβ|π|ββ3 βπ΄π [7] Ξ±(Ξs) the moving bucket coefficient, can be approximated with less than 0.5% by a power series: πΌ(ΞS ) β β4.869298085 β Ξπ7 + 21.563437656 β Ξπ6 β 38.304144731 β Ξπ5 + 35.560953904 β Ξπ4 β 18.839475275 β Ξπ3 + 6.323558981 β Ξπ2 β 2.435032449 β Ξπ + 1 Bunch length in a stationary bucket (approximation with less than 0.5% error) [7] π 3 β8 β β(π 3 β8) β 16 β π΅π β {(π 3 β16) β 1} β (π΅ππ) [ππ πππ‘ππ‘ π΅π’ππβ πππ] β π β (π 3 β16) β 1 Bfr [ ] is the bucket filling ratio = beam emittance / bucket area Bunch length in a moving bucket [9] ππππ£ π΅π’ππβ β { ππππ£ π΅π’ππβ π πΈπ β π π2 β πΜπ πΉ β β1 β π ππ2 (ππ ) π β { } πΈπ β π π2 β πΜπ πΉ 1β4 } 1β4 β {1 β π ππ2 (ππ )}β1β8 At a given energy, the bunch length is thus proportional to {1 β sin2(ΟS)}-1/8, value equal to one when ΟS =0. => ΟMov Bunch = ΟStat Bunch . {1 β sin2(ΟS)}-1/8 β ππππ£ π΅π’ππβ (π΅π) [ππ πππ] βπββ π 3 β8 β β(π 3 β8) β 16 β π΅π β {(π 3 β16) β 1} β {1 β π ππ2 (ππ )}β1β8 (π 3 β16) β 1 Bfr = bucket filling ratio - 30 - Beam Transverse dimensions from emittance value xβ, yβ ο₯ ο’ x,y Area = Ο.Ξ΅ x, y ο₯ ο ο’x, y Figure 4.4.1.1 Beam emittance Ξ΅ and associated physical dimension The RMS normalized emittance Ξ΅* = Ξ².Ξ³.Ξ΅ is the value obtained in the PSB when using the wire scanners application. From this value, the RMS physical beam radius can be obtained (see figure 4.4.1.1). ππ₯,π¦ π β β π½π₯,π¦ β = π½βπΎ 4.4.2 Incoherent tune shift [10, 12] Ξππ₯,π¦ πππ = β π΅π’ππβ_π_π β π0 β β©π½π₯,π¦ βͺ π β π½2 β πΎ β{ (1 β π½ 2 ) π,π 1 π½2 1 π·π β π½ 2 π,π π,π π,π β πΊ + β πΊ β β ( β 1) β πΊ + β πΊπ } π π π΅π. π 2 π΅π β β2 π β2 π΅π π2 Expression of the tune shift when the beam current is at its local maximum The first term corresponds to space charge self-forces, the second to electric image forces in vacuum chamber, the third to magnetic image forces from the vacuum chamber (high frequency magnetic beam components only) and the last to the magnetic image in magnet poles (Low frequency magnetic beam components only). r0 [m] = π2 4βπβπ0 βπ0 βπ 2 = classical particle radius = 1.5347 . 10-18 for protons β©π½π₯,π¦ βͺ = average beta function amplitude - 31 - b,g, h [m] : see figure 3.4.1.1 and table 3.4.1.1. For the beam dimensions, one should use the RMS value ο³ b = βπ β ππ and a = βπ β ππ . Df [ ]: fraction of the ring circumference where the beam is sandwiched between bending magnetic poles. This is how Df is defined in [12] for a coasting beam with a uniform line density. As we treat separately the section with dipoles (elliptic chambers) and the remaining circular beam pipe sections, we will use f=0 in the circular part and f = 1 for the elliptic chamber. Bf [ ]: Bunching factor = average particle line density / peak line density Figure 4.4.2.1 Beam and vacuum pipe dimensions as to be used in table 4.4.2.1 (copy from [10]) In the PSB 1/3 of the ring is composed of elliptic beam pipe sections (where the dipoles stand) and 2/3 of circular beam pipes. The tune shift will thus be calculated for both parts and the final result will be obtained by making a weighted sum of the two ingredients. - 32 - Circular beam pipe Parameters (for high intensity 1e13 per ring) beam radius = (a+b)/2 Elliptic beam pipe 1/3 of the PSB circumference 2/3 of the PSB circumference (see figure below for the meaning of a, b and h) β©π½π₯ βͺ [ ] 6.15107 6.54203 β©π½π¦ βͺ [ ] 6.60863 5.19698 25 e-6 25 e-6 of the vertical normalized beam emittance 7 e-6 7 e-6 h [m] 8 e-2 3.2 e-2 w [m] 8 e-2 8 e-2 g [m] 10 e-2 (estimation) β π0π₯ 0.5 β ππππ ππππ β π 2 π β (π + π) π¦ 0.5 β ππππ ππππ β π π+π π1π₯ 0 β2 2βπΎ 2 β²2 ) β [(1 + π β ( ) β 2] 12 β (π€ 2 β β2 ) π π¦ 0 = βπ1π₯ 0 -Ο2/24 Ξ΅H [m] 1Ο value of the horizontal normalized beam emittance Ξ΅V [m] 1Ο value π0 π1 π2π₯ (no bendings in the cannot be calculated, thus assumed to be the circular sections) same as in the parallel plates case Ο2/24 0 π¦ π2 Df (no bendings in the cannot be calculated, thus assumed to be the circular sections) same as in the parallel plates case 0 1 Table 4.4.2.1 Laslett coefficients to be used to evaluate the transverse incoherent tune shift. - 33 - form = Beam form factor = 1 for a uniform transverse distribution; =3 for a bi-Gaussian distribution (the tune shift is 3 times as large in the centre of the distribution as the tune shift in a uniform distribution). Note that the tune spread rather than the tune shift is a relevant value in a context where losses are being evaluated. An hypothetic beam where all particles encounter the same tune shift is not critical as a simple change of the optics set-point is enough to compensate for this effect. In a bi-Gaussian distribution beam with an infinite transverse radius, the tune spread is equal to the maximum tune shift as the particle on the periphery undergoes no beam-beam effect. For practical beams, the Gaussian distribution is truncated and the space charge tune spread can be evaluated using figure 3.4.1.2. kβ = [ π π 1+2βββ π=0 (β1) βπ ο³ kβ = 1+2βββ π=0 [ π π2 2 2 ] with 1+2β(1βπ+π4 βπ9 +β― ) 1+2β(1+π+π4 +π9 +β― ) ] π= π€ββ π€+β = 0.428 in the PSB elliptic chamber 2 with q = 0.428 π = β1 β π β²2 β 2 (2 β π)! π π 1 9 25 πΎ = πΎ(π) = β β [ 2βπ ] β π 2βπ = β [1 + β π 2 + β π4 + β π6 + β― ] 2 2 2 β (π!) 2 4 64 256 π=0 Figure 4.4.2.2 Space charge tune shift of a particle with betatron amplitude r as a fraction of the maximum space charge tune shift of a bi-Gaussian distributed round beam with rms beam size Οr (copy from [12]) - 34 - 4.4.3 Momentum p [eV/c] Equilibrium of forces within a dipole: (_i stands for ion) π_π β π£ 2 π_π β π£ β π΅ = π β π_π = π_π β π£ = π_π β π΅ β π β π_πππ_πππ’ = π_π β π£ π β π β π΅ β π = π_π_π π_π_π β π_πππ_πππ’ [ π½ β π /π] = πβπβπ΅βπ π_π_π amu [kg] = atomic mass unit: 1.660538782E-27 kg ΞΆ [ ] = number of elementary charges in the ion 1 eV = e*J Expression of the momentum in eV/c (1 [J.s/m] = c/e [eV/c]): β π_πππ_πππ’ [ ππ/π] = π΅ β π β π β π π_π_π 4.4.4 Beta Equilibrium of forces within a dipole: ( _i stands for ion) π_π β π£ 2 π_π β π£ β π΅ = π β π_π = π_π β π£ = π_π β π΅ β π (1.1) We also have: π_π = π_π β π£ = πΈ_π πΈ_π β π½ βπ£ = (1.2) 2 π π (1.1)+ (1.2) => π_π β π£ β π΅ = βπ½ = πΈ_π β π½ π π_π β π΅ β π β π πΎ β πΈ_π0 - 35 - using: πΎ= β π½2 = β π½ 2 β {1 + 1 β1 β π½ 2 (π_π β π΅ β π β π)2 πΈ_π0 2 (π_π β π΅ β π β π)2 πΈ_π0 2 β (1 β π½ 2 ) }= (π_π β π΅ β π β π)2 πΈ_π0 2 letβs define: π΅0 = πΈ_π0 π_π0 β π = π_π β π β π π β π β π 2 β π½ β {1 + π΅2 π΅0 2 }= π΅2 π΅0 2 π΅β π΅0 βπ½ = β1 + (π΅β ) π΅0 2 4.4.5 Adiabaticity A longitudinal process is called adiabatic when the synchrotron motion parameters are changed slowly enough to preserve the beam emittance in a process that is reversible. When editing a cycle, one needs to check that the variations of the rf bucket fulfil this constraint. One adiabaticity parameter often used for the rf capture of unbunched beams is: ka = ππ΄ ππ ππ‘ β π΄ A [eV.s] = Bucket area TS [s] = synchrotron period A process is considered as adiabatic when |ka| < 0.5, which corresponds to: ππ΄ π΄ | | < 0.5 β ππ‘ ππ 4.4.6 Beam signal spectrum (cosine bunch shape) - 36 - Ξ» Ξ»PP t, Ο TRF ΟRF TBunch ΟBunch Figure 4.4.6.1 : Beam line density along the synchrotron circumference The beam line density as a function of time represents the function dQ/dt (Q being the charge of the beam), which is thus equivalent to the corresponding electrical current. The integral of this function along a bunch period correspond to the number of particle in the bunch. In the context of this note, the interesting value is the beam current at the rf harmonic, which is the value being sensed by a narrow band cavity (the actual ferrite types installed in the PSB). The shape of the beam can be obtained analytically, taking into account the rf voltage, the stable phase, the emittance and the particle distribution. A Fourier analysis for each obtained shapes would then give the beam current at each harmonic. In the present context, it was found convenient to make a simplification, assuming a cosinusoidal shape, visually very similar to the one actually observed in a single harmonic acceleration context. Due to the possible dual-harmonic acceleration, bunches may have different shapes, but in the practical case where the second harmonic is used to flatten bunches, the second harmonic has typically its zero phase (=0 voltage) corresponding to the centre of the bunch (more precisely the location of the synchronous particle). In this case the second harmonic cavity is not providing any average longitudinal energy, meaning that the energy increase is all provided by the first harmonic cavity. As the energy increase is a function of the stable or synchronous phase (energy per turn =VRF*sinΟS*IBEAM*TREV) and not of the distribution of the particles, the beam current at the accelerating harmonic needs to be equal to that one obtained in a single harmonic case. This means that in the case of a rectangular shaped bunch, the bunch will get wider in order to have the same current at the main accelerating rf as compared to the single harmonic case. Treating the case of single harmonic type of bunch shape is thus a good approach as long as the conditions above are fulfilled, which is the case for high intensity beams requiring the most from the rf power equipment (requirements that we are trying to establish). The rectangular shaped beam will also be analysed, as its harmonics will have to be dealt with by the highest harmonics cavities. In figure 4.4.6.1 the beam line density can be expressed between βTBunch/2 and +TBunch/2 as π(π‘) = πππ β πππ (π β - 37 - π‘ ππ΅π’ππβ ) with: β« ππ΅π’ππββ 2 βππ΅π’ππββ 2 β ππ΅π’ππβ = πππ β β« π(π‘) ππ‘ = ππ΅π’ππβ ππ΅π’ππββ 2 βππ΅π’ππββ 2 πππ (π β π‘ ππ΅π’ππβ ) ππ‘ ππ΅π’ππβ β ππ΅π’ππβ β2 ππ΅π’ππβ π‘ = πππ β β [π ππ (π β )] π ππ΅π’ππβ βππ΅π’ππββ 2 β ππ΅π’ππβ = 2 β πππ β β πππ [πΆ βπ ππ π΄] = ππ΅π’ππβ π π ππ΅π’ππβ π 2 β π β βπ΅π’ππβ β πΉπ πΈπ β = β ππ΅π’ππβ β 2 ππ΅π’ππβ 2 ΟBunch = ππ΅π’ππβ β π 2 β βπ΅π’ππβ β πΉπ πΈπ ΟBunch Peak beam current with bunch length phase ΟBunch related to the main rf at harmonic hBunch*FREV Beam signal in Fourier series: β 1 π(π‘) = β π0 + β ππ β πππ (π β ππ πΉ β π‘) + ππ β π ππ(π β ππ πΉ β π‘) 2 π=1 bn = 0 as Ξ»(t) is even in the representation of figure 3.4.5.1 β 1 β π(π‘) = β π0 + β ππ β πππ (π β ππ πΉ β π‘) 2 π=1 ππ΅π’ππββ 2 4 β πππ ππ = ββ« ππ πΉ 0 _____________________________ cos (π β π‘ ππ΅π’ππβ ) β cos(n β ΟRF β t) ππ‘ β« π’β² β π£ = π’ β π£ β β« π’ β π£β² π’β² = πππ (π β π‘ ππ΅π’ππβ ) π£ = cos (n β 2Ο β ππ΅π’ππβ π‘ β π ππ (π β ) π ππ΅π’ππβ _____________________________ π’= - 38 - π£ β² = βn β t ) TRF 2Ο t β sin (n β 2Ο β ) TRF TRF ππ΅π’ππββ 2 4 β πππ ππ΅π’ππβ π‘ t β ππ = β β [π ππ (π β ) β cos (n β 2Ο β )] ππ πΉ π ππ΅π’ππβ TRF 0 ππ΅π’ππββ 2 2Ο β n β ββ« TRF 0 β ππ = π ππ (π β ππ΅π’ππβ 4 β πππ ππ΅π’ππβ β ππ πΉ π t ) ππ‘ TRF ) β sin (n β 2Ο β 4 β πππ ππ΅π’ππβ TBunch 4 β πππ ππ΅π’ππβ 2Ο β n β β cos (n β Ο β )+ β β ππ πΉ π TRF ππ πΉ π TRF ββ« ππ΅π’ππββ 2 π ππ (π β 0 β π‘ + π‘ ππ΅π’ππβ ) β sin (n β 2Ο β t ) ππ‘ Trf π β ππ πΉ βπ 4 β πππ β ππ΅π’ππβ π = cos (n β Ο β ββ« ππ΅π’ππββ 2 TBunch 2Ο β n )+ TRF TRF π ππ (π β 0 π‘ ππ΅π’ππβ ) β sin (n β 2Ο β t ) ππ‘ TRF _____________________________ β« π’β² β π£ = π’ β π£ β β« π’ β π£β² π’β² = π ππ (π β π‘ ππ΅π’ππβ ) π£ = sin (n β 2Ο β βππ΅π’ππβ π‘ β πππ (π β ) π ππ΅π’ππβ _____________________________ π β ππ πΉ β βπ 4 β πππ β ππ΅π’ππβ π π’= = cos (n β Ο β π£β² = n β ππ΅π’ππββ 2 t β [πππ (π β ) β sin (n β 2Ο β )] ππ΅π’ππβ TRF 0 ββ« 0 2Ο t β cos (n β 2Ο β ) TRF TRF TBunch 2Ο β n βππ΅π’ππβ )+ β TRF TRF π π‘ ππ΅π’ππββ 2 t ) TRF πππ (π β π‘ ππ΅π’ππβ ) β cos (n β 2Ο β - 39 - + 2Ο β n ππ΅π’ππβ 2Ο β n β β TRF π TRF t ) ππ‘ TRF β π β ππ πΉ βπ 4 β πππ β ππ΅π’ππβ π = cos (n β Ο β ββ« ππ΅π’ππββ 2 0 β TBunch 2Ο β n ππ΅π’ππβ 2Ο β n )+0+ β β TRF TRF π TRF πππ (π β π‘ ππ΅π’ππβ ) β cos(n β Οrf β t) ππ‘ π β ππ πΉ TBunch 2Ο β n ππ΅π’ππβ 2Ο β n ππ πΉ β ππ = cos (n β Ο β )+ β β β βπ 4 β πππ β ππ΅π’ππβ TRF TRF π TRF 4 β πππ π π β ππ πΉ Ο β n2 β ππ΅π’ππβ TBunch β( β ) β ππ = cos (n β Ο β ) 4 β πππ β ππ΅π’ππβ πππ β TRF TRF 2 2 π ππ πΉ β 4 β π2 β ππ΅π’ππβ TBunch β( β ) β ππ = cos (n β Ο β ) 4 πππ β TRF β ππ΅π’ππβ TRF β ππ [πΆ βπ ] = 4 πππ β TRF β ππ΅π’ππβ TBunch β 2 β cos (n β Ο β ) 2 π ππ πΉ β 4 β π2 β ππ΅π’ππβ TRF Replacing Ξ» by its charge equivalent: π ππ΅π’ππβ 4 2 β ππ΅π’ππβ β TRF β ππ΅π’ππβ TBunch β ππ = β β cos (n β Ο β ) 2 2 2 π ππ πΉ β 4 β π β ππ΅π’ππβ TRF β ππ = 2 ππ πΉ 2 β ππ΅π’ππβ β TRF TBunch β cos (n β Ο β ) 2 TRF β (2 β π β ππ΅π’ππβ ) T cos (n β Ο β Bunch 2 β ππ΅π’ππβ TRF ) β ππ = β( ) TRF ππ΅π’ππβ 2 1 β (2 β π β ) TRF This expression can be written in terms of angles; n is the harmonic of bunches repetition rate: ΟBunch cos (n β Ο β Ο ) RF β ππ [πΆ βπ ] = 2 β β β πΉπ πΈπ β ππ΅π’ππβ β ( ) ΟBunch 2 1 β (2 β π β Ο ) RF In the PSB context, where all the rf buckets are filled and the bunches are considered equal in shape and amplitude, the beam signal is only composed of rf harmonics. As we are here interested in beam loading issues within cavities, we will retain the values of the beam amplitudes at these rf harmonics where the cavities sit. - 40 - To avoid confusions, we will replace n by hRF_Meas and h by hBunches ; the latter being the harmonic of the dominating rf. β ππ ΟBunch cos (hRF_Meas β Ο β Ο ) RF [πΆ βπ ] = 2 β βπ΅π’ππβππ β πΉπ πΈπ β ππ΅π’ππβ β ( ) ΟBunch 2 1 β (2 β hRF_Meas β Ο ) RF The expression of the cosine-shaped beam signal is thus: π(π‘)ππ ΟBunch cos (hRF_Meas β Ο β Ο ) RF = 2 β βπ΅π’ππβππ β πΉπ πΈπ β ππ΅π’ππβ β ( ) β πππ (ππ πΉ β π‘) ΟBunch 2 1 β (2 β hRF_Meas β Ο ) RF and the amplitude of the hRF_Meas harmonic is: βπΌπΆππ π΅πππ βππ‘ βπ πΉ_ππππ = βπ(π‘)βππ‘ βπ πΉ_ππππ ΟBunch cos (hRF_Meas β Ο β Ο ) RF = 2 β βπ΅π’ππβππ β πΉπ πΈπ β ππ΅π’ππβ β | | ΟBunch 2 1 β (2 β hRF_Meas β Ο ) RF and when the bunch length [rad] is defined in terms of the dominating rf phase angle, where ΟRF represents 2Ο by definition: Ο cos (hRF_Meas β Bunch 2 )| βπΌπΆππ π΅πππ βππ‘ βπ πΉ_ππππ = 2 β βπ΅π’ππβππ β πΉπ πΈπ β ππ΅π’ππβ β | 2 Ο 1 β (hRF_Meas β Bunch ) Ο 4.4.7 Beam signal spectrum (rectangular bunch shape) Ξ» Ξ»PP t, Ο TBunch ΟBunch TRF ΟRF Figure 4.4.7.1 Beam line density along the synchrotron circumference - 41 - The rectangular bunch shape is a convenient simplification of the actual bunch shape encountered in a dual harmonic acceleration where a low bunching factor is required. The value of the beam current at the two first rf harmonics will be used in our context to evaluate the beam current sensed by the h1 and h2 cavities. In figure 4.4.7.1 the beam line density can be expressed between βTBunch/2 and +TBunch/2 as π(π‘) = πππ with: β« ππ΅π’ππββ 2 βππ΅π’ππββ 2 π(π‘) = ππ΅π’ππβ β ππ΅π’ππβ = πππ β ππ΅π’ππβ ππ΅π’ππβ 2 β π β βπ΅π’ππβ = ππ΅π’ππβ β πΉπ πΈπ β ππ΅π’ππβ ΟBunch Peak beam current with bunch length phase ΟBunch related to the main rf at harmonic hBunch*FREV β πππ [πΆ βπ ] = The same mathematical approach as for cosine shaped bunches leads to the following formula: Ο sin (hRFMeas β Bunch 2 )| βπΌπ πππ‘ π΅πππ βππ‘ βπ πΉππππ = 2 β βπ΅π’ππβππ β πΉπ πΈπ β ππ΅π’ππβ β | Ο hRFMeas β Bunch 2 Expression of the beam amplitude for rectangular bunches at harmonic hRF_Meas when the bunch length is expressed as an angle of the dominating rf in radians 4.4.8 Space charge voltage The total coupling impedance can be expressed as [8]: ππ π0 β π0 = π + π β (ππ πΈπ β πΏ β ) β 2 β π½ β πΎ2 R [Ξ©] = resistive wall impedance; can be neglected in the PSB L [H] = total wall inductance over one revolution; can be neglected in the PSB π0 [πΊ] = free space impedance = β π0 = 377Ξ© π0 - 42 - ππππ πππππ’π g0 [ ] = Longitudinal space charge coupling coefficient = 0.5 + πΏπ (2π ππππ πππππ’π ) [13] formulae valid within 15% precision over all binomial distributions from Kapchinsky-Vladimirsky to Gaussian for a circular beam into a circular beam pipe. This coefficient will be calculated for beams with an elliptic cross section, taking the average of the H and V dimensions as the beam radius; same for the pipe radius where the pipe is elliptic (within magnets). h [ ] = mode number = Ο/ΟREV Neglecting R and L: ππ π0 β π0 = βπ β β 2 β π½ β πΎ2 Space charge force has therefore the same effect as a negative wall inductance, implying that the induced voltage at any beam longitudinal phase is proportional to the derivative of the beam current at this given phase. The beam line density or current having the shape of the potential and the potential being the integral of the voltage, the space charge induced voltage is proportional to the derivative of the integral of the rf voltage. It is therefore proportional to the rf voltage itself. The space charge induced voltage can be written: ππ πππΆ (β) = βπΌππππ (β) β β β | | β The minus sign is valid below transition only πππΆ (β) = βπΌππππ (β) β β β π0 β π0 2 β π½ β πΎ2 4.4.9 MPS model The main power supply with its magnetic circuit has been modelled in figure 3.2.4. It consists of a current generator feeding a serial L-R network. In our context where the program is asking for a field value at a given time sample, the exercise will be to evaluate the required MPS source voltage to check that it remains elow the maximum value. ππππ = π πππ β πΌπππ + πΏπππ β ππΌπππ ππ‘ Special solution: IMPS_S = constant βΉ ππΌπππ_π =0 ππ‘ π πππ β πΌπππ_π = ππππ βΉ πΌπππ_π = - 43 - ππππ π πππ General solution: π πππ β πΌπππ_πΊ + πΏπππ β βΉ ππΌπππ_πΊ =0 ππ‘ ππΌπππ_πΊ π πππ =β β ππ‘ πΌπππ_πΊ πΏπππ βΉ β« ππΌπππ_πΊ π πππ =β βπ‘ ππΌπππ_πΊ πΏπππ πΌπππ_πΊ π πππ βΉ πΏπ ( )=β βπ‘ π πΏπππ πΌπππ_πΊ = π β βπ πππ βπ‘ π πΏπππ βπ‘ =πβπ πβ Complete solution with Ο = LMPS / RMPS: πΌπππ = βπ‘ ππππ + πβπ πβ π πππ If at t= 0, IMPS = IMPS_0 π = πΌπππ_0 β β πΌπππ = ππππ π πππ βπ‘ βπ‘ ππππ β (1 β π π β ) + πΌπππ_0 β π π β π πππ βπ‘ (πΌπππ β πΌπππ_0 β π π β ) β π πππ ππππ = ππππ = βπ‘ (1 β π π β ) βπ‘ πΌ (πΌ πππ β 1 + 1 β π π β ) β π πππ β πΌπππ_0 πππ_0 ππππ = π πππ β πΌπππ_0 + βπ‘ (1 β π π β ) πΌ πΌ (πΌ πππ β πΌπππ_0 ) β π πππ β πΌπππ_0 πππ_0 πππ_0 βπ‘ (1 β π π β ) ππππ = π πππ β {πΌπππ_0 + (πΌπππ β πΌπππ_0 ) (1 β βπ‘ π π β) } As the magnets have supposedly a linear magnetization curve (if not, the trims will correct this), with a conversion factor βB_over_Iβ: - 44 - ππππ = (π΅ β π΅0 ) π πππ β {π΅0 + βπ‘ } π΅_ππ£ππ_πΌ (1 β π π β ) (πΌπππ β πΌπππ_0 ) (1 β βπ‘ π π β) = ππππ β πΌπππ_0 π πππ βπ‘ πΌπππ β πΌπππ_0 + πΌπππ_0 β (1 β π π β ) = βπ‘ πΌπππ β πΌπππ_0 β π π β = βπ‘ ππππ β (1 β π π β ) π πππ βπ‘ ππππ β (1 β π π β ) π πππ as B = IMPS . B_over_I: π΅= βπ‘ βπ‘ ππππ β (1 β π π β ) + π΅0 β π π β π πππ β π΅_ππ£ππ_πΌ Maximum Bdot = dB/dt : ππππ = π πππ β πΌπππ + πΏπππ β ππΌπππ ππ‘ ππΌπππ ππππ_ππ΄π β π πππ β πΌπππ | = ππ‘ ππ΄π πΏπππ ππ΅ π΅_ππ£ππ_πΌ π πππ | = β ππππ_ππ΄π β βπ΅ ππ‘ ππ΄π πΏπππ πΏπππ Maximum Bdouble_dot = d2B/Ξt2 : π2π΅ π΅_ππ£ππ_πΌ πππππ π πππ ππ΅ | = β | β β 2 ππ‘ ππ΄π πΏπππ ππ‘ ππ΄π πΏπππ ππ‘ - 45 - 5. Required precision of the bending field The cycle editor provides set point values for the magnetic field without specifying the required precision. These specifications are detailed in this chapter. The precision at injection (160 MeV), with a nominal Linac 4 beam momentum and a nominal fixed injection rf frequency, a field variation will translate into a bucket shift in energy. With a h=1, 8kV bucket filled-up to 80 %, there is a 50 keV margin at the top and at the bottom area of the rf bucket (0.674 eV.s beam emittance). Dividing arbitrarily this gap by 2, one gets +/- 25 keV of possible fluctuation of the rf bucket. This leads [11] to a requirement in term of precision for the dipolar field such as: ππ΅ ππ ππ 2 = β πΎπ‘π β π΅ π π dR/R is equal to zero in this context where we are comparing different energy (or momentum) equilibrium states. ππ΅ ππ β =β π΅ π with π£ π=πΈβ 2 π βπβπ Ο [m] = bending radius ππ΅ ππΈ β =β π΅ πΈ At injection E = 938 + 160 = 1098 MeV ππ΅ 25 β 103 β | | β€β π΅ 1098 β 106 ππ΅ β | | β€β 23 β 10β6 π΅ Required relative precision of the magnetic field at injection (160 MeV) for a maximum 5% energy error in the longitudinal painting process. This requirement corresponds to the required real value of the bending field with respect to the set value. Its measurement, resulting in the B-train, is not involved here. At extraction (2GeV), where the rf frequency is determined by a fixed reference, any variation of the B field will translate into momentum and trajectory deviation. In the transverse plane of the receiving machine (PS), the effect of radial offsets (injection errors) on the transverse emittance should be cancelled by the transverse feedback acting bunch by bunch. At a first order, the requirements for the PSB B field precision at extraction will only come from trajectory issues (septum, transfer line) not covered here. The increase of energy with its associated transverse beam size shrinking should lower the constraints, but the possible doubling of the intensity may ask for more to keep radio-activation effects due to losses, low. - 46 - In the longitudinal plane a field error means a shift in energy with respect to the downstream machine (PS). If all bunches in the PS suffer the same energy offset, this will be dealt with by the PS phase loop. In case we are in a double batch filling process, where bunches from a previous shot circulate in the PS, the energy error will translate into an emittance increase, and as the filamentation process is not perfect, to unwanted tails. In the longitudinal phase space, the coordinates of the outer particle trajectory on both axes are proportional to the square root of the emittance. Increasing the amplitude on the energy axis by a factor (1+x) means thus increasing the emittance by a factor (1+x)2. 1% emittance increase means thus an excursion on the energy axis multiplied by (1+x) such that (1+x)2 = 1.01, meaning x = 0.005. Note that the blow-up effect is averaged over the previously injected bunches. To avoid taking into account all the possible cases, the computation will be made as if this averaging process didnβt occur. We have: 2 ππ΅ ππ πΎ 2 β πΎπ‘π ππ 2 = πΎπ‘π + β 2 π΅ π πΎ π with df = 0, as the frequency is fixed during synchronisation => 2 ππ΅ πΎ 2 β πΎπ‘π ππ = β 2 π΅ πΎ π Ξ³ = 3.13 at 2 GeV Ξ³tr = 4.07 in the PSB π½ π=πΈβ πβπβπ Beam energy spread at 2 GeV = 9.04 MeV (with 0.674 eV.s beam emittance as at injection) Energy offset for 1% emittance increase = 9.04 MeV * 0.005 = 45 keV Total beam energy at 2 GeV: E = 2.92 GeV ππ΅ ππΈ | | β€ β0.69 β π΅ πΈ ππ΅ 45 β 103 | β€ β0.69 β = 15.4 β 10β6 π΅ 2.92 β 109 Required relative precision the magnetic field at extraction (2 GeV) for a 1% maximum blowup in the receiving machine | This requirement corresponds to the required real value of the bending field with respect to the set value. Its measurement, resulting in the B-train, is not involved here. - 47 - 6. Tune shift and losses The cycle editor allows tracking the value of the incoherent tune shift without specifying the actual effects translating into blow-up or losses. Measurements made by B. Mikulec and G. Rumolo in the PSB seem to show that losses during the high space charge phase are somehow proportional to the intensity (for a given acceleration rate). The best linear fit of the results is: Losses [%] = 2.02 *(nb of E12 protons) β 1.05 Best quadratique fit: Losses [%] = 0.12 *(nb of E12 protons)^2 β 0.2 *(nb of E12 protons) + 3.82 The tune shift being proportional to the intensity (see chapter 4.4.2), suggests that losses are somehow proportional to the tune shift. There is an average 18% loss with a 1E13 p beam injected at 50 MeV, with ΞQV = -0.38 (simulated value in chapter 2.1) 2.5E13 p injected at 160 MeV corresponds to a ΞQV = -0.35. This factor 0.92 = 0.35/0.38 in tune spread suggests a possible 18 * 0.92 = 16.5% loss within the high space charge time window or a maximum of 2.08 E13 protons accelerated from the 2.5E13 injected. This result remains to be verified. - 48 - Conclusion An automatic cycle editor has been proposed for the CERN PS Booster. It takes into account the main characteristics of the synchrotron hardware together with beam parameters. It outputs the fastest possible cycle, allowing minimum losses at low energy where space charge effects dominate and allowing for a minimization of the energy dissipated in the ring dipoles. The developed software indicates that the PSB, with the present hardware, but a new foreseen Main Power Supply, is capable of accelerating up to 1.1E13 protons per ring from 160 MeV to 2 GeV. This intensity corresponds to three times the maximum LHC requirements. Upgrading the C02 cavity amplifier in order to increase its output current capability by an extra 3.3 Amperes (+ some margin) would allow accelerating the most intense - 2.5 E13 protons per ring - injected beam foreseen with Linac 4, while keeping the present power dissipation limits of the bendings. This 2.5 E13 protons per ring value is theoretical as losses are expected at low energy, mainly due to incoherent tune spread. The actual estimated maximum accelerated intensity is around 2.1 E13 p per ring. The simulations should be conservative as they take into account a single harmonic acceleration with higher space charge effects as actually encountered in the foreseen dual harmonic acceleration. Acknowledgements Fulvio Boattini, Marco Buzio, Max Chamiot-Clerc, Antony Newborough, and Serge Pittet in charge of the PSB main power supply and magnet systems are warmly thanked for having shared their knowledge of the present and future systems. Mauro Paoluzzi has been very helpful providing information about the PSB power rf equipments and Giovanni Rumolo about the PSB beam parameters and machine optics. Elias Metral has been very helpful for discussing the longitudinal space charge impedance. Many thanks to Bettina Mikulec who carefully read this document before publication and provided valuables suggestions. Klaus Hanke has supported this work in the frame of the PSB energy upgrade study. - 49 - References [1] Active Longitudinal painting for the H-charge exchange injection of the Linac 4 beam into the PS Booster, Carli C., Garoby R., CERN-AB-Note-2008-011, 2008. [2] Discussions with Max Chamiot-Clerc and Serge Pittet from CERN TE-EPC group, https://edms.cern.ch/file/1070963/1/1070963_V1_TEEPC_A2.pdf [3] Power converters implications for Booster Energy Upgrade, Burnet, J-P (CERN) ; Pittet, S, (CERN) ;04.05.2010, presentation, https://dfs.cern.ch/dfs/Departments/TE/Groups/EPC/Projects/BOOSTER%20Upgrade/TETM%20Booster%20upgrade.pdf [4] Operation of the CERN PS-Booster above 1 GeV; Saturation effects in the main bending magnets and required modifications, M. Benedikt, C. Carli, CERN/PS 98-059 (OP) [5] Eddy Current Modeling and Measuring in Fast-Pulsed Resistive Magnets / Arpaia, P (Sannio U. ; CERN) ; Buzio, M (CERN) ; Gollucio, G (Sannio U. ; CERN) ; Montenero, G (Sannio U. ; CERN), CERN-sLHC-PROJECT-Report-0047. [6] Presentation by M. Buzio to the PSB energy upgrade working group, https://twiki.cern.ch/twiki/pub/PSBUpgrade/MinutesMeeting17June2010/PSBMainDipoleEddy CurrentTestJune2010.pdf [7] Some useful formulae for longitudinal phase space, Flemming Pedersen, document not published [8] Bunches with local elliptic energy distribution, A. Hofmann, F. Pedersen, IEEE trans. Nucl. Sci. NS 26 No 3 page 3526, 1979. [9] Longitudinal beam dynamics in circular accelerators, J. Le Duff, IEEE trans. Nucl. Cern accelerator school proceedings, 1992 Jyväskylä, p307. [10] Space Charge, K. Schindl, CAS - CERN Accelerator School: Intermediate Course on Accelerator Physics, Zeuthen, Germany, 15 - 26 Sep 2003, pp.305-320. [11] A selection of formulae and data useful for the design of A. G. synchrotrons, C. Bovet, R. Gouiran, I. Gumowski, K.H. Reich, CERN/MPS-SI/int, DL/70/4, 1970 [12] Physics of Intensity Dependent Instabilities, Lecture Notes by K. Y. Ng, USPAS, Los Angeles, January 2002 [13] Form Factor g in Longitudinal Space Charge Impedance, R. Baartman, June 1992 - 50 - Annex β Visual basic functions used in the Excel cycle editor ' Global constants Public Const gC = 299792458 Public Const ge = 1.6021773349E-19 Public Const gPi = 3.14159265358979 ' MPSvoltage_for_B [V] evaluates the MPS voltage required from t_now [s] to t_aft [s] to obtain a field change from B_now [T] to B_aft [T] ' the parameters are: ' MPS_R [Ohm] = resistance of the magnetic circuit; ' MPS_L [H]= Inductance of the circuit; ' B_over_I [T/A] = courant to field conversion factor ' MPS_Vmax [V] = maximum voltage (absolute value as the MPS is supposed to provide both positive and negative voltages) available from the MPS ; ' t_now [s] = initial time value (present time); ' t_aft [s] = final time; ' B_now [T] = field obtained at time t_now; ' B_aft [ T] field required at time t_aft; Function MPSvoltage_for_B(MPS_R, MPS_L, B_over_I, MPS_Vmax, t_now, t_aft, B_now, B_aft) If MPS_R < 0 Or MPS_L < 0 Or B_over_I < 0 Or MPS_Vmax < 0 Or t_aft < t_now Then MPSvoltage_for_B = "Input error" Exit Function Else MPSvoltage_for_B = (MPS_R / B_over_I) * (B_now + (B_aft - B_now) / (1 - Exp(-(t_aft - t_now) / (MPS_L / MPS_R)))) If MPSvoltage_for_B > MPS_Vmax Then MPSvoltage_for_B = "+Saturated" If MPSvoltage_for_B < -MPS_Vmax Then MPSvoltage_for_B = "-Saturated" End If End Function ' Bfield_from_V [T] evaluates the obtained bending field B_now [T] obtained at t_now [s] when a voltage MPS_V is applied by the MPS from t_bef to t_now ' the parameters are: ' MPS_R [Ohm] = resistance of the magnetic circuit; ' MPS_L [H] = Inductance of the circuit; ' B_over_I [T/A] = courant to field conversion factor ' MPS_Vmax [V] = maximum voltage (absolute value as the MPS is supposed to provide both positive and negative voltages) available from the MPS ' MPS_V [V] = voltage created by the MPS from t_bef to t_now; ' t_bef [s] = initial time value; ' t_now [s] = final time value = present time; ' B_bef [T] = field at time t_bef; Function Bfield_from_V(MPS_R, MPS_L, B_over_I, MPS_Vmax, MPS_V_bef, t_bef, t_now, B_bef) - 51 - If MPS_R < 0 Or MPS_L < 0 Or B_over_I < 0 Or t_now < t_bef Then Bfield_from_V = "Input error" Exit Function Else If MPS_V_bef = "+Saturated" Then MPS_V_bef = MPS_Vmax If MPS_V_bef = "-Saturated" Then MPS_V_bef = -MPS_Vmax Bfield_from_V = (B_over_I * MPS_V_bef / MPS_R) * (1 - Exp(-(t_now - t_bef) / (MPS_L / MPS_R))) + B_bef * Exp(-(t_now - t_bef) / (MPS_L / MPS_R)) End If End Function ' Max_Bdot_from_B [T/s] evaluates the maximum possible dipolar field increase during the next time step as a function of the actual magnetic field ' the parameters are: ' MPS_R [Ohm] = resistance of the magnetic circuit; ' MPS_L [H] = Inductance of the circuit; ' B_over_I [T/A] = courant to field conversion factor ' MPS_Vmax [V] = maximum voltage (absolute value as the MPS is supposed to provide both positive and negative voltages) available from the MPS ' t_now [s] = initial time value = present time step value; ' t_aft [s] = final time value = next time step value; ' B_now [T] = field at present time t_now; ' Acc [ ] = status bit indicating acceleration (if = 1) or deceleration (if = 0); Function Max_Bdot_from_B(MPS_R, MPS_L, B_over_I, MPS_Vmax, t_now, t_aft, B_now, Acc) If MPS_R < 0 Or MPS_L < 0 Or B_over_I < 0 Or t_aft < t_now Then Max_Bdot_from_B = "Input error" Exit Function Else If Acc = 1 Then MPS_V = MPS_Vmax If Acc = 0 Then MPS_V = -MPS_Vmax Max_B_t_aft = (B_over_I * MPS_V / MPS_R) * (1 - Exp(-(t_aft - t_now) / (MPS_L / MPS_R))) + B_now * Exp(-(t_aft - t_now) / (MPS_L / MPS_R)) Max_Bdot_from_B = (Max_B_t_aft - B_now) / (t_aft - t_now) End If End Function ' Beta [ ] evaluates the value v/c as a function of the magnetic field ' the parameters are: ' m_i_0 [kg] = rest mass of the ion; ' zeta [ ] = total charge of the ion in terms of number of elementary charges e; ' rho [m] = magnetic radius of the main dipoles; ' B [T] = main dipolar field Function Beta(m_i_0, zeta, rho, B) If m_i_0 < 0 Or zeta < 1 Or rho < 0 Or B < 0 Then Beta = "Input error" Exit Function Else B0 = m_i_0 * gC / (zeta * ge * rho) - 52 - Beta = (B / B0) / Sqr(1 + (B / B0) ^ 2) End If End Function ' RevFreq [Hz] evaluates the value of the revolution frequency ' as a function of: ' Beta [ ] = relative velocity (v/c); ' Radius [m] = Synchrotron mean radius Function RevFreq(Beta, Radius) If Beta < 0 Or Radius < 0 Then RevFreq = "Input error" Exit Function Else RevFreq = Beta * gC / (2 * gPi * Radius) End If End Function ' Momentum_per_amu [eV/c/u] evaluates the value of the momentum per atomic mass unit ' as a function of: ' Beta [ ] = relative velocity (v/c); ' rho [m] = magnetic radius of the main dipoles; ' B [T] = main dipolar field ' zeta [ ] = total charge of the ion in terms of number of elementary charges e; ' m_i_a [ ] = rest mass of the ion in terms of amu (atomic mass unit) Function Momentum_per_amu(B, rho, zeta, m_i_a) If B < 0 Or rho <= 0 Or zeta <= 0 Or m_i_a < 0 Then Momentum_per_amu = "Input error" Exit Function Else Momentum_per_amu = B * rho * gC * zeta / m_i_a End If End Function ' Tot_Energy_per_amu [eV/u] evaluates the value of the total energy (rest + kinetic) per atomic mass unit ' as a function of: ' Beta [ ] = relative velocity (v/c); ' rho [m] = magnetic radius of the main dipoles, B [T] = main dipolar field; ' zeta [ ] = total charge of the ion in terms of number of elementary charges e; ' m_i_a [ ] = rest mass of the ion in terms of amu (atomic mass unit); ' amu_e [eV] = atomic mass unit in eV; Function Tot_Energy_per_amu(B, rho, zeta, m_i_a, amu_e) If B < 0 Or rho <= 0 Or zeta <= 0 Or m_i_a < 0 Or amu_e < 0 Then Tot_Energy_per_amu = "Input error" Exit Function Else Tot_Energy_per_amu = Sqr(Momentum_per_amu(B, rho, zeta, m_i_a) ^ 2 + amu_e ^ 2) End If - 53 - End Function ' Kin_Energy_per_amu [eV/u] evaluates the value of the total energy (rest + kinetic) per atomic mass unit ' as a function of: ' Beta [ ] = relative velocity (v/c); ' rho [m] = magnetic radius of the main dipoles; ' B [T] = main dipolar field; ' zeta [ ] = total charge of the ion in terms of number of elementary charges e; ' m_i_a [ ] = rest mass of the ion in terms of amu (atomic mass unit); ' amu_e [eV] = atomic mass unit in eV; Function Kin_Energy_per_amu(B, rho, zeta, m_i_a, amu_e) If B < 0 Or rho <= 0 Or zeta <= 0 Or m_i_a < 0 Or amu_e < 0 Then Kin_Energy_per_amu = "Input error" Exit Function Else Kin_Energy_per_amu = Tot_Energy_per_amu(B, rho, zeta, m_i_a, amu_e) - amu_e End If End Function ' IcosBeam [A] evaluates the amplitude of the beam current at the harmonic h_rf_meas [ ] for a bunch with a cosine shape ' as a function of: ' h_bunches [ ] = bunches repetition rate = harmonic of the dominating cavity (in terms of voltage applied), ' Bunch_Q_e [ ] = number of elementary charges within the bunch; ' Bunch_Length [rf rad] = bunch length expressed in angle of the dominating rf period; ' Frev [Hz] = revolution frequency; ' h_bunches [ ] = dominating rf harmonic of the revolution; ' h_rf_meas [ ] = harmonic of the dominating rf at which the beam current IcosBeam is evaluated; Function IcosBeam(Bunch_Q_e, Bunch_Length, Frev, h_bunches, h_rf_meas) If Bunch_Q_e < 0 Or Bunch_Length < 0 Or Frev < 0 Or h_bunches < 1 Or h_rf_meas < 1 Then IcosBeam = "Input error" Exit Function Else IcosBeam = 2 * h_bunches * Frev * Bunch_Q_e * ge * Abs(Cos(h_rf_meas * Bunch_Length / 2) / (1 - (h_rf_meas * Bunch_Length / gPi) ^ 2)) End If End Function ' IrectBeam [A] evaluates the amplitude of the beam current at the harmonic h_rf_meas [ ] for a bunch with a rectangular shape ' as a function of: ' h_bunches [ ] = bunches repetition rate = harmonic of the dominating cavity (in terms of voltage applied), ' Bunch_Q_e [ ] = number of elementary charges within the bunch; ' Bunch_Length [rf rad] = bunch length expressed in angle of the dominating rf period; - 54 - ' Frev [Hz] = revolution frequency; ' h_bunches [ ] = dominating rf harmonic of the revolution; ' h_rf_meas [ ] = harmonic of the dominating rf at which the beam current IcosBeam is evaluated; Function IrectBeam(Bunch_Q_e, Bunch_Length, Frev, h_bunches, h_rf_meas) If Bunch_Q_e < 0 Or Bunch_Length < 0 Or Frev < 0 Or h_bunches < 1 Or h_rf_meas < 1 Then IrectBeam = "Input error" Exit Function Else IrectBeam = 2 * h_bunches * Frev * Bunch_Q_e * ge * Abs(Sin(h_rf_meas * Bunch_Length / 2) / (h_rf_meas * Bunch_Length / 2)) End If End Function ' g0 [ ] evaluates the beam form factor used in the formula evaluating the longitudinal space charge impedance ' this evaluation is valid for the PSB only where it is taken into account that the beam pipe is circular for 2/3 of the circumference and elliptic in the remaining 1/3 ' as a function of: ' Vacuum_chamber_half_height_ellip [m] = Beam pipe half height in the elliptic chamber ; ' Vacuum_chamber_half_width_ellip [m] = Beam pipe half width in the elliptic chamber; ' Vacuum_chamber_radius_circ [m] = Beam pipe radius in the circular chamber; ' Beam_norm_emit_h_1sig [m] = Beam horizontal normalized emittance at 1 sigma; ' Beam_norm_emit_v_1sig [m] = Beam vertical normalized emittance at 1 sigma; ' Beta_h_circ [m] = average beta function amplitude in the horizontal plane of the circilar pipe sections; ' Beta_v_circ [m] = average beta function amplitude in the vertical plane of the circular pipe sections; ' Beta_h_ellip [m] = average beta function amplitude in the horizontal plane of the elliptic pipe sections; ' Beta_v_ellip [m] = average beta function amplitude in the vertical plane of the elliptic pipe sections; ' Bet [ ] = beta value = normalized velocity = v/c; Function g0(Vacuum_chamber_half_height_ellip, Vacuum_chamber_half_width_ellip, Vacuum_chamber_radius_circ, Beam_norm_emit_h_1sig, Beam_norm_emit_v_1sig, Beta_h_circ, Beta_v_circ, Beta_h_ellip, Beta_v_ellip, Bet) If Bet < 0 Or Bet > 1 Then g0 = "Input error" Exit Function Else Gamma = 1 / Sqr(1 - Bet ^ 2) B = (1 / 3) * (Vacuum_chamber_half_height_ellip + Vacuum_chamber_half_width_ellip) / 2 + (2 / 3) * Vacuum_chamber_radius_circ A_circ = (Sqr(Beam_norm_emit_v_1sig * Beta_v_circ) + Sqr(Beam_norm_emit_h_1sig * Beta_h_circ)) / Sqr(Bet * Gamma) A_ellip = (Sqr(Beam_norm_emit_v_1sig * Beta_v_ellip) + Sqr(Beam_norm_emit_h_1sig * Beta_h_ellip)) / Sqr(Bet * Gamma) A = (2 / 3) * A_circ + (1 / 3) * A_ellip - 55 - If (2 * A) > B Then g0 = "beam too wide" Exit Function Else g0 = 0.5 + 2 * Log(B / (2 * A)) End If End If End Function ' VspaceChargeCos [V] evaluates the peak longitudinal space charge induced voltage, at h_rf_meas, for a cosinusoidal bunch shape. ' as a function of: ' Bunch_Q_e [ ] = number of elementary charges within the bunch; ' Bunch_Length [rf rad] = bunch length expressed in angle of the dominating rf period; ' Frev [Hz] = revolution frequency; ' h_bunches [ ] = dominating rf harmonic of the revolution; ' h_rf_meas [ ] = harmonic of the rf at which the space charge voltage is evaluated; ' g0 [ ] = space charge coupling coefficient; ' Bet [ ] = v/c = relative velocity Function VspaceChargeCos(Bunch_Q_e, Bunch_Length, Frev, h_bunches, h_rf_meas, g0, Bet) If Bunch_Q_e < 0 Or Bunch_Length < 0 Or Frev < 0 Or h_bunches < 1 Or h_rf_meas < 1 Or Bet > 1 Or Bet < 0 Then VspaceChargeCos = "Input error" Exit Function Else VspaceChargeCos = IcosBeam(Bunch_Q_e, Bunch_Length, Frev, h_bunches, h_rf_meas) * h_rf_meas * g0 * 377 * (1 - Bet ^ 2) / (2 * Bet) End If End Function ' AlphaS [ ] evaluates the moving bucket area factor (value to multiply to the stationanry bucket area to obtain the moving bucket area) by polonomial approximation ' as a function of: ' sin_phiS [ ] = sinus of accelerating stable phase Function AlphaS(Sin_PhiS) Dim Coeff(8) Coeff(8) = -4.86929808544067 Coeff(7) = 21.5634376561353 Coeff(6) = -38.3041447316052 Coeff(5) = 35.5609539048259 Coeff(4) = -18.8394752753217 Coeff(3) = 6.32355898129261 Coeff(2) = -2.43503244988618 Coeff(1) = 1 If Abs(Sin_PhiS) > 1 Then AlphaS = "Out of range" Exit Function - 56 - Else AlphaS = 0 For i = 0 To 7 AlphaS = AlphaS + Coeff(i + 1) * Abs(Sin_PhiS) ^ i Next i End If End Function ' Moving_Bucket_Area_per_amu [eV.s/u]evaluates the area of a single harmonic (h_bunches) rf bucket ' as a function of: ' Radius [m] = synchrotron radius; ' sin_phiS [ ] = sinus of stable phase; ' V_rf [V]= peak value of the rf signal; ' E_tot_u [eV/u] = total energy per mass unit (gamma*rest energy of atomic mass unit); ' h_bunches [ ] = harmonic of the dominating rf signal with respect to the revolution; ' eta [ ] = frequency slip factor (1/gammaTransition^2) - (1/gamma^2) ; ' zeta [ ]= value of the charge state (number of protons - number of electrons); ' m_i_a [amu]= ion mass in atomic mass units Function Moving_Bucket_Area_per_amu(Radius, m_i_a, zeta, h_bunches, E_tot_u, eta, V_rf, Sin_PhiS) If Radius < 0 Or Sin_PhiS < -1 Or Sin_PhiS >= 1 Or E_tot_u <= 0 Or h_bunches < 1 Or V_rf < 0 Then Moving_Bucket_Area_per_amu = "Input error" Exit Function Else Moving_Bucket_Area_per_amu = 16 * (Radius / gC) * AlphaS(Sin_PhiS) * Sqr(V_rf * E_tot_u * zeta / (2 * gPi * Abs(eta) * h_bunches ^ 3 * m_i_a)) End If End Function ' BunchLength_from_stat_bucket_fill [rf rad] evaluates, for stationary buckets, the full bunch length as an angle of the dominating rf at harmonic h_bunches ' as a function of: ' Bucket_filling [ ] = bunch emittance [eV.s] / bucket area [eV.s] Function BunchLength_from_stat_bucket_fill(Bucket_filling) If Bucket_filling < 0 Or Bucket_filling > 1 Then BunchLength_from_stat_bucket_fill = "Input error" Exit Function Else BunchLength_from_stat_bucket_fill = gPi * Sqr((gPi ^ 3 / 8 - Sqr(gPi ^ 6 / 64 - 16 * Bucket_filling * (gPi ^ 3 / 16 - 1))) / (gPi ^ 3 / 16 - 1)) End If End Function ' Max_possible_B [T] evaluates the required Bending field B for the fastest accelerating cycle ' in order to have a Bucket_Filling ratio as specifified by the parameter Bucket_Fill_max [ ] ' without exceeding the rf power capabilities (I_rf_max [A]) ' The parameters are: - 57 - ' m_i_0 [kg] = rest mass of the ion; ' m_i_a [ ] = rest mass of the ion in terms of atomic mass units (amu); ' m_i_e [eV/c^2] = rest mass of the ion in eV/c^2; ' amu_e [eV/c^2] = rest mass of the atomic mass unit in eV/c^2; ' zeta [ ] = net number of elementary charges of the ion; ' Radius [m] = mean radius of the synchrotron; ' rho [m] = magnetic radius of the main dipoles; ' Gamma_tr [ ] = normalized energy at transition ' h_bunches [ ] = revolution harmonic of the bunches repetition rate = harmonic of the dominating rf signal; ' Bunch_Q_e [ ] = number of elementary charges within the bunch; ' Bunch_emit [eV.s] = bunch emittance; ' Vrf0_now [V] = peak programmed rf voltage at present time (space charge effect not deduced) ' B_bef [T] = Dipolar magnetic field obtained at previous time step; ' B_ej [T] = required extraction dipolar field; ' B_min [T] = mimimum allowed main bending field ' t_bef [s] = cycle time corresponding to the previous time step; ' t_now [s] = cycle time corresponding to the present time step; ' Bunch_Length_bef [rf rad] = bunch length as an angle of the dominating rf harmonic (= h_bunches) at the previous time step; ' Bucket_Fill_max [ ] = maximum allowed bucket filling = bunch emittance [eV.s] / bucket area [eV.s]; ' I_rf_max [A] = Maximum current available from the rf power amplifiers to accelerate the beam; ' Acc [ ] = status bit indicating acceleration (if = 1) or deceleration (if = 0); ' g0_bef [ ] = space charge coupling coefficient; ' T_FT_bef [s] = Extraction flat-top duration measured at the previous time step; ' Ej_FT_duration [s] = required value for the extraction flat-top duration Function Max_possible_B(m_i_0, m_i_a, amu_e, zeta, Radius, rho, Gamma_tr, h_bunches, Bunch_Q_e, Bunch_emit, Vrf0_now, B_bef, B_ej, Bdot_bef, B_min, Bdot_max, t_bef, t_now, Bunch_Length_bef, Bucket_Fill_max, I_rf_max, Acc, g0_bef, T_FT_bef, Ej_FT_duration) If m_i_0 <= 0 Or m_i_a <= 0 Or zeta <= 0 Or Radius <= 0 Or rho <= 0 Or Gamma_tr <= 0 Or h_bunches <= 0 Or Bunch_Q_e <= 0 Or Vrf0_now < 0 Or B_bef < 0 Or Bdot_max <= 0 Or t_now - t_bef < 0 Or Bucket_Fill_max < 0 Or Bucket_Fill_max > 1 Or (Acc <> 1 And Acc <> 0) Then Max_possible_B = "Input error" Exit Function Else If T_FT_bef >= Ej_FT_duration Then Max_possible_B = B_min Exit Function Else B = B_bef Bunch_Length = Bunch_Length_bef If Acc = 1 Then step = Bdot_max * (t_now - t_bef) / 100000 Else step = -Bdot_max * (t_now - t_bef) / 100000 For i = 0 To 100000 B = B + i * step - 58 - Max_possible_B = B Bdot = (B - B_bef) / (t_now - t_bef) Bet = Beta(m_i_0, zeta, rho, B) Frev = RevFreq(Bet, Radius) p = Momentum_per_amu(B, rho, zeta, m_i_a) Gamma = 1 / Sqr(1 - Bet ^ 2) eta = (1 / Gamma_tr ^ 2) - (1 / Gamma ^ 2) Ib = IcosBeam(Bunch_Q_e, Bunch_Length, Frev, h_bunches, h_bunches) Vsc = VspaceChargeCos(Bunch_Q_e, Bunch_Length, Frev, h_bunches, h_bunches, g0_bef, Bet) Vrf = Vrf0_now - Vsc Vrf_turn = 2 * gPi * rho * Radius * Bdot Sin_PhiS = Vrf_turn / Vrf Irf = Ib * Sin_PhiS If B >= B_ej Then B = B_ej If Irf >= I_rf_max Or B = B_ej Then Exit Function Energy = Tot_Energy_per_amu(B, rho, zeta, m_i_a, amu_e) BucketArea = Moving_Bucket_Area_per_amu(Radius, m_i_a, zeta, h_bunches, Energy, eta, Vrf, Sin_PhiS) Bucket_filling = Bunch_emit / BucketArea If Bucket_filling >= Bucket_Fill_max Then Exit Function Stat_BucketArea = Moving_Bucket_Area_per_amu(Radius, m_i_a, zeta, h_bunches, Energy, eta, Vrf, 0) Stat_Bucket_filling = Bunch_emit / Stat_BucketArea Bunch_Length = BunchLength_from_stat_bucket_fill(Stat_Bucket_filling) / (1 Sin_PhiS ^ 2) ^ (1 / 8) Next i Max_possible_B = "not converging" End If End If End Function ' Effective_Vrf_from_B [V] evaluates from the new value of the bending field, the effective peak rf voltage experienced by the beam when space charge effects are deduced. ' As I didn't find how to impose a sequence of calculation to excel, I couldn't just take the value of B resolved from the function Max_possible_B ' this is why the script here is typically a copy of the function Max_possible_B. ' The program will exit at the same B value as the function Max_possible_B, allowing to take the value to calculate the effective rf voltage. ' The parameters are: ' m_i_0 [kg] = rest mass of the ion; ' m_i_a [ ] = rest mass of the ion in terms of atomic mass units (amu); ' m_i_e [eV/c^2] = rest mass of the ion in eV/c^2; ' amu_e [eV/c^2] = rest mass of the atomic mass unit in eV/c^2; ' zeta [ ] = net number of elementary charges of the ion; ' Radius [m] = mean radius of the synchrotron; ' rho [m] = magnetic radius of the main dipoles; ' Gamma_tr [ ] = normalized energy at transition ' h_bunches [ ] = revolution harmonic of the bunches repetition rate = harmonic of the dominating rf signal; ' Bunch_Q_e [ ] = number of elementary charges within the bunch; - 59 - ' Bunch_emit [eV.s] = bunch emittance; ' Vrf0_now [V] = peak programmed rf voltage at present time (space charge effect not deduced) ' B_bef [T] = Dipolar magnetic field obtained at previous time step; ' B_ej [T] = required extraction dipolar field; ' B_min [T] = mimimum allowed main bending field ' t_bef [s] = cycle time corresponding to the previous time step; ' t_now [s] = cycle time corresponding to the present time step; ' Bunch_Length_bef [rf rad] = bunch length as an angle of the dominating rf harmonic (= h_bunches) at the previous time step; ' Bucket_Fill_max [ ] = maximum allowed bucket filling = bunch emittance [eV.s] / bucket area [eV.s]; ' I_rf_max [A] = Maximum current available from the rf power amplifiers to accelerate the beam; ' Acc [ ] = status bit indicating acceleration (if = 1) or deceleration (if = 0); ' g0_bef [ ] = space charge coupling coefficient; ' T_FT_bef [s] = Extraction flat-top duration measured at the previous time step; ' Ej_FT_duration [s] = required value for the extraction flat-top duration Function Effective_Vrf_from_B(m_i_0, m_i_a, amu_e, zeta, Radius, rho, Gamma_tr, h_bunches, Bunch_Q_e, Bunch_emit, Vrf0_now, B_bef, B_ej, B_min, Bdot_bef, Bdot_max, t_bef, t_now, Bunch_Length_bef, Bucket_Fill_max, I_rf_max, Acc, g0_bef, T_FT_bef, Ej_FT_duration) If m_i_0 <= 0 Or m_i_a <= 0 Or zeta <= 0 Or Radius <= 0 Or rho <= 0 Or Gamma_tr <= 0 Or h_bunches <= 0 Or Bunch_Q_e <= 0 Or Vrf0_now < 0 Or B_bef < 0 Or Bdot_max <= 0 Or t_now - t_bef < 0 Or Bucket_Fill_max < 0 Or Bucket_Fill_max > 1 Or (Acc <> 1 And Acc <> 0) Then Effective_Vrf_from_B = "Input error" Exit Function Else B = B_bef If T_FT_bef >= Ej_FT_duration Then Effective_Vrf_from_B = Vrf0_now Exit Function Else If Acc = 1 Then step = Bdot_max * (t_now - t_bef) / 100000 Else step = -Bdot_max * (t_now - t_bef) / 100000 Bunch_Length = Bunch_Length_bef For i = 0 To 100000 B = B + i * step Bdot = (B - B_bef) / (t_now - t_bef) Bet = Beta(m_i_0, zeta, rho, B) Frev = RevFreq(Bet, Radius) p = Momentum_per_amu(B, rho, zeta, m_i_a) Gamma = 1 / Sqr(1 - Bet ^ 2) eta = (1 / Gamma_tr ^ 2) - (1 / Gamma ^ 2) Ib = IcosBeam(Bunch_Q_e, Bunch_Length, Frev, h_bunches, h_bunches) Vsc = VspaceChargeCos(Bunch_Q_e, Bunch_Length, Frev, h_bunches, h_bunches, g0_bef, Bet) Vrf = Vrf0_now - Vsc Effective_Vrf_from_B = Vrf - 60 - Vrf_turn = 2 * gPi * rho * Radius * Bdot Sin_PhiS = Vrf_turn / Vrf Irf = Ib * Sin_PhiS If B >= B_ej Then B = B_ej If Irf >= I_rf_max Or B = B_ej Then Exit Function Energy = Tot_Energy_per_amu(B, rho, zeta, m_i_a, amu_e) BucketArea = Moving_Bucket_Area_per_amu(Radius, m_i_a, zeta, h_bunches, Energy, eta, Vrf, Sin_PhiS) Bucket_filling = Bunch_emit / BucketArea If Bucket_filling >= Bucket_Fill_max Then Exit Function Stat_BucketArea = Moving_Bucket_Area_per_amu(Radius, m_i_a, zeta, h_bunches, Energy, eta, Vrf, 0) Stat_Bucket_filling = Bunch_emit / Stat_BucketArea Bunch_Length = BunchLength_from_stat_bucket_fill(Stat_Bucket_filling) / (1 Sin_PhiS ^ 2) ^ (1 / 8) Next i Effective_Vrf_from_B = "not converging" End If End If End Function ' Effective_Vrf_Inj [V] evaluates the effective peak RF voltage after space charge effects have been deduced ' in order to have a Bucket_Filling ratio as specifified by the parameter Bucket_Fill [ ] ' Acc is a bit indicating if we are accelerating or decelerating; 1 means accelerate, 0 means decelerate) Function Effective_Vrf_Inj(m_i_0, m_i_a, m_i_e, zeta, Radius, rho, Gamma_tr, h_bunches, Bunch_Q, Bucket_Fill_Inj, B_Inj, Bdot_Inj, Vrf0_now) If m_i_0 <= 0 Or m_i_a <= 0 Or m_i_e <= 0 Or zeta <= 0 Or Radius <= 0 Or rho <= 0 Or Gamma_tr <= 0 Or h_bunches <= 0 Or Bunch_Q <= 0 Or Bucket_Fill_Inj < 0 Or B_Inj < 0 Or Vrf0_now < 0 Then Effective_Vrf_Inj = "Input error" Exit Function Else Bet = Beta(m_i_0, zeta, rho, B_Inj) Frev = RevFreq(Bet, Radius) p = Momentum_per_amu(B_Inj, rho, zeta, m_i_a) Gamma = 1 / Sqr(1 - Bet ^ 2) eta = (1 / Gamma_tr ^ 2) - (1 / Gamma ^ 2) Energy = Sqr(p ^ 2 + m_i_e ^ 2) Vrf_turn = 2 * gPi * rho * Radius * Bdot_Inj Vsc_mem = 0 Vsc = 0 For i = 0 To 1000 Vrf_eff = Vrf0_now - Vsc Sin_PhiS = Vrf_turn / Vrf_eff Moving_Bucket_Area = Moving_Bucket_Area_per_amu(Radius, m_i_a, zeta, h_bunches, Energy, eta, Vrf_eff, Sin_PhiS) - 61 - Bunch_emit = Moving_Bucket_Area * Bucket_Fill_Inj Stat_Bucket_Area = Moving_Bucket_Area_per_amu(Radius, m_i_a, zeta, h_bunches, Energy, eta, Vrf_eff, 0) Stat_Bucket_filling = Bunch_emit / Stat_Bucket_Area Bunch_Length = BunchLength_from_stat_bucket_fill(Stat_Bucket_filling) / (1 Sin_PhiS ^ 2) ^ (1 / 8) Ib = 2 * Bunch_Q * Frev * h_bunches * Abs(Cos(Bunch_Length / 2) / (1 (Bunch_Length / gPi) ^ 2)) Vsc = 1.69 * 377 * Ib / (2 * Bet * Gamma ^ 2) Effective_Vrf_Inj = Vrf_eff If Abs(Vsc_mem - Vsc) < 1 Then Exit Function Vsc_mem = Vsc Next i Effective_Vrf_Inj = "not converging" End If End Function ' Flat_Top_duration [s] evaluates the duration of the extraction flat-top ' as a function of: ' Ej_FT_duration [s] = required value for the extraction flat-top duration ' B_ej [T] = value of the required extration bending field ' B_bef [T] = value of the field at the previous time step; ' T_FT_bef [s] = previous value of the flat-top duration; ' t_now [s] = present time step value; ' t_aft [s] = next time step value; Function Flat_Top_duration(Ej_FT_duration, B_ej, B_bef, T_FT_bef, t_now, t_aft) If Ej_FT_duration < 0 Or B_ej <= 0 Or B_bef < 0 Or T_FT_bef > 2 * Ej_FT_duration Or t_aft < t_now Then Flat_Top_duration = "Input error" Exit Function Else Flat_Top_duration = T_FT_bef If T_FT_bef >= Ej_FT_duration Then Exit Function Else If B_bef < B_ej - 0.001 Then ' 0.001 is equivalent to a 10 Gauss error margin Flat_Top_duration = 0 Exit Function Else Flat_Top_duration = T_FT_bef + (t_aft - t_now) End If End If End If End Function ' SyncFrequency [Hz] evaluates the synchrotron frequency ' as a function of: ' Radius [m] = mean synchrotron radius; ' sin_phiS [ ] = sinus of stable phase; - 62 - ' V_rf [V]= peak value of the rf signal; ' E_tot_u [eV/u] = total energy per mass unit (gamma*rest energy of atomic mass unit); ' h_bunches [ ] = harmonic of the dominating rf signal with respect to the revolution; ' eta [ ] = frequency slip factor (1/gammaTransition^2) - (1/gamma^2) ; ' zeta [ ]= value of the charge state (number of protons - number of electrons); ' m_i_a [amu]= ion mass in atomic mass units Function SyncFrequency(Radius, Sin_PhiS, V_rf, E_tot_u, h_bunches, eta, zeta, m_i_a) If Radius < 0 Or Sin_PhiS < -1 Or Sin_PhiS > 1 Or E_tot_u <= 0 Or h_bunches < 1 Then SyncFrequency = "Input error" Exit Function Else SyncFrequency = (gC / (2 * gPi * Radius)) * Sqr(h_bunches * Abs(eta) * V_rf * Sqr(1 Sin_PhiS ^ 2) * zeta / (2 * gPi * E_tot_u * m_i_a)) End If End Function ' Bucket_Height [eV] evaluates the full height of the moving rf bucket Function Bucket_Height(Sin_PhiS, Beta, Vrf_now, h_bunches, eta, tot_Energy, m_i_a, zeta) If Beta < 0 Or Beta > 1 Or Sin_PhiS < 0 Or Sin_PhiS >= 1 Or h_bunches < 1 Then Bucket_Height = "Out of Range" Exit Function Else Y = Sqr(2 * Sqr(1 - Sin_PhiS ^ 2) + (2 * Atn(Sin_PhiS / Sqr(1 - Sin_PhiS ^ 2)) - gPi) * Sin_PhiS) Bucket_Height = 2 * Y * Beta * Sqr(Vrf_now * tot_Energy * zeta / (gPi * h_bunches * Abs(eta) * m_i_a)) End If End Function ' Bunch_Height [eV] evaluates the full height of the bunch ' in a stationary bucket Function Bunch_Height(Beta, Bunch_Length, Vrf_now, tot_Energy, zeta, h_bunches, eta, m_i_a) If Beta < 0 Or Beta > 1 Or h_bunches < 1 Or Bunch_Length < 0 Or Bunch_Length > 2 * gPi Then Bunch_Height = "Out of Range" Exit Function Else Bunch_Height = 2 * Beta * Sin(Bunch_Length / 4) * Sqr(2 * Vrf_now * tot_Energy * zeta / (gPi * h_bunches * Abs(eta) * m_i_a)) End If End Function ' B_from_kin_energy [T] evaluates the main dipolar field required for a specified kinetic energy per amu [eV/u] ' as a function of ' Radius [m] = synchrotron mean radius; ' sin_phiS [ ] = sinus of stable phase; - 63 - ' V_rf [V]= peak value of the rf signal; ' E_kin [eV/u] = total energy per mass unit (gamma*rest energy of atomic mass unit); ' h_bunches [ ] = harmonic of the dominating rf frequency with respect to the revolution; ' eta [ ] = frequency slip factor (1/gammaTransition^2) - (1/gamma^2); ' zeta [ ]= value of the charge state (number of protons - number of electrons); ' m_i_a [amu]= ion mass in atomic mass units Function B_from_kin_energy(Radius, Sin_PhiS, V_rf, E_kin, h_bunches, eta, zeta, m_i_a, m_i_e) If Radius < 0 Or Sin_PhiS < -1 Or Sin_PhiS > 1 Or E_kin <= 0 Or h_bunches < 1 Then B_from_kin_energy = "Input error" Exit Function Else B_from_kin_energy = (gC / (2 * gPi * Radius)) * Sqr(h_bunches * Abs(eta) * V_rf * Sqr(1 - Sin_PhiS ^ 2) * zeta / (2 * gPi * (E_kin + m_i_e) * m_i_a)) End If End Function ' AlphaPhil [rf rad] evaluates relative bucket filling ' as a function of full bunch length phi_l Function AlphaPhil(Phi_l) If Phil < 0 Or Phi_l > 2 * gPi Then AlphaPhil = "Out of Range" Exit Function Else AlphaPhil = gPi * Phi_l ^ 2 + (1 - gPi ^ 3 / 16) * Phi_l ^ 4 / (16 * gPi ^ 4) End If End Function ' Sin_Stable_Phase [ ] evaluates the sinus of the stable phase in a single harmonic acceleration case ' as a function of: ' V_rf [V] = Amplitude of the dominating Rf signal ' V_rf_per_turn [V] = voltage per turn required on the cavity gap to provide the requested energy for the actual Bdot Function Sin_Stable_Phase(V_rf, V_rf_per_turn) If Abs(V_rf_per_turn) <= V_rf Then Sin_Stable_Phase = V_rf_per_turn / V_rf Else Sin_Stable_Phase = "Out of Range" End If End Function ' Delta_Q_inc_circ [ ] evaluates the incoherent transverse tune shift in a circular beam pipe, in the chosen plane (H or V) ' as a function of: ' Bunch_Q_e [] = the number of electric charge per bunch ' Beta_h_circ [m] = average beta function amplitude in the horizontal plane of the circular pipe sections - 64 - ' Beta_v_circ [m] = average beta function amplitude in the vertical plane of the circular pipe sections ' Beam_norm_emit_h_1sig [m] = beam transverse half height measured at 1 sigma ' Beam_norm_emit_v_1sig [m] = beam transverse half width measured at 1 sigma ' pole_piece_dist [m] = distance from the middle of the vacuum chamber to the bending magnetic pole. ' Bet [ ] = beta value = normalized velocity = v/c ' Bunching_factor [ ] = average particle line density / peak line density ' H_plane [ ] = index indicating the chosen transverse plane, write 1 for the horizontal plane, 0 for the vertical plane ' Form [ ] = empirical factor taking into account the type of transverse distribution (Gaussian, uniform etc..) ' and translating tune shift into tune spread by removing the min tune shift value, and taking into account the longitudinal distribution (with or without second harmonic) Function Delta_Q_inc_circ(Bunch_Q_e, Beta_h_circ, Beta_v_circ, Beam_norm_emit_h_1sig, Beam_norm_emit_v_1sig, Pole_piece_dist, Bet, Bunching_factor, H_plane, Form) If Bunch_Q_e < 0 Or Beta_h_circ <= 0 Or Beta_v_circ <= 0 Or (H_plane <> 0 And H_plane <> 1) Then Delta_Q_inc_circ = "Out of Range" Exit Function Else r0 = 1.5347E-18 Gamma = (1 - Bet ^ 2) ^ -0.5 B = (Sqr(2) / 2) * (Sqr(Beam_norm_emit_h_1sig * Beta_h_circ) + Sqr(Beam_norm_emit_v_1sig * Beta_v_circ)) / Sqr(Bet * Gamma) ' B = radius of the beam as the average of Height and width BF = Bunching_factor g = Pole_piece_dist eps_0_x = 0.5 * Form eps_0_y = 0.5 * Form If H_plane = 1 Then Delta_Q_inc_circ = -(Bunch_Q_e * r0 * Beta_h_circ / (gPi * Bet ^ 2 * Gamma)) * (eps_0_x / (B ^ 2 * Gamma ^ 2 * BF)) Else Delta_Q_inc_circ = -(Bunch_Q_e * r0 * Beta_v_circ / (gPi * Bet ^ 2 * Gamma)) * ((1 Bet ^ 2) * eps_0_y / (B ^ 2 * Gamma ^ 2 * BF)) End If End If End Function ' Delta_Q_inc_ellip [ ] evaluates the incoherent transverse tune shift in an elliptic beam pipe, in the chosen plane (H or V) ' as a function of: ' Bunch_Q_e [] = the number of electric charge per bunch ' Beta_h_ellip [m] = average beta function amplitude in the horizontal plane of the elliptic pipe sections - 65 - ' Beta_v_ellip [m] = average beta function amplitude in the vertical plane of the elliptic pipe sections ' Beam_norm_emit_h_1sig [m] = beam transverse half height measured at 1 sigma ' Beam_norm_emit_v_1sig [m] = beam transverse half width measured at 1 sigma ' Vacuum_chamber_half_height_ellip [m] = vacuum chamber half height (= radius in case of a circular tube) ' Vacuum_chamber_half_width_ellip [m] = vacuum chamber half height (= radius in case of a circular tube) ' pole_piece_dist [m] = distance from the middle of the vacuum chamber to the bending magnetic pole. ' Bet [ ] = beta value = normalized velocity = v/c ' Bunching_factor [ ] = average particle line density / peak line density ' H_plane [ ] = index indicating the chosen transverse plane, write 1 for the horizontal plane, 0 for the vertical plane ' Form [ ] = empirical factor taking into account the type of transverse distribution (Gaussian, uniform etc..) ' and translating tune shift into tune spread by removing the min tune shift value, and taking into account the longitudinal distribution (with or without second harmonic) Function Delta_Q_inc_ellip(Bunch_Q_e, Beta_h_ellip, Beta_v_ellip, Beam_norm_emit_h_1sig, Beam_norm_emit_v_1sig, Vacuum_chamber_half_height_ellip, Vacuum_chamber_half_width_ellip, Pole_piece_dist, Bet, Bunching_factor, H_plane, Form) If Bunch_Q_e < 0 Or Beta_h_ellip <= 0 Or Beta_v_ellip <= 0 Or (H_plane <> 0 And H_plane <> 1) Then Delta_Q_inc_ellip = "Out of Range" Exit Function Else r0 = 1.5347E-18 Gamma = (1 - Bet ^ 2) ^ -0.5 A = Sqr(2) * Sqr(Beam_norm_emit_h_1sig * Beta_h_ellip) / Sqr(Bet * Gamma) B = Sqr(2) * Sqr(Beam_norm_emit_v_1sig * Beta_v_ellip) / Sqr(Bet * Gamma) BF = Bunching_factor h = Vacuum_chamber_half_height_ellip w = Vacuum_chamber_half_width_ellip g = Pole_piece_dist eps_0_x = Form * B ^ 2 / (A * (A + B)) eps_0_y = Form * B / (A + B) eps_2_x = -(gPi ^ 2) / 24 eps_2_y = gPi ^ 2 / 24 q = (w - h) / (w + h) k_prime = ((1 + 2 * (1 - q + q ^ 4 - q ^ 9)) / (1 + 2 * (1 + q + q ^ 4 + q ^ 9))) ^ 2 SK = Sqr(1 - k_prime ^ 2) K = (gPi / 2) * (1 + (1 / 4) * SK ^ 2 + (9 / 64) * SK ^ 4 + (25 / 256) * SK ^ 6) eps_1_x = (h ^ 2 / (12 * (w ^ 2 - h ^ 2))) * ((1 + k_prime ^ 2) * (2 * K / gPi) ^ 2 - 2) eps_1_y = -eps_1_x If H_plane = 1 Then Delta_Q_inc_ellip = -(Bunch_Q_e * r0 * Beta_h_ellip / (gPi * Bet ^ 2 * Gamma)) * (eps_0_x / (B ^ 2 * Gamma ^ 2 * BF) + (eps_1_x / h ^ 2) / BF - (eps_1_x / h ^ 2) * Bet ^ 2 * ((1 / BF) - 1) + (eps_2_x / g ^ 2) * Bet ^ 2) Else - 66 - Delta_Q_inc_ellip = -(Bunch_Q_e * r0 * Beta_v_ellip / (gPi * Bet ^ 2 * Gamma)) * (eps_0_y / (B ^ 2 * Gamma ^ 2 * BF) + (eps_1_y / h ^ 2) / BF - (eps_1_y / h ^ 2) * Bet ^ 2 * ((1 / BF) - 1) + (eps_2_y / g ^ 2) * Bet ^ 2) End If End If End Function - 67 -