An Enhanced Supervisory Control Strategy for Periodicity Mutual Exclusions in Discrete Event Systems Based on Petri Nets

Mutual exclusion problems widely exist in discrete event systems in which several processes will compete for the common resource for maintaining their normal running.This competition is mutually exclusive. However, a special behavior, that is, periodic mutual exclusion behavior, is important formany discrete event systems. Once a process obtains the common resource, it will consecutively obtain the common resource in the following several competitions. The other processes should wait for the release of the common resource. All processes will compete for the common resource again after the common resource is released. These competitions have obvious periodicity. In this paper, a methodology is proposed to design periodic mutual exclusion supervisors to control the periodic mutual exclusion behavior in discrete event systems. Moreover, two original structural conversion concepts, called k-derivation and k-convergence processes, are proposed to construct the periodic mutual exclusion supervisors. The discussion results show that many undesirable execution sequences are forbidden since the periodic mutual exclusion behavior is controlled by the proposed periodic mutual exclusion supervisors. Finally, an example is used to illustrate the proposed methodology.


Introduction
Discrete event systems [1] are classic dynamic systems, which widely exist in communication, manufacturing, traffic, and computer network fields, such as e-business systems, online game server systems, embedded systems, flexible manufacturing systems, and traffic management systems [2].The concurrency behavior [3] of discrete event systems is to consider several events that simultaneously occur and potentially interact with each other.Concurrent events can be alternately executed on a single processor but can be also concurrently executed on several processors.The occurrence sequences of these concurrent events are important since system concurrency behavior can optimize system performances and promote the sufficient utilization for finite system resources [4].
The occurrence of some concurrent events may simultaneously occupy some special resources, such as a CPU, a printer, a robot, or a shared file.These special resources are finite because of the restriction of high implementation costs.Therefore, these concurrent events should share their special resources.This will form a competition among these concurrent events [5].On the other hand, the competition will maximize the utilization of shared special resources.A most widespread and important phenomenon is that only one special resource can be used for several concurrent events.This results in a mutual exclusion behavior [6] for these concurrent events (only one of them can obtain the special resource at the same time and the other events should wait for the release of the occupied special resource).Mutual exclusion behaviors as an important character in discrete event systems are usually used for resource allocation (resource sharing) or marking constraint in Petri nets [7], such as the user request distribution in a single input cluster of computer servers, the raw material distribution of a robot for two production lines, and the database access control for multiple processes.
In discrete event systems, the special resource utilization rates are an important indicator to measure the performance of discrete event systems.It is necessary to design appropriate control strategies to control the special resource distribution for discrete event systems.The purpose is to maximize the utilization of shared special resources.The authors in [8] consider deterministic feasibility and time complexity of two fundamental tasks in the distributed computing of consensus and mutual exclusions.In [9], a mutual exclusion element is described using a reflective semiconductor optical amplifier and a simple scheme for contention resolution in arrayed waveguide grating router based optical switches in data centers.The authors in [10] propose an approach to compete for the privilege of passing the intersection that is a classical mutual exclusion problem via the communications among vehicles and infrastructure.In [11], two algorithms are presented to compete for exclusive access to a shared resource among geographically close nodes in a mobile ad hoc network.
Supervisory control theory [12,13] is widely used to perform the controller syntheses of discrete event systems, which is proposed by Ramadge and Wonham based on automata [14,15].In order to avoid the numerous state representations of automata, the subsequent researchers use Petri nets to study the control strategies.The authors in [16] present a framework for supervisor synthesis for discrete event systems.The approach is based on compositional minimization by using concepts of process equivalence.For the studies of control strategies in discrete event systems, maximally permissive problems should be considered.The authors in [17] present a computational method to design optimal control places in order to obtain a maximally permissive liveness-enforcing supervisor by using a vector covering approach.The authors in [18] distinguish between the offline and the online computation that is required for the effective implementation of the maximally permissive deadlock avoidance policy.The authors in [19] study the maximally permissive abstractions for the hierarchical and decentralized control of large-scale discrete event systems.Moreover, the structure optimization problems of supervisors are also important.The authors in [20] present two iterative deadlock prevention policies for flexible manufacturing systems.The proposed methods can reduce the overall computational time.The authors in [21] propose a deadlock prevention method to obtain maximally permissive supervisor and minimize its structure.The authors in [22] propose a deadlock prevention method for a flexible manufacturing system with a minimal supervisory structure.Furthermore, researchers also concern the design and implementation problems of Petri net based supervisors.In [23], the authors present the design, generation, and implementation of coordinating discrete event control code using Petri nets for an operating flexible manufacturing system.The authors in [24] use Petri nets to model the operated behaviors and to synthesize the command filters in a command filtering framework.Automation Petri nets can be used to perform the design and implementation of discrete event control systems by converting automation Petri nets into ladder diagrams on programmable logic controllers [25].
The main researches of supervisory control theory are divided into several classic problems based on Petri nets, that is, forbidden-state problems [26,27], forbidden-string problems [28,29], deadlock prevention problem [30], and liveness maintenance problems [31,32].The deadlock prevention problems and liveness maintenance problems can be transformed to forbidden-state problems directly [33,34].The authors in [35] address the forbidden-state problem of Petri nets by computing maximally permissive Petri net controllers.The design of control strategies for mutual exclusion mechanisms can be considered as resolving a forbiddenstring problem.The authors in [36] use a colored generalized stochastic Petri net model to study the performance and correctness of a Lamport concurrent algorithm to solve the mutual exclusion problems.The authors in [37] discuss the simultaneous events in mutual exclusion transitions.The execution modes of sequential function charts are presented based on Petri nets.In [38], a method is proposed to control the occurrence of simultaneous events in mutual exclusion transitions by Petri nets based on supervisory control theory.The authors in [5] formulate two resource-sharing concepts, that is, parallel mutual exclusion and sequential mutual exclusion, and provide a theoretical basis for Petri net synthesis methods to model systems.
A class of specifications, that is, generalized mutual exclusion constraints, is studied in [39] for discrete event systems modeled using place/transition nets.According to these specifications, many constraints that deal with mutual exclusion problems between state and events or just events themselves can be transformed into generalized mutual exclusion constraints.This can be enforced by a set of places if all transitions are controllable.For the transitions that are uncontrollable, this specification is not always applicable.The authors in [40] provide a class of generalized mutual exclusion constraints on a class of forward-concurrent-free nets.In [41], a type of specification, called OR-AND generalized mutual exclusion constraints, is defined for place/transition nets.Such a specification consists of a disjunction of conjunction of several single generalized mutual exclusion constraints.The authors in [42] enforce the generalized mutual exclusion constraints on a Petri net plant by replacing the classical partition of event set into controllable and uncontrollable events from supervisory control theory.In [43], an algorithm is presented to transform a given generalized mutual exclusion constraint into an optimal admissible one for a class of Petri nets whose uncontrollable influence subnets are forward synchronization and backward conflict-free nets.
It is difficult to summarize the constraints for complex mutual exclusion mechanisms and special optimization problems in discrete event systems by using the existing control strategies, such as the following described periodic mutual exclusion problems.In many discrete event systems, one of the concurrent processes will occupy a common resource to maintain its normal running.To satisfy some special requirements, this process will consecutively obtain the common resource during the competition of the following finite times after it won a competition.The other processes only can wait for the release of the common resource.All concurrent processes will form a new competition again after this process finishes a periodical operation for the special requirements and the common resource is released.This mutually exclusive competition among these concurrent processes has periodicity, called periodic mutual exclusion behavior.It is necessary to design appropriate control strategies to distribute the common resources for these concurrent processes to control the periodic mutual exclusion problems.
In this paper, a methodology is proposed to design periodic mutual exclusion supervisors to control the periodic mutual exclusion behavior in discrete event systems.The structures of general mutual exclusion systems and periodic mutual exclusion systems are defined by using Petri nets.The proposal is convenient to construct formal models to analyze the properties of the two classes of mutual exclusion systems.Two original structural conversion concepts, called derivation process and -convergence process, are proposed to construct the periodic mutual exclusion supervisors.The main idea is to derive a common resource to several virtual resources by the preliminary -derivation processes if a process obtains the common resource and these derived virtual resources will be converged into a common resource by the final -convergence processes after this process releases the common resource.The execution sequences of all processes are discussed in mutual exclusion systems with general mutual exclusion supervisors and periodic mutual exclusion supervisors, respectively.The discussion results show that many undesirable execution sequences are forbidden in the mutual exclusion systems with the periodic mutual exclusion supervisors because the periodic mutual exclusion behavior is controlled by these periodic mutual exclusion supervisors.Finally, a real example is used to illustrate the proposed methodology.
The main contributions of this paper are concluded as follows: (1) The structures of general mutual exclusion systems and periodic mutual exclusion systems are defined by using Petri nets.The proposal is convenient for constructing formal models for these two classes of mutual exclusion systems.
(2) Two original structural conversion concepts, that is, -derivation process and -convergence process, are proposed to derive a common resource to several virtual resources in the preliminary stage and converge these virtual resources into a common resource in the final stage, respectively.The purpose is to enhance the execution permission for each process that obtains the common resource.
(3) A methodology is proposed to design periodic mutual exclusion supervisors to control the periodic mutual exclusion behavior in discrete event systems.In the enhanced mutual exclusion systems, many undesirable execution sequences of all processes are forbidden by the periodic mutual exclusion supervisors.
The rest of this paper is organized as follows.Section 2 briefly recalls some basics of Petri nets.Section 3 introduces a class of mutual exclusion systems with resources and their periodic mutual exclusion behavior is discussed.Section 4 proposes the design method of periodic mutual exclusion supervisors.Section 5 gives the discussion of periodic mutual exclusion behavior in general mutual exclusion systems and periodic mutual exclusion systems.Section 6 introduces two examples to illustrate the proposed methods.Finally, the proposed methods are concluded in Section 7.

