This paper presents a method for the identification of stochastic timed discrete event systems, based on the analysis of the behavior of the input and output signals, arranged in a timeline. To achieve this goal stochastic timed interpreted Petri nets are defined. These nets link timed discrete event systems modelling with stochastic time modelling. The procedure starts with the observation of the input/output signals; these signals are converted into events, so that the sequence of events is the observed language. This language arrives to an identifier that builds a stochastic timed interpreted Petri net which generates the same language. The identified model is a deterministic generator of the observed language. The identification method also includes an algorithm that determines when the identification process is over.
1. Introduction
Industrial systems usually have a sequential evolution, so they behave as discrete event systems (DES). A DES is a discrete-state, event-driven system; that is, its state evolution depends entirely on the occurrence of asynchronously discrete events over time [1]. A DES describes the system behavior by means of the occurrence of events from an initial state. In an industrial system two kinds of events can be observed. Input (I) events are related to control commands or external interactions with the system and output (O) events are related to sensor measures. In this proposal, the external signals not related with control commands define the operating modes, which affects the controller and allows modelling the system under different strategies; in [2] the authors use a similar concept to differentiate production patterns in batch processes, called multimode; they propose to separate the original space of a mode into two different parts (the common and the specific) and a monitoring process is carried out in each block; the multiblock monitoring method proposed is used for fault diagnosis purposes in multimode multivariate continuous processes; some of its proposals could be applied in stochastic DES regarding times identification, so it will probably reduce the sizes of time matrices and the complexity of the identification method.
Regarding DES, one problem which is being studied recently is system identification. This problem can be defined as follows: given a set of observed ordered timed I/O signals, determine a model such that, given a set of ordered I signals, the model approximates a set of the observed O signals. When a model of the system is not available, identification can be effectively used to obtain a model that can be then used to formally prove if the system meets the requirements and to improve its dependability [3].
Therefore, the first step in an identification process is to define the characteristics and the format of the model to fit. DES modelling starting form I/O signals has been addressed by many authors using different approaches.
Petri nets (PNs) have been recognized as a suitable model to describe DES [4], particularly when a system is asynchronous [5–8]. Hiraishi [9] presented an algorithm for the construction of a free labeled Petri net model from the knowledge of a finite set of its firing sequences. In [10], the authors define a class of continuous-time discrete event dynamic systems (DEDS) with two types of discrete-valued I/O signals: conditions signals and event signals called condition/event systems (C/E systems) and they define models of C/E systems too that are based on an extension of PNs (C/E PNs). C/E systems provide an intuitive modelling framework amenable to block diagram representation. The way of thinking and modelling a system is like a set of modules with a particular dynamic behavior and their interconnection via signals. This way of modeling is intuitive, and the modules can be pretailored and used over and over again. Each module is equipped with I/O signals which are of two types: condition I/O carrying state information and event I/O carrying state transition information. This way of system extension with I/O signals clearly reflects the duality of PNs, namely, the clear distinction between states and states transitions with their own graphical representation, semantics, and formal properties.
Rausch and Hanisch [11] proposed formalism for composition of I/O PNs to new systems which they called net condition/event systems (NCEs). I/O PNs are coupled by means of condition signals and event signals. The composition is performed in the same way as known from the composition of continuous systems in state space representation. This model can simulate the systems behavior by firing maximal steps and can also compute the complete state graph for the system, similar to the state graph for timed place/transition nets under the maximum firing strategy.
The general idea of NCEs is modelling a system as a set of modules with a particular dynamic behavior and their interconnection via signals [12]. Condition and event inputs can be connected with some transitions inside the module by condition and event arcs. Module places can be connected to the condition outputs by condition arcs, and transitions can be connected to the event outputs by event arcs. This concept provides a basis for a compositional approach to build larger models from smaller components [12].
Once the model has been defined, the following step is defined as the DES identification method. In the literature there exist a lot proposals related to DES identification methods, these can be compared by their complexity in terms of the system characteristics, identification process, and the model or algorithm applied [13], as well as by the identification model objective. From the theory of DES some identification methods have been developed using different techniques such as finite state machines (FSM), Automata, and PN; currently, the most popular models are PNs and Automata [7, 14].
The simplest methods are based on data from I/O, where concurrent states are not identified and its execution is off-line [13]. If the identification process is incremental, then the algorithm must be executed on-line, but its complexity is higher, because it can be polynomial or exponential, depending on the approach used for modeling. Furthermore, if the identification goal is the analysis of the model structure, the model must be developed to verify PN properties like being alive, conservative, achievable, among others. One of the most well-studied PNs problems is estimating the state of a given PN, based on its event sequence observation; in [15] the problem of finding the least-cost transition firing sequence(s) for a given interpreted PN (IPN) based on the observation of labels sequence is addressed. The PN possesses both observable transitions (which are associated with a possibly nonunique label) and unobservable transitions (whose firings do not generate any label observations). This paper assumes that each transition in the given IPN is associated with a nonnegative cost that captures its likelihood (e.g., in terms of the workload or the power amount needed to execute a certain transition). Given the observation of a labels sequence, the task is to find the transition firing sequence which (i) is consistent with both the observed label sequence and the PN structure and (ii) has the least total cost.
Recent literature presents results and trends to solve the identification problem. These trends can be grouped according to [13], in three groups: IPN identification by I/O signals (I/O IPN identification), nondeterministic finite automaton (NDFA), and application of integer linear programming (IPL) for IPN identification (ILP + IPN).
I/O IPN identification is related to the generation of DES, based on the observation of output signals [16]; an on-line algorithm computes an IPN model Qi, describing the behavior of an unknown system Q. Every time a cyclic behavior is detected, the previous computed model is updated. This approach considers that each input to the system is reflected in the output. It means that, even if the system is not completely instrumented, the information provided by the sensors is enough to detect any change of state [17]. The algorithm receives a sequence of output signals obtained from observations during the system operation. These output signals must be binary vectors representing the current state of every one of the sensors measuring the output behavior of the system. In [17] the authors present an evolution of the method which is able to deal with concurrent systems by means of detecting concurrent transitions. The identified models are useful for structural diagnosis.
Regarding NDFA method, its approach is to build a model that approximates the original system language. The observed language of the closed loop DES is to be translated into a finite state machine by an appropriate identification algorithm. In [18, 19] a nondeterministic autonomous automaton with output (NDAAO) is chosen as an appropriate model to reproduce the observed language of closed loop DES. This approach identifies a closed loop DES based on the interaction of the controller with deterministic behavior and the physical process with nondeterministic behavior, combining internal and external events. It presents a proposal for division of the system into smaller subsystems. Also [20] addresses the problem of identification and diagnosis in DES based on timed Automata; the algorithm identifies and detects failures in the actuators in low complexity systems. An evolution of the method of [20] is proposed by Jarvis in [21]. This paper deals with the identification of timed event systems with timed Automata models. Some disadvantages of this trend are that it does not model the concurrence of states. Moreover, in complex systems there is a combinatorial explosion of states.
ILP + IPN uses an ILP approach and it computes an IPN. The model is built by using observed events and the available output vector ([22–26]). The identification problem is to determine a set of places P of cardinality m, a set of transitions T of cardinality n, and the function of labeling and the PN defined as an ILP problem. Silent transitions are those that identify faults. A contribution of these methods is given in [3] that deals with the identification problem for deterministic systems as of timed λ-free PN, starting from the timed observed sequences. This method generates a net language, whereas the timer information is used to identify language strings that are not accepted by the net; therefore, the algorithm does not need to know the language of the full net. The solution is based on ILP and knowledge of the timed net structure. It allows, together with the observation of events, determining whether a transition time has expired. The algorithm is carried out through two subroutines, one to observe the language on-line and another for the off-line ILP. Furthermore, [27] contributes with a technique that reduces the number of sets of inequalities and the number of inequalities in each set to identify the IPN as an ILP problem. The other contribution in this area is given in [28], presenting a method that uses ILP with IPN, to prevent exhaustive generation of reachable states; it is considered nondeterminism in the model, since different observable transitions share the same label; it has a timing structure of events leading to the imposition of new restrictions and provides the most accurate diagnosis. It is a very efficient method in small models but to find an optimal solution in complex models has very high computational requirements.
These trends can be compared regarding to criteria such as kind of system to identify, resulting model and computational cost, we can say that: The I/O IPN identification cannot be used with timed systems; it can be applied to complex systems; the obtained models are less complex than those obtained using the Automata based methods and computational cost is normal. The NDFA trend applies to timed systems, and it works best on simple systems; it generates nondeterministic models and the computational cost is normal; furthermore, there is a combinatorial explosion of states. And regarding IPL + IPN, some proposals are for timed systems and some present nondeterminism so these methods cannot be applied today to identify real complex DES because of the high computational complexity of the algorithm.
Timed event systems identification with output symbols has been also treated in [21] using a technique from computational learning theory in the context of timed Automata and in [3] with free labeled nets; in this paper it is assumed that a delay is associated with each transition and the timer variables are used to determine if a potentially enabled transition; on the basis of the observed firings, a subset of the net language is build, while the timing information is exploited to determine a subset of counterexamples, that is, a set of strings that do not belong to the net language.
Considering the advantages and disadvantages of the existing identification methods, this paper proposes an identification method of timed discrete event complex systems, which identifies a deterministic language generator. The language generator is defined as a stochastic timed IPN (st-IPN). The proposal to model a system as st-IPN is inspired in some concepts of the modelling formalism by NCES, specifically on conditions and I/O events with the purpose of labeling the transitions and places. We have added properties to generate a DES modelling approach with the purpose of performing diagnostics on complex systems.
This paper is organized as follows. Section 2 describes the background on PN; Section 3 defines a st-IPN; Section 4 presents the identification method; Section 5 shows an application case; finally, the concluding remarks and discussion are showed in Section 6.
2. Background on PN
Petri nets (PNs) are widely used for modeling DES [29]. PN provides compact models and captures main DES characteristics as concurrence, asynchronism, causal relationships, mutual exclusions, and so forth. This paper will model DES with PN, so some basics of PN are presented.
Definition 1 (Petri net (PN)).
A Petri net structure N is a bipartite digraph represented by the five-tuple N=(P,TR,Pre,Post,M0), where P is a set of places with cardinality n and TR is a set of transitions with cardinality m, and Pre:P×TR→N, Post:TR×P→N are the pre- and postincidence matrices, respectively, which specify the arcs connecting places and transitions. Matrix I=Post-Pre is the m×n incidence matrix of the net. The marking function M:P→N represents the number of tokens residing inside each place, and M0 is the initial marking [26, 30].
For pre- and post-sets, the dot notation is used. •tr={p∈P:Pre(p,tr)>0} [26].
Definition 2 (Reachability set of a PN).
Let N be a PN. Transition trj is enabled at marking Mk if ∀pi∈•trj,M(pi)≥I(pi,trj). The enabled transition trj can be fired reaching a new marking Mk+1 that can be computed by Mk+1=Mk+I·trj→, where trj→ is a |TR| vector of zeroes, except in entry j, that is equal to 1. An enabled sequence σ=tr1tr2⋯trk is denoted as M⌈σ>Mk. The reachability set of a PN is the set of all possible reachable markings from M0, firing only enabled transitions; this set is denoted by R(N,M0) [31].
The system inputs will be the control commands and the outputs will be the sensor readings. At each time instant each input will have a particular value and so the outputs. In order to organize the signals, this paper encodes the different I/O vectors using its binary representation; therefore, it is defined an input (output) symbol as the set of control commands (sensor readings) values at a time instant in binary representation.
Definition 3 (I/O symbol).
Assuming binary values in input and output signals, us is a binary representation of s, s stands for the input symbol, and s=0⋯|2m|-1, with u0=[0→]; …; u|2m|-1=[1→], the same applies to yj, yj is a binary representation of j, j stands for the output symbol, and j=0⋯|2n|-1, with y0=[0→]; …; y|2n|-1=[1→].
For example, given a set of control commands Cc={cc1,cc2}; if cc1=1 and cc2=0 then the input symbol is represented by u2.
Note that is possible that the controller will not generate all the input symbols, since some control commands cannot be enabled simultaneously. In the same way, the system will not generate all the output symbols if there is no failure.
Definition 4 (interpreted Petri net).
An IPN is a tuple Q=(N,U,Y,λ,φ) (see [32]), where N is a PN. U={u0,u1,…,u|2m|-1} is the input alphabet, us is an input symbol, and m is the number of inputs; Y={y0,y1,…,y|2n|-1} is the output alphabet, yj is an output symbol, and n is the number of outputs; λ:TR→U is a labeling transition function that assigns an input symbol to each transition. φ:R(N,M0)→Y is an output function that assigns an output symbol to each reachable marking.
From the definition given in [33], an event is a pair (us,yj). A new event is generated when there is a change in us, in yj, or in both.
The system alphabet Ω relates I/O symbols; that is, Ω=U·Y; therefore ωe=usyj∈U·Y if us∈U and yj∈Y, where e=1⋯|2m|×|2n|.
If U·Y is the system alphabet and U (Y) is the input (output) alphabet, then PU:(U·Y)*→U* (resp., PY:(U·Y)*→Y*), where PU(usyj):=usifus∈U, PU(us′yj):=ε if us′∉U. (PY(usyj):=yjifyj∈Y, PY(usyj′):=εifyj′∉Y).
Definition 5 (timed event).
A timed event ωi is an I/O symbol at time τi,
(1)ωi=(usyj)τi,
where usyj is an I/O symbol at time τi. The time elapsed from τi to τi-1 is ti (see [34]) and ti=|τi|-|τi-1|.
Definition 6 (firing language (see [<xref ref-type="bibr" rid="B35">35</xref>])).
A firing sequence in an IPN (Q) is a transition sequence σ=tr1tr2⋯trk⋯ such that M0→tr1M1→tr2⋯Mw→trk⋯. Given a firing sequence σ, a marking Mk∈R(N,M0) is reached from M0 if there exists a σi such that M0⌈σi>Mk. The set of all firing sequences is called the firing language L(F)={σ|σ=tr1tr2⋯trk⋯∧M0→tr1M1→tr2⋯Mw→trk⋯|M0,M1,Mw∈R(N,M0)}. Each transition trj is fired at time τj(τ1≤τ2≤⋯≤τk); therefore σ is an arranged sequence in a timeline, where each transition happens at time τi.
L(F) generates a timed event sequence (based on Definition 5), called system language L(Q)={λ(tr1)φ(M1),λ(tr2)φ(M1),…,λ(trk)φ(Mk)} whose events are arranged at the same timeline as L(F).
We define the projection PU:L(Q)→Lin(Q) (resp., PY:L(Q)→Lout(Q)), where PU(λ(trk)φ(Mk))=λ(trk) if λ(trk)∈U and PU(λ(trk′)φ(Mk))=ε if λ(trk′)∉U. (PY(λ(trk)φ(Mk))=φ(Mk) if φ(Mk)∈Y and PY(λ(trk)φ(Mk′))=ε if φ(Mk′)∉Y). Therefore consider the following.
The input language is the generated language by the input symbols, is:
(2)Lin(Q)={PU(s)s∈L(Q)}
Note that there could be several transitions with the same label if λ is not isomorphic.
The The output language is the generated language by the output symbols, is:
(3)Lout(Q)={PY(s)s∈L(Q)}
Note that there could be several places with the same label if φ(Mw) is not isomorphic.
For identification purposes, it is convenient to use isomorphic φ functions. Isomorphic mappings will lead to equivalences between output symbols and net markings. Therefore, it will be immediate to infer the net state from a particular combination of output symbols.
Note that the evolution on an IPN could be nondeterministic if φ is nonisomorphic. For example, a nondeterministic evolution will occur if there exists at least one place with at least two transitions with the same label that lead to different places. Nevertheless, the language generated by many systems (see [18]) is represented by a nondeterministic NDA when the system state is described by means of its outputs. For some applications, such as diagnosis, nondeterminism is an undesirable characteristic. Next section will present an extension of IPN that will avoid the nondeterminism in this case.
3. Definition of Stochastic Timed Interpreted Petri Net (st-IPN)
This section presents the definition of st-IPN. st-IPN definition includes the concept of “differential of output signals” (dy), which represents the historical behavior of the output signals. This concept will improve the understanding of the process states. For example, in a fluid tank it is possible to differentiate between the filling or emptying tasks. This knowledge takes a great importance for identification purposes.
Given an output symbol yj∈Y and yj-1∈Y; dyj is defined as
(4)dyj(yj×yj-1)⟶{-1,0,1},
where dyj(a,b)=c, a∈Y is an output symbol at time τi, b∈Y is an output symbol at time τi-1, and c∈{-1,0,1}; for an output symbol yj; c=a-b, so dyj possible values are 0×0→0; 0×1→1; 1×0→-1; 1×1→0.
st-IPN combines an IPN and a timed PN. IPN is defined in Definition 4 and the timing concepts are based on [3] where the authors define a timed PN with a delay associated with each transition, represented by δ(tr). This delay represents the time that must elapse from the enabling of the transition until it fires. Timer variables are used to determine if a potentially enabled transition tr is timed-out, that is, if its firing time is elapsed and tr has not yet fired. If δ(tr)≠0, then tr is said to be timed, while if δ(tr)=0, then tr is said to be immediate.
Definition 8 (timer variables (based on [<xref ref-type="bibr" rid="B3">3</xref>])).
Given a transition sequence σ=tr1tr2⋯trk⋯, a timer variable ttrj is associated with each timed transition trj, where ttrj is enabled if Mj>pre; ttrj is disabled; that is, ttrj=0, before the firing of σ.
Moreover, it is important to introduce the concept of operation mode which is related to external events signals that affects the controller, such as SCADA commands, operator requirements, among others. The operation modes can be grouped in a set OM={o1,o2,…}.
A stochastic system is affected by a number of aspects such as the variability in the material flow, the fluctuation of power supply, and the deterioration of machinery and devices. These variations change the enabling and the firing times. It is assumed that each transition time follows a stochastic distribution that can be different for each operation mode.
Considering that this variability is not always normally distributed, st-IPN includes a density function of transition firing time for each transition and for each operation mode.
Definition 9 (stochastic timed interpreted Petri net (st-IPN)).
A st-IPN is a structure represented by
(5)stQ=(Q,Ω,δ),
where Q=(N,U,Y,λ,φ) is an IPN where N,U,Y have the same meaning as in Definition 4, but input function λ is defined as λ:TR→U·δ (a labeling function that assigns an input symbol and a timer density function to each transition) and φ is defined as φ:R(N,M0)→yj/dyj; φ is isomorphic over yj/dyj.
Ω=U·Y:={ω=(usyj)} is the system alphabet.
δ:=TR×OM→f(tTR×OM) is a density function of transition firing time for each operation mode OM={o1,o2,…}.
A transition trj∈TR with λ(trj)=us·ttrj is enabled at operation mode oi if and only if Mj>pre and if Prob(ttrj,oi)≥(1-α), where Prob(ttrj)=∫f(ttrj×Oi) and 1-α is the confidence level. Therefore, a transition is enabled if each input place meets the marking requirements and the time elapsed has reached a certain confidence interval.
When trj is fired, a new marking is reached, such that φ(Mk)=yj/dyj; thereby, each place of the st-IPN represents not only the current system state, but also includes information about directionality.
Generated language: Stochastic timed event sequence generated from the evolution of a st-IPN, so L(stQ)={s∈(U·Y)*:Prob(s∣φ(M0))≥(1-α)}, where s=ω0,ω1,…,ωk at times τ0≤τ1≤⋯≤τk. A symbol of the language generated is a concatenation of an input symbol and an output symbol (ωi=usyj) at time τi.
3.1. Properties
Given an I/O event sequence s, where s=(ukyk),(ux,yx),(u1,y1),…,(uv,yv),(uxyx),(u1y3), with yk≠yv, if φ is an isomorphic output function between the set of markings and the set of output symbols, then the net that generates the sequence is nondeterministic because input symbols u1 can be followed by two different output symbols, y3 and yx. One of the consequences of a net nondeterministic is that it generates event sequences that are not part of the system language. The generation of event strings not included in the system language must be avoided if the generator is going to be used as a diagnosis model. The Proposition 10 proof that a st-IPN from s is deterministic.
Proposition 10.
Let stQ be a st-IPN defined as in Definition 9. If φ is isomorphic, then stQ is deterministic.
Proof.
Let s be the sequence described in the previous paragraph. Let us split the symbol yx into two yx′ and yx′′; s=(ukyk),(uxyx′),(u1y1),…,(uvyv),(uxyx′′),(u1y3); the differential of output symbols in yx′ is dyx′=yx′-yk and in yx′′ is dyx′′=yx′′-yv; as yk≠yv then dyx′≠dyx′′; therefore, the output function is different in the two states, thus eliminating the nondeterminism and increasing the number of states. So, φ is isomorphic between the set of markings and the set of output symbols yj/dyj.
The inclusion of dy in the model allows the computing of a maximum number of states.
Definition 11 (maximum number of states, <inline-formula>
<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="M208">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mtext>Q</mml:mtext></mml:mrow>
<mml:mrow>
<mml:mi>max</mml:mi>
<mml:mo></mml:mo></mml:mrow>
</mml:msub></mml:mrow>
</mml:math></inline-formula>).
The system state is determined by the output symbols and their historical behavior; therefore, the maximum number of identifiable states is related to these output signals; thus
(6)Qmax=2n×3n,
where n is the number of output symbols.
For example in a system with only one binary sensor, Qmax=|2|1×|3|1=6; in a system with two binary sensors, Qmax=|2|2×|3|2=36.
Proposition 12.
Let stQ be a st-IPN and L(stQ) the language generated by stQ and let s=ωi⋯ωk at times τi,…,τk, (ωi=usyj) be an event sequence. If s∈L(stQ) and φ(Mi)=φ(Mk) then s*∈L(stQ).
Proof.
Because a st-IPN is deterministic (see Proposition 10), if φ(Mi)=φ(Mk) then Mi=Mk so s can be generated infinitely.
Proposition 13.
Let stQ1, stQ2 be st-IPNs, with incidence matrices I1 and I2 and initial markings M01 and M02, and let L(stQ1), L(stQ2) be the language generated by stQ1 and stQ2, respectively, with φ1(M)=φ2(M) and M01=M02. L(stQ1)=L(stQ2) if I1=I2.
Proof.
The system evolves the following PN state equation:
(7)Mk+1=Mk+I·σk,yk/dyk=φ(Mk).
Let us suppose that L(stQ1)=L(stQ2)=L(stQ) but I1≠I2.
Let us consider an event sequence s=ω0,ω1,…,ωk∈L(stQ) at times τ0≤τ1≤⋯≤τk that is generated by a firing sequence σ=tr1tr2⋯trk.
If I1≠I2 then ∃k>0∣M01→tr1M11→tr2⋯→trkMk1; M02→tr1M12→tr2⋯→trkMk2, for each st-IPN, respectively, and Mi1=Mi2 but, Mk1≠Mk2. As φ is isomorphic then φ(Mk1)≠φ(Mk2).
As L(stQ1)=L(stQ2) then Lout(stQ1)=Lout(stQ2).
If Lout(stQ1)={φ(M0),φ(M11),…,φ(Mk1)} and Lout(stQ2)={φ(M0),φ(M12),…,φ(Mk2)} by (2) and (3) respectively.
Then φ(M01)=φ(M02)⋯φ(Mk1)=φ(Mk2).
Therefore Mk1=Mk2. Whereof I1=I2, which contradicts the initial condition.
It is concluded that the st-IPN that generates a language is unique.
Proposition 14.
Let φ:R(N,M0)→Y/dY be an output function and let s∈L(stQ), s=ωi⋯ωk be a sequence that models a cycle (φ(Mi)=φ(Mk)); ∑ikdyj=0, for each, j=1,…,n where n is the number of sensors.
Proof.
The system evolves the following st-IPN state. Equation (7) is as follows
s={ωi⋯ωk}={λ(tri)φ(Mi)⋯λ(trk)φ(Mk)} observed at times τi,⋯τk; then Lout(stQ)={φ(Mi),…,φ(Mk)} by (3), that is, Lout(stQ)={yi/dyi,…,yk/dyk}.
In compliance with the condition that in a cycle φ(Mi)=φ(Mk), (i≠k), the behavior of each output signal can be as follows. (i) It does not change; then, the value of dyj is always zero during the cycle; therefore ∑ikdyj=0; (ii) it changes; therefore the value of φ(Mi) can be 1 or 0, if it starts in 1; the value along the cycle will be 1→0→1; therefore, dyj:0→-1→1:∑13dyj=0. If it starts in 0, the value along the cycle will be 0→1→0; therefore, dyj:0→1→-1:∑13dyj=0. That is to say, after 2n+1 steps (n: number of outputs whose value has changed), the output values must return at their initial values when reaching Mk.
According to their definition st-IPNs are an extension of PNs which include input and output signals in places and transitions (IPNs) and stochastic firing times for each transition (st-IPNs). The link with I/O signals and the capacity of including stochastic time variations make st-IPNs a powerful tool to model real systems.
4. DES Identification Method4.1. System to Identify
The generation of internal and external events in a timeline defines the behavior of the system (see Figure 1). A set of external events defines an operation mode that affects the controller and an internal event is the concatenation of control commands and sensor readings in at time instant.
Event Generator.
The system consists of the closed loop connection of a dynamic system (plant) and a control law (controller). Once the operation mode is defined (by the external events), the controller executes a control strategy by generating a sequence of control commands. This sequence input gets into the plant and activates the actuators. The system reacts and generates a sensor readings sequence (Figure 1). Therefore the behavior of the system can be described in terms of event sequences.
During a system evolution like a production cycle, it is possible to get information of the system state (by analyzing these sequences), with the language theory ([1]). Each internal event is a letter of the alphabet and a letter sequence is a word that models the system performance. Therefore, the system can be described as a regular language generator.
4.1.1. Definition of a Subsystem
To decrement the complexity of the model, the system is split into subsystems. A subsystem is a part of a system which has a particular behavior. The division into subsystems is carried out according to physical or functional criteria, because the system model to identify is unknown and is not possible to define the subsystems in other ways.
For each subsystem the inputs will be the control commands and the outputs will be the sensor readings. Control commands can be classified as global or local. A control command is global when it is applied to more than one subsystem and it is local when it is applied only to one subsystem. Therefore the control commands set is Cc=Ccg∪Ccl, where Ccg={cc1,…,ccmg} and mg is the number of global control commands; Ccl=∪ccl,ml; l=1⋯c, c is the index of the subsystem and ml is the number of local control commands in subsystem l.
Each sensor reading is assigned to a subsystem, so the set of sensor readings will be Sr=∪srl,nl, where nl is the number of sensors in subsystem l and l=1⋯c.
4.1.2. Restrictions over the System
The system has the following restrictions.
The system is closed loop controlled and its working is cyclic. Moreover, each subsystem can only be in one state at a time.
The exchanged signals between the system and the controller are discrete with only two possible values (binary coding).
Its behavior is defined by the generation of internal and external events in a timeline.
An external event affects the controller; an internal event is the concatenation of control commands and sensor readings at time instant. An external event sequence is a timed sequence which generates a system operation mode.
An internal event can only be generated by a subsystem at a time.
4.1.3. System Operation
Given an operation mode, the controller executes a control strategy then a timed internal event sequence is generated; that is, at each time the controller generates a set of control commands us={cc1,…,ccmg,ccl,1,…,ccl,ml}. This set is the input set to system which changes its state and generates an output set {yj=srl,1,…,srl,nl} containing sensor readings. us∈U;U={u0,u1,…,u|2(mg+m)|-1} and yj∈Y; Y={y0,y1,…,y|2n|-1}.
(a) Event Generator. It is a procedure that concatenates the I/O symbols at time τi when any signal changes (control command or sensor reading) from τi-1 to τi and it generates an event as ωi=(usyj)τi.
Applying this concept to system defined in definition of Section 4.1, an event in a subsystem l will be noted with the subscript l, so an event in a subsystem l is noted as ωli. Consider ωli=(ul,syl,j)τi; ul,s∈Ul; Ul={ul,0,ul,1,…,ul,|2(mg+ml)|-1} and yl,j∈Yl; Yl={yl,0,yl,1,…,yl,|2nl|-1} (see Figure 1).
Note that when there are changes in control commands or sensor readings shared by over one subsystem, the event is generated in all the subsystems involved.
4.2. Identification Process
This section presents the identification method of the DES presented in Section 4.1.
Problem 15.
Given an event sequence of size e, ω0ω1⋯ωe, generated from generator defined in Section 4.1.3(a) in a system defined as in Section 4.1, find the st-IPN that generates the same sequence.
The first step in the identification process will be the division of the system into subsystems.
Each subsystem will be identified as a st-IPN. For this purpose the identification process requires monitoring the signals exchanged between the system and the controller (I/O signals). These signals enter the event generator, which concatenates the signals and generates an internal event.
The event arrives to the identifier, which continuously builds the st-IPN which is able to generate the same event, in the same sequence and at the same time.
4.3. Identification Algorithm
The identification algorithm is shown in Figure 2. First, the system to identify has to be split into subsystems. Then, the initial conditions must be set, which consist of the initial event and the initial state. Let us assume that the system is split into c subsystems, so each subsystem will be noted with the index l(l=1⋯c).
Identification process.
The starting event for each subsystem is ωl0=(ul,syl,j)τ0, where ul,s, yl,j stand for the starting values of control commands and sensor readings, respectively, l=1⋯c at time τ0. Therefore each subsystem starts with a st-IPN with one place. The inputs and output functions will be φl(Ml,1)=yl,j/0→, and λl(trl,0)=ul,s·tl,00 and tl,00=0 is the initial value of the timer; that is, the subsystem l starts without transitions.
Following the establishment of an operation mode oi (oi∈OM), the event detection procedure generates events when any change happens in the I/O signals. It reads the input symbol and waits for the sensor setting. The next step is checking if there has been a change in one of the symbols of the I/O pair, in order to generate an event in that case.
The st-IPN identification algorithm starts with a new event (see Figure 3); then it compares the event with the previous one in order to classify it as a change in an input, in an output, or in both.
Algorithm 1 flowchart.
Update of Prel; Postl; φl(M); λl(tr); δoi(trl,ql).
The identification algorithm (Algorithm 1) follows the flow diagram presented in Figure 3. It identifies a change in a subsystem state when there is a difference between yl,j/dyl,j and the current output symbol in subsystem l. In this case, the system executes Algorithm 2, (Case 1). This algorithm creates new transitions and places when necessary and it also updates the current st-IPN marking.
The updating of Prel; Postl; φl(M); λl(tr); δoi(trl,ql) can be seen in Figure 4.
Otherwise, a change only in the input symbol will involve a transition, so Algorithm 2, (case 2) includes this new transition (if it does not exist) in the st-IPN and updates the current state of the st-IPN.
4.4. Including Time Information
This section explains how to exploit the time to solve the identification problem.
Time that must elapse from the enabling of the transition until it fires is accumulated in time data arrays δoi(trl,ql)={tl,ql1⋯tl,qlk}, where oi∈OM, ql, l stand for the indexes of the transition and subsystem, respectively, and k is the number of samples.
The goal to monitoring the process data is finding a statistical model that describes statistical behavior of each transition; therefore, the system must be observed for long time to have enough data for the statistical analysis, until the process converges. The convergence criterion is based on finding a reliable estimate.
The estimation error of population mean is the estimator we use to study the convergence of the method. It has denoted the maximal accepted difference between the population mean and the sample mean as dop.
Sample size determination is the act of choosing the number of times that the process to identify is observed. The sample size is increased until the process has been identified totally and has converged.
The number of samples needed for fitting a distribution (n) can be computed as [36–38] n=(stα/2)2×S2/d2. Moreover, the significance level (α) can be defined as Prob(|X¯-μ|≥d×μ)=α,d being the difference between the population mean and the sample mean and S2 is the sample quasi-variance. α is the risk of having an error larger than dop. Generally α is set in 0.05 [39] and stα/2 is the factor determining the length of a confidence interval of population mean.
From to equation of n, d is
(8)d=(stα/2)×Sn
Algorithm 3 is executed each time a time array gets a new value, so its size has increased. It computes d and compares it with the defined upper limit (dop). That is, where, if n≤30, stα/2=tn-1 is computed as a Student's t distribution and, if n>30, stα/2=zα/2 is computed as a normal distribution. Once dop is reached, Algorithm 3 is no longer applied to this transition and operation mode, because its distribution can be identified with the available data. Moreover, no more data is included in the time vector.
Input: δoi(trl,ql)={tl,ql1,…,tl,qlk} with k≥5, α, dop,
Output: nl,ql
for l:=1 to c
for ql:=1 to |ql|
(1) nl,ql=|δoi(trl,ql)|;
(2) compute X-, S;
(3) if nl,ql≤30 compute st=tn-1
(i) else compute st=zα/2
end if
(4) d=(stα/2)×S/nl,ql;
(i) If d≤dop
execute Algorithm 4
(ii) end if
end for
end for
Algorithm 3 first determines if there is enough data to fit a distribution, once dop is reached, that is, the size sample is sufficient, then it is necessary to find the probability density function (PDF) that fits the data. The methods of estimating the PDF fall into two main categories. One is parametric method that assumes the form of the PDF of the population which is known a priori and the collected process sample is used to determine the parameters of the assumed PDF and another category is nonparametric methods. In this procedure we analyze a set CD of specific continuous distributions known; CD={F0j(xi)}. Among the most commonly used continuous distributions it includes the normal distribution N(μ,σ2), the exponential distribution Exp(λ), and the uniform distribution U(a,b)⋯.
Algorithm 4 computes the distribution type and its parameters. Algorithm 4 uses the goodness-of-fit test (see [40]) to define the distribution type with a Kolmogorov-Smirnov test. First it computes the distribution parameters using the maximum likelihood method; second, it computes the p-value statistic as
(9)p-value=sup1≤i≤n|F^n(xi)-F0(xi)|,
where xi is the ith observed value in the sample (whose values have previously been ordered from the lowest to the highest); F^n(xi) is an estimator of the probability of observing values less than or equal to xi and F0(xi) is the probability of observing values less than or equal to xi from a specified distribution [41]; that is, F0(xi)∈CD.
<bold>Algorithm 4: </bold>Data fitting.
Input: δoi(trl,ql)={tl,ql1,…,tl,qlk}, (nl,ql), αct for contrast
test, CD
Output: F0(X)
search p-valueαct in table of Kolmogorov-Smirnov.
for j=1,…,|CD|
(i) Design goodness-of-fit test
H0:F0(X)~F0j(xi);
H1:F0(X)≁F0j(xi).
(ii) Estimate parameters of F0j(X).
(iii) Apply Kolmogorov-Smirnov test
(a) Compute p-value =sup1≤i≤n|F^n(xi)-F0j(xi)|.
(iv) If p-value≤p-valueαct,
then F0=F0j(X); break
else j=j+1.
(v) end if
end for
4.4.1. Modelling Error
The proposed identification algorithm is a tool for identifying stochastic DES which estimates the probability distributions of transitions times. Because full times population cannot be observed, there will be a modelling error. As the sample mean is the estimator of a population mean, then the modelling error is related to the difference between value estimated and the true value of the mean. The standard error of the mean is the way to measure the modelling error. The standard error of the mean is the standard deviation of sample means over all possible samples (of a given size) drawn from the population. To measure it, the root-mean-square error (RMSE) is used, where RMSE=S/n.
4.5. Global Language Reconstruction from to Language of the Subsystems
Our objective is to identify the language of global system. It is found from the language of its subsystem.
A global system event is obtained by Timed Synchronized Splice so.
Definition 16 (operation of timed synchronized splice).
Le Let Q be a system composed by c subsystems. Let ωli with l=1⋯c be c events at time τi, where ωli=(ul,syl,j)τi. A global system event, at time τi, can be obtained as:
(10)ωi=ω1i⊕⋯⊕ωci
where ω1i⊕⋯⊕ωci=(u1,sy1,j)⊕⋯⊕(uc,syc,j)=(u1,s⊕⋯⊕uc,s)(y1,j⊕⋯⊕yc,j) and (u1,s⊕⋯⊕uc,s)=usg where usg is a binary representation of sg, sg stands for all input symbols and (y1,j⊕⋯⊕yc,j)=yjg where yjg is a binary representation of jg, jg stands for all output symbols.
Then, the global system language can be built from the sequence of synchronized events of its subsystem. Therefore, the global generated language at times τ0≤…≤τk is L(stQ)=ω0⋯ωk.
Proposition 17.
Given a global system Q composed by c subsystems, the global system language L(stQ) built by the temporal synchronization of the languages of its subsystems is equal to system language, L(stQ)=L(Q).
Proof.
Let Q be a complex system with c subsystems. Let L(Q)=ω0ω1⋯ωe be an event sequence generated from generator defined in Section 4.1.3(a) and let L(stQ) be the global system language built from a sequence of synchronized events of its subsystems.
Let s=ω0ω1⋯ωe be an event sequence such that s∈L(Q) and let s1=ω*0⋯ω*e be the sequence of synchronized events of the L(stQl) with l=1⋯c.
Assuming ωe≠ω*e.
PU(s)={us0⋯use}, use={u1,s,…,uc,s} and PY(s)={yj0⋯yje}, as ωli=(ul,syl,j) for l=1⋯c. ωle=(ul,s,yl,j); ωle=(u1,s,y1,j)…(uc,s,yc,j). Based on Definition 16ω*e=ω1e⊕⋯⊕ωce then ωe=ω*e, which contradicts the initial condition.
4.5.1. Synchronous Product of st-IPNs
To find the global system st-IPN we have proposed the operation of synchronous product of st-IPNs defined as follows.
Definition 18 (synchronous product of st-IPNs).
Given a set stQ of c st-IPNs, stQ={stQ1,…,stQc} defined as (5), synchronous product of stQ is the st-IPN defined as:
(11)stQs=∥l=1cstQl,stQs=(Qs,Ωs,δs),
where Qs=(Ns,Us,Ys,λs,φs). Ns=(Ps,TRs,Pre,Pos,M0) is an ordinary PN, with Ps={P1×P2×⋯×Pc} set of places, TRs={2|Ps|-1} set of system transitions, |Ps| is the length set of places, c number of subsystems, Pre:Ps×TRs→Z+, Pos:Ps×TRs→Z+), and Ms0=M10×M20×⋯×Mc0 is the initial marking. Us={U1∪U2∪⋯Uc} is the set of input to the system. Ys={Y1∪Y2∪⋯Yc} is the set of output to the system. λs:TRs→Us·δs (labeling function that assigns an input symbol and a timer density function to each transition) and φs is defined as φs:R(Ns,Ms0)→yl,j/dyl,j; φs is isomorphic over yl,j/dyl,j.
Ωs=Us·Ys:={ωs=(ul,syl,j)} is the system alphabet.
δs:=TRs×OM→f(tTRs×OM) is a density function of transition firing time for each operation modes OM={o1,o2,…}.
In order to verify that the structure of a st-IPN solves Problem 15, we define the conditions for a PN which is considered a deterministic generator and the conditions for a system to be considered deterministically identifiable.
Let U·Y be an alphabet and let L(Q) be a language generated by alphabet; a PN is an α-Generator for L(Q) if given a set of inputs us∈PU:(U·Y)*→U*, PN generates a set of outputs yj such that the strings usyj∈L(Ql)∀us∈U with a probability greeter than 1-α.
4.5.2. Assumptions of a System so that It Is a Deterministically Identifiable (DI) System
Definition 19 enables us to set the assumptions of a system for it can be a DI system.
Let U and Y be a set of I/O observed signals of system; if given a set of inputs us∈U associated with a time t, Pyj:(Y)→yj is always the same.
Moreover, given two identical inputs us, but with different length of time and two different projections of outputs, the system can be considered DI, since length of time defines the mark to reach.
Proposition 20.
Let L(Q)={ω0ω1⋯ωk} be a system observed language, at times τ0≤τ1≤⋯≤τk; if st-IPN is a PN obtained with proposed identification algorithm then st-IPN is a α-Generator of L(Q).
Proof.
A st-IPN is a α-Generator of L(Q) if ∀s∈L(Q),s∈L(P) and if ∀s∈L(P), s∈L(Q).
Let P be a st-IPN obtained by proposed identification algorithm for L(Q).
Assuming that ss1 is a string such that s∈L(Q)∧L(P) but s1∈L(Q)∧s1∉L(P), where s=ω0,…,ωk, then the postlanguage of s is given by L(Q)/s={s1∈(U·Y)*∣ss1∈L(Q)}. Then given the event s1 with s1=ωk+1=(usyj)k+1 at time τk+1, applying the Algorithm 1 a new event generates a transition with λ(trk+1)=usk+1·ttrk+1 and the marking reached by trk+1: Mk→trk+1Mk+1 will be φ(Mk+1)=yjk+1/yjk+1-yjk and as usk+1·yjk+1 are signals vectors observed at time τk+1, (based on description of event generator, Section 4.1.3(a)), then ωk+1=(usyj)k+1∈L(P) then assumption is rejected.
Now, we assume that ss2 is a string such that s∈L(Q)∧L(P) but s2∉L(Q)∧s2∈L(P), where s=ω0,…,ωk. Then the postlanguage of s is given by L(P)/s={s2∈(U·Y)*∣ss2∈L(P)}. Then given the event s2 with s2=ωk+1=(usyj)k+1 at time τk+1, the st-IPN evolves a state from to a transition with λ(trk+1)=usk+1·ttrk+1 and the marking reached by trk+1: Mk→trk+1Mk+1 will be φ(Mk+1)=yjk+1/yjk+1-yjk, where trk+1 has not been observed and reaches states that have not been observed, but according to Algorithm 1 the construction of st-IPN is made based on reached state by the observed language, then ωk+1=(usyj)k+1∉L(P) and then assumption is rejected and therefore Proposition 20 is proved.
Moreover, L(Q)/s={s1∈(U·Y)*∣ss1∈L(Q)} reaches the mark φ(Mk+1) if Prob(φ(Mk+1),ωk+1/φ(Mk))≧(1-α)∣ωk+1∈L(Q) and if φ(Mk+1)=φ(Mi) for some i=1⋯k, then ss1 is a cycle (Proposition 12).
Definition 21.
A L(Q), where L(Q)={s∈(U·Y)*:Prob(s∣φ(M0))≧(1-α)} is DI language if ∀s∈L(Q),∧∀s1,s2∈L(Q)/s, where s=ω0,…,ωk, such as Pus:(ss1)=Pus:(ss2) then Prob(Pyj:(ss1)=Pyj:(ss2))≥1-α if they started from the same state φ(Mk).
In other words, a L(Q) is DI language, if from a state two equal inputs are given, the output symbol is always the same.
Theorem 22.
A language L(Q) is DI language if and only if ∃ an α-Generator for L(Q).
Proof.
Necessary condition: if L(Q) is a DI language, then ∃ an α-Generator.
A deterministic α-Generator for L(Q) is a st-IPN. L(Q) is a DI language, if α-Generator is a st-IPN (see Proposition 20).
Sufficient condition: if ∃ an α-Generator then L(Q) is a DI language.
Assume that the α-Generator for L(Q) is a st-IPN. Let L(P) be the generated language by α-Generator. Let s=ω0,…,ωk be a string such that L(P)={s∈(U·Y)*:Prob(s∣φ(M0))≧(1-α)}. Then, given the events s1 and s2 such that s1,s2∈L(P)/s with s1,s2=ωk+1 with Prob(φ(Mk+1),ωk+1/φ(Mk))≧(1-α) if Pus:(ss1)=Pus:(ss2), in the event ωk+1 then Pyj:(ss1)=Pyj:(ss2), based on Definition 21L(P) is a DI language and according to Proposition 13L(P)=L(Q); therefore L(Q) is a DI language.
If a st-IPN is a deterministic α-Generator for L(Q), then st-IPN generates the same observed language; therefore Problem 15 is solved.
5. Application Example
Let us illustrate the approach with an example. The proposed example is the centralized air heating system (AHS) in Figure 5. The system includes three heating subsystems. Each heating subsystem has a fan creating an air flow that is heated with hot water. The water flow is controlled by pump-valve systems. Moreover, there is a central heater providing hot water to each heating subsystem and two valves (vc1 and vc2) controlling the water flow through the whole system. The system can be split into five subsystems (1, 2, 3, 4, and 5). Subsystems 3, 4, and 5 are the local heaters, subsystem 2 is the distribution subsystem (vc1 and vc2), and subsystem 1 is the main heating subsystem (heater, main pump (pm), and reflux valve (vr)). The heater works in three modes (0, 1, 2), each state is defined by the number of resistances it has activated, so, modes 0, 1, and 2 will represent no activation of resistance, activation of h1, and activation of both h1 and h2.
AHS system.
The system is equipped with a set of sensors detailed in Table 1. Each subsystem i includes a flow sensor (Fi) that measures the presence or absence of flow in the subsystem. Nevertheless, flow level is affected when other subsystems are activated. So, a software sensor (NFi) is designed in order to measure the deviation over a normal operation flow taking into account the activation of other subsystems.
Sensor Readings.
Sensor
Subs
Readings
Meaning
Temperature T
1
T0, T1, T2,
if T < Tp1T=T0, if Tp1 < T < Tp2, T=T1, if T2 > Tp2T=T2
Flow
1
F1, NF1,
Flow, normal flow.
Position
2
Po
Valve Vc1 opened or closed
Flow
3
F2, NF2
Flow, normal flow.
Flow
3
F3, NF3
Flow, normal flow.
Flow
4
F4, NF4
Flow, normal flow.
Flow
5
F5, NF5
Flow, normal flow.
Pressure
3
P3
Pressure.
Pressure
4
P4
Pressure.
Pressure
5
P5
Pressure.
The system also includes binary temperature sensors, pressure sensors, and a position sensor for valve Vc1.
ul,syl,j is an I/O symbol based on Definition 3, where ul,s is a binary representation of s, s stands for the input symbol, yl,j is a binary representation of j, j stands for the output symbol, and l stands the subsystem index. For example, (u1,30y1,9) is an I/O symbol in subsystem 1, whose values are [11110,1001], that is, [vrpgvgh1h¯2,ToT¯1T¯2F1].
5.1. System Operation
The system globally starts with the external event “Son”; the heating subsystems are locally started with events “Ca3," “Ca4,” and “Ca5”. These events are external events that change the controller strategy (See in Figure 6). Each combination of external events generates a system operation mode. When event “Son” is generated, the controller opens the reflux valve (vr) and starts Pm (pm), the heater starts heating (temperature set point is Tp1) and the water flows through the path Heater-Pm-VR-Heater. When any heating subsystem is activated (“Ca3,” “Ca4,” or “Ca5”), subsystem 1 closes reflux valve (v¯r) and it changes the temperature set point to Tp2(Tp2>Tp1). If “Ca4” and (or) “Ca5” are started, then, the corresponding valves 1 and 2 of subsystem 2 are opened (vc1,vc2). Moreover local valves and pumps start their work when necessary (v3,v4,v5 and p3,p4,p5). Each heating subsystem is stopped with events “Ca3¯,” “Ca4¯,” and “Ca5¯” (Ca¯=Ca3¯∧Ca4¯∧Ca5¯). Then, the controller performs the closing actions; it closes the valves (v¯c1,v¯c2,v¯3,v¯4,v¯5) and stops the pumps (p¯3,p¯4,p¯5). When every subsystem is completely stopped, the system can be globally stopped with event “Soff.” Then, the controller closes the reflux valve (v¯r), and stops the heater and Pm (p¯m).
AHS system controller.
In order to demonstrate the advantages of the proposed identification method, the system will be identified over two scenarios.
The first test presented is the stand alone operation of subsystem 3 and the second test presented simulates all the possible operation modes sequentially. The identification method is additive, so after the identification of a language associated with a particular mode, the identified nets learn new languages by adding them to the previous knowledge.
Because the system cannot work if Son is not activated, there are 9 possible operations modes: OM={o0,…,o8}; where o0=Soff,Ca3¯,Ca4¯,Ca5¯, o1=Son,Ca3¯,Ca4¯,Ca5¯, and o2=Son,Ca3,Ca4¯,Ca5¯; so on. Moreover, each test includes the starting and stopping operations. Therefore testing of operation mode ox includes the sequence (o0-o1-ox-o1-o0).
5.2. Identification of Scenario 1
The number of subsystems is 5 and the initial conditions are as follows.
Definition of initial state at τ0: ω0={ω10·ω20·ω30·ω40·ω50}:
ω10=[v¯rp¯gv¯gh¯1h¯2,ToT¯1T¯2F¯1]=[u1,0y1,8];
ω20=[v¯c1v¯c2,P¯oF¯2NF¯2]=[u2,0y2,0];
ω30=[p¯3v¯3,F¯3NF¯3]=[u3,0y3,0];
ω40=[p¯4v¯4,F¯4NF¯4]=[u4,0y4,0];
ω50=[p¯5v¯5,F¯5NF¯5]=[u5,0y5,0].
Initial Output Function:
P1,1:φ(M1,1)=y1,8/0→;
P2,1:φ(M2,1)=y2,0/0→;
P3,1:φ(M3,1)=y3,0/0→;
P4,1:φ(M4,1)=y4,0/0→;
P5,1:φ(M5,1)=y5,0/0→.
The input vector arranges the control commands based on system operation as described in Section 5.1. The output vector arranges the sensor readings as in Table 1.
Once the system starts with “Son”; the controller generates the control commands when the external inputs evolve. Then the system reacts and the event generator starts generating events. (Note that the system starts with operation mode o0, then it changes to o1, and, when “Ca3” is externally activated, it changes to o2.)
With each new event, Algorithm 1 creates new places and transitions. After a complete run of the system (Soff is generated), Algorithm 1 creates the st-IPNs for subsystems 1 and 3 showed in Figure 7(a).
st-IPNs system scenario 1.
Subsystems 1 and 3
Global
At this identification stage, places and transitions are defined and the identified st-IPNs model the expected behavior of the system.
Initially, the system works in operation mode 0 (o0) as Son is not active. Subsystem 1 starts at place P1,1. Activation of “Son” changes the operation mode to o1, the controller opens the valves (reflux and main), turns on the main pump, and sets the heater in mode 1 (tr1,1). A state change (P1,2) is generated, because water flows through the path Heater-Pm-VR-Heater (F1=1) (as it is showed in Figure 5). After a time (tr1,2) temperature reaches Tp1 (18°C); therefore, the system evolves to other state (P1,3). The controller starts the heating actions; it closes the reflux valve and sets heater in mode 2 (tr1,3), the state change cannot be measured by absence of sensors that detect the operation of the reflux valve (P1,4). At this time “Ca3” is activated, so the system operation mode changes to o2; then the controller turns on pump 3 and opens valve 3 (tr3,1) and subsystem 3 changes its state to P3,2 because water is flowing through path Heater-Pm-P3-V3-Heater. After a time (tr3,2), flow reaches its normal level (NF3) and subsystem 3 changes the state to P3,3. Subsystem 1 continues with the reflux valve closed (tr1,4). It waits until reaching Tp2 (28°C) and, therefore, it evolves to P1,5. Subsystem 3 remains in P3,3 until “Ca3” is externally deactivated (Ca3¯) and o1 is reached, then normal flow falls (tr3,3) and it changes to (P3,4). Now, the controller turns off pump 3 and closes valve 3 (tr3,4). As a consequence, flow in the subsystem decreases (change to P3,5) until flow level is low F1. This transition makes the subsystem return to its initial state (P3,1). Now, the controller opens the reflux valve and sets the heater in mode 1 (tr1,5). Subsystem 1 holds the state (P1,6) until temperature is below Tp2, (P1,7), after the controller turns off the main pump, it closes the main valve and sets the heater in mode 0 (tr1,7). Subsystem 1 evolves to P1,8 and after time (tr1,8) to P1,9. Slightly, temperature decreases until it reaches the initial state (P1,1). At the end, Son is deactivated (Soff) and the system operation mode changes to o0.
Nevertheless, the time array for each transition has only one value, so no probability distribution can be fit.
As stated in Section 4, at least 5 samples are needed to identify the distributions, so scenario 1 will be repeated until each distribution for each transition will be identified.
After 5 observations of a transition, Algorithm 3 is executed. This paper shows, as an example, the case with the greatest dispersion (tr3,2) as it is the worst case.
As d>0.05, there is not enough data to fit the distribution.
After 20 observations, Algorithm 3 gives a positive result: X¯=2.75, S=0.09; d=0.049. As d<0.05, Algorithm 4 is executed and it will compute the distribution type and its parameters.
αct=0.05. p-valueαct=0.29408 in table of Kolmogorov-Smirnov, with n=20.
Hypothesis test:
H0:F0(X)∽N(μ,σ2);
H1:F0(X)≁N(μ,σ2).
Parameters estimation F0=N(μ,σ2)=N(2.75,0.09) and p-value=0.1621 based on test Kolmogorov-Smirnov.
Accept H0 since p-value≤p-valueαct. Therefore the data is normally distributed.
To do a full identification of the process it is necessary to get 20 samples of each transition time.
Figure 8 shows the mean of the time array collected for tr3,2 versus the number of acquired samples in operation mode 2. It can be seen that for 20 samples onwards the mean remains stable.
Behavior of transition tr3,2.
Thereby, the sequence of operation modes o0-o1-o2-o1-o0 is fully identified. This identification includes the st-IPNs structures and all the density functions for each transition in the net.
5.3. Complete Identification of the System
The last test performed is the sequential generation of all the possible combinations of the external events, so the system must be able to generate a really complex language. Subsystem st-IPNs are showed in Figure 9.
st-IPNs after the complete identification.
Results show the advantages of identifying subsystems instead of the global system. Figure 7(b) shows the identification of the global system (without splitting in subsystems) in scenario 1. The complexity (number of places and transitions) of this st-IPN is similar to the complexity of the st-IPNs in the case of the subsystem identification. Nevertheless, as the complexity of the system increases, subsystem identification reduces complexity. Table 2 shows a comparison of the number of sates and transitions when identifying with or without splitting the system into subsystems.
Places and transitions.
Scenario
Sub
Global
Places
Tr.
Places
Tr.
1
7
2
3
2
2
14
14
14
15
3
22
22
22
23
4
28
32
24
31
5
28
32
24
32
6
28
32
24
32
7
28
32
24
32
8
28
32
24
32
9
28
33
33
42
10
28
33
39
52
11
32
41
44
59
12
32
42
50
68
13
32
43
52
71
14
33
43
54
74
15
34
45
57
78
16
35
48
61
83
It can be seen that a global system identification increases its complexity with the number of operation modes considered, as a subsystem identification does not.
This behavior is related to the number of possible events handled by the st-IPNs. The maximum number of global system states is Q(g)max=2nt×3nt, (nt is the total number of output symbols) (6), whereas in identification by subsystem the maximum number of system states is Q(split)max=Qmax,1+Qmax,2+⋯+Qmax,c; that is, Q(split)max=2n1×3n1+2n2×3n2+⋯+2nc×3nc, where n1+n2+⋯+nc=nt, it can be seen that Q(g)max>Q(split).
5.4. Language Generation
This section shows how the observed language is generated in both subsystem and global identification approach for scenario 1.
The observed language for each subsystem is equal to the one generated by the st-IPNs:
L1=(u1,0y1,8)(u1,30y1,8)(u1,30y1,9)(u1,30y1,13)(u1,15y1,13)(u1,15y1,15)(u1,30y1,15)(u1,30y1,13)(u1,0y1,9)(u1,0y1,8) at times τ0,τ1,τ2,τ3,τ6,τ10,τ11,τ12,τ13,τ14.
L3=(u3,0y3,0)(u3,3y3,2)(u3,3y3,3)(u3,3y3,2)(u3,0y3,0)(u3,0y3,0) at times τ0,τ4,τ5,τ7,τ8,τ9.
Figure 7(b) shows the result of the identification process in case that the system is not split into subsystems. The language observed also is equal to the generated.
Lg=(u0y4096)(u7680y4608)(u7680y4608)(u7680y6656)(u3840y6688)(u3888y6688)(u3888y6704)(u3888y7728)(u3888y7712)(u3840y7680)(u7680y7680)(u7680y6656)(u0y4608)(u0y4608)(u0y4096)(u0y4096) at times τ0,…,τ15.
A global input symbol is
(12)ug={vrpgvgh1h2︷u1vc1vc2︷u2p3v3︷u3p4v4︷u4p5v5︷u5}.
And a global output symbol is
(13)yg={T0T1T2F1︷y1PoF2NF2︷y2F3NF3︷y3F4NF4︷y4F5NF5︷y5}.
Note that, for example, at time τ3, the input symbol in the global language is u7680 and at time τ4 is u3840 (see Figure 7(b)). At these times, input symbols in local subsystems are u1,30 and u3,3. In this time the output symbol in the global language is y6656 and at time τ4 is y6688 (see Figure 7(b)). Moreover, at these times output symbols in local subsystems are y1,13 and y3,2. Table 3 shows these symbols.
I/O SYMBOL IN τ3 and τ4.
τ3
τ4
τ3
τ4
ug
11110
00
00
00
00
01111
00
11
00
00
yg
1101
000
00
00
00
1101
000
10
00
00
u1
11110
01111
y1
1101
1101
u2
00
00
y2
000
000
u3
00
11
y3
00
10
u4
00
00
y4
00
00
u5
00
00
y5
00
00
According to Definition 16, a global I/O symbol, ωi, is obtained from splice of ωi=ω1i⊕ω2i⊕⋯⊕ω5i for i=3,4. Therefore the global and the subsystem approach represent the same language. Then, time synchronization splice of L1 and L3 gives Lg.
Therefore, the advantage of using subsystems is that the method identifies only active languages, which allows determining which subsystem is operating.
5.5. Timed Transitions Identification in Different Operation Modes
Transition time depends on the operation mode of the system although the device maintains its operation sequence.
Table 4 shows the parameters of tr3,2 distribution for each operation mode. So, although subsystem 3 uses the same net for each operation mode (Figure 9) it uses a different distribution in each transition for each operation mode, so it can model complex behaviors.
Parameters of tr3,2.
Operation Mode
Distribution
o0
NA*
o1
NA
o2
N (2.75, 0.094)
o3
NA
o4
NA
o5
N (1.44, 0.0966)
o6
NA
o7
N (1.35, 0.085)
o8
N (0.37, 0.0483)
*“Not applicable” means that the transition not is executed in this operation mode.
Note that time changes can be notable with changes from 0.37 seconds to 2.75 seconds.
6. Conclusions
The proposed method identifies stochastic DES without previous model as a set of st-IPNs modelling the subsystems. The identification algorithm uses on-line I/O data to identify each subsystem, and it defines st-IPNs that generate the same language as the observed one. It has been proved that these st-IPNs are unique and deterministic, a desired feature for applications such as diagnosis. In addition the proposed method identifies systems with stochastic time. This is of great importance in industrial systems because processes are affected by a number of aspects such as the variability in the material flow, the fluctuation of power supply, the deterioration of machinery and devices, among others.
The identification methodology is incremental and is directly related to the objective of modeling, that is, modeling the devices that compose the system in a constructivist way. This approach allows identifying all observable behaviors of the devices.
Some of the main advantages of the methodology (with respect to the existing ones) are that it handles a lot of inputs and outputs with low computational cost (as they are split into subsystems) and it does not need a previous knowledge of the number of places neither the length of the language. Moreover, it generates reduced size models and it includes timed information. Besides, this proposal includes a process to determine whenever the system is fully identified which has not been proposed in other research.
Future research will deal with a forgetting algorithm in order to forget behaviors that will be not more in use.
Conflict of Interests
The authors declare that there is no conflict of interests regarding this paper.
Acknowledgment
This work was supported by a Grant from the Universidad del Cauca, reference 2.3-31.2/05 2011.
CassandrasC. G.LafortuneS.ZhangY.AnJ.MaC.Fault detection of non-Gaussian processes based on model migrationBasileF.ChiacchioP.CoppolaJ.De TommasiG.Identification of Petri nets using timing informationProceedings of the 3rd International Workshop on Dependable Control of Discrete Systems (DCDS '11)June 20111541612-s2.0-8005211359710.1109/DCDS.2011.5970334IchikawaA.HiraishiK.VaraiyaP.KurzhanskiA.Analysis and control of discrete event systems represented by Petri netsFantiM. P.ManginiA. M.UkovichW.Fault detection by labeled Petri nets in centralized and distributed approachesCabasinoM. P.GiuaA.SeatzuC.Fault detection for discrete event systems using Petri nets with unobservable transitionsHuH.ZhouM.LiZ.TangY.An optimization approach to improved Petri net controller design for automated manufacturing systemsHuH.ZhouM.LiZ.Supervisor optimization for deadlock resolution in automated manufacturing systems with Petri netsHiraishiK.JensenK.Construction of a class of safe Petri nets by presenting firing sequencesSreenivasR. S.KroghB. H.Petri net based models for condition/event systemsProceedings of the American Control ConferenceJune 1991Boston, Mass, USA289929042-s2.0-0026403238RauschM.HanischH.-M.Net condition/event systems with multiple condition outputs1Proceedings of the INRIA/IEEE Symposium on Emerging Technologies and Factory Automation (ETFA '95)October 19955926002-s2.0-0029512197PatilS.VyatkinV.SorouriM.Formal verification of Intelligent Mechatronic Systems with decentralized control logicProceedings of the 17th IEEE International Conference on Emerging Technologies and Factory Automation (ETFA '12)September 2012Krakow, Poland172-s2.0-8487636799710.1109/ETFA.2012.6489678Estrada-VargasA. P.López-MelladoE.LesageJ.-J.A comparative analysis of recent identification approaches for discrete-event systemsShuS.LinF.I-detectability of discrete-event systemsLiL.HadjicostisC. N.Least-cost transition firing sequence estimation in labeled Petri nets with unobservable transitionsMeda-CampanaM. E.Lopez-MelladoE.Required event sequences for identification of discrete event systems4Proceedings of the 42nd IEEE Conference on Decision and ControlDecember 2003377837832-s2.0-1542349317Meda-CampanaM.Lopez-MelladoE.Identification of concurrent discrete event system using Petri netsProceedings of the 17th IMACS World Congress on Computational and Applied MathematicsJuly 2005Paris, France1115KleinS.LitzL.LesageJ.-J.Fault detection of discrete event systems using an identification approachProceedings of the 16th Triennial World Congress of International Federation of Automatic Control (IFAC '05)July 200592972-s2.0-79960742430RothM.LesageJ.-J.LitzL.An FDI method for manufacturing systems based on an identified model13Proceedings of the 13th IFAC Symposium on Information Control Problems in Manufacturing (INCOM '09)June 20091406141110.3182/20090603-3-RU-2001.00234SupavatanakulP.LunzeJ.PuigV.QuevedoJ.Diagnosis of timed automata: theory and application to the DAMADICS actuator benchmark problemJarvisD. E.An identification technique for timed event systems10Proceedings of the 10th International Workshop on Discrete Event Systems2010Berlin, Germany18118610.3182/20100830-3-DE-4013.00031DotoliM.FantiM. P.ManginiA. M.An optimization approach for identification of Petri netsProceedings of the 8th International Workshop on Discrete Event Systems (WODES '06)July 20063323372-s2.0-34250667850DotoliM.FantiM. P.ManginiA. M.On line identification of discrete event systems via Petri nets: an application to monitor specificationProceedings of the 3rd IEEE International Conference on Automation Science and Engineering (CASE '07)September 20078938982-s2.0-4444908500710.1109/COASE.2007.4341704DotoliM.FantiM. P.ManginiA. M.UkovichW.On-line identification of Petri nets with unobservable transitionsProceedings of the 9th International Workshop on Discrete Event Systems, WODES '08)May 20084494542-s2.0-5314909503510.1109/WODES.2008.4605988CabasinoM. P.GiuaA.SeatzuC.Identification of deterministic Petri netsProceedings of the 8th International Workshop on Discrete Event Systems (WODES '06)July 20063253312-s2.0-34250612964DotoliM.FantiM. P.ManginiA. M.Real time identification of discrete event systems using Petri netsChenY.LiZ.KhalguiM.MosbahiO.Design of a maximally permissive liveness-enforcing Petri net supervisor for flexible manufacturing systemsPiaF. M.MarcelloM. A.WalterU.Fault detection by labeled Petri nets and time constraintsProceedings of the 3rd International Workshop on Dependable Control of Discrete Systems (DCDS '11)June 20111681732-s2.0-8005211289410.1109/DCDS.2011.5970336GiraultC.ValkR.MurataT.Petri nets: properties, analysis and applicationsRamirez-TreviñoA.Ruiz-BeltranE.Aramburo-LizarragaJ.Lopez-MelladoE.Structural diagnosability of des and design of reduced Petri net diagnosersHernándezK.Meda-CampanaM. E.Fault diagnosis using Petri nets: a case studyProceedings of the 10th Latin American and Caribbean Conference for Engineering and TechnologyJuly 2012Panama City, PanamaRivera-RangelI.Ramírez-TreviñoA.Aguirre-SalasL. I.Ruiz-LeónJ.Geometrical characterization of observability in Interpreted Petri netsSupavatanakulP.LunzeF. J.Ramirez-TrevinoA.Ruiz-BeltranE.Rivera-RangelI.López-MelladoE.Online fault diagnosis of discrete event systems. A Petri net-based approachCochranW. G.BartlettJ. E.KotrlikJ. W.HigginsC. C.Organizational research: determining appropriate sample size in survey researchToutenburgH.Fleiss, J. L.: statistical methods for rates and proportions. John Wiley & Sons, New York-London-Sydney-Toronto 1973. XIII, 233 SLivingstonE. H.CassidyL.Statistical power and estimation of the number of required subjects for a study based on the t-test: a surgeon’s primerRuppertD.ConoverW.