impossible to detect directly. Thus, only a very

Introduction to LLRF

small fraction of the field is coupled out via a
pickup antenna. Its signal is then sent to the

1. Abstract

LLRF system for detection. Typically, the input

In this lecture an introduction to Low Level
Radio Frequency (LLRF) is given. The lecture isdivided into two parts. First, after explaining
the purpose of LLRF, an introduction to thetheoretical background is given. This covers themodeling of accelerating RF cavities, thededuction of fundamental equations, and shortpeaks into signal processing and controller
theory. This part also includes a demo with acavity simulator, to give the listener a better
feeling, on how a basic system behaves. The
second part of the lecture focuses on thearchitecture

of

LLRF

systems,

actualapplications, and real-world examples. At theend of the lecture, the listener should have agood idea what LLRF is about and what path tofollow, if he or she wants to get involved withthis topic.

power to the LLRF system is less than 1 W,
hence Low Level RF.
Depending on the purpose of the facility,
cavities are operated in a specific mode. Thereare continuous wave (CW) machines, in which a
continuous RF field is maintained within thecavities. Its duty factor is 100% and, if the
facility is a particle accelerator, beam can be
accelerated all the time. On the other hand,cavities can be operated in pulsed mode. Thiscan be distinguished into short pulse mode (SP)and long pulse mode (LP). In SP mode the duty
factor is typically about 1%, meaning only
during 1% of the time RF is fed into the cavity.
Beam acceleration is possible only during a
portion of this time. In LP mode the duty factor
is typically 10% to 50%.
The most basic setup including an LLRF system
is shown Figure 1. It comprises the LLRF

2. Introduction
LLRF stands for Low Level Radio Frequency.
The goal is to control RF fields withing cavities.
Depending on the application, the requirementson the LLRF system vary drastically. E.g., in asingle cavity vertical test stand, it is important
to control the amplitude, but the phase basicallydoes not matter. On the other hand, in a particle
accelerator both, amplitude and phase have to
be controlled precisely. Furthermore, there aredifferent types of cavities, such as normal
conducting (NC) cavities and superconducting
radio frequencies (SRF) cavities. Depending on

system, which generates corresponding to a set
setpoint a drive signal. This is fed into an
amplifier, which amplifies it. It is then fed intoa cavity. A small fraction of the RF is coupled
out and sent back to the LLRF system, where it
is detected. This is called an open-loop
operation.

By

implementingafeedback

controller, it is possible to perform closed loop
operation. In this case the detected pickup
signal is compared against the given setpoint.
Based on its difference the drive signal iscomputed and generated.

the application, the frequencies are different,
ranging typically from several MHz to tens ofGHz.
Especially in SRF cavities, voltages of several
tenths of MV are common. Such high fields are

11 － 1𝑄𝑄 =2𝜋𝜋𝑓𝑓0 𝑊𝑊
𝑃𝑃𝑑𝑑

There are different ways power can dissipate
from a cavity, e.g. via losses due to the surface
resistance. In this case the quality factor iscalled unloaded quality factor and is defined as

Figure 1: Most basic setup including an LLRF
system.

1 2
2𝜋𝜋 2 𝐶𝐶𝑉𝑉0
𝑄𝑄0 =,𝑇𝑇 1 𝑉𝑉02
2 𝑅𝑅

where 𝑇𝑇 is the time period of an RF cycle, 𝐶𝐶

the capacitance, 𝑉𝑉0 the amplitude of theoscillating voltage, and 𝑅𝑅 the resistance. With
𝑉𝑉 2

1

0
, 𝜔𝜔0 =𝑊𝑊 = 𝐶𝐶𝑉𝑉02 , 𝑃𝑃𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 = 2𝑅𝑅

2

3. LLRF System Overview

1

√𝐿𝐿𝐿𝐿

we can rewrite the equation to:

In order to be able to decide how to design and

𝑄𝑄0 = 𝜔𝜔0 𝑅𝑅𝑅𝑅 =build an LLRF system, one has to understandfirst the nature of the object, which shall becontrolled – in this case a SRF cavity. A cavity
is a resonator, which can be modeled in a first
approximation with an RCL electric circuit. It isshown in Figure 2.

, and 𝜔𝜔0 = 2𝜋𝜋𝑓𝑓0

𝑅𝑅𝜔𝜔0 𝑊𝑊=.
𝐿𝐿𝜔𝜔0 𝑃𝑃𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑

Beside the losses due to the surface resistance,
there are external losses, e.g. via the power
coupler. In this case the quality factor is called
the external quality factor:
𝑄𝑄𝑒𝑒𝑒𝑒𝑒𝑒 =𝜔𝜔0 𝑊𝑊
𝑃𝑃𝑒𝑒𝑒𝑒𝑒𝑒

When combining all losses, the quality factor iscalled the loaded quality factor:
𝑄𝑄𝐿𝐿 =
Figure 2: RCL circuit.
Before we explore the RCL model, let us define
an important property of the cavity: the quality
factor. In general, it is defined as the ratio
between the energy stored in the cavity and thepower dissipated from the cavity per RF cycle.

𝜔𝜔0 𝑊𝑊
𝑃𝑃𝑡𝑡𝑡𝑡𝑡𝑡

In this case the total dissipated power is 𝑃𝑃𝑡𝑡𝑡𝑡𝑡𝑡 =𝑃𝑃𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 + 𝑃𝑃𝑒𝑒𝑒𝑒𝑒𝑒 . One can compute the loaded quality
factor as follows:

11 － 2𝑄𝑄𝐿𝐿 =1
1+
𝑄𝑄0 𝑄𝑄𝑒𝑒𝑒𝑒𝑒𝑒In the case of SRF cavities 𝑄𝑄0 is several ordersof magnitude larger than 𝑄𝑄𝑒𝑒𝑒𝑒𝑒𝑒 . Thus, 𝑄𝑄𝐿𝐿 is in

the same order as 𝑄𝑄𝑒𝑒𝑒𝑒𝑒𝑒 .

In order to reflect the real world better, we have

we can see that the shunt impedance 𝑅𝑅𝑠𝑠ℎdepends on the dissipated power. Comparing it
1
to the RCL resistance 𝑅𝑅𝑠𝑠ℎ , a factor of of thetime average has to be included:

2

1 𝑟𝑟
1
𝑄𝑄
𝑅𝑅 = 𝑅𝑅𝑠𝑠ℎ =2 𝑄𝑄 02

to add a transition line to the RCL model, as
shown in Figure 3.

With this the normalized shunt impedance canbe defined as:
𝑅𝑅𝑠𝑠ℎ 2𝑅𝑅
𝑟𝑟
≔
=
𝑄𝑄0
𝑄𝑄0
𝑄𝑄

Furthermore, we can define the coupling
between the cavity and the transmission line:
Figure 3: RCL circuit with transition line [1].
This models e.g. the cable connecting the power
amplifier to the cavity. It is represented as the
impedance 𝑍𝑍𝑒𝑒𝑒𝑒𝑒𝑒 and is like a parallel resistor toWith

𝑅𝑅 . The characteristic impedance of a coaxial

cable is 50 Ω. Both can be replaced by the shunt
impedance:

1

𝑅𝑅𝐿𝐿

1

= +
𝑅𝑅

1

𝑍𝑍𝑒𝑒𝑒𝑒𝑒𝑒

𝛽𝛽 =𝑅𝑅
𝑍𝑍𝑒𝑒𝑒𝑒𝑒𝑒

𝑅𝑅𝐿𝐿 =

𝑅𝑅
1 + 𝛽𝛽we can rewrite this as:

Using the definition of the shunt impedance we
𝑅𝑅𝐿𝐿 =1
1+
𝑅𝑅 𝑍𝑍𝑒𝑒𝑥𝑥𝑥𝑥

We can rewrite 𝑄𝑄0 = 𝜔𝜔0 𝑅𝑅𝑅𝑅 =get the two following equations:

𝑅𝑅

𝐿𝐿𝜔𝜔0

=

𝑅𝑅
𝐿𝐿
1
= 𝜔𝜔0 ==√𝑄𝑄0𝐶𝐶
𝜔𝜔0 𝐶𝐶

Looking at this, we can see that𝜔𝜔0 𝑊𝑊
𝑃𝑃𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑

𝑅𝑅

𝑄𝑄0

to:
and

depends

only on 𝜔𝜔0 , 𝐶𝐶 , and 𝐿𝐿 . This means that it

depends only on the cavity geometry and not on
the surface resistance.
From

2
2
1 𝑉𝑉𝑐𝑐𝑐𝑐𝑐𝑐
𝑉𝑉𝑐𝑐𝑐𝑐𝑐𝑐=
𝑃𝑃𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 =
𝑅𝑅𝑠𝑠ℎ
2 𝑅𝑅

