{'fraction_non_alphanumeric': 0.03032104637336504, 'fraction_numerical': 0.012060472226940717, 'mean_word_length': 4.69115514741421, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Smooth and Beta-Beating-Free Optics Transitions for HL-LHC

In the CERN LHC, optics transitions are mainly required to control the beam size at the four experimental interaction points. The current method, based on linearly-interpolated optics functions over a small set of matched optics and parabolic time-domain segments, introduces non-zero beta-beating and it is not optimal in time. This contribution presents an alternative approach, based on continuously-matched optics solutions distributed in time domain by using a realistic model of the superconducting circuits, which optimises the overall process duration. This method requires a change in the paradigm used in the control system and it is proposed for the future High Luminosity LHC (HL-LHC) runs.


Introduction
The LHC [1] and the HL-LHC [2,3] lattice is composed of 8 arcs and 8 insertion regions (IR) for the two counter rotating beams (Beam 1 and Beam 2). Four IRs (IR1, IR2, IR5, IR8) host the main experiments (ATLAS, ALICE, CMS, LHCb) and the remaining ones (IR3, IR4, IR6, IR7) provide the momentum cleaning, RF and instrumentation, beam dump, and β-cleaning functionalities, respectively. Injection is taking place in IR2 for Beam 1 and IR8 for Beam 2. Optics transitions are needed since optics constraints at injection (e.g. aperture and transfer-line matching) are very different from experimental conditions at flat top (e.g. low-β at the interaction point (β * )). Each IR is equipped with a large number of individuallypowered quadrupole (IPQ) circuits (324 in total for the 8 insertions). Moreover, each arc is equipped with independent main circuits and trim circuits for each beam (48 circuits in total). In the present [4] and future operations, almost all quadrupole circuits change their momentumnormalised strength during the energy ramp and at flat top (similarly to other circular colliders [5]) . This paper reviews the strategy used currently to implement the optics transitions and proposes a new method to be applied in the HL-LHC to overcome some of the present limitations.

Current Method
An operational cycle, i.e. a sequence of so-called beam processes, defines a set of energynormalised settings generated from matched optics that are interpolated using a set of paraboliclinear-parabolic segments passing through the matched points with zero time derivative. Normalised settings are converted into currents and, at the same time, the duration of each segment is adjusted by taking into account an approximated model of the magnets and power converter constraints. At a later stage, the duration of the segment is refined by means of  Figure 1. Measurement (V) and circuit model residual (δV , model introduced later) for voltage of RQ6.L6B1 (V 1 ) and RQ6.L6B2 (V 2 ) circuits during two different LHC cycles: a high-luminosity cycle used to fit the circuits' parameter (top) and a luminosity-scan cycle to test the model (bottom). The model reproduces fairly well all features of the measurement data in both cases with a residual of 25 mV.
hardware tests without beam. Finally, optics corrections are applied during beam commissioning on the matched points and a new cycle is rebuilt. Figure 1 shows an example of a circuit of an IPQ during the ramp. The repeated spikes in voltage between 1000 and 2100 s occur when the time-derivative of the normalised strength is forced to zero because the power converter has to decelerate and accelerate the current rate instead of following the rate determined by the combined variation of momentum and normalized-strength.
The current system has few limitations. In between the matched points, the optics has a design beta-beating in the order of 10%, which is correlated with beam loss spikes in-between matched points (see [6]). The duration of the transition is longer than what would be allowed by the hardware constraints, due to the unnecessary accelerations imposed by the zero-slope constraint. This forces part of the squeeze process to occur during flat top instead of in the ramp therefore reducing physics time [4]. The overall cycle needs to be tested before operation, without beam, in order to verify the correctness of the settings for each segment. This procedure does not cost excessively in time, however it might require lengthy and last-minute changes in the optics preparation in case of issues (e.g. actual model is not accurate in the presence of large imbalance between the currents of IPQs).
The following section illustrates an alternative strategy that can overcome the aforementioned limitations, which is based on a realistic model of the quadrupole circuits, combined with the production of matched and smooth optics transitions, together with a procedure to optimise the squeeze duration that guarantees to fulfil all hardware constraints.

Realistic magnet circuit models
Most of the 2-in-1 IPQs are powered by two independent power converters that share one warm return cable (see Figure 2). The common cable couples the minimum time needed to apply a change of current in the two magnets. Precise values of the parameters are needed for a good fit. The parameters of each LHC circuit were obtained by fitting the circuit response during a cycle (see Figure 1) and spot-checked against data from other cycles. The quantities constraining the LHC circuits are listed in Table 1 together with the underlying source. The admitted values of the constrained quantities are collected from the LHC control database (LSA [7]). Unipolar power converters are not stable when the current and voltage approach zero, which poses important limitations on the normalised strength of IPQs at injection and on the ramp rate when the current has to be reduced. The equations of the circuit are used to calculate the expected voltage of a given current excitation and compared with the operational range of the power converter. Constraints on i (t) require very smooth i(t) excitation.

Smooth transitions
In order to generate smooth current functions, two desired optics configurations (e.g. injection at the beginning of the ramp and flat top at the beginning of collisions for physics) need to   be connected through smooth functions in normalised strength. In addition, to avoid optics errors, each point in the curve should belong to a matched solution. The generation of smooth and matched curves is particularly difficult. Each insertion has about 30-40 quadrupoles whose strengths need to fit about 20-30 optics constrains. Some constraints needs to be exact like those referring to the Twiss parameters (β x,y , α x,y , D x , D x , ∆µ x,y ) at the boundaries of the IRs  Table 2. Stages of the ramp and squeeze process of the HL-LHC ultimate scenario [10] for which β * -leveling [11] starts at top energy from 40 cm and continues down to 15 cm. IR1, IR5 and IR8 optics reach intermediate lower β * in the middle of the ramp, while in IR2, 8 triplet strength is reduced. In the last stage IR8, IR2, IR4, IR6 deploy the ATS [12] (up to a telescopic factor of 2) while IR1, IR5, IR8 are also squeezing and the arcs, IR3, IR7 are used to adjust the internal phase advances to optimal values [13].
Insertion Stage 1 Stage 2 Stage 3 IR1, 5 Injection β * = 2 m β * = 40 cm IR2 Injection β * = 10 m ATS×2 IR8 Injection β * = 3 m β * = 1.5 m, ATS×2 IR4, 6 Injection Injection ATS×2 Arcs Injection Injection Phase IR3, 7 Injection Injection Phase Energy 450 GeV 3.8 TeV 7 TeV and the interaction points. Other constraints are expressed in terms of inequalities (such as the operational range of the quadrupole strength, large β function in protecting devices, beam instrumentation). All constraints are typically expressed as highly non-linear function of the quadrupole strengths. Hence, the existence of a solution for a given set of constraints and the existence of a smooth connected path is not guaranteed a priori. The approach to find an appropriate solution proposed in this paper makes use of the optimisation routine JACOBIAN [8] implemented in MAD-X [9]. A first set of solutions is found by seeding all strengths of each step with a linear interpolation between the two extreme optics solutions in one meaningful parameter (e.g. β * of experimental insertions). The result is then approximated by a low-order, non-linear polynomial (typically second or third order) function that best fits the curves and used as a seed for the next iteration. After few iterations, the seed is close enough to the solution such that the JACOBIAN method (which uses few iterations of the pseudo-inverted solution of the linearised vector problem) can find the closest solution (in euclidean-norm) in the parameter space. Since the seed and the constraints are smooth the closest solutions will be smooth too. Figure 3 shows an example of the final results where each point of the curve is found independently of the others, but still lay in a smooth curve despite the existence of many equivalent non-smooth solutions.

Optimisation of squeeze duration
The minimum duration of the optics transitions can be determined by minimising the interval between optics steps after transforming the normalised strengths in currents and imposing to be compatible with the hardware constraints. As the LHC ramp is already fixed by the properties of the main dipoles' circuits, the problem is implicit and solved iteratively. Small and equally spaced intervals are used as a starting point and the circuit quantities (i(t), i (t), i (t), v(t)) are computed. In a first stage, each interval and its neighbours are stretched until all hardware constraints are fulfilled. In a second stage, each interval is reduced until a constraint is not fulfilled. This empirical automatic method is sufficiently robust and fast to find a solution. Figure 4 shows an example of circuit analysed after the optimisation.  Figure 5. Resulting β * as a function of time after the optimisation of the ramp and squeeze for HL-LHC ultimate scenario [10]. The curve contains 81 matched solution and the corresponding currents fulfil the hardware constraints. The entire squeeze needed before starting β * -levelling could fit into the ramp with margin. The last part of the squeeze has been artificially stretched to avoid a too-fast reduction of β * (implying large β-functions in the triplets) compared to the reduction of the geometrical emittance.

HL-LHC ramp and squeeze
The methods explained above are used to optimise the ramp and squeeze cycle of the ultimate scenario in HL-LHC [10]. Table 2 shows the main steps of the ramp and squeeze process in the HL-LHC and Figure 5 shows the evolution of β * after the time optimisation. The final solution has been obtained by optimising the transition of each individual insertion, merging the insertions after matching their individual timings and generating the complete optics sets to perform the global chromatic correction. As a last step, the transition of all the insertions and the arcs were re-optimised globally. The process is compatible with the aperture requirements.

Conclusions and next steps
The paper presented an overview of the mechanics of optics transitions in the LHC. A new method has been proposed and successfully applied to the HL-LHC for the ultimate scenario. The current functions were supposed to be tested in the machine during the last hardware commissioning in 2018 to prove the robustness of the circuit model and optimisation method, but the test was cancelled due unrelated machine issues. New tests will be foreseen as soon as possible in 2021. The present LHC control software (LSA) is not entirely compatible with the approach proposed, in particular for what concerns the integration of optics corrections. Software developments are needed to enable this process.