Elementary Siphons of Petri Nets and Deadlock Control in FMS

For responsiveness, in the Petri nets theory framework deadlock prevention policies based elementary siphons control are often utilized to deal with deadlocks caused by the sharing of resources in flexible manufacturing system (FMS) which is developing the theory of efficient strict minimal siphons of an S 3 PR. Analyzer of Petri net models and their P- invariant analysis, and deadlock control are presented as tools for modelling, efficiency structure analysis, control, and investigation of the FMSs when different policies can be implemented for the deadlock prevention. We are to show an effective deadlock prevention policy of a special class of Petri nets namely elementary siphons. As well, both structural analysis and reachability graph analysis and simulation are used for analysis and control of Petri nets. This work is successfully applied Petri nets to deadlock analysis using the concept of elementary siphons, for design of supervisors of some su-pervisory control problems of FMS and simulation of Petri net tool with MATLAB.


Introduction
A flexible manufacturing system (FMS) is proposed to produce a set of different types of products of varying batch size.It contains a set of computer-controlled machines and transportation systems.Various types of raw components enter it and are processed concurrently.Hence, part resources among various competing jobs have to be carefully controlled and coordinated.For this purpose, a powerful tool for modelling which is called Petri net (PNs) can be used.Petri net is a modelling tool applicable to numerous of FMS.
Petri nets are a favorite tool for depicting and studying information processing systems that are concurrent, asynchronous, synchronous, distributed systems, and reconfiguration structure system.When Petri nets are use of modelling of a real system, a powerful feature of Petri nets is their ability to represent good behavior properties of the system, such as liveness, boundedness, deadlock-free-ness, and reversibility.In FMSs, liveness ensures that deadlocks do not occur.Boundedness guarantees that the number of raw components, buffer spaces and resources is bounded.Reversibility enables the system to return to its initial state, thereby guaranteeing repetitive production.The competition for resources in an FMS may cause it to be deadlocked.In general, a deadlock occurs when the raw components are blocked, while waiting for shared resources held by other production processes.Abdul-Hussin (2015) [1] studies the synchronization competitive processes to deal with deadlocks caused by the sharing of resources in FMS which is developing the theory for efficient strict minimal siphons for S 3 PR.An FMS example is used to illustrate the application of the proposed method, and competitive processes are provided in an S 3 PR to show its superior efficiency.The monitors are used to prevent the presence of unmarked siphons that are the direct causes of deadlocks in such a Petri net.The mathematical computations siphon and trap of Petri net are leading to liveness-enforcing Petri net supervisors with behavior that is more permissive.Petri nets are a modelling and simulation formalism for describing concurrency and synchronization in distributed of FMS.
Abdul-Hussin (2015) [2] presents an approach toward constructing a class structural analysis of Petri nets, where elementary siphon is a main utility used in the development of a deadlock control policy of flexible manufacturing systems (FMSs) that have been exploited successfully for the design of supervisors of some supervisory control problems.Deadlock-free operation of FMSs is significant objectives of siphons in the Petri net.A monitor is added to the plant model such that the siphon is P-invariant-controlled for each elementary siphon, where an integer programming technique is used to guarantee that no emptiable control-induced siphon is generated.The modelling, control and simulation are important topics for both design and operation of FMS.The author [2] has experimental approach based-siphon which is able to resolve the problem of deadlock occurred to Petri nets that are representative of an FMS.
A system of simple sequential processes with resources (S 3 PR) by Ezpeleta et al. [3] is a powerful Petri net model to describe and analyze the behavior of FMS, and has been adopted widely by many researchers to handle deadlock problems with FMS [1] [3] [4].Ezpeleta et al. [3] develop a design method of monitor-based liveness Petri net supervisors for FMS, which is usually considered to be a classical contribution that utilizes structural analysis techniques of Petri nets to prevent deadlocks in FMS.The deadlock prevention method can be achieved by adding a control place and related arcs to each strict minimal siphon (SMS), thus the SMS can never be emptied, which guarantees the liveness of the controlled system.There is proposed the relationship between strict minimal siphons and liveness of an S 3 PR is established.Elementary siphons are first proposed by Li et al. [5]- [7] which are a subclass of SMSs.Apparently, the number is smaller the set of all SMSs.They use the method to control only elementary siphons and prove what the controlled system is live under some conditions.Huang et al. (2001) [8] propose a strict minimal siphon extraction algorithm such that the complete siphon enumeration is successfully avoided.A shortcoming of their method is that the maximal unmarked siphons need to be computed beforehand, thus the computational efficiency of their method still needs to be improved.Huang et al. (2006) [9] have proposed a deadlock prevention algorithm for S 3 PR modelled manufacturing systems.The algorithm is an iterative approach based on mixed integer programming (MIP) method [8].At all iteration, the MIP technique is used to find an unmarked maximal siphon.Next, an unmarked minimal siphon is obtained from the maximal siphon.
Organization.Section 2 provides the preliminaries to be used in this paper.The deadlock control policy is proposed, where is introduced the class (S 3 PR) of Petri nets models, and the concept of elementary siphons in Section 3. Section 4 presents an FMS example to illustrate the applications of the proposed policy.Section 5 concludes papered.

