Monday, July 18, 2016

Context Modeling and Analysis of Cyber Physical Production

Christian Proinger 

Introduction

Cyber-physcial Systems (CPS) are a composition of computational entities that are able to sense parameters of the physical world and its processes. They are provide and use services available on the internet. Cyber-physical production systems (CPPS) specializes this concept to the domain of production across all levels, from processes through machines up to production and logistics.

The problem we are addressing is the modeling and analysis of context-aware systems from requirement specification and early design to system deployment or commissioning.

In [1], a multidimensial context model is represented through a set of composable probabilistic state machines (called First-Order managers (FOMs). Dependencies among FOMs are represented through cause-effect relationships called remote firings. The composition of multiple dependent FOMs results  in a Higher-Order manager (HOM). Both FOM and HOM correspond to Continuous Time Markov Chains (CTMC). 
In order to support the approach presented in [1], we implemented an Eclipse based graphical editor for modeling i) FOMs, ii) their composition and iii) HOMs. For analyzing the CTMC model we implemented a code generation feature that generates the input for the Probabilistic Symbolic Model Checker (PRISM). The following figure shows an overview of the process we facilitate with our implemented tools.

Case Study: Factory Operator 

As a running example we consider a factory with three rooms (named A, B and C). Further consider a machine (machine A) that is located at room A in that factory that produces a
certain kind of product. After turning out a certain amount of items it enters a phase of self-maintenance where it checks if its tools need replacements or some re-calibration is necessary. Completing this process after every item would be too time consuming so the time span between self-maintenance phases is adjusted to be optimal in respect to the price of the raw goods and the probable amount spoilage it will produce when self-maintenance would become necessary during
a production phase.
The scenario additionally involves a human operator who was instructed to cycle through three specific rooms of the factory throughout her work schedule. The operator is expected to be at work for a certain amount of hours during work days. Her task is to maintain machines that encounter a problem during a self-maintenance phase that they can not resolve by themselves.
 One question about such a scenario we would like to be able to answer now is: ”How likely is it that, while machine A is in its self-maintenance phase, the operator is in exactly the same room?”. Another question might concern the probability of the human operator at least being at the factory and not at home. 

Context Modeling

To be able to reason about the factory operator case study we apply the framework introduced in [1], which allows to model different types of actions and context-awareness and their dependencies with a stochastic extension of UML state machines, called Managers. The model, which is annotated with performance characteristics is used to analyze properties of the system. First-Order Managers (they are called that because they are concerned with just a single context attribute) can be combined to get FOM-Composition models by introducing remote firing dependencies between them. The following diagram shows the Eclipse EMF meta model for the FOM-Composition.
The FOM-Composition model, as well as FOM models can be modeled with the Eclipse plugins we implemented. The following image illustrates how the FOM-Composition model for the factory operator case study looks like in our tool. 
From this model a context menu action, implemented as an Eclipse plugin, will let the user create a Higher-Order Manager (HOM) model. The HOM is obtained from the FOM-Composition model by using the cartesian product of the states of the source FOMs as states. The transitions in the HOM result from the transitions of the states that make up a combination-state and the remote firing relationships of these transitions. The HOM for the case study, that is created by our implementation, is shown in the following picture. 

Context Analysis

The HOM enables us to reason about the combined context and its evolution. By applying the stochastic process of Continous Time Markov chains (CTMC) we obtain transient- and steady-state probabilities for the combined states. To calculate these probabilities we chose to use PRISM[2]. PRISM takes a text file as an input that conforms to their DSL that describe CTMCs. We implemented an Eclipse plugin to generate this DSL file from a HOM model. The following image shows the PRISM GUI and contains the DSL translation of our HOM.
For our case study PRISM will provide us with the following values enabling us to answer the question initially stated: ”How likely is it that, while machine A is in its self-maintenance phase, the operator is in exactly the same room?”




References

[1]  Berardinelli, L., Cortellessa, V., and Di Marco, A. Fundamental Approaches to Software Engineering: 13th International Conference, FASE 2010, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2010, Paphos, Cyprus, March 20-28, 2010. Proceedings. Springer Berlin Heidelberg, Berlin, Heidelberg, 2010, ch. Performance Modeling and Analysis of Context-Aware Mobile Software Systems, pp. 353–367.
[2] PRISM - Probabilistic Symbolic Model Checker. http://www.prismmodelchecker.org/.

No comments:

Post a Comment