Preliminaries
We assume that the readers are familiar with the basics of Petri nets.Only some key concepts of Petri nets are provided.More details can be found in [44].
A Petri net is a 4-tuple  = (, , , ), where  and  are finite,  ̸ = 0,  ̸ = 0, and  ∩  = 0.  is a set of places and  is a set of transitions. ⊆ ( × ) ∪ ( × ) is called a flow relation represented by an arc with arrow from places to transitions and transitions to places. :  → N \ {0} is a mapping that assigns a weight to an arc, where N is the set of nonnegative integers.A Petri net  = (, , , ) is called an ordinary net if, ∀ ∈ , () = 1 (denoted as  = (, , )).An ordinary net  = (, , ) is called a state machine if  ∈  such that  has only one input place and only one output place.A Petri net is self-loop-free if and only if ¡ ∃,  ∈  ∪  such that (, ) ∈  and (, ) ∈ .
A marking  of  is a mapping from  to N. (,  0 ) is called a net system, where  0 is the initial marking of .The preincidence matrix Pre :  ×  → N of  is Pre(, ) = (, ).The postincidence matrix Post :  ×  → N of  is Post(, ) = (, ).A self-loop-free Petri net  = (, , , ) can be represented by its incidence matrix [], where [] is a || × || integer matrix with [](, ) = Post(, ) − Pre(, ).For  ∈ , () denotes the sum of tokens contained in place .Place  is marked by a marking  if and only if () > 0. A subset  ⊆  is marked by  if and only if ∃ ∈  such that  is marked by .The sum of tokens in all places in  is denoted by M(); that is, () = ∑ ∈ ().The subset  is said to be empty at  if and only if () = 0.
The preset of a node  ∈  ∪  is defined as A -vector is a column vector  :  → Z indexed by , where Z is the set of integers.We denote a column vector where every entry equals 0(1) by 0(1).  and []  are the transposed versions of vector  and matrix [], respectively.  of any other one and its components are mutually prime.If  is a -invariant of , then  ∈ (,  0 ) such that   ⋅  =   ⋅  0 .

