Advanced Light Source EPICS Meeting April 27, 2005 An Accelerator Control Middle Layer Using Matlab Greg Portmann, ALS/LBNL Jeff Corbett.

Slides:



Advertisements
Similar presentations
PCaPAC Satellite Workshop ~ High Level Applications Development and the Matlab Middlelayer ~ Sponsored by the Canadian Light Source Saskatoon, Canada October.
Advertisements

Current Status of MATLAB-based Accelerator Physics Application Programs for the TPS Commissioning and Operation at NSRRC Fan-Hsin Tseng ( 曾繁信 ) Beam Dynamics.
Optics Measurements, Corrections, and Modeling for High-Performance Storage Light Source Instrumentation Glenn Decker Diagnostics Group Leader.
Ultra Low Vertical Emittance at the Australian Light Source Mark Boland on behalf of Rohan Dowd 1.
Dr. Zafer Nergiz Nigde University THE STATUS OF TURKISH LIGHT SOURCE.
1 Slow Global Orbit Feedback at Pohang Light Source (PLS) Heung-Sik Kang Pohang Accelerator Laboratory Pohang, Korea.
Beam dynamics in IDsBeam-based Diagnostics, USPAS, June 23-27, 2003, J. Safranek Linear optics from closed orbits (LOCO) Given linear optics (quad. gradients),
Beam dynamics in IDsBeam-based Diagnostics, USPAS, June 23-27, 2003, J. Safranek Beam dynamics in insertion devices m Closed orbit perturbation m Linear.
SPEAR3 Chicane, Accelerator Physics Update, February 10, 2005 Electron optics design review August 11, 2004 –“… no show stoppers. However, …” Additional.
July 22, 2005Modeling1 Modeling CESR-c D. Rubin. July 22, 2005Modeling2 Simulation Comparison of simulation results with measurements Simulated Dependence.
Henrik Loos High Level 17 June 2008 High Level Physics Applications for LCLS Commissioning Henrik Loos.
Accelerator Physics  Basic Formalism  Linear Accelerators  Circular Accelerators  Magnets  Beam Optics  Our Accelerator Greg LeBlanc Lead Accelerator.
1 BROOKHAVEN SCIENCE ASSOCIATES NSLS-II Stability Workshop April , 2007 NSLS-II Electrical Systems G. Ganetis NSLS-II Electrical Systems NSLS-II.
BROOKHAVEN SCIENCE ASSOCIATES Abstract Magnetic Specifications and Tolerances Weiming Guo, NSLS-II Project In this presentation I briefly introduced the.
Searching for Quantum LOVE at the Australian Synchrotron Light Source Eugene Tan On behalf of Rohan Dowd 120/10/2010Eugene Tan – IWLC 2010, Genega ASLS.
JCE A Java-based Commissioning Environment tool Hiroyuki Sako, JAEA Hiroshi Ikeda, Visible Information Center Inc. SAD Workshop.
Alignment and Beam Stability
ATF2 optics … 1 3 rd Mini-Workshop on Nano Project at ATF ATF2 optics, tuning method and tolerances of initial alignment, magnets, power supplies etc.
March 7, 2007 LET Issues (Cai/Kubo/Zisman) Global Design Effort 1 Low-Emittance Tuning Issues and Plans Yunhai Cai, Kiyoshi Kubo and Michael S. Zisman.
BROOKHAVEN SCIENCE ASSOCIATES High level applications and EPICS control GUOBAO SHEN NSLS-II, Control Group May 4 th, 2009.
Y. Ohnishi / KEK KEKB-LER for ILC Damping Ring Study Simulation of low emittance lattice includes machine errors and optics corrections. Y. Ohnishi / KEK.
Y. Ohnishi / KEK KEKB LER for ILC Damping Ring Study Lattice simulation of lattice errors and optics corrections. November 1, 2007 Y. Ohnishi / KEK.
Orbit Control For Diamond Light Source Ian Martin Joint Accelerator Workshop Rutherford Appleton Laboratory28 th -29 th April 2004.
Studies on Lattice Calibration With Frequency Analysis of Betatron Motion R. Bartolini DIAMOND Light Source Ltd FMA workshop, Orsay, LURE, 1 st and 2 nd.
Storage ring optics characterization – the basics
1 BROOKHAVEN SCIENCE ASSOCIATES Storage Ring Commissioning Samuel Krinsky-Accelerator Physics Group Leader NSLS-II ASAC Meeting October 14-15, 2010.
1 FFAG Role as Muon Accelerators Shinji Machida ASTeC/STFC/RAL 15 November, /machida/doc/othertalks/machida_ pdf/machida/doc/othertalks/machida_ pdf.
Michael Borland Advanced Photon Source Using SDDS for Accelerator Commissioning and Operation Michael Borland Operations Analysis Group Advanced Photon.
FMAP_Workshop - April 1, 2004 Frequency Map Calculation for the Advanced Light Source David Robin Advanced Light Source work done in collaboration with.
A U.S. Department of Energy Office of Science Laboratory Operated by The University of Chicago Office of Science U.S. Department of Energy Containing a.
SSRL/LCLS Users Meeting, October 2010 LOCO Overview; OMCM, CERN, June 20-22, 2011 LOCO, Linear Optics from Closed Orbits Optics Measurements, Corrections.
Bruno Muratori (for the EMMA team) STFC, Daresbury Laboratory EMMA commissioning 02/09/08.
Vertical Emittance Tuning at the Australian Synchrotron Light Source Rohan Dowd Presented by Eugene Tan.
Frequency Map Analysis Workshop 4/2/2004 Peter Kuske Refinements of the non-linear lattice model for the BESSY storage ring P. Kuske Linear Lattice My.
Analysis of Multipole and Position Tolerances for the ATF2 Final Focus Line James Jones ASTeC, Daresbury Laboratory.
28-May-2008Non-linear Beam Dynamics WS1 On Injection Beam Loss at the SPring-8 Storage Ring Masaru TAKAO & J. Schimizu, K. Soutome, and H. Tanaka JASRI.
1 BROOKHAVEN SCIENCE ASSOCIATES High Level Applications Infrastructure and Current Status Guobao Shen, Lingyun Yang* Controls Group & Accelerator Physics.
Determination of precise model of a storage ring using response matrix fit: Application to Advanced Photon Source and Tevatron V. Sajaev, ANL Tevatron.
1 BROOKHAVEN SCIENCE ASSOCIATES Power Supply Status George Ganetis Power Supply Status ASAC Review October 22-23, 2009.
DMS steering with BPM scale error - Trial of a New Optics - Kiyoshi Kubo
C. Steier, LowEmitRing Workshop 2011, Low Emittance Rings Workshop 2011 Heraklion, Crete, October 3, 2011 Non-linear dynamics optimization in.
4. Operations and Performance M. Lonza, D. Bulfone, V. Forchi’, G. Gaio, L. Pivetta, Sincrotrone Trieste, Trieste, Italy A Fast Orbit Feedback for the.
11/18/2004 FNAL Advanced Optics Measurements at Tevatron Vadim Sajaev ANL V. Lebedev, V. Nagaslaev, A. Valishev FNAL.
Control System Tools for Beam Commissioning Timo Korhonen Controls Division Chief Engineer April 8, 2014.
Ultra-low Emittance Coupling, method and results from the Australian Synchrotron Light Source Rohan Dowd Accelerator Physicist Australian Synchrotron.
Simulation for Lower emittance in ATF Damping Ring Kiyoshi Kubo Similar talk in DR WS in Frascati, May 2007 Most simulations were done several.
Damping rings, Linear Collider School Low vertical emittance tuning Yannis PAPAPHILIPPOU Accelerator and Beam Physics group Beams Department CERN.
Laurent S. Nadolski Synchrotron SOLEIL
LCLS Commissioning & Operations High Level Software
Weiming Guo Accelerator Physics Group / ASD Advanced Photon Source
Orbit Response Matrix Analysis
Sextupole calibrations via measurements of off-energy orbit response matrix and high order dispersion Nicola Carmignani.
Orbit Control For Diamond Light Source
Linear optics from closed orbits (LOCO)
Vertical Emittance at the Quantum Limit
Lecture A3: Damping Rings
Coupling Correction at the Australian Synchrotron
Commissioning the Fast Orbit Feedback System at SSRF
LCLS Commissioning & Operations High Level Software
Muon Acceleration in a Neutrino Factory
Startup program, 1 Machine setup (i.e. R:\Controls\matlab\acceleratorcontrol\docs\SRSetupUsingMatlab_ALS.doc) Bergoz BPM/orbit checks: monbpms, correct.
Beam-Based Alignment Results
The Proposed Conversion of CESR to an ILC Damping Ring Test Facility
Electron Rings Eduard Pozdeyev.
CLIC damping rings working plan towards the CDR
A Virtual Implementation of VELA (CLARA)
SPEAR3 Lower Emittance & Nonlinear Dynamics
Yuri Nosochkov Yunhai Cai, Fanglei Lin, Vasiliy Morozov
Fanglei Lin JLEIC R&D Meeting, August 4, 2016
DYNAMIC APERTURE OF JLEIC ELECTRON COLLIDER
Presentation transcript:

