1 Introduction

In storage rings, the betatron tune is the number of periods of the transverse oscillation in one turn. The betatron tune should avoid critical resonance lines and remain stable for user operation [1]. The stability of the betatron tune may be affected by several factors, such as undulator gap changes, hysteresis effects, or jitter of the magnet power supplies [2]. A tool for tune adjustment in a certain range is useful to compensate for tune variations and provide opportunities for machine studies.

A tune knob has been developed at the Duke Free Electron Laser Laboratory (DFELL) for its storage ring [3, 4]. The tune knob was developed with a local adjustment method: adopting only part of the quadrupoles near its south straight section (SSS), which is long enough (\(34\,\hbox {m}\)) to produce required tune adjustment with acceptable \(\beta\) function variations. The Twiss parameters at both ends of the SSS are perfectly matched with those of the arc sections so that the Twiss parameters in the remainder are almost unaffected [5, 6].

The Hefei Light Source-II (HLS-II) storage ring has a total circumference of approximately \(66\,\hbox {m}\) with four double bend achromat structures. Owing to its compactness, the local tune adjustment method adopted by the Duke storage ring is not applicable for the HLS-II storage ring. Therefore, a tune knob is designed based on global adjustment, in which all or selected quadrupole families are adopted by the tune knob. A preliminary result of the tune knob developed for the HLS-II storage ring was reported in an IPAC paper, in which all the quadrupole families were adopted [7].

In this paper, an improved scheme for tune knob development is reported in detail. This scheme maintains the Twiss parameters of the injection section, which adopts the global adjustment using selected quadrupole families outside the injection section while preserving the lattice symmetry. The simulated impact on the beam optics and the online measurement results are presented. An application of the tune knob, betatron coupling measurement, is also reported.

2 Tune adjustment for storage rings

Tune adjustment in a small range usually adopts a matrix method. It is known that when the variations of the quadrupole strengths are small, the induced tune change is given by [8]

$$\begin{aligned} \Delta \nu _{x,y}=\frac{1}{4\pi }\oint \Delta K(s)\beta _{x,y}(s){\mathrm {d}}s, \end{aligned}$$
(1)

where \(\Delta K\) is the quadrupole strength change, \(\beta (s)\) refers to the beta function at location s, and \(\Delta \nu\) denotes the tune change. Adopting the hard-edge model, the above integral can be rewritten by a summation as

$$\begin{aligned} \begin{aligned} \Delta \nu _{x,y}&=\frac{1}{4\pi }\sum _{i}\Delta K_i({\bar{\beta }}_{x,y}(i)+\Delta {\bar{\beta }}_{x,y}(i))l_i \\&\approx \frac{1}{4\pi }\sum _{i}\Delta K_i{\bar{\beta }}_{x,y}(i)l_i, \end{aligned} \end{aligned}$$
(2)

where \(l_i\) is the effective length of the ith quadrupole and \({\bar{\beta }}(i)\) is the average \(\beta\) function in this quadrupole. Assuming \(\Delta K_i\) and \(\Delta {\bar{\beta }}(i)\) are both small, \(\Delta K_i\Delta {\bar{\beta }}_{x,y}(i)\) can be neglected. Thus, the relation between the tune change and quadrupole strength adjustment becomes linear and is represented in a matrix form:

$$\begin{aligned} \begin{aligned} \begin{pmatrix} \Delta \nu _x \\ \Delta \nu _y \end{pmatrix}&=\begin{pmatrix} m_{11} &{} m_{12} &{} \dots &{} m_{1n} \\ m_{21} &{} m_{22} &{} \dots &{} m_{2n} \end{pmatrix}\begin{pmatrix} \Delta K_1 \\ \vdots \\ \Delta K_n \end{pmatrix}\\&={\mathbf {M}} \begin{pmatrix} \Delta K_1 \\ \vdots \\ \Delta K_n \end{pmatrix}, \end{aligned} \end{aligned}$$
(3)

