Closed Orbit Correction in CELSIUS
K.J. Gajewski and V. Ziemann
The Svedberg Laboratory, Uppsala University, Box 533, 751 21 Uppsala, Sweden
Abstract
CELSIUS is a storage ring for intermediate energy
nuclear and particle physics. The ring consists of four 90°
arcs and four straight sections and has a circumference of81 m. The closed orbit is measured by a Beam Position
Monitor (BPM) system at 10 positions in the ring and thedata is fed into the orbit correction program. A measured
response matrix is used for calculating the requiredchanges of correctors' currents (up to 12 in the horizontal
plane and up to 8 in the vertical plane). The singular value
decomposition (SVD) algorithm is used for finding thebest solution in the sense of minimizing the corrector
excitation or minimizing the mean square error. The BPM
hardware layout and the main features of the orbit
correction program are presented. automatic correction
procedure for the development of acceleration cycles isoutlined.
1 Introduction
Delivering the accelerated beams to the users is a twostep process:• storing the beam in the ring
• creation of the acceleration cycleIn the first phase all magnet power supplies are static andthe orbit correction is done by applying the calculated set
values to the correctors. On the other hand during theacceleration cycle the power supplies are no longer
controlled directly from the control system but from theautonomous function generators. The tables modified in
one cycle will be executed in the following cycle. Due tothe fact that CELSIUS main dipoles are solid-core magnets
the eddy currents prevent us to do quick ramping.
Therefore the operational cycles in CELSIUS are between
90 and 300 seconds long. A typical cycle has an 8 s longflat bottom at which injection takes place, 22 s acceleration
ramp, 60 - 240 s flat top and 30 s ramp to the flat bottom.
The change of the closed orbit due to the changes ofcorrectors can be described by a system of linear equations[dx] = [A] · [dI](1)

where:[dx] - vector of closed orbit changes at given positionsin the ring (M)[A] - response matrix (M x N)
[dI] - vector of corrector magnet changes (N)Correcting the orbit requires finding corrector excitations
that minimize the difference of measured BPM positions totheir desired values. In this process the matrix [A] needs tobe inverted (in the least squares sense). Even thoughnormally the system of equations is over-determined, badly
placed BPMs or correctors may cause [A] to be nearly

degenerate, which is the case for the vertical orbit
correction in CELSIUS. In order to overcome this problem
we utilize Singular Value Decomposition (SVD), a method
used for the SLC final focus [1].
1.1 Singular value decomposition (SVD)The SVD method [2] is based on the following theoremof linear algebra:
Any M x N matrix [A] whose number of rows M isgreater than or equal to its number of columns N, canbe written as the product of an M x N columnorthogonal matrix [U], an N x N diagonal matrix [W]with positive or zero elements, and the transpose of anN x N orthogonal matrix [V]
and[A] = [U] · [W] · [V]T

(2)

[U]T · [U] = [V]T · [V] = [1].

(3)

The decomposition (2) can always be done, no matter
how singular the matrix is. If the matrix [A] is square, then[U], [V] and [W] are all square matrices of the same size.
Since [U] and [V] are orthogonal, and [W] is diagonal theinverse of [A] is[A]-1 = [V] · [diag (1/wj)] · [U]T(4)The solution of (1) can be written as[dI] = [A]-1 · [dx] = [V] · [diag (1/wj)] · [U]T · [dx] (5)By zeroing those 1/wj for which wj is small, we canimprove the solution (5) in a sense that we throw away
linear combination of the set of equations (the one which“pulls” the solution vector towards big values) and find thesolution which minimizes the sum of (dIj)2. It can beproved that using equation (5) for overdetermined set ofequations we find the solution that minimizes| [A] · [dI] - [dx] |(6)i.e. solves the linear least-squares problem.
Using the SVD algorithm we can easily find the solutionof (1) which minimizes the weighted error χ2χ2 = Σ ((dxi - Ai · [dI])) / δi)2 (i=1,...M) (7)By dividing each element of the i-th row of the response
matrix Ai by δi and by substituting the dxi in equation (1)with (dxi/δi) we reduce the problem to the “standard” leastsquares case.
2 Hardware
The hardware used for the closed orbit measurements is
schematically shown in fig. 1.
The signals from the electrostatic pickups mounted in thering are amplified, the sum and delta signals are created foreach pickup and these signals are fed into a multiplexer(MUX). The output from the MUX is then used by thebeam position detector (BPM) which produces a signal
proportional to the closed orbit deviation from the center ofthe vacuum chamber. The position signal is digitized by a
12 bit ADC. The ADC and MUX are controlled by amicroprocessor in a G64 crate. The microprocessor issynchronized with the acceleration cycle by an external
pulse from the timing system. The BPM system can workin two modes:• asynchronous mode in which the beam positions aremeasured all the time
• synchronous mode in which every measurement istaken at a well known moment in the acceleration
cycleThe input channel of the multiplexer is changed every 50ms, thus a full scan for 20 pickups takes one second. The
closed orbit correction program can compensate for thetime delay between the measurements from different
pickups in the ring.
The BPM controller is connected to the control system
via an RS-232 serial line. A simple communication
protocol on this link supports the mode selection,
specification of the times when the data is taken andmeasurement data transfer from the BPM to the controlsystem.
Cycle start

