Ontological models of cyber physical systems

A version of developing an ontological model of a cyber physical system of the high level is offered in this paper. The description of the individual elements used in the developed ontological model is presented. The basic formular description of the high level ontology in the logical language of predicates is given. Realizations of particular cases of cyber physical systems are also given using three examples: a conveyor system for processing parts based on Festo, Smart Grids and Part Sequence Sorting System. For each of the models shown, a complete description of the indoor units is provided. Ontological models are based on the use of the concept of functional-block implementation, since this method is the most successful at present. As an intermediate model for adding rules, Prolog is used, whereof transmission into a set of function blocks will take place in the future.


Introduction
We are currently experiencing the fourth industrial revolution (Industry 4.0) [1] in terms of cyber physical systems. These systems are industrial automation systems that provide many innovative functions via the Internet, thus significantly changing our daily life. In this context, new business models, work processes and development methods are emerging that were not possible to imagine a few years ago. These changes also greatly affect society and people. However, Industry 4.0 shows challenges related to the development of cyber physical systems, reliability, security and data protection.
Cyber physical systems (CPS) [2] are the integration of computational and physical processes. Embedded computers and networks monitor and control physical processes, where physical processes affect computation, and vice versa. The economic and social potential of such systems is much greater than that of those currently used; therefore, significant investments are made in the development of this technology around the world.
CPS is currently used in a variety of industries, including the energy industry and mass production. Any CPS needs the possibility of verification, control of execution, modification in a rapidly changing environment. To do this, it is necessary to create a system of ontology [3], with the help of which it will be possible to transmit the original model into the representation necessary for the set purpose (for example, into a graph representation for verification or into a Prolog representation for control). At the moment, not a single implementation of the high-level cyber physical system as a whole has been proposed, but there are many special cases (for example, [4]).
For each CPS of a certain subject area, a number of specific concepts can be distinguished that will be encountered in all CPS of a given subject area. Summarizing the concepts obtained for several subject areas, it is possible to single out general principles and patterns of constructing CPS, which can be represented by a high level ontology that will be applicable to most special cases of CPS. The

High-level ontology of cyber physical systems
The first step in working with ontology in CPS is to create a high-level ontology ontological model of CPS. The complexity of compiling this model lies in the fact that the term CPS can be used to refer to systems that are poles apart (for example, Smart City and Part Sequence Sorting System). This model is basic and on its basis all special cases of CPS are constructed. In this paper, the following special cases are considered: Sorting system for the sequence of parts [5], Festo [6], SmartGrid [7]. Since the ontological model is an abstract concept, the developed high level ontological model can have several variations. Figure 1 shows the blocks and their relationships, which can be projected onto any known cyber physical system.
Here is a description of the blocks and their relations for the ontology of the CPS system: Possible events: this block contains all possible events in the system, which allows you to create an event model of the system, but only for a particular case.
Time: ontology of temporal relations [8] in CPS. It defines the concept of time as the fourth dimension, either a time interval, or in some other way. Since time characteristics are an important indicator of any system, this block will give an opportunity to conduct analysis of the operating time of each auxiliary module of CPS.
Space: a description of the spatial arrangement of CPS objects. Since CPS is not a monolithic system, it is necessary to think over the location of its elements in space, taking into account the characteristics of each element and observing the permissible time characteristics.
Resource: the base object with which CPS works. The basic object is a physical object or phenomenon, the transformation of which occurs in the system.
Physical part: description of the equipment included in CPS. Before the appearance of CPS, there was only a physical description of the system, which is reflected in this block Human: setting parameters for CPS operation. Despite the fact that the human influence in CPS is minimized, it is still necessary to set basic settings and control the work, since CPS does not provide for an auto-recovery procedure after critical errors.
Role: human influence on CPS. It determines the degree of human participation in the operation of the system, which makes it possible to distribute the functions of monitoring and managing the system among several people to achieve the best performance.
Rules: a set of rules for the functioning of CPS. It establishes the permissible limits for changing system parameters, and also determines the rules of action for various scenarios of work.
Data repository: external input data, as well as storage of work algorithms and intermediate results in CPS. It is based on the data of the repository, the selection and execution of the necessary scenario of the system operation occurs, which ensures the controllability of the system.
Software part: ontology of programs and software tools used to control the work of CPS. This module defines the used system programming language and allows you to choose the most convenient presentation of the monitoring and control system for the user.
Critical errors: ontology for emergency response. This block handles errors that lead to the disabling of the system. Such errors can only be handled with human input.  Figure 1. Ontological model of a high level cyber physical system.
Action: operations performed in CPS on the resource. This block defines a set of allowable operations to obtain the required data or the final product from the initial resource.
For use in logical inference languages (for example, Prolog [9]), the basic formular description of a high level ontology in the language of predicates will be composed: Creates These rules describe only the high level ontology. For special cases of CPS ontology, it is necessary to specify your formal description.

