Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Beam-based Feedback systems are to be prototyped in Matlab MATLAB for the first commissioning of the LCLS system in early 2007.   There are six beam-based feedback systems to be tested in the first commissioning run. 

This Beam-based Feedback in MATLAB will also be used in the second LCLS Commissioning run starting December 2007Several new feedbacks will be implemented for this second commissioning run.  It has been decided that the MATLAB Feedbacks will control and read ONLY EPICS devices (RF, Magnets, BPMs). During the second commissioning phase many devices will remain under SLC control, so the discriptions below indicate how each feedback will be implemented until all devices are under EPICs control.

A description of each feedback follows.

...

The Bunch Charge feedback stablizes the bunch charge of each pulse at the RF gun.  This feedback is a accomplished with a set of two nested feedback loops.  An inner loop, local to the laser system, adjusts the wave-pate plate angle, and therefore the laser pulse energy, by measuring the laser energy with a Joule meter near the cathode.  An outer loop controls the energy setpoint of the inner loop, based  on the total bunch charge measurement of the toroid IM01, near the RF gun.  the inner loop is implemented in EPICS on the associated laser IOCs.  The outer loop is a beam-based feedback implemented in Matlab.

...

The Spectrometer Dump Energy feedback loop is identical to the DL1 Energy loop, except it is used when the beam is directed to the spectrometer dump rather than into Sector 21.   In this case, BMPS2 or BPMS3 x-position is used to measure the relative energy. 

DL1 Energy + BC1 Energy + BC1 Bunch Length

The BC1 location along the linac requires both energy and bunch length stabilization.   This feedback loop will include the energy at DL1 as well, so that the energy feedback from RF gun through and beyond BC1 work together as a single loop.  BPM13 and BPMS11 are used to measure the relative energy, BL11 is used to measure the relative bunch length.  These measurements are used to adjust the phase (or amplitude?) at L0B and the amplitude and phase of L1-S.  In the case where BL11 is not used, the DL1 + BC1 energies alone may be stablized with this loop.

...

The Injector Launch feedback is required to stabilize the trajectory of the beam as it enters the linac at Sector 21.  The x-position and y-position measurements of BPM9 through BPM15 will be used to calculate adjustments to the desired B-field of the XCO4 / YCO4 and XCO7 /YC07 corrector magnets.  This feedback attempts to stabilize the states: x-position, x-angle, y-position, y-angle of the beam. 

X Cavity Launch

The X Cavity Launch feedback is required to stabilize the trajectory of the beam at the X Cavity.  The x-position and y-position measurements of BPM21201 are used to calculate adjustments to the desired B-field of the XC11 / YCA11 corrector magnets.  This feedback attempts to stabilize the states: x-position and y-position of the beam. 

RF phase of Transverse Deflecting Cavity

This feedback is used to stabilize the phase of the beam with respect to the RF field of the cavity.  This feedback is used only during a Bunch Length Measurement and is integrated into the Bunch Length Measurement application

Gun Launch Feedback

 This feedback is used to stablize BPM5 in X and Y using the XCO1 and YC01 corrector magnets.

DL2 Energy  

The Energy and Bunchlength feedbacks of the first commissioning will be expanded to include energy at DL2, energy at BC2 and bunchlength at BC2.  These six parameters will be maintained by a single Longitudinal feedback that is configurable.  It will allow the user to choose which states,  actuators and measurement devices will be usedIt will also include some automatic detection of certain conditions, such as no beam past TD11 etc.  The requirements are documented in the Beam-based Feedback in MATLAB Requirements Document.

NOTE: There are only 3 EPICS controlled BPMs planned for the BC2 commissioning phase (until about Nov. 2008) so the longitudinal feedback will only include DL1 energy, BC1 Energy, BC1 Bunch Length, BC2 Energy and BC2 Bunch Length, until all BPMs are under EPICS Control. 

Energy at BSY

It is necessary to stabilize the BSY energy when the beam is diverted from entering the LTU at BSY.

See DL2 Energy above.

DL2 Energy + BC2 Energy + BC2 Bunch Length

See DL2 Energy above.

L2 Launch

