Improvements in LLRF Control Algorithms and Automation - Desy
Improvements in LLRF Control Algorithms and Automation - Desy
Improvements in LLRF Control Algorithms and Automation - Desy
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>Improvements</strong> <strong>in</strong> <strong>LLRF</strong> <strong>Control</strong><br />
<strong>Algorithms</strong> <strong>and</strong> <strong>Automation</strong><br />
Alex<strong>and</strong>er Br<strong>and</strong>t<br />
September 7 th 2004 alex<strong>and</strong>er.br<strong>and</strong>t@desy.de 1/14
Overview<br />
• <strong>Automation</strong> concepts<br />
– F<strong>in</strong>ite State Mach<strong>in</strong>e<br />
– Algorithm development<br />
• Status<br />
– <strong>LLRF</strong> automation concept<br />
– Klystron FSM<br />
– <strong>LLRF</strong> FSM (<strong>Algorithms</strong> / Diagnostics)<br />
• Adaptive Feedforward<br />
• Summary / Outlook<br />
– One-button mach<strong>in</strong>e<br />
September 7 th 2004 alex<strong>and</strong>er.br<strong>and</strong>t@desy.de 2/14
F<strong>in</strong>ite State Mach<strong>in</strong>es<br />
State 1<br />
t21<br />
t31<br />
t13<br />
t23<br />
State 2 State 3<br />
t32<br />
• Graphical representation of<br />
logical dependencies<br />
• Transitions are connected to<br />
conditions<br />
• Inside states, procedures can<br />
be implemented for entry, exit,<br />
timer<br />
• DOOCs ddd offers a tool for<br />
FSM generation<br />
• Easy generation of states<br />
• Transparent behaviour of<br />
mach<strong>in</strong>e by full <strong>in</strong>tegration<br />
<strong>in</strong>to ddd panels<br />
September 7 th 2004 alex<strong>and</strong>er.br<strong>and</strong>t@desy.de 3/14
FSM Applications, Purposes<br />
• Manage complex logic dependencies (! klystron<br />
logic)<br />
• Ease the operators job, save time<br />
• Perform time-consum<strong>in</strong>g calculations <strong>in</strong> the<br />
background for monitor<strong>in</strong>g / parameter estimation<br />
• React on outer conditions (exception h<strong>and</strong>l<strong>in</strong>g)<br />
September 7 th 2004 alex<strong>and</strong>er.br<strong>and</strong>t@desy.de 4/14
<strong>Algorithms</strong><br />
(Fast) ”prototyp<strong>in</strong>g“ us<strong>in</strong>g<br />
Matlab / Simul<strong>in</strong>k <strong>and</strong> the<br />
DOOCs client library<br />
2<br />
3<br />
ttfr(‘TTF.RF/<strong>LLRF</strong>.DSP‘)<br />
ttfw(‘TTF.RF/ADC‘)<br />
. . .<br />
Implementation <strong>in</strong> C/C++ of<br />
algorithms us<strong>in</strong>g DOOCS<br />
FSM Generator <strong>and</strong> Matlab<br />
Cmath-Library<br />
Availability<br />
<strong>Algorithms</strong><br />
diagnostics<br />
ddd<br />
of<br />
<strong>and</strong><br />
via<br />
1<br />
#<strong>in</strong>clude “matlab.h“<br />
mxArray* ma;<br />
for(<strong>in</strong>t c=1; c
<strong>LLRF</strong> <strong>Automation</strong> Concept (Status)<br />
Interface<br />
Global <strong>LLRF</strong> FSM<br />
Gun ACC1 ACC2/3 ACC4/5<br />
Interface<br />
Interface<br />
Interface<br />
Interface<br />
Local <strong>LLRF</strong> FSM<br />
Local <strong>LLRF</strong> FSM<br />
Local <strong>LLRF</strong> FSM<br />
Local <strong>LLRF</strong> FSM<br />
Interface<br />
Interface<br />
Interface<br />
Interface<br />
Klystron FSM<br />
Klystron FSM<br />
Klystron FSM<br />
Klystron FSM<br />
• Usually, operator <strong>in</strong>teracts with<br />
global <strong>LLRF</strong> FSM <strong>in</strong>terface, FSMs<br />
<strong>in</strong>teract with hardware<br />
• Experienced operator <strong>in</strong>teracts with<br />
sub FSM <strong>in</strong>terfaces<br />
• Experts <strong>in</strong>teract with hardware<br />
itself<br />
• Klystron FSM model (Cichalewski, Koseda)<br />
exists <strong>in</strong> Matlab Simul<strong>in</strong>k <strong>and</strong> are currently<br />
translated to DOOCS FSM<br />
• <strong>Algorithms</strong> for diagnostics <strong>and</strong> parameter<br />
estimation exist <strong>in</strong> C/C++ <strong>and</strong> are ready to go<br />
<strong>in</strong>to operation (after a few weeks evaluation<br />
phase)<br />
• Exception h<strong>and</strong>l<strong>in</strong>g rout<strong>in</strong>es need to be<br />
studied <strong>and</strong> developed dur<strong>in</strong>g current run<br />
September 7 th 2004 alex<strong>and</strong>er.br<strong>and</strong>t@desy.de 6/14
Klystron FSM<br />
W. Cichalewski, B. Koseda, P. Cieciura<br />
• Logical dependencies have<br />
been recognized <strong>and</strong> translated<br />
<strong>in</strong>to a Matlab State Flow model<br />
• Model is used for f<strong>in</strong>al logic /<br />
security tests<br />
• Currently, the implementation<br />
<strong>in</strong>to the doocs environment<br />
takes place<br />
• Application for automation of<br />
the bouncer power adjustment<br />
developed<br />
September 7 th 2004 alex<strong>and</strong>er.br<strong>and</strong>t@desy.de 7/14
<strong>LLRF</strong> FSM: S<strong>in</strong>gle Pulse Identification<br />
What can be obta<strong>in</strong>ed from a s<strong>in</strong>gle pulse<br />
(3rd June 04, SP=14, no feedback, no beam)<br />
Ideally:<br />
Full system identification<br />
<strong>in</strong>clud<strong>in</strong>g non l<strong>in</strong>ear<br />
behaviour of all<br />
subsystems (slow, not<br />
completely achieved so<br />
far)<br />
Loop phase is obta<strong>in</strong>ed<br />
at the beg<strong>in</strong>n<strong>in</strong>g of the<br />
pulse<br />
Timeconstant gives<br />
b<strong>and</strong>width of the cavity,<br />
early quench <strong>in</strong>dicator<br />
Phase slope at the end<br />
of the pulse gives the<br />
detun<strong>in</strong>g<br />
Slope of feedforward<strong>and</strong><br />
probe-phase <strong>in</strong><br />
comb<strong>in</strong>ation give<br />
detun<strong>in</strong>g at the<br />
beg<strong>in</strong>n<strong>in</strong>g of the pulse<br />
fill<strong>in</strong>g time flattop klystron off<br />
Evaluation of LO<br />
Generation<br />
Determ<strong>in</strong>ation of<br />
offsets- <strong>and</strong> crosstalk<br />
parameters.<br />
September 7 th 2004 alex<strong>and</strong>er.br<strong>and</strong>t@desy.de 8/14
<strong>LLRF</strong> FSM: Adaptive Feedforward (Pr<strong>in</strong>ciples)<br />
Vectormodulator<br />
HP Amplifier<br />
Simple view of the VUV-<br />
FELs RF control system<br />
+<br />
Feedforward<br />
FF(t)<br />
Set-<br />
Po<strong>in</strong>t<br />
SP(t)<br />
. . .<br />
•The Feedback suppresses<br />
errors wrt. setpo<strong>in</strong>t-table by<br />
1/ga<strong>in</strong><br />
£ Ga<strong>in</strong><br />
-<br />
Cavities<br />
•Feedforward can further<br />
<strong>in</strong>crease the field cavity<br />
Error signal: suppressed by 1/ga<strong>in</strong> <strong>in</strong> closed loop<br />
September 7 th 2004 alex<strong>and</strong>er.br<strong>and</strong>t@desy.de 9/14
<strong>LLRF</strong> FSM: Adaptive Feedforward (Def<strong>in</strong>ition)<br />
• Driv<strong>in</strong>g the cavity with Feedforward only should get close to the<br />
setpo<strong>in</strong>t curve to make proportional Feedback efficent.<br />
• Adaptive Feedforward should be self-updat<strong>in</strong>g, s<strong>in</strong>ce several outer<br />
parameters may changes (human or technical <strong>in</strong>terventions).<br />
• Adaptive Feedforward might be derived <strong>in</strong> a self-evolv<strong>in</strong>g, iterative<br />
process for be<strong>in</strong>g <strong>in</strong>dependent of nonl<strong>in</strong>earities.<br />
• Adaptive Feedforward needs to be fast.<br />
Repetitive fluctuations<br />
<strong>in</strong> klystron high voltage:<br />
September 7 th 2004 alex<strong>and</strong>er.br<strong>and</strong>t@desy.de 10/14
<strong>LLRF</strong> FSM: Adaptive Feedforward (Algorithm)<br />
1. It is easy do derive that the cavity (a b<strong>and</strong>pass) acts as a<br />
lowpass on the envelope signal, i.e. . The<br />
<strong>in</strong>version is<br />
i.e. a proportional part <strong>and</strong> a differential part.<br />
2. Apply appropriate signal smooth<strong>in</strong>g (justified by long<br />
timeconstant, 700µs, of the cavities).<br />
3. Apply the algorithm <strong>in</strong> an iterative fashion.<br />
Collect data of 10 Pulses<br />
<strong>and</strong> do some statistics<br />
Apply <strong>in</strong>verted lowpass filter<br />
on error signal (probe-setpo<strong>in</strong>t)<br />
Add result to exist<strong>in</strong>g<br />
Feedforward table<br />
September 7 th 2004 alex<strong>and</strong>er.br<strong>and</strong>t@desy.de 11/14
Adaptive Feedforward (Real Data, DSP, 20MV/m)<br />
The Algorithm was tested with Chechia<br />
with the old DSP System at 20MV/m.<br />
(A similar test was performed successfully<br />
with the new FPGA-System at 5MV/m.)<br />
. . .<br />
September 7 th 2004 alex<strong>and</strong>er.br<strong>and</strong>t@desy.de 12/14
<strong>LLRF</strong> FSM: Exception H<strong>and</strong>l<strong>in</strong>g<br />
• Avoidance of exceptions by early diagnosis<br />
• Statistical evaluation of exeptions<br />
• Coord<strong>in</strong>ation of subsystems <strong>in</strong> case one<br />
subsystem fails<br />
• Fast start-up after ocurrence of exceptions<br />
• F<strong>in</strong>ally: <strong>in</strong>crease the availability<br />
• … experience with exeptions still is to ga<strong>in</strong> dur<strong>in</strong>g<br />
the next weeks of the current run<br />
September 7 th 2004 alex<strong>and</strong>er.br<strong>and</strong>t@desy.de 13/14
Summary (Outlook)<br />
• The <strong>LLRF</strong> automation concept forsees hierarchy of state<br />
mach<strong>in</strong>es with seperate units for each control system<br />
• Implementation uses DOOCS <strong>and</strong> Matlab environment<br />
• Applications (e.g. adaptive feedforward) of the FSMs<br />
already were tested us<strong>in</strong>g Chechia (vertical testst<strong>and</strong>) <strong>and</strong><br />
simulations<br />
• First VUV-FEL test of a set of <strong>LLRF</strong>/Klystron FSM will<br />
take place at ACC2/3, Klystron 5<br />
• Exception h<strong>and</strong>l<strong>in</strong>g is subject of further <strong>in</strong>vestigation <strong>in</strong><br />
this run<br />
• … a one-button mach<strong>in</strong>e rema<strong>in</strong>s the goal of FSM<br />
development ☺<br />
September 7 th 2004 alex<strong>and</strong>er.br<strong>and</strong>t@desy.de 14/14