Presentation is loading. Please wait.

Presentation is loading. Please wait.

AFECS Multi-Agent Framework for Experiment Control Systems

Similar presentations


Presentation on theme: "AFECS Multi-Agent Framework for Experiment Control Systems"— Presentation transcript:

1 AFECS Multi-Agent Framework for Experiment Control Systems
V. Gyurjyan, JLAB DAQ Group 4/6/2019 JLAB Computing Seminar

2 JLAB Computing Seminar
4/6/2019 JLAB Computing Seminar

3 JLAB Computing Seminar
Outline Service Oriented Architecture (SOA) Agent technologies Ontology languages Resource Description Framework (RDF) AFECS 4/6/2019 JLAB Computing Seminar

4 JLAB Computing Seminar
SOA Style of building reliable systems that deliver functionality as services Loose coupling between interacting services 4/6/2019 JLAB Computing Seminar

5 JLAB Computing Seminar
Service Atomic unit of an SOA. Encapsulates logic, data, or process. Autonomous Location Transparency It is defined by the messages it can accept and the responses it can give. Messages can be one-way, synchronous or asynchronous. They can be integrated to provide higher-level services It can be completely self-contained, or it may depend on the availability of other services or other resources. 4/6/2019 JLAB Computing Seminar

6 JLAB Computing Seminar
Service interaction Service Registry Discover Advertise Service Consumer Service Provider Interact 4/6/2019 JLAB Computing Seminar

7 JLAB Computing Seminar
Loose Coupling Flexibility Scalability Replaceability Fault tolerance Service Registry Discover Advertise Service Provider Consumer 1 Data storage 2 Service Provider 3 Service Provider Services are stateless 4/6/2019 JLAB Computing Seminar

8 SOA is for distributed computing
SOA design can be used for a single system - individual processes as services - communication through well defined interfaces using local channels or high-speed interconnect. 4/6/2019 JLAB Computing Seminar

9 JLAB Computing Seminar
SO vs. OO OO advocates tight coupling, i.e. users have static knowledge of the object. SOA promotes the design of the system in which it is not necessary that requests and responses are handled by the same set of communicating entities. Service has an internal thread of control. sayHelloWorld Say hello world. “Hello World” OO SO 4/6/2019 JLAB Computing Seminar

10 JLAB Computing Seminar
What is an agent? SOA service and much more... „one that acts or has the power or authority to act... or represent another..“ American Heritage Dictionary. 4/6/2019 JLAB Computing Seminar

11 JLAB Computing Seminar
An agent is 4/6/2019 JLAB Computing Seminar

12 Internal and External Environment of an Agent
Balance External Environment: user, other agents, applications, information sources, their relationships, platforms, servers, networks, etc. Internal Environment: architecture, goals, abilities, sensors, effectors, profile, knowledge, etc. 4/6/2019 JLAB Computing Seminar

13 JLAB Computing Seminar
What does it mean? Intelligent Agent is an entity that is able to keep continuous balance between its internal and external environments (it has at least one goal) in such a way that in the case of imbalance agent can: change external environment to be in balance with the internal one (creative) change internal environment to be in balance with the external one (adaptive) find out and move to another place within the external environment where balance occurs without any changes (mobile) closely communicate with one or more other agents to be able to create a community, which internal environment will be able to be in balance with the external one (social) 4/6/2019 JLAB Computing Seminar

14 JLAB Computing Seminar
An agent is also Learning Trustworthy: an agent will not knowingly provide false information to its user Benevolent: agents do not have conflicting goals, therefore every agent will always try to do what it is asked for Rational: agents act in order to achieve their goals and will not act in such a way such as to prevent their goals being achieved 4/6/2019 JLAB Computing Seminar

15 Benefits of the agents systems
Take advantage of distributed computing resources To coordinate teams of interacting components (each component has physically separate processor and is capable of acting independently) To increase system robustness To simplify modeling of complex processes M. Minsky, The Society of Mind “Human mind is made up of an interacting society of many small agents.” 4/6/2019 JLAB Computing Seminar

16 JLAB Computing Seminar
4/6/2019 JLAB Computing Seminar

