You are on page 1of 11

Proc.

of World Congress On E-Learning, Education and Computer Science, International


conference on Advanced Studies in Computers Science and Engineering 2014, (ICASCSE’2014)
Jun 13-15 Hammamet, Tunisia.

Petri Nets approach to simulate and control of Flexible Manufacturing


Systems
Mowafak Hassan Abdul-Hussin, Central Technical Information’s & Communications, University of
Technology, Baghdad, Iraq. E-mail: mow_abdul2007@yahoo.com

Abstract— This paper presents deadlock prevention is system), computer systems, workflow, communication
used to solve the deadlock problem of flexible protocols, web service, and software engineering
manufacturing systems (FMS). Petri nets contain been verification.
successful as one of the most powerful tools for The main advantage of Petri Nets are the availability of
modelling on FMS. Their modelling power and a comfortable mathematical methods in order to determine
mathematical arsenal supporting the analysis of the features structure of Petri Nets such as the so-called
modelled systems stimulated the increasing interest in liveness or the absence of deadlocks (non-resolvable
Petri nets. With the structural object of Petri nets, siphons blockades). The associated mathematical methods are
are important to the analysis and control of deadlocks in often included in the modelling tools and therefore allow
Petri nets (PNs) excellent properties. The deadlock a fast verification of features like the absence of
prevention method is caused by the unmarked siphons deadlocks. Petri nets have been significant as one of the
during the Petri nets are an effective way to model, most powerful formal methods of modelling FMS. The
analyze, simulate and control deadlocks in FMS is reason is that they are well suited to represent such FMS
presented in this work. The characterization of special characteristics as precedence relations, concurrence,
structural elements in Petri net so-called siphons has been conflict, and synchronization. Their analysis methods
a major approach to the investigation into deadlock- used for deadlock prevention in FMS include structural
freeness in the canter of FMS. The siphons are structures analysis and reachability graphs.
which allow for some implications on the net's can be A deadlock is a state where a set of parts are in “a
well controlled by adding a control place (called a circular waiting”, i.e., each part in the deadlock set waits
monitor) for each uncontrolled siphon in the net in order for a resource held by another part in the same set [9].
to become the deadlock-free situation in the system. Deadlock problems can cause unnecessary cost (e.g. long
Finally, We proposed the method of modelling, downtime and low use of some critical and expensive
simulation, controls of FMS by using Petri nets, where resources), particularly important to be solved in Flexible
deadlock analysis has a Production line of parallel Manufacture Systems. To develop efficient algorithms to
processing is demonstrated by a practical example used improve and optimize the system performances while
Petri Net-tool in MATLAB, is effective, and explicitly preventing deadlock situations becomes a basic
although its off-line computation. requirement in running in FMS [1, 6, 7, 10-16, 20-27].
Therefore, it is necessary to develop an effective FMS
Keywords: Petri net, Deadlock, Siphon and Trap, control policy to make sure that deadlocks will never
Simulation, Toolbox PN-Tool 2.3 occur to such systems. Deadlock is first defined in
computer scientists when the time evolution of
1. Introduction developing resource allocation logic in operating systems.
Petri nets are powerful graphical and mathematical In particular, Petri nets have also the deadlock property,
modelling tools for the modelling, control, analysis, which is using to control systems to be deadlock-free.
simulation and design of asynchronous sequential and There are three strategies to deal with deadlock [4, 9]:
non-sequential behaviors, concurrent systems, that allows deadlock prevention, deadlock avoidance, deadlock
describing and analyzing complex systems exhibiting detection, and recovery. In particular, prevention methods
concurrency [17]. Multiple resource sharing is a common outlaw circular waits among concurring jobs of the design
situation in parallel and complex manufacturing processes stage and off-line. Detection and recovery approaches use
and may lead to deadlock states. PNs allow to model and a monitoring mechanism for detecting the deadlock
visualize systems, which contain concurrence, resource occurrence and a resolution procedure for appropriately
sharing or synchronization. Applications of Petri nets are preempting some deadlock resources. Moreover, deadlock
included computer communication networks, automated avoidance schemes for manufacturing processes prevent
manufacturing systems (especially flexible manufacturing

75
DOI : 01.WCEECS.2014.1.13
© N&N Global Technology 2014
circular waits from occurring by the proper operational constraints on some classes of RASs can help in
control of part flow. developing specific algorithms to compute to siphon in a
There are many research papers devoted to deadlock more efficient way. The aim at this analysis was to
problems. In our approach, we have adopted Petri nets as determine which methods could take advantage of the
a tool for modelling the dynamic behavior of the system. specific syntactical structure of S4PR nets and of the fact
This tool has also been adopted in several papers related that the siphons related to deadlock problems must
to the study of deadlock problems with FMS contain at least one resource place.
environments [1-7] [9-16] [20-27]. For a general class of Abdallah and El-Maraghy (1998) [1] developed a dead-
Petri net models, in (Viswanadham et al. (1990) [26]) lock prevention and avoidance methods based on the
both deadlock prevention and avoidance control policies structure theory of Petri nets for a class called Systems of
are proposed. The first one is based on the net Sequential Systems with Shared Resources (S4R). They
reachability graph, while the second one is based on a proposed S4R, which is a generalization of S3PR nets, to
look-ahead procedure that searches for deadlock extend S3PR and (PPN) nets to model systems that can
situations by simulating the system evolution for a pre- use not only alternative resources, as in S3PR nets, but
established number of steps. Because the avoidance they can also utilize more than one resource
policy does not assure that deadlocks are not reachable, simultaneously. They adopted a deadlock prevention
they propose to combine this policy of a deadlock policy by adding a control place for each siphon to remain
recovery system. marked for all reachable marking. Further, they
In Banaszak and Krogh (1990) [2], a Deadlock introduced a deadlock avoidance policy (DAP) to control
Avoidance Algorithm (DAA) is proposed to a class of the augmented S4R nets using a resource allocation policy
FMSs called Production Petri Nets (PPN), a class of Petri based on the unsafe marking concept. With a look-ahead
nets models formed into a set of sequential processes procedure, the controller determines one-step of the future
(without alternatives in its execution) that use a resource evolution of making a resource allocation decision.
in each state. The algorithm controls the input of new However, it may be in the deadlock in some cases and a
tokens in a model "zone's", assuring that system recovery procedure can initiate.
evolutions always possible. For the same class of FMS Chu and Xie (1997) [5] have developed a fast deadlock
(PPN) a deadlock prevention policy was proposed to Xing detection approach based on mixed integer programming
et. al. (1997) [27]. Based on the concept of deadlock (MIP) for structurally bounded nets whose deadlocks tied
structure, a necessary and sufficient liveness condition for to unmarked siphons. Since no explicit enumeration of
a PPN was proposed. Banaszak et. al (2002) [3] siphons is required, this formulation opens a new avenue
developed a new approach to the distributed deadlock for checking deadlock-freeness of large systems. The
avoidance control for Flexible Manufacturing Systems. MIP method is able to find a maximal siphon unmarked at
They constructed feasible deadlock avoidance rules for a reachable marking. A feasible solution corresponds to
exploiting the information about resource requirements of maximal unmarked siphons while there exists a siphon
each particular operation of a manufacturing process that can be emptied at a marking that is reachable from
and/or the repetitive character of the material and data the initial marking. Based on this, they can formalize an
process flow. algorithm that can efficiently obtain a minimal siphon
from the result of the MIP method. Deadlock control is
Petri Net modelling an FMS's as Simple Sequential usually concerned with minimal siphons.
Process with Resource (S3PR) nets has been introduced
into Ezpeleta, et. al. (1995) [7]. S3PR is an extension of Huang et al. (2001) [11] proposed a minimal siphon
PPN in Banaszak et al. [2]. A circular wait situation extraction algorithm such that the complete siphon
occurs, to S3PR just as PPN. The Petri Net model is based enumeration was successfully avoided. Also, Huang et al.
on the arrangement of machines, rather than on the (2006) [12] proposed some iterative deadlock prevention
working process of the parts. In order to avoid the policies based on the MIP. In their methods, two kinds of
deadlock, a deadlock prevention method based on the control places called ordinary control places and weighted
concept of siphons has been introduced. The rule of control places were added to the original model to prevent
allocating and releasing resources done, but S3PR allows siphoning from being unmarked. Huang et al. (2012) [13]
choices in the process of manufacturing a type of a proposed using a marking/transition-separation instance
product. That is, a type of products possibly possesses (MTSI). They proposed policy has been implemented for
several processing routes in an S3PR. It has been shown FMSs based on the theory of regions and PNs, where the
that, for an FMS to be deadlock-free, the Petri Net dead marking is identified with it is reachability graph. In
structure should be free of unmarked siphons. Tricas, et the existing work, many inequalities (i.e., MTSIs), must
al. (2006) [22] presented methods of the computation be solved to prevent legal marking from entering the
Minimal Siphons in Petri Net model on Resource illegal zone in the original PN model.
Allocation Systems (RASs). Special syntactical

76
Piroddi et al. (2008) [20] developed a selective siphon (2006) [24] used the Petri net reduction approach to
control policy that can obtain small size supervisors with simplify the models so as to alleviate computation effort
highly permissive behavior. Shortly, they improve the and simplify the invariant-based control method. Uzam et
policy of avoiding a complete, siphon enumeration [21]. al. (2007) [25] proposed a redundancy test of a liveness-
Their methods can find a maximally permissive liveness enforcing supervisor of an FMS in order to reduce the
enforcing the supervisor for each example presented in complexity of the controlled system. Li and Zhou et al.
their studies [20, 21]. Unfortunately, no formal proof is (2008) [16] addressed the deadlock problem by using a
provided to show that their policy can definitely produce Petri net siphon control method and the theory of regions.
a maximally permissive a supervisor in theory. On the The policy proposed to [16] significantly lowered the
other hand, they reduce the complexity of the supervisory computational cost compared with the approach where the
structure but did not minimize it. However, many theory of regions was used alone. Using the theory of
inequalities need to be solved. regions, one can obtain the optimal supervisor. However,
Chen Y. F. et al. [6] (2013) developed a mathematical there is a deadly disadvantage of these methods, that is,
method to design a maximally permissive Petri net they need to compute a reachability graph that can cause
supervisor that is expressed by a set of control places with the state explosion problem.
self-loops. A control place with a self-loop can represent
by a constraint and a self-loop associated with a transition Petri Net is a graphical formalism, which is gaining
whose the firing may lead to an illegal marking. The popularity in recent years as a tool for MATLAB. PN-
constraint is designed to ensure that all legal markings are Toolbox was designed to offer specific instruments for
reachable and the self-loop is used to prevent the system simulation, analysis, and synthesis of discrete event
from reaching illegal markings by disabling the transition systems. PN-Toolbox embedding in [18] the MATLAB
to a specific marking. An MTSI in Huang et al. (2012) environment presents the considerable advantage (with
[13], it designs an optimal control place to separate bad respect to other PN software) of creating powerful
markings from the reachability graph by disabling the algebraic and graphical instruments, which exploit the
transition to the marking/transition-separation instance high-quality routines available in MATLAB.
(MTSI) at the corresponding marking. They proposed
method are that the obtained supervisor can have self- The remainder of this paper is organized as follows.
loops. Section 2, presents briefly the basic definitions and
The structural special objects called (siphons) are properties of PNs are giving, to illustrating the concepts
related to the liveness of a Petri net model, which has through an example of the structure and behavioral
been widely used in the characterization and prevention/ properties such as siphon and trap of PN. The main
avoidance of deadlock situations. The controllability of structural and behavioral properties also are present. In
siphons in a generalized Petri nets by Barkaoui et al. section 3, an illustrative example is providing to illustrate
(1996) [4] proposed the concepts of max controlled- the presented Petri Net Models of Flexible manufacturing
siphon property (cs-property, for short) and min cs- systems. In section 4, used MATLAB PN-tool to analysis
property. It is shown that if a marked (generalized) Petri properties of PN, which aimed at the computer simulation
net satisfies the max cs-property, then it is deadlock-free. models design is introducing. Concluding to remarks
Ezpeleta, et al. (1993) [8] proposed a new solution to the gives are in Section 6.
problem of finding generating families of siphons
(structural deadlocks in classical terminology), 2. Preliminaries
siphon/trap-components (st-components, for short) used This section contains the basic definitions of Petri nets
the addition of slack variables in the net. Li and Zhou, theory, which will be needed in the remainder of the
(2004) [15] proposed the concept of elementary siphons paper. We assume the reader is familiar with basic Petri
in S3PR. The siphon control has proposed to add a control nets concepts. For more details, please can be finding in
place for each elementary siphon to make sure that it is the excellent survey article in Murata [17]. A Place/
always marked. This approach reduces the number of Transition Petri nets (P/T-net, for short), which represents
control places because it is not necessary to add control the basic class of the sample family of Petri net models.
places in the redundant siphons.
Definitions 1.
Petri Net is using the theory of regions, Uzam (2002) A Petri net is a 4-tuple  = (P, T, E, W), where P − is
[23] proposed an optimal liveness-enforcing supervisor a finite non-empty set of n = | P | places; T − is a finite
synthesis method on the condition that such a supervisor non-empty set of m = | T | transitions; P ∩ T = , i.e.
exists. Ghaffari et al. (2003) [10] proposed conditions for places and transitions are disjoint sets. E  (P × T )  (T
the existence of an optimal supervisor that is maximally × P) is the flow relation (a set of directed arcs), which
permissive by using plain and popular linear algebraic relates places and transitions by arcs connecting them.
notions. For very big Petri net models, Uzam and Zhou

77
dom(E)  cod(E) = (P  T), where dom(E) ={x | y: (x, called to be ordinary if all of its arcs weights W, is equal
y)  E} is the domain of E. cod(E) = {y | x: (x, y)  E} to one. When the arc weight equaled to zero stands for the
is the range of E. W: (P x T)  (T x P)  Z+ is a weight absence of an arc. A place has taken a number of tokens,
function attached to the arcs, where Z+  (1, 2, 3, … , represented as black dots or a natural number. The
Z+). The weight is represented by an integer located near execution of a Petri net causes its marking to change.
the arcs are a function that assigns a weight to each arc. Execution is performing by the firing enabled transitions.
W(x, y)  0 iff (x, y)  E, and W(x, y) = 0, otherwise, A transition is enabled when each of these one its input
places are marked with at least as many tokens as the
where (x, y)  (P × T) and  is the set of nonnegative
weight of the arcs connecting these input places with the
integers. (When Weights W, of the arcs (W) = l, the net 
transition. A transition fires by removing from many
is called ordinary Petri net).
tokens from each one of its input places as the weight of
Definition 2. The pre-set (post-set) of a transition t is the
the arcs connecting these input places with the transition
set of all input (output) places of t, ●t = {p | Pre(p, t) > 0}
and by placing into many tokens in each one of its output
and (t● ={p | Post(p, t) > 0}). The preset (post-set) of a
places as the weight of the arcs connecting these output
place p is the set of all input (output) transitions to p, ●p
places with the transition.
= {t  T, | E(t, p) ≠ 0}, and (p● = {t  T, | E(p, t) ≠
0}). Suppose x  X is arbitrary elements of the net , ●x Definition 5. Ordinary Petri nets are those for which arcs
= {y | (x, y)  E} is called pre-set of x, and x● = {y | (x, E: (P x T)  (T x P)  {0, 1}. An ordinary Petri net is
y)  E} is called post-set of x. called a state machine (SM, for short) if t  T, | t● | = | ●t
| = 1. A Petri net  = (P, T, E, W) is called: (1) a state
The usefulness of the symbols is a pre-set and a post-
machine (SM) if and only if (iff) |●t| = | t● |  1 for any t
set of a place p  P or a transition t  T:
● T; (2) a mark graph (MG, for short) iff |●p | = |p●|  1 for
t = {p  P| W(p, t) > 0} is the set of input places of t.
any p  P; (3) free-choice net (FC, for short) iff |p●|  1 or
t● = {p  P| W(p, t) > 0}is the set of output places of t. ●
● {p● } = {p} for any p  P ; (4) a conflict- free net (CF-
p ={p  P| W(p, t) > 0}is the set of input transitions of p,
net, for short) ) iff (|p●|  1) or ( t  p●), where p  ●t for
and (p● ={p  P| W(p, t) > 0}) is the set of output
any p  P; (5) a marked Petri net by the pair  = (, M0),
transitions of p.
Definition 3. Places P and transitions T be finite and Mh is a home state iff M  [M0, Mh  [M0. (5) A
nonempty disjoint sets and let E  (P × T )  (T × P). The siphon is a set of places S  P, such that ●S  S●; and a
elements x and y is that for each x  (P  T) there exists trap is a set of places   P, such that ●  ●.
a y  (P  T) satisfying (x, y)  E or (y, x)  E. A net 
Example 1: For the Petri net from Figure 1, is show an
is connected if for very two elements x, y of . For all x
example of a Petri net.
 (P  T), the set •x = {y | y  P  T  (y, x)  E} is
named as the pre-set of x and the set x• = {y | y  P  T
 (x, y)  E} is named as the post-set of x. An arc (E)
joins a place to a transition or a transition to a place, but
never a transition to a transition or a place to a place.
Definition 4. A marking Petri net is  = (, M0) where,
 is a Petri net and M0 is initial marking, M0: P  {1, 2,
… , N+} is the net initial marking of , assigned to each
place p  P, M0(p) tokens, and where (N+ is a set of non-
negative integers). Every P/T-net is provided with an
initial marking M0 that may change a result of the firing
Figure 1, shows a simple example of a Petri net.
of a transition (or a marking Petri net is 5 – tuple:  = (P,
T, E, W, M0). Moreover, PN will be described either by The net consists of the set places {p1, … ,p5}, and the
the pair  = (, M0), where  is a Petri net and M0 is set transitions {t1, … , t4}. The set of arcs E is defined as
initial marking, or by 5 – tuple:  = (P, T, E, W, M0). follows: E = {(t2, p1), (p1, t1), (t1, p2), (p2, t3), (p3, t1), (t3 ,
Graphically, the Petri net  is representing by a p3), (t3 , p5), (p5, t2), (p5, t4), (t4 , p4), (p4, t2)}. Fig. 1, is to
diagram having two types of nodes. The elements of the shows a Petri net with places/transitions-net. The directed
set P are called places, graphically represented by circles, arcs determine the flow relation pre-sets and post-sets of
while the elements of the set T are called transitions, places. A place contains zero or more tokens drawn.
represented by rectangles. The function E defines the set ●
t1 = {p1, p3}, t●1 = p2, ●t2 = {p4, p5}, t●2 = p1,
of directed arcs, weighted by non-negative integers. The ●
t3 = p2, t●3 = {p3, p5}, ●t4 = p5, t●4 = p4, and
elements of the flow relation E, pictorially are shown as p●1 = t1, ●p1= t2, p●2 = t3, ●p2 = t1, p●3 = t1,
arcs connecting different types of nodes. A Petri net is ●
p3 = t3, p●4 = t2, ●p4 = t4, p●5 = {t2, t4}, ●p5 = t4.

78
Definition 6. (incidence matrix). The Pre- and Post- marked Petri net or a net system. A net is pure (self-loop
incidence matrix are net  can be represented as (n x m) free) if x, yP  T, W(x, y) > 0 implies W(x, y) = 0.
matrix, Pre-and Post with elements Pre(pi, tj), and Post(pi, Incidence matrix [] of the pure net  is a |P|×|T| integer
tj), respectively. The linear algebraic analysis method uses matrix with [](p, t) = W(t, p)  W(p, t).
the description of a Petri nets by its so-called incidence
matrix C = (Cij) which is defined by: C(pi, tj) = post(pi, tj) Definition 8. (firing transition ). A transition t fired if this
 pre(pi, tj), is the change in number of tokens in pi after enabled. The firing of a transition t enabled at marking M,
firing ti once, for i = (1, 2, ... , n) and j = (1, 2, ... , m). removes E(p, t) token from each input place p to
transition t, and adds tokens to each output place p to
Moreover, the incidence matrix C of the net is defined transition t, where E(t, p) is weight of arc 1 to p. The
as C = Post  Pre. The incidence matrix of a net is a marking M' resulting from the firing of an enabled
matrix with |P| rows and |T| columns defined as pre(P × T) transition t in a marking M, M[tM’, is defined as follows:
 {–1, 0, 1} such that pre(p, t) is (+1) if (t, p)  E, (–1) if
(p, t)  E, and 0 otherwise. The state changes of a PN
occur when a transition t is fire. These changes can be M'(p) =M(p) − E(p, t) + E(t, p) if p  (●t ∩ t●)
representing in an algebraic form using the state equation M'(p) = M(p) − E(p, t) if p  ( ●t \ t●)
given by: M1 = M0 + post (p, t) − pre (p, t). Any Petri Net M'(p) = M(p) + E(p, t) if p  (t● \ ●t)
can be the representation to incidence matrix. The M'(p) = M(p) otherwise
incidence matrix C of the net in Fig 1, is an (5 x 4) matrix. for all p P, and where E is arc definition 1.
The Petri net of Fig. 1, has the following incidence
matrices shown in Fig 2. The Matrix C = C+  C─.
Let us come back to the definition (7) (linear state
equation) of an ordinary Petri net a transition t of an
ordinary. Petri net is enabled if and only if each of its
input places contains at least one token. In the example
represented in Fig. 1, the initial marking is M0 = [1, 0, 1,
1, 0]T and the following transitions can be fired starting
from M0.
Having applied definition (7), state equation M = M0 +
C., and taking the column vector of firing transition
from the incidence matrix on Fig.2. The marking evolve
from: M1 = [0, 1, 0, 1, 0]T after the firing of t1. Such that
Fig.2. The incidence matrix of Fig.1. M1 = M0 + C. t1 = M0 [1, 0, 1, 1, 0]T + t1 [-1, 1, -1, 0, 0]T
Definition 7. A transition t  T is enabled at M if and = [0, 1, 0, 1, 0] = M1. Each of these new marking
only if (iff) (p  ●t) (M(p) ≥ 1) and ( p  t●) ( M(p) = represents a node of the reachability tree and used next-
0). A transition t  T is enabled at marking M iff p  P: state at firing transition. In the sequel, the next marking
M(p) ≥ W(p, t). This fact is denoted as M[t. A transition t can be found by adding last marking to the column of
enabled at M can fire, it yields a new marking M’, transition shown in Fig. 2, where transition t3 is enabling.
denoted as M[tM', where M’(p) = M0(p) − W(p, t) + W(t, The new marking M2 = M1+ C.t3 = [0, 1, 0, 1, 0] + [0, -
p). M’ is reachable from M if there exists a firable 1, 1, 0, 1] T = [0, 0, 1, 1, 1] = M2, and after firing t2, M3 =
transition sequence of transitions:  ={t1, t2, … , tn} is a M2 + C.t2 = [0, 0, 1, 1, 1] + [1, 0, 0, -1, -1]T = [1, 0, 1, 0,
firing sequence of (, M0) iff there exists a sequence of 0] = M3. In the rest, of our mathematical computation of
markings such that M0[t1 M1[t2M2, … , Mn-1[tnM' holds. the net of Fig. 1, the reachability tree of Petri net is shown
Moreover, marking Mn is said to be reachable from M0 by in fig. 3. The reachability tree can show deadlock in Petri
firing σ, and this is denoted by M0[σM'. The firing net.
sequence is a marking (M1, M2, M3, … , Mn+1) such that: Definition 9. (Invariant). P-invariant (resp., T-invariant)
(i, 1  i  n), and (Mi[tiMi+1 ), we can also write its by of a net  = (, M0) is a non-negative row integer |P|-
[M1[ Mn+1]. The set of all markings reachable from M0 vectors x (resp., |T|-vector y) satisfying the equation xT. C
is denoted by Reachability set R(M0). The function ’: T = 0 (respectively, C. yT = 0), where C is the incidence
 Z+ is the firing count vector of the firing sequence , matrix of . A non-zero integer vector y ≠ 0, (resp. x ≠
0).
i.e. [t] presents the algebraic sum of all the occurrences
Definition 10. (Properties Boundedness, and Safeness).
of t  T in . If M0[M’, then we can write in vector
A marked PN (, M0) is said to be (marking) k-bounded
forms M’= M0+ C., which is referred to as the linear iff each of its places is k-bounded. A 1-bounded net is
state equation of the net. The pair (, M0) is called a called safe. A marked PN (, M0) is bounded if there

79
exists k N such that (, M0) is k-bounded. A net  is siphon (SMS). A marked trap cannot never be emptied.
structurally bounded iff M0 the marked PN (, M0) are Lemma 1. (Siphon property). Consider Petri net  = (,
k-bounded for some k N. M0) with siphon S  P that is empty under the initial
marking M0  |P|. Then pS, M(p) = 0, holds for all
elements M  R().
A siphon is called minimal if it does not contain another
siphon as a proper subset. S is maximal if no other siphon
includes it. It is called a strict minimal siphon (SMS),
denoted S, if it does not contain a trap. A siphon is said to
be the controller if it is marked under all reachable
markings. A trap is said to be minimal if it does not
contain another trap as a proper subset. τ is maximal if no
other trap includes it.
The union of two siphons (resp., traps) is again a
siphon (resp., trap). A siphon (trap) is called a basic
siphon (basic trap) if it cannot be represented as a union
of other siphons (traps). The union of some basic siphons
(traps) can generate so all the siphons (traps) in a Petri
net. A siphon (trap) is said to be minimal if it does not
contain any other siphon (trap). Minimal siphons (traps)
are basic siphons (traps), but not all basic siphons (traps)
are minimal.
Having applied definition (11), and (12). The Petri net
of Fig. 1, has contains 7-sets of siphons and 5-sets of traps
(excluding the entire set of places, which is both a siphon
and a trap). In the net shown in Figure 1, S1 ={p2, p3}, S2
={p1, p2, p5}, S3 ={p2, p3, p5}, S4 ={p1, p2, p3, p5}, S5 ={p2,
p3, p4, p5}, S6 ={p1, p2, p4, p5}, and S7 ={p1, p2, p3, p4, p5}
are siphons, among which S1, and S2 are minimal siphon.
There are five traps: [1 ={p2, p3}, 2 ={p1, p2, p3},
3 ={p1, p2, p4, p5}, 4 ={p1, p2, p4, p5}, and 5 ={p1, p2, p3,
Fig. 3. The Reachability tree of Figure 1 p4, p5}], among which 1, and 5 are minimal trap. For
example, the set of {p2, p3} is both a siphon and trap.
Definition 11. (Siphon). A siphon of Petri net  is a Analyze the structures of first siphon are S1 = {p2, p3}.
subset S  P of places that satisfies ●S  S●. A siphon is The pre-transitions are ●S1 = {t1, t3}, and the post-
empty under M  |P| if M(p) = 0 for all s  P. A siphon transitions are S●1 = {t1, t3}. That is a fact the set of
is initially empty blocks all transitions that produce tokens siphon [●S1 = {t1, t3}  S●1 = {t1, t3}]. Another siphon
on it. For a P/T-net , a siphon is said to be minimal if analyzes S2 = {p1, p2, p5}, and the pre-transitions are ●S2
and only if there does not exist another siphon S' in  ={t2, t1, t3}, and the post-transitions are S●2 = {t1, t3, t2, t4},
such that S'  S. Moreover, a siphon in a Petri Net is that therefore, [●S2 ={t2, t1, t3}  S●2 = { t1, t3, t2,t4}] is true. In
a structural deadlock defined as a non-empty subset of addition, S1, and S2 are a minimal siphon. The union of
places S. A P/T-net  is said to satisfy the siphon-trap two siphons is again a siphon, S1  S2 = S4 = {p1, p2, p3,
property if and only if every siphon contains a marked p5}.
trap (or every minimal siphon contains a marked trap). A The computation of siphons can be complete the
siphon is said to be minimal if it contains no other siphons remaining sets of siphons in this manner. Similarly, the
as its proper subset. A minimal siphon is strict if it calculation of a minimal Trap is: 1 ={p2, p3}, for
contains no trap. A siphon is said to be controlled if it can example 1●  ●1, where [1● ={p2, p3}●]  [●1 = ●{p2,
never be emptied. A siphon S is said to be invariant- p3}], because {t3, t1}●  ●{t1, t3}. So that, the computation
controlled by P-invariant I if IT M0 > 0 and || I ||+  S. of traps can be complete the rest sets of traps in this
Definition 12. (trap). A trap of Petri net  is a subset   manner.
P of places that satisfies τ●  ●τ. A trap is empty under M Definition 13. (Reversibility). A Petri net (, M0), is
 |P| if M(p) = 0 for all S  P. A sets of places τ is a trap reversible if, in any marking Mk reachable from initial
iff: τ●  ●τ, where τ is a minimal Trap iff there does not marking M0, M0 is reachable from Mk, that is, it is always
contained any other Trap τ  P. A minimal siphon that possible to go back to the initial marking.
does not contain a marked trap is called a strict minimal

80
Among many properties of Petri nets being searched Line-1(PL-1) require two operations, op1 on the machine
in literature. For the purpose of modeling on Flexible M1, and op2 on the machine M2, and vice versa in
Manufacturing Systems, the most important properties are Production Line2 (PL2). As well as, the production line
liveness, boundness, safeness, deadlock, conservative, sequences are given as follows: Production Line-1(PL-1):
persistence, reachability tree, reversibility, Siphon, and Part-A:(M1)  R  (M2), and Production Line-2(PL-2):
Trap. Let us recall the definition of the Petri nets liveness Part-B:(M2)  R  (M1).
playing the essential role in further considerations.

Definition 14. (Liveness). A transition t  T is live in net


(, M0) iff M  R(, M0) M’  R(, M0) such that
M’ enables t. The marked net (, M0) is live iff all its
transitions are live (i.e. liveness of the net guarantees the
possibility of an infinite activity of all transitions). A net
 is structurally live iff M0 such that the marked net (,
M0) is live. Transition t1 has a shared place p with
transition t2 iff p  ●t1 ∩ ●t2. It should be noted that the
property of Definition 14, implies the absence of
deadlocks in the system modeled. Liveness in a Petri net
means that for all reachable markings from an initial
marking any transition can eventually be fired. This
implies an absence of deadlock. In general, Petri nets may
not be live.
Definition 15. (dead marking). A PN is live under M0 iff
t  T, t is live under M0. A transition t  T is live under
M0 iff M  R(, M0), M'  R(, M0), t is firable
under M’. A transition t  T is dead under M0 if  M
R(, M0), where t is friable. A marking M  R(, M0) is Figure 4. Petri net model of a resource-sharing
a (total) deadlock iff t T, t is dead. manufacturing system.

Definition 16. (Conservative). A Petri net  with the Legend: IS1 (OS1) - the i-th input (resp. output) store, R-
initial marking M0 is conservative if for all M’ R(, Robot, M1- Machine Lather, M2 – Machine Dill, and
M0), pi P M(pi) = pi P M0(pi). Conservation means that (B)-buffer- workpiece buffer.
the total number of tokens are the same for all markings
reachable from M.

3. Petri net models of FMSs.


Petri nets modeling on the flexible manufacturing
systems provided us the possibility to consider integrally
the effects of different elements of producing a system,
elements like machinery, robots, parts, etc., and determine
the improved exploiting program in the planning phase
can be successful.

Example 2. A production line is shown in Fig. 4. The


system consists of two different machines (a lathe (M1)
and drill machine (M2)), a robot (R) and buffer (B) with
two storing intermediate parts between the two machines.
The machines are automatically loaded and are unloading
by the robot and a shared robot for loading and unloading
between the two machines. A piece of raw material is first
Fig.5. An FMS with two production line [23].
processed by Machine M1 and then by Machine M2 to
This example is taken from [23] and is used in [6, 12].
produce a final product. In addition, types Part-A and
Here, the PN model of the system is shown in Fig. 5, we
Part-B are processing by M1 and M2 with two operations
used different approaches when can be used experimental
[operation1 (OP1), and operation2 (OP2)]. The
approach and testing Petri net tool in MATLAB 2008A.
manufacturing system is planning with two Production

81
The Petri net model corresponding to the given (1) PA   is called a set of operation places;
processes of flexible manufacturing systems cells is (2) p0  PA is called the process idle place;
shown in Figure 5. The elements (or the set of places and (3) A net  is a strongly connected state machine; and
transitions) of the PN are interpreted as follows: (4) every circuit of  contains place p0 .
Transitions t1, t3, t5, and t7 correspond to the operations Definition 18 [14]: Let  = ( P, T, E) be an S2P with idle
constituting Production Line1 (PL-1), while transitions t2, process place p0. Let C be a circuit of , and x and y be
t4, t6, and t8 correspond to the operations constituting two nodes of a circuit (C). Node x is said to be previous to
processes Production Line-2 (PL-2), and Places P9, and y if there exists a path in C from x to y, the length (given
P11 are interpreted as Machines M1, (resp. M2 ). Place a circuit C, we denote || C || the set of nodes in it, and the
P10 corresponds to the robot. A robot R can pick up and length (C = || C || ) of which is greater than one and does
deliver products between M1 and M2. Remaining places
not pass over the idle place p0. This fact is denoted by x 
p1, p3 and p5, corresponds to performed op1 at M1 (i.e.
C y. Let x and y be two nodes in . Node x is said to be
p1), after the finishing of op1, the robot unloaded the
machine M1 and stores the intermediate part of the buffer previous to y in  if there exists a circuit C such that is x
at (p3), the robot loaded the machine M2 with an   y. This fact is denoted by x   y.
intermediate part of the buffer, and operation op2 at M2
respectively for (PL-1). Definition 19 (S3PR){taken from[14]}.
In same representation, places p2, p4 and p6 correspond A system of simple sequential processes with resources

 i = ( p A  p  pR , T , E ), is
k 0
to perform op1 at M2 (p2), then a robot gets work-piece (S3PR):  = i 1
from the M2 and put into the buffer (p4), and start op2 at
M1 respectively for (PL-2). The number of tokens in p7 defined as the union of a set of nets:
and p8 represented parts stores. The parts enter the FMS i = ( p A
i
 { p0i }  pRi , Ti , Ei ), sharing
through input/output buffers I/O1 and I/O2. common places, where the following statements are true:
For more detail of a sub-net model of fig. 5, are
defining to describe the four main activities and their
(1) p0i is called the process idle places of net i. The
relations to show in Figure 6, where four transitions are i i
elements in p A and pR are called operation places and
used to represent four short operations, i.e., M1 loading, R
resource places respectively;
unloading, M2 loading, and R unloading. Two places are
using to represent two long operations, i.e., M1 and M2 (2) p iA ≠ ; pRi ≠ ; p0i  p iA ; and ( p iA  { p0i } 
processing. pRi = ;
(3) p  p A , t  p , t '  p ,
i  

rp  pRi , ●t  pRi = t '  pRi = { rp };


(4) r  pri ,  r  p iA = r   p iA  , and

r  r   ,
 0 
(5) ( pi )  ( pR )  ( pi )  pR   ;
0 i i

(6) i ' is a strongly connected state machine, where i '


= ( p A  { p0 }, Ti , Ei ) , is the resulting net after the
i i

places in pR and related arcs are removed from i .


i

(7) Every circuit of i ' contains place p0 ;


i

(8) Any two i ' are composable when they share a set of
common places. Every shared place must be a resource
one.

Fig. 6, the activities P/T-net of sub-net of Fig.5 (9) For p  p A , ( p )  pR  {rp } , where

The structure of S3 PR Nets resource place rp is called the resource used by p.


2
Definition 17. A simple sequential process (S P) is a (10) transitions in ( pi0 ) and  ( pi0 ) are called source
Petri net  = (PA  {p0}, T, E), where the following
statements are true: and sink transitions of an S3PR respectively. In an S3PR,

82
p 0 is called the set of process idle places, p A is called The Menu bar (placed horizontally, on top of the
window in MATLAB, displays a set of seven drop-down
the set of operation places and pR is called the set of menus at the top of the window, where the user can select
resource places. all the facilities available in the PN Toolbox. These
menus are File, Options, Draw, Nets, Simulation,
4. Simulation and Petri net Editor Analysis, and Help, …etc. The simulation experiment is
In order to be planning an FMSs must possess the Petri to consider a uniformly distributed duration, the untimed
Nets has been used successfully for modeling and PN model of this is FMS presented in Fig. 5. The initial
controlling the dynamics of FMS used for modeling, marking M0 = [0,0, 0,0,0,0,3,3,1,1,1] corresponds to the
simulation and analysis structure of the MATLAB Tool situation when all the resources are idle. The analysis of
Petri net is shown in Figure 5, are needed to be solved by the behavioral properties of the PN model starts with
MATLAB. consulting its coverability tree (Fig. 7). The dead marking
The PN Toolbox has an easy to exploit Graphical User M13 = [1,1,1,0,0,0,1,2,0,0,0], and M14 = [1,1,0,1,0,0,2,1,0,
Interface (GUI) (Mahulea et al., 2003) [18] that gives the 0, 0] matches up the situation when robot R is used to
user the possibility to draw PNs in a natural fashion, to place part-A on M1 the same time when robot R is used to
store, retrieve and resize such drawings. This GUI also place part-B on Machine (M2).
permits the simulation, analysis, and design of PN
models. The simulation mechanism is based on the rule As one can see the asynchronous execution of processes
for enabling and firing of transitions specific to the type can result in their mutual blocking. A possible deadlock
of the current PN model. The PN Toolbox is divided into situation corresponds to the marking shown in fig. 7.
five types of classic PN models are accepted, namely: From the reachability tree PN, we can see two dead
untimed, transition-timed, place-timed, stochastic and marking (i. e. M13 and M14) in the red color can be the
generalized stochastic. In our application, we used identifier. Note that the deadlock occurred when marking
untimed PN models, which are the behavioral properties M6 fire t8{(M6, t8)} = M13, and {(M9, t8 )}= M14 are
(e.g. boundedness, liveness, reversibility, etc.) may be obtained. By considering the possible controlled-siphon
studied based on the coverability tree of the net. The property, that is added control place can be connected arcs
coverability tree is built with or without the ω-convention to the necessary places in order to become deadlock-free.
(Murata, [17]). The structural properties are approached Three optimal control places v1, v2, and v3 can be control
as the integer programming problems; the minimal- of Petri net of Fig.5, shown in Fig. 8.
support P- and T-invariants are displayed, on request, in
separate windows 7.

Fig. 7, Coverability tree of Fig. 5

An FMS is shown in Fig. 5. This PN is denoted by Fig. 8. Additional place v1, v2, and v3, called control place in order to
(, M0). To show our deadlock prevention policy, the controlled siphon.
reachability tree R(, M0) of the PN system can be
constructed as shown in Figure 7. There are three local control places as seen in the
augmented net in Fig. 8, that is produced method
eliminate the states associated with primary deadlock. We

83
can prove by identifying the three states these control can be avoided by adding a control place, associated with
places eliminate. Control places V1, and V3 eliminates the arcs to each emptiable siphon S to prevent it from
the state of the net when tokens are present in places (p1 being unmarked. However, generally too many control
and p4). In the other side, when part-A is occupying the places and arcs are required. This is controlled on the net
lathe and part-B is occupying the drill, and a result of this correspond to a deadlock-free.
is a circular wait condition or primary deadlock. The
second control place V2 eliminates the state when tokens This paper presents an efficient siphon for control
occupy places (p3 and p2) that state corresponds to part-A structure analysis of PN in MATLAB Toolbox. This tool
occupying the robot R and part-B occupying the drill. has much grateful help us to finding from a siphon and
This situation also corresponds to a circular wait pattern trap easy reachability or coverability tree, deadlock
or primary deadlock. We are connected control place V1 detection, liveness of an ordinary Petri net can also be
to the transition, where ●V1= {t2, t4} and V1● = {t1, t6}. investigated the control. The properties menu on
The second is the added control place ●V2 = {t5, t6} and MATLAB provides computational tools for the analysis
V2● = {t3, t8}, while the third controls placed ●V3 = {t3, of the behavioral and structural properties of the current
t4} and V3● = {t1, t8}. PN model. Petri net model as a tool helps us to behavioral
investigation and structural properties. These structures
After adding three control places are Vi, (where i = 1, that PNs represent a well-known, powerful and widely
2, 3) to show in fig. 8, the initial marking of V is one. The used analytical formalism.
simulation of Petri net is shown in Fig. 9, the additional
places of (Vi ) leads to an extra minimal siphon that is a
marked trap. As a result, no siphon can be to empties in REFERENCES
the net and it is deadlock-free (currently live). This [1] Abdallah I. B., and H. A. ElMaraghy, (1998), "Deadlock
example motivates one to discover the mechanism to prevention and avoidance in FMS: A Petri net based approach,"
Int. Journal of Advanced Manufacturing Tech. , vol.14, no.10, pp.
make a siphon controlled by adding a monitor. The result 704-715
final in the analysis of Petri nets is shown in Fig. 9, [2] Banaszak, Z. A., and Krogh, B. H. (1990) ," Deadlock avoidance
because the MATLAB tool can show the PN shape of the in flexible Manufacturing systems with concurrently competing
simulation is accurate and correctness results. process flows", IEEE Trans. on Robotics & Aut. No.6, pp. 724-734
[3] Banaszak, Z. A., and Mowafak H. Abdul-Hussin (2002),"
Deadlock Handling for Distributed Work-flows", In: Engineering
& Technology J., University of Technology. Baghdad, No.5, Vol.
21, pp.377- 388
[4] Barkaoui K., and J. F. Pradat-Peyre, (1996)," On liveness and
controlled siphons in Petri nets," in Pro. of the 17th Int. Conf. on
App. & Theory of Petri Nets, LNCS, vol.1091, Japan, Springer,
1996, pp.57-72
[5] Chu, F. and X. L. Xie (1997) ,"Deadlock analysis of Petri nets
using siphons and mathematical programming," IEEE Transact.
on Rob. & Autom., vol.13, no.6, pp.793-804
[6] Chen Y. F., ZhiWu Li , et al. (2013)," Non-pure Petri Net
Supervisors for Optimal Deadlock Control of Flexible
Manufacturing Systems, IEEE Trans. on System Man. &
Cybernetics, Syst., VOL. 43, NO. 2,
[7] Ezpeleta J, Colom JM, Martinez J.,"A Petri net based deadlock
prevention policy for flexible manufacturing systems. IEEE Trans
Robot Autom. 1995;11(2):173-184.
[8] Ezpeleta, J. Couvreur, and M. Silva,( 1993), “A new technique for
finding a generating family of siphons, traps and st-components:
Application to colored Petri nets,” in Advances in Petri Nets,
Springer-Verlag, LNCS, vol. 674, pp. 126–147
Fig. 9 Coverability tree of Petri Net is deadlock-free [9] Fanti M. P.,and Zhou M.C.," Deadlock control methods in
automated manufacturing systems. IEEE Transactions on Systems,
Man, and Cybernetics, Part A: Systems and Humans, vol. 34, no.1,
5. Conclusion pp.5-22, 2004.
[10] Ghaffarei, A., N. Rezg, and X. L. Xie, (2003), "Design of a live
In this paper, we have a characteristic deadlock and maximally permissive Petri net controller using the theory of
prevention problem of FMS is solving used the concept of regions. IEEE Tran. on Robotics and Automation, 19(1), 137-142
siphons. This paper’s presents a deadlock prevention [11] Huang Y.S., et al. (2001),"A deadlock prevention policy for
method of FMS, which are insufficiently marked in flexible manufacturing systems using siphons. In Proc. the 2001
IEEE Intern. Conf. on Robotics & Autom., Seoul, Korea, 541-546.
siphons cause deadlocks. This method is a base of the [12] Huang Y. S., M. D. Jeng, X. L. Xie, and D. H. Chung.(2006),"
structural theory of Petri nets that can be led to unmarked Siphon-based deadlock prevention policy for flexible
siphons in their Petri net models. Petri nets provided a manufacturing systems. IEEE Tran. on Sys. Man and Cyb., P. A,
method of the analysis of concurrent systems. Deadlocks 36(6), 1248-1256.

84
[13] Huang Y.S., Pan YL, and M.C. Zhou, (2012), "Computationally
Improved Optimal Deadlock Control Policy for Flexible
Manufacturing Systems. IEEE Trans System Man Cybernetics A
System Humans. 2012; 42(2):404-415
[14] Kloetzer Marius, et al., (2013)," Petri net approach for deadlock
and collision avoidance in robot planning", 18th IEEE Int. Conf.
on Emerging Tech. and Factory Automation (ETFA 2013).
[15] Li Z. W. and M. C. Zhou, (2004),“ Elementary siphons of Petri
nets and their application to deadlock prevention in flexible
manufacturing systems,” IEEE Trans. System Man and
Cybernetics, Automatic, System, Humans, vol. 34, no. 1, pp. 38-51
[16] Li Z. W., M. C. Zhou, and M. D. Jeng. A maximally permissive
deadlock prevention policy for FMS based on Petri net siphon
control and the theory of regions. IEEE Transactions on
Automation Science and Engi., 5(1), 2008, pages 182-188
[17] Murata T.," Petri nets: Properties, analysis and applications", In
Proc IEEE. 1989; 77(4):541-580
[18] Mahulea, C., M. H. et al. (2003)." Home Page of the Petri Net"
PETRI NET TOOL-BOX VERSION 2.3,Tool box:
http://www.ac.tuiasi.ro/pntool
[19] Matcovschi M.H., Mahulea C., et al.(3003), "Modeling, Simulation
and Analysis of Petri Nets in MATLAB, 14th Int. Conf. on Control
Systems and Computer Science - CSCS14, Bucharest.
[20] Piroddi L., R. Cordone, and I. Fumagalli, (2008), “Selective siphon
control for deadlock prevention in Petri nets,” IEEE Transactions
on Systems, Man, and Cybernetics, Part A, vol. 38, no. 6, pp.
1337–1348
[21] Piroddi L., et al. (2009), “Combined siphon and marking
generation for deadlock prevention in Petri nets,” IEEE Trans.
Syst., Man, Cybernetics A, System Humans, Vol. 39, no. 3, pp.
650-661
[22] Tricas, F., and J. Ezpeleta, (2006), “Computing Minimal Siphons
in Petri Net Models of Resource Allocation Systems: A Parallel
Solution", IEEE Tran. on Systems, Man, and Cybernetics-Part A:
System and Humans, Vol. 36, No. 3, MAY 2006, pages 532-539.
[23] Uzam. M.,( 2002)," An optimal deadlock prevention policy for
flexible manufacturing systems using Petri net models with
resources and the theory of regions. Int J. Adv Manuf Technol,
19(3), 192-208.
[24] Uzam, M., and M. C. Zhou.(2006), An improved iterative
synthesis method for liveness enforcing supervisors of flexible
manufacturing systems. Int. Journal of Production Research,
44(10), 1987-2030
[25] Uzam, M., Z. W. Li, and M. C. Zhou. "Identification and
elimination of redundant control places in Petri net based liveness
enforcing supervisors of FMS. International Journal of Advanced
Manufacturing Technology, 35(1-2), 2007, pages 150-168
[26] Viswanadham N, Narahari Y, Johnson TL. (1990)," Deadlock
prevention and deadlock avoidance in flexible manufacturing
systems using Petri net models. IEEE Trans Robot Aut.,V.6(6): PP.
713-723
[27] Xing, K.-Y., Hu, B.-S., and Chen, H.-X. (1996)," Deadlock
avoidance policy for Petri-net modeling of flexible manufacturing
systems with shared resources", IEEE Transactions on Automatic
Control 41(2): 289–295.

Mowafak Hassan Abdul-Hussin received


the B.S. (1977) from the University Al-
Mustansiriyah, Baghdad and M.S., and
Ph. D. degrees from the Technical
University of Wroclaw, Poland, 1984, and
1989 respectively. Since 1991, he has been
with University of Technology, Baghdad.
His research interests include Petri net
theory and applications of the Flexible
Manufacturing Systems.

85

You might also like