Abstract
This article reports a transition-based control technique to prevent deadlocks for flexible manufacturing systems that can be modeled with a generalized class of Petri nets. The proposed method utilizes the structural properties of the Petri net model to avoid the computation of its reachability graph which in general leads to the state explosion problem. Three algorithms are developed. The first and second algorithms aim to compute first-met and n-met uncontrolled transitions, respectively, in an iterative manner until all the n-met uncontrolled transitions are found in the plant net model. The third algorithm is used to design n-transition controllers iteratively. The iteration terminates when all the transitions in the set of uncontrolled transitions are processed. The addition of the n-transition controllers to the plant net model is to make the n-met uncontrolled transitions controlled. The transition controllers are capable of enforcing liveness to the plant net model with all its reachable markings being retained in the controlled system, which ensures the full utilization of resources and provides the high productivity of a flexible manufacturing system.
Introduction
Economic diversification of a country usually depends on its emerging technological development and application. Manufacturing, as an essential source of society development and civilization, is a pillar industry in many developed and developing countries. A flexible manufacturing system (FMS) aims to provide a special consideration to diversify the products in a medium or small batch to increase the competition ability in the world market. An FMS usually consists of two main parts: a physical system that is composed of manufacturing resources (such as machine tools, robots, and transportation systems) shared by several jobs and a management system or decision-making system responsible for the control of the physical system to achieve the goal of productivity. 1 Due to the request of high throughput of such a system, deadlocks can occur because of resource sharing, which may degrade the performance of an FMS. 2 Deadlocks in some highly automated production processes such as semiconductor manufacturing or safety-critical systems may even lead to serious economic loss. 3
With the increasingly improved automation level in contemporary production processes, deadlocks are important issue to be considered in the design and control stage of an FMS, since their occurrences can halt the whole system from operation.4–6 Coffman et al. 7 formulates four necessary conditions for the deadlock occurrence in a resource allocation system. They are popularly known as Coffman conditions,5,8 that is, (1) mutual exclusion: a resource can only be used by one process at a time; (2) hold and wait: processes that use some resources may need another new resource; (3) non-preemption: it is infeasible to remove a resource that is held by a particular process, but a process can only release a resource by an explicit action of that process; and (4) circular wait: when two or more processes form a circular chain where each process waits for a resource that the next process in the chain holds. To prevent the occurrence of deadlocks, at least one of the four conditions should be broken. Several tools have been developed to deal with deadlocks in FMSs.8,9
Petri nets, automata, and graph theory are the three main methodologies to deal with the modeling, scheduling,10–12 and control problem13,14 of discrete event systems. A supervisor is usually designed to prevent the occurrence of deadlocks in an FMS.15,16 Recent decades have seen that Petri nets increasingly become essential to the study on deadlocks in an FMS as well as other supervisory control issues,17–20 since they can appropriately describe both structural and behavioral properties of an FMS, such as conflicts, concurrency, casual dependency, liveness, and boundedness.21,22 Generally there are four strategies to handle deadlocks in automated manufacturing systems:23–26 (1) deadlock ignoring, (2) deadlock detection and recovery, (3) deadlock avoidance, and (4) deadlock prevention.
The performance of a deadlock prevention policy can be evaluated based on the following three criteria:2,27–29 (1) behavioral permissiveness, (2) structural complexity, and (3) computational complexity. A maximally permissive supervisor usually leads to sufficient utilization of resources in a system.8,27 A supervisor with the minimal number of control places can decrease both hardware and software costs in the stage of control verification, validation, and implementation.27,30,31 A deadlock control policy with low computational complexity means that it can be applied to large-sized real-world systems.8,32
There are mainly two Petri nets–based analysis techniques used to cope with deadlocks:8,32,33 (1) structural analysis and (2) reachability graph (RG) analysis. In structural analysis, Petri net components, such as siphons, place and transition invariants, and resource transition circuits, are extensively used, as there are particular corresponding relationships between behavioral properties of a Petri net and its structural components. A deadlock prevention strategy derived from siphon control is usually suboptimal, since it is difficult to ensure every permissive state to be included in the controlled system.34,35 To prevent a siphon from being insufficiently marked, a control place can be usually used to disable the related transitions in a plant at some particular markings.5,36–40 In general, the number of siphons grows exponentially with the structural size of a net.
The RG analysis enables one to check certain properties of FMSs, such as liveness, boundedness, synchronization, concurrency, and safeness.38,41–43 However, the RG analysis usually requires a complete or partial enumeration of reachable states. Therefore, it suffers from the state explosion problem. The theory of regions is developed in Ghaffari et al. 41,44,45 and is thought of as one of the most powerful methods of deadlock prevention for deriving a maximally permissive supervisor for FMSs. However, it is computationally expensive since too many inequality constraints have to be considered in the linear programming problems, 41 in addition to the generation of a complete state space. The work by Uzam et al.38,42 divides the RG of a Petri net model into two components: a live zone (LZ) and a deadlock zone (DZ). The former contains legal markings, and the latter contains illegal markings. The partition of the RG is used to find the first-met bad markings (FBMs) in the DZ such that once all FBMs are prohibited, all illegal markings in the DZ are not reachable. The deadlock prevention method by Uzam et al.38,42 is an iterative procedure in which at each iteration step, an FBM is controlled by designing a control place. The iterations are repeated until all FBMs of a Petri net model are forbidden. However, this method does not guarantee maximally permissive behavior of the controlled system. It is then improved by the study in Chen et al. 46
Within the context of a supervisory structure using Petri net paradigm, the structures of a supervisor are mostly designed via control places in the existing literature. Only a few works can be found for obtaining a supervisory structure via transition controller in the literature. The disadvantage of using control places in the design of a supervisory structure is that they cut off some of the reachable states of the plant model, leading to non-optimal utilization of shared resources. In contrast, the advantage of using transition controllers in the design of a supervisory structure is that it retains all the reachable states of the plant model while achieving liveness of the plant model. It results in the full utilization of the shared resources of the plant model.
The work of Huang et al. 47 develops the first method to design a supervisory structure via transitions controller. In the developed method, they use the RG analysis to analyze the presence of deadlock states in plant net models. The method aims to manipulate all the deadlock markings to be included in a controlled system by adding control transitions to a plant net. It provides more permissive behaviors than the traditional methods of adding control places. However, its computation is expensive as it requires an iterative computation of the RG of the plant net.
The studies by Chao et al.48,49 develop methods to construct supervisory structures using a mixed transition controller and control places of plant net models. In both the methods, Chao employs the use of structural analysis via siphon techniques. The first method can recover the system from a state at which there exist unmarked siphons. It adopts control places and control arcs similar to the traditional approaches for deadlock prevention. However, it preserves all the reachable markings of the original uncontrolled Petri net models. The second method deals with deadlocks by coloring some arcs and adding a control transition and control places to an uncontrolled Petri net model. It can recover all markings in the RG. However, in both the methods, the liveness of a plant net is in general not guaranteed in theory. Moreover, the methods do not embrace the transition controller only, since they are combined with the computation of the siphons which grows exponentially with the size of the Petri net model.
The study by Huang et al. 50 focuses on the deadlock problem for FMSs modeled with a class of Petri nets, called systems of simple sequential processes with resources (S3PR), in a static deadlock recovery way. The developed policy first uses a RG-based technique to compute the deadlock markings that are classified group by group. For each group, a control transition is added to the plant net. The livelock markings are controlled by adding control transitions by iterative computation of RG of the plant net model. The method suffers from the computational complexity as it requires iterative computation of RGs and the supervisory structure that contains many control arcs connected from the plant to the transition controllers, which increases the costs of the implementation for the supervisory structure. Recently, Zhang and Uzam 51 develop a novel deadlock control policy to design control transitions based on the RG analysis and add the control transitions to the plant net which can recover all deadlock and livelock markings to legal ones. A set covering technique is developed to derive the minimal set of control transitions. However, the method uses a RG analysis which also suffers from the computational complexity.
To overcome the computational complexity of the existing methods in the literature, we propose a new approach to design an optimal enforcement of liveness to FMSs modeled with Petri nets via transition-based controllers. In this method, we employ the structural analysis via computing uncontrolled transitions of the plant net model to avoid the computations of RG which in general can lead to state space explosion. In this article, we enforce liveness for an M-net Petri net model (generalized class of Petri nets). It provides a novel, yet minimal supervisory structure of Petri nets. A transition controller is used to enforce liveness to a plant net with its all markings being reachable, precisely as in the original uncontrolled plant net. The main contributions of the proposed method are summarized as follows:
It uses structural analysis to derive all the n-met uncontrolled transitions from a plant net to avoid the computation of all reachable markings.
We proposed a new method of designing transition controllers.
For each uncontrolled transition, a transition controller is designed to enforce liveness of a plant net with its all markings being reachable, as in the uncontrolled plant net.
Case studies show that the proposed method can derive a structurally simple supervisor.
The proposed method is an iterative procedure. At each iteration step, a transition controller is added to a plant net till there is no n-met uncontrolled transition. The method can be applied to a large class of Petri nets modeling FMSs. Some typical examples from the literature are used to illustrate the significance of the proposed method.
The remainder of this article is organized as follows. Basics of Petri nets and their notations used in this article are presented in section “Preliminaries.” Section “Transition-based deadlock control” deals with transition controllers. In section “Deadlock prevention policy using transition controller and its correctness,” we report a deadlock prevention policy using transition controllers. Experimental examples are provided in section “Experimental Examples.” Finally, section “Discussion” provides a discussion of the proposed method, while section “Conclusion” concludes this article.
Preliminaries
A Petri net is a four-tuple
Transition-based deadlock control
This section proposes an approach to derive a transition-based controller to enforce liveness to a plant net of an FMS. The proposed method utilizes the structural properties of the uncontrolled Petri net model (plant net) for designing transition controllers to avoid the full or partial computation of the RG. However, the proposed method utilizes the knowledge of a RG to develop some techniques that deal with deadlock problem in the plant net for FMSs.
Knowledge of RG analysis
To make a reader understand the research, this subsection reviews the basics of RG analysis. However, we do not compute an RG for finding transitions controllers. Let
Definition1
Let
Figure 1(a) depicts a plant net, and Figure 1(b) visualizes its RG. From the RG, the set of FBMs is

