Professional Documents
Culture Documents
Sciencedirect Sciencedirect
Sciencedirect Sciencedirect
Sciencedirect Sciencedirect
of the nominal model but modifies the firing interval of the from the enabling belongs to the interval I(tj ); moreover, an
nominal transitions. This is possible since temporal anomalies enabled transition must fire if the upper bound of I(tj ) is
modify the durations of system activities but do not affect their reached, thus enforcing urgency.
initial instant.
Given a set S, |S| denotes the cardinality of S.
Contribution of this paper is the formulation of a Mixed-
Integer Linear Programming Problem (MIPP) to repair the
given nominal TPN model of a system on the basis of an 2.2 Assumptions
observed timed sequence, in which temporal anomalies are
detected. Such temporal anomalies are modeled by an extension Assumption 1. (Observed system properties). The observed sys-
of the firing interval of the nominal transitions, i.e. an extension tem is modeled by a TPN system with the following assump-
of the lower and/or upper bound of the firing time of each tions
nominal transition. (1) Free labeled nets, i.e., there is an isomorphism between
the label set E and the transition set T . Observing the
2. NOTIONS AND ASSUMPTIONS evolution of a net, it is common to assume that to each
transition t is assigned a label, and the firing of t is an
2.1 Background on Petri nets event that generates the label as observable output. This
assumption restricts to free labeled nets the net subclass
For a complete review on Petri nets the reader can refer to Mu- considered in the proposed approach, but it allows to
rata (1989). A Place/Transition net (P/T net) is a 4-tuple N = speak of event observation as well as of firing of transi-
(P, T, Pre, Post), where P is a set of m places (represented tions without any difference. As more it implies that the
by circles), T is a set of n transitions (represented by boxes), firing of each transition can be directly observed.
Pre : P × T → N (Post : P × T → N) is the pre (post) (2) Single-server firing semantic (more details in Seatzu et al.
incidence matrix. Pre(p, t) = w (Post(p, t) = w) means (2013)), i.e., no concurrent firings of the same transition
that there is an arc with weight w from p to t (from t to p); are possible.
C = Post − Pre is the incidence matrix. A marking is a (3) Enabling memory policy of timed transitions, i.e., when
function m : P → N that assigns to each place of a net a a new marking is reached and a timed transition is not
nonnegative integer number of tokens, drawn as black dots. It is enabled, the elapsed time is reset.
useful to represent the marking of a net with a vector m ∈ Nm .
For a better presentation of the approach proposed in this paper
A net system S = N, m0 is a net N with an initial marking
the definition of timed firing sequence σ is needed. At this aim,
m0 . A transition t is enabled at m iff m ≥ Pre(·, t) and this is
it is useful to formally represent all those transitions that fire at
denoted as m[t. An enabled transition t may fire yielding the
the same time τq .
marking m = m + C(·, t) and this is denoted as m[tm .
Definition 2. (Timed firing sequence). A sequence
A firing sequence from m is a sequence of transitions
σ = (T1 , τ1 ) . . . (Tq , τq ) . . . (TL , τL ) ,
σ = t1 . . . tk such that m t1 m1 t2 m2 . . . tk mk , and
this isdenoted as m[σmk . An enabled sequence σ is denoted where Tq is the set of transitions fired at time τq and τ1 <
as m σ, while tj ∈ σ denotes that transition tj belongs τ2 · · · < τL denote firing time instants is called timed firing
to the sequence σ. A marking m is said to be reachable sequence. The position q the couple (Tq , τq ) occupies in the
from m0 iff there exists a sequence σ such that m0 [σm . sequence is called time step, so (T1 , τ1 ) is associated with step
R(N, m0 ) denotes the set of reachable markings of the net 1, (T2 , τ2 ) is associated with step 2 and so on; the number of
system N, m0 . Given a sequence σ it is denoted with |σ| its triples (Tq , τq ) in σ is called length L = |σ| of the timed firing
length. The function σ : T → N, where σ(t) represents the sequence.
number of occurrences of t in σ, is called firing count vector of The notation m[σm is used to denote that m is reached from
the firing sequence σ. As it has been done for the marking of a m by firing σ.
net, the firing count vector is often denoted as a vector σ ∈ Nn .
Definition 3. (Timed Language). Given a TPN system S =
Note that, if a sequence is made up of a single transition, i.e.,
N, m0 , I, its timed language, named L(S), is defined as the
σ = tj , then the corresponding firing count vector is the j-th
set of timed firing sequences generated by S from the initial
canonical basis vector denoted as ej .
marking m0 .
If m0 [σm, then it is possible to write in vector form
The marking the system reaches after the firing of all the
m = m0 + Post − Pre · σ = m0 + C · σ , (1)
transitions in Tq is called mq .
which is called the state equation of the net system.
This paper focuses on the context of automated manufacturing
Definition 1. (Time Petri net system,(Seatzu et al., 2013)). Let I systems, where a control architecture interacts with a plant
be the set of closedintervals with a lower bound in Q and an according to a scan time faster than the time evolution of the
upper bound in Q ∞. A Time Petri net (TPN) system is the
system. In this context the multiple firing of a transition at the
triple S = N, m0 , I, where N is a standard P/T net, m0 is same time has no sense. This motivates the next assumption.
the initial marking, and I : T → I is the statical firing time
interval function which assigns a firing interval [lj , uj ] to each Assumption 2. A transition can fire once in the same time
transition tj ∈ T . instant.
It is assumed that there is a start-up transition that fires only The set Tq is made up of nq = |Tq | transitions whose firing is
once at time zero producing tokens considered by the initial observed at the same instant τq . The firings of these transitions
marking. A transition tj can be fired at time τ if the time elapsed are enabled either by a marking mk reached at a time τk < τq
86
DCDS 2015
May 27-29, 2015. Cancun, Mexico F. Basile et al. / IFAC-PapersOnLine 48-7 (2015) 085–090 87
T
t6
t5 t5
t4
t3 T3 t4
t1, [1,3] t5, [2,2] t1, [1,3] t5, [2,2] t1, [1,3] t5, [2,2]
t2 t6
… … … … … …
t1 t3
t2, [1,4] t3, [1,3] t4, [0,0] t6, [0,2] t2, [1,4] t3, [1,3] t4, [0,0] t6, [0,2] t2, [1,4] t3, [1,3] t4, [0,0] t6, [0,2] τ0 τ1 τ2 τ3 τ ≡
… … … m0 m1 m2 m3 m q
3 3 3
Fig. 1. (a)-(c) Evolution of the net system; (d) enabling and firing time of each transition of the net: for timed firings of transitions,
dots represent the enabling instant, the arrow points individuate the firing instant and the length of the arrows coincides with
the firing duration value; diamonds individuate enabling and firing instants for immediate firings of transitions; (e) firing
sequence for T3 .
or by the firing of another transition fired at τq with null firing of concurrent transition firings. Hence, firing of transitions in
duration. Tqim can be considered occurred in nimq substeps; each substep
Definition 4. (Firing Duration). Given a timed transition tj is denoted qs , with s ∈ [2, nim q + 1]. Finally, it holds that
fired at q-th step, enabled at k-th step, so that mk [tj , let mk nim
+1
Tqim = s=2 q
Tqim .
be the first marking that enables tj since its previous firing, s
the function δ(tj , k, q) : T × N × N → Q returns the time As shown in Fig. 1(e), the marking reached after the firing of
elapsed from the enabling of tj at τk until its firing at τq , i.e. transitions in the last of these subsets corresponds to mq ; as
δ(tj , k, q) = τq − τk . more the firing sequence associated to T3 = {t3 , t4 , t5 , t6 } is
shown. In detail, T3t = {t3 , t5 }, T2im = {t4 , t6 }; as more,
From now on, δ(tj , k, q) is referred as the firing duration of the
im
T32 = t4 , T33 = t6 . In figure, triangles indicate the
im
transition tj ∈ Tq from the marking mk . When δ(tj , k, q) = 0 firing of timed transitions that leads to the reaching of the first
the firing of tj at τq is called immediate, otherwise, when marking m31 , while diamonds indicate the immediate firings
δ(tj , k, q) > 0 the firing of tj is called timed. of transitions in T3im .
Let m0 be the initial marking of the system, the set of candidate
markings for the enabling of a transition tj ∈ Tq can be 3. PROBLEM FORMULATION
formally defined as M(tj , q) = mk | ∃σT , σT , σ = σT σT ,
Temporal anomalies can be modeled as an extension of the
k [σT mq , with tj ∈ σT , k < q : τk + lj ≤ τq ≤
m0 [σT m
firing interval of the transitions. As far as the observed behavior
τk + uj , having cardinality |M(tj , q)|. of a system where temporal anomalies occur, the firing of
The set Tq can be partitioned into the couple of sets (Tqt , Tqim ): transitions at an unexpected time with respect to the model
is observed. The firing of a transition tj occurred at time τq
Tqt = {tj ∈ Tq | ∃k, mk ∈ M(tj , q)} is the set of transitions
is enabled by a marking mks reached at a time τk ≤ τq : a
fired at τq with timed firing, with cardinality ntq = |Tqt |; temporal anomaly occurs when τq is such that τq − τk ∈ / I(tj ).
q , is the set of transitions
Tqim = Tq \ Tqt , with cardinality nim In particular if τq is lower than τk + lj an early firing of tj is
fired at τq with immediate firing. observed while if it is grater than τk + uj a delayed firing of tj
The firing of transitions in the set Tqt is concurrent, however occurs.
each firing can have been enabled at a different marking. As In practice a large set of malfunctionings can be modeled as
example consider the system of Fig. 1(a) and assume that temporal anomalies (a slowing down of a conveyor belt speed
the sequence σ=({t1 }, τ1 ) ( t2 , τ2 ) ( t3 , t4 , t5 , t6 , τ3 ) is due to the wear, a shorter duration of a work phase due to an
observed. At step 3, on the basis of the nominal model of the incorrect handling of the operator, a casual change in a timer
system, the set T3 can be decomposed in the couple (T3t = duration, etc.) while there are some other malfunctionings, as
{t3 , t5 }, T3im = {t4 , t6 }). for example breakdowns or changes in work phase sequence,
As shown in Fig. 1(d), the firing of t5 and t3 have been enabled that cannot be modeled just extending the transition firing
at m1 (Fig. 1(b)) and m2 (Fig. 1(c)), respectively but, since the interval. To model this kind of faults, the net structure must be
firing duration of t5 from m1 is equal to 2 while δ(t3 , 2, 3) = 1, changed. However, in this paper only temporal anomalies are
their firings are observed at the same time τ3 . considered.
Denote by mq1 , the marking reached by firing of transitions Goal of this work is to opportunely modify the transition firing
belonging to Tqt , i.e., with reference to the example of Fig. 1, intervals, every time that the occurrence of a temporal anomaly
is detected during the system observation, in the manner that
after the firing of transitions {t3 , t5 } ∈ T3t marking m31 is
the obtained system is able to generate the observed language.
reached.
The approach is based on the formulation of a MIPP.
On the other hand, the firing of transitions in Tqim may be
sequential as well as concurrent. Given the set of transitions 4. TEMPORAL ANOMALIES MODELING ALGORITHM
Tqim , these transitions can fire in any order, that, anyway, can
include concurrent transition firings. Denote mqs , with s ≥ 2 The algorithm shown in Fig. 2 describes the steps to execute to
the marking reached after the immediate firings of transitions. repair the system model on the basis of the current observation.
Given the firing sequence associated to the set Tqim , it can Let N, m0 , I nom be the nominal model of the system. Ini-
be considered made up of the union of nimq disjoint subsets tially it is assumed that the current model of the system,
87
DCDS 2015
88
May 27-29, 2015. Cancun, Mexico F. Basile et al. / IFAC-PapersOnLine 48-7 (2015) 085–090
Start
88
DCDS 2015
May 27-29, 2015. Cancun, Mexico F. Basile et al. / IFAC-PapersOnLine 48-7 (2015) 085–090 89
89
DCDS 2015
90
May 27-29, 2015. Cancun, Mexico F. Basile et al. / IFAC-PapersOnLine 48-7 (2015) 085–090
Table 1. Meaning of transitions of the case study. online, if the durations of system activities change while their
initial instant does not, without modifying the structure of the
Transition Event PN nominal model but just acting on the firing interval of nom-
t1 (t2 ) C1 (C2) has arrived at a (b). inal transitions. Such an approach can be used in the context of
t3 (t4 ) C1 (C2) has arrived at c (d). model repair as a first repairing step, as example for systems
t5 Both cars have arrived at destination.
where the observed temporal anomalies under a fixed threshold
t6 Both cars have returned in their home position.
t7 Cycle starts again.
must not be considered as a fault, but only as an effect of system
degradation.
the solution minimizes the extension of the firing interval I(tj )
for each nominal transition. REFERENCES
The computational complexity of (7) can be characterized in Basile, F., Chiacchio, P., and Coppola, J. (2013). An ap-
terms of the number of constraints and unknowns that com- proach for the identification of time Petri net systems. IEEE
posed it, i.e., the number of constraints and unknowns of G(σ). 18th Conf. on Emerging Technologies Factory Automation
Let Nanq be the number of temporal anomalies detected at time (ETFA13), Cagliari, Italy, 1–8.
τq , then the number of constraints of G(σ) is 5 · Nanq while Cabasino, M.P., Giua, A., Hadjicostis, C.N., and Seatzu, C.
the number of unknowns is 4 · Nanq (precisely, 2 · Nanq real (2014). Fault model identification and synthesis in Petri nets.
unknowns representing the lower and upper extension of the Discrete Event Dynamic Systems, 1–22.
firing interval and 2 · Nanq boolean dummy variables). Cook, J.E., He, C., and Ma, C. (2001). Measuring behavioral
correspondence to a timed concurrent model. IEEE Int. Conf.
5. CASE STUDY on Software Maintenance, 332–341.
Fahland, D. and van der Aalst, W.M. (2012). Repairing process
The considered example is an adapted version of the system models to reflect reality. In A. Barros, A. Gal, and E. Kindler
used in Ould El Mehdi et al. (2012): it is made up of two cars (eds.), Business Process Management, volume 7481 of Lec-
C1 and C2 (Fig. 4(a)), that starting from an arbitrary position in ture Notes in Computer Science, 229–245. Springer Berlin
the home space (delimited by points h1A and h1B for C1 and Heidelberg.
h2A and h2B for C2, in the figure) move independently to reach Giua, A. and Seatzu, C. (2005). Identification of free-labeled
points a and b respectively. When C1 (C2) arrives at a (b), the Petri nets via integer programming. 44th IEEE Conf. on
car starts to move along right direction until c (d) is reached (the Decision and Control (CDC05), Seville, Spain, 7639–7644.
time units (t.u.) a car takes to arrive in the designed points are IEEE Task Force on Process Mining (2012). Process mining
shown in the figure). Then, C1 (C2) stops and remains in this manifesto. In F. Daniel, K. Barkaoui, and S. Dustdar (eds.),
state until both cars are in their right positions. It takes from Business Process Management Workshops, volume 99 of
1.7 to 2 t.u. to return cars in home position, then a new cycle is Lecture Notes in Business Information Processing, 169–194.
immediately started. Springer Berlin Heidelberg.
Merlin, P.M. (1974). A study of the recoverability of computing
The net modeling the nominal behavior of such a system is systems. Ph.D. thesis, University of California, Irvine.
shown in Fig. 4(b); in Table 1 the meaning of each transition Murata, T. (1989). Petri nets: Properties, analysis and applica-
is reported. tions. Proceedings of IEEE, 77(4), 541–580.
c
Cplex has been used as optimization tool. Ould El Mehdi, S., Bekrar, R., Messai, N., Leclercq, E., Lefeb-
vre, D., and Riera, B. (2012). Design and identification
Consider the timed sequence σ = ({t7 }, 0) ({t2 }, 1) ({t4 , t1 }, of stochastic and deterministic stochastic Petri nets. IEEE
3.5): it is an anomalous sequence since 1) an early firing of t4 Trans. on Systems, Man and Cybernetics, Part A: Systems
and 2) the delayed firing of t1 are observed at time τ3 = 3.5. and Humans, 42(4), 931–946.
The solution of the problem G(σ) when the objective function Ramchandani, C. (1974). Analysis of asynchronous concurrent
is the one in (8), leads to the the following firing interval systems by timed Petri nets. Technical report, Massachusetts
Institute of Technology, Cambridge, MA, USA.
[l1 , u1 + 2.2] if j = 1 Rogge-Solti, A. and Kasneci, G. (2014). Temporal anomaly
I ext (tj ) = [l4 − 0.5, u4 ] if j = 4 detection in business processes. In S. Sadiq, P. Soffer,
I(tj ) ∀j ∈/ {1, 4} and H. Völzer (eds.), Business Process Management, vol-
ume 8659 of Lecture Notes in Computer Science, 234–249.
The occurrence of σ can have been caused by the following Springer International Publishing.
temporal anomalies: 1) an early arrive of C2 to the point c, that Seatzu, C., Silva, M., and van Schuppen, J.H. (eds.) (2013).
can be due to an increase of C2 speed or to an accidental change Control of Discrete-Event Systems, volume 433 of Lecture
of position of the corresponding sensor and 2) the delayed Notes in Control and Information Sciences. Springer.
starting of C1. As consequence 1) the lower bound of t4 has van der Aalst, W.M. (2014). Process mining in the large: A
been reduced of the amount ∆l4 = 0.5 and 2) the upper bound tutorial. In E. Zimányi (ed.), Business Intelligence, volume
of t1 have been increased of the amount ∆u1 = 2.2. 172 of Lecture Notes in Business Information Processing,
33–76. Springer International Publishing.
6. CONCLUSION
90