Ontology of special cases of a cyber physical system
Three systems were chosen as special cases of CPS implementation: Festo, Smart Grid and Part Sequence Sorting System. Elements of the high level CPS ontology in all private ontological models are highlighted with a bold line. Also, in the description of the models, the elements of the high-level ontological model will not be described, since they were described earlier.

Ontological model of the Festo system
The Festo system is CPS based on a conveyor system.
A conveyor system [10] is a complex dynamic system in which a number of interrelated entities can be distinguished: physical devices, control programs, events, processed resource, etc. Each of these entities, in turn, includes a system of concepts and relations between them, which must be formalized.
In this paper, only the mandatory base stations of the Festo system will be considered, which are designed for conveyor processing of parts from incoming blanks: 1) Distribution station. At this station, the parts arriving at the input to the system are buffered and then sent to the testing station.
2) Testing station. At this station, the work piece is checked for various parameters. A set of sensors is used for this.
3) Processing station. At this station, the received work piece is processed. After processing, the final product is obtained.
To verify the obtained high level ontological model, a particular case of CPS, which is shown in Figure 2, will be considered.
The description of the Festo system ontology: Workpieces: initial workpiece that is fed to the distribution station of the Festo system. In the process of passing through all the stations, the workpiece will either be processed, turned into a part, or it will be discarded at the testing station due to non-compliance.
Operator: since not all possible errors are handled by Festo's internal rules and events, an operator to monitor the system and dynamically correct errors that occur is required.
Workpiece processing: in the Festo system, processing refers to the drilling of a hole in a workpiece at a processing station.
Parameters: the acceptable parameters for processing the part (color, size, material, etc.) are defined. The complete set of parameters is determined by a set of sensors at the testing station. Sensors can be added and removed from the system.
System settings: the basic parameters of the system, such as the size of the buffer of the distribution station, the speed of movement of workpieces between stations, etc., are defined. These parameters can be changed through the interaction interfaces.
Interaction interfaces: an ontological description of the network interaction of the Festo system with other systems. Since the Festo system in production is not the only system, but the part of a complex, there are protocols for interaction between the systems of this complex.
Testing the workpiece: The process of work of a testing station for compliance of the workpiece with the required parameters and rules.  Receiving and issuing a workpiece: The process of receiving a workpiece from an external source to a distribution station and transferring the finished product from a processing station to another system for further processing of the part.
Stations: a set of base stations of the Festo system, as described earlier.
Workpiece departure: when the Festo system works, an uncontrolled event of the departure of a part outside the system is possible. For example, when transferring a workpiece from a distribution station to a testing station, the part detached from the suction cup, as a result of which nothing came to the testing station. In this case, it is necessary to provide either a software-hardware solution to the problem (using another system), or to carry out human intervention (as by default in the Festo system according to the documentation).