(a) A plant net and (b) its RG of the plant net.
Definition 2
Let
The markings
Transition controller
As stated earlier, the proposed method utilizes structural properties a Petri net model to enforce liveness by adding transition-based controllers. A transition controller consists of a set of external (additional) transitions, control arcs, and some parameters that exist in the plant net, to implement particular constraints with respect to markings. As seen in the following, transition controllers are separated from the plant net by sharing control information via control arcs.
The transition-based control technique is implemented by an iterative procedure, in which, at each iteration step, a set of uncontrolled transitions are computed together with controller constraints from the plant net. The iteration would terminate when there are no any uncontrolled transitions in the plant net. To make uncontrolled transitions controlled, for each set of uncontrolled transitions computed by an algorithm (Algorithms 1 and 2 in this article), transition controllers are designed using another algorithm (Algorithm 3 in this article) and are added to the plant net. Generally, there exist in a plant net uncontrollable and unobservable transitions. 52 A transition is said to be unobservable if its firing cannot be directly detected or measured. A transition is said to be uncontrollable if its firing cannot be inhibited by an external action. However, this article assumes that all transitions are both observable and controllable.
Uncontrolled transitions are responsible to drive the markings to the DZ. The FBMs are derived by firing the first-met uncontrolled transitions; the SBMs are derived by firing the second-met uncontrolled transitions and accordingly the n-met bad markings are derived by firing the n-met uncontrolled transitions.
We consider a class of Petri nets, called M-nets, in this article. An M-net
40
is a Petri net
Definition 3
The first-met uncontrolled transition is a transition whose firing at a certain state leads a system to the DZ. Let
Definition 4
Let
Definition 5
Let
Let us consider the model in Figure 1(a). The set of first-met uncontrolled transitions is
Corollary 1
Let
Proof 1
By considering the definition of a state machine, it is trivial since an M-net is composed of a set of state machines that share resources.
Definition 6
Let
Definition 7
Resource
Definition 8
A resource place is said to be a first-met shared resource place, denoted by
Let us consider the plant net model of Figure 1(a), where there are two concurrent processes. The set of shared resource place
Definition 9
A first-order transition controller
Corollary 2
The number of the first-order transition controllers is equal to that of concurrent processes in an M-net
Proof 2
Each first-met uncontrolled transition corresponds to a first-order transition controller. Furthermore, each process has a process idle place and each process idle place corresponds to a first-met uncontrolled transition. Thus, the result is true.
Perhaps the first transition controllers are capable of transforming all FBMs markings to live markings. In a situation where a plant net contains SBMs, the plant net needs second-order transition controllers to re-enforce liveness. In general, for a plant net with n-met bad markings, to re-enforce liveness with all its markings in the RG, the plant net needs n-order transition controllers.
Given two shared resource places
Definition 10
Definition 11
By the definition of an M-net, for any activity place
Definition 12
The place in the postset of an n-met uncontrolled transition
In the plant net visualized in Figure 1(a), there are two circular paths (circuits) with first-met shared resource places:
Definition 13
Let
Deadlock prevention policy using transition controller and its correctness
This section presents two iterative algorithms. The first is to compute all the n-met uncontrolled transitions in the plant net. The second is capable of designing transition controllers to re-enforce liveness of the plant net such that all the reachable markings in the original plant model are preserved.
Algorithm 2 uses the structural properties of a plant net to compute all the n-met uncontrolled transitions. The proposed algorithm is an iterative procedure. At each iteration step, a set of n-met uncontrolled transitions is computed. The iterations terminate at a particular condition when
In theory, if this condition
Suppose that we consider the plant net shown in Figure 1(a). Assume that process I can be referred as the lth process, while process II can be referred as the l′-th process. At the first iteration, that is, n = 1, the set of first-met uncontrolled transitions computed by Algorithm 1 is
We proceed to the second iteration by increasing
Proposition 1
Algorithm 2 can compute all the n-met uncontrolled transitions in all the concurrent processes in an M-net.
Proof 3
Suppose that there exist uncontrolled transitions in any concurrent process of the plant net
Theorem 1
Assume that a liveness-enforcing supervisor exists at some initial marking of
Proof 4
Let
Algorithm 3 is an iterative procedure. At each iteration step, a transition controller is designed till all uncontrolled transitions are processed. When the derived n-order transition controllers are added to the uncontrolled plant net, a live plant net is obtained with all its markings as in the uncontrolled plant net.
Theorem 2
The transition controllers designed by Algorithm 3 can provide a guarantee for the liveness of a plant net.
Proof 5
By Proposition 1, for each computed uncontrolled transition of the uncontrolled plant net, a transition controller is designed using Algorithm 3. This makes each uncontrolled transition to be controlled. Finally, when all the transitions in the plant net are controlled, there is no any transition that can take the states in the plant net to n-met bad markings. Hence, the resulting plant net is live with all its states being preserved.
Theorem 3
Let
Proof 6
We prove by induction. First, it is obvious that
Assume that it also holds at
To demonstrate Algorithm 3, let us consider the plant net shown in Figure 1(a). First, we compute the n-met uncontrolled transitions from the plant net. Second, for the first-met uncontrolled transitions, a first-order transition controller is designed as shown in Figure 2(a) (Table 1). We have