𝑄𝑄𝐿𝐿 =

𝑄𝑄0
1 + 𝛽𝛽𝜔𝜔1⁄2 =𝜔𝜔0
2𝑄𝑄𝐿𝐿

From this we can learn that the loaded quality
factor of a cavity 𝑄𝑄𝐿𝐿 can be manipulated bychanging the coupling 𝛽𝛽. Furthermore, at thesame time the half-bandwidth 𝜔𝜔1⁄2 ismanipulated. This fact is exploited at facilities.

Two possible ways are changing the insertion

depth of the input coupler antenna or the angleof a reflector plate inside an RF waveguide.

11 － 3

For the following we will focus on the pulsed
operation mode with beam loading. During

compensate for this, one can increase the RF
drive power during the beam transient time,

every pulse RF is fed into the cavity in order towhich is in our case the whole flattop. If thecharge it up. This time period is called filling orcompensation is just right, a flat flattop can befill time. It is followed by a time period, which isrestored. This is desirable, since only in thiscalled flattop. During this time the amplitudesituation every electron bunch would receiveand phase of the RF inside the cavity are kept

the same energy gain. A plot of this is shown inconstant. The flattop is the time period

Figure 5.

designated for beam acceleration. After theflattop, the RF drive of the cavity is shut off. The
RF field inside the cavity decays, thus it iscalled decay. A schetch of such an RF pulse isshown in Figure 4.

Figure 5: Cavity gradient over time for an RF
pulse with compensated beam loading during
the flattop [1].

Let us find out the required filling and flattop
Figure 4: Cavity and drive amplitudes over time
during an RF pulse [2].

powers for this case.

Now let us assume that we would inject a beamadditional current source, (see Figure 6).

(e.g. a train of electron bunches) into the cavity
just

at

the

beginningoftheIn order to consider the beam-loading case, wehave to extend the simple RCL circuit with an

flattop.

Furthermore, the beam would stop at the end of
the flattop, just when the RF drive stops. The
first electron bunch will draw energy from theRF field inside the cavity. This will lead to adrop of the cavity voltage. The second bunch will
do the same, resulting in a further drop of thecavity voltage, and so on. One would see an
effect, which looks similar like a decay after the

Figure 6: RCL circuit in the case of the beamtransient time [1].

flattop. This is called beam loading. In order to

11 － 4

We can write the cavity current as the sum of𝑉𝑉̂𝑝𝑝𝑝𝑝𝑝𝑝 (∆𝜔𝜔) ≈currents of all three elements:
𝐼𝐼𝑐𝑐𝑐𝑐𝑐𝑐 = 𝐼𝐼𝐶𝐶 + 𝐼𝐼𝑅𝑅 + 𝐼𝐼𝐿𝐿

̇𝐼𝐼𝐶𝐶̇ + 𝐼𝐼𝑅𝑅̇ + 𝐼𝐼𝐿𝐿̇ = 𝐼𝐼𝑐𝑐𝑐𝑐𝑐𝑐
1
̇ , 𝐼𝐼𝐶𝐶̇ = 𝐶𝐶𝑉𝑉𝑐𝑐𝑐𝑐𝑐𝑐
̈ , and 𝐼𝐼𝐿𝐿̇ = 1 𝑉𝑉𝑐𝑐𝑐𝑐𝑐𝑐
With 𝐼𝐼𝑅𝑅̇ = 𝑅𝑅 𝑉𝑉𝑐𝑐𝑐𝑐𝑐𝑐
𝐿𝐿

With

1

𝐿𝐿

̈ +
𝐶𝐶𝑉𝑉𝑐𝑐𝑐𝑐𝑐𝑐

𝑅𝑅𝐿𝐿 𝐶𝐶

=

𝜔𝜔0

and

𝑄𝑄𝐿𝐿

be rewritten as:̈ +𝑉𝑉𝑐𝑐𝑐𝑐𝑐𝑐

𝐿𝐿𝐿𝐿−

𝑉𝑉𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑒𝑒 2𝑄𝑄𝐿𝐿 (𝐶𝐶1 𝑒𝑒 𝑖𝑖𝑖𝑖𝑖𝑖 + 𝐶𝐶2 𝑒𝑒 −𝑖𝑖𝑖𝑖𝑖𝑖 ) +2= 𝜔𝜔02 this equation can𝜔𝜔01̇ + 𝜔𝜔02 𝑉𝑉𝑐𝑐𝑐𝑐𝑐𝑐 = 𝐼𝐼𝑐𝑐𝑐𝑐𝑐𝑐
𝑉𝑉𝑐𝑐𝑐𝑐𝑐𝑐
𝑄𝑄𝐿𝐿
𝐶𝐶
aparticularsolution.

Thehomogeneous solution reads:

1

4𝑄𝑄𝐿𝐿2

1

𝑟𝑟

with

and

𝑉𝑉0 ≈ 2𝑅𝑅𝐿𝐿 𝐼𝐼𝑔𝑔 = 𝑄𝑄𝐿𝐿 𝐼𝐼𝑔𝑔
𝑄𝑄

𝜏𝜏 =

2𝑄𝑄𝐿𝐿
𝜔𝜔0

.

Furthermore, for the beam transient time,
where 𝐼𝐼𝑐𝑐𝑐𝑐𝑐𝑐 = 2𝐼𝐼𝑔𝑔 − 2𝐼𝐼𝑏𝑏0, we get:𝑉𝑉𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 =𝑡𝑡−𝑇𝑇𝑖𝑖𝑖𝑖𝑖𝑖
𝑡𝑡
𝑟𝑟
𝑄𝑄𝐿𝐿 (𝐼𝐼𝑔𝑔 (1 − 𝑒𝑒 −𝜏𝜏 ) − 𝐼𝐼𝑏𝑏0 cos(𝛷𝛷𝑏𝑏 ) (1 − 𝑒𝑒 − 𝜏𝜏 ))𝑄𝑄With this

we now have two equations,back at Figure 5, our requirement was tomaintain a constant cavity voltage over theflattop. Thus, the following must hold:.

A particular solution is:
𝑉𝑉𝑝𝑝𝑝𝑝𝑝𝑝 =𝑡𝑡

𝑉𝑉𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 = 𝑉𝑉0 (1 − 𝑒𝑒 −𝜏𝜏 )describing the fill time and the flattop. Looking

𝜔𝜔 𝑡𝑡
− 0
𝑉𝑉ℎ𝑜𝑜𝑜𝑜 = 𝑒𝑒 2𝑄𝑄𝐿𝐿 (𝐶𝐶1 𝑒𝑒 𝑖𝑖𝑖𝑖𝑖𝑖 + 𝐶𝐶2 𝑒𝑒 −𝑖𝑖𝑖𝑖𝑖𝑖 )with 𝛼𝛼 = 𝜔𝜔0 √1 −

√1 + tan2 (𝛷𝛷)

Since 𝑄𝑄𝐿𝐿 ≫ 1, we can approximate 𝛼𝛼 ≈ 𝜔𝜔0. For

order to solve it, we need to find a homogeneousand

𝑅𝑅𝐿𝐿 𝐼𝐼̂𝑒𝑒 𝑖𝑖(𝜔𝜔𝜔𝜔+𝛷𝛷)

𝑅𝑅 𝐼𝐼̂

This is a second order differential equation. In
solution𝜔𝜔0 𝑡𝑡𝑉𝑉𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑉𝑉ℎ𝑜𝑜𝑜𝑜 + 𝑉𝑉𝑝𝑝𝑝𝑝𝑝𝑝

𝐶𝐶1 = 𝐶𝐶2 = − 𝐿𝐿 we get:11̇𝑉𝑉̇ + 𝑉𝑉 = 𝐼𝐼𝑐𝑐𝑐𝑐𝑐𝑐
𝑅𝑅𝐿𝐿 𝑐𝑐𝑐𝑐𝑐𝑐 𝐿𝐿 𝑐𝑐𝑐𝑐𝑐𝑐
1√1 + (2𝑄𝑄𝐿𝐿 ∆𝜔𝜔)𝜔𝜔where ∆𝜔𝜔 = 𝜔𝜔0 − 𝜔𝜔 . With this the generalsolution is:

Simply deriving it for time yields:

this yields:

𝑅𝑅𝐿𝐿 𝐼𝐼̂

d𝑉𝑉𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓=0d𝑡𝑡

Solving

