Transient beam-loading model and compensation in Compact Linear Collider main linac

A new model to compensate for the transient beam loading in the CLIC main linac is developed. It takes into account the CLIC specific power generation scheme and the exact 3D geometry of the accelerating structure including couplers. A new method of calculating unloaded and loaded voltages during the transient is proposed and a dedicated optimization scheme of the rf pulse to compensate the transient beam-loading effect is presented. It is demonstrated that the 0.03% limit on the rms relative bunch-tobunch energy spread in the main beam after acceleration can be reached. The optimization technique has been used to increase the rf to beam efficiency while preserving the CLIC requirements and to compensate for the energy spread caused by the Balakin-Novokhatski-Smirnov damping and transient process in the subharmonic buncher. Effects of charge jitters in the drive and main beams are studied. It is shown that within the 0.1% CLIC specification limit on the rms spread in beams charge the energy spread is not significantly affected.


I. INTRODUCTION
In order to have a luminosity loss of less than 1% at the Compact Linear Collider (CLIC) [1] interaction point, the rms bunch-to-bunch relative energy spread in the main beam must be below 0.03% [2].However, at the beginning of the bunch train each bunch gains a different energy due to the transient beam-loading effect, on the other hand, the higher the beam loading the higher the rf to beam efficiency is.To handle this critical issue it is necessary to compensate for the transient process in order to achieve a high luminosity and the necessary CLIC performance.
Existing theories of beam loading in electron linear accelerators are discussed in [3], where a new analytical model is developed for the transient and steady-state regimes for an arbitrary traveling wave accelerating structure.An exact analytical rf pulse shape is also derived in order to compensate for the transient beam loading.Unfortunately, this model does not take into account dispersion effects and, hence, cannot be applied directly to CLIC because the narrow bandwidth of the accelerating structure limits the field rise time.In [4], dispersion is studied in high-gradient lepton linacs using the corresponding circuit models and adjusting the klystron phasing to provide beam-loading compensation is also investigated.In [3] and in [4] the shape of the accelerating structure was approximated in different ways which could affect the results of the compensation at the level of 0.03% rms energy spread.
Also in the existing models arbitrary pulses are studied while in CLIC the power is generated by the drive beam in a power extraction and transfer structure (PETS) [5] so only a special type of pulse can be used to perform the beam-loading compensation.The voltage of the CLIC pulse is proportional to the drive beam current and voltage modulations come from the beam current modulations.
Several beam current modulation schemes have been proposed in order to provide the necessary beam-loading compensation ramp in the pulse.For example, drive beam charge variation and phase modulation were considered in [6].It was shown in [7,8] that the most efficient and costeffective solution for CLIC is to vary drive beam phaseswitch times in the injector.It is also illustrated that by manipulating these times one can create a current ramp and, hence, a ramp in the rf pulse for beam-loading compensation in CLIC.
In this paper, a new advanced model which takes into account all of the CLIC drive beam generation steps (injector, delay loop, and combiner rings), bunch response of PETS with the integrated on/off mechanism [9], the rf waveguide network transfer function, and dispersive properties of the accelerating structure is developed to compensate for the transient beam loading in the main linac.A new method for calculating unloaded and loaded voltages during the transient is proposed and a dedicated rf pulse optimization scheme to compensate for the transient beamloading effect is presented.The exact 3D shape of the accelerating structure including the couplers is taken into account.
This model has been successfully applied to the T24 [10] CLIC accelerating structure prototype as described in [11].In this paper we consider beam-loading compensation in the TD26 CLIC baseline accelerating structure [12] and investigate several physical effects including the subharmonic buncher transient as well as charge jitters in the main and drive beams.