(a) A plant net coupling with a first-order transition controller and (b) a plant net with final transition controllers.
Summary of transition controllers for a plant net shown in Figure 2(b).
Supervisory structure for a plant net shown in Figure 2(b).
Experimental examples
This section presents experimental results to expose the applicability of the proposed method that is not only confined to the examples or the class of Petri nets presented in this article, rather it is applicable to the existing M-nets manufacture-oriented Petri net models of FMSs in the literature. The examples considered in this article are almost benchmark examples extensively used in the literature to show the strength of the proposed method compared with other deadlock control policies.
Example 1
Let us consider an FMS shown in Figure 3. The FMS consists of three machines M1, M2, and M3, each of which can process two part at a time. It consist of three robots R1, R2, and R3 which can hold one part at a time. Parts enter the FMS through input/output buffers I1/O1 and I2/O2. Parts P1 and P2 are considered in the production sequence. Initially, it is assumed that there are no parts in the system.

(a) An FMS layout and (b) its production sequences.
Its equivalent representation of FMS shown in Figure 3 is depicted in Figure 4 using Petri nets. The places in the Petri net model can be represented as

(a) A plant net of FMS shown in Figure 3 and (b) a plant net with a first transition controller
The set of first-met uncontrolled transitions is
To check the termination condition in process I, we have
The second-met shared resource places are
To check the termination condition in process I, we have
The third-met shared resource places are
To check the termination condition in process I, we have
After adding the third-order transition controllers to the