𝑅𝑅𝐿𝐿 𝐼𝐼̂𝑒𝑒 𝑖𝑖(𝜔𝜔𝜔𝜔+𝛷𝛷)√1 + tan2 (𝛷𝛷)𝜔𝜔𝜔𝜔with tan(𝛷𝛷) = 𝑅𝑅 (𝜔𝜔𝜔𝜔 − 𝜔𝜔𝜔𝜔) = 𝑄𝑄 (𝜔𝜔 − 𝜔𝜔0 ) . The
0𝑡𝑡−𝑇𝑇𝑖𝑖𝑖𝑖𝑖𝑖
𝑡𝑡
d 𝑟𝑟
𝑄𝑄𝐿𝐿 (𝐼𝐼𝑔𝑔 (1 − 𝑒𝑒 −𝜏𝜏 ) − 𝐼𝐼𝑏𝑏0 cos(𝛷𝛷𝑏𝑏 ) (1 − 𝑒𝑒 − 𝜏𝜏 )) = 0
d𝑡𝑡 𝑄𝑄

yields:particular solution is also called the stationary

solution. If the generator frequency 𝜔𝜔 is very
close to the resonance frequency 𝜔𝜔0 , thefollowing approximation can be done:

𝑇𝑇𝑖𝑖𝑖𝑖𝑖𝑖

And finally:
𝑉𝑉𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 =11 － 5

𝐼𝐼𝑔𝑔 = 𝐼𝐼𝑏𝑏0 𝑒𝑒 𝜏𝜏𝑇𝑇𝜔𝜔𝑖𝑖𝑖𝑖𝑖𝑖 0−
𝑟𝑟
𝑄𝑄𝐿𝐿 𝐼𝐼𝑏𝑏0 (𝑒𝑒 2𝑄𝑄𝐿𝐿 − 1)𝑄𝑄

By inserting parameters similar to the ILC TDR

for the ILC it is planned to use klystrons as(a fill time of 923 µs, a beam current of 5.8 mA,

high-power amplifiers, driving multiple cavities

and a loaded quality factor of 5.44E6), we canat once. These amplifiers show a non-linear

produce the plot as shown in Figure 7, which issaturation behavior in terms of output power

consistent with our expectations.

versus input power. Thus, when staying at thesame operation point over the entire RF pulse,
the LLRF system does not have to cope with any
non-linearities.
With the knowledge gained so far, it is possible
to

find

a

set

of

equationsfor

optimalparameters:
The optimal coupling reads:

Figure 7: Cavity voltage during fill time andflattop with beam loading for parameters
similar to the ILC TDR [2].

𝑟𝑟
𝑄𝑄 𝑄𝑄𝐿𝐿 𝐼𝐼𝑏𝑏0
𝛽𝛽𝑜𝑜𝑜𝑜𝑜𝑜 = 1 +cos(𝛷𝛷𝑏𝑏 )𝑉𝑉𝑐𝑐𝑐𝑐𝑐𝑐

The minimum power for maintaining the cavity
voltage reads:
2
𝑉𝑉𝑐𝑐𝑐𝑐𝑐𝑐
𝑃𝑃𝑚𝑚𝑚𝑚𝑚𝑚 = 𝛽𝛽𝑜𝑜𝑜𝑜𝑜𝑜 𝑟𝑟
𝑄𝑄
𝑄𝑄 0

In order to compute the required power during
the filling and the flattop, we can use 𝑃𝑃 =1 𝑟𝑟
𝑄𝑄 𝐼𝐼2, which yields:
4 𝑄𝑄 𝐿𝐿 𝑔𝑔
𝑃𝑃𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 =2
𝑉𝑉𝑐𝑐𝑐𝑐𝑐𝑐

𝑇𝑇

The optimum tuning angle reads:
𝑟𝑟
𝑄𝑄 𝑄𝑄𝐿𝐿,𝑜𝑜𝑜𝑜𝑜𝑜 𝐼𝐼𝑏𝑏0
tan(𝛷𝛷𝑜𝑜𝑜𝑜𝑜𝑜 ) = −sin(𝛷𝛷𝑏𝑏 )𝑉𝑉𝑐𝑐𝑐𝑐𝑐𝑐

𝜔𝜔𝑖𝑖𝑖𝑖𝑖𝑖 0−𝑟𝑟
4 𝑄𝑄 𝑄𝑄𝐿𝐿 (1 − 𝑒𝑒 2𝑄𝑄𝐿𝐿 )2
𝑟𝑟
2
𝑄𝑄𝐿𝐿 𝐼𝐼𝑏𝑏0
𝑉𝑉𝑐𝑐𝑐𝑐𝑐𝑐
𝑄𝑄
𝑃𝑃𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 = 𝑟𝑟
(1 +)𝑉𝑉𝑐𝑐𝑐𝑐𝑐𝑐
4 𝑄𝑄 𝑄𝑄𝐿𝐿

In case of SRF cavities we can simplify to:
𝑉𝑉𝑐𝑐𝑐𝑐𝑐𝑐
𝑄𝑄𝐿𝐿,𝑜𝑜𝑜𝑜𝑜𝑜 = 𝑟𝑟
𝐼𝐼 cos(𝛷𝛷𝑏𝑏 )𝑄𝑄 𝑏𝑏0

By inserting the following values 𝑉𝑉𝑐𝑐𝑐𝑐𝑐𝑐 =31.5 MV⁄m ∙ 1.038𝑚𝑚 = 32.7 MV , 𝑄𝑄𝐿𝐿 = 5.44 ∙ 106 ,𝑇𝑇𝑖𝑖𝑖𝑖𝑖𝑖 = 923 μs, 𝐼𝐼𝑏𝑏0 = 5.8 mA, and 𝛷𝛷𝑏𝑏 = 180° thepowers read:

𝑃𝑃𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓,𝑚𝑚𝑚𝑚𝑚𝑚 =𝛷𝛷𝑜𝑜𝑜𝑜𝑜𝑜 = −𝛷𝛷𝑏𝑏

2
𝑉𝑉𝑐𝑐𝑐𝑐𝑐𝑐= 𝑉𝑉𝑐𝑐𝑐𝑐𝑐𝑐 𝐼𝐼𝑏𝑏0 cos(𝛷𝛷𝑏𝑏 )𝑟𝑟
4 𝑄𝑄 𝑄𝑄𝐿𝐿,𝑜𝑜𝑜𝑜𝑜𝑜

𝑃𝑃𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 = 190 kW

In reality the cavities are detuned by the tuning

Of course, it was intentional that the filling andangle 𝛷𝛷. One source for this is Lorentz force

𝑃𝑃𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 = 190 kW

flattop powers are the same. The reason is that

detuning. This is an effect which is caused bystrong electro-magnetic fields within the cavity,

causing the cavity walls to deform slightly.

11 － 6

𝑉𝑉(𝑡𝑡) = (𝑉𝑉𝑟𝑟 (𝑡𝑡) + 𝑖𝑖𝑉𝑉𝑖𝑖 (𝑡𝑡)) ∙ 𝑒𝑒 𝑖𝑖𝑖𝑖𝑖𝑖

Another source of detuning is microphonics.
These are mechanicals vibrations caused by e.g.

𝐼𝐼(𝑡𝑡) = (𝐼𝐼𝑟𝑟 (𝑡𝑡) + 𝑖𝑖𝐼𝐼𝑖𝑖 (𝑡𝑡)) ∙ 𝑒𝑒 𝑖𝑖𝑖𝑖𝑖𝑖

pumps, road traffic, etc., which are causing
constantly changing deformations of the cavity.
In Figure 8 the vector diagram of generator andbeam-induced voltages in such a detuned cavity
are depicted.

Figure 9: RF signal (red) and its envelope (blue)[3].
Figure 8: Vector diagram of generator andbeam-induced voltages in a detuned cavity [1].
From this diagram we can see that 𝑉𝑉𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑉𝑉𝑔𝑔 +𝑉𝑉𝑏𝑏 , which we already have covered. But more

If we now insert this into the equation above
and omit the second-order time derivatives𝑉𝑉̈ (𝑡𝑡), we get the first-order differential equation
for the envelope:

importantly one can also see that:
𝑉𝑉𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑉𝑉𝑓𝑓𝑓𝑓𝑓𝑓 + 𝑉𝑉𝑟𝑟𝑟𝑟𝑟𝑟