PU 1H

PU 1V

G64µP
RS-232MUXBPM

3.2 Orbit correction
From the operators point of view the purpose of the orbit
correction program is a change of the closed orbit (relativemode) by a specified amount or to set the orbit to a given
position (absolute mode). In the latter case the program
needs to read the current beam position and calculaterequired changes in the closed orbit in order to find thenecessary changes of the correctors. The programs use theSVD method to find the solution of the system ofequations (1). The threshold for substituting 1/wj with 0(SVD cut-off) in the equation (5) is set to 10-4 but can bechanged by the operator.
The main features of the programs (static and dynamic)are:• “relative” and “absolute” modes are available• possibility to select which correctors to use

PU 2H

PU 2V

changes a given corrector in CELSIUS and observes thechanges of the closed orbit. After making several changes(typically data is taken for 3 different corrector settings)
one column of the response matrix [A] in equation (1) iscalculated. The procedure is repeated for every corrector
used for the closed orbit correction (12 horizontal + 8vertical). The result is saved in a format that can bedirectly used by the closed orbit correction programs.
A new response matrix needs to be measured only aftersome changes of the characteristics of the corrector
magnets or change of the working point of CELSIUS.
Typically the process of obtaining a new response matrix
takes about 5 minutes. Additional time is needed forchecking the possible range of correctors changes forwhich the beam’s position readouts are reliable.

ADC···• possibility to select positions at which the orbit should
be corrected• different weight can be applied to each corrector

I/O

PU 8H

PU 8V

• possibility to define the weights which describe how
well the orbit should be corrected are specific places(δi in equation (7))• maximum allowed correction can be set

Figure 1 Beam position monitor hardware
3 Software
There are two groups of programs dealing with the closed
orbit correction:• programs for obtaining the response matrices• programs for the orbit correction
3.1 Measurement of the response matrix
A special program has been written in order to quickly
get the response matrix used by the static and dynamic
closed orbit correction programs. The program can be used
after storing the beam in CELSIUS with enough intensity
to get valid data from the BPM system. The program

3.2.1 Static correction
There are two flavours of the program: one which has agraphical user interface and the operator can change theclosed orbit using the sliders and another which sets theclosed orbit to a specified position. The first program canbe used as a quick try and error tool whereas the latter isbest suited for setting the closed orbit to beforehand known
position. The program can be set up to achieve therequested orbit in a given number of iterations. Usually,
during iterations, only a fraction of the calculated corrector
changes (for example 50%) is applied in order to improvestability.
3.2.2 Dynamic correction
The dynamic closed orbit correction program xdyncor isused when the acceleration cycle is developed. The

calculation engine is the same, and the same response
matrix is used as in the case of static correction. The
corrections are scaled with the main magnetic field whichis calculated from the main dipole current using a 3rd orderpolynomial. The corrections are calculated only at thetimes of the vector ends. The beam positions are measured
synchronously with the cycle and there is one sample persecond from each of the 20 pickups. Due to the fact thatthe input to the BPM detector is multiplexed, the positions
at all pickups are not measured at the same time. The
program, however, can compensate for it by using
interpolated values. Such interpolation is justified at theflat top when the changes in the closed orbit are slow
whereas it is not always appropriate for the corrections
during the acceleration ramp. An example of traces fromthe BPM system is shown in fig. 2 (acceleration ramp from
8 to 30 s).

These times must lie in the period when valid BPM data isavailable. It is possible to keep the last applied correction
also for a specified time outside the current correction
window. As the development of the acceleration cycle
proceeds, and the beam survives longer, the time of the lastcorrection is moved towards the end of the cycle. As soon
as BPM data is available for the whole acceleration cycle,
the final adjustments can be done in an iterative manner.
We also included a "stickiness parameter" s in the
dynamic orbit correction program that prevents thecorrector values from deviating too much from theprevious values. It is implemented by generalizing the leastsquares problem to minimizing
χg2 = χ2 + Σ ((dIj[t] - dIj[t-1]) / s) 2(j =1,...N)

where χ is defined by equation (7).
2This feature has, however, not been tested yet.
4 Conclusion
The closed orbit correction programs used previously atCELSIUS used a Gauss-Jordan elimination method forsolving the system of equations (1). It worked reasonably
well for horizontal corrections but very poorly for vertical.
The use of the SVD algorithm improved the situation a lot
and made the correction programs much more robust andflexible.
Acknowledgments
We would like to thank Dag Reistad for his good advice
and interesting ideas on how the make the programs more
intelligent and easy to use.
References

Figure 2 BPM traces
While developing the acceleration cycle the operator
specifies the time when the correction should start and end.

[1] V. Ziemann, Corrector Ironing in the SLC FinalFocus, presented at the 1993 Particle Accelerator
Conference, Washington, DC, 1993, p. 498.
[2] Numerical Recipes in FORTRAN: the art of scientificcomputing, William H. Press, et al., 2nd ed.,Cambridge University Press.