where \({\mathbf {M}}\) is the tune response matrix, and n is the number of quadrupoles [9]. When the tune is adjusted in a small range, the quadrupole adjustment can be obtained from the pseudo-inverse \({\mathbf {M}}^{-}\) of the tune response matrix \({\mathbf {M}}\), i.e.,

$$\begin{aligned} \begin{pmatrix} \Delta K_1 \\ \vdots \\ \Delta K_n \end{pmatrix}={\mathbf {M}}^-\begin{pmatrix} \Delta \nu _x \\ \Delta \nu _y \end{pmatrix}. \end{aligned}$$
(4)

This matrix method is approximate within a limited tune adjustment range. In addition, the control of Twiss parameters is not considered.

To adjust the tune in a larger range, an alternative scheme is developed, which adopts a step-by-step method with the matching of beam optics. This scheme can adjust the tune while constraining the Twiss parameters. The step-by-step method is shown in Fig. 1, and it has the following properties:

  • The nominal lattice is used as the starting point for either increasing or decreasing the tune;

  • A proper tune change step is set to ensure the matching is accurate in each adjustment step;

  • The new lattice with adjusted quadrupole strengths from the previous step is used as the starting point for the next step;

  • After the adjustment process is completed, the adjusted quadrupole strengths as functions of the tune change are fitted by polynomials.

With this scheme, the quadrupole strengths vary monotonically with the tune change. The adjustment is more accurate compared with the matrix method.

Fig. 1
figure 1

(color online) Schematic of the step-by-step method for tune adjustment. The nominal lattice is the starting point. The result from the previous step is the starting point for the next step

3 Tune knob development for the HLS-II storage ring

3.1 Tune knob development

Main parameters of the HLS-II storage ring are listed in Table 1. The linear lattice is shown in Fig. 2, which consists of four \(4.0\,\hbox {m}\) long straight sections and four \(2.3\,\hbox {m}\) long ones [10]. A total of 32 quadrupoles are grouped into eight families labeled from K1 to K8, as shown in the figure.

Table 1 Main parameters of the HLS-II storage ring
Fig. 2
figure 2

(Color online) The linear lattice of the HLS-II storage ring including the dipoles and quadrupoles. Other elements such as sextupoles and correctors are not shown in the figure. The injection section has four kicker magnets, shown as the four green points. The quadrupole families are labeled from K1 to K8 in range

The injection section of the HLS-II storage ring consists of four kicker magnets, and their corresponding locations are indicated in Fig. 2. To reduce the impact on beam injection, the Twiss parameter changes of the injection section should be small. This is achieved by the following processes.

  • Only the quadrupoles labeled K5 to K8 in each family are adopted by the tune knob.

  • Twiss parameters at the two outer kicker locations are constrained.

The first condition maintains the quadrupole strengths in the injection section, whereas the second constrains the Twiss parameters of the boundary of injection section. Under these two conditions, the Twiss parameters within the injection section are maintained for each adjustment step.

A code based on the accelerator simulation software MAD-X [11] has been developed, in which the step-by-step method is carried out using the matching module of the software. The quadrupole strengths of the four families (K5–K8) are set as the independent adjustment variables. To ensure the accuracy of the matching, the tune adjustment step in simulation is set to \(\Delta \nu =0.001\).

The transverse tunes of the nominal lattice are \(\nu _{\rm x}=4.4448\) and \(\nu _{\rm y}=2.3598\). To avoid critical resonance lines, the tune adjustment range in the simulation is set to be from \({-}\) 0.08 to 0.04 horizontally, and from \({-}\) 0.10 to 0.08 vertically. To simplify the simulation process, the tune is adjusted separately in the horizontal and vertical plane. This means that when the tune in one plane is adjusted, the tune in the other plane is maintained.

The quadrupole strength adjustment with respect to the tune change is shown in Fig. 3. The changes of K5 to K8 as functions of the tune change are fitted using fifth-order polynomial functions given by