Mutual Exclusion Systems with Resources
In this section, the model of mutual exclusion systems with resources (MESRs) is defined by using Petri nets with three classical patterns, that is, parallel pattern, dispersive pattern, and polymeric pattern.The details are shown as follows.
Definition 1.Let  = (, , , ) be a Petri net and For a Petri net, it may contain one or more roots and leaves.However, it is impossible to contain one or more roots or leaves in any closed-loop Petri net.
shows a Petri net that is not a linearity process since it contains two transient processes shows a Petri net that is also not a linearity process since it is not a state machine.
In a linearity process, the firing of its transitions may be restrained by some special resources, such as a CPU, a robot, a balancer, or a printer.Therefore, a linearity process with a special resource is defined as follows.
Let  = (  ∪ {  } ∪ {  } ∪ {  }, , ) be a linearity process with the resource   .∀ ∈  •  , the firing of  will obtain the special resource   .Conversely, ∀  ∈ •   , the firing of   will release the special resource   .Figure 2(a) shows two linearity processes with two special resources   and    ; that is, In  1 , the special resource is occupied if  1 fires and it is released if  2 fires.This characteristic also exists in  2 .
In a discrete event system, it may contain several linearity processes that compete for a common special resource.These linearity processes of the discrete event system can construct a mutual exclusion system.Definition 6.Let  1 ,  2 , . . .and   with An MESR, denoted as  = (  ∪  ∪  ∪{  }, , ), is defined as follows: (1)  The MESR  can be represented with one of the following three classical patterns: (1) Proof.It is easy to see that place   and all places in   can construct a -invariant.The result naturally holds.
For example, the MESR with dispersive pattern depicted in Figure 2 Property 2. Let  = (  ∪   ∪   ∪ {  }, , ) be an MESR with dispersive pattern and  ∈ (,  0 ) be a marking of , where  0 is the initial marking of .Then,  ∈    ,   will compete for the common resource for running its linearity process.If   fires (its linearity process obtains the common resource), ∀  ∈ ( •  \ {  }) cannot fire (they need to wait until they obtain the common resource) since  only contains a common resource.∀  ∈ •   ,   will release the common resource from its linearity process.This should particularly emphasize that all transitions contained in  •  will compete for the common resource again for their linearity processes if the common resource is released.For the MESR with dispersive pattern depicted in Figure 2(b), transitions  1 and  3 are both enabled or disenabled for all marking.If they are enabled, they will compete for the common resource   .Once the common resource   is released by one of the transitions  2 and  4 , transitions  1 and  3 will compete for the common resource again.Similar competitions also exist in the two MESRs depicted in Figures 2(c) and 2(d).
For an MESR, it may have some special requirements that are concluded as follows: (i) One of its linearity processes will be consecutively executed  times once this linearity process obtains the common resource, where  ≥ 1 is an integer.The other linearity processes cannot be executed and need to wait until they obtain the common resource.
(ii) Once this linearity process is consecutively executed  times and the common resource is released, all linearity processes will compete for the common resource again.
These linearity processes are mutually exclusive with these special requirements.Their mutual exclusion characteristics are called periodic mutual exclusion behavior that widely exists in discrete event systems, such as the online team game server systems, flexible manufacturing systems, and intelligence traffic dispatch systems.
For the traditional mutual exclusion behavior, the methods of generalized mutual exclusion constraints presented in [39] can be used to design supervisors to perform the control of mutual exclusion mechanisms.However, it is difficult to use generalized mutual exclusion constraints to control the periodic mutual exclusion behavior.Therefore, the general mutual exclusion supervisors should be extended to handle these special problems.