(a) A plant net with a second transition controller
Table 3 presents the details of transition controllers to re-enforce liveness of the plant net. Table 4 provides comparison of the proposed method with some existing policies in the literature based on the numbers of control transitions, control arcs, and reachable states.
Summary of transition controllers for a plant net shown in Figure 5(b).
Performance comparison of deadlock control policies for the net in Figure 5(b).
Example 2
An FMS shown in Figure 6 is from the study of Ezepeleta et al. 15 that consists of two robots R1 and R2, each of which can hold one part at a time, four machines M1–M4, each of which can process one part at a time, two loading buffers I1 and I2, and two unloading buffers O1 and O2. Two part types are considered in the system that has been studied by researchers.8,15,21,27,36,38,42,50,54

(a) An FMS layout and (b) its production sequences.
The plant net of this FMS is shown in Figure 7. It has 282 reachable states. The plant net has 19 places and 14 transitions. The places can be considered as the collection of

A plant net of FMS shown in Figure 6.
The set of first-met uncontrolled transitions is

(a) A first transition controller with plant net and (b) final transition controllers with plant net.
In the second iteration, the first-met shared resource places are
The second-order transition controller associated with
The second-order transition controller associated with
The iteration for computing the uncontrolled transitions terminates after second iterations, as
Table 5 presents the details of transition controllers to re-enforce liveness of the plant net. Table 6 provides comparison of the proposed method with some existing policies in the literature based on the numbers of control transitions, control arcs, and reachable states.
Summary of transition controllers for a plant net shown in Figure 8(b).
Performance comparison of deadlock control policies for the net in Figure 8(b).
Example 3
Consider a flexible manufacturing cell shown in Figure 9 from the study of Ezepeleta et al. 15 It consists of three robots R1–R3, each of which can hold a product at a time. The cell has four machines M1–M4, each of which can process two products at a time. There are three loading buffers I1–I3 and three unloading buffers O1–O3 to load and unload the FMS, respectively. There are three raw product types, namely, P1, P2, and P3, to be processed. For these raw product types, the production cycles are shown in Figure 9(b). According to the production cycles, a raw product P1 is taken from I1 by R1 and put either in M1 or M3. After being processed by M1 (resp. M3) it is then moved from M1 (resp. M3) to M2 (resp. M4) by R2. Finally, after being processed by M2 (resp. M4), it is moved from M2 (resp. M4) to O1 by R3. A raw product P2 is taken from I2 and put in M2 by R2. After being processed by M2, it is moved from M2 to O2 by R2. A raw product P3 is taken from I3 and put in M4 by R3. After being processed by M4 it is then moved from M4 to M3 by R2. Finally, after being processed by M3, it is moved from M3 to O3 by R1.

