BROOKHAVEN SCIENCE ASSOCIATES High level applications and EPICS control GUOBAO SHEN NSLS-II, Control Group May 4 th, 2009.

Slides:



Advertisements
Similar presentations
Guobao Shen BNL Services Guobao Shen
Advertisements

V4 Status and Workshop Report CSS, DISCS, an V4 team.
Paul Chu FRIB Controls Group Leader (Acting) Service-Oriented Architecture for High-level Applications.
SNS Integrated Control System SNS RDB Requirements, wish list, status A little history l Oracle RDB used exclusively by accelerator physics group l JERI.
1 1999/Ph 514: Channel Access Concepts EPICS Channel Access Concepts Bob Dalesio LANL.
1 BROOKHAVEN SCIENCE ASSOCIATES EPICS V4 Support to Physics Application, Data Acquisition, and Data Analysis L. Dalesio, Gabriele Carcassi, Martin Richard.
0 BROOKHAVEN SCIENCE ASSOCIATES Middle Layer Services at NSLS II for Beam Commissioning and Operation Guobao Shen Controls Group, Photon Sciences Brookhaven.
PvData,pvAccess,pvIOC,pvService Status EPICS Meeting June 2011 NSRRC,Hsinchu, Taiwan Marty Kraimer, Guobao Shen, and Matej Sekoranja.
EPICS Architecture Version 3 Channel Access Client (CAC) Connection Data Transfers WAN/LAN/Local Connection Data Transfers Channel Access Server (CAS)
PCaPAC Satellite Workshop ~ High Level Applications Development and the Matlab Middlelayer ~ Sponsored by the Canadian Light Source Saskatoon, Canada October.
Current Status of MATLAB-based Accelerator Physics Application Programs for the TPS Commissioning and Operation at NSRRC Fan-Hsin Tseng ( 曾繁信 ) Beam Dynamics.
0 BROOKHAVEN SCIENCE ASSOCIATES NSLS II Physics Application and its Open Architecture Guobao Shen Controls Group, Photon Sciences Brookhaven National Laboratory.
Model Server for Physics Applications Paul Chu SLAC National Accelerator Laboratory October 15, 2010.
EPICS Meeting 2005ORNL Rdb systems at SNS Jeff Patton and cast April 27-29, 2005 EPICS Meeting 2005.
Advanced Light Source EPICS Meeting April 27, 2005 An Accelerator Control Middle Layer Using Matlab Greg Portmann, ALS/LBNL Jeff Corbett.
Pete Owens MICE Controls & Monitoring Workshop 25th September 2006 MICE Control and Monitoring: General Architecture Subsystem Integration User Interface.
Hamid Shoaee High Level Physics 20 April 2006 High Level Physics Applications Update on Plans, New Directions Fairley,
Patrick Krejcik LCLS June 16-18, 2008 High Level Applications Facility Advisory Committee Meeting June 17, 2008 Applications Team.
Diane Fairley High Level October 24-28, 2005 High Level Physics Applications LCLS Week / FAC October 24-28, 2005.
–Streamline / organize Improve readability of code Decrease code volume/line count Simplify mechanisms Improve maintainability & clarity Decrease development.
1 BROOKHAVEN SCIENCE ASSOCIATES Control System Overview Bob Dalesio, Control Group Leader 8 th ASAC meeting for NSLS-II Project May 10-11, 2011.
JCE A Java-based Commissioning Environment tool Hiroyuki Sako, JAEA Hiroshi Ikeda, Visible Information Center Inc. SAD Workshop.
1 BROOKHAVEN SCIENCE ASSOCIATES Commissioning Plans F. Willeke 9 th ASAC Meeting for NSLS-II Project February 1-2, 2012.
1 BROOKHAVEN SCIENCE ASSOCIATES Introspection Control System Group – Bob Dalesio presenting EPICS Meeting May 2, 2009.
Imperial College Tracker Slow Control & Monitoring.
1 BROOKHAVEN SCIENCE ASSOCIATES Control System Overview L. R. Dalesio EPICS Collaboration March 11, 2008.
This material is based upon work supported by the U.S. Department of Energy Office of Science under Cooperative Agreement DE-SC Michigan State.
1 BROOKHAVEN SCIENCE ASSOCIATES EPICS Core (and other development efforts) L. Dalesio. EPICS April 25, 2013.
1 BROOKHAVEN SCIENCE ASSOCIATES NSLSII Physics Applications – Applying V4 The Control Group – presented by Bob Dalesio Taiwan EPICS Meeting, June 2011.
IRMIS 2 Overview Andrew Johnson Computer Scientist, AES Controls.
A Preliminary design of BEPCII database system Database Group Computing Center of IHEP Aug/20/2002.
IRMIS Status EPICS 2009 Vancouver D. A. Dohan. Outline IRMIS hardware model cable/cable run channel list Equipment Inventory System RDB Domain separation.
10/20/2015J-PARC1 Control Room Accelerator Physics Channel Access – Connection to Hardware Through EPICS Getting Information directly from the Control.
MASAR Service Guobao Shen Photon Sciences Department Brookhaven National Laboratory EPICS Collaboration Workshop Oct 05, 2013.
1 Channel Access Concepts – EPICS Training – K.Furukawa – Mar EPICS Channel Access Concepts Kazuro Furukawa, KEK, ( ) (Bob Dalesio, LANL,
MASAR Server & Application Guobao Shen Photon Sciences Department Brookhaven National Laboratory Collaboration Working Group Oct 02, 2013.
Final Review of ITER PBS 45 CODAC – PART 1 – 14 th, 15 th and 16 th of January CadarachePage 1 FINAL DESIGN REVIEW OF ITER PBS 45 CODAC – PART 1.
IRMIS – Introduction - IRMIS collaboration meetings: APS,SNS, CLS, FNAL, TRIUMF, SLAC, DESY - accumulate participant facility data capture requirements.
1 BROOKHAVEN SCIENCE ASSOCIATES Control System Overview Bob Dalesio, Control Group HLA Review for NSLS-II Project April
1 BROOKHAVEN SCIENCE ASSOCIATES EPICS Version 4 – Development Plan V4 Team – presented by Bob Dalesio EPICS Meeting October 12, 2010.
1. LabVIEW and EPICS Workshop EPICS Collaboration Meeting Fall 2011.
Controls & Monitoring Overview J. Leaver 03/06/2009.
August 2003 At A Glance The IRC is a platform independent, extensible, and adaptive framework that provides robust, interactive, and distributed control.
1 Virtual Accelerator plan and status at RCS Hiroshima University, Graduate School of Science Experimental Quark Physics Lab ( & JAEA Accelerator Development.
Connecting LabVIEW to EPICS network
1 BROOKHAVEN SCIENCE ASSOCIATES High Level Applications Infrastructure and Current Status Guobao Shen, Lingyun Yang* Controls Group & Accelerator Physics.
“WISE” Simulation of optical imperfections in LHC P. Hagen AT/MCS Acknowledgements: Colleagues in AT/MAS, AT/MEL, AT/MTM, AB/ABP CERN, October 2006.
11 th February 2008Brian Martlew EPICS for MICE Status of the MICE slow control system Brian Martlew STFC, Daresbury Laboratory.
1 Channel Access Concepts – IHEP EPICS Training – K.F – Aug EPICS Channel Access Concepts Kazuro Furukawa, KEK (Bob Dalesio, LANL)
Features of JAS Plots Plots update in real time. Data for plots can be local or remote (use Java RMI to connect to JAS Data Server). Rich variety of styles.
1 BEAM COMMISSIONING SOFTWARE AND DATABASE FOR J-PARC LINAC Hiroyuki Sako G. Shen, H. Sakaki, H. Takahashi, H. Yoshikawa, JAEA H. Ikeda, VIC C. K. Allen,
TRIUMF HLA Development High Level Applications Perform tasks of accelerator and beam control at control- room level, directly interfacing with operators.
ICS WP3 – Software Core Components Suzanne Gysin Work Package Lead November 25, 2014.
This material is based upon work supported by the U.S. Department of Energy Office of Science under Cooperative Agreement DE-SC , the State of Michigan.
Software tools for digital LLRF system integration at CERN 04/11/2015 LLRF15, Software tools2 Andy Butterworth Tom Levens, Andrey Pashnin, Anthony Rey.
ORNL is managed by UT-Battelle for the US Department of Energy Status Report: Data Acquisition and Instrument Controls for the Spallation Neutron Source.
1 BROOKHAVEN SCIENCE ASSOCIATES EPICS Version 4 – Normative V4 Team – presented by Bob Dalesio EPICS Meeting October 7, 2011.
Control System Tools for Beam Commissioning Timo Korhonen Controls Division Chief Engineer April 8, 2014.
BEAM COMMISSIONING SOFTWARE AND DATABASE FOR J-PARC LINAC Hiroyuki Sako G. Shen, H. Sakaki, H. Takahashi, H. Yoshikawa, JAEA H. Ikeda, VIC C. K. Allen,
1 BROOKHAVEN SCIENCE ASSOCIATES EPICS Version 4 – Development Plan V4 Team – presented by Bob Dalesio EPICS Meeting October 7, 2011.
LCLS Commissioning & Operations High Level Software
Operations Machine Simulator.
Presented by Li Gang Accelerator Control Group
Orbit Response Matrix Analysis
Laboratorio per dottorandi 2017 Particle Accelerators Control System
LCLS Commissioning & Operations High Level Software
EPICS Version 4 Abstract:
A Virtual Implementation of VELA (CLARA)
Nominal Technologies for Modelling and High Level Applications of LCLS
Presentation transcript:

BROOKHAVEN SCIENCE ASSOCIATES High level applications and EPICS control GUOBAO SHEN NSLS-II, Control Group May 4 th, 2009

2 BROOKHAVEN SCIENCE ASSOCIATES Contents From device control to beam control HLA environments MMLT Python Model server

3 BROOKHAVEN SCIENCE ASSOCIATES From device control to beam control Goal Desired accelerator beam Accelerator device control Hardware subsystem control Magnet power supply, beam diagnostics,… Accelerator beam control Realized through device control

4 BROOKHAVEN SCIENCE ASSOCIATES Accelerator device control Displayer Controller Device Model Sensor Actuator Device From device control to beam control

5 BROOKHAVEN SCIENCE ASSOCIATES From device control to beam control Accelerator device control  Distributed and modular architecture EPICS based device control Flexible, extensible, reusable, pluggable Channel Access Client (CAC)‏ Connection Data Transfers Channel Access Protocol Connection Server Connection Data Transfers Channel Access Server (CAS)‏ DB Engine Device Support Driver Support I/O Controller Types Connection Data Transfers Channel Access Server (CAS)‏ DB Engine Device Support Driver Support I/O Controller Types

6 BROOKHAVEN SCIENCE ASSOCIATES Accelerator beam control Operator Interface High Level Applications Model based Control Beam Monitor Accelerator Device Beam From device control to beam control

7 BROOKHAVEN SCIENCE ASSOCIATES HLA environments What is a HLA environment? A software environment for beam commissioning & operation Physics applications, model based control Data archiving & analysis Machine status save & restore Machine real time status presentation Database related applications Available environments MMLT, SDDS, XAL, …

8 BROOKHAVEN SCIENCE ASSOCIATES HLA environments Desired features Scripting Online simulator Convenient low level access Channel Access supporting Plotting and Graphical User Interface Numerical libraries (Optional)‏

9 BROOKHAVEN SCIENCE ASSOCIATES HLA environments A modular environment proposed at NSLS-II Client-server model Loose coupling, Pluggable, Reusable EPICS based low level control system Distributed IOC Process Databases Channel Access Application / Family Middle Layer Client/Server Name Mapping Conversions DipoleQuadSext.Corr.BPMRF Orbit Differences Gradient Errs & Corrections Beam R. M. Diff’s Data Server Optics Deviations Optics Resp. Matrix (S)‏ Model Server Physics Applications (Thin Client)‏ EPICS Client/Server Physics Applications (Thick Client)‏ Measured Orbit Lattice Installations RDB

10 BROOKHAVEN SCIENCE ASSOCIATES HLA environments Communication protocol oriented architecture Thick HLA Client Measured Orbit Orbit Differences Gradient Errs & Corrections Beam R. M. Diff’s Data Server Optics Deviations Thin HLA Client Modularized HLA Srv Model Server TracyElegant API Name Mapping Conversions Lattice Installations RDB EPICS based low level control system Distributed IOC Process Databases DipoleQuadSext.Corr.BPMRF EPICS Client/Server Communication Protocol

11 BROOKHAVEN SCIENCE ASSOCIATES MMLT Matlab based HLA environment MMLT: Matlab Middle Layer Toolkit High Level Matlab Applications (scripts and functions)‏ Matlab to EPICS (MCA, LabCA, SCAIII)‏ Matlab Middle Layer Accelerator Toolbox (AT)‏ (Model)‏ Accelerator Hardware AT Server (Simulator)‏ Channel Access HLA

12 BROOKHAVEN SCIENCE ASSOCIATES MMLT MMLT is selected  Closer to our modular architecture  Rich available applications Used by many facilities for many years

13 BROOKHAVEN SCIENCE ASSOCIATES MMLT MMLT Enhancement  Multi-simulators support

14 BROOKHAVEN SCIENCE ASSOCIATES MMLT MMLT Enhancement  Directory structure ATTracyElegant NSLS2 MMLT ROOT ApplicationsEPICS CALinksMachineMML Tracy (*.so)‏ Elegant(*.so)‏AT S.R.S.R.

15 BROOKHAVEN SCIENCE ASSOCIATES MMLT Command to select model % use at simulator by default setpathnsls2 % use tracy simulator setpathnsls2 tracy % switch to online switch2online

16 BROOKHAVEN SCIENCE ASSOCIATES MMLT Display (plotfamily):  Beta plotting (b) against AT (a) against Tracy-3

17 BROOKHAVEN SCIENCE ASSOCIATES MMLT Scripting Example: Orbit Correction Refer to Greg Portmann’s example: “EPICS Meeting April 27, 2005” % Create an Orbit Error vcm =.0005 * randn(180,1); % 180 vertical correctors at the NSLS-II setsp('VCM', vcm); % Get the vertical orbit Y = getam('BPMy'); %plot vertical orbit figure;subplot(3,1,1);plot(Y); % Get the Vertical response matrix from the model Ry = getrespmat('BPMy', 'VCM'); % 180x180 matrix % Computes the SVD of the response matrix Ivec = 1:24; [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 setsp('VCM', DeltaAmps); %plot residual orbit after one orbit-correction iteration Y2 = getam('BPMy');subplot(3,1,2);plot(Y2); %plot different between residual orbit and original subplot(3,1,3); plot(Y-Y2,Y);

18 BROOKHAVEN SCIENCE ASSOCIATES MMLT Chromaticity measurement (a) against Tracy-3 (b) against AT

19 BROOKHAVEN SCIENCE ASSOCIATES MMLT Beam based alignment against AT against Tracy-3 X Y X Y

20 BROOKHAVEN SCIENCE ASSOCIATES Model server Online model server  Based on a so-called “virtual accelerator” Originally developed by SOLEIL and Diamond  Wrap into EPICS based  Integrate with the narrow API interface  Support Tracy-3 and Elegant  Use CA-V3 for the communication protocol Tracy/Elegant simulator (shared library)‏ Lattice configuration Distributed IOC Process Databases EPICS device support (API Interface)‏ EPICS Channel Access Lattice

21 BROOKHAVEN SCIENCE ASSOCIATES Real Machine Distributed IOC process databases DipoleQuadSext Corr BPMRF VIOC EPICS Client/Server Tracy Simulation Engine High level Low level MMLT XAL/Tracy Python/Tracy EPICS Client/Server DipoleQuadSext Corr BPM rf Elegant Simulation Engine DipoleQuadSext Corr BPM rf Model API VIOC EPICS Client/Server Model API AT Tracy Elegant EPICS Client/Server Model server HLA environments evaluated at NSLS-II

22 BROOKHAVEN SCIENCE ASSOCIATES Model server MMLT applications – orbit correction Against VIOC (using Tracy-3 simulator)‏ Including whole bare lattice of NSLS-II Errors for all elements: ±0.005% Kick beam: 1e-5 for 1 st H&V During correction (with 5 iterations)‏ After correction

23 BROOKHAVEN SCIENCE ASSOCIATES Python Why python? Good scripting language Good interface with other language Good math libraries Good GUI libraries Platform Independent Open source, free license

24 BROOKHAVEN SCIENCE ASSOCIATES Python #!/usr/bin/python2.5 # matplotlib is used for plotting "Virtual Accelerator Orbit Test" import sys from time import sleep from pylab import * # Use ca library from Diamond sys.path.append("./ca/build/lib")‏ from dca import * Scripting Example: Access simulation server via CA System library Channel access library

25 BROOKHAVEN SCIENCE ASSOCIATES Python betax = caget("SR:C00-Glb:G00 RB:X").dbr.value subplot(2,1,1)‏ plot(betax)‏ betay = caget("SR:C00-Glb:G00 RB:Y").dbr.value subplot(2,1,2)‏ plot(betay)‏ show()‏ Scripting Example: Access simulation server via CA Figure layout & plot Show on the displayer Channel Access caget()‏

26 BROOKHAVEN SCIENCE ASSOCIATES Python caput("SR:C01-MG:G02A Fld:SP", 1e-4)‏ sleep(1.0)‏ orbitx = caget("SR:C00-Glb:G00 RB:X").dbr.value subplot(2,1,1)‏ plot(orbitx)‏ orbity = caget("SR:C00-Glb:G00 RB:Y").dbr.value subplot(2,1,2)‏ plot(orbity)‏ caput("SR:C01-MG:G02A Fld:SP", 0)‏ show()‏ Scripting Example: Access simulation server via CA Figure layout & plot Show on the displayer Channel Access caget()‏ Channel Access: caput()‏

27 BROOKHAVEN SCIENCE ASSOCIATES Applications of IRMIS lattice database Using IRMIS for lattice management IRMIS IRMIS Data Service Layer Model Deck Generator TracyElegant Simulation Server (Tracy)‏ Simulation Server (Elegant)‏ IRMIS to Deck Object Mapping Deck Input Deck to IRMIS Object Mapping Deck Parser Tracy/Elegant Elegant Deck Tracy Deck

28 BROOKHAVEN SCIENCE ASSOCIATES Applications of IRMIS lattice database Lattice and other database IRMIS Lattice DB (Bare Lattice)‏ IRMIS Saving DB (EPICS PV Snapshot)‏ Mapping table Lattice Generating IRMIS Data Service Layer XML protocol IRMIS Installation DB (Engineering Error)‏ Mapping table