$$\begin{aligned} \begin{aligned} \Delta K_{i\mathrm{x}}&=a_{i5}\Delta \nu _{\rm x}^5+a_{i4}\Delta \nu _{\rm x}^4+a_{i3}\Delta \nu _{\rm x}^3 +a_{i2}\Delta \nu _{\rm x}^2\\&\quad +\,a_{i1}\Delta \nu _{\rm x}+a_{i0},\quad i=5,\ldots ,8, \\ \Delta K_{i\mathrm{y}}&=b_{i5}\Delta \nu _{\rm y}^5+b_{i4}\Delta \nu _{\rm y}^4+b_{i3}\Delta \nu _{\rm y}^3 +b_{i2}\Delta \nu _{\rm y}^2\\&\quad +\,b_{i1}\Delta \nu _{\rm y}+b_{i0},\quad i=5,\ldots ,8. \end{aligned} \end{aligned}$$
(5)

The fitted coefficients in the above equations are listed in Table 2. If \(\nu _{\rm x}\) and \(\nu _{\rm y}\) are both adjusted, the required quadrupole adjustment can be obtained by a combination of Eq. (5) as

$$\begin{aligned} \Delta K_i=\Delta K_{i{\rm x}}+\Delta K_{i{\rm y}},\quad i=5,\ldots ,8. \end{aligned}$$
(6)
Fig. 3
figure 3

(Color online) Quadrupole strength changes with respect to the tune adjustment: a \(\nu _{\rm x}\) is adjusted and \(\nu _{\rm y}\) remains unchanged; b \(\nu _{\rm y}\) is adjusted and \(\nu _{\rm x}\) remains unchanged. The quadrupole families labeled from K1 to K4 are unchanged. The strength changes of quadrupole families labeled from K5 to K8 with respect to the tune change are fitted by fifth-order polynomial functions

Table 2 Fitted fifth-order polynomial coefficients for the tune knob

3.2 \(\beta\) Function variations

The \(\beta\) function variations during the tune adjustment are studied. When the tune is adjusted by the knob, the \(\beta\) function changes with respect to the nominal values are calculated. The results are plotted in Figs. 4 and 5 for adjusting the tune in the horizontal and vertical plane, respectively.

When \(\nu _{\rm x}\) is adjusted in the range of \({-}\) 0.08 to 0.04, the largest \(\beta _{\rm x}\) change is about \(0.2\,\hbox {m}\) and the largest \(\beta _{\rm y}\) change is about \(0.4\,\hbox {m}\). When \(\nu _{\rm y}\) is adjusted in the range of \({-}\) 0.10 to 0.08, the largest \(\beta _{\rm x}\) change is about \(0.8\,\hbox {m}\) and the largest \(\beta _{\rm y}\) change is about \(3\,\hbox {m}\). The overall \(\beta\) function change is larger when adjusting \(\nu _{\rm y}\) than adjusting \(\nu _{\rm x}\). The results also show that the \(\beta\) functions change symmetrically, which means the lattice symmetry is preserved during the tune adjustment process. The \(\beta\) function change in the injection section is very small, which is consistent with the design requirement to keep the injection unaffected by the tune knob. The horizontal \(\eta\) function is also calculated and the largest \(\eta\) function deviation is about \(0.5\,\hbox {m}\), which has little impact on normal operation.

Fig. 4
figure 4

(Color online) Simulated \(\beta\) function changes with respect to nominal values when \(\nu _{\rm x}\) is adjusted and \(\nu _{\rm y}\) remains unchanged. The \(\nu _{\rm x}\) adjustment range is from \({-}\) 0.08 to 0.04, and the plot interval is \(\Delta \nu _{\rm x}=0.01\)

Fig. 5
figure 5

(Color online) Simulated \(\beta\) function changes with respect to nominal values when \(\nu _{\rm y}\) is adjusted and \(\nu _{\rm x}\) remains unchanged. The \(\nu _{\rm y}\) adjustment range is from \({-}\) 0.10 to 0.08, and the plot interval is \(\Delta \nu _{\rm y}=0.01\)

