Automatic longitudinal tuning of a multiple-charge-state heavy-ion beam

1098-4402= A new procedure has been developed for automatic longitudinal tuning of a multiple-charge-state heavy-ion beam. It uses a matrix-based code to track the beam centroids and Twiss parameters of the individual charge state beams and a minimization code to minimize a goal function by adjusting the synchronous phases and field levels in the accelerating cavities. The procedure has been successfully tested in the case of the Rare Isotope Accelerator driver linac and proven to improve an original manual tune by significantly reducing beam losses. The procedure was also applied for fast retuning of the linac after one or more cavity failure and restoring the beam with limited beam loss.


I. INTRODUCTION
In an earlier study [1] we reported the results of large scale simulations for two design options of the Rare Isotope Accelerator (RIA) driver linac sketched in Fig. 1.The linac consists of one or more electron-cyclotronresonance ion sources, a room temperature injection system and a superconducting (SC) linac.The injection system contains a radio-frequency quadrupole, a multiharmonic buncher and a low-eneregy-beam-transport system.The SC linac is subdivided into three sections separated by two stripping stations.The two design options are the original ''baseline'' design (ECL) and the alternative ''triple-spoke'' design (TSL).They differ mainly by the type of cavities used in the high-section of the linac.In the TSL design, the recently developed and successfully tested triple-spoke cavities [2,3] replace the elliptical-cell cavities [4] used in the ECL design.The simulations for both designs were performed for a multiple-charge-state uranium beam using the recently developed beam dynamics code TRACK [5].The simulations included all sources of error such as elements misalignment, rf field errors and stripper thickness fluctuations.A thorough beam loss analysis has been performed showing that the ECL design is less tolerant to rf field errors and to fluctuations in the stripper thickness.Beam losses were observed in the high-section of the ECL design while no losses were observed for the TSL design even for the highest error amplitudes.The study also showed that the losses in the ECL design are extremely sensitive to the longitudinal tuning in the linac.A careful tuning in terms of phase setting to produce the lowest possible effective emittance at the location of the strippers, especially in the mediumsection, was proven to reduce the losses in the subsequent high-section.We here focus on the ECL design and attempt to develop tunes that significantly reduce beam losses.
For a fast and reliable way to longitudinally fine tune a multiple-charge-state heavy-ion beam we developed an automatic procedure to replace the slow and often less than optimal manual procedure.After presenting the formalism for the transport of a multiple-charge-state beam in the next section, we describe the automatic longitudinal tuning procedure in Sec.III.The results of applying the automatic procedure to improve the original manual tune in the medium-section of the RIA driver linac are presented in Sec.IV.In Sec.V we used the automatic procedure to retune the linac after one or more cavity failures in the medium-section.A discussion of a possible experimental realization of the automatic tuning procedure is given in Sec.VI.The last section gives a summary and discusses future developments required for a more complete (re)tuning procedure.