Ontological model of the Smart Grid control system on functional blocks
A special case of CPS for the energy industry is the SmartGrid system.
Nowadays, the concept of Smart Grid is becoming more widespread and recognized. Smart Grid refers to the intelligent grid of the future, which includes communication infrastructure and bidirectional power flow, and provides real-time information to all involved facilities. It is expected that the number of distributed renewable power sources and distributed power storage devices will continue to grow, transforming the traditional network control architecture into a distributed one.
The Smart Grid is a complex distributed heterogeneous cyber-physical system, the control and management methods of which are still under study.  Figure 3 shows one of the possible options for representing the ontological model of the Smart Grid system.
There is a description of Smart Grid ontology: Power change: This is an event of a change in voltage or current in the network caused by external factors or received during the conversion of electricity.
Broken power line: Information and electrical transmission lines play a key role in the Smart Grid system. Under the influence of external factors (bad weather, animals, etc.), the connection between the network components can be broken.
Overload protection circuit: if equipment or transmission lines fail, a change in electrical performance may occur; this could result in equipment failure or serious accidents. To prevent serious damage, a special control system is introduced, which either completely shuts down the system, or redistributes the functions of the broken part between other elements of the network, thus preventing a serious accident.  Electric power: The basic element that Smart Grid works with. During processing, the electricity changes its performance to meet the requirements of the end user.
Generator: It generates electricity. It is the basic equipment for the operation of any electrical network.
Power line: Transmission lines refer to wires for transmitting information between IEDs and cables for transmitting electricity. IED: Intelligent electronic device on functional blocks for network monitoring. It plays the role of an intelligent component that can make decisions itself (system shutdown, power reduction, etc.) depending on the situation and external data.
Mounter: it carries out physical work with equipment (control, verification, etc.). Also it carries out the correct arrangement of equipment in space to minimize the influence of external factors.
Sensors: they collect data about equipment operation (temperature, voltage, humidity, etc.). The data is transferred to IED for further processing, after which IED makes a decision.
Operator: it monitors the operation of the Smart Grid through the monitoring system and HMI. It may affect Smart Grid operation and override IED operation as needed.
HMI: human machine interface, the operator influences and changes the Smart Grid system through HMI. Also HMI is built dynamically depending on the system configuration [11].
Designer: They create a Smart Grid system project and transfer it to installers. Design patterns: They define the minimum set of components and rules for the successful operation of a Smart Grid. They are unique depending on the operating conditions of the system.
Visual SCL: This is one variant of the Smart Grid schematic design software tool. It allows distributing equipment and creating a network.
NxtStudio: this is software environment for working with FB in accordance with IEC 61499 [12]. To control the operation of the Smart Grid system, functional blocks have been developed that are unified and can be distributed to different elements of the network, making the control system distributed.
CAT-block library: this is a set of basic Smart Grid elements. It makes the control system easy to modify due to unified elements. This set is loaded into the design environment and used to automate the construction of the HMI.
FB-representation: this is a description of the Smart Grid and its control system as a set of FB in XML. This set is loaded into NxtStudio [13].
Prolog-representation: this is a description of the Smart Grid as a set of facts and rules in Prolog. SCL-description: this is a basic description of the Smart Grid in the form of a schematic diagram. This description is created by the designer.

Ontological model of a system for sorting sequences of parts on functional blocks
One example of CPS is a part sorting system. In this paper, we consider a system for sorting parts based on a selection of certain sequences of parts specified using a formal model, and not a system for sorting individual parts in the classical sense.
Part sorting system consists of a pusher; sensors for recognizing the type of parts; two sensors for determining the position of the ejector; a capacitive sensor that determines if the part has been pushed into the shaft; dampers for the intake of parts from the mine to a specific storage. Figure 4 shows one of the possible options for representing the ontological model of a system for sorting sequences of parts.
There is a description of the sorting system ontology: Placing a workpiece in storage: an event that determines the placement of a part in the storage device means that the part has already been sorted.
Pushing of the workpiece: an event that indicates that the pusher has placed a part in the shaft for further delivery to the desired drive.
The arrival of the workpiece: an event of the arrival of a part in the system, which means that the part has entered the area where the parameters are read by the sensors. At this point, the part is considered to have entered the sorting system.
Workpieces: these are the physical objects to be sorted on. Gravity chute: this is an area of space through which parts move during the sorting process. Sensors: these are the collection of sensors used in the system (e.g. capacitive sensor, optical sensor, inductive sensor, etc.). The sensors allow determining the characteristics of the part and track events in the system. The data is transferred to the controller for further processing. Buffer channels (Storages): these are buffers for storing sorted parts. Then the parts are transferred from the drive to other CPS one by one or in batches.
Pusher, piston valves: these are moving physical objects of the system. The ejector delivers the parts into the shaft after checking the readings from the sensors. The dampers change the trajectory of the part to send the part to a particular drive, depending on the readings of the sensors.  Controller: it is based on the readings of the sensors, controls the movements of the ejector and flaps based on a set of rules and data from the sensors.
Prolog description of FB: this is a description of sorting rules in Prolog. Translator Prolog to FB: converting the Prolog representation of sorting rules for parts into a functional block description.
FB description: functional block representation of the rules for sorting parts, which is loaded into the controller. Sorting of parts will be performed based on the rules and data from the sensors.
Workpiece departure: the departure of a part from a mine or accumulator due to a collision with another part or a damper.
Workpiece jam: jamming of a workpiece during its 'pushing out' or pressing of a workpiece by the shutter. It leads to a complete inoperability of the system and requires human intervention.

Conclusion
The paper considers the ontological model of the high level CPS. This model is basic and allows performing an ontological description of any CPS. As examples (and to prove the correctness of the high level CPS), ontological models of CPS were created from different areas of knowledge (Smart