You are on page 1of 8

Proc.

of World Symposium On Computer Networks and Information Security, International


Conference on advance in Eng. & Tech. (ICAET’2014), Hammamet, Tunisia, pp. 186-193.

Siphons and Traps Structural Analysis Techniques Behaviour of a Petri


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

Abstract- Siphons and traps have been extensively used and investigated for the structural analysis techniques behavior of a
Petri net. The siphons are structures which allow for some implications on the net's can be well controlled by adding a control
place (called monitor) for each uncontrolled siphon in the net in order to become the deadlock-free situation in the system.
Also, it’s having appeared to play a special role in the liveness analysis of Petri nets (PNs), especially in ordinary ones. From
the structured properties of PN can investigate correctness to solve for concurrent systems. Structural properties such as
siphons can be checked directly on the Petri net and have the advantage of low computational complexity. Siphons can be to
characterize deadlock states and solve deadlock problems of Petri nets that model on flexible manufacturing systems (FMSs)
involving a resource allocation system. The deadlock control is usually concerned with minimal siphons. Structural analysis
techniques behavior in Petri nets is investigating the relationship between the behavior and structures of the net. In this paper,
a computer simulation system, the Petri Net Toolbox in MATLAB environment, which is based the analytical model
(Place/Transition-net) of concurrent processes of the reusable resources that are aimed mainly at providing for control of the
system, is present.

Keywords: Petri nets, structural analysis, siphons and traps, Toolbox PN-Tool 2.3

1. Introductions avoid deadlocks. In the liveness of the Petri net model