II. HFSS SETUP AND FREQUENCY/TIME RESPONSES
CLIC parameters relevant to the beam-loading compensation and used throughout the paper are shown in Table I.It should be mentioned here that the initial 1.3% relative energy spread in the 9 GeV main beam entering the linac can be fully neglected because the resulting 1.5 TeV energy gain limits this effect to the 10 À5 level.
The frequency domain code HFSS [13] is used to calculate electromagnetic fields in the accelerating structure.
Here we consider only the fundamental TM 01 accelerating mode so using the symmetry we simulate just 1=4 of the structure, with the perfect magnetic boundary conditions on the cutting planes and the finite conductivity condition on the outer walls.
Port excitation is used to calculate the unloaded electromagnetic field as it is shown in Fig. 1 (top).To calculate the electromagnetic field excited by the beam, an equivalent current source on the structure's axis is modeled by a plane wave excitation.To do this a plane wave with transverse polarization is used.The corresponding vector of the electric field E 0 and the propagation vector k of the wave are shown in Fig. 1 (bottom).
It should be mentioned here that one obtains complex electromagnetic fields from HFSS, so frequency/time responses of the structure, beam coupling impedance, unloaded/beam/loaded voltages are also given as complex values throughout the paper.
The frequency response of the structure (accelerating voltage in response to the feeding power) is calculated using the electrical field on the z axis obtained from the port excitation by means of the following formula: where P 0 is the total input power, L is the length of the accelerating structure, and c the speed of light in vacuum.
Using normalization for the fields determined from the plane wave (PW) excitation, we calculate the beam coupling impedance: where Z 0 is the impedance of free space, r PW is the radius of the cylinder, in the vicinity of the beam, which is subtracted from the considered accelerating structure volume.This manipulation is necessary since HFSS cannot handle plane wave excitation sources inside of the body.The parameter r PW has been adjusted so that it does not affect s parameters and field profile in the structure.
The frequency response and beam coupling impedance are presented in Fig. 2.
Performing an inverse Fourier transform, we convert the frequency response and coupling impedance to the structure's time response rðtÞ and wake potential WðtÞ, respectively, see Fig. 3.

III. UNLOADED AND LOADED VOLTAGES
Unloaded voltage in the accelerating structure is calculated for an arbitrary complex pulse pðtÞ by convoluting it with the time response rðtÞ: V unloaded ðtÞ ¼ pðtÞ Ã rðtÞ: (1) To validate the obtained results, we compare them with the analytical model [3] which is developed to study transient and steady-state beam-loading effects.This analytical model does not take into account dispersion and it also cannot accommodate the coupler cells.In order to avoid any differences in the considered geometry, we performed a separate simulation of the regular cells only to crosscheck the unloaded and beam voltages scaling the input power accordingly.In Fig. 4 the complex magnitudes of both the unloaded voltage for the analytically calculated compensation pulse presented in [3] and the unloaded voltage obtained using Eq.(1) which takes the dispersion into account are shown.It can be seen here that during the transient the dispersion effect in the accelerating structure is at the level of a few percent.
To calculate the beam induced voltage we express it in the terms of the wake potential for the whole bunch train: where q is the bunch charge, N B is the number of bunches within the train, and T B is the bunch separation   time.We again compare the beam voltage with the analytical model where the equivalent current source is used, see Fig. 5.As in the case of the unloaded voltage the difference (because of the dispersion effect) is at the level of 2%.
Using Eqs.(1) and ( 2), the loaded voltage for each given injection time T inj can now be determined from the relation Based on the results of the comparison between the abovementioned two models and since we have to provide 0.03% beam-loading compensation, we must take the dispersion effect into account in order to calculate loaded voltage correctly.

IV. RECTANGULAR AND ANALYTICALLY DERIVED PULSES
Unloaded voltage for a rectangular pulse of 240 ns with the CLIC nominal input power for an average loaded accelerating gradient of 100 MV=m, beam voltage for the CLIC nominal main beam, and the corresponding loaded voltage are all shown in Fig. 6.In this case, by optimizing the injection time, T inj , the rms relative energy spread can only be reduced to 2.5%.Clearly, the CLIC specification of 0.03% for the rms energy spread could not be met if a rectangular pulse is used.
The analytical pulse presented in Fig. 4 in black is derived in [3] in order to compensate the transient beam loading.Feeding the structure with this pulse, i.e., using Eqs.(1)-(3) and adjusting the injection time (roughly filling time of the structure plus rise time), we were able to reach an rms relative energy spread of 0.09% along the bunch train, see Fig. 7.
Even if the energy spread calculated for this pulse had been less than the CLIC requirement of 0.03%, we still cannot use it directly to provide the beam-loading compensation in the linac.The reason is that the main CLIC linac is fed by PETS where power is generated by the beam formed in the drive beam generation complex.Hence, the different rf pulse shapes in CLIC could only be obtained by manipulating the discrete number of the phase coding times in the buncher [8].Below we explain the scheme of the power generation in CLIC and its usage in the beam-loading compensation procedure.