17 Standardize interoperability
Language Semantic Registration Discovery Messaging 4/6/2019 JLAB Computing Seminar

18 JLAB Computing Seminar
FIPA Foundation for Intelligent Physical Agents is a non-profit association of companies, founded in Today FIPA counts about 65 member companies. Its purpose is to promote the success of emerging agent-based applications, services, and equipments Facilitate the end-to-end networking for heterogeneous and interacting agents and agent-based systems 4/6/2019 JLAB Computing Seminar

19 JLAB Computing Seminar
FIPA specification Agent Management and platform services - Agent management services (AMS) - Directory service (DF) - Message transport service (ACC) Agent Communication Model and Language Set of common Interaction Protocols 4/6/2019 JLAB Computing Seminar

20 JLAB Computing Seminar
FIPA Agent platform Environment within which agents can be created, registered, located, communicated, migrated, and retired. DF AMS ACC Agent Containers FIPA Distributed Platform 4/6/2019 JLAB Computing Seminar

21 JLAB Computing Seminar
Directory service Shared information repository Agent publish/modify/delete their agent-descriptions including - Name and address - Provided services - Interaction protocols - Ontology - Ownership - Properties - Etc. Agents may search for agent description of interest. 4/6/2019 JLAB Computing Seminar

22 JLAB Computing Seminar
ACL Based on a combination of speech acts, predicate logic and ontology, standard ways of interpreting communication between agents can be achieved that respect the intended meaning of the communication 4/6/2019 JLAB Computing Seminar

23 JLAB Computing Seminar
ACL message structure 4/6/2019 JLAB Computing Seminar

24 Communication protocols
Request Query Request when Contract net Iterated contract net English auction Dutch auction Brokering Subscribe Propose 4/6/2019 JLAB Computing Seminar

25 JLAB Computing Seminar
AFECS ACL Not understood Inform-content Refuse-reason Act Agree Failure-reason 4/6/2019 JLAB Computing Seminar

26 JLAB Computing Seminar
4/6/2019 JLAB Computing Seminar

27 JLAB Computing Seminar
What is an Ontology? An ontology is a specification of a conceptualization. – Tom Gruber An ontology is a way of representing a knowledge, meaning that knowledge is formalized in a symbolic form, that is, to find a symbolic expression that can be interpreted. – Klein and Methlie 4/6/2019 JLAB Computing Seminar

28 No really what is an Ontology?
An ontology specifies a description of the Terminology and concepts Properties explicitly defining the terms, concepts Relations among concepts Rules distinguishing concepts, refining definitions and relations (constraints, restrictions, regular expressions) relevant to a particular domain or area of interest. 4/6/2019 JLAB Computing Seminar

29 Philosophy of Knowledge
Knowledge we have Knowledge we know we don't know Knowledge we are not aware we don't know 4/6/2019 JLAB Computing Seminar

30 JLAB Computing Seminar
Formalized Knowledge D1 4/6/2019 JLAB Computing Seminar

31 Domain Ontology A novel and poem are books. A book is a document.
Taxonomic Knowledge A novel and poem are books. A book is a document. Domain Ontology document book novel poem 4/6/2019 JLAB Computing Seminar

32 Process Ontology A document author is a woman. author document woman
Relational Knowledge A document author is a woman. Process Ontology author document woman 4/6/2019 JLAB Computing Seminar

33 JLAB Computing Seminar
Interface Ontology Process Ontology author document woman Process Ontology name woman string Process Ontology author document string 4/6/2019 JLAB Computing Seminar

34 RDF: Resource Description Framework
RDF is best suited to formalize triple structure of the knowledge base. XML RDF Why not XML? XML gave us a flexibility to define our own tags. Yet, the construct of the XML is a so called duple consisting of tags and values. RDF record instead is constructed from three components called resource, property and value. If we look the human language construct we see that the base of the sentence is also triplet. So, RDF is more powerful in defining the knowledge base and is ideal for meta language development. Value Resource Subject Tag Predicate Property Object Value 4/6/2019 JLAB Computing Seminar

35 JLAB Computing Seminar
4/6/2019 JLAB Computing Seminar

36 JLAB Computing Seminar
The only thing worse than an experiment you can’t control is an experiment you can. 4/6/2019 JLAB Computing Seminar