Design of Enforced Supervisors
In this section, the methods of generalized mutual exclusion constraints are simply reviewed, which can be used to design general mutual exclusion supervisors.Furthermore, two important concepts, that is, -derivation process and -convergence process, are defined to extend the general mutual exclusion supervisors.Finally, a method is proposed to design periodic mutual exclusion supervisors to control periodic mutual exclusion problems.
The mutually exclusive competition for a common resource is a classical character in MESRs.Generalized mutual exclusion constraints can be used to design supervisors to perform the mutual exclusion mechanisms.For example, Figure 3(a) shows a plant that is composed of two linearity processes.If we assume that only one of the competition transitions  1 and  3 can fire in the plant, we have a restriction ( 2 ) + ( 5 ) ≤ 1, where  is a marking of the plant.A supervisor of the plant can be obtained by using the methods of generalized mutual exclusion constraints, as shown in Figure 3(b).The details about the methods of generalized mutual exclusion constraints can be found in [39].The controlled system that is combined by the plant In order to design enhanced supervisors to control the periodic mutual exclusion behavior for MESRs, two important concepts, -derivation process and -convergence process, are defined as follows.
Definition 7. Let  = ({}, {}, , ) be a Petri net such that  • = {}, •  = {}, and (, ) = 1,   ̸ =  be a place,   ̸ =  be a transition, and  ≥ 1 be an integer.Then, a -derivation process from  to , denoted as In the Petri net depicted in Figure 4(a), transition  can fire only once since place  contains only one token.Figure 4(b) shows a three-derivation process from  to , which is transformed from the Petri net depicted in Figure 4(a).Transition   is the derivative transition.Place   is the derivative place and the derivation coefficient is three.Transition  can fire three times after   fired.The firing time of  is derived from one to three.Definition 8. Let  = ({}, {}, , ) be a Petri net such that  • = {}, •  = {}, and (, ) = 1,   ̸ =  be a place,   ̸ =  be a transition, and  ≥ 1 be an integer.Then, a convergence process from  to , denoted as A -convergence process from  to  is an inverse process of a -derivation process from  to .In the Petri net depicted in Figure 4(c), each firing of transition  will add a token to place . Figure 4(d) shows a three-convergence process from  to , which is transformed from the Petri net depicted in Figure 4(c).Transition   is the convergence transition.Place   is the convergence place and the convergence coefficient is three.Only one token is added to place  after transition  fires three times.The firing time of  is converged from three to one.Actually, a -derivation process is a virtual resource expansion process.It can derive a resource to  ( > 0) resources.The common resource can be virtually derived to  virtual resources by the -derivation process.Similarly, a -convergence process is a virtual resource constriction process.It can converge  resources to a resource.The  virtual resources can be converged to a common resource by the -convergence process.Therefore, the methods of derivation process and -convergence process can be used to extend general mutual exclusion supervisors to control periodic mutual exclusion behavior. ( ≥ 1) is the derivation coefficient and convergence coefficient of    and    , respectively.The main idea of designing periodic mutual exclusion supervisors is to derive a common resource to several virtual resources by the preliminary -derivation processes and these derived virtual resources will be converged to a common resource by the final -convergence processes.Note that the -derivation processes and the -convergence processes come in pairs to derive and converge the common resource, respectively, in the periodic mutual exclusion supervisor of any MESR.
Figure 5 shows the periodic mutual exclusion supervisor for the two MESRs depicted in Figures 2(b) and 2(c), where  =   , For a given MESR  with  = (  ∪   ∪   ∪ {  }, , ), it may contain the behavior of periodicity mutual exclusion.This behavior contains two important features, that is, mutual exclusion feature and periodic feature.The proposed approach to design the periodic mutual exclusion supervisor for MESR  can be decomposed into two main steps as follows: (1) Extracting the mutual exclusion supervisor   = ({},    ∪   ,   ) from the given MESR  according to Definition 9 (2) Converting the extracted mutual exclusion supervisor   into the periodic mutual exclusion supervisor ) by using the paired -derivation processes and convergence processes according to Definition 10.
After obtaining the periodic mutual exclusion supervisor   , the periodic mutual exclusion behavior of MESR  can be controlled by combining the periodic mutual exclusion supervisor   with the MESR .Definition 11.Let  be an MESR with  = (  ∪   ∪   ∪ {  }, , ) and   = ({}∪   ∪   ,    ∪   ∪   ∪   ,   ,   ) be the periodic mutual exclusion supervisor of , where In an enhanced MESR, all of its linearity processes will compete for a common resource with periodic mutual exclusion behavior.However, the periodic mutual exclusion behavior is controlled by its periodic mutual exclusion supervisor.One of its all linearity processes can consecutively obtain the common resource with  times from the following  competitions, where  ≥ 1 is an integer.All of its linearity processes will compete for the common resource again after this linearity process releases the common resource.