V. POWER GENERATION IN CLIC AND BEAM-LOADING COMPENSATION
The drive beam generation complex in CLIC consists of an injector, a drive beam accelerator, a delay loop (factor 2 combination), and two combiner rings (3 and 4 combination factors), see Table I and Fig. 8.
In the Fig. 9 the beam combination is shown schematically: 24 Â 4 ns 0.5 GHz trains are combined into 1 Â 4 ns 12 GHz bunch trains with a total frequency multiplication factor of 24. Green vertical lines in Fig. 9 correspond to the phase switching time in the injector and as suggested in [8] we will vary these times in order to provide the beamloading compensation.
The resulting 12 GHz drive beam arrives at the PETS where the produced voltage is proportional to the beam current, and the voltage modulation comes from current modulation of the drive beam.In Fig. 10, the complex magnitude of a single bunch response for a PETS [9] calculated in time domain using GDFIDL [14] is shown.O. KONONENKO AND A. GRUDIEV Phys.Rev. ST Accel.Beams 14, 111001 (2011) Parasitic reflections in the PETS on/off mechanism cause the appearance of a tail in the bunch response function.In order to investigate its influence on the energy spread, two cases have been investigated: the main part of the PETS response from 0 to 2 ns (see green rectangle in Fig. 10) without the tail and the full PETS bunch response including the tail.In Fig. 11, the CLIC compensation pulse shape is shown schematically.Here a ramp during the filling time t filling is used to perform the transient beam-loading compensation, whereas the rise time t rise is introduced to take the transient related to the accelerating structure bandwidth into account, the tail of the pulse is also introduced due to the drive beam combination scheme which was presented above.

VI. OPTIMIZATION ALGORITHM AND SOFTWARE
Since the drive beam combination factor in CLIC is 24 in total, there are 23 switching times T SWITCH in the drive beam injector.To find the optimum combination of the switching times and the appropriate injection time which give the best energy spread in the main beam, the following goal function must be minimized: where t n is the injection time of the nth bunch.Since it is a complicated (and significantly nonlinear) function of the discrete switching times and injection time, we cannot apply any deterministic algorithms for its minimization.It is also complicated to make an exhaustive search, because the possible number of the different CLIC pulses is greater than 10 24 .In such cases probabilistic (for example, genetic [15]) algorithms can be applied effectively and at the same time the computational effort needed to calculate the goal function must be minimized.
In order to find the optimal switching times and the appropriate injection time, a special geneticlike optimization algorithm has been developed and its flow chart is presented in Fig. 12.We start from the nominal switch times and 0 injection time.Then N shot times we randomly generate switch times and injection time with the appropriate time step.Choosing the injection and switching times which give the smallest rms energy spread, we start the Monte Carlo procedure again until we reach the CLIC energy-spread level.
One of the most important points here is that the loaded voltage should be calculated at each given iteration.Using Eq. (1) directly is a time consuming operation because it depends quadratically on the number of discretization points.In order to minimize the resources necessary for the optimization scheme, we do not calculate the full convolution from Eq. (1) but only part of it which fully defines the voltage seen by the beam.
In Fig. 13 the red and black squares inside the green rectangle are multiplications of the respective rðt k Þ and p CLIC ðt n Þ values.Unloaded voltage is a sum of the values on the same diagonal within the green rectangle and adding the corresponding (lying on the same diagonal) V beam ðt m Þ one obtains the loaded voltage.The gray and red squares should be used to calculate the loaded voltage at a given time point; however, since we are only interested in the loaded voltage seen by the beam it is enough to calculate the values marked as the black squares.It should be mentioned here that this depends linearly on the number of the discretization points and, hence, we can significantly improve the speed of the optimization algorithm.
Based on the discretization scheme for the pulse shape optimization explained previously, a beam-loading compensation software with graphical user interface has been developed in MATLAB [16], see Fig. 14.This software is used to import fields and s parameters from HFSS, generate rf input pulses based on arbitrary phase-switch times or import an arbitrary shaped pulse, calculate the unloaded voltage in an accelerating structure, obtain the reflected and transmitted pulse, and calculate the loaded voltage for a given injection time/phase.The key feature of this software is that it is possible to perform the optimization of the pulse shape in order to reach the acceptable energy-spread level.

VII. OPTIMIZATION OF THE RF PULSE SHAPE FOR THE NOMINAL CLIC PARAMETERS
The energy-spread optimization procedure has been applied based on the nominal CLIC parameters [2].The required level of 0.03% for the rms relative bunch-to-bunch energy spread ð ÁE hEi Þ has been achieved for the shortened PETS bunch response fixing injection time to about 88 ns.
Optimal switching time delays (the difference between T SWITCH and nominal 244 ns switching times) are shown in Fig. 15.
The CLIC optimized pulse shape, which is determined by these delays is shown in Fig. 16.This pulse is used for all 24 CLIC linac sectors in order to provide the necessary compensation.Different feeding of different sectors would also be possible if we had not reached a spread of 0.03% for one structure.
The final relative energy spread ÁE=hEi in the main beam is presented in Fig. 17.Here the relative peak-to-peak energy spread is around 0.2% while the optimized rms energy spread ð ÁE hEi Þ is 0.025%.The same level of ð ÁE hEi Þ was reached in the case of the full PETS bunch response including the tail caused by parasitic reflections from the PETS on/off mechanism albeit for different reoptimized switching time delays.

