SLAC-PUB-12816

October 2007

# ELECTRON BUNCH LENGTH MEASURMENT FOR LCLS AT SLAC\*

M. Zelazny^\#^, S. Allison^†^, Sergei Chevtsov^‡^, P. Emma^¤^, K. D.
Kotturi^∞^, H. Loos^∆^, S. Peng^×^,\
D. Rogind^☼^, T. Straumann^◊^, SLAC, Menlo Park, California 94025,
U.S.A.

Abstract

At Stanford Linear Accelerator Center (SLAC) a Bunch Length Measurement
system has been developed to measure the length of the electron bunch
for its new Linac Coherent Light Source (LCLS). This destructive
measurement uses a transverse-mounted RF deflector (TCAV) to vertically
streak the electron beam and an image taken with an insertable screen
and a camera. The device control software was implemented with the
Experimental Physics and Industrial Control System (EPICS) toolkit. The
analysis software was implemented in Matlab™ using the EPICS/Channel
Access Interface for Scilab™ and Matlab™ (labCA). This architecture
allowed engineers and physicists to develop and integrate their control
and analysis without duplication of effort.

## Measuring the bunch length

In order to measure the bunch length for the given beam energy you need
to determine 1.) the distance the beam is deflected with respect to TCAV
phase degree and 2.) the two TCAV phase settings known as the
zero-crossings. An accurate bunch length can be calculated using these
values, along with some interesting math \[1\]. This paper will describe
how the measurements are taken from a control perspective.

### Calibration

Calibration is the process of finding the distance the beam is deflected
per TCAV phase degree. We are interested in vertical deflection because
with the TCAV activated the vertical axis becomes the time axis. While
doing this, it is useful to acquire the values of nearby Beam Position
Monitors (BPMS) for reasons listed later in this paper. The SLAC LCLS
Bunch Length Measurement Calibration Graphical User Interface (GUI)
(Figure 1), Developed with Matlab's™ Graphical User Development
Environment (GUIDE), allows the user to perform a calibration and shows
the results of the last successful calibration.

![](media/image1.png){width="2.588888888888889in"
height="3.5118055555555556in"}

Figure 1: Bunch Length Calibration GUI

The TCAV phase to beam profile monitor calibration constant is the slope
of the linear fit of the arithmetic mean of the *y* offset position of
the beam on an Optical Transition Radiation (OTR) or Yttrium Aluminum
Garnet (YAG) screen for various TCAV phases as calculated by the Matlab™
*Polyfit* function (see Figure 2). The TCAV phase to BPMS calibration
constant is calculated the same way (see Figure 3).

![](media/image2.png){width="2.3604166666666666in"
height="2.0944444444444446in"}

Figure 2: TCAV phase to screen calibration

![](media/image3.png){width="2.588888888888889in"
height="3.5118055555555556in"}

Figure 3: TCAV phase to BPMS y-position calibration

Options

The Bunch Length Measurement Options GUI (Figure 4) provides a way for
the user to select various options related to the TCAV, Toroids,
Cameras, and BPMS. More importantly, however, it provides a way for the
user to allow automatic detection of the two TCAV phase zero crossings.
To calculate the two TCAV phase zero crossings the software starts with
an initial provided guess then sends a few pulses down the LINAC while
it adjusts the TCAV phase until the selected nearby BPMS y-position
reads significantly close to zero as defined by the given options.

![](media/image4.png){width="2.588888888888889in"
height="3.5118055555555556in"}

Figure 4: Bunch Length Options GUI

### Measurement

The Bunch Length Measurement GUI (Figure 5) allows the user to request
the measurement. It provides status of the various control devices
involved as well as a running status of the current, last successful, or
last loaded measurement. A measurement consists of a number of profile
images taken with the TCAV powered off (Figure 6), and with the TCAV
powered on (Figure 7) with its phase set to the two beam zero crossings.
The application also provides a way to browse the collected images
(Figure 8) in order to remove unneeded or unwanted images. The results
(Figure 9) are then recorded in the electronic log. A temporal profile
(Figure 10) can also be calculated to compare to the requested laser
pulse length \[2\].

## Why use matlab™?

At times the physicists at SLAC specify their algorithms by providing a
Matlab™ script to the Controls Software Engineer. The algorithm is then
integrated into the SLAC Control Program (SCP) GUI framework. To do this
the engineer will implement the logic in another programming language,
FORTRAN, C, or C++. Doing this provides a common look and feel to all of
SLAC's physics applications as well as increased speed and efficiency
over Matlab™. This framework, however, has aged to the point of needing
replacement \[3\]. A new physics application framework is being
developed using Java and Eclipse technologies \[4\]. It, by design, was
not ready to deploy in time to meet schedule demands. The choice to
develop several application prototypes in Matlab™, while controversial
at times \[5\], proved effective.

![](media/image5.png){width="2.588888888888889in"
height="3.5118055555555556in"}

Figure 5: Bunch Length Measurement GUI

![](media/image6.png){width="2.9583333333333335in"
height="3.1173611111111112in"}

Figure 6: TCAV off.

![](media/image7.png){width="2.9583333333333335in"
height="3.1173611111111112in"}

Figure 7: TCAV on.

![](media/image8.png){width="2.3604166666666666in"
height="2.0944444444444446in"}

Figure 9: The Bunch Length

![](media/image9.png){width="2.89375in" height="3.186111111111111in"}

Figure 8: Image Browser

![](media/image10.png){width="2.3604166666666666in"
height="2.0944444444444446in"}

Figure 10: Temporal Profile.

## References

\[1\] P. Emma *et al*, "Bunch Length Measurements Using Transverse RF
Deflecting Structure in the SLAC LINAC," EPAC'02, Paris France, June
2002, p. 1882,
<http://accelconf.web.cern.ch/AccelConf/e02/PAPERS/THPRI097.pdf>.

\[2\] P. Emma *et al*, "Initial Commissioning Experience With The LCLS
Injector," PAC '07, Albuquerque, New Mexico, USA, June 2007, p. 1302,
<http://pac07.org/proceedings/PAPERS/TUPMS049.PDF>.

\[3\] G. White *et al,* "Operational Tools at the Stanford Linear
Accelerator Center," ICALEPCS '07, Knoxville, Tennessee, USA, October
2007.

\[4\] Chungming Paul Chu *et al*, "High-level Application Framework for
LCLS," ICALEPCS '07, Knoxville, Tennessee, USA, October 2007.

\[5\] S. Chevtsov *et a*, "Scripting vs Programming: An Application
Developer\'s Perspective," ICALEPCS '07, Knoxville, Tennessee, USA,
October 2007.