Download presentation
Presentation is loading. Please wait.
Published bySara O’Brien’ Modified over 8 years ago
1
Clara Gaspar, May 2010 SMI++ A Tool for the Automation of large distributed control systems
2
Clara Gaspar, May 2010 2 Outline ❚ Some requirements of large control systems ❚ SMI++ ❙ Methodology ❙ Tools ❚ Example: Usage in LHC experiments ❚ Some important features ❚ Conclusions
3
Clara Gaspar, May 2010 3 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
4
Clara Gaspar, May 2010 4 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)
5
Clara Gaspar, May 2010 5 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
6
Clara Gaspar, May 2010 6 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
7
Clara Gaspar, May 2010 7 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.
8
Clara Gaspar, May 2010 8 SML example ❚ Device: ❚ Sub System:
9
Clara Gaspar, May 2010 9 SML example (many objs) ❚ Devices: ❚ Sub System: ❚ Objects can be dynamically included/excluded in a Set
10
Clara Gaspar, May 2010 10 SML example (automation) ❚ External Device: ❚ Sub System: ❚ Objects in different domains can be addressed by: ::
11
Clara Gaspar, May 2010 11 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
12
Clara Gaspar, May 2010 12 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
13
Clara Gaspar, May 2010 13 ❚ 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
14
Clara Gaspar, May 2010 14 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
15
Clara Gaspar, May 2010 15 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
16
Clara Gaspar, May 2010 16 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
17
Clara Gaspar, May 2010 17 PVSS/SMI++ Integration ❚ Graphical Configuration of SMI++ Using PVSS ➨ Easy to learn SML
18
Clara Gaspar, May 2010 18 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
19
Clara Gaspar, May 2010 19 PVSS/SMI++ Integration ❚ Dynamically generated operation panels (Uniform look and feel) ❚ Configurable User Panels and Logos ❚ “Embedded” standard partitioning rules: ❙ Take ❙ Include ❙ Exclude ❙ Etc.
20
Clara Gaspar, May 2010 20 “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
21
Clara Gaspar, May 2010 21 ❚ 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
22
Clara Gaspar, May 2010 22 Domain X Sub-Detector Run Control ❚ Matrix ❚ Activity ❚ SMI++ Used for Configuring all Sub-Systems Accepts command parameters
23
Clara Gaspar, May 2010 23 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
24
Clara Gaspar, May 2010 24 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
25
Clara Gaspar, May 2010 25 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)
26
Clara Gaspar, May 2010 26 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
27
Clara Gaspar, May 2010 27 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…
28
Clara Gaspar, May 2010 28 Spare slides
29
Clara Gaspar, May 2010 29 SMI++ Declarations ❚ Classes, Objects and ObjectSets ❚ class: [/associated] ❙ ❘ 〡 ❙ … ❚ object: is_of_class ❚ objectset: [{obj1, obj2, …, objn}]
30
Clara Gaspar, May 2010 30 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
31
Clara Gaspar, May 2010 31 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
32
Clara Gaspar, May 2010 32 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
33
Clara Gaspar, May 2010 33 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 )
34
Clara Gaspar, May 2010 34 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
35
Clara Gaspar, May 2010 35 SMI++ Instructions ❚ ❙ ❘ insert in ❘ remove from ❙ ❘ set = ❘ set =. ❘ set =
36
Clara Gaspar, May 2010 36 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
37
Clara Gaspar, May 2010 37 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
38
Clara Gaspar, May 2010 38 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
39
Clara Gaspar, May 2010 39 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
40
Clara Gaspar, May 2010 40 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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.