Preliminaries [1] [3]
Definition 1.A Petri net is a 4-tuple Ψ = (P, T, E, W), where P, and T are finite nonempty, and disjoint sets.P is a set of places, and T is a set of transitions with P ∪ T ≠ ∅, and P ∩ T = ∅.E ⊆ (P × T) ∪ (T × P) is called a flow relation or the set of directed arcs.The net has represented by arcs with arrows from places to transitions or from transitions to places.W: E → Z + is a mapping that assigns a weight to any arc, where { } 0,1, 2, Z + =  .Ψ = (P, T, E, W) is ordinary, denoted as Ψ = (P, T, E, W), (When Weights W, of the arcs (W) = l, the net Ψ is called ordinary Petri net).The Weights W: (P × T) ∪ (T × P) → Z + is a mapping that assigns a weight to an arc: W(x, y) > 0 if (x, y) ∈ E, and W(x, y) = 0 otherwise, where x, y ∈ P ∪ T and Z + denote the set of non-negative integers.
Definition 2. In the absence of self-loops, an equivalent information is given by the incidence matrix.The computation of the incidence matrix C is subtracting Definition 5. A transition t is said to be live if for any M ∈ R(Ψ, M 0 ), there exists a sequence of transitions that is fired to lead next marking M' that enables at transition t.A PN is said to be live if all the transitions are live.A PN contains a deadlock if there is a marking M ∈ R(Ψ, M 0 ), at which no transition is enabled.Such a marking is called a dead marking.Deadlock situations are because of in appropriate resource allocation policies or exhaustive use of some or all resources.Liveness of a PN means that for each marking M ∈ R(Ψ, M 0 ) reachable from the M 0 , it is finally possible to fire t, ∀t ∈ T through some firing sequence.A net (Ψ, M 0 ) is said to be reversible, if ∀M ∈ R(Ψ, M 0 ), M 0 ∈ R(Ψ, M).Therefore, in a reversible net it is always possible to go back to initial marking M 0 .A marking M' is said to be a home state, if for each marking M ∈ R(Ψ, M 0 ), M' is reachable from M. Reversibility is a special case of the home state property.If the home state M' = M 0 , then the net is reversible.Definition 6.A sequence of transitions , , , n t t t σ =  is a firing sequence of (Ψ, M 0 ) if and only if (iff) there exists a sequence of markings such that is: Moreover, marking M n is said to be reachable from M 0 by firing σ, and this is denoted by M 0 [σ〉M n .The firing sequence is a marking ( ) The set of all markings reachable from M 0 is denoted by reachability set R(M 0 ).The function σ': T → Z + is the firing count vector of the firable sequence σ, i.e. σ′[t] represents the number of occurrences of t ∈ T in σ.If M 0 [σ〉M', then we can write in vector form M′ = M 0 + C ⋅ σ′, which is referred to as the linear state equation of the net.A marking M 0 is said to be potentially reachable iff ∃X ≥ 0 such that: M′ = M 0 + C ⋅ σ ≥ 0, where σ is a firing sequence, a vector which is i-th denotes the number of occurrences of in σ.For M 0 [σ〉M n , we have , which is called the state equation of net Ψ, where σ, called the firing count vector, is a vector which is i-th entry denotes the number of occurrences of t i in σ.
Definition 7. A P-vector is a column vector I: P → Z indexed by P, where Z is the set of integers.I is a P-invariant (place invariant) if and only if I ≠ 0 and I T ⋅ [Ψ] = 0 T holds.P-invariant I is said to be a P-semiflow if every element of I is non-negative.
A siphon is said to be minimal iff there is no siphon contained in S it as a proper subset.A minimal siphon that does not contain the support of any P-invariant is called a strict minimal siphon (SMS).A siphon S is controlled iff it can never be emptied.It is said to be invariant-controlled by P-invariant I if I T ⋅ M > 0 and ||I|| + ⊆ S. Definition 9. A PN is live under Definition 10.(Conservative).A Petri Net PN with initial marking M 0 is strictly conservative, if for all markings M, elements of the Reachability set R(M 0 ), the number of tokens remains constant, i.e.A marked Petri net Ψ = (Ψ, M 0 ), is said to be conservative iff : servative, then the sum of all tokens will remain a constant in all reachable markings: ( ) ( ) .
A P-invariant characterizes a token conservation rule for a set of places, over which the weighted sum of tokens is constant independently from any firing, i.e., for a p-invariant x and any markings M i , M j ∈ Ψ n , which are reachable from M 0 by the firing of transitions, it holds.
Definition 11.The Pre-and Post-incidence matrix of net Ψ can be represented as (n × m) matrix, Pre-and Post with elements Pre(p i , t j ), and Post(p i , t j ), respectively.The linear algebraic analysis method uses the description of a Petri net by its so called incidence matrix C = (C ij ) which is defined by: is the change in number of tokens in p i after firing t j once, for ( ) . Moreover, the incidence matrix C of the net is defined as C = Post-Pre.The incidence matrix of a net is a matrix with |P| rows and |T| columns defined as pre   An important practical, applied definition (6) (linear state equation) is a 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 this example represented in Figure 1, the initial marking M 0 = [1, 0, 1, 0, 1] T and the following transitions can be fired starting from M 0 .
Applied definition (6), the state equation is: M′ = M 0 + C ⋅ σ ti , and taking the column vector of firing transition from the incidence matrix on Figure 2. The marking evolve M 1 = [0, 1, 1, 1, 1] T , after the firing of t 1 .Such For each of these new marking is representing a node of the reachability tree and used the next state at firing transition.In the sequel, the next marking can be found by adding last marking to the column of transition shown in Figure 2, where transition t 1 is enabled.The new marking The deadlock is occurring at transition t 4 , the marking M 9 = [0, 0, 2, 0, 3] as shown in Figure 3, in the red colored.The remainder of the mathematical computation of the net in Figure 1, can be analytically in the reachability tree of a Petri net is shown in Figure 3, where are used Petri net tool for MATLAB, (Toolbox PN-Tool 2.3) [10].
Additional place V 1 , called control place in order to controlled siphon of the net.The simulation and structure analyses of this example are provided to illustrate the feasibility and effectiveness of siphon controlled by adding a monitor that can be enforced on the net dynamics by the addition of a "control" or "monitor" place to the original net structure.
We have predicted a deadlock with a look-ahead Petri net controller.The connections of control places V 1 is in the red colored in

Deadlock Prevent Policy
Deadlock prevention policy is dealing with a special class of Petri nets, which is a subclass of ordinary and conservative Petri nets called S 3 PR.In this a section, we introduced some definitions have been needed for our application for a deadlock prevention policy that can keep the system in deadlock-free for a class of Petri nets, which is called S 3 PR nets.

The Class of the S 3 PR Nets
The class of Petri nets investigated in this research is an S 3 PR that is first proposed in Ezpeleta et al. [3].The presentation of its formal definitions is needed for our application.The following results are mainly from [3] [4].
Definition 12.A simple sequential process (S 2 P) is a Petri net Ψ = (P A ∪ {p 0 }, T, E), where the following statements are true: 1) P A ≠ ∅ is called a set of operation places; 2) p 0 ∉ P A is called the process idle place; 3) A net Ψ is a strongly connected state machine; and 4) Every circuit of Ψ contains place p 0 .Definition 13.Let Ψ i = (P A ∪ P 0 ∪ P R , T, E) be an S 3 PR.An initial marking M 0 is called an acceptable one if: 1) ∀p ∈ P 0 , M 0 (p) ≥ 1; 2) ∀p ∈ P A , M 0 (p) = 0; and 3) ∀p ∈ P R , M 0 (p) ≥ 1.

