Automatic Generation of Cyber-Physical Software Applications Based on Physical to Cyber Transformation Using Ontologies
- 1k Downloads
In this paper, the aim of automatically generating a cyber-physical control system (more precisely, an IEC61499 control system) is discussed. The method is enabled by ontology models, specifically the source plant ontology model and the target control model for the CPS system implemented in the preferred programming language. The transforming of ontologies is enabled by an extension of SWRL (called eSWRL) and it is introduced here. There interpreter of eSWRL is developed using the Prolog language. A case study Baggage Handling System is used to demonstrate how the ontology models are transformed and the corresponding transforming rules that are developed.
KeywordsCPS BHS eSWRL IEC61499 Ontology transformation
The complexity of cyber-physical systems design implies the use of Model Driven Engineering (MDE) methods . The aim of MDE is to create a destination model from a source model after undergoing several transformation steps, creating intermediate models in the process. MDE are widely used and an example is the work in  which suggests Model-Integrated Computing (MIC) method, expanding MDA to the field of domain-specific modelling languages. Physical system’s architecture can often determine the architecture of CPS control hardware and software. However it needs to be considered in conjunction with functional and non-functional requirements. In search of a proper means to represent all this information, the Semantic Web technologies  appear as an appropriate candidate. The cornerstone of these is the concept of ontology and the most widespread ontological language is OWL language based on description logic . There are two components to an OWL ontology, the T-Box and A-Box. The T-Box introduces the terminology of the domain while the A-Box captures the asserted relationships between the instances of the T-Box terms.
In this paper, a method to the automatic generation of CPS control systems utilizing the modular component-based IEC61499 CPS control system. The content of the paper includes the discussion on the development of the concept of transforming ontology, developing eSWRL  and interpretation engine in the Prolog language  to enable the transformation and lastly, demonstrated on a case study BHS system showing the developed transformation rules.
2 Relationship to Cyber-Physical Systems
Automation systems today are becoming more and more software intensive . Automation systems were primarily designed using the design languages of IEC 61131-3 standard, targeting Programmable Logical Controllers (PLC) as hardware platform. The Internet of Things revolution raises interest in distributed systems design, which has been addressed in the automation area by such technologies as the IEC61499  standard which acts as the reference for designing de-centralized (or distributed) control systems based on the artefacts of FBs introduced in the standard. IEC61499 uses a top-down approach which decomposes a system (or an application) down to smaller intelligent artefacts represented as FBs. IEC61499 has already been adopted as the control system in CPS systems such as a Smart Grid .
BHS is a good example of a CPS where there exists an integration of collaborative computation between networks of computational elements (control intelligence) within the physical processes (conveyor section, sensors, and actuators). The traditional design paradigm in developing BHS systems is to decouple the physical system from the cyber software design. This means that the physical systems are designed first followed by the software design where there is very little connection between the two design steps. However, this practice is becoming less and less suitable as complexity in BHS systems increases with the integration of mechatronic components, computer hardware and software where it is beneficial for the physical and the cyber components to be designed concurrently. In addition, due to the complexity of BHS systems, it is more suitable to decompose the BHS system down to smaller parts in thus, moving away from a centralized control system to a more distributed control system where there is a need for cyber intelligence to interact with one-another within a cyber network. One of the tenants of MDE design is the automatic generation of software code. This work contributes to this front by using an arbitrary physical layout of a BHS system to automatically generate a CPS control system in IEC61499 using based on transforming ontologies.
3 State of the Art
There a several works [10, 11, 12, 13, 14] which are similar to the work presented here. The work in  utilizes the Prolog language as a mean to model and verify IEC61499 applications. Ontology or model transformation are not the focus in this work. In  automatic generation of formal IEC61499 application model is proposed using graphical transformation methods. In the work, the source model is the IEC61499 application while the destination model is the formal Net Condition/Event System (NCES) model and the transformation is performed using the AGG tool . In , a method using multi-layered ontological knowledge representation and rule-based inference engine is proposed for the purpose of semantically analyse IEC61499 based projects. In , an approach based on utilizing Semantic Web Technologies is proposed for the purpose of migrating IEC61131-3 PLC to IEC61499 FBs. The migration is implemented as a transformation of ontological representation of IEC61499 function block system to ontological representation of IEC 61131-3-based system. The migration is based on transforming ontologies from IEC61131-3 to IEC61499. The drawback of this approach is that the rules are developed in complicit of rule coding using XML.
The main difference between this work and the works listed above is that UML is not the core models in our approach. Both the source and target models in this work are in ontological representations and the transformation is performed directly on the ontology models. In addition, the transformation is performed on the level of the class instances and properties rather than on the level of RDF triples. The transformation rule interpreter is also developed as a self-modifying Prolog program implemented in SWI Prolog using the OWL Thea library .
4 Transforming Ontology and Development in Prolog
T-Box and A-Box ontology of the physical plant;
T-box ontology of the IEC61499 control system  supplemented by the A-Box with common and standard FB Types serving as the building blocks of the control system.
The result of the transformation is the ontology of the control application comprising of an the IEC61499 T-Box and an A-Box derived from the source model. The transformation rules play the central role in transforming the ontology. To represent the rules, the eSWRL language  is suggested. eSWRL is an extension of SWRL where the monotonicity property is waived. As a result, eSWRL has capabilities of ontology self-modification.
Once the ontology model of the source plant model and the target IEC61499 T-Box are developed, the next step is to convert both ontologies to a set of facts and rules in the form of Prolog. At the same time, the Prolog equivalent of the eSWRL rules are also created. In a Prolog program, the Prolog facts and the rules are executed concurrently modifying the existing Prolog database be it creation, deletion or modification of facts. The resulting Prolog database (Or from the perspective of ontology, the A-Box) is the resultant target IEC61499 control system. This database is then converted back to ontology and merged with the IEC61499 T-Box to create the ontology model of the final control system. The scope of this work is to demonstrate how ontology can be used for the purpose of transforming models, overcoming the monotonicity restrictions for the purpose of model transformation. The development of the ontology for the source and destination models are out of the scope of this paper.
5 Case Study: Transforming BHS Description to IEC61499
Rule 1: For each conveyor, an FB instance fb_control_block is created
- Rule_2a: If a conveyor has a sequential connection , a logical connection between Straight and inc ( straight->inc) is made as shown in Fig. 5.
- Rule_3: For each fb_control_block instance which is associated with another FB of the same type, an FB instance of photo_eye type is created as shown in Fig. 6.
6 Conclusion and Future Work
This paper presents a method to automate the generation of control software for cyber-physical systems by transforming ontologies. This is enabled by the Prolog language and results in an IEC61499 application. The presented method follows the framework of ontology-driven engineering (ODE) and can be further extended to including refactoring, generation of formal models for analysis, implementation using programming or modelling languages. The method is applied to a BHS case study where a small fragment of the airport BHS is used as the source model and the resultant IEC61499 control system is transformed. The suggested method is not limited to IEC61499 applications and can be used in other application domains. The method presented in this paper transform the ontology directly on the A-box level of the ontology and the T-Box is unused for this work. In addition, further development of a formal semantics of the language eSWRL is necessary. Moreover, it is important to verify eSWRL transformations.
- 3.W3C: Ontology Driven Architectures and Potential Uses of the Semantic Web in Systems and Software Engineering (2006)Google Scholar
- 5.Dubinin, V., Vyatkin, V., Yang, C.-W., Pang, C.: Automatic generation of automation applications based on ontology transformations. In: 2014 IEEE Emerging Technology and Factory Automation (ETFA), pp. 1–4 (2014)Google Scholar
- 8.International Electrotechnical Commission: IEC 61499 Function Blocks, vol. IEC 61499, ed. (2005) Google Scholar
- 9.Zhabelova, G., Yang, C.-W., Patil, S., Pang, C., Yan, J., Shalyto, A., et al.: Cyber-physical components for heterogeneous modelling, validation and implementation of smart grid intelligence. In: 12th IEEE International Conference on Industrial Informatics (INDIN 2014), pp. 411–417 (2014)Google Scholar
- 10.Dubinin, V., Vyatkin, V., Hanisch, H.M.: Modelling and verification of IEC 61499 applications using prolog. In: IEEE Conference on Emerging Technologies and Factory Automation, ETFA 2006, pp. 774–781 (2006)Google Scholar
- 11.Dubinin, V., Vyatkin, V.: Graph transformation-based approach to the synthesis of formal models of IEC 61499 function blocks systems. In: Proceedings of the Institutes of Higher Education, Volga Region, Technical Sciences (2008)Google Scholar
- 14.Almendros-Jiménez, J., Iribarne, L.: ODM-based UML model transformations using prolog. In: Abelló, A., Bellatreche, L., Benatallah, B., (eds.) Model-Driven Engineering, Logic and Optimization: Friends or Foes? (2011)Google Scholar
- 16.Thea: A Prolog library for OWL2. http://www.semanticweb.gr/thea/index.html
- 18.Yan, J., Vyatkin, V.V.: Distributed execution and cyber-physical design of Baggage Handling automation with IEC 61499. In: 9th IEEE International Conference on Industrial Informatics (INDIN 2011), pp. 573–578 (2011)Google Scholar
- 19.Protégé. http://protege.stanford.edu
- 20.Grosof, B.N., Horrocks, I., Volz, R., Decker, S.: Description logic programs: combining logic programs with description logic. Presented at the Proceedings of the 12th International Conference on World Wide Web, Budapest, Hungary (2003)Google Scholar