Software feedback for DESY HERA-e RF power control
F.Willeke, R.Weck , DESY, Germany
L.Kopylov, S.Merker, M.Mikheev IHEP, Russia.
Abstract
To maintain the stable operation of RF system of DESY
HERA electron ring a software feedback system has been
implemented. It controls the power and phase of RF
transmitters with total power up to 12 MW. Data comingfrom 7 FECs are processed by second level FEC. It
calculates the optimal values of power and phase for thetransmitters, taking into account beam load and powerlimits. The physical model, implementation and criticalpoints of operation are described in the paper.
1 Introduction
HERA electron ring is operated as a part of p-e+collider. Seven RF stations supply the energy to thepositron beam with total power up to 12 MW. There are six
conventional and one superconducting assembly of RF
cavities, 14 to 16 cavities in each. Two parameters define
how beam sees the cavities. First is voltage amplitude andsecond is voltage phase. In colliding mode stations arerunning just below their critical limits and should deliver
power to the beam during continuous run up to 12 hours.
Stations have local electronic feedbacks keeping all
cavities of one station in phase. Stations are distributed
around the HERA ring uniformly in quadrants (fig.1).
Total voltage and phase of each station was controlled bycomputer system based on NORD computers and SEDAC
fieldbus. The global voltage feedback was already
implemented and significantly simplified the operation.
The goal of replacement of the obsolete control chain wasto implement a global software feedbacks for voltage
amplitude and phase simultaneously on the base of modern
hardware and software. The standard set of equipment for
DESY HERA control system is:•PC based workstation with WindowsNT as a console•
PC based FrontEnd (FEC) running MS DOS.
•PKTR RPC [1] running over TCP/IP equipment
access is used for communication between consolesand FECs.
2 Problem formulation
Existing control system (NORD+SEDAC) is almostobsolete. As a part of HERA Control renovation project
the control for RF of the electron ring should be implemented on new hardware/software basis and perform a
global feedback loops for total RF voltage and phase.
Without feedback the parameters of individual station
could slowly drift far from optimal values thus require
permanent operator assistance. Feedbacks should provide astable programmed level of RF voltage for injection,ramping and colliding mode of operation. RF parameters
are critical for beam life time and wrong setting even on
few percents can lead to beam loss.
3 Solution
To implement the feedback system we used in addition
to seven primary FEC (PrFec) one more, so called second
level FEC. Primary FECs are dedicated to perform aroutine I/O and control local parameters of individual RFstation. Second level FEC (SlFec further in this report) isresponsible for the global RF parameters of RF system:
amplitude and phase of RF voltage. It collects the information from PrFecs and global beam parameters (current andenergy) and calculate the optimal load for each station.
Compare this with real parameters SlFec determine
detuning of individual station in amplitude and phase andcorrect the settings for this station.
The functional diagram of hardware is shown on fig1.
All FECs and operator console are integrated in PKTR [1]control network (Ethernet).
SlFec software consists of two feedback loops: voltage
feedback loop and phase feedback loop. Two feedback
loops are independent, and can be switched ON/OFF fromconsole. Operator can exclude any RF station fromfeedback loop (independently for voltage and loop
feedback). By default, The station with superconducting
cavities does not participates in both feedback loops. SlFec
performs periodical (with period specified by operator)
data acquisition from all PrFecs, calculates global
parameters (like total RF voltage, average synchronousphase, etc.), and executes feedback algorithm if
corresponding feedback is ON and data acquisition fromPrFecs was successful. Maximal operational frequency of
the feedback is up to 1 Hz.
Voltage feedback loop can work in two main modes:
1) keep total RF voltage of all stations constant at value
specified from console;2) keep total RF voltage according to the table specifying
dependency of total RF voltage from beam energy.
The second mode is the most often used. If after
calculation of total RF voltage it is found that difference
between desired and real values exceed some predefined
threshold (usually 0.5 MV) - feedback will try to increase(or decrease) voltages on all stations participating in thisfeedback to achieve required total value. At first, therequired step voltage change is divided equally to allstations participating in feedback. Then algorithm for voltage feedback takes into account the following limitations:
1) Check status information (first of all different warnings, like overheating), decide (depending onwarning) whether it is just not allowed to increaseFig.1 RF control schemavoltage on this station, or one need to decrease voltage for station where warning occurred and try to
redistribute required changes to other stations.
2) Try (if possible) not to allow station to go very close
to limits (voltage limit, klystron power limit,absorbers power limits, etc.) If this happens feedback tries to redistribute required changes to otherstations to achieve required result.
After new values for all stations have been calculated new values are sent to PrFecs for writing to equipment.
Because RF generators have quite slow voltage change rate
- feedback algorithm has to remember when and which
value change was written to every station and not try towrite new values before one can expect that the previous
setting was processed by hardware feedbacks. Loop gain
for voltage feedback can be set by operator from console.
The purpose of phase feedback loop is to keep the value
synchronous phase the same for all RF stations.
To determine the proper setting SlFec reads thefollowing parameters from PrFecs:•U ci (MV) - total cavity voltage per station,
calculated as sum of scalar voltages on each cavities.
•Pfw (kW) - power coming from klystron•Plim (kW) - power limits for klystron.

•beam current and energy which are global control
system parameters.
SlFec perform a calculation of the following parameters:•Pdef (kW) - so called defect power (suppose comesto-the-beam):

Uc2,iPdef = 092. Pfw −108
. Pabsorb − ∑− ∑Pabsorb_ring
RShunt,iϕ S (deg) - synchronous phase, calculated as:Sin(ϕ Si ) = Pdef ,i / 2 ⋅ Uc,i ⋅ Ibeam
Errors in calculation of synchronous phase can be verylarge due to measurement errors (especially at low beam
current and energy). To avoid using erroneous results infeedback algorithm the following limitations are used:1) If calculated abs( Sin(ϕ S )) ≥ 1 for at least one
RF station - measurement result is considered to beinvalid and phase feedback does not make corrections.
2) If power dissipated by beam does not exceed somelimit (can be set from console in the range 0 …100%of RF generator power) - measurements are considered to be invalid and phase feedback does notFig. 2. Example of console screen during energy ramp.
make corrections. Usually when set this limit to3 …5% phase feedback works stable.
If measurement result is valid - feedback calculates theaverage synchronous phase for all RF stations andcompares phase of every station with average. If
synchronous phase calculated for RF station is different
from average phase by more than predefined limit (usually1 degree) and this station is not excluded from phasefeedback loop by operator - new phase shifter setting issent to corresponding Prfec. Loop gain for phase feedback
can be set by operator from console.
5 Console application.
A console application is dedicated for the presenting
operator the current parameters of RF system. Different
levels of view, down to the physical parameters measured
on each individual cavity and power absorber, and up toglobal parameters like total accelerating voltage andsynchronous phase (fig.2). It provides the facility ofprogram “voltage vs. energy” preparation to be download

to SlFec.
The application is implemented with MS Visual Basicand few dll’s written in c. It operate on NT workstation.
6 Conclusion.
System is now in daily operation but two points still
restrict the performance:1) Historical co-existance with old control chain (NORD,SEDAC) often lead to clashes and misfunction.
2) PrFec does not have the functionality to read back current settings. As a result we are using a very complex
and not 100% reliable algorithm to overcome the problem.
Reference[1] Philip Duval , The Use of PCs in Controlling DESY
Accelerators, This conference