This equation, as simple as it is, is very
powerful. It is true for all times. Typically, atpulsed machines, it is convenient to plot thecavity, forward and reflected signals. It makes
it very easy to spot, if something is wrong, e.g.
with the calibration of a certain channel.
For the following let us consider one more timethe differential equation for a driven LCR
circuit and let us write is as follows:𝑉𝑉̈ (𝑡𝑡) +𝑉𝑉𝑟𝑟̇ + 𝜔𝜔1⁄2 𝑉𝑉𝑟𝑟 + ∆𝜔𝜔𝑉𝑉𝑖𝑖 = 𝑅𝑅𝐿𝐿 𝜔𝜔1⁄2𝐼𝐼𝑟𝑟
𝑉𝑉𝑖𝑖̇ + 𝜔𝜔1⁄2 𝑉𝑉𝑖𝑖 + ∆𝜔𝜔𝑉𝑉𝑟𝑟 = 𝑅𝑅𝐿𝐿 𝜔𝜔1⁄2 𝐼𝐼𝑖𝑖

with the cavity bandwidth 𝜔𝜔1⁄2 =

𝜔𝜔0

2𝑄𝑄𝐿𝐿

and thecavity detuning ∆𝜔𝜔 = 𝜔𝜔0 − 𝜔𝜔. We can rewritethese two equations in state space formalism as:−𝜔𝜔1⁄2d 𝑉𝑉𝑟𝑟( )=(𝑉𝑉∆𝜔𝜔d𝑡𝑡 𝑖𝑖−∆𝜔𝜔
𝑅𝑅𝐿𝐿 𝜔𝜔1⁄2
𝑉𝑉) ∙ ( 𝑟𝑟 ) + (
𝑉𝑉𝑖𝑖
𝜔𝜔1⁄2
0

0
𝐼𝐼
) ∙ ( 𝑟𝑟 )𝐼𝐼𝑖𝑖
𝑅𝑅𝐿𝐿 𝜔𝜔1⁄2

This is called the cavity differential equation.
−𝜔𝜔1⁄2

With 𝐴𝐴 = ( ∆𝜔𝜔𝑉𝑉
𝑥𝑥 = ( 𝑟𝑟 ) ,
𝑉𝑉𝑖𝑖

and

−∆𝜔𝜔
0
𝑅𝑅 𝜔𝜔 ⁄
) , 𝐵𝐵 = ( 𝐿𝐿 01 2 𝑅𝑅 𝜔𝜔 ) ,𝜔𝜔1⁄2
𝐿𝐿 1⁄2𝐼𝐼𝑢𝑢 = ( 𝑟𝑟 ) , we can write this𝐼𝐼𝑖𝑖

equations in short as:

𝜔𝜔0
𝜔𝜔 𝑅𝑅
̇ + 𝜔𝜔02 𝑉𝑉(𝑡𝑡) = 0 𝐿𝐿 𝐼𝐼 (̇ 𝑡𝑡)
𝑉𝑉(𝑡𝑡)𝑄𝑄𝐿𝐿
𝑄𝑄𝐿𝐿

𝑥𝑥̇ (𝑡𝑡) = 𝐴𝐴 ∙ 𝑥𝑥(𝑡𝑡) + 𝐵𝐵 ∙ 𝑢𝑢(𝑡𝑡)The driving current 𝐼𝐼𝑔𝑔 and Fourier component

Until now we have considered the cavity

fast RF oscillation from the real and imaginary

computer, the cavity differential equation

𝐼𝐼𝑏𝑏 of a pulsed beam are harmonic with the timedependence 𝑒𝑒 𝑖𝑖𝑖𝑖𝑖𝑖 . Therefore, we separate theparts of the field vector (also see Figure 9):differential equation continuous in time, which
is true for reality. For simulations with e.g. a
discreate in time is more useful. It reads:

11 － 7

𝑉𝑉𝑖𝑖,𝑛𝑛

1 − 𝑇𝑇𝜔𝜔1⁄2
𝑇𝑇∆𝜔𝜔−𝑇𝑇∆𝜔𝜔
𝑉𝑉𝑖𝑖,𝑛𝑛−1
𝐼𝐼𝑖𝑖,𝑛𝑛−1][] + 𝑇𝑇 𝜔𝜔1⁄2 𝑅𝑅𝐿𝐿 [𝐼𝐼 ]1 − 𝑇𝑇𝑇𝑇1⁄2 𝑉𝑉𝑞𝑞,𝑛𝑛−1
𝑞𝑞,𝑛𝑛−1

digital LLRF systems is that these are verya single cavity simulator, which is presented insome modern algorithms, which would be very

