Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 BROOKHAVEN SCIENCE ASSOCIATES High Level Applications Infrastructure and Current Status Guobao Shen, Lingyun Yang* Controls Group & Accelerator Physics.

Similar presentations


Presentation on theme: "1 BROOKHAVEN SCIENCE ASSOCIATES High Level Applications Infrastructure and Current Status Guobao Shen, Lingyun Yang* Controls Group & Accelerator Physics."— Presentation transcript:

1 1 BROOKHAVEN SCIENCE ASSOCIATES High Level Applications Infrastructure and Current Status Guobao Shen, Lingyun Yang* Controls Group & Accelerator Physics Group ASAC October 14 th 2010

2 2 BROOKHAVEN SCIENCE ASSOCIATES Outline Software requirement overview Specifications of High level applications (HLA) HLA System infrastructure Applications/APIs Implementation and progress APIs for further applications Conclusions Acknowledgement: Accelerator Physics Group, Controls Group, Diagnostics & Instrumentation Group, Injection System. G. Portman(ALS), M. Borland, Marty Kraimer (APS)

3 3 BROOKHAVEN SCIENCE ASSOCIATES Requirement: Who, What and by When Controls + AP group, with support from other members when needed: diagnostics, RF, ID, network, database, … Requirement was defined in Common use cases for high level controls are listed. (J. Bengtsson etc. 2008) Assumptions and plan for commissioning defined the over all tasks for high level applications. (F. Willeke 2009, S. Krinsky 2010) These provide a full list of functionalities/features (concise). We focus on high level controls part (mainly physics related). Other discussions with experts from ALS/SLAC/APS ( EPICS meeting) Deadline is set for LINAC, Booster and Storage ring. All are summarized in a HLA user guide and API reference manual

4 4 BROOKHAVEN SCIENCE ASSOCIATES Control Software Requirement Overview of commissioning software General monitoring: orbit, magnet, RF, vacuum, temperature, alarm, logbook, … Orbit control and feedback Beam diagnostics: DCCT, size, emittance, … Other major subsystem: Safety, RF, Injection, … Accelerator physics toolkit : beam measurement, manipulation, lattice modeling, … HLA will be applications plus toolkit. Special applications for injection, first turn orbit AP tools with mature algorithm: BBA, LOCO Toolkit, APIs for scripting, easy to expand. (evolve to app later)

5 5 BROOKHAVEN SCIENCE ASSOCIATES Application Manual and Spec Requirements in references Defined in a “one line” form, very brief. Reorganize them as a complete and orthogonal set of functions. Application user guide and API ref manual Compile from references Examples and usage Algorithm description Data structure API definition and formalize Help doc will be available in control terminal. “Divide” work for AP and control group, keep the interface clear. Packaging and distribution

6 6 BROOKHAVEN SCIENCE ASSOCIATES HLA System Infrastructure

7 7 BROOKHAVEN SCIENCE ASSOCIATES HLA System Infrastructure Service provide data with a meaningful name: CH1YSP01 or CH1[0] instead of “SR:C01-MG:G03A.SP” In a meaningful manner: Synchronized reading of BPMs ? parameter scanned ? equilibrium data ? Integrated information : Log, archive, magnet measurement, … Maintenance is easier. Hardware is changed, removed, temporary disabled, … Port to another facility. “Chef and the customer: make sure the menu/order is placed correctly”

8 8 BROOKHAVEN SCIENCE ASSOCIATES Current Infrastructure Status Combining 2 services MySQL RDB Channel Finder Service Gather Service Channel Access v3 BPM Network Vacuum Power Supply PVAccess client Client API Library Orbit display SR:C04-MG:G06A Fld:SP, 97.61726 SR:C05-MG:G03A Fld:SP,117.0594 SR:C06-MG:G02B Fld:SP, 138.9133 Local bump

9 9 BROOKHAVEN SCIENCE ASSOCIATES Tools developed and to be provided MATLAB Middle Layer (LOCO included) New development Python language interactive environment, visualization, full set of numerical routines, scripting, glue FORTRAN and C/C++ easily, flexible ordering of parameter, … API set comparable to MATLAB Middle Layer User guide for HLA applications, example scripts Reference Manual for all APIs. Integrated data management magnet measurement, ID field, magnet relations.

10 10 BROOKHAVEN SCIENCE ASSOCIATES Tools developed and to be provided Virtual accelerator based on Tracy-II and EPICS. Application Programming Interface is defined. Version control system is established (used since June 2010) Applications: Beam based alignment is prototyped. Orbit correction: flexible data/bpm/corrector Linear lattice reconstruction (LOCO) Data flow and structure between services/clients is partially defined. Data management is in coding stage lattice layout, organization, dependence, measured data, history data, revision history. Backend modeling capabilities is planned, elegant/Tracy-II.

11 11 BROOKHAVEN SCIENCE ASSOCIATES About HLA and Python the Pseudo-script looks like … #!/usr/bin/env python import nsls2hla as sr import matplotlib.pylab as plt import numpy as np import time dat=np.zeros((180,5), ‘d’) for ik,k in enumerate(np.linspace(-0.5, 0.5, 5): sr.setKicker(“CH2G6C01A”, k) s, orbit1 = sr.getOrbit(group=“CELL30”) sr.step(“QH1”) s, orbit2 = sr.getOrbit(group=“CELL30”) dat[:, ik] = orbit2 – orbit1 plt.plot(np.linspace(-0.5, 0.5, 5), dat[4,:], ‘o’) plt.savefig(“orbit-var.png”)

12 12 BROOKHAVEN SCIENCE ASSOCIATES About HLA and Python Visualization …

13 13 BROOKHAVEN SCIENCE ASSOCIATES About HLA and Python Interactive …

14 14 BROOKHAVEN SCIENCE ASSOCIATES Expanding for Further Applications Collect physics algorithms: both general and NSLS-II specific Code and documentation: Be prepared for new requirements Terminology definition in a unified form, easy to read/understand. Manual and spec document under development Code development, functions or algorithms: For “getOrbit”, “getTune”, “measureChromaticity”, … Development policy First implement those functions with an algorithm we know Review on those implementations.

15 15 BROOKHAVEN SCIENCE ASSOCIATES Conclusions HLA manual and spec are developed Initial revision of user guide and APIs are finished Work (coding, document) divided between AP and controls are clear. Infrastructure to support HLA development Coding/testing environment is set up. Some physics routines are prototyped and demoed. Basic services are ready, e.g. orbit, current. Working on more services: Lattice management, Magnetic-Current conversion, logscore, … Plan on tools development are clear, design stage is almost done, and the rest are mainly coding and parameter tuning


Download ppt "1 BROOKHAVEN SCIENCE ASSOCIATES High Level Applications Infrastructure and Current Status Guobao Shen, Lingyun Yang* Controls Group & Accelerator Physics."

Similar presentations


Ads by Google