Discrete Dynamics in Nature and Society

Volume 2017, Article ID 1395142, 14 pages

https://doi.org/10.1155/2017/1395142

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

^{1}School of Computer and Software Engineering, Xihua University, Chengdu 610039, China^{2}School of Information Science and Technology, Southwest Jiaotong University, Chengdu 611756, China^{3}School of Computer Science and Technology, Huaqiao University, Xiamen 361021, China

Correspondence should be addressed to Zhongyuan Jiang; moc.361@jdyzgnaij

Received 2 September 2016; Accepted 8 December 2016; Published 30 January 2017

Academic Editor: Francisco R. Villatoro

Copyright © 2017 Zhongyuan Jiang et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

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 for many 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 -derivation and -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.

#### 1. 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 forbidden-string 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.

#### 2. 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, , , and . 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. is a mapping that assigns a weight to an arc, where is the set of nonnegative integers. A Petri net is called an ordinary net if, , (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 . is called a net system, where is the initial marking of . The preincidence matrix of is . The postincidence matrix of is . A self-loop-free Petri net can be represented by its incidence matrix , where is a integer matrix with . For , denotes the sum of tokens contained in place . Place is marked by a marking if and only if . 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 ; that is, . The subset is said to be empty at if and only if .

The preset of a node is defined as and the postset of a node is defined as . For a set of nodes , and . represents the item count in . A transition is enabled at a marking if such that , which is denoted as . If is enabled, its firing yields another marking such that, , denoted as . Marking is called reachable from if there exists a firing sequence such that . This is denoted by .

A -vector is a column vector indexed by , where 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. -vector is a -invariant if and . is called the support of . (resp., ) denotes the positive (resp., negative) support of . -invariant is called a minimal -invariant if is not a superset of the support of any other one and its components are mutually prime. If is a -invariant of , then such that .

#### 3. 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 be a node of . Node is called a root of if . Node is called a leaf of if .

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.

*Definition 2. *Let be a Petri net and be nodes such that , where , , and . A transient process, denoted as , can be defined if , where .

*Definition 3. *Let be a state machine and be nodes such that , where and . is called a linearity process if (1) is a set of places that represent the states of system;(2) contains only a root and a leaf, where is the root of , is the leaf of , and ;(3) only exhibits a transient process, denoted as .

*Definition 4. *Let be a linearity process and be the transient process from to . If all places are removed from , the rest of the transient process , denoted as , is called the T-Process of .

Figure 1(a) shows a linearity process . Place is a root and place is a leaf of . is a transient process and is a T-Process of . Figure 1(b) shows another linearity process . Place is a root and place is a leaf of . is a transient process and is a T-Process of . Figure 1(c) shows a Petri net that is not a linearity process since it contains two transient processes and . Figure 1(d) shows a Petri net that is also not a linearity process since it is not a state machine.