150 likes | 278 Views
Control System and CBETA-V Kirsten Deitrick. With many slides from Colwyn Gulliford’s ICAP’18 talk. Introduction. GPT Online Model CBETA-V Basics BMAD/TAO Overview CBETA-V Online Model CBETA-Virtual Machine Control System Control System and CBETA-V
E N D
Control System and CBETA-VKirsten Deitrick With many slides from Colwyn Gulliford’s ICAP’18 talk
Introduction • GPT Online Model • CBETA-V Basics BMAD/TAO Overview CBETA-V Online Model CBETA-Virtual Machine • Control System Control System and CBETA-V • Scripts Machine Running Measurements Orbit Correction Example • Conclusion kd324@cornell.edu
GPT Online Model (Injector and Linac ≤ 42 MeV) Save / Load from file or optimizer Create Particles Run GPT Control Tabs BeamlineSettings Plotting + Analysis Load from EPICS kd324@cornell.edu
BMAD/TAO Overview • Fortran 2008, O2 , Interface to C++ • Bmad can be run multi-threaded (w/few restrictions). • Lattice files use a MAD like syntax. • Well documented (Manual is ~500 pages). • Executable: Tao - a general purpose simulation & design program with • Twiss and orbit calculations. • Nonlinear optimization. • Analysis of complicated geometries. • Etc. • Tao’s object oriented coding makes it easy to extend: • >> Add custom commands to interface Tao with a control system. http://www.lepp.cornell.edu/~dcs/bmad/ CBETA Layout in TAO kd324@cornell.edu
CBETA-V Online Model • Incorporates all TAO capabilities: perfect for those familiar with TAO • (Minimal) Custom code auto generates relevant variables/objectives for optimization • Handles TAO ↔ EPICS book keeping • EPICS get/put via linking to EPICS EZCA • Communication with EPICS → get Save/Restore for free • All conversion data stored in EPICS records: kd324@cornell.edu ELEMENT_POWER_SUPPLY_[CMD, RDBK] [Amps, Volts, etc] ELEMENT_FIELD_SCALE [Tesla/Amp, etc] ELEMENT_FIELD [Tesla, etc] Lattice Element
CBETA-Virtual Machine • Python wrapper around CBETA-V • Creates a clone of the CBETA EPICS control/diagnostic PVs • Sync mode: monitor CBETA settings, serve up-to-date simulation data • Good for operators or those less familiar with TAO • Serves additional lattice data to EPICS: • Can send any TAO command via EPICS, results served as a string ELEMENT_s [m] ELEMENT_L [m] … Lattice Element kd324@cornell.edu
CBETA-Virtual Machine Serves… • Entire 1-pass lattice (which will change as the machine does) • Energy • Orbit • Dispersion • Twiss parameters • Transfer matrices • Simulated viewscreens kd324@cornell.edu
Control System • Underlying control through EPICS • Direct control through EDM • Archive logs flagged readbacks • Save/Restore (Restorinator GUI) for machine state • Measurements typically taken through Matlab scripts that talk to EPICS kd324@cornell.edu
Control System and CBETA-V CBETA MACHINE Power Supplies Virtual PowerSupplies Virtual Diagnostics Diagnostics kd324@cornell.edu Serve: orbit, dispersion, Twiss, energy…
Scripts • CBETA machine state can be passed into CBETA-V, helping with real-time machine control and subsequent offline analysis • Both CBETA and CBETA-V can be controlled with scripts • CBETA-V helps in creating/testing/demonstrating control and measurement scripts meant for the real machine • Many routine operations tasks and measurements have corresponding scripts More are created as necessary kd324@cornell.edu
Machine Running • Phasing cavities • BPM position calibration • CBV Includes beam orbit, BPM intensity/bunch charge, radiation monitors Beam orbit is compared to CBETA-V, which tracks current machine settings kd324@cornell.edu
Measurement • Orbit correction Automatically corrects orbit of beam through 1-pass lattice • Quadrupole dispersion measurement Calculates dispersion • Emittance measurement in splitter lines Measures emittance in the SX/RX lines • Emittance measurement EMS GUI (in the diagnostic line) Screen measurements (in the dump line) kd324@cornell.edu
Orbit Correction • Script written by Adam Bartnik and Colwyn Gulliford • Beam is lost early due to misalignment, threads through the FFA arc as correctors are adjusted • Includes BPM noise/offset, quadrupole misalignment/errors, energy error (1% of MLC) kd324@cornell.edu
Orbit Correction • Different initial orbits, all of which are wrong • Are eventually corrected kd324@cornell.edu
Conclusion • Online models GPT (Injector and MLC) CBETA-V • CBETA Virtual Machine Combines CBETA-V and CBETA EPICS records Controlled in the same way as CBETA machine Real time / online data comparison Easy comparison to data analyzed offline Testing/Debugging real measurement scripts • Scripts Heavily incorporated into routine beam running and measurements • Future Work Update the CBETA-V lattice with machine (as pass number increases) Expand script collection to include more tasks/measurements as needed kd324@cornell.edu