37 JLAB Computing Seminar
Project Goal Develop a framework for building control systems open architecture hierarchical network distributed Provide a set of tools to deploy: test and control systems alarm systems control visualization systems, etc. 4/6/2019 JLAB Computing Seminar

38 Experiment Control System Requirements
Control components of the experiment. Full description of the experiment components. Framework reflects Fault tolerance and recovery. Create and deploy finite state machines. Control data-taking activities by coordinating the operations of the DAQ sub-systems, online software components, slow control system components and third-party software components, as well as industrial control systems Provide a facilities to describe external control processes within the system, which will in turn encapsulate foreign components (industrial control systems, etc.) and allow already existing components to communicate with those foreign components as familiar ones Provide facilities, allowing detailed specification of the experiment components/objects, such as their states, actions and associated conditions, etc. Means to group individual control systems into the control domains, operating in the general experiment control environment. Every control domain, representing experiment subsystem, can operate independently, yet will summarize information for the above level domains or expand actions to the lower levels. Provide mechanisms to ensure the fault tolerance and problem recovery of the system. Provide facilities to create and deploy finite state machines. Provide web interface for alarm reporting, alarm configuration, and control data visualization. 4/6/2019 JLAB Computing Seminar

39 Design Philosophy of AFECS
Pure Java. Collaborating autonomous agents. Each agent represents a hardware or software component. Messages between agents invoke actions. Agents behave as finite state machines. Agents communicate with physical components through standard protocols. 4/6/2019 JLAB Computing Seminar

40 AFECS Agent Categories
Normative agents administrative agent Create and manage all other agents Environment administration Supervisor agents Control groups of Component agents Component agents Represent hardware or software components of the real world control system. S A 4/6/2019 JLAB Computing Seminar

41 JLAB Computing Seminar
Component Agent Agents mimic the state of the real (physical) component, they can invoke actions which change the physical component state. AFECS (control) world. IPC IPC IPC Real world. HV power supply Target system Gas system 4/6/2019 JLAB Computing Seminar

42 Inter-Process Communication Channel IPC
Agents communicate with their associated physical components using range of communication protocols including: Tcl-DP (legacy protocol) cMsg (publish-subscribe messaging protocol, JLAB) EPICS channel access protocol SNMP (simple network management protocol) JDBC OS shell interface 4/6/2019 JLAB Computing Seminar

43 JLAB Computing Seminar
Supervisor Agent Supervisor agents have discrete states and they respond to messages from other agents (supervisor or component). S DC HV control supervisor agent A A A Agents representing Individual power supplies HV crate 1 HV crate 2 HV crate 3 DC HV crates 4/6/2019 JLAB Computing Seminar

44 JLAB Computing Seminar
Agents Groupings Physical (AFECS container) A java virtual machine (JVM) is an agent container. Container is a process. Agent is a set of threads in the process. Logical (AFECS domain) Agents are grouped into virtual clusters or domains according to their functions. Agents in each domain may be visible to other domains. N S A S S S A A A A 4/6/2019 JLAB Computing Seminar

45 JLAB Computing Seminar
Domain Reduces complexity of large control systems. Encourages modularity and encapsulation. (only a few agents and their behaviors are visible outside of the domain limits) Promotes control system hierarchical structure. Can be redesigned and tested independently, without affecting the rest of the control system. (as long as the behavior of the visible agents remains the same) Control data-taking activities by coordinating the operations of the DAQ sub-systems, online software components, slow control system components and third-party software components, as well as industrial control systems Provide a facilities to describe external control processes within the system, which will in turn encapsulate foreign components (industrial control systems, etc.) and allow already existing components to communicate with those foreign components as familiar ones Provide facilities, allowing detailed specification of the experiment components/objects, such as their states, actions and associated conditions, etc. Means to group individual control systems into the control domains, operating in the general experiment control environment. Every control domain, representing experiment subsystem, can operate independently, yet will summarize information for the above level domains or expand actions to the lower levels. Provide mechanisms to ensure the fault tolerance and problem recovery of the system. Provide facilities to create and deploy finite state machines. Provide web interface for alarm reporting, alarm configuration, and control data visualization. 4/6/2019 JLAB Computing Seminar

