Betatron phase and coupling measurements at the Cornell Electron / Positron Storage Ring

Errors in the lattice parameters of a storage ring can come from many sources. For example, the calibration constants used to set quadrupole magnets may be inaccurate, the orbit may pass through the sextupoles off center, or there may be unsuspected quadrupole fields associated with machine elements. To verify that a design lattice has actually been implemented correctly, one or more selected lattice functions must be measured around the ring to be compared with the expected values. At CESR, the Cornell Electron/Positron Storage Ring, exploiting the fact that the quadrupole magnets are individually controlled, one method that has been used is to measure the tune Q as a function of quadrupole strength k. The Twiss parameters bh and by at the quadrupole are then obtained from the standard formula [1]


I. INTRODUCTION
Errors in the lattice parameters of a storage ring can come from many sources.For example, the calibration constants used to set quadrupole magnets may be inaccurate, the orbit may pass through the sextupoles off center, or there may be unsuspected quadrupole fields associated with machine elements.To verify that a design lattice has actually been implemented correctly, one or more selected lattice functions must be measured around the ring to be compared with the expected values.At CESR, the Cornell Electron/Positron Storage Ring, exploiting the fact that the quadrupole magnets are individually controlled, one method that has been used is to measure the tune Q as a function of quadrupole strength k.The Twiss parameters b h and b y at the quadrupole are then obtained from the standard formula [1] dQ h,y b h,y 4p dk l , where l is the length of the quadrupole.This procedure has several disadvantages.It perturbs the quadrupoles, and thus hysteresis must be accounted for; also, the permissible tune excursion may be limited if the operating point falls close to a destructive resonance.Since the slew rate of the quadrupole power supplies is limited, the procedure is slow: Typically it takes 30 min to make a measurement at approximately 100 quadrupoles.Finally, whenever the beam is not centered in the quadrupole under study, varying k provokes orbit distortions which in turn will cause tune shifts due to the sextupoles.An alternative approach is to shake the beam at some betatron sideband and then measure the phase of the oscillations at the beam position detectors around the ring.This yields the betatron phases f h,y at the detectors which can then be related to the beta function via [1] 1 b h,y df h,y ds . ( This technique has been used at, for example, LEP [2] and the ISP [3] where, since the ISP is a proton machine, the shaking had to be swept through resonance to avoid excessive beam blowup.At CESR, measuring the phase by this method has several advantages.It is quick, typically taking 40 s for about 100 detectors.Since the quadrupoles are not perturbed and the tune is not changed, the danger of losing the beam is minimized.Additionally, the x and y components of the oscillations at a detector can be resolved allowing for extraction of the local coupling parameters.Measuring the coupling in CESR is important to ensure that the coupling produced by the CLEO detector solenoid has been properly compensated.

II. PHASE MEASUREMENT HARDWARE
The experimental setup is shown schematically in Fig. 1.A shaker excites a beam normal mode and the oscillations of the beam are monitored via a beam position detector.The beam signal is sent through a signal processor which stretches and amplifies the signal.The detector signal is then sent to a signal analyzer which measures the phase and amplitude of the signal at the normal mode frequency.Ultimately, the data are transferred to the main computer for storage and analysis.
In actuality there are two shakers: one is used to excite the horizontal mode and the other is used to excite the vertical mode of the beam (for simplicity only one shaker is shown in the figure).A shaker excites the beam at a betatron sideband v s , where v b is the betatron frequency, v 0 is the revolution frequency, and p is an integer.For practical reasons, the shaker is limited to operate in the band jv s j # v 0 ͞2.The shaker driver issues a reference signal in the form of a square wave at the betatron frequency.This is used as the reference for phase measurement of the detector signals.
The shaker driver is phase locked to the beam motion to ensure that the shaker frequency is maintained on the resonance peak.This is necessary since the betatron tunes drift due to magnet regulation noise.If the shaking frequency were held fixed, the tune variation would translate directly into phase error between the beam motion and the reference signal.
The signal processor shown in Fig. 1 is one of six, equally spaced around the ring.Any of the four buttons of any beam detector can be connected to the nearest signal processor by a network of relays.Any signal processor, in turn, can be switched into one of two semicircumferential trunk cables that terminate at the control room.Since there are two trunk cables, two buttons may be observed simultaneously, provided that they are on opposite sides of the ring.Each signal processor has a p-i-n-diode attenuator, followed by a chain of switchable fixed attenuators and amplifiers for range selection.After this there is a diode pulse stretcher which delivers pulses suitable for transmission down the long cable to the control room.The p-i-n-diode attenuator is used to implement an automatic gain control (AGC) circuit that maintains the pulse stretcher at a level of maximum sensitivity.This is necessary because the signal levels from individual detector buttons vary substantially due to optics, detector geometry, and cable attenuation.
A block diagram of the signal analyzer is shown in Fig. 2. The signal analyzer consists of a pair of digitizing front ends to receive the beam signals from the two trunk cables and a betatron phase reconstructor and digital signal processor (DSP) for each of the two beam modes.Thus, the systems for the horizontal and vertical normal modes are independent except that they both receive digital data from the same detector buttons simultaneously.For simplicity, only the diagram for one normal mode is shown in the figure .The digitizing front ends are similar to those used in the CESR feedback system [4].They remove the dc signal component at the analog level and issue a 10 bit digital signal with average value zero.Thus, the dynamic range of the subsequent DSP is not reduced by dc offsets.
The betatron phase reconstructor is a wide-range phaselocked loop circuit that multiplies the frequency of the betatron phase reference signal by 512.This provides a clock for the digital generation of high-resolution sine and cosine functions for Fourier analysis.The phaselocked loop includes a modulo-512 counter which gives a 9 bit representation of the instantaneous betatron phase.
The system is built to monitor betatron frequencies up to v 0 ͞2 2p 3 195 kHz.This requires the phase reconstructor to have a maximum oscillator frequency of 99.8 MHz (512 3 195 kHz).The frequency multiplier applies the method developed for the CESR timing system [5] to achieve a low level of subharmonic distortion.The phase noise of the multiplied betatron clock is approximately 1 mrad at the betatron frequency.
The DSP is an integrator that computes the sine and cosine Fourier components of the signal: It consists of a latch that samples the reference digital betatron phase on each turn, a short first-in first-out (FIFO) memory that delays the phase sample so that it is synchronous with the arrival of the detector data, lookup tables that give the sine and cosine functions of the phase to 16 bits, a pair of 10 3 16 bit multipliers that mix the sine and cosine functions with the input data, and a pair of 40 bit accumulators.The sample time of the latch is obtained from the CESR master timing system and is fixed, independent of the detector being monitored.end of a measurement, the accumulators contain the sine and cosine Fourier components of the signal with unknown normalization.
The FIFO delay memory for the phase sample is necessary because the phase sample and the beam data must be presented to the multiplier simultaneously, and, from detector to detector, the delay time for the detector signal to reach the signal analyzer varies by more than the revolution time T 0 (2.56 ms).The signal from each detector on a given turn must be multiplied by the same reference sample as all the other signals from the other detectors.That is, the delay is, up to an additive constant, the time it takes the beam to go from s 0 to the detector plus the time the signal takes to go from the detector to the signal analyzer.This delay has been measured for each detector and is loaded from a lookup table at the time of measurement.The FIFO memory needs only to be two words deep to accommodate the range of effective delays in CESR.In essence, the lookup table defines the location s 0 where the measured phase will undergo a discontinuity equal to the fractional tune.
Each DSP is implemented with a programmable logic array.The array used has approximately 1700 logic cells and is capable of synchronous computation at frequencies in excess of 100 MHz.The array also contains randomaccess memory, which can be automatically initialized to provide the sinusoidal lookup tables.The multiplieraccumulator blocks complete an accumulation cycle in approximately 100 ns, and so several detector buttons can be integrated simultaneously by time multiplexing of the DSP.
The high speed and logic capacity of the programmable logic device used provides two advantages in performance: The betatron phases can be reconstructed at high resolution, and a narrow filtering bandwidth can easily be achieved.The use of high resolution sinusoidal functions in the integrand means that harmonics of the betatron signal are effectively rejected.Therefore, the measurement is insensitive to nonlinearities in the beam motion, the detector button response, or the pulse stretching electronics.This allows the use of larger shaking amplitudes without loss of accuracy, with a resulting improvement in signal-to-noise ratio.
If the DSP is treated conceptually as a filter, the bandwidth of the filter is inversely proportional to the number of samples accumulated.This bandwidth determines the ability of the analyzer to reject random instrumental noise and to separate the horizontal and vertical modes of the beam.With data being taken once per revolution, and with a revolution frequency of 390 kHz, the filter bandwidth is about 20 Hz (ഠ390 kHz͞16 3 10 3 ).With this level of filtering, the measurement can be done on both horizontal and vertical modes simultaneously since the tunes of the two modes are typically 10 kHz or more apart and therefore there is negligible interference.With 16 k samples, the minimum measurement time is 41 ms (16 k 3 T 0 ).In practice, taking into account relay settling time, a single measurement for a given beam button takes around 200 ms.Since each detector has four buttons it takes 800 ms to make a measurement on a single detector.The signal analyzer takes simultaneous measurements on two detectors.Thus, the time needed to read 100 detectors is about 40 s.

III. PHASE DATA PROCESSING
The oscillations due to the shaker are observed at the detectors around the ring.The phase u͑i͒ of the beam signal at the ith detector relative to the shaker reference signal gives the betatron phase f i at the detector: where m i is an integer to correct for the fact that phases are always measured modulo 2p and u a is a constant, independent of the detector being used, that accounts for phase shifts in any filters, etc.For CESR, phase differences between the measured and the theoretical are always well under p.Thus m i is simply chosen to be zero for one arbitrary detector and the m i for all the other detectors are calculated so that the measured phase differences most closely match the theoretical ones.u a is then chosen so that the average difference over all the detectors between the measured and theoretical phase is zero.
If the tune Q falls above the half-integer, the betatron sideband that falls within the shaker range of jv s j , v 0 ͞2 will have a negative frequency [for example, in Eq. ( 3) with Q 10.6, we need p 211 to get v s 20.4v 0 ].In this case, the measured u has a reversed sign from the true u since any measurement apparatus calculates phase under the assumption that its input frequencies are positive.Consequently, the sign of the measured u needs to be changed before applying Eq. (4).
Equation ( 4) shows an advantage of a digital system: In an analog measurement the delay time to the signal analyzer affects the measured phase as discussed in the Appendix.For a digital system the propagation delay has no effect on the measured phase, up to the point where the data synchrony with the reference sample is lost.In that case, the data samples are multiplied by the wrong reference sample and the computed phase makes a jump equal to the fractional tune.
Each detector in CESR consists of four button electrodes labeled 1 through 4 as shown in Fig. 3.For the horizontal mode the overall phase u h is obtained from an appropriate average of the phases from the individual button signals A h e iu h e iu 4,h 1 e iu 2,h 2 e iu 3,h 2 e iu 1,h , where the u i,h are the phases from the analyzer system monitoring the horizontal betatron frequency and A h is some real number whose value is not important.For the vertical, the appropriate average is A y e iuy e iu4,y 1 e iu3,y 2 e iu2,y 2 e iu1,y .Because of the symmetry, any coupling will not alter the computed value for the overall phases.This is strictly true only when the beam is centered between the buttons.However, even when the beam is moderately off center there is still good cancellation of the phase shifts of the individual button signals.This is important since the phase shift at the individual buttons due to coupling can easily be more than the phase deviations from the theoretical that need to be measured.In actuality, because of solenoids, skew quadrupoles, etc., oscillations of the horizontal and vertical modes will not be strictly in the x and y planes, respectively.This coupling can be parametrized using the C matrix [6,7].Assuming weak coupling, the motion of the horizontal normal mode at a detector is given by where A x is the overall amplitude, b x and b y are the beta functions, v x is the normal mode tune, and n is the turn number.From Eq. ( 7) it is seen that C 22 is the normalized amplitude of the vertical component of the motion that is in phase with the horizontal motion and C 12 is the normalized amplitude of the out-of-phase component of the vertical component of the motion.For the vertical normal mode C 11 gives the in-phase component of the horizontal component and C 12 gives the out-of-phase component: The C ij are a measure of the coupling with C ij ϳ 1 corresponding to full coupling.C 11 , C 12 , and C 22 are calculated from the measurements using Eqs.( 7) and ( 8).C 21 is not directly measurable here.It could be measured if the transverse momentum, x 0 and y 0 , were measurable.Experimentally, the C 12 data are found to have a better signal-to-noise ratio than the C 11 or C 22 data.This is due to the fact that any cross talk from the reference signal into the beam signal will tend to pollute the in-phase component but not the out-of-phase component.Also, any twisting of the beam pipe will result in changes in the in-phase C 11 and C 22 components but not in C 12 .
In theory b can be extracted from the measured amplitude.In practice, this is not done since the noise in the measurement makes the phase data much more reliable than the amplitude data.Instead, b is computed from the phase data by rewriting Eq. ( 2), where b b and f b are the beta function and phase obtained from some base line lattice (typically the design HEP optics) and db and df are the variations of the measured values from the base line.Equation ( 9) is evaluated by fitting the curve of df verses f b using a quasi-Hermite nonsmoothing cubic spline developed by Akima [8].The spline fit is easily differentiated to give db at any point.This procedure for finding db is valid as long as the coupling is not significant (jCj & 0.1) since with strong coupling Eq. ( 2) is not valid.An example of a b computation is shown in Fig. 4. Figure 4(a) shows df as a function of detector index.For purposes of illustration the "data" in this case are calculated from a model lattice in which one quad was adjusted to be different from the base line lattice.For simplicity, only the results of one plane are shown.Figure 4(b) shows the exact db͞b as computed from the model and base lattices.Figure 4(c) shows db͞b as calculated from Eq. ( 9) and a spline fit to the data in Fig. 4(a).Figure 4(d) shows the difference between Figs. 4(b) and 4(c).As seen from 4(d), the spline fit generally gives good results despite the fact that Eq. ( 9) is valid only to first order in the deviations while the peak db͞b in this example is around 70%.The points where the fit is poor are at places where the change in f b between detectors is too large so that the spline fit gives a poor interpolation for df.Another source of error manifests itself where the change in f b between data points is of the order of the uncertainty in the measured phase.In this case the differentiation [Eq.( 9)] will be inaccurate.A good solution here is to eliminate all but one of any group of data points whose phase differences are too small before doing the fit.

IV. CORRECTING THE TWISS PARAMETERS
At CESR the capacity to control quadrupole magnets individually allows for the correction of quadrupole errors.Once the phase and coupling have been measured, any variation between the data and design values can be compensated (at least in part) by changing quadrupole strengths k and/or quadrupole rotation angles u q .This is similar to using steering correctors to flatten the orbit.To do this one starts with a model lattice with adjustable quadrupole strengths and rotation angles.The aim is to find the set of k's and u q 's such that the f and C as calculated from the model most nearly match the measured values.The correction is then applied by varying the k's and u q 's of the actual quadrupoles by the difference between the k's and u q 's of the model fit and the design lattice.
Nonlinearities generally preclude a simple matrix inversion approach.At CESR good results have been obtained using the subroutine FRPRMN from Ref. [9], which is an implementation of Fletcher-Reeves-Polak-Ribiere minimization.The "merit" function M to be minimized is taken to be Here f x,m , f y,m , and C 12,m refer to the measured phases and coupling and k m and u qm refer to the values of the quadrupole strengths and rotation angles determined at the time of the measurement.f x,f , f y,f , and C 12,f in Eq. ( 10) are the phases and coupling as calculated from the fit model, and k f and u qf refer to the quadrupole and rotation angles of the fit model lattice.Only the C 12 component of C is used in the fit because of the larger noise seen in the other two measured components.The last two terms in Eq. ( 10) are present to keep the minimization algorithm from "walking," that is, finding a minimum solution that is far from the correct solution due to inaccuracies in the data and/or any degeneracies or near degeneracies in the problem.The constants k f , k c , k k , and k u give different weights to the different terms.In practice it is found that keeping k k and k u as small as possible, without having the solution walk, works best.Figures 5 and 6 show an example of a correction.Figure 5 shows the initial measurement after the quadrupoles had been adjusted to correspond to a newly designed lattice.Figures 5(a quadrupole strengths and tilts and the calibration constants for these strengths and tilts.For CESR, small inaccuracies in the calibrations can lead to large errors in the lattice parameters especially in the horizontal plane since the horizontal tune is near the half-integer resonance.As can be seen from Fig. 5, the maximum b error is greater than 100%.In this case, for purposes of illustration, b was not calculated via a spline fit but rather by using the fitted model lattice discussed above.The advantage of using the model fit over the spline fit is that the model fit does not have the drawbacks of the spline fit as discussed above.The disadvantage of using the model fit is that, being computationally intensive, it takes longer than the spline fit.Another disadvantage is that if the b errors are due to sources other than errors of the quadrupole settings, then the model may give a poor fit and hence the computed b may be inaccurate. Since the theoretical design lattice has been optimized to give optimum machine performance (in terms of maximal dynamic aperture, maximal luminosity, etc.), the large deviations of the measured lattice functions from the design, as shown in Fig. 5, would lead to a significant degradation in performance.Hence the need for a correction.After fitting the data using the model lattice, since the fitted k j 's and u j 's are (presumably) equal to the actual k j 's and u j 's present in the ring, the correction is made by adjusting the quadrupole strengths and rotation angles by an amount D design 2 fit. Figure 6 shows the deviations of the measured lattice parameters from the design after four rounds of measuring and correcting the optics, with each round of corrections taking about 5 min.For all intents and purposes, the errors in the lattice parameters are now negligible.For CESR, with the C 12 error being 0.01 rms as shown in the figure, the coupling will not have any significant effect on the luminosity [10].The correction has reduced the phase error to 1 ± rms, and the b error is 2% rms.Successive measurements show that the reproducibility of the phase data is 0.05 ± , while the C 12 data are reproducible to 0.002.FIG. 6. Measurement after correcting the phase and coupling errors.This is to be compared to Fig. 5. Notice that the scales for all the graphs have been reduced.

V. CONCLUSION
Measuring the phase advance of coherent betatron oscillations has proved to be a rapid and accurate method for determining and then correcting errors in the implementation of a desired lattice in CESR.It also measures the local coupling parameters around the ring, thus helping with solenoid compensation, quadrupole rotations, and skew-quadrupole corrections.
An important advantage of measuring betatron phase over measuring b is that it is sensitive to variations in the phase between widely separated points.This can be important for closure of bumps.Additionally, CESR is intended to be east/west symmetric, with this symmetry causing the strengths of some resonances to vanish.Since phase errors can break this symmetry, it is important to measure the phase and correct it accurately.
A possible disadvantage of the phase measurement is its insensitivity to b in regions of large b (and hence small phase advance).However, since large b x is usually accompanied by small b y (and vice versa), this has not proved to be a significant limitation in CESR.Another advantage of the phase measurement is that it can be used when there are significant orbit displacements.For CESR, in normal operation, a "pretzeled" orbit is used so that multiple bunches of electrons and positrons can share the same beam pipe and it is useful to be able to measure the Twiss parameters under actual operating conditions.
The 40 bit accumulators allow the summing of 16 k beam samples without overflow.At the 092801

FIG. 4 .
FIG. 4. Example db͞b calculation from the phase data.The horizontal scale for the phase data is the beam detector index while for the b data the horizontal scale is the quadrupole index.(a) Phase difference between a model lattice and a base line lattice.( b) Exact db͞b as calculated from the model and base line lattices.(c) db͞b as calculated from a spline fit of (a).(d) Difference between (b) and (c).
) and 5(b) show the deviation of the measured phase from the design, Fig. 5(c) shows the deviation of C 12 , and Figs.5(d) and 5(e) show the deviation of beta.The quadrupoles were set based upon the design

FIG. 5 .
FIG. 5. Initial measurement of phase and coupling before correcting.All graphs show the differences between measurement and design.The horizontal scale for the phase and C 12 data is the beam detector index, while for the b data it is the quadrupole index.(a) and (b) horizontal and vertical phase differences.(c) C 12 difference.By design, the design C 12 is zero except within the "coupling bump" near the interaction region which compensates the coupling of the CLEO detector solenoid.(d) and (e) are the b difference.

Delay Control 10 Detector Signal Latch Register Sin Lookup Sin Out Cos Out 16k turns Gate Accum + Accum Digitizing Front-end Betatron Phase Reconstructor Digital Signal Processor FIG
. 2. Signal analyzer block diagram.Shown is the diagram for one normal mode (1͞2 of the signal analyzer).Not shown is the time multiplexing of the digital signal processor.The numbers beside the digital signal paths indicate the number of data bits.