development of the pattern awareness unit (pau) for the lcls fast feedback system
Post on 19-Mar-2016
64 Views
Preview:
DESCRIPTION
TRANSCRIPT
Development of the PAU 1
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Development of the Pattern Awareness Unit (PAU) for the LCLS Fast Feedback System
Kukhee Kim for Fast Feedback Team
Oct. 13, 2010
Controls Department
SLAC National Accelerator Laboratory
Development of the PAU 2
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Contents Fast Feedback System Motivation of Pattern Aware Operation Pattern Awareness Unit
Purpose Implementation Details PAU operation timeline: time slots
Real Implementation in the LCLS Summary
Development of the PAU 3
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Fast Feedback System
Development of the PAU 4
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Fast Feedback (cont’d) Pattern Aware Control
Pattern-based 120Hz operation Control Magnet and RF based on Timing Pattern
Utilize FNET Isolated network: no competing network traffic, reliable data transport FCOM protocol: new efficient protocol for FNET, IP multicasting
New fast feedback replaces MATLAB codes (slow and non-pattern aware feedback)
Development of the PAU 5
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Motivation (1) Increase beam rate 60Hz to 120Hz
beam runs on same AC phase @ 60Hz two different AC phases @ 120Hz
Other power line noise sources are expected LCLS-II Facility for Advanced Accelerator Experimental Test (FACET) any other which shares SLAC main power line will make additional variations
Pattern a set of same variation on the power line reflected on the timing/event patterns pattern: a combination of time slots and beam operation information for entire SLAC facility
Development of the PAU 6
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Pattern and Beam characteristics
D1 D2 D1 D3 D1 D2 D1 D3 D1 D2 D1 D3 D1 D2 D1 D3 D1 D2 D1 D3 D1
D1 D1 D1 D1 D1 D1 D1 D1 D1 D1
D2 D2 D2 D2 D2
D3 D3 D3 D3 D3
D1
Non Pattern Awareness (ALL patterns):Step Changes occurred on control parameters
Pattern Awareness (for pattern D1)Smooth changes occurred
Pattern Awareness (for pattern D2)
Pattern Awareness (for pattern D3)
Development of the PAU 7
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Motivation (2) Non-Pattern Aware Feedback
feedback loop has to compensate the step change between the pattern but, single feedback loop is not suitable for cure step raise and fall
To compensate the variation between the patterns mobilize separated feedback loops for each different patterns each feedback loop does not experience step change beam characteristics in different patterns can be converge to a desired value smoothly Pattern Aware Operation for actuators: RF and Magnets
To build generic Software Solution for the pattern required operation
PAU can be utilize any pattern required application
Development of the PAU 8
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Schematic of Fast Feedback System
Accelerator
Detector Fast Feedback Controller(s) Actuator
EVR EVR EVR
T1 VAL1
T4 VAL1
T1 VAL2
T4 VAL2
Feedback Algorithms
Feedback Algorithms
Feedback Algorithms
Feedback Algorithms
triggertrigger trigger
Actuator (Pattern Awareness)
Remark *3)
Development of the PAU 9
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Pattern Awareness Unit (PAU) Pattern Recognition
tightly bind with the EVR wake up by the fiducial interrupt 360Hz rate pattern matching
beam code and time slot 5 x 32bits exclusion mask and 5 x 32bits inclusion mask = total 320bits information Advanced Pattern Matching to implement set value to the actuator Current Pattern Matching for getting data from fast feedback controller
Drive data pull function data pull from FCOM data slot
Drive data push function execution local regulation loop for RF system*1) configuration type I
send I&Q data to PACs (Pase Amplitude Controller) for RF system implement DAC value for Magnet system*2) configuration type II
Development of the PAU 10
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Configuration Type I (RF system)Fast Feedback Controller(s)
NET
FNET
EVR
Feedback Algorithms
Feedback Algorithms
Feedback Algorithms
Feedback AlgorithmsN
ET
FNET
EVR
Feedback Algorithms
Feedback Algorithms
Feedback Algorithms
Feedback AlgorithmsN
ET
FCO
M
EVR
Feedback Algorithms
Feedback Algorithms
Feedback Algorithms
Feedback Algorithms
Timing Network
Ethernet for Channel Access
Detectors
NET
PrivateN
et
EVR
AD
C
NET
FCO
M/
Private N
et
EVR
DA
C
Actuators
Ethernet for Fast Feedback (Raw UDP)
NET
Private N
et
DA
C
Master IOC
Hard-wired Trigger
Remark *1)
Development of the PAU 11
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Configuration Type II (Magnet System)Fast Feedback Controller(s)
NET
FNET
EVR
Feedback Algorithms
Feedback Algorithms
Feedback Algorithms
Feedback AlgorithmsN
ET
FNET
EVR
Feedback Algorithms
Feedback Algorithms
Feedback Algorithms
Feedback AlgorithmsN
ET
FCO
M
EVR
Feedback Algorithms
Feedback Algorithms
Feedback Algorithms
Feedback Algorithms
Timing Network
Ethernet for Channel Access
NET
FCO
M
EVR
AD
C
NET
FCO
M
EVR
DA
C
Detectors
NET
FCO
M
EVR
AD
C
NET
FCO
M
EVR
DA
C
Actuators
Ethernet for Fast Feedback (Raw UDP)
Remark *2)
Development of the PAU 12
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Data Slot 1
Data Slot 2
Data Slot 3
Data Slot 4
Control Values from Feedback Controllers
UltraHighCallback
Fiducial FunctionRunning on the evrTask
-Each PAU has own fiducial function-Performs bitPattern matching for each PAUs-Implement HW Timer-Queuing processing into UltraHighCallback
Wake-up Event come from EVR360Hz
User Functionfor data Pull
User Functionfor data Push
Processing Flow (1) Fiducial Thread
wake up @360Hz fiducial interrupt proceed pattern matchings
advance pattern matching for set value (to prepare next beam pulse) current pattern matching for getting data
Queuing pattern matching information to the UltraHighPriority Callback Thread
The queuing need to be delayed by the high-resolution timer to allow accurate adjustable time delay to waiting data from the fast feedback controller utilize the high-reolution timer on the CPU board: sub nano-second resolution
Development of the PAU 13
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Processing Flow (2)UltraHighPriority Callback Thread
Waiting message from the fiducial thread/high resolution timer Proceed MUXes in the linked list
MUX corresponds to a physical quantity: B_des (set value for magnet strength) , P_des (phase), and A_des (amplitude)A PAU is shared by multiple MUXes which requires same pattern matchings.A PAU handles multiple MUXes (in the linked list) To save pattern matching for the individual quantity
Linked list
Linked list
Control Values from Feedback Controllers
UltraHighCallback
Fiducial FunctionRunning on the evrTask
-Each PAU has own fiducial function-Performs bitPattern matching for each PAUs-Implement HW Timer-Queuing processing into UltraHighCallback
Wake-up Event come from EVR360Hz
Data Slot 1
Data Slot 2
Data Slot 3
Data Slot 4
User Functionfor data Pull
User Functionfor data Push
Data Slot 1
Data Slot 2
Data Slot 3
Data Slot 4
User Functionfor data Pull
User Functionfor data Push
Data Slot 1
Data Slot 2
Data Slot 3
Data Slot 4
User Functionfor data Pull
User Functionfor data Push
Development of the PAU 14
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Processing Flow (3)UltraHighPriority Callback Thread (cont’d)
Proceed the user pull function with the current pattern matching resultPull data from matched FCOM data slot: fast feedback mode*3) Schematic for fast feedback
Pull data from matched data slot PV: static offset mode*4) Static offset mode
Proceed the user push function with the advanced pattern matching resultPush data into DAC: magetExecute the local regulation loop/Push data to the PAC via network: RF system
Proceed the PAU diagnosticsMeasure execution timeHouse keeping
Development of the PAU 15
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Time line for interlaced mode
Priority
UltraHighCallback
RawUDP Sender (for PAC)
RawUDP Listener (for PAD)
Other Tasks running on the IOC
FCOM Interface
Time
EVR Thread
T1 T2 T3 T4 T5 T6 T1 T2 T3 T4 T5 T6
D1 D2 D1 D2
Receiving DES
Receiving ACT
Pull AC
Tand latch it for D
2
Pull DES for D
1
Queuing SP
Receiving DES
Receiving ACT
Pull AC
Tand latch it for D
1
Pull DES for D
2
Timer
Queuing SP
Receiving DES
Receiving ACT
Pull AC
Tand latch it for D
1
Pull DES for D
2
Queuing SP
Receiving DES
Receiving ACT
Pull AC
Tand latch it for D
2
Pull DES for D
1
Queuing SP
Data Pull
Data Push
Timer
Data Pull
Data Push Timer
Data Pull
Data Push Timer
Data Pull
Data Push
Beam 1 Beam 2 Beam 1 Beam 2
Diag. Diag. Diag.Diag.
IQ conversion
Queuing Sending Data
Send data to PAC
Fiducial function
Woke-up by arriving packets,But, there no Push mechanism!
Time Slot
Pattern
Local Feedback
Pattern matching for current time slotAnd latch it for Diag. and for pull ACT
Pattern matching for advanced time slot
(Two Patterns 60Hz + 60Hz = 120Hz)
Development of the PAU 16
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Time slot operation with slow feedback when turned off fast feedback backward compatibility (non-pattern aware feedback + pattern aware operation)
Static offset mode
Accelerator
Detector Slow Feedback(MATLAB or SoftIOC) Actuator
EVR
T1 VAL1
T4 VAL1
T1 VAL2
T4 VAL2
Algorithm
trigger
Actuator (Pattern Awareness)
Master set value
1setV
setV 2setV
3setV
4setV
Operator Set Value
Remark *4)
Development of the PAU 17
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Diagnostics Command line debugging tools
various commands to show up: PAU internal variables, statistics, and measurements
Diag. Function provides snap shot information for statistics and measurements via epics PVs
A part of PAU diag. panel A part of MUX diag. panel
Development of the PAU 18
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Implementation in LCLS RF system
PAU0: Laser loop in IN20 (1 station, 2 associations, 3 muxes) laser_mux_pdes_2856MHz laser_mux_pdes_119MHz
PAU1: Feedback for IN20 (6 stations, 6 associations, 12 muxes) each station has 2 muxes: PDES and ADES gun, l0a, l0b, tcav0, l1s, l1x
PAU2: Feedback for LI24 (7 stations, 9 associations, 18 muxes) Virtual (abstraction layer): l2 abstraction, l3 abstraction Physical stations: l2ref, tcav3, 24_1, 24_2, 24_3, s29, s30
Magnet systemPAU0: Control correctors in LTU0 area (1 corrector, 1 mux)
xcor_548
PAU1: Control correctors in LTU1 area (3 correctors, 3 muxes)xcor_488, ycor_493, ycor_593
laser_mux_adesAssociation #1 for 2845MHz representation
Association #2 for 119Mhz representation
Development of the PAU 19
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Real-Time Performance MeasurementPAU diagnostics provides measurement data about the performanceReal-Time Performance from self diagnostic information
Pattern matching in Fiducial:
ISR delay:
user pull function:
user push function:
self-diagnostics and house keeping:
Example) RF PAU1 which has 12 muxes
sec2~ sec3~
sec25sec60
sec15~
Pattern matching is proceeded at every fiducial 360Hz
Waking up delay for the high-resolution timer
including FCOM data getting/getting data from PV for each 12 muxes
including RF local regulation loops + I&Q conversion + queuing data info sending queue to PAC
Fiducial-2
Fiducial-1
Fiducial0
Beam
Matched patternto prepare next beam
Fiducial Interval sec778,2
Settle time: worst case for magnet
sec000,6
Real-TimeDeadline
sec200sec105
sec551,1
sec222,2 Margin
Adjustable delayby high-resolution timer
PAU execution time+ overhead
sec000,1
sec251
Development of the PAU 20
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Summary(1) Pattern aware operation has been test with the PAU successfully
injection linac only waiting ready of hardware for downstream
Back ward compatibility allow to use MATLAB (slow, non-pattern aware) feedback instead of the fast feedback Static offset mode
Extensibility There is no limit to create PAUs and MUXes: implemented with linked list Only limit is number of high-resolution timer: first four PAUs will have the timer, after then do not have, thus always 0 delay for remaining PAUs.
Development of the PAU 21
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Summary (2)Real-time performance
Considering priority order for each thread for the PAU: fiducial, UltraHigh callback, and FCOM/udpComm communication threads
The PAU has been operated in the production last 3 months without any problem
Development of the PAU 22
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Appendix
Development of the PAU 23
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Timeline for non-interlaced mode
Priority
UltraHighCallback
RawUDP Sender (for PAC)
RawUDP Listener (for PAD)
Other Tasks running on the IOC
FCOM Interface
Time
EVR Thread
T1 T2 T3 T4 T5 T6 T1 T2 T3 T4 T5 T6
D1 D1 D1 D1
Receiving DES
Receiving ACT
Pull AC
TPull D
ES
Queuing SP
Receiving DES
Receiving ACT
Pull AC
T
Pull DES
Timer
Queuing SP
Receiving DES
Receiving ACT
Pull AC
T
Pull DES
Queuing SP
Receiving DES
Receiving ACT
Pull AC
T
Pull DES
Queuing SP
Data Pull
Data Push
Timer
Data Pull
Data Push Timer
Data Pull
Data Push Timer
Data Pull
Data Push
Beam 1 Beam 1 Beam 1 Beam 1
Diag. Diag. Diag. Diag.
IQ conversion
Queuing Sending Data
Send data to PAC
Fiducial function
Woke-up by arriving packets,But, there no Push mechanism!
Time Slot
Pattern
Local Feedback
Pattern matching for current time slotAnd latch it for Diag. and for pull ACT
Pattern matching for advanced time slot
(Single Pattern 120Hz)
Development of the PAU 24
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Functional Diagram & Interfaces
textPAU
Console(iocsh)
APIs
BSA
EVR
EPICSDB
Management
FiducialFunction
APIs
UltraHighPriorityThread
User function for Data Push
FCOM (NIC)
Ethernet (NIC)
Channel Access
FCOM Listener(Thread)
FCOM Sender or RawUDP(Thread)
DAC
DAC implementationAPIs or Thread
Actuator Commands from FF Controller
Setpoint Values to Actuator
Hardwired Signalto Actuator
Tim
ing from E
VG
st.cmdconfigurationinitialization
Interaction with operator/egineerconfiguration/re-configurationdebuggingreporting
Turn ON/OFF fast feedback mode by FF controllerConfiguration/ReconfigurationOperation Monitoring/Status Monitoring
User function for Data Pull
UdpComm
Hardware Timer
Modular Design:User register functions
Development of the PAU 25
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Configuration Utilize iocsh command
Utilize string identifier to recognize user defined functions and variables: epics registry
Human readable
No re-compile for re-configuration
createPau("pau0", 2, "PAU for feedback")createPau("pau1", 2, "PAU for Laser")
createMux("pau0", "ACCL:LI21:180:L1X_PDES", "l1xPhasePush", "l1xPhasePull", "L1X Phase")createMux("pau0", "ACCL:LI21:180:L1X_ADES", "l1xAmplPush", "l1xAmplPull", "L1X Amplitude")
makeAssociation("ACCL:LI21:180:L1X_PDES", "ACCL:LI21:180:L1X_ADES")
Name of PAU
Pipeline index
Description
PAU name MUX name User defined Data Push function
User defined Data Pull function
Description
MUX name
epicsRegisterFunction(l1xPhasePush);epicsRegisterFunction(l1xPhasePull);epicsRegisterFunction(l1xAmplPush);epicsRegisterFunction(l1xPhasePull);
function(l1xPhasePush)function(l1xPhasePull)function(l1xAmplPush)function(l1xAmplPull)
st.cmd
Source Code DBD file
*5) association
Development of the PAU 26
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
Configuration (cont’d)
MUXfor Amplitude
MUXfor Phase
Local Feedback Loop for Amplitude
Local Feedback Loop for Phase
Conversionfor AP2IQ
I Q
Association
Association
Remark *5)
Association Processing requires two physical quantities
Conversion from Phase&Amplitude to I&Q Need to make relation between two MUXes: phase and amplitude
Syntax:
makeAssociation(mux name 1, mux name 2)
Development of the PAU 27
Controls
Kukhee KimFall 2010 EPICS Collaboration Meeting
Oct 13, 2010
EVR Fiducial function& APIs
PAU/Mux Object& APIs
Registry
for Data Pull
Registry
for Data Push
Default Data Pull(FCOM)
User defined Data PullUdpComm
RF Local Feedback
AP2IQ conversion
Send Data via IP multicasting
User defined Data Push
FCOM interface
UdpComm
UdpComm
(UdpCommListener)
top related