MATLAB Scripts for RF Commissioning at the LANSCE LINAC*
Sungil Kwon†, A. Archuleta, L. Castellano, C. Marchwinski, M. Prokop, P. Van Rooy, P. Torrez
Los Alamos National Laboratory, Los Alamos, NM, USA
Abstract
The linear accelerator (LINAC) at the Los Alamos Neu-
tron Science Center (LANSCE) consists of Pre-buncher,
Main-Buncher, low-energy beam transport (LEBT), four
201.25-MHz Drift Tube Linacs (DTLs) and forty-four
805-MHz Coupled Cavity Linacs (CCLs). As a part of
the upcoming LANSCE Modernization project, low-level
RF (LLRF) systems of four 201-MHz DTLs and twenty-
six 805-MHz SCLs have been digitized. Hence the net-
work-based control of the cavity field and RF commis-
sioning are possible. Each LLRF and high-power RF
(HPRF) systems have many process variables (PVs) lo-
cated on different computer control screens provided by
the Extensible Display Manager (EDM). Several
MATLAB m-scripts have been developed to efficiently
process the necessary PVs while auto-start, ampli-
tude/phase calibration, gain tuning of the cavity field
feedback controllers, gain and phase tuning of the beam
feedforward controllers, and high power RF trip recovery,
processes are configured and validated. This paper ad-
dresses the sequence of RF commissioning of the
LANSCE LINAC from the time of RF-turn-on to beam
feedforward control and its relevant EDMs and MATLAB
m-scripts.
1. INTRODUCTION
The LANSCE LINAC is composed of one 201.25
MHz Drift-Tube_Linac (DTL) sector and seven
805MHz Coupled-Cavity Linac(CCL) sectors. A 805
MHz sector is composed of 6~7 CCLs with one high
voltage system, Capacity Bank. In contrast, the 201.25
MHz sector is composed of 4 DTLs and each DTL has its
own high voltage system [1]. The LLRF systems of four
DTLs and twenty-six CCLs were digitized in the last sev-
eral years.
Since these digital LLRF (DLLRF) systems work in
the baseband frequency domain, the structure of the
LLRF control system are the same and the digital signal
processing (DSP) – downconversion to the baseband sig-
nals, filtering, control signal generation, upconversion to
the IF signals − that are implemented on the Intel FPGA
are very similar. Figure 1 shows the overall LLRF control
system block diagram. In figure 1, all submodules such
as the RF upconverter, intermediate power amplifier and
high power amplifier, on the RF drive path are represent-
ed as the lumped transfer function 𝐻𝑓𝑤𝑑(𝑠) and all sub-
modules such as RF pickup, RF downconverter, IF filter,
on the RF feedback path is represented as the lumped
transfer function 𝐻𝑟𝑒𝑡(𝑠) [2].
Because the digitization was accompanied with the
LANSCE Control System (LCS) network support, the
network based control of the LLRF control system be-
came possible. Control parameters of LLRF system are
assigned with parameter variables (PVs) of the EPICS
Database and the operation of the (LL)RF system can be
performed by adjusting those PVs properly. In addition,
since the measured signals of the LLRF control system
are transmitted to the LCS network, it is possible to im-
plement data based digital signal processing on the host
system connected to the LCS network.
MATLAB is used widely at LANSCE for sig-
nal/image analysis and synthesis of LLRF digital signal
processing (DSP). MATLAB is also used for controlling
PVs of (LL)RF system. For this, a compact MATLAB
version of EPICS channel access (CA) was developed,
where MATLAB m-script uses Operating System (OS)
function “system” to call EPICS CA functions, caget,
caput, etc..
The procedure of the RF operation and Beam operation
is comprised of (i) turn on RF and adjust amplitude and
phase set points of the cavity field to the pre-assigned
target values; (ii) calibrate the open loop gain and phase;
(iii) close the PI feedback loop and calibrate the cavity
amplitude and the cavity phase of the external measure-
ments to the stored target values; (iv) tune the beam feed-
forward controller. Automations of (i), (iii), (iv) are ac-
companied with callings of MATLAB functions.
Figure 1. LLRF Control System Block Diagram
2. RF TURN ON FOR START UP OR
VSWR RECOVERY
RF turn on and adjustments of amplitude and phase
set points are performed either for the first start up of the
LINAC RF operation or for the RF Trip Recovery. Target
amplitude and phase set points are retrieved from an au-