Petri nets have been characterized as a tool to guarantees the complete absence of deadlocks in the
describe the structure and analysis the behavior of discrete corresponding program. Deadlock analysis based on Petri
event systems (DESs), including FMS, computer systems, nets has been widely studied for flexible manufacturing
software engineering, computer architecture, software systems and other technological applications involving a
design, databases, programming, and automated guided resource allocation function.
vehicles (AGV) … etc. The deadlock problem of PN may Petri net theory provides for powerful analysis
occur to the resource share place in PN. The resource share techniques, which can verify the correctness system. The
systems are places in PN holds through an alternative study of structural properties and behavioral properties of
firing transition and in the same time request a hold Petri nets has been made utilizing siphons. Siphons and
transition to the same place. The properties of PN can be traps are good properties of sub-structures of Petri nets,
classical into behavioral and structural properties. In a exerting a strong influence on their behavior [5].
Petri net analysis model has been used a special property Moreover, structural and behavioral properties of Petri
siphon analysis and PN reachability graph analysis. A nets can be defined. A siphon is an important structural
deadlock prevention occurs to an FMS when parts are concept of Petri nets. The behavioral property, which
blocked waiting for shared resources held by others, that relates to initial marking and has direct connection with
will never be granted. In particular, deadlock prevention the simulated system, includes reachability tree,
problems are solved using the concept of siphons. coverability tree, deadlock-free, liveness, boundedness and
The problem of deadlocks based on a PN structure fairness. The siphon is a subset of places useful for
called the siphon, which indeed are sometimes named as liveness analysis. When, all places in a siphon have no
“deadlock”. Siphons and traps are two special property token, all transitions connecting with the siphon cannot be
structures, related to basic behavioral properties of a Petri friable any more. Therefore, a siphon is widely used to
net, which are dividing the net to the groups of sub-nets. analyze liveness and prevent deadlock in many systems
Siphons are well known to recognize in the analysis and modeled on Petri net [5-7] [10], especially in Flexible
control of deadlocks in Resource Allocation Systems Manufacturing Systems.
(RASs) modeled on Petri nets. Many deadlock prevention There are many research papers devoted to the
policies characterize the deadlock behavior of the systems deadlock problem. In our approach, we have adopted Petri
in terms of siphons and utilize this characterization to nets as a tool for modeling on the dynamic behavior of the
DOI: 02.WSCNIS.2014.1.30 186
© N&N Global Technology 2014
system. This tool has also been adopted in several papers SMS can be emptied, which guarantees the liveness of the
related to the study of deadlock problems of FMS controlled system. The number of added control places is
environments. For a general class of Petri net models, in equal to that of SMSs in the target net. The rule of
(Viswanadham et al. (1990) [11]) both deadlock allocating and releasing resources done, but S3PR allows
prevention and avoidance control policies are proposed. choices in the process of manufacturing a type of product.
The first one is based on the net reachability graph, while That is, a type of product possibly possesses several
the second one is based on a look-ahead procedure that processing routes in an S3PR. It has been to show, that, for
searches for deadlock situations by simulating the system an FMS to be deadlock-free, the Petri Net structure should
evolution of a pre-established number of steps. Because be free of unmarked siphons.
the avoidance policy does not assure that deadlocks are not Tricas, et al. (2006) [10] presented a special subclass
reachable, they propose to combine this policy on a of S3PR, called S4PR (simple S3PR) that is (simple
deadlock recovery system. systems of simple sequential processes with resources
The deadlock avoidance algorithm (DAA) was S4PR ). They proposed methods of the computation
developed in Banaszak and Krogh (1990) [1] for a class of Minimal Siphons in Petri net models of Resource
FMSs called Production Petri Nets (PPN). This class Allocation Systems (RASs). They developed a general
model a set of sequential processes sharing common method of the complete enumeration of the set of minimal
resources. At each operation, only one resource is used and siphons must be avoided (there can exist an exponential
there are no alternative resource routings, which may lead number of such components), some deadlock prevention
to resource allocation conflict. The DAA uses a restriction methods rely on its (complete or partial) computation and
policy, which limits the set of transitions that can be fired enumeration. The special syntactical constraints on some
for a given marking. classes of RASs can help in developing specific algorithms
Banaszak and Abdul-Hussin (1988) [2] developed the to compute siphons in a more efficient way.
deadlocks avoidance methods with a Petri net approach to Huixia et al. (3013) [7] developed a new deadlock
the automatic design of control programs which are aimed prevention policy for a class of flexible manufacturing
at supervision of concurrent, pipeline-like flowing systems called as systems of simple sequential processes
processes of FMS. They formulated investigation of the with resources (S3PRs). Siphon basis is introduced to
sufficient condition for the design of a class of deadlock- obtain a compact Petri net controller by considering the
free Petri net. The method considered an algorithm that complementary sets of siphons in S3PRs. A siphon basis
transforms the given process specification into the net consists of strict minimal siphons (SMSs) whose
model describing the dynamics of the process flow, complementary sets can cover the complementary set of
allowing a queuing Place/Transition-net model to be each SMS in Petri nets.
properly modified. The main results obtained allow for The paper is organized as follows. Section 2, some
automatic conversion to the process specification, via the basic definitions and notations of PNs are given. In
net model of a control flow, into the relevant control Section 3, Siphons and Traps properties have been
program. Banaszak and Abdul-Hussin (1995) [3] defined. An illustrative example is provided to illustrate
developed control strategy, which guarantees the deadlock the presented this method. In Section 4, Petri Net models
avoidance. They proposed a general-purpose algorithm on Flexible manufacturing systems used MATLAB tool-
that can be used in the synthesis of control procedures PN to analytic properties of PN, which aimed at the
ensuring the appropriate processes cooperation. The computer simulation model design are introduced.
algorithm aimed at the deadlock-free cooperation of Concluding remarks is given in Section 5.
concurrent, pipeline-like flowing processes as well as for
its direct implementation, in assembler level languages, as 2. Basic Definitions and Notations
real-time control programs for FMS. Banaszak and Abdul- This section contains the basic definitions and
Hussin (2002) [4] developed a new approach for notations of Petri net theory, which will be needed during
distributed deadlock avoidance control for Flexible the remainder of the paper. We assume the reader is
Manufacturing Systems. They constructed feasible familiar with basic Petri nets concepts. For more details
deadlock avoidance rules by exploiting the information please, can found in [6] and [8]. A Place/ Transition Petri
about the resource requirements of each particular nets (P/T-net, for short), which represents the basic class
operation of a manufacturing process and/or the repetitive
of the sample family of Petri net models.
character of the material and data process flow.
A special Petri net, called system of simple
sequential processes with resources (S3PR), is used by Definition 1. A Petri net is a 4-tuple Ψ = (P, T , E, W),
Ezpeleta et al. (1995) [4] to describe an FMSs. S3PR is an where P and T are finite non-empty sets (of places and
extension of the PPN in [1]. A circular wait situation transitions, respectively), P ∩ T= ∅, and E ⊂ (P × T) ∪
occurs in an S3PR just as PPN. In order to avoid the (T × P) is a flow relation such that: dom(E) ∪ range(E) =
deadlock, a deadlock prevention method based on the P ∪ T. An arc E joins a place to a transition or a transition
concept of siphons has been introduced. They proposed a to a place, but never a transition to a transition or a place
deadlock prevention method by adding a control place and to a place. W: (P x T) ∪ (T x P) → N is a weight function
related arcs to each strict minimal siphon (SMS) so that no
DOI: 02.WSCNIS.2014.1.30 187
© N&N Global Technology 2014
attached to the arcs, where N → (1, 2, ... , N+). The Fig. 1, show pre- and post structure of Petri net.
weight is represented by an integer located near the arc is
a function that assigns a weight to each arc. (When
Weights W, of the arcs (W) = l, the net Ψ is called
ordinary Petri net). x y x y
Definition 2. A marking Petri net is Ψ = (Ψ, M0) where,
Ψ is a Petri net and M0 is initial marking, M0: P → {1, 2, Pre-transitions → ●p Post-transitions → p●
… , N+}is the net initial marking of Ψ, assigned to each Fig. 1. Illustrating the two structurally of PN
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 Definition 4. The pre-set (post-set) of a transition t is the
of a transition, (or a marking Petri net is 5-tuple: Ψ = (P, set of all input (output) places of t, ●t = {p | Pre(p, t) > 0}
T, E, W, M0)). Moreover, PN will be described either by and (t● ={p | Post(p, t) > 0}). The preset (post-set) of a
the pair Ψ = (Ψ, M0) where Ψ is a Petri net and M0 is place p is the set of all input (output) transitions of p, ●p =
initial marking, or by 5 – tuple: Ψ = (P, T, E, W, M0). (∀t ∈ T, | E(t, p) ≠ 0), and (p● = (∀t ∈ T | E(p, t) ≠ 0)).
Suppose x ∈ X is arbitrary element of the net Ψ, ●x = {y |
Graphically, the Petri net Ψ is represented by a (x, y) ∈ E} is called pre-set of x, and x● = {y | (x, y) ∈ E}
diagram having two types of nodes. The elements of the is called post-set of x.
set P are called places, graphically represented by circles,
while the elements of the set T are called transitions, Definition 5. (incidence matrix). The usefulness of the
represented by rectangles. The functions E defines the set symbols is a pre-set and a post-set of a place p ∈ P or a
of direct arcs, weighted by non-negative integers. The transition t ∈ T: ●t = {p ∈ P| W(p, t) > 0} is the set of
elements of the flow relation E pictorially are shown as input places of t. t● = {p ∈ P| W(p, t) > 0}is the set of
arcs connecting different types of nodes. A Petri net is output places of t. ●p ={p ∈ P| W(p, t) > 0}is the set of
said to be ordinary if all of its arc weights W, are equal to input transitions of p, and (p● ={p ∈ P| W(p, t) > 0}) is the
one. When the arc weight equal to zero stands for the set of output transitions of p.
absence of an arc. A place is shown a number of tokens, The Pre- and Post - incidence matrix of the net Ψ can
represented as black dots or a natural number. Ordinary be represented as (n x m) matrix, Pre-and Post with
Petri nets are those for which arcs E: (P x T) ∪ (T x P) elements Pre (pi, tj ), and Post(pi, tj ) respectively. The
→ {0, 1}. An ordinary Petri net is called a state machine linear algebraic analysis method uses the description of a
(SM) if ∀t ∈ T, | t● | = |●t | = 1. In order to describe the net Petri net by its so call incidence matrix C = (Cij) which is
structure, the following representation is considered. defined by: C(pi, tj) = Pre(pi , tj) − Post(pi, tj), is the change
in number of tokens in pi after firing tj once, for i = (1, 2, ...
Definition 3. An Ordinary Petri Net Ψ is defined as a 5- ,n) and j = (1, 2, ... ,m). To find the C matrix is (the
tuple Ψ = (P, T, Pre, Post, M0), where P is the set of composite change matrix). It is computed by subtracting
places (| P | = n), T is the set of transitions (| T | = m), and C─ from C+, that is: (matrix C = (C+ − C─ ), Cij = post (tj,
(P ∪ T) ≠ ∅, and P ∩ T = ∅; Pre:(P x T) → N is the pre- pi) − pre (pi, tj).
incidence matrix. Alternatively, an input functions that
Definition 6. (firing transition ). A transition t fired if this
defines directed arcs from places to transitions, where N
enabled. The firing of a transition t enabled at marking M,
is a set of non-negative integers; and Post: (T x P) → N is removes E(p, t) token from each input place p to transition
the Post-incidence matrix or an output function that t, and adds tokens to each output place p to transition t,
defines directed arcs from transitions to places; and M0: P where E(t, p) is the weight of arc 1 to p. The marking M'
→ N is the initial marking. The execution of a Petri net resulting from the firing of an enabled transition t in a
causes its marking to change. Execution is performed by marking M, M[t〉M’, is defined as follows:
firing enabled transitions. A transition is enabled when
each one of its input places is marked with at least as M'(p) = M(p) − E(p, t)+E(t, p) if ∀p ∈ (●t ∩ t●)
many tokens as the weight of the arcs connecting these M'(p) = M(p) − E(p, t) if ∀p ∈ ( ●t \ t●)
input places with the transition. A transit-ion fires by M'(p) = M(p) + E(p, t) if ∀p ∈ (t● \ ●t)
removing as many tokens from each one of its input M'(p) = M(p) otherwise
places as the weight of the arcs connecting these input for all p∈ P, and where E is arc definition 1.
places with the transition and by placing as many tokens
in each one of its output places as the weight of the arcs Definition 7. A transition t ∈ T is enabled at M if and
connecting these output places with the transition. only if (iff) (∀p ∈ ●t) ( M(p) ≥ 1) and ( ∀p ∈ t●) (M(p) =
0). A transition t ∈ T is enabled at marking M iff ∀p∈ P:
M(p) ≥ Pre(p, t). A transition t enabled at M can fire
DOI: 02.WSCNIS.2014.1.30 188
© N&N Global Technology 2014
yielding a new marking M’ (reached marking) defined by possibility of an infinite activity of all transitions). A net Ψ
M’(p) = M0(p) − Pre(p, t) + Post(p, t), (it is denoted by is structurally live iff ∃M0 such that the marked net (Ψ,
M[t〉M’). M0) is live. Transition t1 has a shared place p with
transition t2 iff p ∈ ●t1 ∩ ●t2. It should be noted that the
Definition 8. (linear state equation). A sequence of property of Definition 14, implies the absence of
transitions σ ={t1, t2, … ,tn } is a firing sequence of (Ψ, deadlocks in the system modeled. Liveness in a Petri net
M0) iff there exists a sequence of markings such that means that for all reachable markings from an initial
M0[t1〉 M1[t2〉 M2 . . . , [tn〉 Mn . Moreover, marking Mn is marking any transition can eventual be fired. This implies
said to be reachable from M0 by firing σ, and this is absence of deadlock. In general, Petri nets may not be live.
denoted by M0[σ〉Mn. The firing sequence is a marking Definition 14. (dead marking). A PN is live under M0 iff
(M1, M2, M3, … , Mn+1) such that: (∀i, 1 ≤ i ≤ n), and (Mi ∀t ∈ T, t is live under M0. A transition t ∈ T is live under
[ti〉 Mi+1), We can also write its by [M1[σ〉Mn+1]. The set of M0 iff ∀M ∈ R(Ψ, M0), ∃M' ∈ R(Ψ, M0), t is friable under
all markings reachable from M0 is denoted by Reachability M’. A transition t ∈ T is dead under M0 if ∃ / M ∈ R (Ψ,
set R(M0). The function σ’: T → N+ is the firing count M0), where t is firable. A marking M ∈ R (Ψ, M0) is a
vector of the firable sequence σ, i.e. σ′[t], represents the (total) deadlock iff ∀t∈ T, t is dead.
number of occurrences of t ∈ T in σ. If M0[σ〉M’, then we A P-invariant characterizes a token conservation rule
can write in vector forms M’= M0 + C.σ′, which is referred for a set of places, over which the weighted sum of tokens
to as the linear state equation of the net. A marking M0 is is constant independently from any firing, i.e., for a p-
said to be potentially reachable iff ∃X ≥ 0 such that: M′ = invariant x and any markings Mi , Mj ∈ Ψn , which are
M0 + C.σ ≥ 0, where σ is a firing sequence, a vector whose reachable from M0 by the firing of transitions, it holds:
i-th denotes the number of occurrences of in σ. xT. M = xT. M0.
Definition 9. (Invariant). P-invariant (resp., T-invariant)
of a net Ψ = (Ψ, M0) is a non-negative row integer |P|- 3. Siphons and Traps Properties
vector x (respectively, |T|-vector y) satisfying the equation A siphon is a set of places that can become empty
xT. C = 0 (respectively, C. yT = 0), where C is the and is known to be the cause for the lack of liveness and
incidence matrix of Ψ. A non-zero integer vector y ≠ 0, reversibility in nets modeling the FMS resource allocation
(respectively x ≠ 0). [5]. A siphon and trap are a special properties structure of
Definition 10. Let Petri net Ψ = (Ψ, M0), and a node x ∈ a Petri net in which the net is divided lead to the sub-set of
(P x T), •x denote the preset of x, i.e. x ∈ (P ∪ T) is places according to the places-invariants. These are
defined as •x = {y | ( y, x) ∈ pre(p, t)}. Similarly, x• analysis to the checking of some properties of liveness,
denotes the post-set of x, i.e. x• ={y | (x, y) ∈ post (p, t)}. deadlock-free, boundedness … etc., of a Petri nets are very
closely related. Siphon and traps have been used
For X = {x1, x2, …, xn} ⊆ (P x T), and •X = {•x1 ∪ •x2 ∪
extensively [10] and investigated for the structural analysis
…, •xn}, X• = {x•1 ∪ x•2 ∪ … ∪ x•n}, are called the preset
of a Petri net. That the sets of places, siphons are
and postset of X respectively. equivalent to deadlocks (or know as deadlocks). The
Definition 11. (Properties Boundedness, and Safe-ness). A concept in structural analysis of a Petri net is the siphon. A
marked PN (Ψ, M0) is said to be (marking) k-bounded iff siphon is a set of places that once insufficiently marked
each of its places is k-bounded. A 1-bounded net is called will be never marked again. A siphon is controlled if it
safe. A marked PN = (Ψ, M0) is bounded if there exists k remains marked for all reachable markings. Liveness is an
∈Ψ such that (Ψ, M0) is k-bounded. A net Ψ is structurally important behavioral feature of Petri nets, which is closely
bounded iff ∀M0 the marked (Ψ, M0) are k-bounded for related to certain properties of siphons.
some k ∈Ψ. Definition 15. A siphon in a Petri Net is a structural object
Definition 12. (Reversibility). A Petri net (Ψ, M0), is defined as a non-empty subset of places, S. For a Petri net
reversible if, in any marking Mk reachable from initial (Ψ, M0), a non-empty subset S (resp. τ) of places is called
marking M0, M0 is reachable from Mk , that is, it is always a siphon (resp. trap) if ●S ⊆ S●( resp. τ● ⊆ ●τ), i.e., every
possible to go back to the initial marking. transition having an output (resp. input) place in S has an
Among many properties of Petri, nets being searched input (resp. output) place in S (resp. τ). If M0(S) = ∑ p ∈ S,
in literature. For the purpose of modeling of Flexible and M0(p) = 0, S is called an empty siphon at M0.
Manufacturing Systems the most important properties are
liveness, boundness, safeness, deadlock, conservative, Definition 16. A sets of places τ is a trap iff: τ● ⊆ ●τ,
persistence, reachability tree, reversibility, Siphon and where τ is a minimal Trap iff there does not contained any
Trap. Let as recall the definition of the Petri nets liveness other Trap τ ⊆ p. A minimal siphon that does not contain a
playing the essential role in further considerations. marked trap is called a strict minimal siphon (SMS).
A siphon is called minimal if it does not contain
Definition 13. (Liveness). A transition t ∈ T is live in net another siphon as a proper subset. S is maximal if no other
(Ψ, M0) iff ∀M ∈ R(Ψ, M0) ∃M’ ∈ R(Ψ, M0) such that siphon includes it. It is called a strict minimal siphon
M’ enables t. The marked net (Ψ, M0) is live iff all its (SMS), denoted S, if it does not contain a trap. A siphon is
transitions are live (i.e. liveness of the net guarantees the said to be controlled if it is marked under all reachable
DOI: 02.WSCNIS.2014.1.30 189
© N&N Global Technology 2014
markings. A trap is said to be minimal if it does not ={t2, t3, t4}, and S2● ={t1, t2, t3, t4}, therefore, ●S2 ={t2, t3,
contain another trap as a proper subset. τ is maximal if no t4} ⊆ S2● = {t1, t2, t3, t4}. So that, we can be complete the
other trap includes it. rest sets of siphons in this manner.
The union of two siphons (resp., traps) is again a Therefore, the set traps {t1, t3, t2, t4}⊆ {t2, t1, t4, t3} is
siphon (resp., trap). A siphon (trap) is called a basic siphon true. So that, we can computation the rest sets of traps in
(basic trap) if it cannot be represented as a union of other this manner. The incidence matrix C of the net in Fig 3, is
siphons (traps). The union of some basic siphons (traps) an (5 x 4) matrix. The Petri net of Fig. 2, has the following
can generate so all the siphons (traps) in a Petri net. A incidence matrices shown in Fig 3.
siphon (trap) is said to be minimal if it does not contain Similarly, the calculation of a minimal Trap is:
any other siphon (trap). Minimal siphons (traps) are basic τ6 = {p1, p3, p4, p5} for example {p1, p3, p4, p5}● = {t1,
siphons (traps), but not all basic siphons (traps) are t3, t2, t4}⊆ ●{p1, p3, p4, p5} = {t2, t1, t4, t3}.
minimal.

Example 1
Let us consider the Petri net shown in Fig. 2, is an
example of the siphon and trap. The initial marking is
represented by: M0 = [0, 1, 0, 0, 2]T, the solid black circles
in M(p2 ) = 1 and M(p5 ) = 2 are represent the tokens of the
initial marking.

Fig. 3. The incidence matrix of Fig. 2

According to the definition 8, linear state equation is


an ordinary Petri net a transition t of an ordinary. Petri net
is enable if and only if each of its input places contains at
least one token. In the example represented in Fig. 2, the
Figure 2. Example of Petri net structure initial marking M0 = [0, 1, 0, 0, 2]T and the following
transitions can be fired starting from M0.
The only transition initially enabled in the net is
transition t4. As it fires, the token is removed from p5 and
is added to p4, the result marking is M1 =[0, 1, 0, 1, 1],
which enables transition t2. The pre-set of transition t2, is

t2 ={p1, p2}, and the post-set of place p4, is p•4 ={t2, t3}.
Transition t3 is not enabled by this new marking since p3 ∈
pre(t3) is not marked. The Petri net of Fig. 2, has contains
7-sets of siphons and 7-sets of traps (excluding the entire
set of places, which is both a siphon and a trap).

Obviously, there are 7-sets of siphons:


[S1= {p4, p5}, S2 = {p1, p4, p5}, S3 = {p1, p2, p4, p5}, S4
= {p2, p4, p5}, S5 = {p1, p3, p4, p5}, S6 = {p2, p3, p4, p5}, and
S7 = {p1, p2, p3, p4, p5}].

There are 7-sets of traps: [ τ1 ={p2, p3}, τ2 = {p2, p3,


p4}, τ3 ={p1, p2, p3}, τ4 ={p1, p2, p3, p4}, τ5 ={p2, p3, p4, Fig. 4. the Coverability tree of Fig. 2.
p5}, τ6 ={p1, p3, p4, p5}, and τ7 ={p1, p2, p3, p4, p5}].
Among them, {p4, p5} is minimal siphons, and Apply definition (8), state equation M′ = M0 + C.σ,
{p2, p3}, {p1, p3, p4, p5}, are minimal traps. and taking the column vector of firing transition from the
incidence matrix on Fig.3. The marking can be evolving
In order to calculation a siphon and trap, let us return M1 = [0, 1, 0, 1, 1]T after the firing of t4. Such that M1 =
to the net in Fig. 2. The set of places S1 = {p4, p5}, M0 + C. σt4 = [0, 1, 0, 0, 2]T + [ 0, 0, 0, 1, –1]T = [0, 1, 0,
constitutes a siphon, the set of pre-transitions is ●S1 = {t3, 1, 1] = M1. Each of these new markings represent a node
t4}, and the set of post-transitions is S●1 = {t2, t3, t4}. of the reachability tree and used next-state at firing
Therefore, the set of siphon ●S1 = [{t3, t4} ⊆ S1● = {t2, t3, transition. In the sequel, the next marking can be found by
t4}]. Another siphon analyzed S2 = {p1, p4, p5}, since ●S2 adding last marking to the column of transition shown in
DOI: 02.WSCNIS.2014.1.30 190
© N&N Global Technology 2014
Fig. 3, where transition t2 is enable. The new marking M2
= M1 + C.σt2 = [0, 1, 0, 1, 1] + [1, 1, 0, –1, 0]T = [1, 2, 0,
0,1] = M2, and M3 = M1 + C.σt4 = [0, 1, 0, 1, 1] + [ 0, 0, 0,
1, –1]T = [0, 1, 0, 2, 0] = M3, and in the rest of the net. Our
experiment is to compute and analysis of Petri net in Fig.
2, the PN Toolbox in MATLAB is display the reachability
tree and marking list as shown in Figure 4.

Many properties of Petri nets can be analyzing using the


reachability graph or the coverability graph in MATLAB
[8]. The PN Toolbox has been motivated by the fact that Fig. 5. A production line consisting of two machines
MATLAB is very popular software. The following steps
can be experiments in MATLAB for the Petri net in Fig. Petri nets are a good tool used for modeling and
2., which is investigate the reachability graphs in order to analysis of discrete event systems (DESs). In addition, PN
find siphons (that is structural deadlocks in classical structure includes deadlock prevention and avoidance,
terminology) the net, and analyze its structural properties. supervisory control is different forms of FMS's. Siphons
The analysis approach experiments in MATLAB for and traps are a new kind of invariants of PN. Differently,
the study of the so-called behavioural properties of Petri from those associated with flows, the invariant laws
nets are the construction of the coverability tree or associated with siphons and traps do not hold in every
coverability graph using untimed Petri net model. marking. The net of Fig. 6, has the following minimal
Therefore, the behavioral properties (including deadlock) siphons. A siphon S1 = {p1, p2, p3} is both minimal siphon
can show in the Figure 4. The aims at the evaluations are and trap since ●S1 ⊆ S1● = {t1, t2, t3}. A trap τ1●= {p1, p2,
the implemented siphons calculation and the control p3}● = {t1, t2, t3}, and ●τ1 = ●{p1, p2, p3} = {t3, t1, t2}, so
places synthesis, which are possible to see in existing that a trap is true, where τ1● ⊆ ●τ1.
software tools. Petri Net Toolbox in MATLAB is tool
enable its user to evaluate different control structure of
PN via visualization of processes flow and some
performance statistics calculation using the computer
simulation method.

4. Petri Net Models of FMS's


Example 2.
Let us consider a flexible manufacturing system (FMS)
consisting of two machines M1 and M2, and two
industrial robots R1, and R2 as shown in the Fig.5. A
robot R can pick up and deliver products between M1 and
M2. The manufactures produced two types of part, A and
B. In addition, there are two types of A parts (A1, A2),
and two type of B parts (B1, B2). All part of either type
needs two machine operations to completion product. For
instance A1-part and B1-part has requires two operations
Figure 6. Petri net model of a FMS [6].
1 and 2 to be processed by M1, in order to become final
The Petri Net structure Fig. 6, are equivalent representations all
production, while a A2-part and B2-part, has requires constrictions of the FMS in Fig. 5.
two operations 2 and 1 to be processed by M2. We
assume that the types parts are continuously supplied Legend: Petri Net model of flexible assembly system
while the produced parts are shipped away. While the p1= M1 Machine1 is ready
assembling is complete, machine and the robots are
released product. Referring to the method presented in p2 = A1 a type part A1 perform by M1(op1) first.
[6], a Petri net model is given in Fig. 6. The Petri net p3 = B1 a type Part B1, perform by M1 (op2)
model in fig. 6, places, transition, and arcs are structure second
according to the operational requirements in order to p4 = R1 Robot-1 is ready
complete the product. P5 = R2 Robot-2 is ready
P6 = B2 a type Part A2, perform by M2 op1 first
P7 = R1 a type Part B2, perform by M2 op2
second

DOI: 02.WSCNIS.2014.1.30 191


© N&N Global Technology 2014
P8 = M2 Machine 2 is ready
t1 models starting op1 for the type a part
A1
t2 models starting op2 for the type a part
B2
t3 assembly process is completed, the M1
and the robot are released
t4 models starting op1 for the type a part
A2
t5 models starting op2 for the type a part
B2
t6 Assembly process is completed, the M2
Fig. 8. The Coverability tree of fig. 6
and the robot are released
Having applied the graphic an MATLAB based PN
Other siphon S2 = ●S2 = ●{p2, p3, p4, p7} = {t1, 2t2, t5, t6},
analysis and visualization of simulation results.
and S2● = {p2, p3, p4, p7}● = {t1, 2t2, t3, t5, t6}●. Therefore
When an untimed PN is live, then the FMS modeled by
the siphon is true, where ●S2 ⊆ S2●. Similarly a trap is τ●2 this PN will not be confronted able with the deadlock
= {p2, p3, p4, p7}● ={t1, t2, t3, t5, t6}, and ●τ2 ={t1, t2, t3, t5,
problem, no matter how long each operation takes, if the
t6}. Moreover, S2 both a minimal siphon and trap (or a P- sequenc of the operations along the entire production flow
invariant). There are 5-sets of minimal siphons, and 4-sets
is not changed. PN in MATLAB toolbox is contained key
of minimal trap in Fig. 6, shown at the following table 1.
functions for the analysis of Petri net properties.
The properties menu on MATLAB toolbox provides
Table 1.
computational tools for the analysis of the behavioral and
structural properties of the current PN model of Fig. 6.
The MATLAB toolbox menu displays all the result sets of
siphon and trap. By considering the possible controlled-
siphon property, the added control place can be connected
arcs to the necessary places in order to become deadlock-
free. In Fig. 6, the minimal siphon whose emptiness leads
An MATLAB is one of the most popular software tools to the deadlock of the net shown in Figure 8. To control
for the area of applied mathematics and control the net prevented from being unmarked, a place C is
engineering; it is becoming the standard environment to added with ●C = {t3, t6} and C● = {t1, t4}, as shown in Fig.
interchange ideas implemented in algorithms. State-flow 9, in order to the control, is a Petri net in fig 6.
processes are a graphical design and development tool for
control and supervisory. Also, Petri nets are successfully
used its in the real applications to control parts assembly
system, and automatic manufacturing system, warehouse
load/unload system.
The Petri Net Toolbox Version 2.3 [8], is a software
tool for simulation, analysis and design of FMSs, based
on PN models. An MATLAB toolbox for simulation,
analysis and design with PN is characterize in accuracy of
design and implementation of distributed manufacturing
control systems with (P/T-net). Note that the PN models
shown in Fig. 6, considered encompasses the all-possible
realizations of the assembly process execution. For
instance, the deadlock situation shown in Fig. 8 is
modeled by the marking M4 = [0, 1, 0, 0, 0, 1, 0, 0] at the
transition t4, in the third level of the Coverability tree
shown in Figure 8. Fig. 9. Additional place C, called control place in order to
The deadlock is occurring when transition t1 fire, next controlled siphon.
transition t4 is the deadlock. The computer simulation of
the proposed manufacturing system using untimed Petri
nets provides the possibility to view the manufacturing
process.

DOI: 02.WSCNIS.2014.1.30 192


© N&N Global Technology 2014
[4] Banaszak, Z. A., and Mowafak H. Abdul-Hussin (2002),"
Deadlock Handling for Distributed Workflows", In: Engineering
& Technology Journal, Published by Univ. of Technology ,
Baghdad , No.5, Vol. 21, 2002, pages 377- 388.
[5] Ezpeleta. J. ; J.M. Colom, and J. Martinez, (1995)," A Petri net
based deadlock prevention policy for flexible manufacturing
systems," IEEE Trans. on Robotics and Automation, vol. 11, no. 2,
pp. 173-184
[6] Hruz B., and M.C. Zhou, (2007) ,"Modeling and Control of
Discrete-event Dynamic Systems with Petri Nets and Other Tool";
Springer, London Limited.
[7] Huixia Liu, and Gao Zhenxin ," Siphon Basis-Based Design of
Petri Net Controllers for a Class of Flexible Manufacturing
Systems, In: 2013 IEEE International Conference of IEEE Region
10 (TENCON 2013), pp. 1-4
[8] Mahulea, C., et al., (2003),” Home Page of the Petri Net Toolbox:
http://www.ac.tuiasi.ro/pntool
[9] Murata, T.(1989),"Petri nets: properties, analysis and
applications". Proc. of the IEEE 77(4): 541-580.
[10] Tricas, F., and J. Ezpeleta, (2006), “Computing Minimal Siphons
Fig. 10. Marking list of Fig. 9, is deadlock-free in Petri Net Models of Resource Allocation Systems: A Parallel
Solution", IEEE Tran. on Systems, Man, and Cybernetics-Part A:
The initial marking of control places C is one. Such System and Humans, Vol. 36, No. 3, MAY 2006, pages 532-539
an additional place is called a monitor (or control place) in [11] Viswanadham, N., et al., (1990),"Deadlock prevention and
terms of its role. In Fig. 9, the addition of C leads to an deadlock avoidance in flexible manufacturing systems using Petri
net models", IEEE Trans. on Robotics and Automation 6(6): 713-
extra minimal siphon that is a marked trap. As a result, no 722
siphon can be emptied in the net and it is deadlock-free
(actually live). This example motivates one to discover the
mechanism to make a siphon controlled by adding a
monitor. The result of the analysis of Petri nets is shown in
Fig. 10, because the MATLAB tool can be shown the PN
shape in the simulation is accurate and correct results.

5. Conclusions
Petri net is a very good graphics and the
mathematical tool suitable for modeling and the analysis
of simulation may be efficiently carried out both
graphically and numerically. This paper presents an Mowafak Hassan Abdul-Hussin received the B.S. (1977) from
efficient a siphon and a trap for control structure analysis the Al-Mustansiriyah University, Baghdad and M.S., and Ph.D.
of PN in MATLAB Toolbox. This tool has a set of greatly degrees from the Technical University of Wroclaw, Poland,
1984, and 1989 respectively. Since 1991, he has been with the
help us to find siphon and trap easy reachability or University of Technology, Baghdad. His research interests
coverability tree, deadlock prevention, the liveness of an include Petri net theory and applications of the Flexible
ordinary Petri net can also be investigated. The properties Manufacturing Systems.
menu on MATLAB provides computational tools for the
analysis of the behavioral and structural properties of the
current PN model. Petri net model as a tool helps us to
behavioral investigation and structural properties. This
structure represents PN a well-known powerful and widely
used analytical formalism.

REFERENCES
[1] Banaszak Z. A., and B. H. Krogh ,(1990) “Deadlock avoidance in
flexible Manufacturing systems with concurrently competing
process flows", IEEE Trans. on Robotics & Aut. No.6, pp. 724-734
[2] Banaszak, Z., and Mowafak H. Abdul-Hussin (1988),"Petri net
approach to automatic real-time program synthesis", In: Control
and Cybernetics, Vol. 17, N. 4, pag. 361-375, Poland
[3] Banaszak, Z. and Mowafak H. Abdul-Hussin (1995), " Modelling
and Simulation of Flexible Assembly System: A Petri Net
Approach”, In: Qater University of Sciences Journal, Vol. 15, No.
2, pages 307-318

DOI: 02.WSCNIS.2014.1.30 193


© N&N Global Technology 2014

You might also like