(a) An FMS layout and (b) its production sequences.
Figure 10 shows the Petri net model of the system, in which

A plant net of FMS shown in Figure 9.
The plant net depicted in Figure 10 has 26,750 reachable states. Its activity places can be partitioned to three concurrent processes. The resource places can be partitioned as

(a) A first transition controller and (b) final transitions controllers with plant net.
At the second iteration step, the shared resource places are
The second-order transition controller associated with
The second-order transition controller associated with
The second-order transition controller is associated with
Before we proceed to next iteration, we need to check the termination condition in the processes. For process I, we have
When the second-order controllers are added to the plant net, we obtain a net system
Summary of transition controllers for a net in Figure 11(b).
Performance comparison of deadlock control policies for a plant net shown in Figure 11(b).
Discussion
The proposed method can be applied to the M-nets which are more general than almost all manufacture-oriented Petri net subclasses in the literature. Specifically, this method can be applied to system of simple sequential processes with resources (S3PR) Petri net, linear system of simple sequential process with resources (LS3PR) Petri net, simple sequential processes with weighted resources allocation (WS3PR) Petri net, systems of sequential systems with shared resources (S4R) Petri net, system of sequential systems with shared resources (S4PR) Petri net, extended from systems of simple sequential processes with resources (ES3PR) Petri net, S3PMR Petri net (a subclass of weighted Petri nets), and G-systems Petri net. In the proposed method, we have considered three different subclasses of Petri net as seen in the experimental examples. The Petri net model used to demonstrate the proposed method belongs to an LS3PR Petri net; the Petri net model used in Example 1 belongs to WS 3 PR Petri net, while both Examples 2 and 3 belong to S3PR Petri net. In the Petri nets considered, the proposed method works effectively in the enforcement of liveness to the Petri net model for FMSs.
Suppose that there are
For Algorithm 2, we have only one go loop that would be executed
Conclusion
This article proposes three algorithms. The first and second algorithms are used to compute first-met and n-met uncontrolled transitions for a class of Petri nets modeling FMSs, respectively, and the third algorithm is used to design a transition controller for each uncontrolled transition obtained by Algorithms 1 and 2. The purposes of the transition controllers are to make the uncontrolled transitions controlled and to ensure the final plant net is live with its all reachable markings being preserved, as contained in the uncontrolled plant net. The proposed method is efficient as it provides a minimal supervisory structure, compared with the existing methods available in the literature. In terms of computational overheads, the proposed method is much more efficient as it uses only structural properties of the plant net, avoiding a complete enumeration of reachable states, which usually leads to the state explosion problem.
The proposed method involves iterative procedures. At each iteration, there is a need to check the termination condition for the computation of uncontrolled transitions, which may limit the speed of the computation. The future work would focus on how to guarantee the absence of redundant control transitions in the supervisory structure.
Footnotes
Handling Editor: Seiichiro Katsura
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported in part by the National Natural Science Foundation of China under grant nos 61304050, 61403296, and 61374068; the Fundamental Research Funds for the Central Universities under grant no. JB160408; the “111” Project of China under grant no. B14042 and the Complex Systems International Joint Research Center of Shaanxi Province under grant no. CD22016040001; and the authors extend their appreciation to the International Scientific Partnership Program (ISPP) at King Saud University for funding this research work through ISPP#0079.