Elementary Siphon in Petri Nets
The concepts elementary and dependent siphons are original work by Li et al. [5]- [7].They are developed the Petri nets theory of computation and powerful mathematics.We have introduced the concept of elementary and dependent siphons as well as used in this paper.,  , , and  , , , holds, where 0 j a ≥ .Theorem 1.Let Ψ ES be the number of elementary siphons in Ψ = (P, T, E, W).Then we have Ψ ES < min{|P|, |T|}.This result indicates that the smaller of a place and transition counts bound the number of elementary siphons in a net.Theorem 2. Let S be a siphon if net Ψ = (P, T, E, W) and η S be its characteristic T-vector.We can conclude that {t ∈ T|η S (t) > 0}, {t ∈ T|η S (t) = 0}, and {t ∈ T|η S (t) < 0} are a sets of transitions that is firings will increase, maintain, and decrease the number of tokens marked in S respectively.

Application of Petri Net Modelling in FMSs
Let us assume the small FMS have shown in Figure 6.The system consists of two robots, R1 and R2, each of which can hold one part at a time, and three machines, M1, M2, and M3.The machine M1 can process only one part at a time, while M2 and M3 can process two parts at a time.Parts enter into the FMS through input/output buffers I1/O1 and I2/O2.In the situation, we consider that there are two part types J1 -J2, can be produced in this system.The production routing of J1 is: The S 3 PR Petri net with 15 places and 11 transitions depicted in Figure 7, which has been considered in the literature (see [3] [6] [8]).We are choice of different approach to structure and initial markings in order to find out different sets of siphons, and have experienced, and application to show the efficient methods the concept of, elementary and dependent siphons in an S 3 PR can be controlled net.
The Petri net model of the FMS is shown in Figure 7, in which places p 3 , p 4 , p 9 , p 10 , p 11 , denote R1, M1, M2, R2, and M3, respectively.Places p 1 and p 15 are idle places, and p 2 , p 5 , p 6 , p 7 , p 8 , are operation places for production Line_1.Places p 12 , p 13 , and p 14 are operation places for production Line_2.The Petri net shown in Figure 7 is represented an S 3 PR by this place specification.
Figure 7 shows the Petri net model of FMS.Places p 2 and p 5 represent the operation of R1, and M1, respectively, for the production sequence of the part type_P 1 .Similarly, places p 2 , p 6 , p 7 and p 8 represent the operation of R1, M2, R2 and M3 respectively, for the production sequence of the part type P 1 .The production sequence of the part type_P 2 , places p 12 , p 13 and p 14 represent the operation of M3, R2 and M2 respectively.The number of tokens in Figure 7, M 0 is an acceptable initial marking if M 0 (p 1 ) = 3, M 0 (p 15 ) = 5, M 0 (p 9 ) = M 0 (p 11 ) = 2, M 0 (p 3 ) = M 0 (p 4 ) = M 0 (p 10 ) = 1, and others are zero.
For the Petri net of Figure 7 is an S 3 PR.The elements of this net are defined as: Figure 7.