3.3 Effect on chromaticities

The tune knob affects chromaticities. In a storage ring, the corrected chromaticities are expressed by [8]

$$\begin{aligned} \begin{aligned} C_{\rm x}&=-\,\frac{1}{4\pi }\oint \beta _{\rm x}[K(s)-S(s)\eta _{\rm x}(s)]{\mathrm {d}}s, \\ C_{\rm y}&=-\,\frac{1}{4\pi }\oint \beta _{\rm y}[K(s)+S(s)\eta _{\rm x}(s)]{\mathrm {d}}s, \end{aligned} \end{aligned}$$
(7)

where S is the sextupole strength and \(\eta _{\rm x}\) is the horizontal \(\eta\) function. When the tune is adjusted by the knob, the quadrupole strength K, together with \(\beta\) and \(\eta\) functions are affected, resulting in chromaticity changes.

The chromaticities of the nominal HLS-II lattice are corrected to approximately one and three in horizontal and vertical planes, respectively. The chromaticity changes owing to tune adjustment are plotted in Fig. 6. The result shows that when \(\nu _{\rm x}\) is adjusted from \({-}\) 0.08 to 0.04, the horizontal and vertical chromaticities vary in the range of approximately 0.7–1.2 and 2.6–3.0, respectively. When \(\nu _{\rm y}\) is adjusted from \({-}\) 0.10 to 0.08, the horizontal and vertical chromaticities vary in the range of approximately 0.5–1.5 and 1.6–3.8, respectively. In practical tune adjustment, the tune is usually adjusted within a smaller range than in the simulation. The chromaticities remain in the positive range, thus avoiding the head–tail instability.

Fig. 6
figure 6

(Color online) The chromaticity change as the tune is adjusted. When \(\nu _{\rm x}\) is adjusted from \({-}\) 0.08 to 0.04, the horizontal and vertical chromaticity varies in the range of approximately 0.7–1.2 and 2.6–3.0, respectively. When \(\nu _{\rm y}\) is adjusted in the range \({-}\) 0.10 to 0.08, the horizontal and vertical chromaticity vary in the range of approximately 0.5–1.5 and 1.6–3.8, respectively

3.4 Tune knob survey

The tune knob is surveyed using the Accelerator Toolbox (AT) [12], in which both \(\nu _{\rm x}\) and \(\nu _{\rm y}\) are adjusted according to Eq. (6). The adjustment range is from \(-0.08\) to 0.04 for \(\Delta \nu _{\rm x}\) and from \(-0.10\) to 0.08 for \(\Delta \nu _{\rm y}\), with the step in both planes set to \(\Delta \nu =0.005\). The tunes are calculated at each point and the differences between the set value and the calculated values (\(\Delta \nu _{\mathrm {check}}-\Delta \nu _{\mathrm {set}}\)) are plotted in Fig. 7. The tune deviations on the \(\Delta \nu _{\rm x}=0\) and \(\Delta \nu _{\rm y}=0\) axes are very small, showing the accuracy of tune knob fitting in Eq. (5). The deviation becomes a little larger when the tune is adjusted farther off-axis, yet the tune deviations in most regions are smaller than \(10^{-3}\). The result shows good agreement between the set value and simulated values.

Fig. 7
figure 7

(Color online) Tune knob survey result: a horizontal tune deviation; b vertical tune deviation. The tune varies exactly as the set value when adjusted on the axes \(\Delta \nu _{\rm x}=0\) and \(\Delta \nu _{\rm y}=0\). The maximum deviation is of the order \(10^{-3}\)

4 Online measurement and calibration

4.1 Online measurement

The tune knob is measured online in the HLS-II storage ring. The quadrupole strengths are set through the machine control system based on the Experimental Physics and Industrial Control System (EPICS) [13,14,15]. To measure the tune, the beam is excited by a modulated signal with certain central frequency and bandwidth. The tune spectrum is read from the spectrometer. To obtain better measurement accuracy, the Lorentzian function is used to fit the spectrum [16].

