@ IFAC Integrated Systems Engineering, Baden·Baden, Gennany, \994
Copyright
SIMPLIFICATION OF STOCHASTIC PETRI NETS USING A DECOUPLING METIlOD. L. AMODEO, A. ELMOUDNI, M. FERNEY and S. ZERHOUNI. Laboratoire de Mecanique et Productique. Ecole Nationale d'lllgenieun. Espace Bartholdi - Belfort Techllopole. BP 525 - 90012 Belfort. FRANCE.
Abstract : This paper concerns the simplification of stochastic Petri net model, possessing the property of double scale of time. This simplification uses the singular perturbation method. The stochastic Petri net is transformed in a Markov chain in discrete time and discrete state space. Then, by application of singular perturbations, our model is decomposed ~ two subsystems. The part that has the greatest influence 0!l th~ system IS only preserved. Then the reverse process determines the slDlplified graph that corresponds to the most influential part of the system. An example stemming from an industrial repair cycle validates the step used. Key Words. Stochastic Petri Nets - Model reduction - Singular perturbations Markov Chains.
the SPN. After, we are interested in the simplification of SPN models from the works applied in the model reduction of Markov Chain. We transform the SPN into a MC and we apply a simplification method based on the singular perturbation method [MOU 85]. This method decomposes the model into subsystems. In these subsystems, the analysis and the performance evaluation can be more easy obtained.
1. INTRODUCTION The necessity for quick modification of manufacturing workshops have generated a lot of tools and methods for system modeling and manufacturing system analysis. Now, such an analysis is confronted to systems that are more and more complex. The presence of a great number of influence factors in the system behaviour makes the choice of models a difficult problem. In this case, stochastic models have their utilities. They describe at best the set of random phenomena of system behaviour. Now, among all modeling forms, we choose the modeling form of Stochastic Petri Nets [DA V 93],[DAV 89],[FLO 85] and the modeling form of Markov chain [FEL 68]. In the fist part of this article, we make a bond between the Markov Chain (MC) and the Stochastic Petri Nets (SPN). This bond is a relation between the matrix stemming from the MC and the matrix stemming from
2. RELATIONSHIP BETWEEN THE TWO MODELING FORMS. We study first the bond that exists between the two modeling forms, one with Markov Chain and the other with Stochastic Petri Net. 2.1. Modelisation. We recall briefly the properties and the defmitions that characterise the two types of stochastic system modeling.
219
2.1.1. By Markov chain.
The initial marking is a P-vector with nonnegative integer entries. This integer is ~terpreted as the number of tokens in place pI. The evolution of the Petri nets is characterised by the circulation of tokens, which stay in places and are consumed then produced by transition. A transition is enabled whenever there is at least one token in each of its input places; otherwise, the transition is disabled. A transition fires by removing one token from each of its input places and adds one token of its output places. We assume that the fIring of a transition takes place as soon as it is enabled. Firing of transition causes changes in the marking of the net We note Mk • the marking vector of the SPN after k fIring. from the initial marking. For a given initial marking. the marked graph G can be constructed by connected a marking Mj from a marking Mi. with a directed arc if the marking Mj can result from the fIring of some transition enabled in Mi. We associate an each arc a firing rate that depend of the firing rate of the transition qi. and the marking of its input places. We obtain the Markovian process generator A from the marked graph. A is a square matrix with a dimension n*n. n is a number of reachable marking. We explain this in the following figures. After the construction of the marked graph (fig. 1). we determine the generator A (fig.2).
Definition: This is an homogenous Markovian stochastic series, on the discrete time and countable state space. For studied the Markov Chains, we take the fundamental equation under the form : (1) P(k+ 1) = P(k). 't P(k)= {PI (k), ... ,Pj(k), ...•Pn(k)} with i E {1.2.3 ......n} is the state probability vector at the instant k. PiCk) is the probability to be in the state i at the instant of k time. 't is the transition matrix. The elements of 't. called Pij have the following properties: o< Pij S; 1 'Vi. 'Vj (2) {~~ IP" = 1 'Vi ~J= lJ The transition probabilities are independent of the instant where the system is observed. Steady state study. We are interested to know the asymptotic behaviour of the Markov Chain. That mind. when the system is in the steady state. Consider that the Markov Chain have the ergodicity property. We have the following fundamental equation: P(-) = P(-). ~ (3) or more P(-). (~-I) = 0 (4) with 1) = ~ -I : the dynamic matrix. Now. after the resolution of the system:
P.']) =0. { P1(-)+... +P
(5)
n (-) = 1.
We determine the state probability vector in theinfinity: P(-) = {PI (-) ..... P n(-)}. 2.1.2. With stochastic Petri Nets.
Fig.1. Marked graph
A Petri net is a pair (q,J,1). q is a bipartite graph q ... ('JI,~) with lIthe finite set of nodes and ~ the set of arcs. The set 11 is partitioned into the disjoint sets of P(the set of places) and 'T(the set of transitions); the set of arcs ~ consists of pairs of the form (Pi.qj) or (qj.pi) with pi E P
A
=
[~2 ~7 ~]
o 1 -1 Fig2. Markovianprocess generator associated to the SPN. In the general case. we obtain :
The markin~. A marking of a Petri net is an assignment of zero or more tokens to the place in the net
220
- I,alj A=
.. J.11j··
J.1il
Markovian process. We propose then a transformation of this matrix A into a stochastic matrix that represents the transition matrix of the stochastic Petri net model. We show the parallel during the calculation of the steady state probabilities.
J.11n J.1in
(6)
J.1nl .. J.1nj·· -lanj The elements of the matrix A are obtained in the following way.
P.1> = 0. { P.A=O.
1) The element out of diagonal aij (htj) is equal to the fIring rate J.1ij for the marking i to the marking j : aij = J.lij.
We know that the vector P corresponds in the two cases to a state probability vector or a marking probability vector, then we deduce the relationship : A = k. '1). (10) k is a real coefficient. We determine it in the next way. The process is initiated by the reduction of the elements aij that compose the generator A. We are required that the elements of A are inferior to the unit. Then, we obtain a condition on k : k ~ maxI (aij) (11) this condition gives us therefore: oS aij S 1 'Vi, 'Vj, i ;t j
2) The element of diagonal represents the complement of zero from the line i. n
aij = - Iaij = ail + ... +ain
(7)
j=l
Finn ~ time. For stochastic Petri nets, the fIring time of a transition qi is a random variable whose average value is noted di with di E 9t+ .We consider that random variables have an exponential distribution function. All the timing are stochastic independent
{-1 Sa .. SO
'Vi (12) The general passage relation allowing to obtain a transition matrix from the generator A becomes: 1 't A =- A+ I (13) k I = identity matrix of dimension n*n. A = generator of the Markovian process. 11
Steady state study. We want to study the state probabilities of the stationary behaviour. These are the steady probabilities to be in a given marking. Let P a line vector with a dimension n, where the element i noted Pi represents the probability to be in the marking Mi. The steady state probabilities are obtained by resolution of the system: Pn(OO)' A=O { IP}:
=1
(9)
't A = [Pij] = transition matrix of the SPN. Its components have the following properties : OnS Pij SI
(8)
'V.i, 'Vj
(14) { Ipij = 1 'VI j-l For our study, we decide to fix a value for the coefficient k (according to [LIN 91]). k = 1.02 * maxI (aij) (15) Then, with all generator A obtamed from the marked graph, we can calculate the transition matrix of the SPN. This general passage relation allows us to use the fundamental equation for a Markov process. P(k+ 1) = P(k). 't A (16) The double advantage of this formula is one to determine values of state probabilities in each instant k; and the other one is to use a decoupling form using the singular perturbations (see [RAC 94]).
k=l
The two relationships (5) and (8) have the complementarity propeny. This allows us to establish the passage relation from one to the other.
2.2. Relationship between the two modeling fonns. Here, we establish a relationship between the generator of the Markovian process determined with the model in SPN an the transition matrix determined with the model of Markov chain. The generator of the Markovian process noted A, is obtained by the construction of the marked graph of the SPN. This matrix A isn't a stochastic Matrix. In this form, the generator A can not be used as a transition matrix of a
221
The probability vector is decomposed in two parts : a slow part we note L and a quick part we note R. Then, we transform this equation into a singular perturbation form:
3. SINGULAR PERTURBATIONS. The recent works of simplification on Markov chains by the singular perturbation utilisation, can be applied to the simplification of stochastic Petri nets. This approach can be made because a bond exists between the two modeling forms [HAA 91]. A condition is retained for the application of this method. It is necessary indeed that the MC deduced of the SPN has the property of double scale of time. If this condition is realised, the initial system is composed of one subsystem comprising the totality of states that have a strong probability to exist and an other subsystem that comprises states having a strong probability to appear. We have shown previously that it is possible to obtain a transition matrix stemming from the Markovian process generator A of an SPN. The transition matrix is a stochastic matrix. We fmd the same configuration of transition matrix from Markov chains. This similarity allows us to apply the singular perturbation method on the transition matrix stemming from the SPN. We make the process defmes fig 3.
[Lk+l Rk+d=[Lk t·
t A12] tA21 tA22 t·
(19)
with t A21 =~ et tAn =..:All. ~
~
The coefficient of perturbation J.1 is the ratio between the maximum eigenvalue of the low probability and the minimum eigenvalue of the high probability. This coefficient allows to homogenise the elements of the matrix t A . After, we obtain by the decoupling of t A:
[Lk+l Rk+I]=[Lk
Rk].['t~ 't~]
(20)
For our study, we are interested only of the slow pan. So, the singular perturbation method applied in a stochastic process gives us:
'tAL = 'tAll
(21)
This part corresponds to the preponderant part. It gathers the totality of the strong transition probabilities. This matrix is close to a stochastic matrix. We can make the reverse process and obtain the generator AL, that regroups the preponderant part of the stochastic Petri net model. We use the reverse formula: AL = k.('t AL -I) (22) Then the marked graph stemming from the generator AL can be constructed. This marked graph is a graph that regroups the totality of strong probability marking. This simplification of model give the advantage to extract to a complex system, the totality of states that have a strong influence in the system.
Fig. 3 : process of calculation. The decoupling method is initiated by the fundamental equation of the Markov chains. This fundamental equation is like a state equation.
4. APPLICATION Repair of a park of machines. This example concerns the repair cycles of a production workshop comprising a totality of four machines. The SPN describes the repair process of these four machines composing the workshop or the islet of production. Each place Pi represents a machine Mi. The circulation of the token in the four places represents the successive machine repair by a team of maintenance.
P(k+l) = P{k) . 't A' (17) When the system has the property of double scale of time, we have the following equation:
[Lk+l Rk+d=[Lk Rk].[t;-ll ~AI2] tA21 ·"A'12
~.Rk].[tAll
(18)
222
First, we construct the ma..ked graph (fig.S) from the SPN. (fig4).
with the coefficient: k = 1.02 * max. (aij) = 1.02 * 18 = 18.36. The system is decomposed in two strong probability values corresponding to the slow part and two high probability values corresponding to the rapid part. If we are interested only in the preponderant part, the system becomes:
't' =[.9455 .0545] A .1089 .8911 and also by return to the markovian process generator with the following reverse fonnula : A =('t A - I) . k (24) and by numerical application:
A=[-1
1]
2 -2
With this result, we construct the simplified marked graph (fig.6.) and we deduce the SPN associated with the graph (fig. 7).
Fig.4. RdPSjrom the repair process. 9
Fig.6. Marked graph associated to the high probability.
Fig.7. SPN deduces from the marked graph (fig.6).
Fig.5. Marked graph from the SPN. Markovian process generator associated to the marked graph.
Validation ofresults. We compare steady state probabilities for the marking Ml and M2 that are preponderant in the marked graph. This comparison allows to validate the model simplification. In the initial system, we obtain the probabilities in the infinity : P(1) = 0.6194 P(2) = 0.3097 Probabilities in the infinity for the decomposed system: P(1)' = 0.6666
-2 1 0 1 2 -4 1 1 A= 8 8 -17 1 9 9 0 -18 The matrix 'tA is obtained from A with the relationship:
223
P(2)' = 0.3333 The model simplification, we have made,
[LIN 91] LINDEMANN C. An improved numerical algorithm for calculating steady state solutions of deterministic and stochastic Petri net models. Proceeding of the 4th International Workshop on Petri nets Performance models. Melbourne - Australia - 1991. [RAC 94] RACOCEANU D. ELMOUDNI A. FERNEY M. ZERHOUNI S. Use an homographic transformation jointly to the singular perturbation for the resolution of Mar/cov chains. Application to the operational safety study. IEEE Conference on Robotics and Automation. San Diego, California - May 8-13.1994.
gives us therefor an error on the probability to obtain the two marking in the stationary behaviour : Err(Pl) = 7.6311 % Err(P2) = 7.6230 % The simplification of this model gives good results since we obtain an error that is inferior to 8%. This steady state analysis shows therefore that most frequent repairs undertake on machines 1 and 2. This information allows to intensify preventive repairs on these two machines. ~" • '..
+
0.. 0.6
•••
......-
MuI
MuI
....+++ ...........................++ . . ..
f
OA :"+:"¥~....v........,x~$;:;t.t~~~:~:.:*.t'~t.t.t.'!:.!:~.'!'.'!:_·..·.t~ .~.!::::!.
0.2
,..(.':-+
.It.................................................................................... . 10
40
50
Fig. 8 : Evolution of the state probabilities . The graph of the (fig.8) shows the probabilities evolution of the initial system and the decomposed system in function of the time. We distinguish a minimal difference between state probabilities of the marking 1 and 2. This graph validates our method of simplification.
5. REFERENCES. [DA V 93] DA VID R. ALLA H. Petri nets for mode ling of dynamic systems. Belgium French - Netherlands' Summer School on Discrete Event Systems. Spa - Belgium. June 1993. [DA V 89] DA VID R. ALLA H. Du grafcet au reseau de Petri. Traitts des nouvelles technologies. Hermes. Paris 1989. [MOU 8S] EL MOUDNI A. Contribution a la modelisation et a l'analyse des systemes discrets a echelles de temps multiples. Application a la commande optimale. These d'Etat. Lille 1985. [FEL 68] FELLER W. An introduction to probability Theory and its applications. Vol. 1. Wiley 1968. [FLO 8S] FLORIN G. Reseau de Petri stochastiques : Theorie et techniques de calculs. These de doctoral d'ttat es sciences. Universite Pierre et Marie Curie. Paris 6 - 1985. [HAA 91] HAAS P.J. SHEDLER G.S. Modeling power of stochastic Petri nets for simulation. Probability in the Engineering and Informational Sciences. N° 5 - 1991.
224