Clara Gaspar, May 2010 SMI++ A Tool for the Automation of large distributed control systems.

Slides:



Advertisements
Similar presentations
Clara Gaspar, April 2012 The LHCb Experiment Control System: Automation concepts & tools.
Advertisements

The Detector Control System – FERO related issues
The Control System for the ATLAS Pixel Detector
March 24-28, 2003Computing for High-Energy Physics Configuration Database for BaBar On-line Rainer Bartoldus, Gregory Dubois-Felsmann, Yury Kolomensky,
Experiment Control Systems at the LHC An Overview of the System Architecture An Overview of the System Architecture JCOP Framework Overview JCOP Framework.
André Augustinus ALICE Detector Control System  ALICE DCS is responsible for safe, stable and efficient operation of the experiment  Central monitoring.
CHEP 2012 – New York City 1.  LHC Delivers bunch crossing at 40MHz  LHCb reduces the rate with a two level trigger system: ◦ First Level (L0) – Hardware.
Clara Gaspar, May 2010 The LHCb Run Control System An Integrated and Homogeneous Control System.
L. Granado Cardoso, F. Varela, N. Neufeld, C. Gaspar, C. Haen, CERN, Geneva, Switzerland D. Galli, INFN, Bologna, Italy ICALEPCS, October 2011.
1 CALO DCS power supply status CALO meeting Anatoli Konoplyannikov [ITEP / LAPP] Outline  Introduction  Power supply description with hardware.
Clara Gaspar, March 2006 LHCb’s Experiment Control System Step by Step.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
First attempt of ECS training Work in progress… A lot of material was borrowed! Thanks!
Calo Piquet Training Session - Xvc1 ECS Overview Piquet Training Session Cuvée 2012 Xavier Vilasis.
Using PVSS for the control of the LHCb TELL1 detector emulator (OPG) P. Petrova, M. Laverne, M. Muecke, G. Haefeli, J. Christiansen CERN European Organization.
Designing a HEP Experiment Control System, Lessons to be Learned From 10 Years Evolution and Operation of the DELPHI Experiment. André Augustinus 8 February.
09/11/20061 Detector Control Systems A software implementation: Cern Framework + PVSS Niccolo’ Moggi and Stefano Zucchelli University and INFN Bologna.
MDT PS DCS for ATLAS Eleni Mountricha
JCOP Workshop September 8th 1999 H.J.Burckhart 1 ATLAS DCS Organization of Detector and Controls Architecture Connection to DAQ Front-end System Practical.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
Clara Gaspar, October 2011 The LHCb Experiment Control System: On the path to full automation.
June 14, 2005 Alice DCS workshop, Utrecht S.Popescu Guidelines and conventions for ALICE PVSSII control software Graphical User Interface Naming and Numbering.
XXVI Workshop on Recent Developments in High Energy Physics and Cosmology Theodoros Argyropoulos NTUA DCS group Ancient Olympia 2008 ATLAS Cathode Strip.
The Joint COntrols Project Framework Manuel Gonzalez Berges on behalf of the JCOP FW Team.
André Augustinus 10 September 2001 DCS Architecture Issues Food for thoughts and discussion.
D etector C ontrol S ystem ALICE DCS workshop G. De Cataldo CERN-CH, A. Franco INFN Bari, I 1 Finite State Machines (FSM) for the ALICE DCS:
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
André Augustinus 10 October 2005 ALICE Detector Control Status Report A. Augustinus, P. Chochula, G. De Cataldo, L. Jirdén, S. Popescu the DCS team, ALICE.
Control in ATLAS TDAQ Dietrich Liko on behalf of the ATLAS TDAQ Group.
ALICE, ATLAS, CMS & LHCb joint workshop on
Controls EN-ICE Finite States Machines An introduction Marco Boccioli FSM model(s) of detector control 26 th April 2011.
Clara Gaspar, March 2005 LHCb Online & the Conditions DB.
JCOP Review, March 2003 D.R.Myers, IT-CO1 JCOP Review 2003 Architecture.
Bruno Belbute, October 2006 Presentation Rehearsal for the Follow-up meeting of the Protocol between AdI and CERN.
Overview of DAQ at CERN experiments E.Radicioni, INFN MICE Daq and Controls Workshop.
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
Controls EN-ICE FSM for dummies (…w/ all my respects) 15 th Jan 09.
August 2003 At A Glance The IRC is a platform independent, extensible, and adaptive framework that provides robust, interactive, and distributed control.
Management of the LHCb Online Network Based on SCADA System Guoming Liu * †, Niko Neufeld † * University of Ferrara, Italy † CERN, Geneva, Switzerland.
DCS overview - L.Jirdén1 ALICE ECS/DCS – project overview strategy and status L.Jirden u Organization u DCS system overview u Implementation.
Configuration database status report Eric van Herwijnen September 29 th 2004 work done by: Lana Abadie Felix Schmidt-Eisenlohr.
ProShell Procedure Framework Status MedAustron Control System Week 2 October 7 th, 2010 Roland Moser PR a-RMO, October 7 th, 2010 Roland Moser 1.
SPI NIGHTLIES Alex Hodgkins. SPI nightlies  Build and test various software projects each night  Provide a nightlies summary page that displays all.
Clara Gaspar, April 2006 LHCb Experiment Control System Scope, Status & Worries.
LHCb Configuration Database Lana Abadie, PhD student (CERN & University of Pierre et Marie Curie (Paris VI), LIP6.
SMI 7 May 2008B. Franek SMI++ Framework Knowledge Exchange seminar 1 SMI++ Object-Oriented Framework for Designing and Implementing Distributed Control.
TM & DVS status 29/10/2004. TM requirements (June 98) UR TMGR-1: TM shall have the ability to execute individual tests. UR TMGR-2: TM shall run on all.
The DCS Databases Peter Chochula. 31/05/2005Peter Chochula 2 Outline PVSS basics (boring topic but useful if one wants to understand the DCS data flow)
Clara Gaspar, March 2003 Hierarchical Control Demo: Partitioning, Automation and Error Recovery in the (Detector) Control System of LHC Experiments.
S.Sergeev (JINR). Tracker consists of  4 stations of 4 views (planes) each In total ~7200 drift tubes (~450 per view) To be controlled/monitored 
DCS Meeting - 17/6/2002 G. De Cataldo, A.Franco - INFN Bari - 1 The implementation of the HMPID DCS in the PVSS-JCOP Framework The Liquid Circulation and.
André Augustinus 18 March 2002 ALICE Detector Controls Requirements.
JCOP Framework and PVSS News ALICE DCS Workshop 14 th March, 2006 Piotr Golonka CERN IT/CO-BE Outline PVSS status Framework: Current status and future.
M. Caprini IFIN-HH Bucharest DAQ Control and Monitoring - A Software Component Model.
Clara Gaspar, February 2010 DIM A Portable, Light Weight Package for Information Publishing, Data Transfer and Inter-process Communication.
20OCT2009Calo Piquet Training Session - Xvc1 ECS Overview Piquet Training Session Cuvée 2009 Xavier Vilasis.
B. Franek, poster presented at Computing in High Energy and Nuclear Physics, Praha – Czech Republic, 21 – 27 March 2009 This framework provides: -A method.
Clara Gaspar, March 2013 Thanks to: Franco Carena, Vasco Chibante Barroso, Giovanna Lehmann Miotto, Hannes Sakulin and Andrea Petrucci for their input.
PVSS an industrial tool for slow control
The Finite State Machine toolkit of the JCOP Framework
ATLAS MDT HV – LV Detector Control System (DCS)
CMS – The Detector Control System
Controlling a large CPU farm using industrial tools
WinCC-OA Upgrades in LHCb.
The LHCb Run Control System
New FSM v24r1.
Philippe Vannerem CERN / EP ICALEPCS - Oct03
Experiment Control System
Tools for the Automation of large distributed control systems
Presentation transcript:

Clara Gaspar, May 2010 SMI++ A Tool for the Automation of large distributed control systems

Clara Gaspar, May Outline ❚ Some requirements of large control systems ❚ SMI++ ❙ Methodology ❙ Tools ❚ Example: Usage in LHC experiments ❚ Some important features ❚ Conclusions

Clara Gaspar, May Some Requirements ❚ Large number of devices/IO channels ➨ Need for Distributed Hierarchical Control ❘ De-composition in Systems, sub-systems, …, Devices ❘ Local decision capabilities in sub-systems ❚ Large number of independent teams and very different operation modes ➨ Need for Partitioning Capabilities (concurrent usage) ❚ High Complexity & Non-expert Operators ➨ Need for Full Automation of: ❘ Standard Procedures ❘ Error Recovery Procedures ➨ And for Intuitive User Interfaces

Clara Gaspar, May SMI++ ❚ Method ❙ Classes and Objects ❘ Allow the decomposition of a complex system into smaller manageable entities ❙ Finite State Machines ❘ Allow the modeling of the behavior of each entity and of the interaction between entities in terms of STATES and ACTIONS ❙ Rule-based reasoning ❘ React to asynchronous events (allow Automation and Error Recovery)

Clara Gaspar, May SMI++ ❚ Method (Cont.) ❙ SMI++ Objects can be: ❘ Abstract (e.g. a Run or the DCS System) ❘ Concrete (e.g. a power supply or a temp. sensor) ❙ Concrete objects are implemented externally either in "C", C++, or PVSS ❙ Logically related objects can be grouped inside "SMI domains" representing a given sub-system

Clara Gaspar, May SMI++ Run-time Environment Proxy Hardware Devices Obj SMI Domain Obj SMI Domain ❙ Device Level: Proxies ❘ C, C++, PVSS ctrl scripts ❘ drive the hardware: 〡 deduceState 〡 handleCommands ❙ Abstract Levels: Domains ❘ Internal objects ❘ Implement the logical model ❘ Dedicated language ❙ User Interfaces ❘ For User Interaction

Clara Gaspar, May SMI++ - The Language ❙ SML –State Management Language ❘ Finite State Logic 〡 Objects are described as FSMs their main attribute is a STATE ❘ Parallelism 〡 Actions can be sent in parallel to several objects. ❘ Synchronization and Sequencing 〡 The user can also wait until actions finish before sending the next one. ❘ Asynchronous Rules 〡 Actions can be triggered by logical conditions on the state of other objects.

Clara Gaspar, May SML example ❚ Device: ❚ Sub System:

Clara Gaspar, May SML example (many objs) ❚ Devices: ❚ Sub System: ❚ Objects can be dynamically included/excluded in a Set

Clara Gaspar, May SML example (automation) ❚ External Device: ❚ Sub System: ❚ Objects in different domains can be addressed by: ::

Clara Gaspar, May SMI++ Run-time Tools Proxy Hardware Devices Obj SMI Domain Obj SMI Domain ❙ Device Level: Proxies ❘ C, C++, PVSS ctrl scripts ❘ Use a Run Time Library: smirtl To Communicate with their domain ❙ Abstract Levels: Domains ❘ A C++ engine: smiSM - reads the translated SML code and instantiates the objects ❙ User Interfaces ❘ Use a Run Time Library: smiuirtl To communicate with the domains ❙ All Tools available on: ❘ Windows, Unix (Linux), etc. ❙ All Communications are dynamically (re)established

Clara Gaspar, May SMI++ History ❙ A top level domain: Big-Brother automatically piloted the experiment ❚ 1997: Rewritten in C++ ❚ 1999: Used by BaBar for the Run-Control and high level automation (above EPICS) ❚ 2002: Integration with PVSS for use by the 4 LHC exp. ❚ 1989: First implemented for DELPHI in ADA Thanks to M. Jonker and B. Franek in Delphi and the CERN DD/OC group (S. Vascotto, P. Vande Vyvre et al.) ❙ DELPHI used it in all domains: DAQ, DCS, Trigger, etc. ➨ Has become a very powerful, time-tested, robust, toolkit

Clara Gaspar, May ❚ The JCOP Framework is based on: ❙ SCADA System - PVSSII for: ❘ Device Description (Run-time Database) ❘ Device Access (OPC, Profibus, drivers) + DIM ❘ Alarm Handling (Generation, Filtering, Masking, etc) ❘ Archiving, Logging, Scripting, Trending ❘ User Interface Builder ❘ Alarm Display, Access Control, etc. ❙ SMI++ providing: ❘ Abstract behavior modeling (Finite State Machines) ❘ Automation & Error Recovery (Rule based system) LHC Exp.: Framework Device Units Control Units

Clara Gaspar, May Ex: Generic LHC(b) Architecture LV Dev1 LV Dev2 LV DevN DCS SubDetN DCS SubDet2 DCS SubDet1 DCS SubDet1 LV SubDet1 TEMP SubDet1 GAS … … Commands Control Unit Device Unit DAQ SubDetN DAQ SubDet2 DAQ SubDet1 DAQ SubDet1 FEE SubDet1 RO FEE Dev1 FEE Dev2 FEE DevN … … Legend: INFR.TFCLHC ECS HLT Status & Alarms

Clara Gaspar, May Device Units ❚ Provide access to “real” devices: ❙ The Framework provides (among others): ❘ “Plug and play” modules for commonly used equipment. For example: 〡 CAEN or Wiener power supplies (via OPC) 〡 LHCb CCPC and SPECS based electronics (via DIM) ❘ A protocol (DIM) for interfacing “home made” devices. For example: 〡 Hardware devices like a calibration source 〡 Software devices like the Trigger processes (based on LHCb’s offline framework – GAUDI) ❘ Each device is modeled as a Finite State Machine ➨ Corresponds to an SMI++ Proxy Device Unit

Clara Gaspar, May Hierarchical control ❚ Each Control Unit: ❙ Is defined as one or more Finite State Machines ➨ Corresponds to an SMI++ Domain ❙ Can implement rules based on its children’s states ❙ In general it is able to: ❘ Summarize information (for the above levels) ❘ “Expand” actions (to the lower levels) ❘ Implement specific behaviour & Take local decisions 〡 Sequence & Automate operations 〡 Recover errors ❘ Include/Exclude children (i.e. partitioning) 〡 Excluded nodes can run is stand-alone ❘ User Interfacing 〡 Present information and receive commands DCS Muon DCS Tracker DCS … Muon LV Muon GAS Control Unit

Clara Gaspar, May PVSS/SMI++ Integration ❚ Graphical Configuration of SMI++ Using PVSS ➨ Easy to learn SML

Clara Gaspar, May PVSS/SMI++ Integration ❚ Building Hierarchies ❙ Distributed over several machines ❘ "&" means reference to a CU in another system ❙ Editor Mode: ❘ Add / Remove / Change Settings ❙ Navigator Mode ❘ Start / Stop / View

Clara Gaspar, May PVSS/SMI++ Integration ❚ Dynamically generated operation panels (Uniform look and feel) ❚ Configurable User Panels and Logos ❚ “Embedded” standard partitioning rules: ❙ Take ❙ Include ❙ Exclude ❙ Etc.

Clara Gaspar, May “raw” SMI++ vs JCOP FW ❚ SMI++ is a very powerful tool ❙ Its usage needs some training and experience ❘ Learn the Language and the tools ❘ Need to develop software using the libraries 〡 To interface devices and to build User Interfaces ❘ Define rules and guidelines for developers ❚ While if using the JCOP FW: ❘ No need for software development ❘ Graphic editing of the objects and their behaviour ❘ All objects “inherit” the partitioning rules ❘ JCOP provides training courses

Clara Gaspar, May ❚ Size of the Control Tree: ❙ Distributed over ~150 PCs ❘ ~100 Linux (50 for the HLT) ❘ ~ 50 Windows ❙ >2000 Control Units ❙ >30000 Device Units ❚ The Run Control can be seen as: ❙ The Root node of the tree ➨ If the tree is partitioned there can be several Run Controls. LHCb Example: Run Control DCS SubDetN DCS SubDet1 DCS … DAQ SubDetN DAQ SubDet1 DAQ … HVTFCLHCHLT SubDet1 ECS X X

Clara Gaspar, May Domain X Sub-Detector Run Control ❚ Matrix ❚ Activity ❚ SMI++ Used for Configuring all Sub-Systems Accepts command parameters

Clara Gaspar, May Features of SMI++ ❚ Task Separation: ❙ SMI Proxies execute only basic actions – Minimal intelligence ❘ Good practice: Proxies know “what” to do but not “when” ❙ SMI Objects implement the logic behaviour ❙ Advantages: ❘ Change the HW -> change only the Proxy ❘ Change logic behaviour sequencing and dependency of actions, etc -> change only SMI rules

Clara Gaspar, May Features of SMI++ ❚ Sub-system integration ❚ SMI++ allows the integration of components at various different levels: ❙ Device level (SMI++ All the way to the bottom) ❘ Each Device is modeled by a Proxy ❙ Any other higher level (simple SMI++ interface) ❘ A full Sub-system can be modeled by a Proxy ❘ Examples: 〡 The Gas Systems (or the LHC) for the LHC experiments 〡 Slow Control Sub-systems (EPICS) in BaBar

Clara Gaspar, May Features of SMI++ ❚ Distribution and Robustness: ❙ SMI Proxies and SMI domains can run distributed over a large number of heterogeneous machines ❙ If any process dies/crashes/hangs: ❘ Its “/dead_state” is propagated as current state ❙ When a process restarts (even on a different machine) ❘ All connections are dynamically re-established ❘ Proxies should re-calculate their states ❘ SMI Objects will start in “/initial_state” and can recover their current state (if rules are correct)

Clara Gaspar, May Features of SMI++ ❚ Error Recovery Mechanism ❙ Bottom Up ❘ SMI Objects react to changes of their children 〡 In an event-driven, asynchronous, fashion ❙ Distributed ❘ Each Sub-System can recover its errors 〡 Normally each team knows how to recover local errors ❙ Hierarchical/Parallel recovery ❙ Can provide complete automation even for very large systems

Clara Gaspar, May Conclusions ❚ SMI++ is: ❙ A well tested, and very robust tool ❙ Not only a Finite State Machine toolkit ❙ But has also “Expert System” capabilities ❘ Advantage: Decentralized and distributed knowledge base ❙ Using the JCOP FW instead of directly SMI++ has many advantages…

Clara Gaspar, May Spare slides

Clara Gaspar, May SMI++ Declarations ❚ Classes, Objects and ObjectSets ❚ class: [/associated] ❙ ❘ 〡 ❙ … ❚ object: is_of_class ❚ objectset: [{obj1, obj2, …, objn}]

Clara Gaspar, May SMI++ Parameters ❚ ❙ SMI Objects can have parameters, ex: ❘ int n_events, string error_type ❙ Possible types: ❘ int, float, string ❙ For concrete objects ❘ Parameters are set by the proxy (they are passed to the SMI domain with the state) ❙ Parameters are a convenient way to pass extra information up in the hierarchy

Clara Gaspar, May SMI++ States ❚ state: [/ ] ❙ ❘ /initial_state For abstract objects only, the state the object takes when it first starts up ❘ /dead_state For associated objects only, the state the object takes when the proxy or the external domain is not running

Clara Gaspar, May SMI++ Whens ❚ ❙ Set of conditions that will trigger an object transition. "when"s are executed in the order they are declared (if one fires, the others will not be executed). ❙ state: ❘ when ( ) do ❘ when ( ) move_to

Clara Gaspar, May SMI++ Conditions ❚ ❙ Evaluate the states of objects or objectsets ❘ ( [not_]in_state ) ❘ ( [not_]in_state {,, …}) ❘ (all_in [not_]in_state ) ❘ (all_in [not_]in_state {,, …}) ❘ (any_in [not_]in_state ) ❘ (any_in [not_]in_state {,, …}) ❘ ( and|or )

Clara Gaspar, May SMI++ Actions ❚ action: [(parameters)] ❙ If an object receives an undeclared action (in the current state) the action is ignored. ❙ Actions can accept parameters, ex: ❘ action: START_RUN (string run_type, int run_nr) ❙ Parameter types: ❘ int, float and string ❙ If the object is a concrete object ❘ The parameters are sent to the proxy with the action ❙ Action Parameters are a convenient way to send extra information down the hierarchy

Clara Gaspar, May SMI++ Instructions ❚ ❙ ❘ insert in ❘ remove from ❙ ❘ set = ❘ set =. ❘ set =

Clara Gaspar, May SMI++ Instructions ❚ Instruction ❙ Sends a command to an object. ❙ Do is non-blocking, several consecutive "do"s will proceed in parallel. ❘ do [( )] ❘ do [( )] all_in ❘ examples: 〡 do START_RUN (run_type = "PHYSICS", run_nr = 123) X 〡 action: START (string type) ❘ do START_RUN (run_type = type) EVT_BUILDER

Clara Gaspar, May SMI++ Instructions ❚ Instruction ❙ "if"s can be blocking if the objects involved in the condition are "transiting". The condition will be evaluated when all objects reach a stable state. ❘ if then 〡 ❘ else 〡 ❘ endif

Clara Gaspar, May SMI++ Instructions ❚ Instruction ❙ "move_to" terminates an action or a when statement. It sends the object directly to the specified state. ❘ action: 〡 … 〡 move_to ❘ when ( ) move_to

Clara Gaspar, May Future Developments ❚ SML Language ❙ Parameter Arithmetics ❘ set = + 2 ❘ if ( == 5) ❙ wait(<obj_list) ❙ for instruction ❘ for (dev in DEVICES) 〡 if (dev in_state ERROR) then ❘ do RESET dev 〡 endif ❘ endfor

Clara Gaspar, May SML – The Language ❚ An SML file corresponds to an SMI Domain. This file describes: ❙ The objects contained in the domain ❙ For Abstract objects: ❘ The states & actions of each ❘ The detailed description of the logic behaviour of the object ❙ For Concrete or External (Associated) objects ❘ The declaration of states & actions