II. TRANSPORT OF A MULTIPLE-CHARGE-STATE BEAM
For the purpose of the automatic tuning procedure, we developed a simple matrix-based transport code for a multiple-charge-state heavy-ion beam in the longitudinal phase space W ÿ .W and are a particle's energy and phase deviations from the synchronous particle.In our case W will be expressed in keV=u and in degrees of the local frequency.The code will be used to track beam centroids and Twiss parameters of the individual charge state beams.The transfer matrix approach is fast and thus more suitable for an optimization involving multiple iterations.
In the longitudinal phase space an accelerator lattice could be simplified and represented by a sequence of drift spaces and zero-length rf gaps.A rf resonator is a drift space followed by an effective rf gap followed by a drift space.In a drift space s a particle's energy does not change but its phase changes from an initial value i to a final value f : where f is the local frequency, is the particle velocity, and c is the speed of light.In a rf gap, the particle's energy changes from an initial value W i to a final value W f : where q is the ion charge, A is the mass number of the ion, V eff is the effective voltage in the gap, s is the synchronous phase, and i is the particle's phase deviation from the synchronous particle.V eff replaces the usual E 0 TL factor where E 0 is the electric field amplitude, L is the real gap length, and T is the transit time factor.In our case V eff is calculated using the code TRACK for the different cavity types in their useful velocity range.Figure 2 shows V eff for the two cavity types used in the medium-section of the RIA driver linac.
In the case of a multiple-charge-state beam, every charge state will have its own synchronous particle and thus its own synchronous phase s;q [6].If s;q 0 is the synchronous phase for the reference charge state, chosen to coincide with the rf phase s , the synchronous phase for a charge state q i would be s;q i ÿArcos q 0 q i cos s;q 0 : Based on the equations above and on TRACE-3D formalism [7] we can easily derive the longitudinal transfer matrices for drift spaces and rf gaps.For a drift space s we have f where m u is the atomic mass unit (amu 931:5 MeV) and is the relativistic kinematical factor.For a rf gap we obtain f d i = f corresponds to the phase damping factor and f is the final particle velocity calculated from W f expressed above.s is the synchronous phase for the corresponding charge state q.Knowing the original beam centroids of the individual charge states P i q i i ; W i we can determine their values P f q i at any point using the corresponding transfer matrices Rq i above through For the transfer of the Twiss parameters, we define a beam sigma matrix for each charge state: ÿ ÿ ; where , , and are the Twiss parameters appearing in the equation of the phase-space ellipse: where " is the longitudinal beam emittance in deg-keV=u.For beams of individual charge state the emittance is conserved but the overall emittance varies.For our application, space charge effects are negligible.Knowing the initial sigma matrices of individual charge state beams i q i we can calculate the final matrix f q i at any point using where R T is the matrix transpose of the transfer matrix R. At this stage we have the tools to track the centroids and Twiss parameters of the individual charge state beams.

III. DESCRIPTION OF THE AUTOMATIC TUNING PROCEDURE
As discussed in the introduction, fine longitudinal tuning in the medium-section of the RIA driver linac (baseline design) is essential to reduce beam loss in the subsequent high-section.The most important criteria for an optimum tune is to minimize the overall emittance of the multiple-charge-state beam and to reach the stripper with an upright beam ellipse in the -W phase plane as shown in Fig. 3.Because of energy straggling in the stripper the beam emittance will blow up along the energy axis.In addition, fluctuations in the stripper thickness tend to amplify this effect.Arriving with an upright ellipse will minimize the effect of energy straggling and the beam emittance after the stripper.To realize these conditions the centroids of the individual charge state beams should coincide and their Twiss parameters matched at the stripper.Tracking the individual charge state beams using the code described in the previous section up to the stripping energy W 0 , the following conditions should be met: setting the slope to 0 and minimizing the beam waist should ensure that the beam ellipse is upright.Using a minimization code such as MINUIT [8], we can define the function to minimize and the fit parameters then run the fit until it converges.In our case the fit function is where W is the allowed error on the beam energy, W and are the errors on the energy and phase deviations of the different charge states with respect to the reference charge state.is the allowed deviation of the slope from 0. The fit parameters are the synchronous phases s and the field levels F level in the rf cavities.The field level F level is used as a scaling factor in front of the effective voltage in the cavity (rf gap) V eff defined in the previous section.
Prior to implementing the automatic tuning procedure we investigated few simple and efficient ways of doing it manually.Among these methods, and of particular interest from the beam dynamics standpoint, we tried to bring the reference phases of individual charge state beams to their corresponding synchronous phases s;q i .For this we considered a design option where a single cavity type (single frequency) is used in the medium-section of the RIA driver.Figure 4(a) shows the evolution of beam phase and energy centroid deviations of the individual charge states throughout the whole section.In this case and for simplicity, all cavity phases were set to ÿ30 .We clearly notice that the reference phase and energy of the different charge states oscillate around those of the reference charge state (horizontal lines).By setting the phases of two particular cavities at the beginning of the section to ÿ90 , converting them into bunchers, we were able to suppress or significantly reduce the phase and energy oscillations of individual charge state beams about those of the reference charge state, see Fig. 4(b).We clearly see that the oscillations around the reference charge state are either absent or significantly reduced which usually results in more stable beam dynamics along the linac.However, to bring the centers of individual beams together at the end of the section we had to use 4 cavities and set them to ÿ90 with 15% increase in field levels.
Bringing the reference phases of the individual charge state beams to their corresponding synchronous phases has the advantage of producing a much more stable beam dynamics by significantly reducing beam oscillations at the cost of few additional cavities.However, this method is more useful for a single frequency lattice and will be hard to apply in our case where two different cavity types with different frequencies are used in the medium-section of the linac.It also does not necessarily match the Twiss parameters of the different charge state beams.