Discussion
Let  1 ,  2 , . . .and   with   = (   ∪{   }∪{   }∪{   },   ,   ) (∀ ∈ {1, 2, . . ., } and  ≥ 2) be  linearity processes with  resources,  = (  ∪   ∪   ∪ {  }, , ) be an MESR that is composed of the  linearity processes, and  0 be the initial marking of .Then, the permutation [45] of executing the  T-Processes of the  linearity processes in , denoted as (), is discussed as follows: (i) If  is represented with dispersive pattern, we assume In the MESR , ∀ ∈  •  , the linearity process that contains transition  will be executed if  fires.The firing of transition  will take away a token from   and a token from   .Therefore, each token contained in place   may be taken away by one of the  transitions in  •  .Let  0 (  ) > 0. According to the methods of combinatorics [45], we assume that all tokens contained in   are taken away by the  transitions.The permutation of executing the  T-Processes of the  linearity processes in  is a full permutation that is ⏞⏞⏞⏞⏞⏞⏞⏞⏞⏞⏞⏞⏞⏞⏞⏞⏞⏞⏞⏞⏞  ⋅  ⋅ . . .⋅  =   0 (  ) .
(  [45], a multiset  = { 0 ( 1  ) ⋅  1 ,  0 ( 2  ) ⋅  2 , . . .,  0 (   ) ⋅   } is constructed.Therefore, the permutation of executing the  T-Processes of the  linearity processes in  is also a full permutation that is If the MESR  is supervised by a periodic mutual exclusion supervisor   with   = ({} ∪    ∪    ,    ∪    ∪    ∪    ,   ,   ), the periodic mutual exclusion behavior will be controlled.Let  be the derivation coefficient and emergence coefficient of the -derivation processes and the -convergence processes in the periodic mutual exclusion supervisor   , respectively, where  ≥ 1 is an integer.In the enhanced MESR   that is constructed by combining the MESR  with the periodic mutual exclusion supervisor   , the permutation of executing the  T-Processes of the  linearity processes in   , denoted as (  ), is discussed as follows: (i) If   is represented with dispersive pattern, we have |  | = 1 and | •  | = .We assume   = {  }.In the enhanced MESR   , ∀ ∈  •  , each firing of  will continuously take away  tokens from   once  obtains the common resource since it will continuously fire  times.Let  0 (  ) > 0. The tokens contained in place   can supply the firing of these transitions contained in  •  with ⌈ 0 (  )/⌉ times, where ⌈⌉ is the ceiling function of .According to the methods of combinatorics [45], the permutation of executing the  T-Processes of the  linearity processes in   is Let  0 (  ) = ⋅, where  ≥ 1 and  ≥ 1 are two integers.For the MESR  with dispersive pattern and its enhanced MESR   , according to (2) and (4), we have Let, ∀ ∈ {1, 2, . . ., },  0 (   ) =  ⋅ , where  ≥ 1 and  ≥ 1 are two integers.For the MESR  with parallel or polymeric pattern and its enhanced MESR   , according to (3) and ( 5), we have It is clear that () ≥ (  ), where () = (  ) if  = 1.This means that many undesirable execution sequences of the  T-Processes in   are forbidden compared with that in .The reduced parts are due to the control of the periodic mutual exclusion supervisor   for   .

Example
In real world applications, periodic mutual exclusion behavior widely exists in many discrete event systems, such as game server systems, flexible manufacturing systems, intelligent security inspection systems, and other resource distribution systems.The server systems of many online team games suffer from periodic mutual exclusion problems.Figure 6(a) shows a server system of QQ Chinese Poker that is a popular online team game in China.It is constructed with two local servers, called Server 1 and Server 2, that are geographically distributed in different regions.All players need to visit the server system through the Internet and log in the server system.The load balancer of the server system should reasonably distribute all legal players into the two local servers unless they choose Server 1 or Server 2 themselves.The load balancer contains two main distribution rules that are concluded as follows: (1) Players should join a team if they want to play a game and each team consists of four players.A team can be created only when all four players participate in the same server system.Then, the four players can play a game together.
(2) A player can join only one team at a time.{ 2 ,  6 } ∪ { 3 ,  7 },   ,   ) by using two paired -derivation processes and -convergence processes according to Definition 10, where the derivation coefficient and convergence coefficient are four; that is,  = 4. Figure 8(b) shows the details of the conversion processes.The conversion processes from   to  2 and from   to  6 are two four-derivation processes and the conversion processes from  3 to   and from  7 to   are two four-convergence processes.Figure 8(c) shows the converted periodic mutual exclusion supervisor   .After obtaining the periodic mutual exclusion supervisor   , an enhanced MESR   with dispersive pattern can be constructed according to Definition 11. Figure 9 Comparing with the general MESR , about 504 (98.44%) undesirable distribution results are forbidden by the periodic mutual exclusion supervisor   .The complete control system with periodic mutual exclusion supervisor   is shown in Figure 9(b).For the nine players in the complete control system, two teams can be created and eight players can play a game.Only one player needs to wait for other players to visit this server.
Periodic mutual exclusion problems also exist in flexible manufacturing systems.For example, let a flexible manufacturing system contain a robot, two conveyors, and two machines.The robot is responsible for moving a part from one of the two conveyors to a corresponding machine.The two machines can use four parts to produce a product, respectively.This flexible manufacturing system will suffer from periodic mutual exclusion problems.If there are only nine parts that will be used to produce products, an ideal result is that two products are produced by eight parts.However, it is possible in this flexible manufacturing system that only one product is produced by four of the nine parts.For the other five parts, two parts are distributed to a machine and three parts are distributed to another machine.Therefore, it is feasible to design a periodic mutual exclusion supervisor to control the periodic mutual exclusion behavior of this flexible manufacturing system.Moreover, intelligent security inspection systems also suffer from periodic mutual exclusion problems.An effective measure to solve the heavy congestion problems of public transportation stations is to quickly disperse passengers.Generally, several familiar passengers will adjacently stand in the same queue to go through a security inspection system.They will leave the station after all of them go through the security inspection system.When all passengers stand in several queues to go through a security inspection system, it is a typical periodic mutual exclusion problem.If a passenger goes through the security inspection system, the adjacent passengers who stand in the same queue with the previous one should preferentially go through the security inspection system since they may be familiar with each other.Therefore, the proposed periodic mutual exclusion supervisors can control the periodic mutual exclusion behavior in the security inspection system to improve the congestion problems as far as possible.Furthermore, many resource distribution systems also suffer from periodic mutual exclusion problems.The proposed methodology can be extended to design periodic mutual exclusion supervisors to control these periodic mutual exclusion problems.