The L2 Launch feedback is a transverse feedback used to stabilize the beam trajectory in the L2 region.  The BPMs in this area are all under SLC control for the second commissioning.  It was decided to leave the correctors for this feedback under SLC control as well, so that this feedback can be implemented with existing SLC feedbacks.

L3 Launch

The L3 Launch feedback is a transverse feedback used to stabilize the beam trajectory in the L3 region.  The BPMs in this area are all under SLC control for the second commissioning.  It was decided to leave the correctors for this feedback under SLC control as well, so that this feedback can be implemented with existing SLC feedbacks.

References

Magnet Interface: see the Magnet Application Programmer Interface document at Sharepoint Power Supplies and Control Hardware page

...

Feedback Support Soft IOC Device and PV names: see Feedback Support Soft IOC 

Machine control and Authority issues: see Machine Control and Effects on Feedback Design 

Also, see requirements documents below. 

...

Controls Requirements for LCLS Feedback Systemsdocuments the final requirements for the fast feedback EPICS implementation.  This document is used to guide development of the prototypes.

Beam-based Feedback Software Requirements Document This documents the feedback reequirements for BC2 commissioning, starting Dec. 2007

Bunch Charge Feedback Loop

Testing

There is a development environment test setup for testing feedback loop designs before running them in the production environment. This setup includes:

  • the FbckSimulator soft IOC that simulates the devices needed in each individual feedback loop to be created.
  • the EDM screens for the FbckSimulator soft IOC
  • the development FbckSupport soft IOC , sioc-sys0-fb0d.
  • the development version of the xml configuration file needed for each feedback loop. Stored in $MATLABDATAFILES on the development nfs file system.
  • the development version of the edm screens

User Guide

Beam-based Feedback in MATLAB: powerpoint presentation slides Matlab Feedback How-to.ppt attached, see Attachments tab above

Task Lists and Schedules