M =
We can be found out the strict minimal siphons.In the Petri net shown in Figure 7, has 10 minimal siphons: { } , , S p p p = .
The set of siphons from S 4 -S 10 is both a siphon and a trap.We have choice strict minimal siphons S 1 , S 2 , and , , , , S p p p p p = .
We have three the strict minimal: The computation of S 1 and S 2 is leading to determinate the third control place S 3 from the account accumulation of S 1 and S 2 is the linearly independent vectors can be constructed in [η] shown as follows.
Therefore, the siphons that correspond to the first and second rows are elementary siphons.Next, we can compute the dependent siphons as: η S3 = η S1 + η S2 .Thus, S 1 = {p 8 , p 10 , p 11 , p 13 }, and S 2 = {p 7 , p 9 , p 10 , p 14 }, are elementary siphons and S 3 = {p 8 , p 9 , p 10 , p 11 , p 14 }, is a strict dependent siphon.The elementary siphons are Π E = (S 1 , S 2 ), and the dependent siphons Π D = (S 3 ), and S 3 is a strongly dependent siphon.We are representing here a structural analysis method including the following verification on the specification of the elementary siphon of the algorithm found in [6]- [8], and S 1 and S 2 are elementary siphons in the net for the deadlock control purpose.Therefore, we are connected control place VS 1 to the transition, where: •VS 1 = {t 6 , t 9 }, VS 1 • = {t 5 , t 8 }, and •VS 2 = {t 4 , t 5 , t 10 }, VS 2 • = {t 1 , t 3 , t 8 }.We can be adding two controls place in the original net.While the third control place is not necessary to add because the simulation of Petri net in Figure 8, do not affected results.The resulting control policy is overly restrictive only, and reachability graph has reduced to 15 states as show in Figure 9.This is successfully resulted when comparison purposes with the other researcher such as: Ezpeleta et al. [3] computes three control places and has only 28 reachable marking.The method in [6] classifies S 1 and S 2 as elementary siphons and S 3 as strictly dependent.Then, only two controls places are necessary, which actually coincide with the first two control places added by the previous method.In addition, this work has only 28 markings be reachable in the controlled net.The method of Huang et al. (2001) [8] proposed to require three control places, one of which connected with weighted arcs that the controlled net is not ordinary: The controlled net has only 44 reachable markings.In our experiment, we can add two-controlled net has only (15) reachable markings show in Figure 9, without needing third control places, because, the result is not affected to the net (i.e.some results).
The additional controlled places net of Figure 8, is live and obtain to marking M 14 , and has 15 reachable states marking, so that the Petri net is deadlock-free actually liveness.Siphons are generating even though the monitors are added.An experiment is carried on encouragement one to discover the technicality to make a siphon powerful to control by adding control places (monitor).The result of the efficient structural analysis of Petri nets, because the PN-Toolbox with MATLAB [10] can show the PN shape of the simulation is accurate and correct results.
For elementary siphons S 1 and S 2 , three monitor VS 1 and VS 2 are added respectively to the net.We can apply definition 7, to find a P-invariant controlled of the Petri net depending of the incidence matrix existing in Figure 10, implementation manuals.
In addition, there are five resources in this system of Figure 7, leading to five minimal P-invariants, we would like to mention as follow: This has been done with a Laptop computer, Intel(R) Core(TM) i5-3337U CPU@ 1.80GHz, with 4Gb of RAM, with Windows 7 Ultimate.