Advanced Light Source EPICS Meeting April 27, 2005 An Accelerator Control Middle Layer Using Matlab Greg Portmann, ALS/LBNL Jeff Corbett and Andrei Terebilo, SSRL/SLAC James SaFranek (SSRL), Christoph Steier and Dave Robin (ALS)

Advanced Light Source EPICS Meeting April 27, 2005 Automating Physics Experiments (without becoming a software engineer) Goal m Develop an easy scripting method to experiment with accelerators (accelerator independent)  Remove the control system details from the physicist (like channel names and how to connect to the computer control system)  Easy access to important data (offsets, gains, rolls, max/min, etc.) m Integrate simulation and online control. Make working on an accelerator more like simulation codes. m Integrate data taking and data analysis tools m Develop a software library of common tasks (orbit correction, tune correction, chromaticity, ID compensation, etc.) m Develop a high level control applications to automate the setup and control of a storage ring.

Advanced Light Source EPICS Meeting April 27, 2005 Why Matlab m Matrix programming language (variables default to a double precision matrix) m Extensive built-in math libraries m Active workspace for experimentation and algorithms development m Easy of import/export of data m Graphics m Compact code and good readability m Adequate GUI capabilities m Platform Independents

Advanced Light Source EPICS Meeting April 27, 2005 Matlab Toolbox Suite for Accelerator Physics m MiddleLayer + High Level Applications 1. Link between applications and control system or simulator. 2. Functions to access accelerator data. 3. Provide a physics function library. m MCA, LabCA, SCAIII – Matlab to EPICS links m AT – Accelerator Toolbox for simulations m LOCO – Linear Optics from Closed Orbits (Calibration)