The Feedback Prototyping project includes several sub-projects. A task list and schedule is (will be...) included for each:

  • Matlab Framework for Feedback Applications
    • DONE:read EGU from PVs and display units wherever possible - DONE except matrix params and PID values (??? ask juhao)
    • DONE:use new event API - see matlab prog. man. - DONE cant use one-shot, will stick with F1,F2 1Hz 5Hz 10Hz setup
    • DONE:use lcaUtil_NewMonitorValue - DONE
    • DONE:add code to read config PVs instead of xml file whereever possible (tolerances, dispersion)
    • add limits checking on actuators, states, measurements - inlcuding checking TMIT on all measurements for validity? see notes on disc. w/Paul
    • add readback of actuators and compare to desired value
    • DONE:before starting loop, read current actuator value as initial value
    • add error checking on devices  - DONE upon init: reports severity of all act, states, meas PVs
    • add error checking on communications, calculations -
    • DONE:rename source files for flat file system (prefix=fb)
    • DONE:add a Stop() function : DONE first cut- if anything goes wrong, STOP the feedback (if we try to take any corrective action our single-minded (threaded) matlab stops looping anyway)
    • may need to check pulse-ids on all measurements and compare to be sure they are from same pulse - try this later when we have a 'real' pulse-id - 2 days effort
    • test all feedbacks individually on Kiosks, sunrays determine where best to run in control room. - 2 days for these three tasks below
    • investigate long-term run (must be able to run well for at least a full shift 8 hours)
    • investigate memory and processor usage, determine if they run well enough with more than one matlab/feedback instance at a time on a processor
  • application to collect reference orbit data - TBD
  • (application to experimentally determine matrix???) - TBD
  • EDM screens to monitor feedbacks - at least a week effort
    • use EGU to display units; DESC or MAD name to display device name?
    • re-do screen and update to LCLS display colors, formats etc
    • integrate into LCLSHOME screens
    • add in actuator readback checking for all loops
    • find a fix/workaround for Matlab file dialog error
    • add labels to the matrix GUI so that the matrix elements are identified.
    • can we make the feedback application a totally background app - so there is no window at all?
    • in configuration application - indicate a minimum number of measurement devices needed for each feedback
  • DONE for now:soft IOC for stored Feedback data and dynamic setpoints - called FB00 in prod, FB0D on development network
    • DONE:configure as a simple IOC
    • DONE:test on lcls-prod01 - fbcksim & fbSupport on lcls-prod01, matlab feedback app on lcls-prod02 works fine
    • DONE:add ON/OFF or USED/NOT USED state PVs per actuator, measurement, feedback
    • DONE:add tolerances and dispersion value PVs
    • DONE:Channel Watcher:set up for development only, will need to re-do cwConfig file for production, later when production PV names are finalized
    • re-organize cwConfig file to support 'gold' setups.  divide file into two-per-feedback. keep config params in one file, all others in second file.
    • Channel Archiver: set this up when production softIOC is working; they do not want development PVs in archive
  • soft IOC simulator to generate data for feedback testing (this will  never be a production softIOC)
    • DONE: add simulation of user controls for LLRF
    • DONE: add calc of real BPM x-position values, replace virtual energy device for Energy feedbacks- DONE
    • debug the errors introduced with new eDef databases - in progress
    • add LLRF, Toroid, BLEN edm screens for simulator
    • add calc of real toroid reading
    • add calc of real BL11 reading, replace virtual current device for Energy / Bunch length feedback
    • as ICDs become available add limits, resolutions, EGU etc  to simulator - in progress
    • add feedback Gain values to the softIOC
    • Archive gains, weighting changes, mask matrix
    • create PV to alarm on Actuator saturated, major, near saturation, minor
    • DONE put saved actuator values into save/restore
    • DONE put note under Network | sioc-sys-fb00 to stop all feedbacks before re-booting
  • EDM and other displays
    • DONE Remove all the purple
    • how to bring-to-front EDM displays that are up already when you push the button that is supposed to bring it up?
  • Recreate the feedback simulator for testing
    • DONE remove dependancies with magnet subsystem/timing subsystem
    • add simulation for longitudinal  BC2 energy, DL2 energy, BC2 Bunchlength
  • Individual Feedbacks
    • Longitudinal
      • add Energy and Chirp PVs to soft IOC so that we can calculate the 24-1 phase & 24-2 phase settings that will create the Energy and Chirp (effectively)
      •  develop a scanning application that will scan energy and chirp to find the lower and upper limits of the BLENs
      • Develop a BLEN calibration routine (see my notes)
      • add in and test automatic switching capabilities - via mask matrix
    • Transverse
      • add
    Individual Feedbacks
    • Bunch Charge - NO PROGRESS HERE AT ALL - what's sheng doing on it???
      • gotta get going on this soon!
      • need ICD for toroid
      • need ICD and additional info on inner laser energy loop
    • Energy at DL1 / Spectrometer Dump
      • DONE:add control records on LLRF Amp and Phase to lock out users during automated feedback, dayle will add to production, done in simulator
      • need BPM ICD
      • DONE: need dispersion values for each BPM 
        • DONE:get dispersion from Juhao's Dispersion Application, will be typed manually into Feedback Framework Application
        • DONE:dispersion value is stored on FB00 soft IOC
      • DONE: read amp and phase actual values before starting loop
      • DONE: change DL1 actuator to LOB phase, not amplitude, will also use phase as main actuator for BC1 energy
    • DL1 Energy + BC1 Energy + Bunch Length
      • need to use IM01 to calc Bunch Length values (along with BL11 reading)
      • where to get calibration constant C for BL11/ IM01 calcs? See doc  from Paul
      • We need the BL11, BL12 to calculate the Ipk vs. energy curve and store as part of it's calibration. It can then report Ipk, TBD in EPICS Db (like magnet polynomials?)
      • Ipk vs. energy needs toroid and TCAV LI29 values - can be done ahead of time?
      • need ICDs for toroids and BLEN
      • DONE: make phase the main actuator for DL1 and BC1 energy when no BL is in use
    • Injector Launch
      • test Paul's latest optimization algorithm with latest simulator BPM values and noise levels
      • need BPM ICD
      • DONE:read magnet actual values before starting loop
      • test further with reference orbit data - work out details with reference orbit, error(dX, dY - resPV),  weighting, and chisq values in fit function data
      • weighting can allow Launch feedbacks to automatically ignore missing BPMs
      • evaluate other methods of dynamic reconfiguring (BPMs here)