# Advanced Scheme to Generate MHz, Fully Coherent FEL Pulses at nm Wavelength
## 3 Resonator Considerations
### Longitudinal Overlap between Electron Bunch and the Recirculating Light Pulses  
Another method to obtain gain control is by affecting the longitudinal overlap between the electron bunch and the stored radiation field. A change in cavity length would change the arrival time of the radiation pulse, a procedure known as cavity detuning. The exact amount of the detuning or delay needed to transition between positive net gain and zero net gain depends on the electron bunch length. Here, we have assumed a 300 fs flat-top current distribution for the electron bunch as an example study. For all passes, the reflectivity is set to a value \(R_{set}\) which is larger than \(R_{equil}\), namely, the reflectivity, which leads to zero net gain when the longitudinal synchronism between the electron bunches and the recirculated seed pulse is optimum. Here, we define the cavity length \(L_{cav}\) for which the detuning is zero (\(\Delta L_{cav}=0\)), as the cavity length for perfect synchronism between the radiation pulses and consecutive electron bunches for no slippage, thus it is the cold cavity length. Due to slippage effects, perfect synchronism is achieved for longer cavity lengths (\(\Delta L_{cav}>0\)) that allow the longitudinally advanced radiation pulse to be delayed. As in this case we assume that the reflectivity cannot be reduced, we keep the reflectivity constant over all passes and we de-tune the cavity by \(\Delta L_{cav}\) to reduce the net gain in the steady-state regime. The detuning and the reflectivity  
Figure 7: (**a**) In this plot, the number of passes needed to reach steady-state as function of reflectivity change, \(\Delta R=R_{build-up}-R_{equil}\), is shown. We assume that the build-up process is over when the energy modulation is at least A = 7. (**b**) Example of \(\Delta R=3.4\%\). For the first 46 passes the reflectivity is set to \(R_{build-up}=14\%\) and from the 47 th pass onward the reflectivity drops to \(R_{equil}=10.6\%\) and the net gain is zero. As a result, the peak power is stabilized. are two complementary knobs. The larger the reflectivity difference \(\Delta R=R_{set}-R_{equil}\) is, the longer the detuning is needed. In Figure 8a, a cavity detuning is simulated for a range of set reflectivities \(R_{set}\) between \(11\%\) and \(15\%\). The cavity detuning curve for each reflectivity shows how much the length of the cavity should be shifted to move from the maximum net gain (shown with the vertical arrow), to zero net gain (intersections between the horizontal dashed line and detuning curve). The cavity detuning for maximum power gain is independent of the total reflectivity as expected, as it depends on the total slippage per pass, which is in turn dependent on the wavelength, the periods of the modulator and the group velocity of the field. Taking again the example of \(R_{set}=14\%\), in Figure 7a we need 46 passes to reach the desired in-cavity peak power level with the optimum detuning of \(\Delta L_{cav}=2.7\,\upmu\)m, and from Figure 8b we see that a detuning of \(\Delta L_{cav}=-14.1\,\upmu\)m keeps the in-cavity peak power level constant. The result is shown in Figure 8b, where the cavity length is shifted by \(16.8\,\upmu\)m and equilibrium is reached and maintained. For the implementation of this technique there are different options that can be considered. When detuning the cavity length, the position of one or more mirrors needs to be adjusted within \(\upmu\)m and with a MHz repetition rate. This depends heavily on the mirror choice and mirror size and weight. As an alternative solution, in the past a similar dynamic cavity desynchronization was considered for FELX [51] in order to control the growth rate and the final power at saturation and the fluctuations in power [52; 53]. It was proposed that instead of mechanically adjusting the mirrors, it is preferable to ramp the electron bunch repetition rate frequency by \(\Delta f_{rep}\) to achieve a cavity detuning of \(\Delta L_{cav}=L\Delta f_{rep}/f_{rep}\)[53].