Advanced Light Source EPICS Meeting April 27, 2005 Software Interconnection Diagram High Level Matlab Applications (scripts and functions) Matlab to EPICS (MCA, LabCA, SCAIII) Matlab Middle Layer Accelerator Toolbox (AT) (Model) Channel Access to Accelerator Hardware AT Server (Simulator)

Advanced Light Source EPICS Meeting April 27, 2005 Basic Calling Syntax Naming Convention Family = Group descriptor (text string) Field = Subgroup descriptor(text string) DeviceList = [Sector Element-in-Sector] Basic Functions getpv(Family, Field, DeviceList); setpv(Family, Field, Value, DeviceList); steppv(Family, Field, Value, DeviceList); Examples: x = getpv('BPMx', 'Monitor', [3 4;5 2]); h = getpv('HCM', 'Setpoint', [2 1;12 4]); setpv('QF', 'Setpoint', 81);

Advanced Light Source EPICS Meeting April 27, 2005 Families Bend magnets – BEND Quadrupoles – QF, QD, QFA, QDA Sextupoles – SF, SD Skew quadrupoles - SQSF, SQSD Correctors – HCM, VCM, VCBSC Beam position monitors – BPMx and BPMy Insertion devices – ID, EPU Other - RF, DCCT, TUNE, GeV Fields Setpoint, Monitor, RampRate, RunFlag, DAC, OnOff, Reset, Ready, Voltage, Power, Velocity, HallProbe, etc… ALS Naming Scheme

Advanced Light Source EPICS Meeting April 27, 2005 Function Library There are hundreds of functions for accelerator control m setorbit – general purpose global orbit correction function m setorbitbump – general purpose local bump function m settune – sets the storage ring tune m setchro – sets the storage ring chromaticity m measchro – measure the chromaticity m measdisp – measure the dispersion function m quadcenter, quadplot – finds the quadrupole center m physcis2hw – converts between physics and hardware units m measbpmresp – measure a BPM response matrix m measlifetime – computes the beam lifetime m minpv/maxpv – min/max value for family/field m srcycle – standardizes the storage ring magnets m scantune – scan in tune space and record the lifetime m scanaperture – scans the electron beam in the straight sections and monitors lifetime m finddispquad – finds the setpoint that minimizes the dispersion in the straight sections. m rmdisp – adjusts the RF frequency to remove the dispersion component of the orbit by fitting the orbit to the dispersion orbit m etc