46 AFECS Platform Distribution
Agents are physically distributed at the configuration time at runtime S S S N A A A A 4/6/2019 JLAB Computing Seminar

47 JLAB Computing Seminar
Hierarchy of domains Physical Components Normative Agents NR NA NC A CODA ROC S CODA EMU A Front-End Supervisor agent A EPICS IOC 1 S S A EPICS CAG Grand supervisor S A Trigger soft AFECS Platform S ACC Trigger hard A Online ANA A IPC IPC IPC IPC WEB GUI/user 4/6/2019 JLAB Computing Seminar

48 Physical Component Integration
Administrative domain and container AFECS platform NC NR Description of the control NA Component 4/6/2019 JLAB Computing Seminar

49 Control System Description
Designing a control system requires precise descriptions of physical components and their software abstractions. AFECS uses the COOL language for these descriptions. 4/6/2019 JLAB Computing Seminar

50 Control Oriented Ontology Language COOL
Developed using RDF. Defines an agent model of the experiment. Describes functionalities of physical components (state machines) Describes the semantics of control. ACL message ontology Can be generated using GUI. 4/6/2019 JLAB Computing Seminar

51 JLAB Computing Seminar
4/6/2019 JLAB Computing Seminar

52 AFECS COOL Specific Tools
GUI using COOL to build configuration files describing control system. db2cool: converts current CODA config database to COOL config files. sml2cool: translates state manager language config files to COOL config files. 4/6/2019 JLAB Computing Seminar

53 JLAB Computing Seminar
COOL GUI 4/6/2019 JLAB Computing Seminar

54 JLAB Computing Seminar
COOL Example <rdf:RDF' xmlns:cool=' > <cool:Control rdf:ID="R1ExternalProcess"> <cool:hasComponent rdf:resource="#ROC1"/> <cool:hasComponent rdf:resource="#RC"/> <cool:hasOption rdf:resource="#OPTION"/> </cool:Control> <cool:Option rdf:ID="OPTION"> <cool:hasCoda2Component>false</cool:hasCoda2Component> <cool:hasDataFile>/tmp/test.dat</cool:hasDataFile> </cool:Option> <cool:Component rdf:ID="ROC1"> <cool:hasIpc>cMsg</cool:hasIpc> <cool:hasType>ROC</cool:hasType> <cool:hasName>Roc1</cool:hasName> <cool:hasPriority>44</cool:hasPriority> <cool:hasExternalProcess rdf:resource="#PROC1"/> </cool:Component> <cool:Component rdf:ID="RC"> <cool:hasType>RCS</cool:hasType> <cool:hasName>R1ExternalProcess</cool:hasName> <cool:hasPriority>77</cool:hasPriority> <cool:Process rdf:ID="PROC1"> <cool:hasCommandIpc>shell</cool:hasCommandIpc> <cool:isPartOfState>predownload</cool:isPartOfState> <cool:hasCommandName>emacs</cool:hasCommandName> </cool:Process> </rdf:RDF> 4/6/2019 JLAB Computing Seminar

55 AFECS Implementations
New run control for the JLAB data acquisition system. (V. Gyurjyan, et al. “Jefferson Lab Data Acquisition Run Control System”, Proceeding of the CHEP conference. CERN , Volume 1, page 151.) CLAS experiment web based monitoring system. 4/6/2019 JLAB Computing Seminar

56 JLAB Computing Seminar
Run-Control GUI 4/6/2019 JLAB Computing Seminar

57 JLAB Computing Seminar
Conclusions Java based framework for designing and implementing hierarchical, distributed control systems with intelligent agents. Encourages abstraction, encapsulation, and modularity. Provides a special ontology language (COOL) to describe hierarchical control structure, control logic, and state machines. Has been successfully used to develop run control system for the JLAB data acquisition system, and CLAS experiment web based monitoring system. 4/6/2019 JLAB Computing Seminar

58 JLAB Computing Seminar
Thank you 4/6/2019 JLAB Computing Seminar


Download ppt "AFECS Multi-Agent Framework for Experiment Control Systems"

Similar presentations


Ads by Google