IV. RESULTS: IMPROVING THE ORIGINAL MANUAL TUNE
As a test and first application of the automatic tuning procedure we used it to see if we can improve the manually obtained tune used in our error simulations and beam loss analysis [1].For this purpose we performed the minimization described in the previous section by varying only the synchronous phases of the 136 rf cavities used in the medium-section of the linac.For stability of the longitudinal motion and to achieve the total energy gain s was constrained between ÿ20 and ÿ35 .The starting phases are not necessarily the same.In this particular case, all field levels are kept unchanged at their original values, F level 1, assuming the same field level in all cavities.The optimization could very well be performed for any field level profile.
The optimization was performed for a five-charge state U 238 beam with Q 0 74 as the reference charge state and Q i 72 ; 73 ; 75 ; 76 the other charge states.The results from the code described in Sec.II for both the original manual tune and the automatically obtained tune are presented in Fig. 5 for the beam centroids and Fig. 6 for the final beam ellipses.We clearly see on Fig. 5 that the automatic tuning made the centroids of the individual charge state beams converge to the same points right before the stripper.On Fig. 6 the originally arbitrarily oriented beam ellipses become almost perfectly aligned reducing the overall effective emittance by a factor of 2. To further compare the manual and the automatic tunes, we performed full beam dynamics simulations including all sources of errors using the code TRACK [5].Simulations with misalignments and field errors are an important test for the stability of a given tune.The best tune should show more tolerances to errors and produce less beam loss.The errors used in these simulations are given in Table I.The simulations were performed for 50 randomly generated error sets.Figure 8 shows the results in the form of beam loss in Watts per meter along the whole RIA driver linac.We clearly see that the automatic tune produces much fewer losses in the high energy section.The total beam loss in that section is reduced by about a factor of 3 and the peak loss is reduced by about the same factor.
This proves that the automatic tuning procedure is efficient in producing fine tunes which are more stable against errors with less beam loss.The advantage of this technique is that it could use a very large number of fit parameters and that it is fast and reliable when compared to the step by step manual method.This method is also very useful, and seemingly the only way, to retune a given section of the linac after one or more cavity failures which will allow a fast recovery and restoration of the beam.

V. APPLICATION TO CAVITY FAILURE
In this application we consider two cases of cavity failure.The goal is to restore the beam with limited beam loss by retuning the linac.In the first case two cavities fail in the medium-section which is the most sensitive section of the linac.The two failing cavities are the first cavity in the section (number 1 on Fig. 7) and the first cavity after the frequency transition from 172.5 to 345 MHz (number 81 on Fig. 7).The field levels in these two cavities are set to zero and their synchronous phases are not used in the fit procedure.By varying only the phases of the remaining cavities we were able to produce a tune that restores the beam with limited beam loss.The results are shown in Fig. 9(a).In the second case we fail 7 cavities in separate cryomodules along the same section.The 7 failing cavities are the first cavities of the first four cryomodules (number 1, 9, 17, and 25 on Fig. 7) and the first cavities of the first three cryomodules after the frequency transition (numbers 81, 88, and 95 on Fig. 7).In this case we had to also vary the field levels F level of the remaining cavities between 0.9 and 1.1 assuming a 10% reserve in their gap voltage.Two fit approaches could be used.The first is to vary the phases and field levels at the same time.The second is to vary only field levels to restore the energy for the reference charge state then fix them and vary only the phases to match the five-charge state beams.For speed and to reduce the number of free parameters in the fit we used the second approach.The results are shown in Fig. 9(b) where we were able to produce a good tune with limited beam loss.