[𝑉𝑉 ] = [𝑞𝑞,𝑛𝑛This differential equation was used to program
the lecture to demonstrate pulsed operation

flexible. If a requirement changes, the digitalalgorithm can be reprogrammed. There are alsodifficult and costly to implement in an analog

with ILC TDR-like parameters. Furthermore,way. Since the signals are already processed

the use cases for a low and a high 𝑄𝑄𝐿𝐿 aremonitoring and recoding. Furthermore, digital

discussed. Figure 10 shows the GUI of thesimulator.

digitally, it is easy to make them available forsystems can be maintained remotely to a great
extent.
Generally,

digital

LLRFsystems

canbesubdivided into three different flavors: 1. 19inch module-based systems, 2. Crate-based
system, and 3. Mixed system.
An example for a 19-inch module-based systemis the LCLS-II LLRF system. Its prototype
version is shown in Figure 11.
Figure 10: GUI of single cell cavity simulator.

4. LLRF Systems
LLRF systems can be separated into two
categories: analog LLRF systems and digital
LLRF systems.
In the case of the analog LLRF systems, thesignal detection, signal processing, feedback
control, and drive signal generation are all
realized

using

analogcomponents.

These

systems are typically designed, optimized, andbuilt for a specific purpose. When requirementschange, they are hard to modify. Furthermore,
one

needs

additional

hardware

for

data

monitoring and recording.
In the case of digital LLRF systems, signals areconverted from analog to digital using analog todigitalconverters(ADCs).

The

signalprocessing, including the feedback controller aswell as the drive signal generation is realized ina digital way. The digital drive signal is thenconverted to an analog signal, using digital to

Figure 11: LCLS-II prototype LLRF system at
FNAL CMTS [4].
On the right side of the picture, on can see theinside of a 19-inch module. This hardware wasdeveloped and built specifically for its purpose
and is very well optimized.
An example for a crate-based system, is theMicroTCA.4-based

LLRF

systemattheEuropean XFEL at DESY. Figure 12 shows on
the left side a system inside the tunnel
underneath a cryomodule and on the right side
the crate and four cards as an example. The

analog converters (DACs). The advantage of

11 － 8Figure 12: MicroTCA.4-based LLRF system atthe European XFEL at DESY [5].
crate offers slots at the front and at the back. In
the back cards with analog hardware areinserted. In the front, cards with digital
hardwareareinserted.

The

cards

are

interconnected via a connector. This way e.g. thedown converter card is combined with adigitizer card and the LLRF controller card iscombined, with the vector modulator card. The
modular nature of such systems allows an easy
replacement of a broken card. Furthermore, allcards are of-the-shelf components. A wide rangeof cards optimized for different purposes arecommercially available. Another advantage ofsuch kind of system is, that it is very compact.
An example for a mixed system is theMicroTCA.0-based LLRF system at the cERL at

Figure 13: MicroTCA.0-based LLRF system atcERL at KEK [6].
Figure

14

shows

an

examplesystemarchitecture of a digital LLRF system. As
described above, the analog input signals are
digitized using ADCs. The digital signals areprocessed by e.g. filters and a feedback
controller on a Field Programmable Gate Array(FPGA). It is possible to implement also further
algorithms and calculations in order to allow
special functionalities. The generated drive
signal is converted to analog using a DAC. The
FPGA is typically interconnected with a local
CPU. This is basically a small computer,connected to the control system of the facility. It
allows data communication with remotelyconnected computers, which are used either formonitoring

andoperation

or

for

data

acquisition.

KEK. Figure 13 shows on the left side the racks
of several system within the temperaturecontrolled hut and on the right side thecomponents of one LLRF system. In this casethe down conversion is done with a 19-inch
module, whereas the controller is realized on acard within a MicroTCA.0 crate. Such kind ofsystem allows the combination of the best of

Figure 14: Example system architecture of adigital LLRF system.

both other system flavors.

11 － 9

5. Signal Sampling𝑄𝑄𝛷𝛷 = atan( 𝐼𝐼 )Converting analog signals into digital ones is
crucial for realizing digital LLRF systems. As
mentioned in the previous sections, ADCs areused to this end. As shown in Figure 15, theADC measures the amplitude of an analog
signal at a certain point in time and outputs theaccording number. This is called a sample point.
The time between two consecutive sample

points is the sample period Ts. ADC typicallyhave a clock input, which allows to trigger the
sampling.

Figure 16: Relation between amplitude and
phase
and
in-phaseandquadrature
representations [1].
Furthermore, we have to consider the frequencyof the RF signal 𝑓𝑓𝑅𝑅𝑅𝑅

and the sampling

frequency 𝑓𝑓𝑠𝑠 . If the frequency of the RF signal

is too high, it cannot be reconstructed (aliasing).
Figure 15: General idea of digitally sampling ananalog signal [7].

We have to obey the Nyquist-Shannon theorem.
It states that, if
𝑓𝑓𝑠𝑠 > 2𝑓𝑓𝑅𝑅𝑅𝑅

As prerequisite for the following, we need todefine the coordinates we will be using. Whendealing with sinusoidal signals, amplitude andphase are naturally the quantities used fordescription. It turns out that these are not
optimal for performing computations on an
FPGA. For this purpose, the best choice is therepresentation in In-phase (or real part) I anda perfect reconstruction of 𝑓𝑓𝑅𝑅𝑅𝑅 is quarantined.

In the case of ILC, the 𝑓𝑓𝑅𝑅𝑅𝑅 is 1.3 GHz. Typically,

ADCs can sample with tenths to a few hundredsof MHz. In order to overcome this issue, the RF

signal can be down converted in frequency. In
general, the RF signal can be described as:

Quadrature (or imaginary part) Q. Figure 16

𝑆𝑆𝑅𝑅𝑅𝑅 (𝑡𝑡) = 𝐴𝐴𝑅𝑅𝑅𝑅 ∙ sin(2𝜋𝜋 ∙ 𝑓𝑓𝑅𝑅𝑅𝑅 ∙ 𝑡𝑡 + 𝛷𝛷𝑅𝑅𝑅𝑅 )shows the representation of a coordinate interms of amplitude and phase as well as I and
Q. The relations are:
𝐼𝐼 = 𝐴𝐴 cos(𝛷𝛷)𝑄𝑄 = 𝐴𝐴 sin(𝛷𝛷)For the following let us assume 𝛷𝛷𝑅𝑅𝑅𝑅 = 0 .
Furthermore, let us assume we create a second

signal with a local oscillator with a slightly

higher frequency (e.g. 𝑓𝑓𝐿𝐿𝐿𝐿 = 1.31 GHz). Thiscan described as:

𝑆𝑆𝐿𝐿𝐿𝐿 (𝑡𝑡) = 𝐴𝐴𝐿𝐿𝐿𝐿 ∙ sin(2𝜋𝜋 ∙ 𝑓𝑓𝐿𝐿𝐿𝐿 ∙ 𝑡𝑡 + 𝛷𝛷𝐿𝐿𝐿𝐿 )A= √𝐼𝐼 2 + 𝑄𝑄 2

11 － 10In order to keep it simple, let us assume 𝐴𝐴𝐿𝐿𝐿𝐿 =𝑓𝑓𝐼𝐼𝐼𝐼 (𝜋𝜋) = −𝑄𝑄

1 and 𝛷𝛷𝐿𝐿𝐿𝐿 = 0 . Now we mix both signals,
yielding:

𝑆𝑆𝐿𝐿𝐿𝐿∙𝑅𝑅𝑅𝑅 (𝑡𝑡) = sin(2𝜋𝜋 ∙ 𝑓𝑓𝑅𝑅𝑅𝑅 ∙ 𝑡𝑡) ∙ sin(2𝜋𝜋 ∙ 𝑓𝑓𝑅𝑅𝑅𝑅 ∙ 𝑡𝑡)

𝑓𝑓𝐼𝐼𝐼𝐼 (We can also identify:

This we can rewrite as:

1
𝑆𝑆𝐿𝐿𝐿𝐿∙𝑅𝑅𝑅𝑅 (𝑡𝑡) = (cos(2𝜋𝜋 ∙ (𝑓𝑓𝐿𝐿𝐿𝐿 − 𝑓𝑓𝑅𝑅𝑅𝑅 ) ∙ 𝑡𝑡) − cos(2𝜋𝜋 ∙ (𝑓𝑓𝐿𝐿𝐿𝐿 + 𝑓𝑓𝑅𝑅𝑅𝑅 ) ∙ 𝑡𝑡))23𝜋𝜋
) = −𝐼𝐼
2

𝑓𝑓𝐼𝐼𝐼𝐼,𝑛𝑛+1cos(∆𝛷𝛷𝑛𝑛 ) −sin(∆𝛷𝛷𝑛𝑛 )𝐼𝐼)∙()( ) =(
𝑄𝑄 𝑛𝑛
𝑓𝑓𝐼𝐼𝐼𝐼,𝑛𝑛sin(∆𝛷𝛷𝑛𝑛 ) cos(∆𝛷𝛷𝑛𝑛 )This method is also illustrated in Figure 18.

At this point let us assume we apply a low-passfilter, which cuts off the frequency component
𝑓𝑓𝐿𝐿𝐿𝐿 + 𝑓𝑓𝑅𝑅𝑅𝑅 . The resulting signal is:

1
𝑆𝑆𝐼𝐼𝐼𝐼 (𝑡𝑡) = (cos(2𝜋𝜋 ∙ (𝑓𝑓𝐼𝐼𝐼𝐼 ) ∙ 𝑡𝑡))
2

where

𝑓𝑓𝐼𝐼𝐼𝐼 = 𝑓𝑓𝐿𝐿𝐿𝐿 − 𝑓𝑓𝑅𝑅𝑅𝑅.

IF

standsforintermediate frequency. In our example 𝑓𝑓𝐼𝐼𝐼𝐼 =10 MHz. This frequency can easily be sampledusing an ADC. It is very important to note is
that

this

methodpreservestheoriginal

amplitude and phase information. Figure 17
shows a schematic of the down conversion steps.

Figure 17: Diagram of the down conversion
process.

Figure 18: IQ sampling in the complex plane(top) and in time domain (bottom) [8].

There are different sample methods. In the

Let us write down the general ratio between thesampling frequency and the intermediate
frequency as:

following we will discuss IQ sampling as well as
under sampling and over sampling.
IQ sampling is the most straight forward. In
this case 𝑓𝑓𝑠𝑠 > 4 ∙ 𝑓𝑓𝐼𝐼𝐼𝐼 . This means in terms of I
and Q:

𝑓𝑓𝐼𝐼𝐼𝐼 (0) = 𝑄𝑄

𝜋𝜋𝑓𝑓𝐼𝐼𝐼𝐼 ( ) = 𝐼𝐼
2

2𝜋𝜋

𝑓𝑓𝑠𝑠
= 𝑚𝑚
𝑓𝑓𝐼𝐼𝐼𝐼

with ∆𝛷𝛷 = 𝑚𝑚 (see Figure 19). As we havediscussed above, the case of 𝑚𝑚 = 4 is called IQ
sampling. Furthermore, it is defined that 𝑚𝑚 <2 corresponds to under sampling and 𝑚𝑚 > 2

corresponds to over sampling. Thus, IQ

11 － 11

6. Digital
Signal
Processing
Implementation

andAt ILC it is planned to drive the cavities ingroups of 39 with individual single klystrons.
One group of cavities with the corresponding
klystron and LLRF system is called an RF
station. Since the klystron can receive only one
input signal, and its output is distributed to themultiple cavities, a so-called vector-sum control
has to implemented within the LLRF system. To
Figure 19: Example of general IQ sampling,
here over sampling [8].

this end the probe signal of every cavity of thesampling is a special case of over sampling. In
general, we can compute I and Q with:individual signals are summed up, resulting in1
cos(𝑛𝑛∆𝛷𝛷 + 𝛷𝛷)
𝐼𝐼
( ) =
(
𝑄𝑄 𝑛𝑛 sin(∆𝛷𝛷 + 𝛷𝛷) − sin(𝑛𝑛∆𝛷𝛷 + 𝛷𝛷)𝑦𝑦𝐼𝐼𝐼𝐼,𝑛𝑛+1−cos((𝑛𝑛 + 1)∆𝛷𝛷 + 𝛷𝛷))) ∙ ( 𝑦𝑦sin((𝑛𝑛 + 1)∆𝛷𝛷 + 𝛷𝛷)
𝐼𝐼𝐼𝐼,𝑛𝑛

I and Q can also be computed via the followingsums:

RF station is send to the LLRF system and isdigitized. Then, the I and Q values of thethevectorsum.

Figure

20

shows

its

representation in the complex plane for a caseof eight cavities. This calculation is realized on
the FPGA.

𝑚𝑚−1

2𝜋𝜋𝜋𝜋
2
)
𝐼𝐼 = ∑ 𝑦𝑦𝑛𝑛 cos (
𝑚𝑚
𝑚𝑚
𝑛𝑛=0

𝑚𝑚−1

2
2𝜋𝜋𝜋𝜋
𝑄𝑄 = ∑ 𝑦𝑦𝑛𝑛 sin (
)
𝑚𝑚
𝑚𝑚
𝑛𝑛=0

The advantage of under sampling are relaxed
requirements for the ADC due to the lower
sampling rate. This translates also to relaxed
requirements for the FPGA due to the lower
data rate. Both may result in cost reductions.
Furthermore, in under sampling it is possible todetect IF signals with a higher frequency thanthe ADC sampling rate.
The advantages of over sampling are e.g. tohave more sampling points per IF period. This
results in noise reduction due to the averaging
in the calculation of the I and Q values. Beside
this, the choice of the IF location in the first
Nyquist zone is more flexible.

Figure 20: Representation of the vector sum inthe complex plane.
An FPGA is chip, in which arbitrary logic
circuits can be realized. The major advantage of
FPGAs is that they can be reprogrammed.
Modern FPGAs feature in addition processor
cores, so that demanding computations can be
performed without occupying resources interms of e.g. logical cells. Since the FPGA acts
more like an integrated circuit, the timerequired for algorithms or computations isdefined by its design and is always constant. In

11 － 12other words, FPGAs allow actual real-timealgorithms.

(“Real-time”

does

not

mean

outputshouldbeconsistent

with

the

requirements. This way malfunctions of theinstantaneously. It means the time between thealgorithm in some edge cases can be found andinput and the output is always the same.)

fixed.

Regardless, if working alone or in a team, aAfter testing within the test bench was

structured way of work is essential for the

successful, the code should be tested andsuccess of a project. For the implementation of

debugged on the target hardware. Target

the firmware of the FPGA the following

hardware means ideally test hardware, which isworkflow is recommended.

identical to the production hardware. This stepFirst, the requirements of the firmware to beis very important, since the simulation is only aandrough approximation to reality. When the

documented. It is useful to make flow charts oftesting and debugging on the target hardware

algorithms and subcomponents for a better

was successful, the code can be deployed to theimplemented

have

to

be

definedunderstanding and for checking signal widths.

production hardware.

By this signal overflow can be avoided, which

If requirements for the firmware have changed,

otherwise can lead to dangerous situations

the entire implementation and testing workflow

during operation.
In a next step the code of the firmware ishas to be passed through again.

created. There are two major possibilities to

7. Controller Theory

approach this. The first is to write the code (e.g.

The controller is the essential part of the

VHDL) by hand. Depending on the project, thismay take time. But it allows to control andoptimize every aspect of the algorithm. The
second way is to use software like e.g.
MathWorks Simulink. It allows to build
algorithms via a flow chart. From the flowchart,
VHDL code is created automatically. This
makes

quick

prototyping

possible.

The

disadvantage is, that one does not have full

firmware. Its design and setup have a great
impact on what RF stability can be achieved in
the end. In order to talk about controller theory,
we first have to define, what a transfer function
is. It is the ratio of the Laplace-transforms of theoutput signal 𝑌𝑌(𝑠𝑠) and the input signal X(𝑠𝑠) ofa linear time-invariant system (see Figure 21).

It reads:

control over predefined subcomponents. Thus,

𝐻𝐻(𝑠𝑠) =optimization is impossible in some cases.
Furthermore,theautomaticallygenerated

VHDL code is very hard or sometimes even

𝑌𝑌(𝑠𝑠)𝑋𝑋(𝑠𝑠)

impossible to be understood by humans. Of
course, it is also possible to combine both
approaches of code generation.
After the code was generated, a so-called test
bench should be programmed. This is additionalcode, which allows to test the VHDL code in asimulator. During such a test, all possible

Figure 21: Definition of the transfer function[9].
𝐻𝐻(𝑠𝑠) is a representation of the system, since we
can compute the output for a given input.

inputs should be fed to the algorithm and the

11 － 13

R

The Laplace transform reads:+∞

𝐻𝐻(𝑠𝑠) = ∫𝑡𝑡=0ℎ(𝑡𝑡)𝑒𝑒 −𝑠𝑠𝑠𝑠 d𝑡𝑡

Cu (t )

Note that ℎ(𝑡𝑡) is in the time domain and 𝐻𝐻(𝑠𝑠)in the complex frequency domain. The inverse

I (t )

Laplace transform reads:
𝑓𝑓(𝑡𝑡) = 𝐿𝐿−1 {𝐹𝐹(𝑠𝑠)} =1 𝛼𝛼+𝑗𝑗𝑗𝑗
𝐹𝐹(𝑠𝑠) ∙ 𝑒𝑒 𝑠𝑠𝑠𝑠 d𝑠𝑠∫2𝜋𝜋𝜋𝜋 𝑠𝑠=𝑎𝑎−𝑗𝑗𝑗𝑗

uC ( t )Figure 23: RC circuit [9].

Figure 22 shows the properties of the Laplacetransform as well as Laplace transform pairs.

It can be rearranged to:d𝑢𝑢𝑐𝑐 (𝑡𝑡) 𝑢𝑢𝑐𝑐 (𝑡𝑡) 𝑢𝑢(𝑡𝑡)
+
=
d𝑡𝑡
𝑅𝑅𝑅𝑅
𝑅𝑅𝑅𝑅

With the Laplace transform 𝑓𝑓 ′ (𝑡𝑡) ↔ 𝑠𝑠𝑠𝑠(𝑠𝑠) weget:

𝑠𝑠𝑈𝑈𝑐𝑐 (𝑠𝑠) +And with this:Figure 22: Properties of Laplace transform and
Laplace transform pairs [9].
In order to learn how to obtain a transfer
function, let us consider an RC circuit as an

1
𝑈𝑈𝑐𝑐 (𝑠𝑠)𝑅𝑅𝑅𝑅== 𝐻𝐻(𝑠𝑠)
1
𝑈𝑈(𝑠𝑠)
𝑠𝑠 + 𝑅𝑅𝑅𝑅

which is the transfer function of the RC circuit.
From this we can deduct the system output froma given input. Let us assume a unit step 
1
𝑈𝑈(𝑠𝑠) = :
𝑠𝑠

1
1
𝑅𝑅𝑅𝑅
𝑈𝑈𝑐𝑐 (𝑠𝑠) =1
𝑠𝑠 + 𝑅𝑅𝑅𝑅 𝑠𝑠

example as shown in Figure 23.
Let us write down the current:d𝑢𝑢𝑐𝑐 (𝑡𝑡) 𝑢𝑢(𝑡𝑡) − 𝑢𝑢𝑐𝑐 (𝑡𝑡)=𝐼𝐼(𝑡𝑡) = 𝐶𝐶 ∙d𝑡𝑡
𝑅𝑅

𝑈𝑈𝑐𝑐 (𝑠𝑠) 𝑈𝑈(𝑠𝑠)
=
RC
𝑅𝑅𝑅𝑅

And from this the system output in time
domain, with 𝑅𝑅𝑅𝑅 = 𝜏𝜏 being the time constant:
𝑡𝑡

−𝑥𝑥
−𝑡𝑡
1 −𝑥𝑥
𝑥𝑥 = 𝑡𝑡= 1 − 𝑒𝑒 𝜏𝜏
𝑒𝑒 𝜏𝜏 d𝑥𝑥 = (𝑒𝑒 𝜏𝜏 )|𝑥𝑥 = 00 𝜏𝜏𝑢𝑢𝑐𝑐 (𝑡𝑡) = ∫11 － 14

If we go back to the differential equationd𝑢𝑢𝑐𝑐 (𝑡𝑡) 𝑢𝑢𝑐𝑐 (𝑡𝑡) 𝑢𝑢(𝑡𝑡)
+
=
d𝑡𝑡
𝑅𝑅𝑅𝑅
𝑅𝑅𝑅𝑅

−𝑡𝑡

and solve it, we will find that 𝑢𝑢𝑐𝑐 (𝑡𝑡) = 1 − 𝑒𝑒 𝜏𝜏 .

In the next step we want to transform thetransfer function

𝐻𝐻(𝑠𝑠)

from the complex

frequency domain to the transfer function in
frequency domain 𝐻𝐻(𝑗𝑗𝑗𝑗).

Figure 25: Actual Bode plots for the RC example
with a time constant of 1 ms [9].

𝐻𝐻(𝑠𝑠)|𝑠𝑠=𝑗𝑗𝑗𝑗 = 𝐻𝐻(𝑗𝑗𝑗𝑗) = |𝐻𝐻(𝑗𝑗𝑗𝑗)|𝑒𝑒𝑗𝑗 𝐻𝐻(𝑗𝑗𝑗𝑗) = |𝐻𝐻(𝑗𝑗2𝜋𝜋𝑓𝑓)|𝑒𝑒𝑗𝑗 𝐻𝐻(𝑗𝑗2𝜋𝜋𝜋𝜋)In this equation we can nicely see theseparation of the amplitude in dependence ofthe frequency |𝐻𝐻(𝑗𝑗2𝜋𝜋𝜋𝜋)| and the phase independence of the frequency 𝑒𝑒

𝑗𝑗 𝐻𝐻(𝑗𝑗2𝜋𝜋𝜋𝜋). Whenplotting these two functions, we get something

like what is shown in Figure 24. These plots arecalled Bode plots.

Let us consider the case of a sinusoidal signal as
an input signal. We will find, that e.g. for an
input of cos(2𝜋𝜋 ∙ 50𝑡𝑡), we will get an output of|𝐻𝐻(𝑗𝑗𝑗𝑗)|cos(2𝜋𝜋 ∙ 50𝑡𝑡 + 𝐻𝐻(𝑗𝑗𝑗𝑗)) , where |𝐻𝐻(𝑗𝑗𝑗𝑗)| isthe amplitude of the output signal and 𝐻𝐻(𝑗𝑗𝑗𝑗)

its phase shift. Software like MathWorks
Simulink allows us to simulate such a system.

In the case shown in Figure 26, the input signal
has a frequency of 160 Hz.

Figure 24: Example of Bode plots [9].
If we come back to the RC example and assume
a time constant of 1 ms, we get Bode plots asshown in Figure 25.

Figure 26: Signal simulation of a 160 Hz sine
wave through a RC circuit with a time constantof 1000 ms [9].

11 － 15

𝑅𝑅𝜔𝜔0
𝑠𝑠
𝑄𝑄 𝑠𝑠
𝐶𝐶
=
𝑍𝑍(𝑠𝑠) =1
1
𝑠𝑠 2 + 𝑅𝑅𝑅𝑅 𝑠𝑠 + 𝜔𝜔02 𝑠𝑠 2 + 𝑄𝑄 𝑠𝑠 + 𝜔𝜔02

From the figure we can clearly see the phaseshift, but we can also recognize a change in
amplitude. When calculating the output signal,
we find that it reads:

If we assume a resonance frequency of 1.3 GHz

1𝜋𝜋𝑢𝑢𝑐𝑐 (𝑡𝑡)𝑓𝑓=160 Hz =cos (2𝜋𝜋 ∙ 160𝑡𝑡 − )4√2

and a quality factor of 𝑄𝑄 = 1.3 ∙ 106, we get theBode plots as shown in Figure 28. This case

If we increase the frequency of the input signal

corresponds to a SRF cavity.

to 600 Hz, we will find that:15𝜋𝜋𝑢𝑢𝑐𝑐 (𝑡𝑡)𝑓𝑓=600 Hz = cos (2𝜋𝜋 ∙ 600𝑡𝑡 − )412with the corresponding simulation shown in
Figure 27.

Figure 28: Bode plot for a 1.3 GHz cavity with
Q=1.3E6 [9].
In case of a normal conducting cavity, thequality factor is much lower. Let us assume 𝑄𝑄 =7000 and compare both Bode plots in Figure 29.

We can clearly see that the bandwidth of thecavity is related with the quality factor.

Figure 27: Signal simulation of a 600 Hz sine
wave through a RC circuit with a time constantof 1000 ms [9].
This means that the amplitude and the phaseshift of the output signal depends on thefrequency of the input signal.
We can model a cavity using a RCL circuit, as
already seen above. It its case we can write:

Figure 29: Bode plot for a 1.3 GHz cavity with
Q1=1.3E6 and Q2=7E3 [9].
Until now we have considered the transfer
function for a single element or device. In thefollowing we want to describe a basic control

11 － 16

system in a transfer function representation, as
shown in Figure 30. There 𝐾𝐾(𝑠𝑠) represents thecontroller, P(𝑠𝑠) the plant one wants to control,and F(𝑠𝑠) the detector or sensor, which is used

to measure the response of the plant.

Figure 32: Calculating the transfer function of asimple feedback system [9].
Figure 30: Schematic of a simple control system
in a transfer function representation [9].
In order to be able to calculate the transfer
function of a whole system, we need to know
how to combine the transfer functions of single
elements. Figure 31 shows an overview of therules for the serial, the parallel and thefeedback case.

In the real world, feedback systems are much
more complicated. It is not uncommon to havesystems with several loops as shown in Figure
33.

Figure 33: Example of a more complicatedfeedback system with multiple loops [9].
The transfer function of such a system can be

Figure 31: Rules on how to combine single
transfer functions [9].
Following these rules, let us calculate thetransfer function of the feedback loop shown in
Figure 30. To this end, we first combine 𝐾𝐾(𝑠𝑠)and 𝑃𝑃(𝑠𝑠) . Then we apply the rule for the
feedback system. Figure 32 shows the process

step by step.

computed by using the Mason’s Gain Rule. In it
𝑀𝑀 is the transfer function of the system. 𝑀𝑀𝑗𝑗 is

the gain of one forward path. 𝑗𝑗 is an integer
representing the forward paths in the system.
∆𝑗𝑗 =1− the loops remaining after removing path𝑗𝑗. If none remain, then ∆𝑗𝑗 = 1. ∆= 1 + 𝛴𝛴 nontouching loop gains taken two at a time −𝛴𝛴

non-touching loop gains taken three at a time+𝛴𝛴 non-touching loop gains taken four at a time
− etc. The resulting rule reads:
𝑀𝑀 =11 － 17∑𝑗𝑗 𝑀𝑀𝑗𝑗 ∆𝑗𝑗∆In the following let us evaluate the impact of a
feedback loop in comparison to the open loop
case. To this end we will compare the transfer
functions. Until now we have considered ideal
systems. In the real world, we have to deal with
disturbances. Thus, let us add a disturbance tothe simple feedback system and write down thetransfer function. Figure 34 shows this for theclosed loop case on the left and the open loop
case on the right.

Figure 36: Combined Bode plots of the closed
and open loop cases [9].
case, the proportional gain KP is varied. We canclearly recognize an offset of the graphs for 𝑓𝑓 →0 Hz. In case of the open loop, there is no

disturbance rejection for low frequencies. For
higher frequencies we do see a rejection, but

this is only due to the chosen low-pass behaviorof the plant. In the feedback case, the higher thegain is chosen, the more disturbances are
rejected, which holds for lower and also higher
Figure 34: Closed and open loop systems with
disturbances [9].
Let us give the plant in both cases somemeaning and write down the transfer functionsin the complex frequency domain as well as in
the frequency domain (see Figure 35).

frequencies.
Beside the ability to suppress disturbances, a
feedback loop has to be stable. There are several
stability criteria: e.g. root locus, solving thecharacteristic equation, the Routh-Hurwitz
stability criterion, etc. The most simple andintuitive definition of stability is: A stablesystem is a dynamic system with a bounded
response to a bounded input (see Figure 37).

Figure 37: Schematic of a stable and a unstable
dynamic system [9].
Since we cannot try all bounded input signals
Figure 35: Transfer functions of closed and open
loop systems with disturbances [9].

on our system, let us take a look at thecharacteristic equation. It is the denominator of
the transfer function.

A good way of comparing these results is to lookat the Bode plots. Figure 36 shows the closed
and open loop cases combined. In the closed loop

11 － 18

𝐻𝐻(𝑠𝑠) =𝐾𝐾(𝑠𝑠 − 𝑧𝑧1 )(𝑠𝑠 − 𝑧𝑧2 ) … (𝑠𝑠 − 𝑧𝑧𝑛𝑛−1 )(𝑠𝑠 − 𝑧𝑧𝑛𝑛 )(𝑠𝑠 − 𝑝𝑝1 )(𝑠𝑠 − 𝑝𝑝2 ) … (𝑠𝑠 − 𝑝𝑝𝑛𝑛−1 )(𝑠𝑠 − 𝑝𝑝𝑛𝑛 )A necessary and sufficient condition for a

The closed loop is stable, if the open loop gain at

feedback system to be stable is that all the poles-180 degree (or -540 degree, etc.) is less than 1(𝑝𝑝1 , 𝑝𝑝2 , 𝑝𝑝3 , … , 𝑝𝑝𝑛𝑛 ) of the system transfer function

or 0 dB (see Figure 39). Furthermore, by thismethod it is also possible to evaluate the gain

called the zeros of the transfer function. Thus,

margin, since a larger margin means a betterthe following system would be stable:robustness.

have negative real parts. ( 𝑧𝑧1 , 𝑧𝑧2 , 𝑧𝑧3 , … , 𝑧𝑧𝑛𝑛 ) are

𝐻𝐻(𝑠𝑠) ==𝑠𝑠 + 1.5

𝑠𝑠 3 + 4𝑠𝑠 2 + 6𝑠𝑠 + 4

𝑠𝑠 − (−1.5)[𝑠𝑠 − (−1 + 𝑖𝑖)][𝑠𝑠 − (−1 − 𝑖𝑖)][𝑠𝑠 − (−2)]

Three poles: −1 ± 𝑖𝑖 and -2.

And the following system would be unstable:
𝑠𝑠 + 1.5
𝑠𝑠 3 − 2𝑠𝑠 2 + 4
𝑠𝑠 − (−1.5)=[𝑠𝑠 − (1 + 𝑖𝑖)][𝑠𝑠 − (1 − 𝑖𝑖)][𝑠𝑠 − (−2)]
𝐻𝐻(𝑠𝑠) =Figure 39: Example bode plot for a stable andunstable system [9].

Three poles: 1 ± 𝑖𝑖 and -2.

Figure 38 shows the poles and zeros in the polezero map. The right half plane poles are
unstable.

Another way to evaluate the stability is to plot
the Nynquist diagram. It is the plot of theimaginary part versus the real part of thetransfer function in the frequency domain. An
example is shown in Figure 40.

Figure 38: Example of a pole-zero map [9].
In some cases, the characteristic equation canbe very complicated and it is not easy to

Figure 40: Example of a Nyquist diagram [9].

evaluate the poles. In addition, one also wants
to know, if a given feedback system is stable ata certain feedback gain. To answer thisquestion, it is popular to evaluate the Bode plot.

11 － 19

In real-world systems the proportional andparticle accelerator. At such facilities a personal

integral (PI) controller is very popular. It can beprotection system (PPS) is required. The goal ismodeled as shown Figure 41. In some cases, ato prevent any harm, injury to or death ofdifferential part is added, extending it to a PID

humans working at the facility of being aroundcontroller.

it. E.g., if a particle accelerator is being
operated, it is forbidden to enter the accelerator
tunnel. If someone opens a door to the tunnel
during operation, the operation is stopped
automatically. In addition to a PPS, especiallyin larger scale facilities, a machine protection
system (MPS) is implemented. Its goal is toprevent the accelerator or in most cases
subcomponents from damaging or destroying
itself. If e.g. arcing in a klystron is detected, the
LLRF system receives a signal to stop thegeneration of the drive signal. Since in such acase no accelerating field can be generated
anymoreFigure 41: Modelling of the PI controller [9].

in

the

cavities,

theenergyoftransmitted beam would be wrong, resulting in

A more modern and very useful type ofcontroller is the multiple input multiple output(MIMO) controller (see Figure 42). Beside the
PID controller functionality, it can also be used
e.g. for the cancellation of cross coupling
between inputs as well as for the cancellation ofa passband mode.

downstream beam loss. In order to prevent this,the beam is also turned off automatically insuch a case. The signal triggering the stop of
operation of subsystems is called an interlock
signal. All LLRF systems must have interlock
capability. Since it is imperative to work
reliably, such interlock functionality should be
hardwired in hardware or firmware. Figure 43
shows a possible solution. Note, that an
implementation in software is not reliably
enough.

Figure 43: Possible implementation of interlock
functionality in firmware.
Figure 42: Feedback loop with MIMO controller[9].

Beside this, the LLRF system should have a

8. Example Features of an LLRF System

handling. A simple example is to implement a

Typically, an LLRF system is a subsystem of a
facility as e.g. a test stand or a large scalecertain degree of exception prevention andlimiter on the drive signal. This way e.g.
overdrivingthehigh-power

amplifierorquenching a cavity can be prevented. In

11 － 20

addition, it is advisable to implement a limiter

microphonics. Figure 44 shows pictures of three

on the set point amplitude. This way an

different piezo configurations.

unexperienced operator of the LLRF systemcannot enter values, which could be potentially
dangerous. An example for active exception
handling would be quench detection. The loaded
quality factor 𝑄𝑄𝐿𝐿 of a cavity can be calculated

from the pickup signal during the decay time. In
case

of a

quench, the𝑄𝑄𝐿𝐿value drops

significantly. The LLRF system can compute the
𝑄𝑄𝐿𝐿 value for every RF pulse and when it falls

below a predefined threshold, the drive signal iscut, and an interlock signal is generated.

At ILC it is planned to utilize 9-cell SRF cavities
for beam acceleration. Since these cavities havenine cells, they have nine different eigenmodes.
For beam acceleration only the so-call 𝜋𝜋-mode
is suitable. Thus, the goal is to feed all power

only to this mode. All other modes should be

suppressed. This can be achieved by e.g. Notch
8𝜋𝜋filters at the ADCs for the -mode. It is also9possible to add an additional filter for the

7𝜋𝜋
9

-

mode in a MIMO controller, as mentioned
above.

Another feature typically implemented within
the LLRF system is the fast cavity tuning. SRF
cavities are built and assembled at room
temperature, but operated at 2 K. During thecooldown the cavity is typically relaxed in orderto prevent any possibilities of unwanted
deformations. The cavity was pre-tuned at room
temperature to roughly reach the design
frequency at 2 K. In order to actually reach thedesign frequency, the cavity can be elastically
deformed in a controlled manner, using motor
tuners. These motors are slow stepper motors
and are left in position once the cavity has been
tuned. Beside the motor tuners, the cavity isalso equipped with a piezo tuner. This is used
for the compensation of fast frequency changes,
induced by e.g. Lorentz force detuning or

Figure44: Three differentof piezo
configurations on cavities during the S1-global
project [10].
As stated at the beginning, the goal of the LLRF
system is to control the amplitude and phasewithin cavities to be better than the required
stability. Thus, a LLRF system should have thefeatureofcomputingtheRFstability.

Depending on the facility, different kinds ofstability have to be computed. In a single cavity
control scheme, of course the stability of thesingle cavity is important. For the amplitude
the stability is typically defined as ∆𝐴𝐴/𝐴𝐴, where∆𝐴𝐴 is the standard deviation of the amplitudeand 𝐴𝐴 the average of the amplitude. For thephase ∆𝛷𝛷 is used. These values are computed

only for a certain time period, as e.g. for the

11 － 21

flattop region or the beam transient time. In
this case the stability is called intra train
stability. In case of vector sum control, thestability of the vector sum amplitude and phase[3] S. Pfeiffer, LLRF Controls and Feedback,
The CERN Accelerator School, 2016

[4] L. Doolittle et al., High Precision RF

Control for SRF Cavities in LCLS-II,

is computed in the same way. It is also possible
to define a measure for the stability from pulse
to pulse. This is called the inter train stability.

9. Summary
Due to the limited length of this lecture, it is

SRF2021, 2017[5] J. Branlard et al., Installation and First

Commissioning of the LLRF System for theEuropean XFEL, IPAC17, 2017[6] T. Miura et al., Digital LLRF Control

System for cERL, 13th Annual Meeting of

impossible to show and explain all important
aspects of LLRF in detail. It is a subject one has
to study for an extended time. Nevertheless,with the overview given, everyone who isplanning to get involved with LLRF should now

Particle Accelerator Society of Japan, 2016[7] https://pt.wikipedia.org/wiki/Sinal_digital#/media/Ficheiro:Digital.signal.svg[8] T. Schilcher, Applications in Digital Signal

Processing, CAS – CERN Accelerator

understand what he or she should learn. First,

School:learn about the target facility. What are theintegrated.

Second,

learn

the

requiredtheory, etc. Third, learn about analog hardware.

DigitalSignal[9] F. Qiu, Tutorial on control theory, 10th
International Accelerator School for Linear

theoretical background as e.g. cavity theory, RF
theory, signal processing theory, controlleronProcessing, Sigtuna, 2007

requirements for e.g., stability, etc.? Plan
carefully, how the LLRF system can be

CourseColliders, Japan, 2016[10] C. Pagani et al., Test results of the

Fourth, learn about digital hardware. Fifth,
learn about firmware. Sixth, learn about
software.
Every of these topics is an individual field ofexpertise. But as an LLRF expert, one has toknow the most important aspects of every topic
in order to design, implement, commission, andoperate an LLRF system.

References[1] T. Schilcher, Vector Sum Control of Pulsed

Accelerating Fields in Lorentz Force
Detuned Superconducting Cavities, PhD

Thesis, 1998

[2] M. Omet, Digital Low Level RF Control

Techniques and Procedures Towards theInternational Linear Collider, PhD Thesis,

201411 － 22

international

S1-global

cryomodule,

Proceedings of the 8th Annual Meeting ofParticle Accelerator Society of Japan, 2011