Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
LLRF Low Level Applications Study
FLASH SeminarZheqiao Geng
14.10.2008
14/10/2008 FLASH Seminar, Zheqiao Geng 2
Outline
Introduction to low level applications (LLA) System phase and system gainCavity parameters measurementAdaptive feed forwardFuture plan for LLA
14/10/2008 FLASH Seminar, Zheqiao Geng 3
Introduction to low level applications
14/10/2008 FLASH Seminar, Zheqiao Geng 4
LLA Introduction
Low level applications is a collection of work concern to the software of
Locating near front end hardware (in FPGA, DSP or front end CPU)
Running fast (intra-pulse or pulse-pulse)
14/10/2008 FLASH Seminar, Zheqiao Geng 5
Two focuses of LLA
Algorithms: Principle to perform measurement and optimizationImplementation: Multi-processor, distributed software, real time
14/10/2008 FLASH Seminar, Zheqiao Geng 6
Algorithm Study:System phase and system gain
14/10/2008 FLASH Seminar, Zheqiao Geng 7
Goals
Measure the system phase and system gainStudy the influence to the feedback system by
the system phase
14/10/2008 FLASH Seminar, Zheqiao Geng 8
DefinitionSystem Phase: The phase difference between Vsum and Vdac in steady stateSystem Gain: The amplitude ratio between Vsum and Vdac in steady stateWith P controllerLoop Phase = System phaseLoop Gain = System Gain * Feedback GainAssume the system is Linear
14/10/2008 FLASH Seminar, Zheqiao Geng 9
Measurement of system phase and system gain
During RF flattop, the cavity is approximately in steady state, so
This method only works when there is no beamThe RF flattop should be flat (close to steady state)System phase and system gain change during the flattop due to the cavity detuning changes
)_/_(_ outDACsumVectoranglePhaseSystem =
)_/_(_ outDACsumVectorabsGainSystem =
14/10/2008 FLASH Seminar, Zheqiao Geng 10
Measurement at ACC1-- Change the feedback gain
10 20 30 40 50-5
0
5
Gain Setting
Sys
tem
Pha
se /
deg
10 20 30 40 501.6
1.65
1.7
1.75
Gain Setting
Sys
tem
Gai
n
10 20 30 40 500
5
10
Gain Setting
Am
plitu
de R
MS
Erro
r / %
10 20 30 40 500
0.2
0.4
0.6
0.8
Gain Setting
Pha
se R
MS
Erro
r / d
eg
With only feedback, without feed forward
System phase and system gain are measured by averaging the flattop
With smaller gain, the flattop is bad, approximation to steady state will have larger error
14/10/2008 FLASH Seminar, Zheqiao Geng 11
Measurement at ACC1-- Change the set point gradient
5 5.5 6 6.5 7 7.5 8 8.5 9 9.5 10-50
0
50Full system phase (from DAC to VS) / deg
5 5.5 6 6.5 7 7.5 8 8.5 9 9.5 10-2
0
2Phase shift from DAC to klystron output / deg
5 5.5 6 6.5 7 7.5 8 8.5 9 9.5 10-50
0
50Phase shift from klystron output to VS / deg
Set point amplitude / MV/m
5 5.5 6 6.5 7 7.5 8 8.5 9 9.5 101
1.5
2Full system gain (from DAC to VS)
5 5.5 6 6.5 7 7.5 8 8.5 9 9.5 101.69
1.7
1.71x 10-4 Gain from DAC to klystron output
5 5.5 6 6.5 7 7.5 8 8.5 9 9.5 100.8
1
1.2x 104 Gain from klystron output to VS
Set point amplitude / MV/m
5 5.5 6 6.5 7 7.5 8 8.5 9 9.5 10-100
-50
0
50
100
150
200
Set point amplitude / MV/m
Det
unin
g at
dec
ay /
Hz
5 5.5 6 6.5 7 7.5 8 8.5 9 9.5 100
1
2
3x 10-3
Set point amplitude / MV/m
Am
plitu
de e
rror
5 5.5 6 6.5 7 7.5 8 8.5 9 9.5 100
0.5
1
1.5
Set point amplitude / MV/m
Pha
se e
rror /
deg
With feedback and feed forward
The klystron of ACC1 is quite linear
The definition of system phase and system gain includes the cavity detuning effect
14/10/2008 FLASH Seminar, Zheqiao Geng 12
System phase and feedback stability
( )ωω
ωΔ−+
=js
sG2/1
2/1
θjgesH =)(
( )θωωω
ωωj
I
Ie
gePjsjssV
sVPsHsG
sV
2/12/1
2/1)(
)()()(1
1)(
+Δ−+Δ−+
=
+=
[ ] 0Re 2/12/1 >+Δ− θωωω jgePj
Pg
gP1cos
0cos2/12/1
−>⇒
>+
θ
θωω
⎥⎦⎤
⎢⎣⎡ ++− angleDetuningangleDetuning _
2,_
2ππ
The stable area of system phase is
14/10/2008 FLASH Seminar, Zheqiao Geng 13
Measurement at ACC1-- System phase and feedback stability
With feedback and feed forward on
The loop phase is changed in negative way by about 70 degree
With feedback and feed forward on
The loop phase is changed in positive way by about 80 degree
14/10/2008 FLASH Seminar, Zheqiao Geng 14
System phase and steady state error
0 50 100 150 200 250 300 350 400-1.5
-1
-0.5
0
0.5
1
System Phase / deg
Ste
ady
Sta
te A
mpl
itude
Erro
r with
Loo
p G
ain
of 1
00 /
%
Amplitude Error VS System Phase
0 50 100 150 200 250 300 350 400-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
System Phase / deg
Ste
ady
Sta
te P
hase
Erro
r with
Loo
p G
ain
of 1
00 /
deg
Phase Error VS System Phase
System Phase Optimization:
• Keep system phase in the stable range
• Select system phase to be 0 for minimizing the steady state phase error (amplitude error is non-avoidable for feedback but can be compensated by feed forward)
14/10/2008 FLASH Seminar, Zheqiao Geng 15
Measurement at ACC1-- System phase and steady state error
With only feedback, without feed forward
-20 0 20 40
-20
0
20
40
60System phase measurement / deg
System phase setting / deg
-20 0 20 401.52
1.54
1.56
1.58System gain measurement / deg
System phase setting / deg
-20 0 20 401
1.5
2
2.5Amplitude error / %
System phase setting / deg
-20 0 20 400
0.2
0.4
0.6
0.8
1Phase error / deg
System phase setting / deg
14/10/2008 FLASH Seminar, Zheqiao Geng 16
System phase and system gain drift
0 1000 2000 3000 4000 5000 6000-19
-18
-17
-16
-15
-14
-13
-12
-11
-10
Time / 7s
Sys
tem
Pha
se /
deg
Ten-hour Measurement of ACC1 System Phase
0 1000 2000 3000 4000 5000 60001.785
1.79
1.795
1.8
1.805
1.81
1.815
1.82
1.825
1.83
Time / 7s
Sys
tem
Gai
n
Ten-hour Measurement of ACC1 System Gain
0 1000 2000 3000 4000 5000 60000.06
0.08
0.1
0.12
0.14
0.16
0.18
0.2
0.22
0.24
0.26
Time / 7s
Am
plitu
de E
rror (
RM
S) a
t Fla
ttop
/ %
Ten-hour Measurement of ACC1 Amplitude Error
0 1000 2000 3000 4000 5000 60000
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
Time / 7s
Pha
se E
rror (
RM
S) a
t Fla
ttop
/ deg
Ten-hour Measurement of ACC1 Phase Error
Measured during 1:00am, 17.08.2008 to 11:00am, 17.08.2008.
14/10/2008 FLASH Seminar, Zheqiao Geng 17
Algorithm Study:Cavity parameters measurement
14/10/2008 FLASH Seminar, Zheqiao Geng 18
Goals
Measure loaded Q of the cavityMeasure detuning of the cavityMeasure beam phase and amplitude in each cavity
14/10/2008 FLASH Seminar, Zheqiao Geng 19
Cavity equation used for parameters measurement
( )
0
0
2/12/12/1 2
ZQrC
IRVCVjdt
dVbLforc
c
ω
ωωωω
⎟⎟⎠
⎞⎜⎜⎝
⎛=
+=Δ−+
14/10/2008 FLASH Seminar, Zheqiao Geng 20
Forward and reflected signal directivity correction
0 200 400 600 800 1000 1200 1400 1600 1800 2000-3
-2
-1
0
1
2
3
4
5Forward signal without directivity correction
IQ
0 200 400 600 800 1000 1200 1400 1600 1800 2000-0.5
0
0.5
1
1.5
2
2.5x 10
-3 Forward signal with directivity correction
IQ
The forward signal with directivity correction will be used as the cavity driving signal in the cavity equation
mearefmeaforref
mearefmeaforfor
dVcVV
bVaVV
__
__
+=
+=
14/10/2008 FLASH Seminar, Zheqiao Geng 21
Forward and reflected signal directivity correction
0 50 1004.8
4.9
5
5.1x 10-4 Amplitude of a
0 50 1001.6
1.65
1.7
1.75x 10-4 Amplitude of b
0 50 1006.5
7
7.5
8
8.5x 10-5 Amplitude of c
0 50 1002.945
2.95
2.955
2.96x 10-3 Amplitude of d
0 50 10041
42
43
44Phase of a / deg
0 50 1000
1
2
3
4Phase of b / deg
0 50 100142
144
146
148
150Phase of c / deg
0 50 100-158.7
-158.6
-158.5
-158.4
-158.3Phase of d / deg
100 times calibration of the directivity coefficients
14/10/2008 FLASH Seminar, Zheqiao Geng 22
Loaded Q and detuning measurement-- Intra-pulse, without beam
0 200 400 600 800 1000 1200 1400 1600 18000
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5x 106 Loaded Q during RF pulse
Measurements are sensitive to the cavity driving signal calibration
Large error during the filling time
Relative measurements can be used to detect the system status change
0 200 400 600 800 1000 1200 1400 1600 1800-100
-50
0
50
100
150Detuning / Hz
14/10/2008 FLASH Seminar, Zheqiao Geng 23
Loaded Q and detuning measurement-- Pulse to pulse, at RF decay
0 10 20 30 40 50 60 70 80 90 1003
3.01
3.02
3.03x 106 Loaded Q at decay part
Measurement times
0 10 20 30 40 50 60 70 80 90 10020
30
40
50
60Detuning at decay part / Hz
Measurement times
QL: 0.2% RMS
Detuning: 5 Hz RMS
14/10/2008 FLASH Seminar, Zheqiao Geng 24
Beam measurement-- Calibration of the Toroid signal
The beam induced cavity driving voltage can be derived by the Toroid signal multiplied by a complex coefficient
toroidbbL VCIR ⋅=
( ) bLforcc IRVCVj
dtdV
2/12/12/1 2ωωωω +=Δ−+
14/10/2008 FLASH Seminar, Zheqiao Geng 25
Beam measurement-- Calibration of the Toroid signal
0 500 1000 1500-1
0
1
2
3
4Toroid signal
0 500 1000 1500-6
-4
-2
0
2Beam induced driving signal = Toroid * Cb
0 500 1000 15000
1
2
3
4
5
6x 106Loaded Q measurement with beam
0 500 1000 1500-100
-50
0
50
100
150Detuning measurement with beam / Hz
IQ
14/10/2008 FLASH Seminar, Zheqiao Geng 26
Beam measurement-- Pulse to pulse fluctuation
0 10 20 30 40 50 60 70 801.6
1.65
1.7
1.75
Measurement times
Am
plitu
de o
f Cb
0 10 20 30 40 50 60 70 80-180
-175
-170
Measurement times
Pha
se o
f Cb
/ deg
1.3% RMS
1.4 degree RMS
14/10/2008 FLASH Seminar, Zheqiao Geng 27
Use cases of cavity parameters
Detect the QL exceptions, such as quenchProvide detuning information to piezo controlDetect the detuning exceptionsCalibrate the vector sumDenoise the cavity probe signal in real time…
14/10/2008 FLASH Seminar, Zheqiao Geng 28
Denoise the cavity probe signal with Kalman filter in real time
The cavity model are formed by:
Loaded Q curve during the RF pulse
Detuning curve during the RF pulse
Beam curve during the RF pulse
Cavity equations
The model is linear and time varying.
0 200 400 600 800 1000 1200 1400 1600 1800-2
0
2
4
6
8
10
12
14Cavity probe signal
500 520 540 560 580 600 620 640 660 680 700
13.45
13.5
13.55
13.6
I flattop zoom
originalfilteredmodel prediction
500 520 540 560 580 600 620 640 660 680 7001.6
1.7
1.8
1.9
2
2.1
Q flattop zoom
originalfilteredmodel prediction
14/10/2008 FLASH Seminar, Zheqiao Geng 29
Algorithm Study:Adaptive feed forward
14/10/2008 FLASH Seminar, Zheqiao Geng 30
Goals
Identify the systemStudy the adaptive feed forward algorithm based on inversed system model
14/10/2008 FLASH Seminar, Zheqiao Geng 31
Calibrate the klystron signal as vector sum effective driving signal
The vector sum can be viewed as the output of an effective single cavity
The cavity equation will still work for the effective single cavity
The driving signal to this effective single cavity can be derived from the klystron output signal by multiplying a complex constant
0 500 1000 1500 2000-5000
0
5000
10000
15000
20000Vector sum
IQ
0 500 1000 1500 2000-2
-1
0
1
2
3
4Effective cavity driving derived from klystron output
IQ
14/10/2008 FLASH Seminar, Zheqiao Geng 32
Vector sum effective single cavity model
0 200 400 600 800 1000 1200 1400 1600 1800 20000
100
200
300
400
500Half bandwidth during the RF pulse / Hz
0 200 400 600 800 1000 1200 1400 1600 1800 2000-200
-100
0
100Detuning during the RF pulse / Hz
Time / us
0 100 200 300 400 500 600 700 800 900 10001.3
1.4
1.5
1.6x 10
-4 Gain from DAC to vector sum driving
0 100 200 300 400 500 600 700 800 900 1000-5
0
5
10
15Phase shift from DAC to vector sum driving
Time / us
AFF:
Vector sum error Driving signal correction (system model)
Driving system correction Feed forward correction (DAC to driving signal gain)
14/10/2008 FLASH Seminar, Zheqiao Geng 33
Adaptive feed forward algorithm-- Procedure
For each iteration:
Get the initial feed forward correction table from last pulse: FF_CORR0 = DAC – FF0
Measure the vector sum error of this pulse
Inverse the system model, calculate the corresponding feed forward correction signal FF_CORR1
Get and update the new feed forward correction table of this iteration: FF_CORR = FF_CORR0 + FF_CORR1
Analysis:
With open loop operation: normal adaptive feed forward algorithm
With closed loop operation: feedback signal will also be taken into account
14/10/2008 FLASH Seminar, Zheqiao Geng 34
Adaptive feed forward algorithm-- Principle
( ) bLdsumsum IRVCVj
dtdV
2/12/12/1 2ωωωω +=Δ−+
Cavity equation
We expect
( ) bLdsetset IRVCVj
dtdV
2/12/12/1 2ωωωω +′=Δ−+
So the new driving signal can be calculated based on
( ) dsumsum VCVj
dtVd
Δ=ΔΔ−+Δ
2/12/1 ωωω
14/10/2008 FLASH Seminar, Zheqiao Geng 35
AFF test at ACC1 (Open loop)
14/10/2008 FLASH Seminar, Zheqiao Geng 36
AFF test at ACC1 (Closed loop)
14/10/2008 FLASH Seminar, Zheqiao Geng 37
Future plan for LLA
14/10/2008 FLASH Seminar, Zheqiao Geng 38
Plan for LLA work
Continue developing algorithmsSystem phase and system gainCavity parameters measurementAdaptive feed forwardSystem status analysisException detection and handlingSystem performance estimation
Implement and test the LLA algorithms in the SIMCON development system at ACC1
14/10/2008 FLASH Seminar, Zheqiao Geng 39
Thank you for attention!