VI. DISCUSSION OF A POSSIBLE EXPERIMENTAL REALIZATION
Although the focus of this paper is numerical simulations, it is worthwhile to discuss a possible experimental realization of the automatic tuning procedure presented here.The automatic tuning procedure (see, fit function F) would require the measurement of the absolute energy of the reference charge state (W q 0 ), the energy and phase deviations (W q i and q i ) of the different charge states with respect to the reference charge state as well as the Twiss parameters ( q i and q i ) for individual charge state beams.We acknowledge that these quantities are not easy to measure even for a single beam calling for more research and development in this particular direction.
In our case we propose to perform separate measurements for the individual charge state beams by selecting a given charge state at the first stripper (entrance of the medium-section).The beam energy and phase centroids could be measured accurately using the time-of-flight method as presented in [9] where an accuracy of 10 ÿ4 for both energy and phase was reported.The beam energy width could be measured precisely using the dipole magnet downstream of the second stripper.A bunch time detector similar to the one presented in [10] could be used to measure the phase width right after the buncher located in the middle of the chicane area downstream of the second stripper.At this location the phase width is at its largest value and the 20 ps resolution of such device may provide a reasonable measurement.The development of a bunch time detector based on x rays instead of secondary electrons may reduce this time resolution to about 5 ps or better.Varying the phase of the last cavity in the section and performing multiple energy and phase width measurements would allow the determination of the longitudinal beam emittance and extract the Twiss parameters.
These measurements will require fast real-time processing of the diagnostics data.Such rapid analysis and communication with the control system will be an important capability of our plan to implement a model-driven accelerator.

VII. SUMMARY AND FUTURE WORK
We have developed an automatic longitudinal tuning procedure for a multiple-charge-state heavy-ion beam.The procedure has been successfully tested and proven to improve an original manual tune by significantly reducing beam losses in the high-section of the ECL design of the RIA driver linac.It was also successfully used to retune the linac after one or more cavity failures with limited beam losses.The same procedure could also be used to develop tunes for different ions other than uranium.
The future steps in this work will be to implement this automatic procedure into the code TRACK.We are currently developing a matrix option for TRACK which will allow to use higher-order matrices in the optimization.In the case of failure it is also important to rematch the beam transversely while retuning longitudinally.After these developments we would have a more complete tuning procedure both longitudinally and transversely including higher-order effects.The experimental realization of this automatic tuning procedure calls for more research and development in longitudinal beam diagnostic techniques and fast realtime analysis and communication with the control system for online beam tuning.

FIG. 1 .
FIG. 1. (Color) Schematic of the RIA driver linac.The indicated charge states and energies corresponds to a U 238 beam.

FIG. 3 .
FIG.3.Criteria for an optimized or fine tune.(a) Shows the longitudinal beam ellipse before (solid) and after (dashed) a stripper for a rough longitudinal tune.(b) Shows the same as (a) but for an optimized tune.We clearly notice that after fine tuning the beam emittance after the stripper is much smaller.Arriving at the stripper with an upright ellipse is critical.

FIG. 4 .
FIG. 4. (Color) Beam phase and energy centroid deviations for the different charge states (dashed curves) with respect to the reference charge state (solid line) plotted as function of distance along the single frequency option of the medium-section of the RIA driver linac.(a) Case where all cavity phases are set to ÿ30 showing the oscillations of individual charge state beams.(b) Case where few cavities are used to bring the reference phases of individual charge state beams to their corresponding synchronous phases in order to limit beam oscillations and produce more stable beam dynamics.

FIG. 5 .FIG. 6 .FIG. 7 .
FIG. 5. (Color)Beam phase and energy centroid deviations for the different charge states (dashed curves) with respect to the reference charge state (solid line) plotted as function of distance along the medium-section of the RIA driver linac.(a) For the original manual tune and (b) for the automatically obtained tune.The plots are produced using the code described in Sec.II.

FIG. 9 .
FIG. 9. (Color) Beam loss in W=m along the RIA driver linac for the cases of (a) two cavities and (b) 7 cavities failure in the medium-where the automatic tuning procedure was used to retune the linac and restore the beam.We notice that in both cases an optimized tune with limited beam loss is obtained.

FIG. 8 .
FIG. 8. (Color) Beam loss in W=m along the RIA driver linac for both (a) the original manual tune and (b) the automatically obtained tune.The horizontal line corresponds to the 1 W=m limits required for hands-on maintenance.The first two clusters of losses at the location of the first and second stripper, respectively, are controlled losses.The scattered losses in the high-section of the linac are uncontrolled losses.From (a) to (b) we notice that both the total and peak losses are reduced significantly.

TABLE I .
Errors and their typical values used in the simulations.For rf errors we consider both static and dynamic (jitter) errors.Static errors are essentially measurements errors while dynamic error are the fluctuation in time in both amplitude and phase of the rf.A corrective steering is applied to correct for misalignments.The rf static errors are also corrected for with a residual error in the order of the dynamic error.