Conclusions
In this paper, periodic mutual exclusion behavior is controlled by the proposed periodic mutual exclusion supervisors in discrete event systems.The proposed -derivation processes and -convergence processes can forbid the undesirable execution sequences.The purpose is to optimize the control ability of the designed periodic mutual exclusion supervisors.The example results illustrate that a common resource can be derived to several virtual resources by using a -derivation process.Similarly, several virtual resources can be converged into a common resource by using a convergence process after the executing process releases all virtual resources.The performance of the enhanced MESRs is optimized by using the proposed periodic mutual exclusion supervisors to control the distribution of the common resources.In future work, the performance of the proposed periodic mutual exclusion supervisors should be simulated and verified by developing a simulating tool.The construction method of periodic mutual exclusion supervisors should be optimized by constructing linear constraints based on some extended generalized mutual exclusion constraints.

Figure 2 :
Figure 2: (a) Two linearity processes with two special resources, (b) an MESR with dispersive pattern, (c) an MESR with parallel pattern, and (d) an MESR with polymeric pattern.

Figure 2 (
Figure 2(b) shows an MESR with dispersive pattern, which resulted from the composition of  1 and  2 depicted in Figure 2(a) via   =    and  1 =  4 .Figure 2(c) shows an MESR with parallel pattern, which resulted from the composition of  1 and  2 via  s =    .Figure 2(d) shows an MESR with polymeric pattern, which resulted from the composition of  1 and  2 via   =    ,  2 =  5 ,  2 =  4 , and  3 =  6 .

Figure 3 :
Figure 3: (a) A plant and (b) the corresponding supervisor obtained by generalized mutual exclusion constraints.

Figure 4 :
Figure 4: (a) A Petri net, (b) a three-derivation process, (c) a Petri net, and (d) a three-convergence process.

Figure 5 :
Figure 5: The periodic mutual exclusion supervisor of the two MESRs depicted in Figures 2(b) and 2(c).

Figure 9 :
Figure 9: (a) The enhanced MESR   with dispersive pattern and (b) the complete control system with periodic mutual exclusion supervisor   .