**3.1. Supervisory control problem**

It is assumed that a deadlock-prone PN model contains at least a dead marking in its reachability graph at which no transition is enabled. Its reachability graph contains dead and live zones. Consequently, this study attempts to propose a method to prevent the controlled systems from entering a dead zone/marking.

A dead marking cannot enable any transition and thus cannot go to any other markings. We can formally define the dead marking *MD* as follows.

*Definition 1*: The set of *dead markings MD* = {*M R*(*N*, *M*0)| at *M*, no transition is enabled}.

*Definition 2*: A zone consisting of all dead markings is called a *dead zone*, denoted by *ZD*.

Once a marking enters a dead zone, the system is dead. If there is no dead zone in a reachability graph, the system is called a live one.

The goal of the work is to control a deadlock-prone system such that it is live. All markings of a reachability graph can be divided into three groups: legal markings (*ML*), quasi-dead markings (*MQ*), and dead markings (*MD*).

*Definition 3*: The set of *quasi-dead markings MQ* = {*MR*(*N*, *M*0)| *M* must eventually evolve to a dead one regardless of transition firing sequences}.

*Definition 4*: A zone consisting of all quasi-dead markings is called a *quasi-dead zone*, denoted by *ZQ*.

*Definition 5*: A zone consisting of all quasi-dead and dead markings, i.e., *ZI* = *ZD ZQ*, is called an *illegal zone*.

Markings except quasi-dead and dead markings are legal ones. Once a legal marking is enforced into the illegal zone, the net will eventually become deadlock.

*Definition 6*: A zone consisting of all legal markings is called a *legal zone*, i.e., *ZL* = *R*(*N*, *M*0) - *ZI*.

Ramadge and Wonham show that a system has the maximally permissive behavior if the system behavior equals *ZL*21. In other words, one must remove all the markings in illegal zone (i.e. quasi-dead and dead markings) from *R*(*N*, *M*0) if one wants to obtain the maximally permissive behavior. Ghaffari *et al.* propose the MTSI method to achieve their deadlock prevention based on the theory of regions13. However, the set of all MTSIs from the reachability graph must be identified. As a result, we can conclude that their method is computationally inefficient. A more efficient method is thus needed as described next.

A Computationally Improved Optimal Solution

*D*) is called type II dead zone, *Z*

.

for Deadlocked Problems of Flexible Manufacturing Systems Using Theory of Regions 57

= 0 (no need to enter *ZQ* but directly to *ZD*). Type I CMTSI will

) + [*N*](•*tn*) -1 and vice versa. Hence, only one CMTSI

) + [*N*](•*tn*). According

) + [*N*](•*tm*) -1, which

A Type II CMTSI contains a legal marking that cannot reach a dead marking with one single transition's firing as shown in Figure 2. Given a dead marking in *M"D*, the shortest transition firing sequence needs to be found. The main reason is based on the fact that, for a dead marking, the length of the firing sequence from the initial marking to CMTSI is the longest path than those from the initial marking to MTSIs. Hence, the solutions of MTSIs will be totally covered by the solution of CMTSI. For example, as shown in Figure 3, σ\* is the


*Remark 1*: A dead marking is always with its corresponding CMTSI. As a result, the corresponding CMTSI is of either Type I or II. Type I may be viewed as a special case of

be processed first in our proposed method. In the following, Theorems 1-3 will help readers to understand how to choose CMTSIs, which are with the same firing sequence of legal

*Theorem 1*: If a dead marking *M M'D* is associated with two different CMTSIs, only one

*Proof*: Assume that a dead marking *M* is with both CMTSIs {*Mi*, *tm*} and {*Mj*, *tn*} as shown in Figure 4. According to the state equation, *Mi* + [*N*](•*tm*) = *Mj* + [*N*](•*tn*) = *M*. Arranging the

*Remark 2*: Based on Theorem 1, if a dead marking *M M'D* is associated with more than two

) + [*N*](•*tm*) = *M*0 + [*N*] (• *<sup>M</sup>*<sup>0</sup> *Mj*

*Definition 11*: A zone consisting of all type II deadlocks (*M*


CMTSIs, only one of them needs to be controlled.

to (4), realizing either CMTSI, e.g., {*Mi*, *tm*}, leads to *M*0 + [*N*](• *<sup>M</sup>*<sup>0</sup> *Mi*

shorter path since |σ\*

Type II CMTSI by defining \*

markings, from Types I and II.

CMTSI needs to be controlled.

above equation, *M*0 + [*N*](• *<sup>M</sup>*<sup>0</sup> *Mi*

in turn implies *M*0 + [*N*](• *<sup>M</sup>*<sup>0</sup> *Mj*

**Figure 2.** A structure of Type II CMTSI.

needs to be controlled.