Conclusion
Petri net is possible to represent of FMS that can be simulation and analysis is supported by different visualization and interaction techniques to capture the properties such as strict minimal siphons, and behaviour of Petri nets quickly (e.g.interactive behavior, interactive exploration of invariants and the reachability graph).We are developing a guarantees tool for Petri net based to siphon, simulation and structural analysis dealing with the (FMS).Some control places and related arcs are added to minimal siphons such that no siphon can be emptied.A Petri net is efficient techniques to enumerate and reduce the reachability graph by adding monitors to all basic siphons and only those compound siphons.The reachability graph is reduced to explain the necessary evolutionary behavior of the PN regarding liveness and deadlocks.Based on Petri nets, a deadlock prevention policy is proposed to a special class of Petri nets called (S 3 PR).

1 . 1 .
and 0 otherwise.The state changes of a PN occur when a transition t is fire.These changes can be representing in an algebraic form using the state equation given by: M 1 = M 0 + post(p, t) − pre(p, t).Example An example of a Petri net is shown in Figure Places are circles and transitions by rectangles or bars.This is the convention, which has been adopted for ordinary Petri nets when the weight of arcs equals to one.To design a controller to avoid deadlock, it is necessary to find the strict minimal siphons as: S 1 = {p 1 , p 3 , p 4 }, and S 2 = {p 1 , p 2 , p 4 }.The strict minimal trap as Q 1 = {p 1 , p 4 , p 5 }, and Q 2 = {p 1 , p 3 , p 4 }.Siphons are very important in the analysis and control of deadlocks in a Petri net.Any Petri Net can be representation as an incidence matrix.The Petri net of Figure 1 has the following incidence matrices shown in Figure 2.

Figure 1 .
Figure 1.Shows a simple example of a Petri net.

Figure 4 .
The resulting controlled Petri net is shown in Figure 5.It can be verified that deadlock does not occur in this Petri net.In the Figure 1, the minimal siphon whose emptiness leads to the deadlock of the net shown in Figure 3.To control the net prevented from being unmarked, a place V 1 is added with ⋅V 1 = {t 3 } and V 1 ⋅ = {t 4 }, as shown in Figure 4, in order to the control is a Petri net in Figure 1.The effecting controlled place in Petri net is shown in Figure 5.It can be verified that deadlock does not occur in this Petri net.

Figure 5 .
Figure 5.The coverability tree is live of Figure 4.

Figure 6 .
Figure 6.Layout of a manufacturing cell of FMS.

Figure 10 .
Figure 10.The incidence matrix of Figure 8, and P-invariant.