In the experiment, the tune knob coefficients are set according to simulation results. The tune adjustment step is set as \(\Delta \nu =0.005\), whereas the adjustment range is from \({-}\) 0.07 to 0.04 for \(\Delta \nu _{\rm x}\) and from \({-}\) 0.08 to 0.07 for \(\Delta \nu _{\rm y}\). The measurement is carried out within a narrower range than in the simulation to avoid the half-integer resonance. Similar to the simulation procedure, the tune knob measurement in the horizontal and vertical plane is performed separately. The measurement is performed in single-bunch mode to eliminate multi-bunch effects and obtain a cleaner tune spectrum.

The measured tune changes and the set values in the tune knob are plotted in Fig. 8. The residual tune variations (\(\Delta \nu _{\mathrm {meas}}-\Delta \nu _{\mathrm {set}}\)) are also shown in the figure. When adjusting the tune in one plane, the adjusted tune changes linearly with respect to the set value, and the tune in the other plane remains unchanged. The measured and set tune changes are fitted by linear relations as

$$\begin{aligned} \begin{aligned} \Delta \nu _{{\rm x},{\mathrm {meas}}}&=0.9723\Delta \nu _{{\rm x},{\mathrm {set}}} +1.7\times 10^{-4}\\ \Delta \nu _{{\rm y},{\mathrm {meas}}}&=0.9721\Delta \nu _{{\rm y},{\mathrm {set}}} +3.7\times 10^{-4}. \end{aligned} \end{aligned}$$
(8)

The fitted linear coefficients of the adjusted tunes are not equal to one. One reason is the difference between a real storage ring and its model. Another factor comes from the hysteresis effect of the quadrupoles [17]. During tune adjustment, some of the quadrupole strengths increase and some decrease. The decreasing strengths go along a minor hysteresis loop, whereas the increasing strengths go along the main hysteresis curve. The different trend of decreasing quadrupole strengths leads to a deviation of quadrupole adjustment. To make the tune knob more accurate, a calibration is needed.

Fig. 8
figure 8

(Color online) The relation between the measured and set values of tune adjustment: a \(\nu _{\rm x}\) is adjusted and \(\nu _{\rm y}\) is set to remain unchanged; b \(\nu _{\rm y}\) is adjusted and \(\nu _{\rm x}\) is set to remain unchanged. The horizontal axes denote the tune adjustment set value and the vertical axes denote the measured value. The measured tune changes are fitted as linear functions of the set values. The largest residual tune variation is around \(3\times 10^{-3}\)

4.2 Tune knob calibration

The tune knob calibration is performed by modifying the set value of tune adjustment to make the real tune change closer to the target value. This is realized by resetting the tune adjustment to

$$\begin{aligned} \Delta \nu _{{\rm x},{\mathrm {calib}}}=\frac{\Delta \nu _{{\rm x},{\mathrm {set}}}}{0.9723}, \quad \Delta \nu _{{\rm y},{\mathrm {calib}}}=\frac{\Delta \nu _{{\rm y},{\mathrm {set}}}}{0.9721} \end{aligned}$$
(9)

according to the fitted linear coefficients in Eq. (8). \(\Delta \nu _{{\rm x(y)},{\text {set}}}\) is the designated tune adjustment and \(\Delta \nu _\text{x(y),calib}\) is the calibrated value set to the machine. After calibration, the tune knob is measured under the same condition as before. The relations between the measured tune changes and set values become

$$\begin{aligned} \begin{aligned} \Delta \nu _{{\rm x},{\mathrm {meas}}}&=0.9981\Delta \nu _{{\rm x},{\mathrm {set}}} +1.6\times 10^{-4},\\ \Delta \nu _{{\rm y},{\mathrm {meas}}}&=0.9994\Delta \nu _{{\rm y},{\mathrm {set}}} +3.7\times 10^{-4}. \end{aligned} \end{aligned}$$
(10)