VIII. OPTIMIZATION OF THE RF PULSE SHAPE AND EFFECTS
The optimization procedure has been applied in order to increase the number of bunches within the main beam while keeping the energy spread below the specification.It was found (see Fig. 18) that the number of bunches can be increased from the nominal 312 up to 328.This increases the rf to beam efficiency of the accelerating structure from the nominal 28.5% to 30.0%.
Varying the rise time in the analytical model [3] (while maintaining the ramp during the filling time), it was also possible to reach the rms level required by CLIC of 0.03%, see blue curve in Fig. 19.However, in this case the appropriate injection time is larger by 15-20 ns than the one for the model presented in this paper, see the red curve in Fig. 19.This is as expected because in the current optimization scheme the full pulse shape is optimized, not only the one during the filling time.As was shown in [17], there is always a transient time in the subharmonic buncher during the switch in polarization.This is illustrated in the Fig. 20.
In Fig. 21 we present the results of the optimization in order to take into account this transient time.It can be seen that a transient time of up to 20 ns can be compensated for, from the energy-spread point of view, by varying the phase-switch times, while injection time variation can only compensate for a transient time of up to 10 ns.Since the transient time in CTF3 [18] is currently around 6.6 ns [17], we can still optimize the rms energy spread down to a level of 0.03% by only adjusting the injection time.
Another important physical parameter is the synchronous rf phase of the bunches which is varied to perform the Balakin-Novokhatski-Smirnov (BNS) damping [19], i.e., to compensate for the variation in energy gain between the head and the tail of the bunch.In this case the bunch is injected þ' inj off-crest in one main linac sector and À' inj off-crest in another one.
We have applied the optimization procedure in order to compensate the energy spread for all of the possible values of ' inj , see Fig. 22.It can be seen here that by optimizing the switching times we can stay under the CLIC required 0.03% level for reasonable injection phases.At the same time ð ÁdV=dt hdV=dti Þ stays in the range of 4%-5%.By using the technique explained in this paper we can also study different effects on the energy spread along the train.Here we study the effects of the charge jitter along the main beam and drive beam.The effects are presented in Figs.23 and     jitter below 0.1% in the main and drive beam which is the specification for CLIC [20] does not increase the rms energy spread in the main beam above the CLIC specification of 0.03%.

IX. CONCLUSIONS
A new model to compensate for the transient beam loading in the CLIC main linac has been presented.It takes into account the exact 3D shape of the CLIC accelerating structures including the couplers and the CLIC specific rf pulse generation scheme.It has been demonstrated that the 0.03% limit in the rms relative bunch-to-bunch energy spread in the main beam after acceleration can be satisfied.The optimization technique has also been applied to increase the number of bunches in the main beam by approximately 5% (from 312 up to 328) while still preserving the CLIC requirements, thus increasing the accelerating structure rf to beam efficiency from 28.5% up to 30%.
This optimization scheme has been used in order to compensate the energy spread in the main beam for the off-crest operation which is necessary for BNS damping.Different synchronous phases have been studied and the required energy-spread level has been reached.Transient time in the subharmonic buncher has also been taken into account.It was shown that by reoptimizing the pulse shape the CLIC specified energy spread can be maintained for a transient time of up to 18 ns.
Effects of charge jitters in the drive and main beams were also studied.It has been demonstrated that the CLIC specification for the rms spread in beams charge of 0.1% does not affect the energy spread significantly.There will inevitably be errors introduced during the fabrication process of the major components of CLIC as well as other jitters, observation errors, etc., so a dedicated study would have to be performed in order to investigate their influence on the compensation scheme presented here.

FIG. 3 .
FIG.3.Complex magnitudes of the time response function for the port excitation (red) and wake potential (blue).

FIG. 7 .FIG. 6 .
FIG. 7. Relative energy spread along the train for the analytical compensation pulse.

FIG. 13 .
FIG. 13.Loaded voltage calculation: full convolution multiplications (red squares), multiplications necessary to calculate the voltage seen by the beam (black).

FIG. 19 .FIG. 20 .
FIG.19.Dependence of the rms energy spread on the rise time for the analytical model (blue) and for the equivalent T injection À T filling time for the model presented in this paper.
FIG. 21.The rms energy-spread minimization for different transient times when optimizing both the switching delays and injection time (red) and when adjusting only the injection time only (blue).
FIG. 22. Minimization of the rms energy spread for different injection phases when using both the switching delays and the injection time (red) and when using only the injection time (blue). 0

TABLE I .
Selected nominal CLIC parameters relevant for the beam-loading compensation.