LCLS LEM Meeting, Friday January 26, 2007 13:30 (notes from Mark Woodley) ================================================================================ Attendees: Dayle Kotturi, Mike Zelazny, Paul Emma, Rick Iverson, Joe Frisch, Ron Akre, Howard Smith, Mike Stanek, Diane Fairley, Patric Krejcik, Stephanie Allison ================================================================================ Here are some general comments on the SCP/EPICS interface vis a vis LEM: For each EPICS-controlled unit, the SCP-side software associated with LEM (the KLYS_GET_ENERGY routine specifically) will get unloaded energy gain and phase from EPICS via channel access using the following PVs (please correct me if I got the exact PV names wrong): - L0 TCav: KLYS LI20 51 ENLD <=> KLYS_LLRF:IN20:RH:TC0_ADES KLYS LI20 51 PDES <=> KLYS_LLRF:IN20:RH:TC0_PDES - RF Gun : < ... not considered for LEM ... > - L0-A : KLYS LI20 71 ENLD <=> KLYS_LLRF:IN20:RH:L0A_ADES KLYS LI20 71 PDES <=> KLYS_LLRF:IN20:RH:L0A_PDES - L0-B : KLYS LI20 81 ENLD <=> KLYS_LLRF:IN20:RH:L0B_ADES KLYS LI20 81 PDES <=> KLYS_LLRF:IN20:RH:L0B_PDES - L1-S : KLYS LI21 11 ENLD <=> KLYS_LLRF:IN20:RH:L1S_ADES KLYS LI21 11 PDES <=> KLYS_LLRF:IN20:RH:L1S_PDES - L1-X : KLYS LI21 21 ENLD <=> KLYS_LLRF:IN20:RH:L1X_ADES KLYS LI21 21 PDES <=> KLYS_LLRF:IN20:RH:L1X_PDES The ADES values give the absolute energy gain of an on-crest electron (they will be calibrated by some external means, mostly using the beam); the units of ADES will be MeV. The PDES values give the absolute phase of the RF w.r.t. the beam (they are offset-corrected so that 0 means on-crest); the units of PDES will be degrees. For our purposes, these values can be considered as "always fresh" ... i.e. no need to request an update before getting the values. ................................................................................ Here's a list of the questions that I think I asked and the answers that I think I heard (in no particular order): Q: Will the LCLS e- bunch be designated as "bunch #1" in the BEAM database? A: Yes ... data needed by LEM for the LCLS e- bunch will come from slot #1 in the multi-valued BEAM secondaries (i.e. BEAM BMLD) Q: Can we define new HDSC bits for the KLYS database to help the KLYS_GET_ENERGY routine (KGE) deal with the EPICS controlled devices? A: Yes ... tentatively we'll define new HDSC bits to tell us - is this KLYS unit controlled by EPICS? - does this KLYS unit power a transverse structure? - does this KLYS unit power an X-band structure? Q: Will any of the EPICS-controlled units have additional/alternative amplitude control (like KLYS LI01 61)? A: No Q: Will any of the EPICS-controlled units have additional phase control(s) - an additional pulsed phase control (like KLYS LI09 11) - a seperate subbooster phase (like standard linac KLYS units) - a "backphase trigger" (like most linac SBSTs) - an additional pulsed subbooster phase control (like SBST LI17 1) A: No Q: Will there be a "phase ramp" for LCLS? A: Maybe ... if so, KGE can use BEAM BMLD(1) the same way it does now Q: Can ADES and PDES be read out even when the device is under beam-based feedback control? A: Yes Q: Should we consider any SLED effects for the EPICS-controlled units? A: No Q: Should we consider any beam loading effects in the transverse and X-band structures? A: No Q: Where will beam code dependent "status" information (accelerate, standby, dead) come from? A: Same as now ... EPICS-controlled KLYS units will be "activated" and "deactivated" on specific beam codes using present SCP functionality, so the usual T-matrix checks will work (see REF_KLYSUTIL:LINAC_KLYS_STAT.FOR) ................................................................................ Here are some KLYS database things to set up: - HSTA bits for pulsed amplitude control should be cleared - HSTA bits for pulsed phase control should be cleared - MSTR secondary should be set to 'NONE' - PAUB,PAUP,PAUM,PAUU,PAUS secondaries should be cleared/zeroed - HDSC bit for "other phase control" should be cleared - HDSC bit for "EPICS controlled" should be set - HDSC bit for "transverse structure" or "X-band structure" should be set where appropriate - EERR fudge factors should be set to 1.0 (until we know otherwise) ................................................................................ At the very end of the meeting we decided that LCLS will require three LEM "regions": BX02 exit to BC1; BC1 to BC2; BC2 to end of linac. The beam energy will be fixed at the boundaries of these regions (specified by operators and/or physicists), and a separate LEM "fudge" factor will be maintained for each region. ================================================================================ Finally, FYI here are the (somewhat scattered and disconnected) notes on LEM and KLYS_GET_ENERGY that I put together for the meeting: Background ---------- In order to compute a beam's actual energy gain from a given KLYS unit (and its associated accelerating structure), LEM needs to know two things: the unloaded on-crest energy gain (MeV), and the phase of the RF (deg) with respect to the beam. In the present control system the unloaded on-crest energy gain, KLYS ENLD, is computed from a fit to a KLYS amplitude FTP (see plot), using calibrating constants stored in KLYS ECVT (drive%->MW, MW->MeV, "Decker fudge"). These constants are set by the Klystron Group (and Franz-Josef) ... they take into account the amount of waveguide, the power feeds to the structure, and the peculiarities of the tube itself, among other things. To those of us who use LEM, the generation of these constants is "black magic". LEM takes KLYS ENLD values from the database using simple DBGETs. The engineering units of ENLD are MeV. The one exception comes when the KLYS amplitude is controlled by a PAU (as with some energy feedbacks ... KLYS LI01 61 -> PAU LI01 61 -> AMPL LI01 611). In this case the unloaded on-crest energy gain comes from the VDES value for the "magnet-like" device (AMPL) that is associated with the controlling PAU channel. The engineering units of VDES in this case are also MeV. Getting the phase of the RF with respect to the beam is more complicated. Sources of phase shifts associated with a given KLYS are: - the KLYS phase shifter (KLYS PDES) ... "gold"-adjusted - an "other" PAU-controlled pulsed KLYS phase shifter (i.e. feedback ... KLYS LI09 11 -> PAU LI09 1 -> PHAS LI09 11 VACT) - the "master" phase shifter (usually SBST PDES); the database pointer for the "master" device is contained in KLYS MSTR ... also "gold" adjusted (?) - a 180 degree shift in the "master" phase due to an active "back-phase trigger" (first SBBP unit of KLYS micro) - an "other" PAU-controlled pulsed SBST phase shifter (i.e. feedback ... SBST LI17 1 -> PAU EP01 1 -> AMPL EP01 171 VACT) - a global bunch phase offset ("phase ramp") The engineering units for all of these phases are degrees. All of these phases are summed in KLYS_GET_ENERGY (and in KLYS_GET_PHASE) to get the total RF phase. The energy gain is set to EGAIN=ENLD*cos(PHASE). Then, each EGAIN value is derated by a SLED factor that is computed from the SLED pulse length, the beam's PSK time, and the bunch timing offset (REF_KLYSUTIL:SLED_ACTUAL_FN.FOR). Next, beam loading effects are computed and the resultant energy loss applied to EGAIN. Finally, the LEM "fudge" factor and the KLYS EERR "fudge" factor (generated by Tom Himel's Lattice Diagnostics software package) is applied and the final energy gain value is returned. Questions --------- 1) Will LCLS e- bunch always be bunch 1 (beam at TREF, SLED bunch timing offset = 0)? What about the multi-valued BEAM secondaries? 2) The existing SLC database entries for KLYS LI20 51,61,71,81 and KLYS LI21 11,21 should remain ... can we define an HDSC bit which tells SCP software that these units are EPICS-controlled? 3) Some of the EPICS-controlled KLYS units have "input" and "output" values (channels 0 and 1) for phase and amplitude ... which are the best values to use? Or are the "average" values best? 4) Who keeps these values "fresh" ... are these units POLLed? Do you need to send an "update" request before reading the data? 5) Which EPICS channels have "calibrated" amplitude values (MeV)? 6) Which EPICS channels have offset-corrected ("golded") phase values (deg)? 7) Will any of the EPICS-controlled KLYS units have pulsed (i.e. PAU derived) amplitude control? 8) Will any of the EPICS-controlled KLYS units have multiple phase sources (subbooster, pulsed phase, backphase trigger)? 9) Will feedbacks use the PACs directly? What will the feedback "actuators" be? Will we be able to read back amplitude and phase when feedback is running? 10) Will there be a "phase ramp" for LCLS? 11) Does the X-band structure affect the beam centroid energy? 12) How do things like SLED timing, bunch phase offset, and beam loading change for the X-band structure? 13) Do the transverse cavities ever affect the beam centroid energy? How about beam loading? 14) What is a TMVA or a TMVA_REGION? What do we need from EPICS? --------------------------- 1) status(0): is a given KLYS unit EPICS-controlled? status(1): for a specified beam code, is KLYS in "accelerate", "standby", or neither? (see REF_KLYSUTIL:LINAC_KLYS_STAT.FOR) status(2): does KLYS have pulsed amplitude control? pulsed phase control? (see REF_KLYSUTIL:OTHER_KLYS_PHASE.FOR,OTHER_PULSED_PHASE.FOR) status(3): is this KLYS SLEDed? status(4): is this a "LEM" KLYS? (see REF_KLYSUTIL:LEM_KLYS.FOR) status(5): does this KLYS feed an X-band structure? (maybe HDSC?) status(6): does this KLYS feed a "transverse" structure? (maybe HDSC?) 2) ENLD ... calibrated unloaded energy gain (MeV) 3) PDES ... RF phase w.r.t. beam, "gold" corrected (deg) 4) RLEN ... reference pulse length (sec) Definitions ----------- "ENLD" is on-crest unloaded energy gain (MeV) "CURR" is the beam "current" (particles per bunch, in 1e10) "BLEN" is the bunch length (in mm) "SLED" is the SLED timing offset of the bunch (assumes bunch 1 at TREF) ... downstream of LI19, e+ is bunch 1, e- is buch 2, SLED for e- is 59 nsec "STAT" is KLYS status bitmask "HDSC" is KLYS hardware descriptor bitmask "MSTR" is upstream phase source (i.e. SBST) "PDES" is phase of RF wrt on-crest or full acceleration for KLYS (degrees) "DLWG" is actual length of disk loaded wavegiude fed by KLYS (m) "RLEN" is SLED pulse length (sec) ... used to compute energy gain derating due to bunch timing offset "EERR" is individual multiplicative fudge factor computed by Lattice Diagnostic software "POFF" is the bunch phase offset ("phase ramp") value (deg) "SBST" is the subbooster phase (deg) ... pointed to by MSTR KLYS_GET_ENERGY --------------- - BUNCH = 'ELEC' (BUNCH_INDEX = 1? 2? ... see question 1 above) - ENLD > SCP : KLYS,MICR,UNIT,ENLD (from PAD% to MW, MW to MeV via ECVT) > EPICS: ? - CURR > SCP : BEAM,MP00,,CURR(BUNCH_INDEX) - BLEN > SCP : BEAM,MP00,,BLEN(BUNCH_INDEX) - SLED > will LCLS e- always be bunch 1 (SLED = 0)? - STAT > SCP : use LINAC_KLYS_STAT routine ... required status masks are: accelerate, standby, SLED tuned, pulsed amplitude control > EPICS: ? - MSTR > SCP : KLYS,MICR,UNIT,MSTR - PDES > SCP : KLYS,MICR,UNIT,PDES (desired phase; assumes zero is on-crest) > EPICS: ? - MSTR > SCP : KLYS,MICR,UNIT,L - RLEN > SCP : KLYS,MICR,UNIT,RLEN > EPICS: ? - EERR > SCP : KLYS,MICR,UNIT,EERR > EPICS: ? - POFF > SCP : BEAM,MP00,,BMLD(BUNCH_INDEX) - if KLYS STAT indicates pulsed amplitude control, ENLD is set to VDES for the device specified by the TM_PAU_DEVICE routine - subbooster "backphase trigger" is detected by finding a SBBP device in the same micro ... T_DEV_IS_ACTIVE determines if it is active on our beamcode - the OTHER_SBST_PHASE routine is used to find additional (i.e. feedback) SBST phase shifter whose phase is summed with SBST PDES; the OTHER_KLYS_PHASE routine is used to find additional (i.e. feedback) KLYS phase shifter whose phase is summed with KLYS PDES; the total KLYS phase is sum of: KLYS PDES + "other" KLYS phase + SBST PDES + 180 (if SBBP) + "other" SBST phase + POFF