The linear coefficients get closer to one than before, showing that the tune knob becomes more precise after calibration.

The residual tune variation (\(\Delta \nu _{\text {meas}}-\Delta \nu _{\text {set}}\)) is plotted in Fig. 9. The result shows that the maximum residual tune variation is approximately \(1.5\times 10^{-3}\), which is smaller than that before calibration. The tune knob after calibration meets the requirements for tune compensation and machine studies.

Fig. 9
figure 9

(Color online) The residual tune variations after tune knob calibration: a \(\nu _{\rm x}\) is adjusted and \(\nu _{\rm y}\) remains unchanged; b \(\nu _{\rm y}\) is adjusted and \(\nu _{\rm x}\) remains unchanged. The largest tune variation is approximately \(1.5\times 10^3\), smaller than before calibration

5 Coupling measurement for the HLS-II storage ring

The tune knob is a useful tool for machine studies. In the HLS-II storage ring, the betatron coupling is measured using the tune knob. The coupling coefficient C is used to evaluate the betatron coupling effects of a storage ring [18, 19]. When measuring the coupling coefficient, the betatron tunes are adjusted across a difference resonance line \(Q_{\rm x}-Q_{\rm y}=l\), where \(Q_{\rm x}\) and \(Q_{\rm y}\) are the horizontal and vertical tunes, respectively, and l is an integer. For a storage ring, the measured tunes are the eigen-tunes \(\nu _+\) and \(\nu _-\) expressed by [20, 21]

$$\begin{aligned} \nu _\pm =\frac{1}{2}\left( \nu _{\rm x}+\nu _{\rm y}\pm \sqrt{\Delta ^2+|C|^2}\right) , \end{aligned}$$
(11)

where \(\nu _{\rm x}\) and \(\nu _{\rm y}\) are the free tunes without coupling, \(\Delta =|\nu _{\rm x}-\nu _{\rm y}|\) is their difference, and |C| is the coupling coefficient. When the tunes are away from the difference resonance, the measured eigen-tunes are close to the uncoupled tunes. If the tune is near the difference resonance, the measured eigen-tunes become \(\nu _\pm =\nu _\text{x,y}\pm 1/2|C|\), and the coupling coefficient is obtained from the minimum separation between the two eigen-fractional tunes:

$$\begin{aligned} |C|=\min _{|\nu _{\rm x}-\nu _{\rm y}|\rightarrow 0}|\nu _+-\nu _-|. \end{aligned}$$
(12)
Fig. 10
figure 10

(Color online) Schematic of the betatron coupling measurement. The tune knob is used to decrease the horizontal tune near the difference resonance line with the tune set value satisfying \(\Delta =\nu _{\rm x}-\nu _{\rm y}=0.02\). The difference resonance line is crossed with a step of \(\Delta \nu _{\rm x}=-\,0.002\) by decreasing the horizontal tune. The coupling coefficient is obtained from the minimum separation of the measured eigen-tunes

For the HLS-II storage ring, the nominal tune is around \(Q_{\rm x}=4.4448\) and \(Q_{\rm y}=2.3598\). When measuring the betatron coupling, the tune knob is used to decrease the horizontal tune to cross the difference resonance line \(Q_{\rm x}-Q_{\rm y}=2\). The measured fractional eigen-tunes are plotted in Fig. 10. The coupling coefficient |C| is calculated as approximately 1.26%.

6 Summary

The development of a tune knob for the HLS-II storage ring was presented. The tune knob adopts an improved scheme based on global adjustment of quadrupole families, preserving the lattice symmetry. To reduce the impact on beam injection, the Twiss parameters of the injection section remain unchanged. This scheme is applicable for compact storage rings with small phase advances in one cell. Online measurement and calibration was also performed. To demonstrate its application as a useful machine study tool, the betatron coupling was measured using the tune knob. The tune knob works well in the designated range and fully meets the design requirements for tune compensation. The potentials of the tune knob for user operation and machine studies can be further explored in future work.