phd thesis in control engineering - ce.uniroma2.it
TRANSCRIPT
Universita degli Studi di Roma“Tor Vergata”
Facolta di Ingegneria
Dottorato di Ricerca inInformatica ed Ingegneria dell’Automazione
XXIV Ciclo del Corso di Dottorato
Real-time control solutions
for plasma control problemsin Tokamak experiments
Riccardo Vitelli
A.A. 2010/2011
Relatore: Prof. Luca Zaccarian
Alla mia famigliaAgli amici
Acknowledgements
This work couldn’t have been carried out without the support of many
people who helped me with their knowledge, their time and, most impor-
tant, their friendship. Starting from my tutor, Prof. Luca Zaccarian, who
introduced me to the world of Tokamaks and Nuclear Fusion during my de-
gree thesis, and supported me since then up to the “Laurea Specialistica”
(master degree) and now the doctorate. Then I’d like to thank the whole
PPCC Team at the JET, which guided me during my master degree thesis
and with which I still have the pleasure to work. Dr. Filippo Sartori, Dr.
Andre Neto, Dr. Luca Zabeo, Dr. Fabio Piccolo, Dr. Katiuscia Zedda,
thank you very much for all that you have done for me. Together with the
JET staff, I’d like to thank the CREATE people, in particular Dr. Gian-
maria De Tommasi, Prof. Vincenzo Coccorese, Prof. Giuseppe Ambrosino,
Prof. Alfredo Pironti and Prof. Raffaele Albanese, who made the whole
JET experience possible. A special thank you goes to Dr. Teresa Bellizio,
with whom I had the pleasure to work, and to the other italians that were
working at the JET: Dr. Carmelenzo Labate, Dr. Antonio Barbalace and
Dr. Massimo Camplani.
Last but not least I want to thank my family, which has always been so
supportive, expecially during the long periods I was far from home.
I
Contents
1 Introduction 1
2 Tokamaks and Nuclear Fusion 3
2.1 Nuclear fusion . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1.1 Plasma and confinement . . . . . . . . . . . . . . . . 4
2.2 Tokamaks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 The state of the art: the JET . . . . . . . . . . . . . . . . . 8
2.4 The Road Ahead: ITER and DEMO . . . . . . . . . . . . . 9
3 Plasma control problems and solutions 11
3.1 The Vertical Stabilisation . . . . . . . . . . . . . . . . . . . 11
3.1.1 The Vertical Instability problem . . . . . . . . . . . 11
3.1.2 The JET Vertical Stabilization system . . . . . . . . 14
3.1.2.1 Estimation of the vertical plasma velocity . 16
3.1.2.2 JET’s Vertical Stabilisation and ELM pacing 23
3.2 Plasma shape and position control . . . . . . . . . . . . . . 25
3.2.1 JET Shape Control . . . . . . . . . . . . . . . . . . . 25
3.2.1.1 XSC: eXtreme Shape Controller . . . . . . 28
3.2.1.2 CLA: Current Limit Avoidance . . . . . . . 30
3.3 Power supplies related problems . . . . . . . . . . . . . . . . 37
3.3.1 Induced plasma oscillations: the AL-F amplifier . . . 37
3.3.1.1 Model of the AL-F feedback . . . . . . . . 41
CONTENTS II
CONTENTS
3.3.1.2 Anti-windup solution . . . . . . . . . . . . 51
3.3.2 The JET EFCC Coils control system . . . . . . . . . 58
4 Technical solutions and implementation 61
4.1 The MARTe Framework . . . . . . . . . . . . . . . . . . . . 61
4.1.1 The BaseLib2 . . . . . . . . . . . . . . . . . . . . . . 62
4.1.2 Multithreaded Application Realtime executor (MARTe) 67
4.1.2.1 Generic Application Module . . . . . . . . 67
4.1.3 Code generation via SysML . . . . . . . . . . . . . . 75
4.1.3.1 Sample application to the FTU Tokamak . 82
4.2 The JET systems . . . . . . . . . . . . . . . . . . . . . . . . 87
4.2.1 The Vertical Stabilisation system . . . . . . . . . . . 87
4.2.1.1 The Vertical Stabilization hardware . . . . 88
4.2.1.2 Interfacing with JET . . . . . . . . . . . . 90
4.2.1.3 Vertical Stabilization GAMs . . . . . . . . 91
4.2.1.4 User Interface . . . . . . . . . . . . . . . . 100
4.2.1.5 First Results . . . . . . . . . . . . . . . . . 102
4.3 The new FTU Feedback System . . . . . . . . . . . . . . . . 106
4.3.1 Experimental results . . . . . . . . . . . . . . . . . . 107
5 Conclusions and future work 113
Bibliography 115
List of Figures 126
List of Acronyms 131
CONTENTS III
Chapter 1
Introduction
The energy problem is one of the greatest challenges mankind will have to
face in the following years. The progressive depleting of fossil fuels, the
necessity of cleaner ways to produce energy and the growing demand for
electrical power from developing countries, will force humanity to invest
more and more in the research for alternative power sources.
While renewable power sources, such as photovoltaic and wind, don’t
provide the required reliability, nuclear fission can’t be seen as a long-term
solution to the power generation problem due to the production of long
lived radioactive waste.
In this framework, nuclear fusion is becoming more and more considered
as the most probable solution to the energy problem due to the short life of
the nuclear waste produced, as well as the huge availability of fuel, namely
deuterium (present in big quantities in salt water) and tritium (that can
easily be bred from lithium, which makes up the vast majority of Earth’s
crust, directly in the blanket of a Tokamak [1]).
The trait d’union of this Thesis is fusion technology, particularly related
to control systems for Tokamaks device. After a brief introduction on the
experimental devices and on fusion in general, some of the main problems
1
1 Introduction
related to the magnetic control of nuclear fusion experiments (particularly
the vertical stabilization problem [2] and the plasma shape control [3]),
together with their control solutions are reported. Finally the implementa-
tion of the aforementioned solutions is illustrated, in particular concerning
the development carried on the MARTe Framework [4].
2
Chapter 2
Tokamaks and Nuclear
Fusion
2.1 Nuclear fusion
Nuclear fusion is the basic form of energy production in the stars. It is a
process in which atomic nuclei join to form an heavier atom whose mass
is less than the sum of the masses of the reactants [5, 6]. This reduction
of mass leads to the production of large amounts of energy following the
famous Einstein equation E = mc2. Of the various known fusion reactions,
the most promising one uses two hydrogen isotopes, deuterium and tritium,
which result in the reaction:
21D + 3
1T → 42He(3.5MeV ) + n(14.1MeV )
The D-T reaction has been chosen as the most promising one as it is
a good compromise between energy produced, large cross section (from
which depends the likelihood of interactions) and, above everything, the
availability of both isotopes on Earth.
An important law for nuclear reactions is the Lawson Criterion [7]
3
2 Tokamaks and Nuclear Fusion 2.1 Nuclear fusion
(also known as “triple product”), which defines the conditions needed to
reach ignition, that is when the heating generated by the nuclear reaction
is capable of maintaining the temperature of the plasma against all losses
or, in other words, of keeping the nuclear reaction going on theoretically
forever while confined. In the case of the D-T reaction the Lawson Criterion
states that:
nTτE ≥ 1021keV · s−1 ·m−3 (2.1)
where n is the plasma density, T the plasma temperature and τE the con-
finement time. The Lawson Criterion basically states that ignition condi-
tions can be achieved either by dense plasmas with low τE or by less dense
plasmas with an higher τE .
Directly derived from the Lawson Criterion, the Fusion Energy Gain
Factor Q is defined as the ratio between generated fusion power and power
used for plasma heating. Ignition is when Q =∞, however a value of Q in
the order of 20 is considered enough for a practical reactor. The particular
condition of Q = 1 is called breakeven and reaching it is considered as a
sort of milestone in the fusion power research field. Currently the largest
Q factor obtained on Earth is 0.61 registered at the JET Tokamak in 1997.
2.1.1 Plasma and confinement
At the high temperatures needed for fusion reactions to happen, matter
is subject to another change of state becoming plasma. In a plasma the
electrostatic forces which bind electrons and nuclei are overcome as they
become two distinct populations of negatively charged electrons and posi-
tively charged ions. This gives to plasma the important property of being
capable of conducting currents and reacting to magnetic fields, which is of
paramount importance in the development of magnetic confinement fusion
device as it will be shown later.
4
2 Tokamaks and Nuclear Fusion 2.1 Nuclear fusion
Burning plasmas in fusion research are usually macroscopically studied
by means of the MagnetoHydroDynamics (MHD) equations [5]. This dis-
cipline, initiated by Alfven in 1942 [8], studies the dynamics of conducting
fluids under the action of magnetic fields. Plasmas, due to their aforemen-
tioned properties, fit perfectly in this category.
MHD equations consists fundamentally of a combination of the Navier-
Stokes equations of fluid dynamics, together with Maxwell’s equations of
electromagnetism: the basic idea is to model in this way the dynamics of
the magnetic fields due to the action-reaction of conductiong fluids.
A simplified explanation of the ideal MHD equations for plama model-
ing can be found in [9].
The Lawson Criterion (2.1) basically states that in order to achieve
steady-state operations, a fusion machine should achieve high plasma den-
sities (n) and temperatures (T ) for enough time (τE). In stars due to their
immense mass, the gravitational force is capable of confining the plasma
long enough to achieve fusion reactions. This kind of gravitational confine-
ment, however, is unthinkable to be obtained on Earth.
Two main approaches have so arisen to confine plasma: inertial con-
finement and magnetic confinement. In the former approach a small pellet
of D-T fuel is bombarded by high-power laser causing it to explode, so cre-
ating very high density plasmas for few nanoseconds1. The latter approach
is more widespread and uses lower density gaseous fuel but with longer τE
by constraining the plasma via magnetic fields. Tokamak devices are the
most common form of magnetic confinement devices.
1In the USA this approach to nuclear fusion is being carried out in the NationalIgnition Facility (NIF) at the Lawrence Livermore National Laboratory in Livermore,California.
5
2 Tokamaks and Nuclear Fusion 2.2 Tokamaks
2.2 Tokamaks
A Tokamak (Russian acronym for toroidalnaya kamera i magnitnaya katiushka,
“toroidal chamber and magnetic coil”) is a fusion device that uses strong
magnetic fields to confine the plasma within a vacuum vessel with a toroidal
shape. The first Tokamaks were first developed in the former Soviet Union
in the 60s [5].
Inner Poloidal Field Coils(Primary winding)
VacuumVessel
Outer PoloidalField Coils
ToroidalField Coils
MechanicalStructure
TransformerLimbs
JG98.356/24c
Figure 2.1: Structure and scale of a Tokamak: the JET (Joint EuropeanTorus).
In Tokamaks the plasma is confined in a vacuum vessel (or chamber)
by means of a set of toroidal field (TF) coils, while poloidal field (PF) coils
permit a precise shaping and positioning of the plasma, as well as the in-
duction of a current in the plasma via transformer effect (central solenoid),
and the stabilization of vertical instabilities in case of elongated plasmas.
In Figure 2.1 the standard structure of a Tokamak device is reported.
6
2 Tokamaks and Nuclear Fusion 2.2 Tokamaks
Being gaseous, it is not possible to define a precise position and shape
for the plasma. However the plasma “border” is usually considered coin-
cident with the LCMS (Last Closed Magnetic Surface), i.e. the last mag-
netic surface which doesn’t intersect any physical object (in case of limiter
configuration), or on which lies the X-point2 for a divertor configuration
(separatrix ). In Figure 2.2 the differences between a limiter and a divertor
plasma is shown.
Figure 2.2: Differences between a limiter and a divertor plasma (JET pre-divertor and JET as of today).
One of the major advantages of the divertor configuration plasmas is
the mitigation of the sputtering or melting of material from the limiters to
inside the plasma, as impurities in the plasma tend to dilute the fuel and
generate radiation losses [5]. Moreover it has been shown that the presence
of an X-point greatly helps in reaching high confinement modes (H-mode),
thus improving fusion performances [10].
2The X-point is a point at which the poloidal magnetic field is zero.
7
2 Tokamaks and Nuclear Fusion 2.3 The state of the art: the JET
In a Tokamak device plasma is heated partially via the Joule effect due
to the plasma current (ohmic heating). However as the resistivity of the
plasma falls sharply with the increase of temperature, additional exter-
nal heating system are needed, such as Neutral Beam Injection (NBI),
which uses beams of accelerated ions to move energy to the plasma; Ion
Cyclotron Resonant Heating (ICRH), which heats the plasma through
radio waves resonating with the plasma ion rotation; Lower Hybrid Cur-
rent Drive (LHCD) which uses microwaves with several MW of power at
frequencies in the range of 1-5 GHz accelerate the plasma electrons.
2.3 The state of the art: the JET
The Joint European Torus (JET) is the world’s largest Tokamak [11]. It has
a major radius R0 = 2.96m, minor radius a = 0.96m, elongation k ≤ 1.6,
plasma current Ip < 6MA and a toroidal field Bt < 4T and is equipped
with several additional heating systems, which enable the injection of large
amounts of external power into the plasma. The ICRH has 32MW of
installed power, while the LHCD system is able to provide 12MW , for
20s, at the generator source. After the 2010 upgrades, the neutral beam
injector (NBI) is able to provide up 34MW of power for a maximum of 20s.
Moreover, the ICRH and NBI can also be used to produce non-inductive
current drive. The NBI system has also the ability of generating toroidal
angular momentum, a very important feature for the overall MHD stability
of the plasma. An overview of JET, together with its scale, is shown in
Figure 2.1.
Although JET was not initially designed to operate with a divertor, new
scientific results, in particular the discovery of the high confinement mode
in ASDEX-Upgrade, lead to a major upgrade of JET and the consequent
installation of a divertor system. The latest version of the JET divertor is
known as mark-II and is depicted in Figure 2.3.
For an overview of the JET results see [12].
8
2 Tokamaks and Nuclear Fusion 2.4 The Road Ahead: ITER and DEMO
JG00.47/32c
Divertor
tiles
Coils
Cryopump
Figure 2.3: Structure of the JET Tokamak divertor region.
2.4 The Road Ahead: ITER and DEMO
ITER (International Thermonuclear Experimental Reactor) is the next step
in the race towards power production from nuclear fusion [13, 14, 15]. ITER
will become the world’s largest Tokamak device, built by seven cooperating
members (the European Union, India, Japan, People’s Republic of China,
Russia, South Korea and USA), and will be hosted in Cadarache, France.
Figure 2.4: 3D model of the ITER Tokamak.
It has been designed to reach a Q factor of up to 10 (500MW output
with 50MW of input power), and is intended to study plasmas after the
9
2 Tokamaks and Nuclear Fusion 2.4 The Road Ahead: ITER and DEMO
breakeven threshold. A plasma pulse in ITER should last up to 480 sec-
onds (roughly an order of magnitude more than in JET). Construction of
the site begun in 2007, and the first plasma is planned in 2019. ITER is
planned to be built by outsourcing the design and construction phase as
much as possible, in order to develop industrial interest in nuclear fusion
energy production.
DEMO (DEMOnstration Plant) [16, 17] is intended to build on the
success of ITER the first real fusion power plant. The envisaged goal of
DEMO is to produce at least 2000MW of electrical power on a continual
basis. To achieve this goal DEMO should be at least a 15% bigger than
ITER and with an higher plasma density. However a success of ITER is
considered more than enough to proceed with the development of DEMO,
which, if everything proceeds on schedule, should be ready by 2033.
10
Chapter 3
Plasma control problems
and solutions
3.1 The Vertical Stabilisation
3.1.1 The Vertical Instability problem
Non-circular, elongated plasmas have naturally considerable advantages re-
garding confinement, achievable pressure and space utilisation1. However
elongated plasmas suffer from a natural fast vertical instability which re-
quires closed-loop feedback control, without which no experiment could be
carried out.
This instability can be explained in a simplified way by considering Fig-
ure 3.1, which depicts the vertical instability problem in the JET Tokamak.
In JET the plasma is elongated via two iron bar in which reflected currents
due to the plasma current flow (iron polar expansions in the Figure). The
vertical force generated on the plasma is inversely proportional to the dis-
tance. Assuming the current flowing in the two polar expansions identical,
1Vacuum chambers, in fact, need to have a vertically elongated shape in order tohave a big enough support structure to whitstand the enormous vertical forces due todisruptions.
11
3 Plasma control problems and solutions 3.1 The Vertical Stabilisation
the upwards and downwards forces are in equilibrium. However it is evi-
dent that the centre of the chamber is an unstable equilibrium point, and
so even a small perturbation δ from it will lead the plasma to hit the upper
or lower part of the chamber. The inverse of the time in which the plasma
hits the superior or inferior wall when not stabilized is called growth rate
γ.
Figure 3.1: The mechanism of plasma elongation and resulting verticalinstability. The iron polar expansions (shoes), colored in purple, are themain reason for the natural elongation of JET plasmas. Different plasmaelongation can be obtained by adjusting the currents in the shaping cir-cuit (blue) and PFX circuit (yellow). The vessel (green) provides somepassive stabilization, and the RFA circuit (red) is the actuator for activestabilization.
It is possible to estimate the growth rate by using a simplified model of
12
3 Plasma control problems and solutions 3.1 The Vertical Stabilisation
the vertical instability called rigid displacement model. In this model the
plasma is represented by one or more rigid filaments in which a constant
current flows. Those filaments are considered as having a single degree of
freedom, i.e. the vertical position of their current centroid. Combining
the equations of the poloidal circuits and passive structures with the force
balance equation, it is possible to obtain [2]:
~ψ(~I(t), zp(t)
)+R~I(t) = ~u(t)
mpzp(t) = −2πrpBr
(~I(t), zp(t)
)Ip
(3.1)
where ~ψ is the flux through circuits, passive structures and plasma fil-
aments; R is the resistance matrix; ~I is the vector of the poloidal field
currents and ~u are the tensions applied to the various circuits (zero for
the passive structures); mp, zp and rp represent mass, vertical and radial
position of the plasma; Ip is the plasma current and Br the magnetic field
on the plasma.
The model can be then linearized:
∂ ~ψ
∂~Iδ~I +
∂ ~ψ
∂zpδzp +Rδ~I = δ~u(t)
mpδzp = −2πrp
(∂ ~Br
∂~Iδ~I +
∂ ~Br∂zp
δzp
)Ip
(3.2)
Substituting then for simplicity sake the following:
∂ ~ψ
∂~I= L
∂ ~ψ
∂zp= Ip
∂M
∂zp
.= g
−2πrp
(∂ ~Br
∂~I
)= Ip
(∂M
∂zp
)T.= gT −2πrp
(∂ ~Br∂zp
)= F
13
3 Plasma control problems and solutions 3.1 The Vertical Stabilisation
where L and M are the matrices of the mutual inductance between the
circuits and between the circuits and the plasma, and F the force, the
model becomes: Lδ~I + gδzp +Rδ~I = δ~u(t)
mpδzp = gT δ~I + Fδzp
(3.3)
Neglecting the plasma mass (mp = 0), (3.3) becomes:(L− g · gT
F
)δ~I +Rδ~I = δ~u (3.4)
from which it is possible to evaluate the growth rate [2] by analyzing the
eigenvalues with real part greater than zero of:
−(L− g · gT
F
)−1
R
In JET the growth rate can be estimated to be in the order of magnitude
of 102 − 103s−1.
3.1.2 The JET Vertical Stabilization system
In JET the vertical stabilization system is made by two different control
loops (Figure 3.2): a velocity loop which tries to regulate to zero the vertical
velocity of the plasma (thus halting its vertical movement) and a slower
current loop which regulates the current in the vertical amplifier ERFA to
a set point value (usually zero). While the two control loops may seem
at a first sight in opposition, actually, when considering the presence of
a shape controller system which will slowly “reshape” the plasma in the
desired position, their objective is easier to understand: the velocity loop
reacts rapidly to unwanted vertical movements by unbalancing the radial
field, while the slower current loops tries to recover the normal operating
14
3 Plasma control problems and solutions 3.1 The Vertical Stabilisation
mode.
vest
Adaptive controller
Figure 3.2: The JET Vertical Stabilisation controller.
The velocity loop is a simple proportional controller:
Vref (t) = GV (t) · vest(t) (3.5)
where Vref (t) is the control voltage component for the ERFA amplifier
due to the velocity loop, GV (t) is the proportional gain and vest(t) the
estimation of the plasma centroid vertical velocity. The current loop is
instead a PI controller:
Iref (t) = GI(t) · (eIERFA(t) +KI
∫ t
0eIERFA
(t)dt) (3.6)
where Iref (t) is the control voltage component for the ERFA amplifier due
to the current loop, GI(t) is the current loop gain, KI is the integral gain
and eIERFA(t) is the current error measured.
Notice that the gains GV (t) and GI(t) of the two controllers are time
varying. They are computed by an adaptive controller whose aim is to
change the gains (within certain thresholds) depending on the ERFA am-
15
3 Plasma control problems and solutions 3.1 The Vertical Stabilisation
plifier switching frequency, whose temperature is directly correlated to. In
fact, should the temperature raise above a certain threshold, the amplifier
could switch off causing a loss of control.
The gain of the velocity loop Gv(t) is computed as:
Gv(t) = Gv,FF (t) +GA
∫ t
0(fref − fsw(t))dt (3.7)
where Gv,FF (t) is a feedforward component (baseline gain for the velocity
loop), GA is an adaptation gain, fref is a reference switching frequency
(manually tuned to “safe” values) and fsw(t) is the ERFA switching fre-
quency, measured as the number of times the amplifier voltage crosses zero.
The gain of the current loop is proportional to the velocity one:
GI(t) = GI,FF (t) +KGv(t) (3.8)
where GI,FF (t) is a feedforward component and K is a gain.
3.1.2.1 Estimation of the vertical plasma velocity
One of the most critical parts of JET Vertical Stabilisation system is the
evaluation of the plasma vertical velocity. Due to the small required cycle
time it is not possible to run full shape reconstruction algorithms in real
time, so it is necessary to obtain an estimation of the required measure by
using the various magnetic signals coming from the Tokamak.
In particular at JET these measures are provided by different type of
probes situated in different poloidal, radial and toroidal locations. The
Internal Discrete Coils (IDC, also known as “Mirnov coils”, Figure 3.3) have
a 3dB cut-off frequency of 10kHz. IDC provide a direct flux measurement
of the tangential component of the poloidal magnetic field. Each of the JET
octants2 contains 18 IDC coils, so that eight different measurements, in the
2The JET machine is commonly subdivided in eight sectors, called octants, in thetoroidal direction.
16
3 Plasma control problems and solutions 3.1 The Vertical Stabilisation
same poloidal position, are available at eight different toroidal positions.
In Figure 3.4 the position of the IDC in the JET Tokamak is reported.
Figure 3.3: Photo of an internal discrete coil.
The normal component of the poloidal magnetic field is measured in-
stead by the saddle coils, 3.2mm diameter cables shaped to form a rect-
angular loop and mounted outside the vessel. Each octant has 14 saddle
coils installed. Figure 3.5 shows the positions of IDCs and saddle coils in a
single octant.
The estimation of the vertical velocity is carried out by using a tech-
nique elaborated by Zakharov [18], which relates the vertical position of the
plasma centroid zc (scaled by the concatenated toroidal current IΦ) with
the measures of the tangential (Bt) and normal (Bn) components of the
magnetic field around a closed curve l. Zakharov equation is reported in
(3.9), where r and z represent the radial and vertical coordinates.
IΦzc =1
µ
∮l
[Bt(r, z)z − r log
(r
R0
)Bn(r, z)
]dl (3.9)
By deriving (3.9), making l coincide with the JET’s vacuum vessel and
taking into account the fact that the magnetic field can be measured only in
certain discrete position along the chamber (where the sensors are placed),
it is possible to rewrite the Zakharov equation as:
17
3 Plasma control problems and solutions 3.1 The Vertical Stabilisation
Figure 3.4: Position of the magnetic sensors in the JET Tokamak.
Ipzp =18∑i=1
aiBt(i) +14∑i=1
biBn(i)− Ipzp − Ipasszpass (3.10)
where Ipasszpass is relative to the passive structures, and ai and bi are
weights obtained by solving (3.9) in the locations where the sensors are
placed. For the JET the 18 weights of the Mirnov coils and the 14 ones for
the saddle loops are reported in Figure 3.6 [2].
In Figure 3.7 a sample of the signals of the JET Vertical Stabilization
system is reported (pulse #796323). The top plot shows the control ac-
tion of the feedback (voltage applied to the coil), while the bottom one,
VSEL, shows the estimation (weighted by the plasma current) of the verti-
3All signals acquired during each JET experiment are archived sequentially in adatabase since the beginning of operations.
18
3 Plasma control problems and solutions 3.1 The Vertical Stabilisation
Figure 3.5: Position of the saddle coils in the JET Tokamak.
cal velocity of the plasma. The middle plot reports IFRFA, i.e. the current
flowing in the vertical stabilization coils. This burst behavior is common
in the operation of the vertical stabilization system and is due to the fast
dynamics of the system which has to keep the plasma centroid near to the
unstable equilibrium in the center of the vacuum vessel.
Figure 3.8 shows pulse #79698, where a record current of 4.5MA was
reached, just before the long JET shutdown for the substitution of the
first wall. Notice the bursts of vertical velocity due to the inevitable Edge
Localized Modes (ELMs) with such energetic plasmas.
19
3 Plasma control problems and solutions 3.1 The Vertical Stabilisation
0 5 10 15 20 25 30 35−0.2
0
0.2
0.4
0.6
0.8
1
1.2
Coil Number
Weig
ht
Modified Set
Mirnov Coils
Saddle Loops
Figure 3.6: JET weights for Mirnov coils and saddle loops. Notice how theintroduction of the divertor pratically made unusable the coils in the lowerpart of the vacuum vessel due to the shielding effect of the divertor itself,leading to the necessity of setting to zero the relative weights (coils 10-18).
20
3 Plasma control problems and solutions 3.1 The Vertical Stabilisation
59.455 59.46 59.465 59.47 59.475 59.48 59.485−5000
0
5000
Time [s]
Vo
lta
ge
[V
]
Tension on ERFA coils (V5−VFRFA<S)
59.455 59.46 59.465 59.47 59.475 59.48 59.4850
50
100
150
200
250
300
350
Time [s]
Cu
rre
nt
[A]
Current on ERFA coils (V5−IFRFA<S)
59.455 59.46 59.465 59.47 59.475 59.48 59.485
−2
−1
0
1
2
x 106
Time [s]
Zp
dIp
ZpdIp signal (Ip weighted vertical velocity) (V5−VSEL<S)
Figure 3.7: JET Vertical Stabilization system, pulse #79632.
21
3 Plasma control problems and solutions 3.1 The Vertical Stabilisation
52 52.1 52.2 52.3 52.4 52.5 52.6 52.7 52.8 52.9 53
−1
−0.5
0
0.5
1
x 104
Time [s]
Vo
lta
ge
[V
]
Tension on ERFA coils (V5−VFRFA<S)
52 52.1 52.2 52.3 52.4 52.5 52.6 52.7 52.8 52.9 53−1000
−500
0
500
1000
Time [s]
Cu
rre
nt
[A]
Current on ERFA coils (V5−IFRFA<S)
52 52.1 52.2 52.3 52.4 52.5 52.6 52.7 52.8 52.9 53
−5
0
5
10
15
x 107
Time [s]
Zp
dIp
ZpdIp signal (Ip weighted vertical velocity) (V5−VSEL<S)
Figure 3.8: JET Vertical Stabilization system, pulse #79698.
22
3 Plasma control problems and solutions 3.1 The Vertical Stabilisation
3.1.2.2 JET’s Vertical Stabilisation and ELM pacing
A particular use of the Vertical Stabilisation of the JET is to stimulate
Edge Localised Modes (ELMs).
ELMs are a class of MHD instabilities identifiable by the release of
large amounts of plasma internal energy and particles [5, 19]. The edge of
high confinement plasmas (H-mode plasmas), such as those of the JET, is in
fact characterized by very strong plasma density and temperature gradients
due to the formation of what is called an Edge Transport Barrier (ETB), as
shown in Figure 3.9. After an ELM the plasma pressure decreases abruptly
to slowly rise again. The phenomena is then repeated with an irregular
frequency.
Pla
sm
a p
ressure
0 1r/a
L-Mode
H-Mode
Pedestal
Collapse of pedestal
due to ELM
Formation of edge
transport barrier
Figure 3.9: Collapse of pedestal causes ELMs.
The main problem due to ELMs is the high energy load they unload
on the vacuum vessel walls. However, as the energy of an ELM is directly
proportional to the amount of time between two consecutive ELMs [20], it
is possible to partially mitigate this phenomena by instigating ELMs with
an high enough frequency. ELM pacing is still an open field of research,
however various techniques have been studied to force trigger ELMs, such
as impurity gas puffing and magnetic triggering (see [21, 22] for studies of
magnetic ELM triggering in the TCV and ASDEX Tokamak). Magnetic
23
3 Plasma control problems and solutions 3.1 The Vertical Stabilisation
triggering, in particular, is the standard technique used for ELM pacing in
JET. ELMs are triggered via impulses on the vertical amplifier [23], called,
in the JET gergon, “vertical kicks”.
−10
0
10
(kV
)
ELM pacing for Pulse #78442
a)
ERFA voltage
0
0.5
1
(a.u
.)
b)
D−alpha
−2
0
2
(kA
)
c)
Amplifier Current
9
9.5
10
(MJ)
d)
Diamagnetic energy
24.82 24.84 24.86 24.88 24.9 24.92 24.94 24.96 24.98 25−100
0
100
200
Time (s)
(MA
.m.s
−1)
e)
Vertical velocity
Figure 3.10: Example of ELM pacing via vertical kicks in pulse #78422.
In Figure 3.10 an example of ELM pacing via vertical kicks is shown
(pulse #78422). In the first and third plot, respectively, the voltage applied
and the current on the vertical stabilization coils are reported. The second
plot shows the Dα emission, which indicates the triggering of an ELM.
Notice in the last plot the vertical velocity estimation, which indicates how
the plasma reacts to each “kick”.
24
3 Plasma control problems and solutions 3.2 Plasma shape and position control
3.2 Plasma shape and position control
Precise positioning of the plasma column inside the vacuum vessel is one
of the most important aspects in Tokamak devices. Via shape control it is
possible to maximize the area occupied by the plasma inside the vacuum
vessel, to avoid excessive heat loads on components of the vacuum vessel
such as the divertor tiles [24], and generally to optimize plasma parameters.
3.2.1 JET Shape Control
The Shape Controller (SC) [25, 3] is the system responsible for shaping the
plasma column in the JET Tokamak by controlling the voltages applied on
the Poloidal Field (PF) coils whose name and positions are shown in Figure
3.11.
Circuit name
Toroidal Field
Magnetising
Vertical Field
Fast Radial Field
Radial Field
X-Point
Shaping
Divertors
(TF)
(P1)
(P4T)
(RFA)
(IMB)
(PFX)
(SHA)
(D1-4)
Coils series
24 toroidal coils
P3MU/L+P1EU/L+P1C
P4U+P4L
P2/3RU-P2/3RL
P4U-P4L
P1C
P2SU/L+P3SU/L
D1, D2, D3, D4
U
Figure 3.11: JET circuits generating the poloidal field.
While the P1 circuit is responsible for the generation of the plasma
current, all the other circuits take an active role in shaping the plasma
25
3 Plasma control problems and solutions 3.2 Plasma shape and position control
column. In particular the PFX circuit is mostly used to control the position
of the X-point and to reduce the stray fields from the P1 circuit, increasing
the inboard vertical field and allowing for a more D shaped plasma; the P4T
and IMB circuits share the same windings and produce the vertical field
of equilibrium and the radial field for the vertical position of the plasma
centroid; the Shaping circuit is responsible for changing and elongating the
plasma shape; finally the four divertor coils allow the formation of an X-
point and the control of its position, as well as the last close field surface
strike positions.
Each circuit can be controlled either in absolute current, proportional
(to the plasma current) current or against a geometrical parameter, defined
as a vector named Gap (see Figure 3.12). Examples of Gaps are the Radial
Outer Gap (ROG), which defines the distance between the outer limiter
and the plasma, and the Radial Inner Gap (RIG), the inner limiter ROG
analogue. The amplifiers can also be set in blocked state, where minimum
negative voltage is applied, and no induced current is allowed to flow in the
circuit (due to the presence of a diode); or in the free-wheeling state where
0 V are applied across the circuit.
Although the PF circuits are independently controlled, they are strongly
coupled due to their mutual inductances. In the absence of plasma the full
circuit equations can be written as:
VC = RCIC +MIC (3.11)
where VC is a column vector with the circuits voltages, RC is a diagonal
square matrix with the circuits resistances, IC is the circuits measured
currents, and M is a square matrix containing all the self and mutual
inductance terms.
The controller structure was designed to be independent of the control
26
3 Plasma control problems and solutions 3.2 Plasma shape and position control
Figure 3.12: Main Gaps in the JET Tokamak. Gaps are geometrical dis-tances of the plasma to a given point, that can be controlled by shapecontroller to a prescribed value. One of the most used is the Radial OuterGap (ROG), controlled by changing the vertical field produced by the P4Tcircuit.
mode selection and it can be summarised [3] as:
Vref = RCIC +K(Yref − Y ) (3.12)
where Y and Yref are respectively the vectors of measures and references
of the controlled variables, and K is a gain matrix defined as:
K = H · (MT−1C−1) (3.13)
where H is named cancellation matrix and cancels the coupling effects of
the faster circuits, and C contains the delays due to the dynamics of each
circuit. T has the role of translating the current measurements in mean-
ingful control variables.
27
3 Plasma control problems and solutions 3.2 Plasma shape and position control
In order to control Gaps, Shape Controller needs to receive as input
measurements of the plasma surface along the Gaps. In order to do so a
software named Felix [26] implements the XLOC equilibrium reconstruction
code [27, 28].
3.2.1.1 XSC: eXtreme Shape Controller
The eXtreme Shape Controller (XSC) is a recent addition to the historical
Shape Controller of JET. It is structured as an add-on module and was
designed to allow full boundary control of the plasma shape [29, 30], as
opposed to SC simpler Gap control. XSC has been succesfully validated in
the JET Tokamak in 2003 [31], and is now regularly used, in particular to
control ITER-like plasmas [32, 33].
The main idea behind the XSC algorithm is to control the full plasma
boundary, while minimising the error over a large set of geometrical shape
descriptors (32 Gaps, strike points and X-point position), so that the system
is no longer limited to the accurate control of only a few Gaps.
The XSC operational scenarios are implemented [34] around a given
plasma shape and equilibrium (in terms of plasma current, internal induc-
tance li and the ratio of the poloidal kinetic to magnetic pressure βp). The
system made by the plasma, JET’s passive structures and PF coils is a
distributed parameter system described by a set of nonlinear PDEs [35].
However by using the axisymmetry of the Tokamak device and some ap-
proximations it is possible to obtain a nonlinear lumped parameters approx-
imation of the PDEs. As the plasma basically moves between equilibrium
states, the obtained lumped parameter rapresentation can be further sim-
plified by linearizing it around a desired equilibrium, obtaining a linearized
plasma model [36, 37] in the form:
28
3 Plasma control problems and solutions 3.2 Plasma shape and position control
x(t) = Ax(t) +Bu(t) + Ew(t) (3.14)
Ip,eq · g(t) = CIPF (t) + Fw(t) (3.15)
where A, B, E, C, F are the model matrices obtained via linearization;
x(t) is the state vector and is made by the variations of the currents in the
PF circuits and of the plasma current; u(t) is the input voltage variations
on the PF circuits (zero for the plasma current “virtual” circuit); w(t)
are the disturbances (βp and li variations); g(t) is the variation of the
shape descriptors and, finally, Ip,eq is the value of the plasma current at the
equilibrium.
As the decoupling of the PF coils is already carried out by the SC system
(which XSC leverages), and the power supplies can be modeled as simple
first order SISO systems:
IPFi(s) =Iref,PFi
(s)
1 + sτPF(3.16)
where τPF is conservatively chosen as the slowest time constant between
all power supplies, the XSC controller can be modeled by simply using the
second equation of system (3.15).
XSC minimizes a steady-state performance index:
J = limt→∞
[gref − g(t)]T [gref − g(t)] (3.17)
which penalizes the error on the whole plasma shape with respect to a ref-
erence shape gref .
In Figure 3.13 the block diagram of the extended JET Shape Control
system is reported (as implemented on the actual plant), with the XSC
highlighted and made up of the Gap Controller part (minimizing the shape
error cost function), and of the set of low pass filters “adapting” the re-
29
3 Plasma control problems and solutions 3.2 Plasma shape and position control
sponse of the XSC to the slowest power supply.
Figure 3.13: Block diagram of the Shape Controller system augmented withthe XSC.
The generation of a XSC scenario is completely automated by a set of
XSC Tools [34]. With these tools it is possible to define an XSC Configura-
tion Files which basically is a set of XSC parameters and the linear plasma
model on which that particular configuration is based. An XSC Simulator
is also present in the suite of tools to help with carrying out closed loop
simulations of the XSC together with the linear model of the plant.
3.2.1.2 CLA: Current Limit Avoidance
The main issue with the XSC system was the fact that it didn’t take into
account the current limits on the PF coils which, if reached, cause the
controlled termination of the experiment or, in extreme cases, even a dis-
ruption.
As stated in the previous section, XSC scenarios had to be accurately
tuned by hand in order to ensure that all PF currents where safely far from
the current saturations. This led to difficulties in the development of said
scenarios, and deepened the dependence of XSC on a correct model of the
30
3 Plasma control problems and solutions 3.2 Plasma shape and position control
whole plasma shaping system.
The Current Limit Avoidance (CLA) system was developed as an add-
on module for XSC in order to keep a balance between plasma shape con-
straints and distance of the currents from the saturation limits in real-time
[38, 39, 40, 41].
The CLA system is based on the dynamic input allocation theory de-
veloped in [42]. The same theoretical framework was already successfully
applied in FTU plasma elongation control system [43, 44]. The idea behind
this theory is that in a MIMO system, when the number of actuators ex-
ceeds the number of controlled outputs, different choices of the inputs can
raise the same output response (at least at steady state). A dynamic input
allocator leverages this property by modifying the input to a plant in order
to obtain a better allocation of it (for instance by keeping actuators away
from saturations) without compromising the outputs.
In particular, given a system in the state space standard form:x = Ax+Bu+Bdd
y = Cx+Du+Ddd(3.18)
P (s) = C(sI −A)−1B +D, P ∗ := P (0) (3.19)
and a controller defined as:xc = Acxc +Bcuc +Brr
yc = Ccxc +Dcuc +Drr(3.20)
the dynamic input allocation theory developed in [42] is applicable only
either to strongly input redundant system, i.e. systems where ker(B) ∩ker(D) 6= ∅, or to weakly input redundant systems, i.e. system where
ker(P ?) 6= ∅. In the former case input allocation allows to keep the value
of the plant inputs inside a desirable region without affecting the output
response of the system, while in the latter the same can only be guaranteed
at steady state (so the input allocation should be sufficiently slow to avoid
31
3 Plasma control problems and solutions 3.2 Plasma shape and position control
instability).
In the case of the XSC system, however, the system is not even weakly
input redundant as is the general case when the number of outputs is greater
than the number of inputs of a plant. However, as small deviations from
the desired shape are acceptable as long as they guarantee the current
limit avoidance, there was margin to operate. In particular the theory in
[42] needed to be extended. In [41] the problem has been throughly ana-
lyzed and solved by introducing a continously differentiable cost function
J(u∗, δy∗) measuring the trade-off between the modified steady-state input
of the plant u∗, and the associated output modification δy∗.
r e yc u y
ya δyAlloc. P*
XSC Plant
JG10.245-6c
+ ++
+−
−
Figure 3.14: Block diagram of the control system with the insertion of theallocator block.
Defining the following allocator system: w = −ρK(∇J)′
= −ρK
(∇J
[I
P ?
]B0
)′ya = B0w
(3.21)
where ρ is a scalar parameter tuning the allocation speed, K is a sym-
metric positive definite gain matrix and B0 is a full column rank matrix
specifying the allocation directions in the input space4 [40]; and intercon-
4B0 leads to the possibility of “denying” certain directions, thus blocking the allocatorfrom applying any control action to them. This has been used extensively to forcibly blockcertain points in the plasma shape, such as the X-Point position.
32
3 Plasma control problems and solutions 3.2 Plasma shape and position control
necting the allocator to the systems (3.18) and (3.20) as shown in Figure
3.14: uc = y − P ?yau = yc + ya
(3.22)
and assuming that the feedback system made by (3.18) and (3.20) is well
posed and exponentially stable, it is possible to show that the input al-
located closed loop system converges, for sufficiently small values of the
allocation speed, to a steady state which minimizes J(u∗, δy∗) [41].
The CLA system has been recently commissioned at JET. In particular
pulses #81710 and #81715 have been carried out keeping all the parame-
ters constant with the exception of the enabling of the CLA in the latter
pulse (at 61s) with the following “artificial” limits on the divertor currents
in order to force the intervention of the allocator system:
ID1 ∈ [−16.5 − 4] kA ID2 ∈ [−31.45 − 10] kA
ID3 ∈ [−11 − 2] kA ID4 ∈ [6 13.5] kA
Figure 3.16 shows that the limits on the currents in the various divertors
are quickly enforced upon enabling the CLA. Notice the oscillation in the
ID2 current do to the reallocation of the other currents. Figure 3.15 shows
instead the negligible difference in shape between the reference pulse (in
blue) and the one with the CLA enabled (in red). Notice in particular
how the X-point position is kept fixed (as been programmed in the CLA
configuration). A detail of the movements of the top-right gap (GAP2) and
of the internal and external position of the plasma (RIG and ROG GAPs)
is reported in Figure 3.17.
33
3 Plasma control problems and solutions 3.2 Plasma shape and position control
(a)
(b)
Fig
ure
3.15
:JE
Tp
uls
e#
8171
0(b
lue)
and
#81
715
(red
)w
ith
CL
Aen
able
d.
Sh
ape
erro
r(a
)an
dd
etail
(b).
34
3 Plasma control problems and solutions 3.2 Plasma shape and position control
61 61.2 61.4 61.6 61.8 62 62.2 62.4 62.6 62.8 63−4000
−3000
−2000
Time [s]
Cu
rre
nt
[A]
Current on ID1
#81710
#81715
61 61.2 61.4 61.6 61.8 62 62.2 62.4 62.6 62.8 63−1.05
−1
−0.95x 10
4
Time [s]
Cu
rre
nt
[A]
Current on ID2
#81710
#81715
61 61.2 61.4 61.6 61.8 62 62.2 62.4 62.6 62.8 63−1.2
−1.15
−1.1
−1.05x 10
4
Time [s]
Cu
rre
nt
[A]
Current on ID3
#81710
#81715
61 61.2 61.4 61.6 61.8 62 62.2 62.4 62.6 62.8 635500
6000
6500
7000
Time [s]
Cu
rre
nt
[A]
Current on ID4
#81710
#81715
Figure 3.16: Comparison of currents on the divertor colis for JET pulses#81710 and #81715.
35
3 Plasma control problems and solutions 3.2 Plasma shape and position control
61 61.2 61.4 61.6 61.8 62 62.2 62.4 62.6 62.8 63
0.08
0.09
0.1
0.11
0.12
0.13
0.14
Time [s]
GA
P [
m]
RIG Measure
#81710
#81715
61 61.2 61.4 61.6 61.8 62 62.2 62.4 62.6 62.8 630
0.02
0.04
0.06
Time [s]
GA
P [
m]
ROG Measure
#81710
#81715
61 61.2 61.4 61.6 61.8 62 62.2 62.4 62.6 62.8 630.18
0.2
0.22
0.24
0.26
Time [s]
GA
P [
m]
GAP2 Measure
#81710
#81715
Figure 3.17: Comparison of GAP measures for GAP2 (top right of thevacuum vessel) and RIG/ROG (Radial Inner/Outer GAP) for the JETpulses #81710 and #81715.
36
3 Plasma control problems and solutions 3.3 Power supplies related problems
3.3 Power supplies related problems
Due to the high fields required for magnetic control and heating of plasmas,
Tokamak power supplies tend to be very complex machines, usually custom
built for the experiment at hand.
In this section two examples of some of the most common difficulties
concerning Tokamak power amplifiers are reported, namely the manage-
ment of problems when driving amplifiers outside their standard operating
point, and the overcome of power supplies limits due to their embedded
controllers. The former problem has been addressed in FTU, where low
current requests on the AL-F amplifier led to oscillating behavior, while
the latter concerned the improvement of the performances of an old ampli-
fier for the EFCC coils at the JET Tokamak.
3.3.1 Induced plasma oscillations: the AL-F amplifier
IP
IV
Figure 3.18: Control system block diagram of horizontal position.
In FTU, the desired horizontal plasma position is regulated thanks to a
pair of coils named V (vertical field) and F (feedback). The former provides
most of the energy needed for the horizontal stabilization and is generally
driven in feedforward mode due to its severe bandwith limitations. The
latter, instead, is dedicated to an accurate regulation of the horizontal
plasma position and is driven by a PID controller working in feedback
mode plus a possible feedforward preprogrammed term.
37
3 Plasma control problems and solutions 3.3 Power supplies related problems
A feedback PID controller uses as input the difference between the mag-
netic flux measured at the two desired plasma boundaries ∆Ψ. This mea-
surement resembles the horizontal position error because a horizontal mis-
placement causes a difference between the flux values at the two desired
boundaries. The whole F coil control loop is sketched in Figure 3.18, where
the AL-F block is a thyristor-based converter receiving a reference signal
coming from the PID controller, corresponding to the requested F coil cur-
rent.
38
3 Plasma control problems and solutions 3.3 Power supplies related problems
Figure 3.19: Electrical scheme of the AL-F converter.
39
3 Plasma control problems and solutions 3.3 Power supplies related problems
The schematic of the AL-F converter is shown in Figure 3.19; the circuit
can be however well represented by the simplified electrical scheme shown
in Figure 3.20.
I1
I2
IF
L L
V1
V2
LF
RF
Figure 3.20: Simplified electrical scheme of the thyristor bridges of theAL-F converter.
In this scheme, each thyristor has a minimum current threshold of
1.2 kA below which no conduction is possible. Therefore, any requested
current level below this threshold has to be obtained by an adequate bal-
ance among the currents flowing through the 2 bridges. Unfortunately,
the PID controller was not designed to deal with nonlinear components, so
that instability phenomena occur when it is forced to act with F currents
below the 1.2 kA threshold. In fact, the algorithm generally works fine
for standard plasma discharges, but it often results inadequate during the
plasma startup or in particular experimental circumstances such as when,
due to the first wall impurity’s release, the kinetic pressure of the plasma
is lower than the expected one. In many of such cases, strong oscillations
are experienced and the experiment (shot) is often terminated.
40
3 Plasma control problems and solutions 3.3 Power supplies related problems
3.3.1.1 Model of the AL-F feedback
The first step in trying to reproduce the oscillations seen during experi-
ments was to develop a simplified model of the AL-F circuit derived from
the scheme of Figure 3.20, where each one of the left and right branches
represents two pools of thyristors (exactly sixteen of them, in parallels of
pairs).
Each branch can generate pulsing voltages on the F coil, which is repre-
sented by the central branch and its inductance LF and resistance RF . The
two inductances L are saturated inductances (namely variable inductances
whose value depends on the current level) used to limit sudden current
variations in low current operation. A hardware control system (not shown
in the figure), called PHSC (Programmable High Speed Controller), is em-
bedded into the AL-F circuitry. This control system has authority over
the switching angles of each thyristor within each one of the two external
branches of Figure 3.20. In particular, each thyristor transfers some quan-
tity of the alternate power supply to the load according to the switching
angle allocation.
Since the load is highly inductive (with time constant LF /RF ), from
the point of view of the currents I1(t) and I2(t) flowing in the circuit, what
matters most is the equivalent average voltage applied to each branch within
one period of the alternate power supply (this is roughly 60 Hz). According
to Figure 3.20, denote by V1(t) and V2(t), respectively, the average voltage
applied to the left and right branches of the figure.
Then, also taking into account the constant voltage drop VT around each
conducting thyristor, the equations describing the circuit in Figure 3.20,
neglecting the presence of the two diodes, correspond to (dependence from
time has been omitted for space constraints):V1 = L
dI1
dt+ LF
d(I1 − I2)
dt+RF (I1 − I2) + 8VT
V2 = LdI2
dt− LF
d(I1 − I2)
dt−RF (I1 − I2) + 8VT ,
(3.23)
41
3 Plasma control problems and solutions 3.3 Power supplies related problems
where the constant voltage drop VT is multiplied by 8 because each branch
consists of a series of 8 thyristors.
Equations (3.23) can be used to derive two coupled differential equations
allowing to compute I1(t) and I2(t) from the equivalent average voltages
V1(t) and V2(t) applied by the thyristors. These equations are reported
in (3.24). Note that in (3.24) the presence of the diodes of Figure 3.20 is
embedded in the fact that with non positive currents, the current variation
is not allowed to be negative, so that the non-negative semiaxis is positively
invariant.
dI1dt =
max
0, (L+LF )V1+LFV2+LRF (I2−I1)−8(2LF +L)VT
L2+2LLF
, if I1 ≤ 0
(L+LF )V1+LFV2+LRF (I2−I1)−8(2LF +L)VTL2+2LLF
, otherwise
dI2dt =
max
0, (L+LF )V2+LFV1+LRF (I1−I2)−8(2LF +L)VT
L2+2LLF
, if I2 ≤ 0
(L+LF )V2(t)+LFV1+LRF (I1−I2)−8(2LF +L)VTL2+2LLF
, otherwise
(3.24)
Clearly, from equations (3.24) one can easily compute the current flow-
ing in the F coil by IF (t) = I1(t)− I2(t).
The hardware PHSC unit (whose block diagram is reported in Figure
3.21) controls the voltages V1(t) and V2(t) so that two requirements are
fulfilled: 1) the output current IF (t) is close (as close as possible) to the
requested current IF,req(t) coming from the PID controller (see Figure 3.18);
2) both currents I1(t) and I2(t) never drop below the minimum conduction
current characterizing the thyristors if IF,req(t) is below that threshold.
Since the thyristors are paired and each thyristor has a minimum current
of 600A, the total minimum current is given by Imin = 1200A.
To fulfill the above mentioned goals, the PHSC follows a PID strategy
42
3 Plasma control problems and solutions 3.3 Power supplies related problems
++PHSC
PID
AL-FBridges
_ _IF,req PHSC
Logic
IFIreg
I1
I2
I2
I1V1
V2
eI
Figure 3.21: Block diagram of the PHSC.
with an error feedback from the F coil current error:
Ireg(t) = KpeI(t) +KIxc(t) +KdeI(t)
xc(t) = eI(t)(3.25)
Moreover, based on the output Ireg(t) of the PID controller, the PHSC
imposes the voltages V1(t) and V2(t) as
V1(t) = σV (Imin − 1.8I2(t) + σM (Ireg(t)))
V2(t) = σV (Imin − 1.8I1(t)− σM (Ireg(t)))(3.26)
where σs(·) is the scalar symmetric saturation function having saturation
level s, and M = 12500A and V = 5000V .
This control strategy ensures that for any current request IF,req(t), the
PHSC will regulate I1(t) and I2(t) so that, after a reasonable transient,
IF (t) = IF,req(t) and, moreover, both I1(t) and I2(t) will be either zero or
larger than Imin. This type of behavior is inevitable with circuits relying
on thyristors which can be thought of as some very powerful diodes and,
as such, are inevitably characterized by a minimum current to be able
43
3 Plasma control problems and solutions 3.3 Power supplies related problems
to polarize the P/N junction. The larger the maximum current of the
thyristor, the larger the minimum allowable current must be. Hence, when
low currents are requested from IF,req(t), the PHSC will need to enforce
two currents in the left and right branches of Figure 3.20, both of them
larger than Imin and such that their difference (which flows in the load)
corresponds to IF,req(t). Note that in the model we completely disregard
the effects of the switching angles of each thyristor: the filtering action of
the highly inductive load makes it unnecessary to model all the switches
happening in the bridge and the pulsed voltage waveforms arising on the
load. The averaged representation of this model is sufficient to reproduce
the experimental behavior.
0.4 0.6 0.8 1 1.2 1.4
−1000
0
1000
2000
Time [s]
Cu
rre
nt
[A]
Experimental and simulated currents on F coil (shot #20838)
Experimental
Simulated
Figure 3.22: Shot number #20838. Open-loop simulation of the AL-Fmodel.
Figure 3.22 reports on an open-loop simulation where the model given
by (3.24), (3.25) and (3.26) has been implemented in Matlab/Simulink using
the experimental time history of IF,req(t) from the unstable shot #20838
as an input. According to the PHSC datasheet, the parameters in the PID
controller (3.25) have been selected as
Kp = 1.5, Ki = 37.5, Kd = 0.75.
44
3 Plasma control problems and solutions 3.3 Power supplies related problems
Moreover since the small nonlinearity of L causes negligible effects on the
closed-loop behavior, it has been considered as a linear inductance. Finally,
according to the experimental equipment, the other components have been
selected with the values reported in Table 3.1. In Figure 3.22 the solid
curve represents the experimental measurement of IF (t) while the dashed
curve represents the simulation output.
L LF RF VT2mH 9mH 8mΩ 1.8V
Table 3.1: Values of the electrical components of the AL-F model.
Altogether, the model in Figure 3.21 consisting of (3.24), (3.25) and
(3.26) with:
eI(t) = IF,req(t)− IF (t) = IF,req(t)− (I1(t)− I2(t)) (3.27)
corresponds to a strongly nonlinear closed-loop relating the requested cur-
rent IF,req(t) to the actual F coil current IF (t).
Considering the systems (3.24), (3.25), (3.26) and (3.27) under the ac-
tion of an input IF,req(t) = I0+I(t) with I(t) sufficiently small in magnitude
and rate it is possible to show [45] that the solution of the systems coincides
with the one of (3.25) and (3.27) interconnected with the linear filter:
IF (t) = αIF (t) + βIreg(t) (3.28)
If |I0| is sufficiently large (but |I0| < |M |) the system (3.28) is stable with:
α = − LRFL2 + 2LLF
= −0.28, β =L+ LF
L2 + 2LLF= 67.4
called, from now on, High Current (HC) model; while if |I0| is sufficiently
45
3 Plasma control problems and solutions 3.3 Power supplies related problems
small, system (3.28) becomes unstable with:
α =L(1.8− 2RF )
L2 + 2LLF= 63.53, β =
2L
L2 + 2LLF= 71.22
defined as Low Current (LC) model.
This interesting feature means that before the stabilizing action per-
formed by the PID controller (3.25) in the feedback loop of Figure 3.21,
the core linear dynamics of the system ranges from exponentially unstable
behaviors to exponentially stable ones, thus resulting in a highly nonlinear
response for large ranged signals. Despite the unstable small signal be-
havior of (3.24) and (3.26), the PID controller (3.25) manages to stabilize
both linearized dynamics (even though with poor performance in the small
signal range -see the upper plot of Figure 3.23).
Indeed, when closing the loop with the PID controller (3.25), the poles
of the linearized AL-F transfer function from If,req(t) to If (t) are (−4103,
−77, −21) in the first case, i.e. with the HC model, and (−4107,−21±j36)
with the LC model.
Figure 3.23 shows the simulation response IF (t) to a triple step input
IF,req(t) when using the closed-loop of the PID with the LC linear model
(solid curve in the upper plot) and the response to the same input when
closing the loop with the HC linear model (solid curve in the lower plot).
In both plots the nonlinear response obtained by closing the loop with the
nonlinear model corresponds to the dashed curves. Note that in the first
step, where I0 is very small, the response matches that one of the LC model,
in the second step it sits somewhere between the two models and in the
third step, where I0 is sufficiently large, it matches the HC model response.
Once established this peculiar feature of AL-F, also the other compo-
nents of the feedback system were modeled in order to be able to run a
closed-loop simulation of the control system in Figure 3.18.
46
3 Plasma control problems and solutions 3.3 Power supplies related problems
0 0.5 1 1.5 20
500
1000
1500
2000
Time [s]
Curr
ent [A
]
Step response of the high current (HC) model
Reference
Nonlinear AL/F model
Linear HC model
0 0.5 1 1.5 20
500
1000
1500
2000
Time [s]
Curr
ent [A
]Step response of the low current (LC) model
Reference
Nonlinear AL/F model
Linear LC model
Figure 3.23: Linear LC and HC models behavior compared to the nonlinearresponse.
The PID controller on the left is completely known because it is dis-
cretized and implemented in the real-time control code running on the
Linux-RTAI platform controlling the plasma during the experiment [46].
In particular, the controller obeys the following standard law:
yPID(t) = Kp(t)uPID(t) +Ki(t)xc(t) +Kd(t)uPID(t)
xc(t) = uPID(t)(3.29)
where Kp(t), Ki(t), Kd(t) are time variant gains which are preprogrammed
and usually uniformly ramp up during the startup phase, are constant
47
3 Plasma control problems and solutions 3.3 Power supplies related problems
during the flattop phase and ramp down during the final phase of the shot.
The constant values at the flattop, Kp = 0.15, Ki = 25, Kd = 4.5 · 10−4,
have been used as this is the most interesting part of the experiment, and
the one in which the oscillations are most evident. Mimicking the FTU
control system, the controller (3.29) has been introduced in the simulation
diagram in its discretized form with the sampling period Ts = 0.5 ms used
at FTU. Its approximate discrete-time transfer function corresponds to:
yPID(z) =− 1
2 · 10−5
(Kp +Ki
Ts2
(z + 1
z − 1
)+Kd
z − 1
(τ + Ts)z − τ
)uPID(z)
with the time constant value τ = 4 ms.
The external signals acting on the diagram of Figure 3.18 correspond to
the preprogrammed feedforward profiles for the F coil (called IF,pre), for the
V coil (called IV,pre) and for the plasma current (called IP,pre). In particular,
the equivalent effect of these currents at the plasma input is computed by
suitably weighting each contribution according to their equivalent steady-
state effect on the plasma position and corresponds to selecting the signal
acting before AL-F in Figure 3.18 as w1(t) = IF,pre(t), and to selecting the
signal acting after AL-F as w2(t) = gV IV,pre(t) + gP IP,pre(t), with gV =
4.317 and gP = 4.717 · 10−2. Then the controller (3.29) is interconnected
to the closed-loop via the equations IF,req(t) = IF,pre(t) + yPID(t) and
uPID(t) = ∆Ψ(t).
The plasma model in Figure 3.18 is crudely represented as a simple linear
dynamical system capturing the gross horizontal motion of the plasma. The
model adopted has been identified by manually adjusting the parameters
48
3 Plasma control problems and solutions 3.3 Power supplies related problems
in a first order continuous time filter with the following transfer function:
∆Ψ(s) = P (s)(IF (s) + w2(s))
:= −10−7 3.4375s
0.008s+ 1(IF (s) + w2(s))
(3.30)
mapping IF (t) + w2(t) into ∆Ψ(t).
0.4 0.6 0.8 1 1.2 1.4
−0.1
−0.05
0
0.05
0.1
Time [s]
Ma
gn
etic f
lux [
Wb
]
Experimental and simulated magnetic flux (shot #20838)
Experimental
Simulated
Figure 3.24: Shot number #20838. Open-loop simulation of the plasmamodel.
Figure 3.24 shows a comparison between the experimental data from
the same unstable shot #20838 used in Figure 3.22 and the simulated
data obtained from the model (3.30) driven by the experimental signals
IF,supplied(t)+w2(t). Some differences between the experimental data (solid)
and the simulated data (dashed) occur, especially with large signals, for the
fact that the linearity of plama behaviour is guaranteed only for very small
variations around the equilibrium. However, the small signal fidelity of the
model is satisfactory.
49
3 Plasma control problems and solutions 3.3 Power supplies related problems
0 0.5 1 1.5
−1000
0
1000
2000
Time [s]
Cu
rre
nt
[A]
Experimental and simulated currents on F coil (shot #20838)
Experimental
Simulated
0 0.5 1 1.5
0
2000
4000
6000
Time [s]
Cu
rre
nt
[A]
Experimental and simulated currents on F coil (shot #28000)
Experimental
Simulated
Figure 3.25: IF response for shots number #28000 (upper plot) and #20838(lower plot) in solid lines. Corresponding closed-loop simulations in dashedlines.
In Figure 3.25 two closed-loop simulations5 are reported: one corre-
sponding to a standard experiment (where the F coil current was monoton-
ically increasing and significantly higher than the circulating current Imin),
and an oscillating one.
5Closed-loop simulations of previous experiments are carried out by closing the AL-Floop while considering the other signals (such as the currents on the other coils, etc.)as external disturbances and directly feeding them to the simulink model as downloadedfrom the FUT experimental database. This, while not being completely accurate, as itdisregard some phenomena such as mutual inductances, can give an insight of problemsand performances of the solutions proposed, and it is a mandatory step before closingthe loop on the actual machine.
50
3 Plasma control problems and solutions 3.3 Power supplies related problems
The upper plot shows the IF (t) response simulating the stable shot
#28000. The initial mismatch between the experimental data (solid) and
the simulated response (dashed) depends on possible different initial con-
ditions and the fact that the linear plasma model (3.30) certainly cannot
capture the highly nonlinear plasma behavior during the breakdown phase.
The lower plot of Figure 3.25, instead, shows the simulated IF (t) response
for the unstable shot #20838. Note that the simulated F current is correctly
mapped within the critical range between ±Imin and the closed-loop sys-
tem exhibits an undesirable oscillation, mimicking the twofold behavior of
the actual experiments. Once again, the simulated behavior in Figure 3.25
(as well as the experimental behavior), reveals that the only possible cause
of this twofold behavior can be the nonlinear model of the AL-F circuit.
Indeed, all the other components of the closed-loop simulation (correspond-
ing to the diagram of Figure 3.18) are linear and cannot cause instability
for small signals and stability for large ones.
As a further confirmation of this fact the poles of the linear closed-
loops between the PID controller (3.29) and the plasma model (3.30) via
the two linear approximate behaviors HC and LC for the AL-F system have
been studied. With the HC model, the closed-loop is exponentially stable
with a maximum real part of the stable closed-loop poles corresponding to
λMAX = −7.5. With the LC model, the closed-loop is, instead, unstable,
with λMAX ' 34. This property explains, to a certain extent, the oscil-
latory behaviour experienced in experiments and simulations in the small
signals regime.
3.3.1.2 Anti-windup solution
Once the cause of instability is recognized, the anti-windup scheme of [47]
(see also [48]) can be applied by treating the nonlinear dynamic behavior
of AL-F as a sort of undesired (dynamical) input nonlinearity. Indeed, the
basic calculations carried out in [48, 47] still apply to this case and conver-
51
3 Plasma control problems and solutions 3.3 Power supplies related problems
gence properties can be established because the plasma model (3.30) is lin-
ear and exponentially stable. The arising closed-loop scheme is represented
in Figure 3.26, where the supplied current in the F coil is not measured
from the field but is computed using the model illustrated6. In particular,
the faithfulness of the computed current with respect to the experimental
one has been confirmed by real-time simulations running exactly the same
real-time code prepared for the experimental controller (see [49] for details
on the underlying architecture).
AL-Fmodel
PLASMAmodel
–+
++
Anti-windup compensator
.
PID PLASMA++++
ΔΨ. AL-F
Preprogrammed
V and P current
F,reqIFI
Preprogrammed
F current
FÎ
Targetmodel I F,T F-Î
v =ΔΨ
++
.
++
.
T-ΔΨ2
v =KΔI1Kaw
ΔΨ
~
Figure 3.26: Anti-windup solution.
The proposed anti-windup solution consists in adding extra dynamic
components to the closed-loop, that generate two compensation signals
6Note that the current could be measured directly from the field, but this wouldoverload the input signals to the real-time controller; therefore computing an estimate ofit from the model has been the preferred solution. Moreover, as the anti-windup solutionis robust (as shown in [47]) and the nonlinear AL-F model developed is quite realistic,using the model to compute IF has the beneficial side effect of avoiding the introductionof any noise in the system that, instead, a real sensor inevitably has.
52
3 Plasma control problems and solutions 3.3 Power supplies related problems
v1(t) and v2(t) (as in Figure 3.26), where v1(t) is added to the AL-F input
and v2(t) is added to the plant output ∆Ψ(t). In particular, the controller
(3.29) is interconnected to the closed-loop via:
IF,req(t) = yPID(t) + IF,pre(t) + v1(t)
uPID(t) = ∆Ψ(t) + v2(t)(3.31)
Regarding v1(t) and v2(t), they are selected in such a way that the com-
pensation action aims at reproducing as much as possible the closed-loop
response arising when the AL-F dynamics is replaced by the “target model”
in Figure 3.26, which is selected to be linear. Defining IF,T (t) as the output
of said “target model”, IF (t) as the estimated value of IF (t) arising from
the nonlinear model, Kaw as a positive constant (tuning parameter for the
antiwindup system), and ∆ΨT (t) and ∆Ψ(t) as, respectively, the (linear)
plasma model response to IF,T (t) and IF (t), then the v1(t) and v2(t) signals
are selected as:
v1(t) = Kaw(IF,T (t)− IF (t))
v2(t) = ∆ΨT (t)−∆Ψ(t)(3.32)
It is possible to show [45] that for small enough values of Kaw ≥ 0, and
under the action of limited signals, the anti-windup closed-loop generates
limited responses and that for any trajectory of the target closed-loop such
that the response of the target model coincides with that of the nonlinear
AL-F model (3.25), (3.26), (3.27), the response ∆Ψ(t) of the anti-windup
closed-loop from the same initial conditions and with the same inputs con-
verges to the response ∆Ψ(t) of the target closed-loop.
Note that according to the robustness analysis carried out in [47] (see
also [50]), the overall scheme is robust with respect to variations of the
plant parameters (as compared to the model). This robustness follows
from a small gain reasoning (see [47] for details) under the assumption that
the controller is incrementally stable, which holds as shown before.
53
3 Plasma control problems and solutions 3.3 Power supplies related problems
0 0.5 1 1.5
−1000
0
1000
2000
Time [s]
Cu
rre
nt
[A]
Simulated currents on F coil (shot #20838)
Without AW
With AW
Figure 3.27: Shot number #20838. Anti-windup simulation.
Figure 3.27 shows a simulation of the same shot #20838 illustrated in
the lower plot of Figure 3.25 when the target model is selected as the HC
model previously characterized. This selection of the target model also
allows to achieve an automatic and smooth shutdown of the anti-windup
compensation when the F current becomes large enough, i.e. when the
response of the nonlinear model coincides with the one of the target (HC)
model. It can be seen that the oscillations caused by the AL-F nonlin-
earities (solid curve) are completely removed by the anti-windup scheme
(dashed curve). Note also that the oscillations during the initial transient
are still present but those, as mentioned above, should be interpreted as
an effect of the linear model of the plasma behavior, which is inaccurate
during the startup phase. Note also that this startup phase is basically
the same for the solid and dashed curves, revealing that the anti-windup
compensation is not doing much in that initial transient.
The proposed solution, whose block diagram representation is shown in
Figure 3.26, has been implemented on the FTU feedback system and tested
with various values for the gain Kaw.
54
3 Plasma control problems and solutions 3.3 Power supplies related problems
First of all a simpler version of the anti-windup system has been de-
ployed at FTU in order to have a benchmark and test the system software-
wise. This preliminary version consisted of the scheme of Figure 3.26 with
Kaw = 0 (thus turning off the signal v1) and the target model chosen as
an identity (thus forcing the system to behave like an ideal amplifier). The
drawback of this solution, however, was that, since the AL-F model never
acts like an identity, the anti-windup action would enforce closed-loop cor-
rections also in operating conditions where the F current is large enough not
to require any correction. Therefore, in order to forcibly avoid any interven-
tion of the controller when large currents were requested, a dead-zone-like
nonlinearity was added at the input of the anti-windup system.
The FTU experimental response with this solution is shown in Figure
3.28 (shots #31621 and #31626). Notice how the oscillations have been
greatly damped.
0.35 0.4 0.45 0.5 0.55 0.6 0.65−1000
0
1000
2000
Time [s]
Cu
rre
nt
[A]
Comparison of the same pulse with and without antiwindup system
#31621 (AW off)
#31626 (AW on)
Figure 3.28: Shots #31621 and #31626: same shot type. In the latter theanti-windup system was turned on.
Following the success of this preliminary version, the development of the
anti-windup system has been completed and the final controller deployed
in the plant. In Figure 3.29, a comparison between two shots, one with
the anti-windup system turned off (#32784) and the other with the system
active and tuned with the target model coinciding with the HC model and
Kaw = 1 (#32786) is reported. In Figure 3.30 the values of the signals v1(t)
55
3 Plasma control problems and solutions 3.3 Power supplies related problems
and v2(t) are also shown. It is evident that the damping of the oscillations
was worse than what expected from the simulations, and in particular from
what was obtained with the simplified system deployed previously.
0.4 0.5 0.6 0.7 0.8 0.9 1
1000
1500
2000
2500
Time [s]
Cu
rre
nt
[A]
Comparison of the same pulse with and without antiwindup system
#32784 (AW off)
#32786 (AW on)
Figure 3.29: Shots #32784 and #32786: same shot type. In the latter theanti-windup system is turned on.
To verify this issue, a further test has been carried out and is reported
in Figure 3.31, where the same experiment has been repeated twice, first
using the “HC-target” anti-windup compensation (shot #32959) and then
using the simplified one (shot #32960). This test further confirmed the
better behaviour of the less elegant solution.
Considering the high level of accuracy of the implemented nonlinear
model of the AL-F amplifier (and thus of its HC linearization), the simple
plasma model used in the anti-windup system is probably the cause of the
bad behaviour of the HC-target anti-windup solution. This theory is further
confirmed by inspecting the experimental data corresponding to the signal
∆Ψ(t) of Figure 3.26 where the closed-loop oscillations are clearly visible.
As currently no fast plasma boundary reconstruction algorithms are
deployed at FTU, it is not possible to have a better plasma model for
the anti-windup system. For this reason the simplified scheme is the one
active by default during experimentation at FTU. With this solution in
place, the previous undesired oscillations occasionally happening and pos-
56
3 Plasma control problems and solutions 3.3 Power supplies related problems
0.4 0.5 0.6 0.7 0.8 0.9 1−400
−200
0
200
400
Time [s]
v1 s
ignal
v1 signal in pulse #32786
0.4 0.5 0.6 0.7 0.8 0.9 1
−5
0
5
x 10−3
Time [s]
v2 s
ignal
v2 signal in pulse #32786
Figure 3.30: Shot #32786: signals v1 and v2 of the anti-windup system.
0.35 0.4 0.45 0.5 0.55 0.6 0.65
1000
2000
3000
4000
Time [s]
Cu
rre
nt
[A]
Comparison between complete and simplified anti−windup
#32959 (complete AW)
#32960 (simplified AW)
Figure 3.31: Shots #32959 and #32960: same shot type. The completeanti-windup code ran on the former. The simplified code shows smalleroscillations.
sibly compromising the experiment have not been seen again during all the
subsequent experimental campaigns.
57
3 Plasma control problems and solutions 3.3 Power supplies related problems
3.3.2 The JET EFCC Coils control system
Magnetic field perturbations which break the toroidal symmetries are in-
evitable in tokamaks due to imperfections in magnetic field coils and to the
presence of magnetic materials. Magnetic islands arising from these asym-
metries can cause the appearance of locked modes which, if uncontrolled,
frequently lead to disruptions [6, 5]. One of the main goals of the Error
Field Correction Coil (EFCC) systems in modern tokamaks is to alleviate
this effect by applying magnetic perturbations that compensate the natu-
ral error field at the plasma boundary. In JET the EFCC are a set of 4
non-axisymmetric coils distributed around the Tokamak as by Figure 3.32
Figure 3.32: The EFCC coils at the JET Tokamak.
Recently at JET, performance issues and practical limitations led to the
decision of replacing the EFCCs voltage amplifiers by using the old Vertical
Stabilisation amplifier (named FRFA) which was decommissioned around
the same period.
The opportunity was also taken to reformulate and improve the con-
troller application by incorporating it into a new realtime software frame-
work, developing a new control algorithm and revising the time synchro-
nization mechanism whilst maintaining essentially the same VME based
hardware components [51].
58
3 Plasma control problems and solutions 3.3 Power supplies related problems
It has been observed during JET operations that there is a decrease in
the performance of this simple PID controller as the frequency of the current
reference waveform increases. Furthermore, it is inevitable that inherent
plant non-linearities such as component saturations and, in particular, the
amplifier’s switching of the thyristor bridge restricts the performance of the
(linear) PID controller to a limited operational space.
New controller
Originalcurrentreference
AnticipationAnticipatedreference
InverseModel
DirectModel
Newreference
PID
Innerdelay
adaptation
Plant(EFCCs)
VCVS
Feedforwardvoltage
Feedbackvoltage
Outerdelay
adaptationMeasuredcurrent
+-
JG10.250-1c
Figure 3.33: The proposed advanced controller block diagram.
This has motivated the design and development of a new non-linear and
adaptive controller scheme (for a primer on adaptive control see for instance
[52]) with the clear aim of improving the system’s overall bandwidth [51].
The new controller (Figure 3.33) is based on the idea of shifting the current
reference in time (Anticipation block) in order to compensate for circuit
delays and the dynamics of the coils. The Inverse Model block calculates
the inverse dynamics of the system (amplifier and coils) thus supplying the
feedforward component of the control voltage. Also, the Direct Model block
is used in order to calculate the new reference for the PID which takes into
account the anticipation mechanism. The anticipation mechanism is, in
turn, driven by two different loops: the internal one, which attempts to
synchronize the original reference with the newly calculated one (i.e. the
one modified by the plant dynamics), and the outer one, which does the
59
3 Plasma control problems and solutions 3.3 Power supplies related problems
same with the new reference and the measured coil current.
The new controller algorithm has been developed and tested in Matlab
Simulink environment and simulation results are presented in Figure 3.34.
This figure shows a comparison between the experimentally achieved EFCC
current and the predicted one by simulating the new controller algorithm
for JET Pulse #79777. Furthermore, as a validation cross-check of the
plant model used in the new controller algorithm, the simple PID behavior
of the present controller has also been simulated revealing good agreement
with the experimentally obtained current, thus, providing a clear indication
of the accuracy of the model. The current reference used in this pulse is a
40Hz sinusoidal waveform and it can be seen that the simulation with the
new controller scheme predicts an overall system bandwidth increase once
it is implemented in the online system.
Pulse No: 79777
-1500
-2000
-1000
-500
0
19.70 19.72 19.74 19.7619.68 19.78
Cu
rre
nt (
A)
Time (s)
JG
10
.25
0-3
c
Figure 3.34: Comparison of simulated and experimental results for theEFCC advanced controller. Solid black line represents the reference wave-form, dashed black line represents the simulated current obtained with thenew controller, dark gray line represents the current experimentally ob-tained with the present PID controller and the light gray line representsthe simulated current obtained with the present PID controller using theplant model.
60
Chapter 4
Technical solutions and
implementation
4.1 The MARTe Framework
MARTe (Multithreaded Application Realtime executor) is a framework
recently developed at the JET Tokamak while working with the PPCC
(Plasma Position and Current Control) Group. The main aim of this frame-
work is to simplify the development and deployment of control systems with
strict hard-realtime requirements by being easily portable (thanks to the
underlying library BaseLib2) and by giving to the control system engineer
a simple environment in which to deploy the control law, completely hiding
to him the implementation details.
MARTe received a warm acceptance by the fusion community, and is
now used in various machines throughout Europe (JET, FTU, ISTTOK,
COMPASS...). In particular FTU is carrying out a complete revamping of
its old control system in order to port it to the new framework.
61
4 Technical solutions and implementation 4.1 The MARTe Framework
4.1.1 The BaseLib2
MARTe is built upon a C++ multi-platform library named BaseLib2. The
first key feature of the library is the ability to run the same code in different
operating systems (OS). It is organized in consecutive layers (Figure 4.1)
where the lowest level implements the different calls for each of the available
systems. In order to guarantee portability, the remaining layers and the
end-user code must use the functionalities provided by the library, avoiding
OS dependent calls. This layered scheme provides a logical organization
on how the code is distributed. Top layers have a broader view over the
library functionality and tend to accommodate code that is less critical for
the operation of a system, granting at the same time a set of tools that
greatly eases the development of applications. When porting the library to
a new OS only the lowest layer needs to be adjusted.
Level 0
Threading
Semaphores
Memory
...
Files
Sockets
Strings
Level 1
Garbage Collection
Named objects
Object Database
...
Level 2
Advanced streaming
Data types definition
Level 3
Configuration DB
Data driven support
Build objects by name
...Level 4
Built-in HTTP server
Object introspection
Level 5
Dynamic Data Buffer
Message interfaces
Data driven interfaces
... Level 6
Matrices
RT Matrices
Basic filters
...
Figure 4.1: The layered structure of BaseLib2.
The layer closest to the operating system provides all the abstrac-
tion regarding the interaction with the file system, networking, threading,
semaphores, atomic operations and operating system dependent optimiza-
tions. BaseLib2 was already ported to the following OS: VxWorks, Linux,
Linux RTAI, Solaris, Mac OS X and Microsoft Windows. The possibility
62
4 Technical solutions and implementation 4.1 The MARTe Framework
of running the same code in different systems allows developers to write
and debug code using tools that might not be available in the target archi-
tecture. This is even more important when the final environment has no
memory protection (such as Linux RTAI), making the debug of algorithms
particularly difficult.
BaseLib2 tries to maximize the concept of reference and to dissuade as
much as possible the use of pointers. For this purpose a garbage collector
and a special root garbage-collectable object is available (GCNamedObject).
Objects inheriting from this class can be automatically constructed by the
library and are destroyed by the garbage collector when they are no longer
required by any external reference. These objects are also allowed to have
a name and are, upon construction, automatically added to an internal
database (GlobalObjectDataBase). By simply searching for an object
name in this database a reference to it can be later obtained.
In order to automatically create objects the library provides a standard
configuration language. This configuration is provided to the library as a
stream and analyzed by a parser that instantiates the objects based on the
requested classes. If the object is successfully created, its self-configuration
function (ObjectLoadSetup) is called with the subtree of the configuration
file relative to the object passed as a parameter. Listing 4.1 and Figure
4.2 show an example of a possible configuration. In order to guarantee
real-time efficiency, the object is expected to perform the majority of the
required validations and all memory allocations at this stage. Once the
object is successfully built it is added to the previously described database.
A garbage collectable container object is also provided, allowing to recur-
sively create new nodes in the internal database (GCReferenceContainer).
63
4 Technical solutions and implementation 4.1 The MARTe Framework
+HttpServer = Class = HttpServ ice
Port = 8084
+MARTe =
Class = MARTeContainer
+RTThread1 = Class = RealTimeThread
+Cont ro l l e r = Class = ControllerGAM
NoPlasmaCurrentGain = 40.0
IPWaveform = Times = 0 120Amplitudes = 0.5 0 .5
+DAM =
Class = DAMGAM
Project ionMatr ix = 0 = 1 .0 0 .0 0 .0 0 .0 1 = 0 .0 1 .0 0 .0 0 .0 2 = 0 .0 0 .0 1 .0 0 .0 3 = 0 .0 0 .0 0 .0 1 .0
. . .
. . .
. . .
Listing 4.1: An example of a BaseLib2 configuration.
A series of classes are dedicated to strings and data streaming. These
permit to perform a series of advanced operations in character sequences,
Figure 4.2: Example of a BaseLib2 CDB. The library is data driven using asyntax that allows to automatically create and configure objects. Once cre-ated these are added to an internal tree database which can later be used tosearch and retrieve references. This figure corresponds to the configurationpresented in listing 4.1
64
4 Technical solutions and implementation 4.1 The MARTe Framework
and to perform input/output (I/O) operations without requiring the con-
cept of beginning and end of transmission. Most of the I/O classes are
abstracted to a level where the knowledge of the target media (file, socket,
memory, etc.) is not required.
Live introspection and analysis of objects is provided by the CINT C++
interpreter1, which permits to verify objects internal states and expected
behaviors. Due to its wide availability and simplicity the Hypertext Trans-
fer Protocol (HTTP) has been chosen as the standard transfer mechanism
of information when querying objects. BaseLib2 provides an internal multi-
threaded HTTP server which can browse any objects that inherit the ap-
propriate interface (HttpInterface). The internal object database is also
browsable and is rendered as a recursive tree with links to all the objects
which have the HTTP interface implemented. This scheme allows library
users to have a standard user-interface for all the application built with
the library. The GET and POST HTTP requests are also implemented
providing a way to actively interact with the objects. Multiple servers can
coexist at the same time, by using different ports.
Object oriented languages provide a very good programming paradigm
when designing an application. The concepts of data abstraction, inheri-
tance and modularity permit to define and even impose how the different
pieces of the application should interact. Sometimes, and particularly true
when providing a library, one cannot fully constrain or predict how some-
thing is going to behave. In order to decouple concepts higher level pro-
tocols are usually used. Applications developed using the BaseLib2 library
can use a series of message classes that allow objects to communicate in
a Smalltalk fashion. These messages contain a sender and a receiver ob-
ject address, specified as a unique path in the internal tree configuration
database. A network based message server enables the interaction between
1http://root.cern.ch/drupal/content/cint
65
4 Technical solutions and implementation 4.1 The MARTe Framework
applications living in different machines. The library automatically searches
for the object address in its database and if found calls the appropriate func-
tion (ProcessMessage). Messages can also be sent in synchronous mode
where the sender expects a reply from the receiver. The content of the
messages is free and they are routinely used inside the library to start and
stop services and by some objects to update their internal behavior.
One example of such an object is the state machine class. It is updated
by changing its internal states accordingly to the messages received and
upon state changing it broadcasts new messages to registered listeners. Be-
ing structured using the aforementioned named objects, the State Machine
(and the content of the messages sent when changing states) is completely
configurable at runtime.
The library also provides a series of algebraic and mathematical tools.
The widest range is in matrix calculations where several matrix decompo-
sition methods, like the single value decomposition (SVD) and LU decom-
position, are available.
In order to assure the correct function of a system, a logger mechanism
is of huge importance. A good logging scheme permits to expeditiously
analyze any problems that may arise during operation. On the other side
the logger should not compromise the real-time performance.
BaseLib2 provides a series of logging functions with which it is possible
to automatically append to a desired logging string, information like the
name of the object, its location in memory, the time when the message
was issued, the thread and process identifiers, as well as the name of the
machine where it was generated.
A minimum impact on the system is guaranteed by the use of a con-
sumer/producer scheme. The process wishing to write a log message ap-
pends it to a FIFO queue. A consumer, running with very low priority,
processes the messages in the queue when processor time is available. This
66
4 Technical solutions and implementation 4.1 The MARTe Framework
permits to even report information from an interrupt service routine where
the scheduler is usually frozen.
The library makes no assumptions about how messages are consumed.
The default behavior is to send it using the User Datagram Protocol (UDP)
to a stated address. Using this scheme a relay logger mechanism was devel-
oped, allowing to combine, collect and store messages arriving from different
machines. Figure 4.3 shows a design where messages are produced in a pri-
vate network and subsequently broadcasted to a data persistence node and
a live information system.
Since a system can produce hundreds, or even thousands, of information
messages per day, a Java application that organizes messages accordingly
to user defined criteria has been developed. Messages are grouped first by
producer, where each machine has a node in a tree, and inside every node,
messages are grouped by: severity, thread and object producer name. Fil-
tering enables control room users to follow only a narrow subset of messages
(e.g., messages with a particular alarm level from a specific object in a sub-
system).
4.1.2 Multithreaded Application Realtime executor (MARTe)
MARTe is a modular collection of a series of components that permits the
system to work as a whole [4]. Some of the blocks are intended to be further
adapted to the target application, while others are expected to be used as
provided.
4.1.2.1 Generic Application Module
The atomic element of MARTe is named Generic Application Module (GAM)
and all applications built using the framework are designed around these
components. A GAM is a class inheriting an interface specified in the
BaseLib2 library. Each GAM contains three communication points: one
for configuration and two for data input and output. GAMs are setup us-
67
4 Technical solutions and implementation 4.1 The MARTe Framework
Figure 4.3: Relay logger mechanism. Messages are automatically relayedacross networks, allowing to add new logger nodes as required. In thisfigure messages are produced in the acquisition network and further re-layed to a node responsible for data persistence and another node for livevisualization.
ing the standard BaseLib2 configuration syntax described in the previous
section. The core of a typical GAM processes the input accordingly to how
it was configured and outputs the modified information.
Conceptually GAMs are equivalent to a “block” in a standard block
diagram Figure 4.4.
During initialization the modules declare what data they expect to re-
ceive and what information is going to be produced in output. Each type of
input or output is declared as a configurable named signal with a data type
associated. This is the only available way to chain GAMs and provides a
clear boundary in the system: GAMs are not aware of the presence of other
68
4 Technical solutions and implementation 4.1 The MARTe Framework
C P
H
u y
v
D
D
B
GAM
C
read(v)
read(u)
read(y)
wri te(u)
wri te(y)
wri te(v)
TIMEGAM
P
GAM
H
Figure 4.4: Conceptual passage from a block diagram to a MARTe archi-tecture.
modules.
The GAMs which interface with hardware are named IOGAMs and pro-
vide a unique high level interface. The connection between the IOGAM and
69
4 Technical solutions and implementation 4.1 The MARTe Framework
the specific low level code responsible for driving the hardware is performed
through the specialization of a high level class named Generic Acquisition
Module. This interface requires the number of hardware inputs and outputs
to be specified and forces the existence of a reading and a writing function.
These functions must be implemented for each kind of I/O device, although
it is common that devices belonging to the same family are able to share
a common acquisition module. These high level interfaces to the hardware
can usually be configured to return the latest acquired value or to wait for
a new sample to arrive (at the cost of delaying the execution), depending
on the requirements of the application.
Another important feature in MARTe is the ability to perform simula-
tion without interfering with the plant. Although this greatly depends on
the target project, it is usually possible to model up to some extent the
process to be controlled, and a GAM can be used to simulate the inputs
(possibly using real signals saved beforehand) and another to predict the
output of the system. This arrangement permits to debug and tune all the
other modules, or to test the possible effects that a change in a module
configuration will produce. On the live system the simulation modules can
later be swapped with the real interface to the hardware. This technique
has been used for instance in the development of a simulator for the JET
Vertical Stabilization system [53].
Data is transferred between GAMs by using an optimized memory bus
named Dynamic Data Buffer (DDB). The first role of this entity is to en-
sure coherency across the system, verifying if all the signals requested by
each of the GAMs are produced by one module and in case of any inconsis-
tency issue an error during the initialization phase. Although it is not the
default behavior, a GAM may write over a signal already produced by an-
other module. This process, named patching, must be explicitly requested
otherwise it is assumed as an error.
70
4 Technical solutions and implementation 4.1 The MARTe Framework
MARTe also provides a collection of GAMs to send signals between
different systems, even in different machines. Depending on the system,
real-time may only be guaranteed on the producer, unless using a realtime
network such as RTNet [54, 55].
The RealTimeThread is a container of GAMs and acts as a GAM micro-
scheduler being responsible for their sequential execution. The thread can
be configured to run on a specific processors and can be assigned to a spec-
ified priority. It also tracks execution times and keeps a series of internal
timing information about each of the GAMs for which it is responsible. The
list of GAMs that are executed can be changed accordingly to the state of
the system as provided by a BaseLib2 State Machine as described earlier.
Depending on the severity of an error, the RealTimeThread can be config-
ured to take an action, which could be the complete stop of execution, or
to switch the execution to a series of “safety” GAMs.
MARTe must contain at least one real-time thread. When designing a
new system one of the major challenges is to decide what GAMs, and in
what order, are to be executed. Figure 4.5 depicts a possible set of modules
that start by acquiring signals from an hardware device, then processing
and taking decisions upon this data, and finally outputting the signals to
both a device and a storage scheme. Threads can be configured to run at
a specific frequency and all the GAMs are expected to execute within this
time. A warning or an error is issued everytime the execution time is larger
than the specified cycle period.
MARTe requires the existence of at least a timing source. A shared
variable in the RealTimeThread tracks the absolute time in microseconds.
Depending on the project, this time is usually expected to be updated by an
external hardware through an IOGAM, although sometimes the CPU clock
can be used, particularly when developing and debugging a new project.
71
4 Technical solutions and implementation 4.1 The MARTe Framework
Figure 4.5: The RealTimeThread acts a module micro-scheduler. In thisfigure a group of seven GAMs is executed at each cycle. The first GAMacquires data from a device and outputs it to the memory data buffer. Onceprocessed some of the data is written back to the hardware.
MARTe provides ready made high precision time emulators, based on the
CPU time and optimized for each of the supported operating systems. A
new control cycle is started when the absolute time is a multiple of the
requested cycle period.
The previously described acquisition module also forces the presence
of a synchronization function. When configuring MARTe one chooses if
this synchronization module has to work in interrupt or polling mode. In
the first case the execution of MARTe is arrested up to the arrival of an
external interrupt. If polling is selected the system will continuously query
the interface until an answer is provided. In both cases when an answer
72
4 Technical solutions and implementation 4.1 The MARTe Framework
arrives the absolute time is updated and the framework checks if a new
cycle is to begin.
As this is one of the most delicate parts of the system a series of checks
and timeouts can be configured. The system designer must decide what
actions to perform when a timeout or error occurs.
MARTe is also able to handle a collection of RealTimeThreads. These
can either be configured to run concurrently on the same processor or in
parallel. The only way of sharing data between threads is to use a special
IOGAM (provided by the framework) as the output of the thread producing
data, connected to an input acquisition module in the thread consuming
it. For MARTe these two synchronization GAMs emulate the presence of a
physical hardware which would produce and consume the data, allowing to
have the two threads completely decoupled. The output module can also
be used as the timing source for the driven thread and can be configured
to send undersampled filtered data, allowing to specify different running
frequencies.
MARTe can send and receive messages using the BaseLib2 message pro-
tocol described earlier. MARTe internal services are started and stopped
upon the reception of a specific message. The interface is designed to be
connected to an external object that is able do decode an external con-
figuration protocol, for instance from a human machine interface, into a
MARTe recognized message. This is the preferred way to change the list of
modules to be executed and to update GAMs parameters. After receiving a
message, the framework verifies its validity and forwards it internally. If re-
configuration is required the threads being executed are eventually stopped.
MARTe uses the HTTP server provided by BaseLib2 and supplies a
collection of HTTP based components that allow to setup a communica-
tion channel with all the internal elements. Examples of these utilities are
73
4 Technical solutions and implementation 4.1 The MARTe Framework
a remote configuration file upload and a signal server to download data
acquired during a certain period of time in CSV or MATLAB binary for-
mat. Live diagnosis of threading and memory activity are also available,
together with the list of all the registered objects. All the GAMs that
expose information are also highlighted.
74
4 Technical solutions and implementation 4.1 The MARTe Framework
4.1.3 Code generation via SysML
Modeling languages, such as the Unified Modeling Language (UML), help
the designers to foster the design and understanding of complex systems.
The Systems Modeling Language (SysML) [56] extends the UML, in-
tending to unify the various modeling languages used by systems engineers.
In particular, SysML extends the application of UML to systems which are
not purely software based, and can in particular be applied to design hetero-
geneous embedded systems. SysML also introduces a requirement diagram
to structure the requirements and link these to the system architecture and
test procedures.
During the last decade UML and SysML have been used to promote
model–driven development in different fields, such as manufacturing sys-
tems [57, 58], electronic systems [59], embedded systems [60, 61, 62], and
automotive [63].
In particular in [57], Thramboulidis extends the UML to define the
Model–Integrated–Mechatronics paradigm. Such a paradigm supports the
model–driven development of complex mechatronic systems, and it has been
used to develop a system platform called Archimedes that permits to au-
tomate the development process of manufacturing systems. A recent ex-
tension that uses SysML to model industrial automation control systems is
presented in [64], while [61] also deals with an application of model–driven
engineering to real-time automation systems.
Furthermore, SysML has been adopted in [58] to formally specify mecha-
tronics systems; such a description is then used to generate models to be
used for the verification of the automatically generated embedded control
code. A similar approach to automatically generate models from a SysML
description has been presented also in [65].
More recently, the authors of [62] have used UML to propose model–
driven approach for the analysis of the so-called dynamically partially re-
configurable systems (DPRS), which are embedded system realized with an
75
4 Technical solutions and implementation 4.1 The MARTe Framework
FPGA device with the capability of being partially reconfigurable. These
systems enables more applications to be accelerated in hardware, making
possible to reduce the overall system execution time.
Due to all this interest in the SysML language it was decided to develop
an automatic model-to-MARTe system. In fact GAM configurations can
be easily stored into text-file, as well as a number of makefiles that are
needed to compile the real-time application on different targets. Moreover
by using SysML a better system documentation is achieved.
It was decided to use a subset of the diagrams SysML provides, in
particular:
• internal block diagrams are used to specify the internal structure of
GAMs; this allows to explicitly show the distinction between GAM
internal parameters and input/output signals, which enhance the self-
documentation of the project;
• interdependency among GAMs is explicitly represented by means of
block definition diagram that show the interconnections between the
various module, also enhancing the overall project documentation.
Having proposed a model–driven approach to design a MARTe applica-
tion, is then possible to use model–2–text tools to automatically generate
part of the real-time code and of the configuration data, together with make
files for the compilation on different platforms. To this aim Topcased has
been adopted as modeling tool, since it integrates the model–2–text tool
Acceleo. Topcased is a system/software engineering toolkit which complies
with the requirements of critical and embedded applications [66].
First of all a BaseLib2 model containing all the common definitions
(classes, types, etc.) needed to model GAMs (see Figure 4.6) has been
developed.
76
4 Technical solutions and implementation 4.1 The MARTe Framework
(a) Excerpt of the BaseLib2 modeled classes.
(b) Excerpt of the BaseLib2 modeled data types.
Figure 4.6: Block definition diagrams used to model the BaseLib2 library.
Once the BaseLib2 model has been imported in a new Topcased project,
the first step to model GAMs is to define them by using a BDD. An ex-
ample is shown in Figure 4.7, where three GAMs are defined: a simple
77
4 Technical solutions and implementation 4.1 The MARTe Framework
Figure 4.7: Example of GAMs modeling. The block definition diagramreported in this figure is used to define three GAMs and to add to themthe HTTP server, which is implemented by the HttpInterface block.
PID controller, a WaveformGenerator that generates the control reference,
and a Plant block, which simulates the plant behavior and can be used to
perform offline tuning and validation of the controller.
The three GAMs reported in Figure 4.7 inherits also from the HttpInter-
face abstract class; this block is included in the BaseLib2 library and is used
to add HTTP user interface capabilities to a generic block. This scheme
enables GAMs to publish run-time execution information about the inter-
nal state of algorithms and data. When modeling a GAM it is possible to
add internal parameters (e.g., controller gains for the PID in the proposed
78
4 Technical solutions and implementation 4.1 The MARTe Framework
Figure 4.8: Internal block diagram used to define input and output signalsfor the PID GAM shown in Figure 4.7.
example) and to extend the interface (e.g., the GenerateReference() func-
tion for the WaveformGenerator GAM).
The definition of the internal parameters can be easily done by using an
IBD, as shown in Figure 4.8, where the internal structure of the PID GAM
is modeled. Moreover IBDs are also used to model input and output signals
of a given GAM. Input and output names shall match channel names into
the DDB, while the distinction between inputs and outputs allows to clearly
identify the producers and consumers of each signal.
By using the Topcased modeling tool, it is also easy to add comments
and expression objects to a GAM model, in order to add comments to
GAM parameters and signals, and to specify initial values, respectively
(see Figure 4.9). This feature is also exploited to add comments and initial
values to the automatic generated code.
Once all the GAMs within a project have been modeled, BDDs can be
used also to define interconnections between them. Such interconnection
implicitly defines the execution order of the GAMs chain by the Real-time
Thread..
Figure 4.10 shows the GAMs chain for the simple example described in
the previous section. In particular, two additional GAMs (ADC and DAC)
have been added to model the data acquisition boards of this simple real-
time control system. In Figure 4.10 the Plant GAM has not been chained,
79
4 Technical solutions and implementation 4.1 The MARTe Framework
Figure 4.9: Topcased hierarchical view of the model of the PID GAM blockshown in Figure 4.7.
Figure 4.10: Block definition diagram used to model the connections be-tween GAMs.
80
4 Technical solutions and implementation 4.1 The MARTe Framework
since this BDD models the behavior of the real system to be deployed,
which therefore does not include the plant simulation.
Starting from the SysML model of the MARTe application to be de-
ployed, which consists of the definition of the GAMs and of the GAMs
chain, the Acceleo tool can be exploited to automatically generate a large
part of the whole real-time source code, configuration and makefiles for
multi-platform compilation.
Acceleo is a code generator tool which transforms models into code, and
it has been designed to improve software development productivity. Its ap-
proach deals with many concepts grouped together under the name Model
Driven Architecture (MDA), which is obviously coherent with mode–driven
approach proposed in this work. Although MDA is currently being stan-
dardized by the Object Management Group, there is a lack of effective and
operational tools. Acceleo results from the best practices and experience
feedbacks from the use of MDA in the industry, and it is fully integrated
into Topcased. In particular, it is easy to develop Acceleo plug-ins for
Topcased.
By using the Acceleo plug-in, the SysML model is parsed and the fol-
lowing files are produced for each GAM, each one in its own subdirectory:
• the GAM C++ source files (.h and .cpp);
• the header files containing the input and output signals for easier
interfacing with the DDB;
• additional files for multi-platform compilation (including make files);
• the GAM configuration file.
Moreover, the top level MARTe configuration file (including all the
GAM-relevant configurations previously generated) is also produced.
81
4 Technical solutions and implementation 4.1 The MARTe Framework
4.1.3.1 Sample application to the FTU Tokamak
As an example of application of the model–driven approach, the plasma
control system of FTU has been modeled, and a large part of the code for
the real-time system has been automatically generated.
The Frascati Tokamak Upgrade is a medium size Tokamak (minor and
major radius of the chamber are, respectively, 0.31 and 0.935 meters) op-
erating since 1990 at the ENEA laboratories of Frascati, in the south of
Rome (Italy). FTU is capable of discharges of up to 1.5 seconds of length
with a toroidal field of 8T .
The magnetic field responsible for plasma shaping and current drive, is
generated by four different amplifiers that feed a coils system that surrounds
the tokamak vacuum chamber. In particular, two amplifiers, named AL-F
and AL-V, are used for the horizontal position control (the former, faster,
is in closed loop, while the latter is usually operated in feed-forward), while
the AL-H amplifier for the vertical one, and AL-T for the plasma current.
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2−1
−0.8
−0.6
−0.4
−0.2
0
0.2
0.4
0.6
0.8
1
T1
T2
T3
V
FI
FE
HIHE
T2
T3
V
FI
FE
HIHE
Figure 4.11: Cross section of the FTU Tokamak.
82
4 Technical solutions and implementation 4.1 The MARTe Framework
Figure 4.11 and Figure 4.12 show a cross section of the FTU tokamak
toroidal vessel. The vacuum chamber sits in the middle of the figure, while
the coils lay around it, named following the amplifier to which they are
connected (F, V, H and T).
Figure 4.12: FTU vacuum chamber.
The block diagram of the plasma control system of FTU is reported
in Figure 4.13. The blocks in light grey represent the actuators and the
plant, the white one is the algorithm which reconstructs the plasma shape
from the magnetic measurements, the oval blocks are the references and the
feedforwards for the actual control systems, whose main blocks are depicted
in dark grey.
The plasma control system is divided in two main parts: the gas control
system, which regulates the density of the plasma; and the plasma current
and position control system, which is made by three PIDs (the vertical
83
4 Technical solutions and implementation 4.1 The MARTe Framework
Plant
Gas Valves
Current
Amplifiers
Density
Controller
Gas preprog.
value
I preprog.
values
H
Controller
F
Controller Allocator
PlasmaShape
ExtremumSeeking
Algorithm
Direct/Reflected Power
Pos. ref.
values
LLL Temp.
Controller
F H V T
LLL Temps
Magnetics
z r
r*
z,r
T
Controller
Ip
Figure 4.13: Block diagram of the FTU plasma control system.
position feedback, which uses the AL-H amplifier, the horizontal one, which
uses the AL-F amplifier, and the AL-T controller which drives the plasma
current to the requested value). The AL-V amplifier is operated in open-
loop2. The feedback quantities for AL-F and AL-H (called DEP and DEZ)
are the flux errors measured on the horizontal and vertical axis of the
vacuum chamber, and are proportional to the plasma position error. Those
quantities are evaluated from the magnetic measurements by the realtime
Last Closed Magnetic Surface estimation algorithm, “Plasma Shape” in
Figure 4.13 (see Tutorial 7 in [67]).
The plasma current and position control system is also augmented by
three nonlinear controllers: the temperature controller for the experimen-
tal liquid lithium limiter (in development), an extremum seeking algorithm
2It should be noticed that “open loop” is intended only concerning the FTU FeedbackSystem: in fact all the amplifiers have an internal control system which drives the outputcurrent to the reference value, so, strictly speaking, no one of them is actually operatedin open-loop.
84
4 Technical solutions and implementation 4.1 The MARTe Framework
for LH power optimization [68], and an allocator algorithm used to control
plasma elongation [44].
Figure 4.14: BDD of the FTU plasma control system.
In order to revamp and improve the FTU control systems, it was decided
to reimplement it from scratch leveraging the MARTe Framework [4]. To
do so the PCS has been “packaged” in small self-contained pieces which
could be wrapped as GAMs. The final result of this packetization is shown
in Figure 4.14. Note that the PCS reported in the figure is a simplified
version, as the safety and scheduling modules which had to be produced
for a reliable operation of the device were added at a later stage. Each block
85
4 Technical solutions and implementation 4.1 The MARTe Framework
in Figure 4.13 has been translated in a single GAM. As the AL-F PID has a
different behavior than the other ones (more precisely it has been upgraded
with an antiwindup system in order to avoid low current oscillations [69]),
instead of using various instances of a single and standard PIDGAM, it has
been decided to develop three different PID-based controllers to leave room
for future improvements.
Figure 4.15: Auto-generated files for the FTU Plasma Control System.
The BDD diagram shown has been then fed to the developed Accelleo
plugin in order to generate the boilerplate code. In Figure 4.15 we show
the amount of files automatically produced. The vast majority of standard
code, as well as a simple master configuration file, has been generated,
greatly reducing development time. In particular about 60% of the code
has been automatically generated, most of which was the one relative to
the initialization and visualization of each GAM’s parameters (i.e. the most
error-prone code). The only code which had to be actually written was the
“scientific” one, i.e. the algorithms themselves.
86
4 Technical solutions and implementation 4.2 The JET systems
4.2 The JET systems
4.2.1 The Vertical Stabilisation system
As shown in a previous chapter, in order to obtain better fusion perfor-
mances the plasma is forced to be vertically elongated, unfortunately be-
coming unstable [70], thus needing closed loop control. The aim of the
Vertical Stabilisation (VS) system is to control the instability by driving
the current in a set of Poloidal Field (PF) coils so that a radial magnetic
field is produced. The lose or erroneous control of the instability can have
huge negative impacts, as plasma disruptions (complete loss of thermal and
magnetic energy) may occur, inducing large currents and forces in the ma-
chine vessel.
An international project for the upgrade of the JET plasma control
(Plasma Control Upgrade, PCU) [71, 72] allowed to greatly enhance the
current VS system. The project has seen the development of new modeling
techniques for the analysis of the vertical instability, as well as numerous
technological improvements, concerning in particular the control system
(with a complete upgrade using the MARTe Framework) and the new power
supply ERFA (Enhanced Radial Field Amplifier).
The hardware-software requirements for the upgrade were the execu-
tion of the closed loop cycle within 50 µs with a maximum jitter of 2.5 µs,
including the interface with hardware and data processing. An application
fulfilling these requirements was designed using the MARTe framework,
where a multi-disciplinary team contributed to the different parts of the
system: hardware and software engineers developed the integration with
hardware and the overall setup of the system, while control engineers pro-
duced the GAMs for modeling and control.
Although JET is a pulsed machine, with experiments that can last up to
2 minutes and where the presence of the VS system is vital, it was decided
from the beginning to have the vertical stabilization always running and
87
4 Technical solutions and implementation 4.2 The JET systems
guaranteeing real-time, making no distinction between operational phases.
This is particularly relevant for future fusion devices like ITER [73], where
subsystems will have to adapt to a steady state operation reality. This
was also only possible since no pulse-based assumptions were made in the
design of the framework.
4.2.1.1 The Vertical Stabilization hardware
The system runs on a Intel Quad-Core processor and uses the RTAI im-
plementation [74], with a standard Linux kernel option (isolcpus) to ex-
plicitly assign interrupts and Linux tasks to a single core, breaking the
symmetric multiprocessor scheduler decisions. All MARTe threading activ-
ity is placed on the remaining three cores, allowing one to be completely
dedicated to the RealTimeThread. This single feature immediately guar-
antees that no external activity or spurious interrupts will deviate the real-
time system from its high priority activities. It is important to notice
that all these configurations are completely transparent to MARTe and no
code modifications had to be performed, not even to change in which cores
threads should run or how memory should be arranged. The downside
of this implementation is that, living in kernel space, software faults have
large impacts on the system, making it very hard to debug problems that
are not closely related to the framework, mainly in the GAMs algorithms.
This is where the multi-platform configuration proves to be a powerful
mechanism as all the code can be tested as is in more friendly environment
like userspace Linux or MS Windows.
The hardware of the data acquisition system is based on the PICMG 3.0
Advanced Telecommunications Computing Architecture (ATCA) standard
and contains 6 data acquisition cards. Each board comprises 32 18-bit res-
olution analog to digital converters acquiring at 2Msamples/s. The cards
are connected to the controller computer using the Peripheral Component
88
4 Technical solutions and implementation 4.2 The JET systems
Figure 4.16: Photo of the backpane of the VS5 ATCA crate.
Interconnect Express (PCIe) point-to-point links through the ATCA back-
plane [75]. A rear transition module (RTM) connects the system to the
radial field amplifier ERFA (for a picture of the crate see Figure 4.16).
When designing the hardware interface driver for the data acquisition
system it was decided to use an interrupt-less environment with a data
polling scheme, but without compromising the other interfaces to the com-
puter, e.g., network access. The data acquisition boards, map in the con-
troller computer memory a set of four buffers as described in Figure 4.17.
The selected buffer is consecutively cycled every 50 µs by the firmware. The
first value written is the header and contains the absolute time since the
89
4 Technical solutions and implementation 4.2 The JET systems
last trigger, followed by the values of the ADCs and finally by the footer
containing the same value as the header. The driver continuously queries
the value of next header to be written and as soon as it changes, it starts to
check the footer. When these two values are the same, the driver signals the
high level IOGAM, which in turn broadcasts and updates MARTe absolute
internal time. The framework uses the values provided by the high resolu-
tion timers of the processor to measure the performance of the system and
to keep track of the jitter associated with the synchronization mechanism.
The firmware also assures synchronization between all boards.
18050 17900 1795018000
32 A
DC
s
10
0 u
s a
go
32 A
DC
s
50
us a
go
32 A
DC
s
20
0
us a
go
32 A
DC
s
15
0 u
s a
go
18050 17900 1795018000
18050 17900 1795018000
32 A
DC
s
10
0 u
s a
go
32 A
DC
s
50
us a
go
32 A
DC
s
20
0
us a
go
32 A
DC
s
15
0 u
s a
go
18050 17900 1795018000
18050 17900 1795018000
32 A
DC
s
10
0 u
s a
go
32 A
DC
s
50
us a
go
32 A
DC
s
20
0
us a
go
32 A
DC
s
15
0 u
s a
go
18050 17900 1795018000
18050 17900 1795018000
32 A
DC
s
10
0 u
s a
go
32 A
DC
s
50
us a
go
32 A
DC
s
20
0
us a
go
32 A
DC
s
15
0 u
s a
go
18050 17900 1795018000
18050 17900 1795018000
32 A
DC
s
10
0 u
s a
go
32 A
DC
s
50
us a
go
32 A
DC
s
20
0
us a
go
32 A
DC
s
15
0 u
s a
go
18050 17900 1795018000
18050 17900 1795018000
10
0 u
s a
go
50
us a
go
20
0
us a
go
15
0 u
s a
go
18050 17900 1795018000
Core #1
Linux
Core #2
MARTe
Services
Core #3
MARTe
Services
Core #4
RT-Thread
network
and other
I/O interrupts
HTTP server
Logger
...
CPU
Master board
Figure 4.17: Data synchronization of the ATCA boards is performed in themaster board, which is guaranteed by the firmware to be the latest to havedata available. Once new data is available it is collected and a new MARTecycle starts. The CPU core isolation scheme allows to protect the real-timeenvironment from spurious and undesired interrupt sources.
4.2.1.2 Interfacing with JET
The JET Control and Data Acquisition System (CODAS) [76] is the en-
tity responsible for providing control, monitoring and data acquisition to
all the existent subsystems. As a JET subsystem, the vertical stabiliza-
tion uses the tools provided by CODAS, both for plant configuration and
90
4 Technical solutions and implementation 4.2 The JET systems
data retrieval. Between pulses, experts are allowed to change the system
configuration by mainly updating values in the different GAMs. This is
performed using the standard user interface of JET (Figure 4.18) which
contains several access layers and where expert users and engineers are al-
lowed to upload configuration files for each of the modules. VS operators
are expected to act on a upper layer where atomic values are validated and
have already a unique and direct physical meaning. As of today and with
configuration files that can easily have more than 7000 lines, the require-
ment for an advanced user-interface was almost compulsory, allowing to
capitalize all the VS experimental advanced features [13], minimizing the
risks of configuration and regression faults.
4.2.1.3 Vertical Stabilization GAMs
The design of the new system has been carried out following a model–based
approach [9], which turns out to be essential when high performance and
robustness are required. In particular, such an approach has been adopted
for:
• the design of the new power supply for the RFA circuit, called En-
hanced Radial Field Amplifier (ERFA), to assess the system perfor-
mance for different choices of the amplifier’s maximum voltage and
current [72];
• the assessment of the best choice for the turns setup of the RFA coils;
• the design of the new VS control algorithm, to optimize the controller
parameters for the different operative scenarios.
Thanks to the availability of reliable linear models for the plasma mag-
netic behavior [36, 37], a validation phase has been carried out for each
design step, from conceptual design to implementation.
Scenarios with highly elongated plasmas in presence of large ELM per-
turbations are envisaged to achieve better fusion performance in tokamaks.
91
4 Technical solutions and implementation 4.2 The JET systems
Figure 4.18: JET LEVEL1 interface for the new Vertical Stabilisation Sys-tem 5.
In these extreme scenarios a general purpose controller3 cannot guarantee
the requirements. Hence, to push the performance up to the desired level,
it is usual to rely on a model–based design approach [9], which assures the
needed control performance. In particular, for each plasma scenario, it was
envisaged that the JET VS system could potentially use different estima-
tions of the plasma vertical velocity, as well as different adaptive algorithms
for the controller gains, in order to optimize the system behavior.
3We refer to general purpose controller as a controller which is robust enough to satis-factory work under any envisaged operational scenario, without pushing the performanceto the best. In particular a general purpose controller should at least do not disrupt theplasma for almost all the possible operational scenarios.
92
4 Technical solutions and implementation 4.2 The JET systems
The architecture proposed for the VS system is similar to the one
adopted for the eXtreme Shape Controller at JET [31, 34, 30]. In particu-
lar, it permits to face with different scenarios during the same experiment in
a simple manner. However, since the controllers are optimized, there must
be a safety logic that, in case of unexpected dangerous events, switches to
the general purpose controller, in order to get a safe termination of the
experiment.
Since control algorithms are usually developed in a modeling and sim-
ulation environment (e.g. Matlab/Simulink), another requirement for the
new VS software architecture concerns the possibility to check and vali-
date the whole real-time code (including both the control algorithm and
the auxiliary code, i.e. communication interface with other systems, data
acquisition, etc.) before testing it on the plant. To perform this offline
validation real-time computational model of the plant, based on detailed
plasma linearized models [36, 37] are needed.
It turns out that the adoption of a flexible and modular software archi-
tecture is mandatory for the VS implementation, in order to successfully
cope with the functional requirements summarized above. Indeed, the old
VS system, based on 4 Texas Instruments DSPs (TMS320C40), was not
flexible enough to satisfy the requirements. As an example, the present
control system has been used to carry out some preliminary experiments
aimed to confirm the simulation results. To perform these tests the needed
modification had been applied as patches to the normal control mode, since
it was not possible to isolate the control algorithm from the remaining part
of the software. It turned out that, given the limitations of the present
architecture, anytime a new functionality was required its implementation
was not straightforward, mostly due to this lack of modularity, which is
always needed in a real world control application.
The overall system is composed of a collection of 18 modules. The
first GAM synchronizes and retrieves data from 192 ADC channels which
93
4 Technical solutions and implementation 4.2 The JET systems
are then written into the DDB. Using some of these signals, the second
GAM produces a series of synthetic data, like threshold detection and linear
combinations of magnetic signals. ObserverGAM subsequently provides an
estimate of the plasma vertical velocity, followed by a scheduler module
deciding which of the following GAMs must be executed.
Four controller GAMs are then sequentially executed and only the one
previously selected by the scheduler, through a signal in the DDB, per-
forms real work. Two modules, named vertical and divertor amplifier, are
allowed to override the output of the controller with some special features,
like dither or hysteresis, and are run before calling the module responsible
for writing the output back to the DAC and close the loop. A collection
of 6 different GAMs acquire in memory the data for each type of signal:
ADC, controller, debug, performance, waveforms and asynchronous. Fi-
nally, a module performing live statistics of configured signals is executed.
The scheme is depicted in Figure 4.19 and mean values for the time of ex-
ecution of these application modules, reported in Table 4.1.
The architecture of the new JET VS system has been conceived to oper-
ate in advanced plasma scenario, where different estimations of the plasma
vertical velocity must be available in order to optimize system performance.
For these reason, the ObserverGAM has been designed as a container of
ten different observers which computes different estimations of the plasma
vertical velocity.
An observer receives as input a set of measurements and a transfor-
mation matrix. The resulting outputs can be used as inputs for other
observers, in a daisy chain design, enabling the eventual reuse and opti-
mization of some calculations.
The observer computational interface can be extended and specialized
in order to meet and model specific requirements, loosing in flexibility but
leveraging configuration and functionality. One example is the state space
model observer [77], where instead of specifying one anonymous matrix, the
94
4 Technical solutions and implementation 4.2 The JET systems
Figure 4.19: All the modules executed for each control cycle by theRealTimeThread. The first module provides the synchronization with thehardware. All the code must be executed in less than 50 µs.
end-user is expected to provide the matrices with a direct correspondence
to the observer dynamic model.
As for the ObserverGAM, the Controller GAM has been conceived as
a container of four different control algorithms which are available during
whole pulse. Thanks to this choice, it is possible to meet the requirements
in terms of disturbances rejection and thermal losses in the RFA circuit,
by selecting the optimal controller in each phase of the pulse. Furthermore
this architectural choice permits to safely validate new control algorithms
on the plant by running them in open–loop during the experiments.
95
4 Technical solutions and implementation 4.2 The JET systems
0
1
2
3
4
5
6
7
8
9
10
Execution tim
e (
us)
GAM Execution times (#78210)
AT
CA
AD
Cand s
ynchro
nis
ation
Sig
nal P
rocessin
g
Observ
er
Schedule
r
Contr
olle
r 1
Contr
olle
r 2
Contr
olle
r 3
Contr
olle
r 4
Vert
ical A
mp. M
odule
Div
ert
or
Am
p. M
odule
AT
CA
Outp
ut
AD
C C
olle
ction
Contr
olle
r C
olle
ction
Debug C
olle
ction
Perf
orm
ance
Colle
ction
Async. C
olle
ction
Wavefo
rm C
olle
ction
Web−
sta
tistics
Maximum
Minimum
Mean
Figure 4.20: Maximum, minimum and mean execution times for all VS5GAMs.
There are a number of inputs that are common to all the control algo-
rithms (i.e. the plasma velocity estimations and the current in the RFA
circuit). Moreover, each algorithm can have its own input signals. The
selection of the plasma vertical velocity to be used for the control is made
on the basis of the scheduling signal provided by the Scheduler GAM.
The control algorithms can implement any linear or nonlinear control
algorithm, provided that the computational effort is achievable. However
each control algorithm must satisfy two basic requirements:
• control of the plasma vertical velocity, in order to achieve vertical
stabilization;
• control the current in the RFA circuit to avoid current saturation and
96
4 Technical solutions and implementation 4.2 The JET systems
Table 4.1: The execution times of the VS application modules.
GAM Mean (µs) Std. dev. (µs)
ADC 2.43 0.26
Signal processing 5.14 0.01
Observer 4.00 0.04
Scheduler 0.37 0.01
Controller 1 1.01 0.02
Controller 2 0.31 0.01
Controller 3 0.28 0.02
Controller 4 0.26 0.01
Vertical amplifier 0.85 0.03
Divertor amplifier 0.59 0.02
DAC 0.39 0.02
Data collection 1 2.83 0.07
Data collection 2 0.84 0.05
Data collection 3 1.46 0.34
Data collection 4 1.08 0.02
Data collection 5 0.92 0.04
Data collection 6 0.74 0.06
Statistics 1.24 0.02
to reduce the thermal losses in the coil.
In the current version of the JET VS system the plasma velocity regulator
is a proportional controller while a proportional–integral regulator is used
for the current in the RFA circuit. The controller gains are varied during
the experiment on the basis of some additional signals (e.g. the tempera-
ture in the ERFA).
97
4 Technical solutions and implementation 4.2 The JET systems
The VAMGAM is executed immediately after the controllers and se-
lects the desired controller output, on the basis of the scheduling signals.
Before sending it to the ERFA, the selected voltage request can be further
processed by a series of components: a Dither module, a Delay module, a
Kicks module and a Relay Characteristic.
The Dither component adds a sawtooth waveform to the selected volt-
age request. This feature is used to reduce the effect of the voltage quan-
tization. Indeed ERFA is composed of four units each rated 3 kV, 5 kA,
which can be configured to deliver 12 kV, 5 kA [78].
The Delay module is used to delay the voltage request by a given num-
ber of time samples. The resulting delay introduced in the system has been
used to estimate stability margins during dedicated tests [79].
The Kicks module is the most innovative component of the VAMGAM.
It implements all the various types of “kicks”, voltage pulses of a given
length and amplitude, used mostly to drive Vertical Displacement Event
(VDE) or for ELM pacing.
Each kick is made by a “kick waveform” and of a “kick type”. The
former describes the voltage waveform to be applied by the kick component,
while the latter decides when to apply the waveform itself.
A kick waveform is defined as a sequence of time windows, each one
specifying the following parameters:
• the duration (in seconds) of the time window;
• the amplitude (in volts) of the window;
• the kick modality which can be set either equal to
– ON, to apply in feed-forward the amplitude of the current time
window, substituting the value calculated by the controller;
98
4 Technical solutions and implementation 4.2 The JET systems
– OFF, to ignore the amplitude specified and to turn off the kick
logic in the current time window;
– ADD, to add the amplitude specified to the value calculated by
the controller);
• the time, which can set equal to
– DEFAULT, to use the value specified by the length parameter
as duration of the current time window;
– WAVEFORM, to use the values specified by a given waveform
as duration of the current time window.
By using the kick waveform and the kick type parameter a very high
level of customization is achieved, allowing the user to specify:
• timed kicks which are kicks applied at a precise time during the exper-
iment, and which are used to simulate Vertical Displacement Events
(VDEs) and to perform halo currents studies [80];
• periodic kicks, used for ELM pacing [81];
• Hα kicks which are triggered at the occurrence of an ELM, and which
are used to switch off the controller during an ELM phase;
• saturation kicks, which are used as protection system when the am-
plifier current reaches the safety threshold, i.e. when the current is
close to the saturation. If this is the case the current is moved far
from saturation by using voltage kicks.
Finally the Relay Characteristic module implements the same variable
hysteresis logic of the power supply ensuring that the correct voltage is
applied by the amplifier even in presence of noise or not perfect calibrated
DACs.
99
4 Technical solutions and implementation 4.2 The JET systems
The DAMGAM is a module created in order to let the VS system act on
the divertor coils, which are normally controlled by the Shape Controller [3].
In particular the DAMGAM made possible the application of voltage kicks
to the divertor coils.
SC request for D1
JG09.365-6c
Voltage request for D1
Voltage request for D1
Voltage request for D1
Voltage request for D1
SC request for D2
SC request for D3
SC request for D4
Transformed (P) space
Divertors space
Figure 4.21: The internal logic of the DAM.
A block diagram of the DAMGAM is shown in Figure 4.21, where P is
a 4-by-4 invertible matrix which defines a linear transformation that maps
the four divertor voltage requests received from the Shape Controller into a
custom P-space. In this space a gain and a saturation can be applied to each
signal, and the transformed signals pass also through a kick controller which
works in almost the same way as the VAMGAM module. Eventually the
signals are transformed back in voltage requests to the divertor amplifiers.
Thanks to its highly configurable structure the DAMGAM can be effec-
tively used to explore all the possible interactions and advantages of using
also the divertors for the task of the vertical stabilization.
4.2.1.4 User Interface
Two main graphical interfaces are available, namely the Level 1 Interface
(L1-Interface), provided by CODAS, and the Web Interface. The former
allows the user to setup all the VS system parameters before the experi-
ment, while the latter permits to monitor the state of the system during
the experiment.
100
4 Technical solutions and implementation 4.2 The JET systems
The structure of the L1-Interface is made of several graphical layers,
each one corresponding to a different level of abstraction. Such layers are
organized in two levels:
• Real-time executor level, which allows the user to load the MARTe
configuration. In particular, the user can specify the GAMs to be
executed together with their parameters, specifying them by means
of text files. It is important to note that this level is common to all
MARTe-based applications.
• Application level, which is customized for the VS system. This level
is designed to allow the user to set each controller parameter before
the experiment.
The Real-time executor level is made of three different graphical pages:
• the MARTe Layer page, which is used to setup the interfaces between
MARTe and the other external systems;
• The MARTe Thread Layer page, where the user can load all the
GAMs that make up the real-time system to be deployed. In par-
ticular for the VS system all the GAMs are loaded from this page,
together with their configuration files.
• The Patch page, which is used to change the default values of the
system parameters.
The Application level deployed for the VS system is made of two graph-
ical pages:
• The General page, which is used to set the parameters of the con-
troller. In particular this page is organized in four subsections, each
one corresponding to one of the following module: SPGAM, Observer
GAM, Controller GAM and VAMGAM.
101
4 Technical solutions and implementation 4.2 The JET systems
• The Scheduler page. This page is dedicated to the Scheduler GAM
and allows the user to plan the experiment by setting the VS behavior
in each of the 25 available time windows. For example, in each time
window the user can choose the estimation of the plasma vertical
velocity to be controlled together with the desired control algorithm.
This page permits also to set the behavior of both the VAMGAM and
the DAMGAM, and to switch on the kicks performed by these two
modules.
The Web Interface is based instead on the MARTe framework and it
is automatically generated by the real-time application. This graphical
interface allows the user to navigate into the GAMs structure and check
the value of the parameters loaded in the VS system.
A sample screenshot of the Vertical Stabilization Web Interface is re-
ported in Figure 4.22.
4.2.1.5 First Results
CODAS is collecting an average of 320 signals per pulse, amounting to
several hundred of megabytes of data. The data collection modules can be
configured to acquire several windows at different frequencies, but higher
importance is given to the data acquired by the ADCs, as the magnetic
signals can be used later for simulation and modeling purposes.
The new vertical stabilization architecture has been running in parallel
with the previous version of the system since the summer of 2008 and it was
already used several times to control the machine in closed loop. Several
consecutive weeks of operation are regularly achieved, with the system run-
ning and in real-time 24 hours per day. During these long operation periods
the configuration was changed by the operators a considerable amount of
times and the system proved to have the capacity to withstand and react
to it with remarkable effectiveness.
One of the major accomplishments regarding the software side of the
102
4 Technical solutions and implementation 4.2 The JET systems
Figure 4.22: A screenshot of the VS5 Web Interface: the VAMGAM.
project was the achievement of jitters well under 1 µs, as shown in Figure
4.23 where the standard deviation is 0.12 µs . These figures are always true,
not only during the pulse, and were only possible due to key design deci-
sions in the VS configuration, mainly the interrupt and processor isolation.
Again, this was only possible due to the uncommitted way MARTe was
designed, allowing to configure the system (e.g. threading) in a completely
transparent way.
The commissioning of the new VS system has been carried out at JET
during the C26 experimental campaign. During the commissioning period
the old control algorithm has been implemented on the new system, and
ran in parallel with the old one.
The first tests consisted in comparing the voltages requested made by
the new VS controller with the ones provided by the old system, in or-
103
4 Technical solutions and implementation 4.2 The JET systems
Figure 4.23: The system is continuously is real-time with a jitter inferior to1 µs. In this figure 105 control cycles were performed and the error relativeto the 50 µs is due to the imprecision on the time measurement (usingthe processor timers) and to the natural jitter associated with accessing amemory location.
der to check the accuracy of the new references, and to verify if all the
experimental features were being activated when requested. After gaining
some confidence on the validity of the acquired data and on the software
modules, the new VS started to close the loop in plasma during the ramp
down phase, where the plasma current is smaller and the risk of actually
endangering the machine very small.
Finally, the first plasmas were controlled using the new VS system in
different operational scenarios. No software failures were ever observed
during the execution of an experiment.
After this phase the new system has been employed during the C27
experimental campaign for the commissioning of the ERFA amplifier, and
also to choose the optimum number turns for the coils in the RFA circuit.
For this purpose, the performance of the vertical controller has been as-
sessed not only with plasmas of varying vertical instability growth rate,
104
4 Technical solutions and implementation 4.2 The JET systems
but also with different plasma–wall clearance, q-profiles [6], etc. This has
been achieved by means of the analysis of the response to controlled per-
turbations (vertical and divertor kicks) in as wide a range of configurations
as possible.
In order to avoid disruptions, the kicks durations have been assessed by
means of closed–loop simulations.
As an example, in Figure 4.24 a comparison between experiment and
simulation is shown.
1.0
VERFA
Experimental
Simulated
0.5
0
-0.5
-1.0
23.10 23.15 23.2023.05 23.25
Vo
lta
ge
(V
)(1
04)
Time (s)
JG
09
.36
5-8
a
(a) Amplifier voltage. Note that af-ter each positive kick there is a neg-ative counter kick due to controllerreaction
1000
2000IERFA
Experimental
Simulated
0
-1000
-200023.10 23.2023.00 23.30
Am
pe
re (
A)
Time (s)
JG
09
.36
5-8
b
(b) Amplifier current.
0
2
Experimental
Simulated
-2
-4
-623.10 23.15 23.2023.05 23.25
Ve
rtic
al ve
locity e
stim
atio
n (
10
7)
Time (s)
JG
09
.36
5-8
c
(c) Vertical velocity estimation.
Figure 4.24: Experimental (solid black lines) and simulated values (dashedred lines) for 12 kV positive kicks applied during JET pulse #78376 startingfrom t = 23 s.
105
4 Technical solutions and implementation 4.3 The new FTU Feedback System
4.3 The new FTU Feedback System
Recently effort has been put on the reengineering and porting of the old
FTU feedback under the MARTe Framework. Considering the structure of
the feedback system shown in Figure 4.13 in the previous chapter, a more
organic structure for the system using various GAMs and limiting as much
as possible the responsabilities of each one of them has been envisaged. The
proposed GAM subdivision is reported in in Figure 4.25.
Three GAMs manage the communication with the sensors and actuators
(ADC and DAC), and generate the preprogrammed references requested by
the users. The SignalProcessingGAM then verifies the plasma presence and
diagnoses problems such as plasma runaway, gas immission failures, and so
on. The 32 magnetic measures, together with the toroidal current an the
Vloop integral, are passed to the MomentGAM, which first evaluates and
removes the pick-up toridal field offset from the acquired data, and then
preforms the toridal multipolar expansion described in [82]. The 12 out-
put signals (external and internal moments) are part of the inputs for the
LCMSGAM and are also sent via RTNet [54, 55] to a satellite station whose
aim is the evaluation of the plasma equilibrium using a realtime version of
the ODIN code [83, 84]. The LCMSGAM calculates the poloidal flux on
the limiter contact points, mixing the moments to the geometrical functions
that describe the mesh4. The absolute maximum value for the flux among
the contact points is the one of the last magetic surface. The reconstruc-
tion of the LCMS is then carried out by iterating this process for all mesh
points and stopping each time that the evaluated flux is greater or equal
to the contact point one. The last set of inputs of the LCSMGAM are the
preprogrammed radiuses5, which are used to calculate the plasma position
error in terms of ∆Ψ (DEP and DEZ signals, for horizontal and vertical
position error respectively). These two signals, together with the plasma
4The actual mesh is made of 128 steps along the radius and 64 steps along the poloidalsection
5Internal, external, upper and lower desidered plasma radius
106
4 Technical solutions and implementation 4.3 The new FTU Feedback System
current, are the inputs for the CoilsControllerGAM, which holds the con-
trollers for the three poloidal field amplifiers, and the plasma current one.
Before executing this GAM, however, the ExtremuumSeekingGAM, if ac-
tive, optimises via an extremum seeking algorithm the plasma position, in
order to maximise the coupling with the LH antenna [68]. The CoilsCon-
trolGAM is made by four PID controller objects6.
In FTU, the gas control is independent from the described process and
is made by four GAMs: the PrefillControlGAM , the PlasmaDensityCon-
trolGAM, the SwapSignalGAM and the FluxVoltageGAM. The first two
GAMs generate the gas flux request for the valves in the prefill and in the
plasma phase respectively. The SwapSignalGAM schedules the control sig-
nals of the previous two GAMs, and finally the FluxVoltageGAM translates
the flux request into the voltage reference for the valves amplifier using a
nonlinear calibration curve.
In FTU MARTe is being deployed using USB pendrives with a live linux
distribution. This allowed to test and deploy different systems without
needing to reinstall anything on the VME stations.
4.3.1 Experimental results
The completed feedback system is being currently tested in the backup sta-
tion, running in parallel with the previous feedback system. A comparison
some produced signal of the old and new systems is shown in in Figures 4.26
and 4.27, while Figure 4.28 shows the behavior of the gas control system
(in closed loop).
6Note that it was necessary to merge the PIDs and the various nonlinear controllersin a single GAM, as their signals were heavily intertwined.
107
4 Technical solutions and implementation 4.3 The new FTU Feedback System
ElongationController
PlasmaState &SecurityCheck
Signal Proc.&
OffsetRemoval
Scheduler AntiwindupSystem
PIDController
FluxVoltageGasControl
On-Off GasControl
PIDController
PIDController
RTNET IN
ExtremumSeeking
Algorithm
DAC
&
NONRTSTREAMING
Main FeedBack System
ODIN Satellite NodeLH Satellite Node
ADC
LHTubeDAC
LLL Temp.Controller
ADC
&
WAVEFORM
GENERATION
TControl
HControl
F and VControl
Vacuum Moment
RTNETOut
LCMS
Mesh0Mesh0
Mesh0Mesh0
Mesh0
Odin
Figure 4.25: Block diagram of the MARTe FTU feedback system.
108
4 Technical solutions and implementation 4.3 The new FTU Feedback System
0 0.5 1 1.50.646
0.648
0.65
0.652
0.654
0.656
Time [s]
Po
sitio
n [
m]
RS1 − MARTe
0 0.5 1 1.50.646
0.648
0.65
0.652
0.654
0.656
Time [s]
Po
sitio
n [
m]
RS1 − Current System
0 0.5 1 1.5
1.21
1.215
1.22
1.225
1.23
1.235
Time [s]
Po
sitio
n [
m]
RS2 − MARTe
0 0.5 1 1.5
1.21
1.215
1.22
1.225
1.23
1.235
Time [s]
Po
sitio
n [
m]
RS2 − Current System
Figure 4.26: Reconstructed internal and external radiuses for the presentcontroller and the MARTe-based one.
109
4 Technical solutions and implementation 4.3 The new FTU Feedback System
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6−0.04
−0.02
0
0.02
0.04
0.06
Time [s]
∆Ψ
[W
b]
DEP − MARTe
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6−0.04
−0.02
0
0.02
0.04
0.06
Time [s]
∆Ψ
[W
b]
DEP − Current System
Figure 4.27: Magnetic flux measurement ∆Ψ, used as horizontal positionerror for the coils control.
110
4 Technical solutions and implementation 4.3 The new FTU Feedback System
−10 −8 −6 −4 −2 0 20
0.5
1
1.5
2
2.5
3
x 10−5
Time [s]
Pre
ssu
re [
mb
ar]
Prefill
−10 −8 −6 −4 −2 0 20
10
20
30
40
50
60
Time [s]
De
nsity [
ele
ctr
on
s/m
3]
Plasma density
−10 −8 −6 −4 −2 0 20
2
4
6
8
Time [s]
DA
C v
olta
ge
[V
]
Valve control voltage
Figure 4.28: Pressure and pressure prefill reference , plasma density refer-ence and interferometer density average, valve amplifier request.
111
Chapter 5
Conclusions and future work
In this Thesis various control problem in the field of nuclear fusion research
have been illustrated, such as the Vertical Stabilization and the Shape
Control problem. In particular work has been carried out on:
• The problem of vertical instability of elongated plasmas, which has
been illustrated from a general perspective as well by detailing the
solution to the issue carried out in the JET Tokamak, showing the
control loop of the european Tokamak, and how the whole system has
been revamped in the framework of the european PCU project;
• The MARTe Framework, developed in the same PCU project as the
new JET Vertical Stabilization system;
• The JET Shape Controller, previously augmented with the eXtreme
Shape Controller (XSC), which has been furtherly upgraded with a
Current Limit Avoidance (CLA) module, capable of moving poloidal
field currents away from saturations without excessive modifications
of the plasma shape;
• The Frascati Tokamak Upgrade (FTU), in particular concerning the
solution to the AL-F amplifier oscillating current output problem, and
112
5 Conclusions and future work
on the revamping of the feedback system by porting it to the MARTe
Framework).
Most of the work done on the FTU Tokamak is still work in progress,
and as such will be furtherly developed in the following years. This, together
with a better documentation, improvements, and the ideation of tools for
rapid control system development related to the MARTe Framework is of
evident ITER-relevance, and the accumulated know-how will be reused as
much as possible in the future development of the next fusion machines.
113
Bibliography
[1] L. Giancarli, V. Chuyanov, M. Abdou, M. Akiba, B. Hong, R. Lsser,
C. Pan, and Y. Strebkov, “Breeding Blanket Modules testing in ITER:
An international program on the way to DEMO,” Fusion Engineering
and Design, vol. 81, no. 1-7, pp. 393 – 405, 2006.
[2] F. Piccolo, JET Vertical Stabilization System: Modelling and Control.
PhD thesis, 2007.
[3] F. Sartori, G. De Tommasi, and F. Piccolo, “The Joint European
Torus, Plasma Position and Shape Control in the World’s Largest
Tokamak,” IEEE Control Systems Magazine, vol. 26, no. 2, pp. 64–
78, 2006.
[4] A. Neto, F. Sartori, F. Piccolo, R. Vitelli, G. D. Tommasi, L. Zabeo,
A. Barbalace, H. Fernandes, D. F. Valcarcel, and A. J. N. Batista,
“MARTe: a Multi-Platform Real-Time Framework,” IEEE Transac-
tions on Nuclear Science, 2010.
[5] J. Wesson, Tokamaks. Clarendon Press - Oxford, 3 ed., 2004.
[6] J. Freidberg, Plasma Physics and Fusion Energy. Cambridge Univer-
sity Press, 2007.
[7] J. D. Lawson., “Some criteria for a power producing thermonuclear
reactor,” in Proceedings of the Physical Society, vol. 70, p. 6, 1957.
114
Bibliography
[8] H. Alfven, “Existence of Electromagnetic-Hydrodynamic Waves,”
vol. 150, pp. 405–406, 1942.
[9] M. Ariola and A. Pironti, Magnetic Control of Tokamak Plasmas.
Springer, 2008.
[10] A. Pironti and M. Walker, “Fusion, tokamaks, and plasma control,”
IEEE Control Systems Magazine, vol. 25, pp. 30–43, Oct. 2005.
[11] J. Wesson, The science of JET. Abingdon, Oxon: JET Joint Under-
taking, 2000.
[12] F. Romanelli and R. Kamendjeon, “Overview of JET results,” Pro-
ceedings of the 22st IAEA Fusion Energy Conference Geneva, 2008.
[13] F. Romanelli, J. Pamela, R. Kamendje, M. Watkins, S. Brezinsek,
Y. Liang, X. Litaudon, T. Loarer, D. Moreau, D. Mazon, G. Saibene,
F. Sartori, and P. de Vries, “Recent contribution of JET to the ITER
physics,” Fusion Engineering and Design, vol. 84, no. 26, pp. 150 –
160, 2009.
[14] N. Holtkamp, “An overview of the ITER project,” Fusion Engineering
and Design, vol. 82, no. 514, pp. 427 – 434, 2007.
[15] N. Holtkamp, “The status of the ITER design,” Fusion Engineering
and Design, vol. 84, no. 26, pp. 98 – 105, 2009.
[16] S. Konishi, S. Nishio, and K. Tobita, “DEMO plant design beyond
ITER,” Fusion Engineering and Design, vol. 6364, no. 0, pp. 11 – 17,
2002.
[17] R. Andreani, E. Diegele, W. Gulden, R. Lasser, D. Maisonnier, D. Mur-
doch, M. Pick, and Y. Poitevin, “Overview of the European Union
fusion nuclear technologies development and essential elements on the
way to DEMO,” Fusion Engineering and Design, vol. 81, no. 1-7, pp. 25
– 32, 2006.
115
Bibliography
[18] V. D. Shafranov and L. E. Zakharov, “Equilibrium of toroidal plasma
with no circular cross section,” Sov. Phys. Tech, vol. 18, pp. 151–156,
1967.
[19] Y. Liang, “Overview of Edge-Localized Mode Control in Tokamak
Plasmas,” Fusion Science and Technology, vol. 59, no. 3, pp. 586–601,
2011.
[20] A. W. Degeling, Y. R. Martin, P. E. Bak, J. B. Lister, and X. Llobet,
“Dynamics of edge localized modes in the TCV tokamak,” Plasma
Physics and Controlled Fusion, vol. 43, no. 12, p. 1671, 2001.
[21] P. T. Lang, A. W. Degeling, J. B. Lister, Y. R. Martin, P. J. M. Carthy,
A. C. C. Sips, W. Suttrop, G. D. Conway, L. Fattorini, O. Gruber,
L. D. Horton, A. Herrmann, M. E. Manso, M. Maraschek, V. Mertens,
A. Mck, W. Schneider, C. Sihler, W. Treutterer, H. Zohm, and A. U.
Team, “Frequency control of type-I ELMs by magnetic triggering in
ASDEX Upgrade,” Plasma Physics and Controlled Fusion, vol. 46,
no. 11, p. L31, 2004.
[22] S. H. Kim, M. M. Cavinato, V. Dokuka, A. A. Ivanov, R. R. Khayrut-
dinov, P. T. Lang, J. B. Lister, V. E. Lukash, Y. R. Martin, S. Y.
Medvedev, and L. Villard, “Comparing magnetic triggering of ELMs
in TCV and ASDEX Upgrade,” Plasma Physics and Controlled Fu-
sion, vol. 51, no. 5, 2009.
[23] F. Sartori, P. Lomas, F. Piccolo, M. Zedda, and J.-E. Contributors,
“Synchronous elm pacing at jet using the vertical stabilisation con-
troller,” Proocedings of the 35th EPS Conference con Plasma Physics,
June 2008.
[24] G. Ambrosino, M. Ariola, G. De Tommasi, A. Pironti, F. Sartori,
E. Joffrin, and F. Villone, “Plasma Strike-Point Sweeping on JET
116
Bibliography
Tokamak with the eXtreme Shape Controller,” IEEE Transactions on
Plasma Science, vol. 36, no. 3, 2008.
[25] A. Cenedese and F. Sartori, “Plasma position and current control man-
management at JET,” in 42nd IEEE Conference on Decision and Con-
trol, vol. 5, pp. 4628–4633, 2003.
[26] L. Zabeo, G. Artaserse, A. Cenedese, F. Piccolo, and F. Sartori, “A
new approach to the solution of the vacuum magnetic problem in fusion
machines,” Fusion Engineering and Design, vol. 82, no. 5-14, pp. 1081–
1088, 2007.
[27] F. Sartori, A. Cenedese, and F. Milani, “JET real-time object-oriented
code for plasma boundary reconstruction,” Fusion Engineering and
Design, vol. 66-68, pp. 735–739, 2003.
[28] A. Beghi and A. Cenedese, “Advances in Real-Time Plasma Boundary
Reconstruction,” IEEE Control Systems Magazine, vol. 25, pp. 44–64,
Oct. 2005.
[29] G. Ambrosino, M. Ariola, A. Pironti, and F. Sartori, “A new shape
controller for extremely shaped plasmas in JET,” Fusion Engineering
and Design, vol. 66-68, pp. 797–802, 2003.
[30] M. Ariola and A. Pironti, “The design of the eXtreme Shape Con-
troller for the JET tokamak,” IEEE Control Systems Magazine, vol. 25,
pp. 65–75, Oct. 2005.
[31] R. Albanese, G. Ambrosino, M. Ariola, A. Cenedese, F. Crisanti, G. De
Tommasi, M. Mattei, F. Piccolo, A. Pironti, S. F., and F. Villone,
“Design, implementation and test of the XSC extreme shape controller
in JET,” Fusion Engineering and Design, vol. 74, no. 1-4, pp. 627–632,
2005.
117
Bibliography
[32] M. Shimada, V. Mukhovatov, G. Federici, Y. Gribov, A. Kukushkin,
Y. Murakami, A. Polevoi, V. Pustovitov, S. Sengoku, and M. Sugihara,
“Performance of ITER as a burning plasma experiment,” Nuclear Fu-
sion, vol. 44, no. 2, pp. 350–356, 2004.
[33] J. Lister, A. Portone, and Y. Gribov, “Plasma control in ITER,” IEEE
Control Systems Magazine, vol. 26, no. 2, pp. 79–91, 2006.
[34] G. De Tommasi, R. Albanese, G. Ambrosino, M. Ariola, M. Mattei,
A. Pironti, and F. Sartori, “XSC Tools: A Software Suite for Tokamak
Plasma Shape Control Design and Validation,” IEEE Transactions on
Plasma Science, vol. 35, no. 3, pp. 708–723, 2007.
[35] G. Ambrosino and R. Albanese, “A survey on modeling and control of
current, position and shape of axisymmetric plasmas,” IEEE Control
Systems Magazine, vol. 26, no. 5, pp. 76–91, 2005.
[36] R. Albanese and F. Villone, “The linearized CREATE-L plasma re-
sponse model for the control of current, position and shape in toka-
maks,” Nuclear Fusion, vol. 38, pp. 723–738, May 1998.
[37] R. Albanese, G. Calabro, M. Mattei, and F. Villone, “Plasma response
models for current, shape and position control at JET,” Fusion Engi-
neering and Design, vol. 66–68, pp. 715–718, 2003.
[38] G. De Tommasi, S. Galeani, A. Pironti, G. Varano, and L. Zaccar-
ian, “Trading output performance for input allocation: application to
the JET tokamak shape controller,” in Proceedings of the 48th IEEE
Conference on Decision and Control, December 2009.
[39] G. Varano, G. Ambrosino, G. De Tommasi, S. Galeani, A. Pironti, and
L. Zaccarian, “Performance assessment of a dynamic current allocator
for the jet extreme shape controller,” in in 26th Symposium on Fusion
Technology (SOFT10), Porto, Portugal, September 2010.
118
Bibliography
[40] G. Ambrosino, G. De Tommasi, S. Galeani, A. Pironti, G. Varano,
and L. Zaccarian, “On dynamic input allocation for set-point regula-
tion of the JET tokamak plasma shape,” in 2011 IEEE International
Conference on Control Applications (CCA), September 2011.
[41] G. De Tommasi, S. Galeani, A. Pironti, G. Varano, and L. Zaccarian,
“Nonlinear dynamic allocator for optimal input/output performance
trade-off: Application to the JET tokamak shape controller,” Auto-
matica, vol. 47, no. 5, pp. 981–987, 2011.
[42] L. Zaccarian, “Dynamic allocation for input redundant control sys-
tems,” Automatica, vol. 45, no. 6, pp. 1431 – 1438, 2009.
[43] L. Boncagni, S. Galeani, G. Granucci, G. Varano, V. Vitale, and L. Za-
ccarian, “Using dynamic input allocation for elongation control at
FTU,” Fusion Engineering and Design, 2010, to appear.
[44] L. Boncagni, S. Galeani, G. Granucci, G. Varano, V. Vitale, and L. Za-
ccarian, “Plasma position and elongation regulation at ftu using dy-
namic input allocation,” IEEE Transactions on Control Systems Tech-
nology, 2011. accepted for publication.
[45] R. Vitelli, L. Boncagni, F. Mecocci, S. Podda, V. Vitale, and L. Zaccar-
ian, “An anti-windup-based solution for the low current nonlinearity
compensation on the FTU horizontal position controller,” Proceedings
of the 49th IEEE Conference on Decision and Control, December 2010.
[46] V. Vitale, C. Centioli, F. Iannone, G. Mazza, M. Panella, L. Pan-
gione, S. Podda, and L. Zaccarian, “Real-time Linux operating sys-
tem for plasma control on FTU: implementation advantages and
first experimental results,” Fusion Engineering and Design, vol. 71,
no. 1[U+FFFD], pp. 71 – 76, 2004.
[47] A. Teel and N. Kapoor, “The L2 anti-windup problem: Its definition
and solution,” in Proc. 4th ECC, (Brussels, Belgium), July 1997.
119
Bibliography
[48] L. Zaccarian and A. Teel, “A common framework for anti-windup,
bumpless transfer and reliable designs,” Automatica, vol. 38, no. 10,
pp. 1735–1744, 2002.
[49] L. Boncagni, C. Centioli, L. Fiasca, F. Iannone, M. Panella, V. Vi-
tale, and L. Zaccarian, “Introducing a Virtualization Technology for
the FTU Plasma Control System,” in Proceedings of the 18th topical
meeting on the technology of fusion energy (TOFE), (San Francisco
(CA), USA), Sept. 2008.
[50] A. Bemporad, A. Teel, and L. Zaccarian, “Anti-windup synthesis via
sampled-data piecewise affine optimal control,” Automatica, vol. 40,
no. 4, pp. 549–562, 2004.
[51] D. Alves, R. Vitelli, L. Zaccarian, L. Zabeo, A. Neto, F. Sartori, P. Mc-
Cullen, and P. Card, “The new Error Field Correction Coil controller
system in the Joint European Torus tokamak,” Fusion Engineering
and Design, vol. 86, no. 6-8, pp. 1034–1038, 2011.
[52] S. Sastry and M. Bodson, Adaptive Control: Stability, Convergence,
and Robustness. Prentice-Hall, 1994.
[53] T. Bellizio, G. De Tommasi, N. Risoli, R. Albanese, and A. Neto, “A
MARTe based simulator for the JET Vertical Stabilization system,”
Fusion Engineering and Design, vol. 86, pp. 1026–1029, October 2011.
[54] L. Boncagni, Y. Sadeghi, D. Carnevale, G. Mazzitelli, A. Neto,
D. Pucci, F. Sartori, S. Sinibaldi, V. Vitale, R. Vitelli, L. Zaccarian,
S. Monaco, and G. Zamborlini, “First steps in the FTU migration to-
wards a modular and distributed real-time control architecture based
on MARTe and RTNet,” in 17th Real Time Conference, (Lisbona, Por-
tugal), May 2010.
[55] L. Boncagni, A. Barbalace, Y. Sadeghi, M. Pompei, L. Zaccarian,
and F. Sartori, “Switched Ethernet in Synchronized Distributed Con-
120
Bibliography
trol Systems Using RTnet,” IEEE Transactions on Nuclear Science,
vol. 58, pp. 1793–1799, August 2011.
[56] T. Weilkiens, Systems Engineering with SysML/UML – Modeling,
Analysis, Design. Morgan Kaufmann, 2006.
[57] K. Thramboulidis, “Model-integrated mechatronicstoward a new
paradigm in the development of manufacturing systems,” IEEE Trans-
actions on Industrial Informatics, vol. 1, pp. 54–61, Feb. 2006.
[58] M. Foeken, M. Voskuijl, A. Cabrera, and M. van Tooren, “Model
generation for the verification of automatically generated mecha-
tronic control software,” in IEEE/ASME International Conference on
Mechtronic and Embedded Systems and Applications, pp. 275–280, Oc-
tober 2008.
[59] Y. Vanderperren, W. Mueller, and W. Dehaene, “UML for electronic
systems design: a comprehensive overview,” Design Automation for
Embedded Systems, vol. 12, no. 4, pp. 261–292, 2008.
[60] R. Kawahara, H. Nakamura, D. Dotan, A. Kirshin, T. Sakairi, S. Hi-
rose, K. Ono, and H. Ishikawa, “Verification of embedded system’s
specification using collaborative simulation of SysML and simulink
models,” in International Conference on Model-Based Systems Engi-
neering, pp. 21–28, March 2009.
[61] G. Doukas and K. Thramboulidis, “A Real-Time-Linux-Based Frame-
work for Model-Driven Engineering in Control and Automation,”
IEEE Transactions on Industrial Electronics, vol. 58, pp. 914–924,
Mar. 2011.
[62] C. Huang and P. Hsiung, “Model-based verification and estimation
framework for dynamically partially reconfigurable systems,” IEEE
Transactions on Industrial Informatics, vol. 7, pp. 287–301, May 2011.
121
Bibliography
[63] Y. Guo and R. Jones, “A study of approaches for model based devel-
opment of an automotive driver information system,” in 3rd Annual
IEEE Systems Conference, pp. 267–272, March 2009.
[64] K. Thramboulidis and A. Buda, “3+1 SysML view model for IEC61499
Function Block control systems,” in 8th International Conference on
Industrial Informatics, pp. 175–180, July 2010.
[65] T. Johnson, C. Paredis, J. Jobe, and R. Burkhart, “Modeling contin-
uous system dynamics in SysML,” in Proceedings of the ASME Inter-
national Mechanical Engineering Congress and Exposition, (Seattle,
Washington), November 2007.
[66] N. Pontisso and D. Chemouil, “TOPCASED Combining Formal
Methods with Model-Driven Engineering,” in Proceedings of the 21st
IEEE/ACM International Conference on Automated Software Engi-
neering, pp. 359–360, September 2006.
[67] A. Beghi and A. Cenedese, “Advances in Real-Time Plasma Boundary
Reconstruction,” IEEE Control Systems Magazine, vol. 25, pp. 44–64,
Oct. 2005.
[68] D. Carnevale, A. Astolfi, C. Centioli, S. Podda, V. Vitale, and L. Zac-
carian, “A new extremum seeking technique and its application to max-
imize RF heating on FTU,” Fusion Engineering and Design, vol. 84,
pp. 554–558, Jun. 2009.
[69] L. Zaccarian, L. Boncagni, D. Cascone, C. Centioli, S. Cerino, F. Gra-
vanti, F. Iannone, F. Mecocci, L. Pangione, S. Podda, V. Vitale, and
R. Vitelli, “Nonlinear instabilities induced by the F coil power ampli-
fier at FTU: modeling and control,” Fusion Engineering and Design,
vol. 84, no. 7–11, pp. 2015–2019, 2009.
122
Bibliography
[70] R. Albanese, E. Cocorrese, and G. Rubinacci, “Plasma modeling
for the control of vertical instabilities in tokamaks,” Nuclear Fusion,
vol. 29, no. 6, pp. 1013 – 1023, 1989.
[71] F. Sartori, F. Crisanti, R. Albanese, G. Ambrosino, V. Toigo, J. Hay,
P. Lomas, et al., “The JET PCU project: An international plasma con-
trol project,” Fusion Engineering and Design, vol. 83, no. 2-3, pp. 202
– 206, 2008. Proceedings of the 6th IAEA Technical Meeting on Con-
trol, Data Acquisition, and Remote Participation for Fusion Research.
[72] F. Sartori, A. Barbalace, A. J. N. Batista, T. Bellizio, P. Card, G. D.
Tommasi, P. M. Cullen, A. Neto, F. Piccolo, R. Vitelli, and L. Zabeo,
“The PCU JET Plasma Vertical Stabilisation Control System,” Fusion
Engineering and Design, 2010.
[73] F. Perkins, D. Post, N. Uckan, M. Azumi, D. Campbell, N. Ivanov,
N. Sauthoff, M. Wakatani, W. Nevins, M. Shimada, et al., “Chapter
1: Overview and summary,” Nuclear Fusion, vol. 39, pp. 2137–2174,
Dec 1999.
[74] A. Neto, F. Sartori, F. Piccolo, A. Barbalace, R. Vitelli, and H. Fer-
nandes, “Linux real-time framework for fusion devices,” Fusion Engi-
neering and Design, vol. 84, no. 711, pp. 1408 – 1411, 2009.
[75] A. J. N. Batista, J. Sousa, and C. A. F. Varandas, “ATCA digital
controller hardware for vertical stabilization of plasmas in tokamaks,”
Review of Scientific Instruments, vol. 77, Oct 2006.
[76] J. G. Krom, “The evolution of control and data acquisition at JET,”
Fusion Engineering and Design, vol. 43, no. 3-4, pp. 265 – 273, 1999.
[77] D. G. Luenberger, Introduction to Dynamic Systems: Theory, Models,
and Applications. John Wiley and Sons, 1979.
123
List of Figures
[78] V. Toigo, L. Zanotto, M. Bigi, E. Gaio, J. Hay, R. Piovan, and S. Shaw,
“Conceptual design of the enhanced radial field amplifier for plasma
vertical stabilisation in JET,” Fusion Engineering and Design, vol. 82,
pp. 1599–1606, Oct. 2007.
[79] G. Franklin, J.D. Powell, and A. Emami-Naeini, Feedback Control of
Dynamic Systems. Prentice Hall, 5th ed., 2006.
[80] V. Riccardo, T. C. Hender, P. J. Lomas, B. Alper, T. Bolzonella,
P. de Vries, and G. P. Maddison, “Analysis of JET halo currents,”
Plasma Physics and Controlled Fusion, vol. 46, no. 6, pp. 925–934,
2004.
[81] E. De la Luna, F. Sartori, P. Lomas, G. Saibene, T. Eich, G. Arnoux,
L. Barrera, M. Beurskens, J. Lonnroth, V. Parail, C. Perez von Thun,
R. Sartori, E. Solano, L. Zabeo, and M. Zedda, “Magnetic ELM trig-
gering using the vertical stabilization controller in JET,” in Proceedings
of the 36th EPS Conference on Plasma Physics, (Sofia, Bulgaria), Jun.
2009.
[82] F. Alladio and F. Crisanti, “Analysis of MHD equilibria by toroidal
multi-polar expansions,” Nuclear Fusion, vol. 26, p. 1143, 1986.
[83] F. Alladio and P. Micozzi, “Experimental plasma equilibrium recon-
struction from kinetic and magnetic measurements in the FTU toka-
mak,” Nuclear Fusion, vol. 35, no. 3, p. 305, 1995.
[84] Y. Sadeghi, G. Ramogida, L. Boncagni, C. D’Epifanio, V. Vitale,
F. Crisanti, and L. Zaccarian, “Experimental plasma equilibrium re-
construction from kinetic and magnetic measurements in the FTU
tokamak,” IEEE Transactions on Plasma Science, vol. 38, no. 3,
pp. 352–358, 2010.
124
List of Figures
2.1 Structure and scale of a Tokamak: the JET (Joint European
Torus). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Differences between a limiter and a divertor plasma (JET
pre-divertor and JET as of today). . . . . . . . . . . . . . . 7
2.3 Structure of the JET Tokamak divertor region. . . . . . . . 9
2.4 3D model of the ITER Tokamak. . . . . . . . . . . . . . . . 9
3.1 The mechanism of plasma elongation and resulting vertical
instability. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.2 The JET Vertical Stabilisation controller. . . . . . . . . . . 15
3.3 Photo of an internal discrete coil. . . . . . . . . . . . . . . . 17
3.4 Position of the magnetic sensors in the JET Tokamak. . . . 18
3.5 Position of the saddle coils in the JET Tokamak. . . . . . . 19
3.6 JET weights for Mirnov coils and saddle loops. . . . . . . . 20
3.7 JET Vertical Stabilization system, pulse #79632. . . . . . . 21
3.8 JET Vertical Stabilization system, pulse #79698. . . . . . . 22
3.9 Collapse of pedestal causes ELMs. . . . . . . . . . . . . . . 23
3.10 Example of ELM pacing via vertical kicks in pulse #78422. 24
3.11 JET circuits generating the poloidal field. . . . . . . . . . . 25
3.12 Main Gaps in the JET Tokamak. . . . . . . . . . . . . . . . 27
3.13 Block diagram of the Shape Controller system augmented
with the XSC. . . . . . . . . . . . . . . . . . . . . . . . . . . 30
125
List of Figures
3.14 Block diagram of the control system with the insertion of the
allocator block. . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.15 JET pulse #81710 (blue) and #81715 (red) with CLA en-
abled. Shape error (a) and detail (b). . . . . . . . . . . . . 34
3.16 Comparison of currents on the divertor colis for JET pulses
#81710 and #81715. . . . . . . . . . . . . . . . . . . . . . . 35
3.17 Comparison of GAP measures for GAP2 (top right of the
vacuum vessel) and RIG/ROG (Radial Inner/Outer GAP)
for the JET pulses #81710 and #81715. . . . . . . . . . . . 36
3.18 Control system block diagram of horizontal position. . . . . 37
3.19 Electrical scheme of the AL-F converter. . . . . . . . . . . . 39
3.20 Simplified electrical scheme of the thyristor bridges of the
AL-F converter. . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.21 Block diagram of the PHSC. . . . . . . . . . . . . . . . . . . 43
3.22 Shot number #20838. Open-loop simulation of the AL-F
model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3.23 Linear LC and HC models behavior compared to the nonlin-
ear response. . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.24 Shot number #20838. Open-loop simulation of the plasma
model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.25 IF response for shots number #28000 (upper plot) and #20838
(lower plot) in solid lines. Corresponding closed-loop simu-
lations in dashed lines. . . . . . . . . . . . . . . . . . . . . . 50
3.26 Anti-windup solution. . . . . . . . . . . . . . . . . . . . . . 52
3.27 Shot number #20838. Anti-windup simulation. . . . . . . . 54
3.28 Shots #31621 and #31626: same shot type. In the latter
the anti-windup system was turned on. . . . . . . . . . . . . 55
3.29 Shots #32784 and #32786: same shot type. In the latter
the anti-windup system is turned on. . . . . . . . . . . . . . 56
3.30 Shot #32786: signals v1 and v2 of the anti-windup system. 57
126
List of Figures
3.31 Shots #32959 and #32960: same shot type. The complete
anti-windup code ran on the former. The simplified code
shows smaller oscillations. . . . . . . . . . . . . . . . . . . . 57
3.32 The EFCC coils at the JET Tokamak. . . . . . . . . . . . . 58
3.33 The proposed advanced controller block diagram. . . . . . . 59
3.34 Comparison of simulated and experimental results for the
EFCC advanced controller. . . . . . . . . . . . . . . . . . . 60
4.1 The layered structure of BaseLib2. . . . . . . . . . . . . . . 62
4.2 Example of a BaseLib2 CDB. . . . . . . . . . . . . . . . . . 64
4.3 Relay logger mechanism. . . . . . . . . . . . . . . . . . . . . 68
4.4 Conceptual passage from a block diagram to a MARTe ar-
chitecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
4.5 The RealTimeThread acts a module micro-scheduler. . . . . 72
4.6 Block definition diagrams used to model the BaseLib2 library. 77
4.7 Example of GAMs modeling. . . . . . . . . . . . . . . . . . 78
4.8 Internal block diagram used to define input and output sig-
nals for the PID GAM shown in Figure 4.7. . . . . . . . . . 79
4.9 Topcased hierarchical view of the model of the PID GAM
block shown in Figure 4.7. . . . . . . . . . . . . . . . . . . . 80
4.10 Block definition diagram used to model the connections be-
tween GAMs. . . . . . . . . . . . . . . . . . . . . . . . . . . 80
4.11 Cross section of the FTU Tokamak. . . . . . . . . . . . . . 82
4.12 FTU vacuum chamber. . . . . . . . . . . . . . . . . . . . . . 83
4.13 Block diagram of the FTU plasma control system. . . . . . 84
4.14 BDD of the FTU plasma control system. . . . . . . . . . . . 85
4.15 Auto-generated files for the FTU Plasma Control System. . 86
4.16 Photo of the backpane of the VS5 ATCA crate. . . . . . . . 89
4.17 Data synchronization of the ATCA boards. . . . . . . . . . 90
4.18 JET LEVEL1 interface for the new Vertical Stabilisation
System 5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
127
List of Acronyms
4.19 All the modules executed for each control cycle. . . . . . . . 95
4.20 Maximum, minimum and mean execution times for all VS5
GAMs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
4.21 The internal logic of the DAM. . . . . . . . . . . . . . . . . 100
4.22 A screenshot of the VS5 Web Interface: the VAMGAM. . . 103
4.23 The system is continuously is real-time with a jitter inferior
to 1 µs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
4.24 Experimental (solid black lines) and simulated values (dashed
red lines) for 12 kV positive kicks applied during JET pulse
#78376 starting from t = 23 s. . . . . . . . . . . . . . . . . 105
4.25 Block diagram of the MARTe FTU feedback system. . . . . 108
4.26 Reconstructed internal and external radiuses for the present
controller and the MARTe-based one. . . . . . . . . . . . . 109
4.27 Magnetic flux measurement ∆Ψ, used as horizontal position
error for the coils control. . . . . . . . . . . . . . . . . . . . 110
4.28 Pressure and pressure prefill reference , plasma density ref-
erence and interferometer density average, valve amplifier
request. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
128
List of Acronyms
ADC Analog to Digital Converter.
ASDEX Axially Symmetric Divertor EXperiment.
ATCA Advanced Telecommunications Computing Architecture.
CDB Configuration DataBase.
CLA Current Limit Avoidance.
CODAS COntrol and Dta Acquisition System.
COMPASS COMPact ASSembly.
CSV Comma Separated Values.
D-T Deuterium-Tritium.
DAC Digital to Analog Converter.
DAM Divertor Amplifier Module.
DDB Dynamic Data Buffer.
DSP Digital Signal Processor.
EFCC Error Field Correction Coils.
129
List of Acronyms
ELM Edge Localised Mode.
ERFA Enhanced Radial Field Amplifier.
ETB Edge Transport Barrier.
FRFA Fast Radial Field Amplifier.
FTU Frascati Tokamak Upgrade.
GAM Generic Application Module.
IDC Internal Discrete Coils.
IOGAM Input/Output Generic Application Module (GAM).
ISTTOK Instituto Superior Tecnico TOKamak.
JET Joint European Torus.
JPF Jet Pulse File.
L1 Level-1.
LCMS Last Closed Magnetic Surface.
MARTe Multithreaded Application RealTime executor.
MHD MagnetoHydroDynamics.
MIMO Multiple Input Multiple Output.
NIF National Ignition Facility.
PCU Plasma Control Upgrade.
PDE Partial Differential Equation.
130
List of Acronyms
PF Poloidal Field.
PHSC Programmable High Speed Controller.
PID Proportional Integral Derivative.
PPCC Plasma Position and Current Control.
RFA Radial Field Amplifier.
RIG Radial Inner Gap.
ROG Radial Outer Gap.
RTAI Real-Time Application Interface.
RTM Rear Transition Module.
SC Shape Controller.
SVD Singular Value Decomposition.
TCV Tokamak a Configuration Variable.
TF Toroidal Field.
VAM Vertical Amplifier Module.
VME VERSABUS Module Eurocard.
VS Vertical Stabilisation.
XSC eXtreme Shape Controller.
131