Advanced Light Source EPICS Meeting April 27, 2005 Data Management m Beam Position Monitors  Channel names, gains, roll, crunch, offsets, golden, standard deviations m Magnets  Channel names, gains, offsets, roll, setpoint-monitor tolerance, amp-to-simulator conversions, hysteresis loops, max/min setpoint m Response matrices (Orbit, Tune, Chromaticity) m Lattices (Save and restore) m Measurement archiving  Dispersion, tunes, chromaticity, quadrupole centers, etc.

Advanced Light Source EPICS Meeting April 27, 2005 MiddleLayer Data Flow Diagram Accelerator Hardware AT Model Hardware Units (Usual Command Window Location) Calibrated Hardware Units Physics Units (Opt. Command Window Location) BPM and Corrector Coordinate Change raw2real real2raw hw2physics physics2hw getpvonline setpvonline getpvmodel setpvmodel BPM Gain (Units scaling) Correctors (amp2k, k2amp) Gain (amps to rad.) Energy Scaling Lattice Magnets (amp2k, k2amp) Gain (amp to K) Energy Scaling Hysteresis RealData = Gain*(RawData - Offset) BPM Gain (LOCO) Offset (BBA) Correctors Gain (LOCO) Lattice Magnets Gain (LOCO) BPM Roll, Crunch Correctors Roll Correction offset Lattice Magnets Correction offset All other known errors are already in the AT model. Data flow for getpv and setpv

Advanced Light Source EPICS Meeting April 27, 2005 High Level Applications m Magnet lattice save / restore / configuration control m Energy Ramping m Slow orbit feedback m Insertion device compensation m Quadrupole centering m Display (plotfamily) / Diagnostics m LOCO (Response matrix analysis)

Advanced Light Source EPICS Meeting April 27, 2005 plotfamily application

Advanced Light Source EPICS Meeting April 27, 2005 Scripting Example: Orbit Correction % Create an Orbit Error vcm =.5 * randn(70,1); % 70 vertical correctors at the ALS setsp('VCM', vcm); % Get the vertical orbit Y = getam('BPMy'); % Get the Vertical response matrix from the model Ry = getrespmat('BPMy', 'VCM'); % 120x70 matrix % Computes the SVD of the response matrix Ivec = 1:48; [U, S, V] = svd(Ry, 0); % Find the corrector changes use 48 singular values DeltaAmps = -V(:,Ivec) * S(Ivec,Ivec)^-1 * U(:,Ivec)' * Y; % Changes the corrector strengths stepsp('VCM', DeltaAmps);

Advanced Light Source EPICS Meeting April 27, 2005 Chromaticity Measurement

Advanced Light Source EPICS Meeting April 27, 2005 Beam-based alignment

Advanced Light Source EPICS Meeting April 27, 2005 AT – Accelerator Toolbox Andrei Terebilo MATLAB ® Toolbox for Particle Accelerator Modeling Accelerator Toolbox is a collection of tools to model particle accelerators and beam transport lines in MATLAB environment. It is being developed by Accelerator Physics Group at Stanford Synchrotron Radiation Laboratory for the ongoing design and future operation needs of SPEAR3 Synchrotron Light Source.Accelerator Physics Group Stanford Synchrotron Radiation LaboratorySPEAR3 What is Accelerator Toolbox New in AT version 1.2 Download and Installation Get Started Collaboration Publications AT Links www-ssrl.slac.stanford.edu/at/welcome.html

Advanced Light Source EPICS Meeting April 27, 2005 AT – Accelerator Toolbox

Advanced Light Source EPICS Meeting April 27, 2005 LOCO Optics Analysis m Calibrate/control optics using orbit response matrix m Determine quadrupole gradients m Correcte coupling m Calibrate BPM gains, steering magnets m Measure local chromaticity and transverse impedance New MATLAB version of code rewritten from FORTRAN linked to control system linked to AT simulator

Advanced Light Source EPICS Meeting April 27, 2005 Conclusion m Relatively easy to use. Most people start writing useful scripts in a few hours. m MiddleLayer + LOCO + AT + MCA/LabCA/SCAIII cover many of the high level software concerns for storage rings. Hence, not every accelerator has to spend resources coding the same algorithms. m Thousands of dedicated accelerator hours have been spent testing, improving, debugging, and exercising the Middle Layer software. m It’s a good scripting language for machine shifts or it can be the high level setup and control software for a storage ring. m Integration of the AT model is good for debugging software without using accelerator time. m 6 light sources are active MiddleLayer users -- ALS, Spear, BNL (vuv and x-ray ring), CLS, and PLS. Australian light source, DIAMOND, Soleil, Desy, and ALBA are experimenting with it (maybe more). m The semi-machine independence software has fostered collaboration and code sharing between the laboratories.