LEMing

Part 1:  What LEM does, and why

LEM stands for linac energy management. The purpose of LEM is to make sure that magnet strengths in the linac are appropriate for the beam's energy, in order to maintain a constant linac lattice in the presence of a changing energy profile.

More specifically: a magnet's optical effect on a relativistic beam is dependent on the beam's energy. For example, a higher energy beam passing through a dipole magnet experiences less bending than a lower energy beam, due to the concept of magnetic rigidity1. Similarly, a higher energy beam passing through a quadrupole has a longer focal length2. Because of this, if the energy at a given point in the linac is changed, and the magnet strengths stay the same, then the beam lattice and its optical properties will be altered.

For example, suppose that klystron 5-7 dies, and so we take it off of the beam and put klystron 6-4 on the beam to replace the lost energy. Since we swapped one klystron for another, the beam's energy should be approximately the same downstream, and any small difference is made up by a downstream energy feedback. But the beam passing through the region between 5-7 and 6-4 is now lower in energy than it was previously, and so the magnets there have a different optical effect on it. The beam therefore arrives at 6-4 in a different state, so that even after the missing energy is made up, the optical properties are likely to be different all the way down the machine. Important beam parameters such as emittance and bunch length will all be affected.

In order to counteract this undesirable effect, it is necessary to scale the magnet strengths in the linac such that the optics are preserved for the new energy profile. This is what LEM is intended for.


Part 2:  Database parameters and math

LEM depends entirely on the concept that the energy of the beam at certain points in the linac is constant, and definitively known. One such location is in the beginning of sector 2 in the linac, where the beam energy is always 1.2 GeV. We never modify the klystron compliment anywhere prior to sector 2, because the optics are crucial here, and because the energy must be correct for extraction to the damping rings.

A second example is the chicane in sector 10. Whenever the chicane is turned on, the strength of the bend magnets in the chicane are such that only a small band of energies around 9.0 GeV are able to pass through without crashing into the walls of the beampipe. For this reason, an energy feedback for each beamcode uses klystrons 9-1 and 9-2 to maintain constant energy at the chicane.

Another location where constant energy is maintained is at the end of the linac in sector 30, where it is maintained by an energy feedback (usually at 28.5 GeV; though we also sometimes run at 50 GeV).

A 'LEM group' (LEMG) is a set of database parameters that defines, among other things, what known-energy points LEM uses when that LEMG is selected. There is good help on the 'Display LEMG Params' button on the SCP that explains all of the components of a LEMG definition.

The database contains a value for every klystron in the linac of how much energy gain that individual station should contribute to a beam, if it is active on that beam. This value, known as ENLD (or "E no load") is measured periodically by AMRF when there is no beam in the machine. If this measurement system were perfect, LEM would be unnecessary:  by summing the energy gains of every klystron active on the beam up to a point, one would know the exact beam energy at that point, and could then scale the magnet strength there accordingly. For example, from the beginning of sector 2 to the chicane, the total energy gain should be 7.8 GeV.

Unfortunately, there is always some discrepancy between the calculated sum and the known actual energy gain. Typically, the sum comes out to a greater value than it should. One reason for this is that the ENLD measurement assumes that the klystron is perfectly forward-phased. In reality, many of the klystrons are likely to be somewhat misphased and thus contributing less than their maximum possible energy to the beam3.

In some cases, specific klystrons or entire sectors may also be intentionally misphased (e.g., for BNS damping). Users can configure a given LEMG to take klystron or subbooster phase values into account, or not, using the Energy Options panel. However, LEM does not have any way of knowing which klystrons or subboosters are unintentionally misphased, or by how much. So here LEM takes a shortcut:  it simply takes the difference between the calculated value and the known value, from beginning to end of a known energy region, and attributes the error evenly to the participating klystrons. For instance, suppose the summed energy gain for all active klystrons between sector 2 and the chicane comes out to 8.3 GeV, 500 MeV higher than the known value. If there are 50 active klystrons in the region, LEM will lower its estimated contribution for each klystron by 10 MeV. If the LEM calculation is accepted by the user, then the new corrected energy value for each klystron is stored in the database as EMOD4.

The more known-energy locations that the LEMG is given, the less margin of error this method contributes. Suppose we are using a LEMG that uses the three known energy locations that are listed as examples above. This divides the machine into two regions over which LEM can calculate and distribute the energy error:  from sector 2 up to the chicane, and from the chicane up to sector 30. The known energy value at the end of each region is given by the database parameter EEND. The summed energy gain that we expect to see from all active klystrons in that region, scaled by any additional factors such as subbooster phase that may be selected on the Energy Options panel, is called ESUM. From these two values, LEM determines the scaling factor that is needed to change magnet strengths in the region such that the energy error is distributed evenly across the region. This scaling factor is known as the "fudge factor":

FUDG = EEND / ESUM

The expected energy of a beam arriving at a given magnet in the linac is stored in the database as EMAG. EMAG is the summed ENLD values up to that point, with any selected Energy Options factored in. LEM then uses the fudge factor to determine a calculated "actual" beam energy for each magnet:

EACT = EMAG x FUDG

If the user accepts the new LEM calculation by pressing the Scale and Trim Magnets button, LEM then adjusts the BDES value of each quadrupole and corrector magnet to maintain the desired beam lattice in light of this new energy profile. A trim request is then sent to the relevant micros to implement the change. The new BDES values are calculated as

BDESnew = (EACT / EMOD) x BDESold

where EMOD is the energy value at that magnet location that was stored in the database last time a LEM was calculated and accepted. Once the magnet BDES changes are implemented, the EACT for each magnet becomes its new EMOD value in the database5.


Part 3:  Displays

model verify display


Footnotes:

1.  For more details on these concepts, see the What is meant by BACT? document.

2.  Same as above.

3.  For more information on klystron phasing, see the Phasing Klystrons and Subboosters document.

4.  The last accepted EMOD for a klystron can be seen in that klystron's Single Unit Display, in units of GeV.

5.  The EMOD value for any magnet can be seen in that magnet's Single Unit Display, in units of GeV.


Maintained by Robin Gold.   Please contact me with any corrections or additional information.
Last modified 11/06/06.