Next Article in Journal
Pilot Contamination Attack Detection Methods—An Exhaustive Performance Evaluation Through Probability Metrics and Statistical Classification Parameters
Previous Article in Journal
Stopping Sets of Algebraic Geometry Codes over Hyperelliptic Curves of Genus Two
Previous Article in Special Issue
Detection of Cyber-Attacks in a Discrete Event System Based on Deep Learning
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

On Deadlock Analysis and Characterization of Labeled Petri Nets with Undistinguishable and Unobservable Transitions

Macau Institute of Systems Engineering, Macau University of Science and Technology, Taipa, Macau SAR, China
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Mathematics 2024, 12(22), 3523; https://doi.org/10.3390/math12223523
Submission received: 23 September 2024 / Revised: 30 October 2024 / Accepted: 7 November 2024 / Published: 12 November 2024
(This article belongs to the Special Issue Discrete Event Dynamic Systems and Applications)

Abstract

:
This work addresses the analysis and characterization of deadlocks in discrete-event systems modeled by labeled Petri nets (LPNs) with undistinguishable and unobservable transitions. To provide a solution for the notorious problem, it is essential to present an effective characterization in such a way that deadlock control and synthesis are technically and methodologically possible. To this end, we introduce the notion of dangerous implicit vectors (DIVs), which implicitly threaten the system deadlock-freedom. The set of dead markings is divided into two subsets: dead basis markings (DBMs) and dangerous implicit markings (DIMs). An algorithm is designed to compute the sets of DIVs and DIMs at a given basis state of a system. Moreover, by virtue of linear algebraic equations, we formulate sufficient conditions for identifying the existence of blocking markings in an LPN. Finally, an algorithm is developed to construct an observed graph that is a compendious presentation of the reachability graph of a net system, with respect to the existence of dead reaches. At the end of this paper, experiment results that illustrate the correctness and effectiveness of the reported solution are presented.

1. Introduction

Nowadays, the use of artificial dynamical systems is remarkably increasing in view of the enormous evolution of computer technology. The most important characteristic of these systems is determined by the occurrences of asynchronous events in such a way that they are naturally and soundly labeled as discrete-event systems (DESs) [1]. In fact, many contemporary cyber–physical systems can be investigated from the view of discrete-event systems where the procedure of system analysis and synthesis greatly depends on mathematical system models [2]. Without such a mathematical model, it would be impossible to analyze and control the behavior of a system. Different models are used to achieve this goal, such as Petri nets, automata, Markov chains, etc. However, building on the distinct elements, i.e., places and transitions, that characterize physical system features, Petri nets are a typical modeling paradigm of DESs through the usage of linear algebra and engineering optimization techniques. Nevertheless, several fundamental problems remain open. Among them, we, in this research, focus on the deadlock problem, which is an important issue in designing automated systems [3] and has received much attention from the community of computer science and systems control engineers [4,5,6].
Researchers and practitioners have developed an array of deadlock resolution methods such as those in an early work in [7], where a forbidden state avoidance issue is addressed for a system with unobservable transitions, which is modeled with Petri nets with a known initial marking. The approach is liable to be reshaped for deadlock control. In [8,9], Li and Wonham seminally explore the state-feedback mechanism for the supervisory control of DESs in which certain states are not observable, and a plant is modeled with a finite state automaton in which an event can be controllable (observable) or uncontrollable (unobservable). Their goal is to find necessary and sufficient conditions for the existence of “optimal” state feedback control laws, given a control specification is represented by a finite state automaton.
Proposed in [10] is a deadlock characterization and a control procedure based on an observer of a plant, which is actually what an external agent can observe, representing the system output from the lens of outside observation. By virtue of the characterization, a systematic procedure is presented for deadlock recovery, i.e., a deadlock state can be guided/recovered to a predefined normal state. The main contribution is that the observer, the controller, and the deadlock recovery algorithm are all based on the same linear algebraic techniques. Later, Giua and Seatzu [11] use generalized mutual exclusion constraints, based on the previously mentioned characterization, to ensure the control objective, where a plant is modeled with a Petri net and a generalized mutual exclusion constraint serves as the control specification. They explore a recovery procedure and present a deadlock recovery algorithm using linear algebraic techniques. In these studies, and contrary to the supervisory control theory in the Ramadge–Wonham framework [12], all transitions are, in general, assumed to be controllable and observable, and ordinary Petri nets are usually used to model systems. Partially to this end, but not limited to it, the methodologies of deadlock analysis and control derived from Petri nets are not as general as those from the Ramadge–Wonham paradigm [13,14].
In the literature, people have followed three main lines to deal with the problem of deadlocks in the DESs modeled with Petri nets. First, we mention the deadlock prevention principle [15,16,17,18,19,20], which is an offline computation procedure that imposes restrictions on system evolution to prevent the reachability of dead markings. The prevention is ensured by forbidding all first-met bad markings (FBMs) that represent the first entry from the live zone to the dead zone, which are the partition of the reachability graph of a plant, where the initial state assumed to be legal belongs to the live zone.
Contrary to the deadlock prevention principle, deadlock avoidance [21,22,23,24,25,26] is an online mechanism used to handle the blocking problem in Petri nets. As the mechanism proceeds online, a proper decision is made at each state and issued to the actuators among all possible evolutions with the aim of avoiding deadlocks and keeping the system from being trapped in a deadlock state. However, similar to the previously mentioned methods, deadlock avoidance uses the notions of live zone and deadlock zone to achieve this purpose. Although it generally leads to higher resource utilization and throughput, overly aggressive policies are still not able to totally eliminate all deadlocks in some cases. Then, the necessity to use deadlock recovery strategies naturally comes to mind. Note that a recovery scheme is usually used in a scenario where deadlocks do not cause serious consequences.
To summarize, overly cautious or non-aggressive policies may remove unsafe/illegal states and deadlocks from a closed-loop system, along with certain legal states in a general case. Finally, we briefly explain deadlock detection and recovery techniques [27,28,29,30]. The difference between this mechanism and the two aforementioned methodologies is that a deadlock detection and recovery approach permits the occurrence of a deadlock. Once it occurs, it is detected, and then a recovery policy is initialized to guide and navigate the system to a predefined deadlock-free state by simply reallocating the resources held by the system processes. The efficiency and efficacy of this type of strategy depend upon the response time of the implemented algorithms [31]. A long-term running of a system may provide a large amount of data in such a way that different recovery policies can be well developed offline. Once a deadlock is detected, we may easily propose which type of recovery policy to be applied.
To summarize, the deadlock problem has often been discussed in the literature, and several original theoretical approaches have been proposed [10,11,32,33,34] to solve it. While the previous works usually use ordinary Petri nets to model a system where all transitions are observable (the occurrence of any transition can be detected) and distinguishable (different transitions carry different labels), we deal, in this paper, with the issue of deadlock analysis and control in labeled Petri nets where transitions can be unobservable and undistinguishable. Labeled Petri nets are an important framework of discrete-event systems and their liveness or deadlock-freedom is usually a prerequisite for many problems such as fault diagnosis, opacity verification and enforcement, and state estimation [35]. In fact, as a dominant mathematical tool in discrete-event systems, labeled Petri nets’ liveness analysis and decision have been open issues in the discrete-event system community. Due to its complexity, not enough attention is paid to it and the related results are limited. We are motivated by the importance of deadlock characterization, analysis, and control of a discrete-event system for ensuring the correct and safe functioning of large complex systems. More significantly, the importance of defining the deadlock problem optimally will consequently lead to finding an optimal solution to guarantee the deadlock-freeness of the studied system. Moreover, given the lack of work treating this problem in labeled Petri nets, our contributions come naturally.
This paper will be divided into eight main sections. Section 2 provides a brief introduction to labeled Petri nets as well as a few critical notions. Section 3 introduces the basis reachability graph of a labeled Petri net. In Section 4, we focus on deadlock analysis using reachability graphs and basis reachability graphs. Section 5 elaborates upon dangerous implicit reaches, dangerous implicit markings, and dangerous implicit vectors, which play an important role in deadlock analysis. The main results are presented in this section. A structure called an observed graph for deadlock characterization of labeled Petri nets is deferred to Section 6, where an algorithm is developed for its computation. Experiment results are utilized to illustrate the proposed method in Section 7. Finally, Section 8 concludes the paper, with future topics presented.

2. Labeled Petri Nets

Petri nets [36] are employed to model a DES of interest. As seen in [37], the reachability graph of a bounded net system is actually a finite state automaton, a deterministic finite automaton as a matter of fact, suggesting that Petri nets and finite state automata are tied up with each other. The preliminaries of finite state automata, Petri nets, and labeled Petri nets are referred to [37].
From the viewpoint of graph theory, a Petri net, simply called a net, is a bipartite digraph that consists of two types of nodes called places and transitions that are usually portrayed by circles and boxes, respectively. Places and transitions are connected by edges, called arcs. In general, the sets of places and transitions in a net are denoted by P and T, respectively. The arcs from places to transition and from transitions to places can be algebraically represented by two functions Pre and Post, respectively. As the sets P and T are finite, Pre and Post can be written as matrices indexed by P and T for computational convenience. Then, a Petri net or net structure can be described as a quadruple N = ( P , T , Pre , Post ) . Tokens in a place signify that particular conditions the place represents hold. A marking of a net is a mapping from the place set P to the set of natural numbers N = { 0 , 1 , 2 , } , which is formally defined as M : P N . A marking M of a net N indicates the token distribution over its places. Tokens can flow among the places via transitions by following the transition-enabling and firing rules, defining the dynamics of a net system that is symbolized by ( N , M 0 ) , where M 0 is called the initial marking. That is, a net system can be given by ( N , M 0 ) with N = ( P , T , Pre , Post ) being a net structure.
With T * being the Kleene closure of transition set T, we usually use σ T * to denote a transition sequence. From a marking M (not necessarily M 0 ), if a transition sequence σ is feasible, write M [ σ M , where M is said to be the reachable marking from M via σ . Note that a transition sequence is feasible if the transitions in it can fire sequentially. All the markings reachable from the initial markings via feasible transition sequences form a set called the reachability set, defined as R ( N , M 0 ) = { M N | P | σ T * : M 0 [ σ M } . Keeping the reachability set in mind along with the reachability relation among markings, a digraph called the reachability graph of ( N , M 0 ) , denoted as G ( N , M 0 ) , can be constructed, where a node is a marking in R ( N , M 0 ) and there is an edge from M to M labeled with t T if M [ t M holds.
A labeled Petri net (LPN) [38], extended from the Petri net presented above by adjoining two tuples, namely E and , is a quadruple G = ( N , M 0 , E , ) , where
  • E is the alphabet, collecting event labels;
  • N , M 0 is a Petri net system;
  • : T E { ϵ } is the labeling function such that a transition t T is assigned either a label in E or the empty string ε .
Note that the labeling function can be, in a usual way, extended as being : T * E * , i.e., a transition sequence is mapped as a sequence of labels with ( ε ) = ε . If an event is given a label, its occurrence can be detected by observing the label. Then we group the transitions with labels as T o and those with the empty string ε as T u o , called observable and unobservable transitions, respectively. A major difference between a Petri net and a labeled Petri net lies in the modeling of unobservable transitions in the latter, which stems from the fact that in a real system, sensors are not deployed for all the events, partially due to technical or financial reasons. In other words, if an event is not associated with a sensor, we cannot observe its occurrence, i.e., it is treated as being unobservable. An example of an LPN is shown in Figure 1, where P = { p 1 , p 2 , p 3 , p 4 , p 5 , p 6 } is the set of places and T = { t 1 , t 2 , t 3 , t 4 } is the set of transitions with Σ = { c } , T o = { t 2 , t 3 } , T u o = { t 1 , t 4 } , ( t 1 ) = ( t 4 ) = ε , and ( t 2 ) = ( t 3 ) = c .
Given an LPN G = ( N , M 0 , E , ) and a marking M R ( N , M 0 ) , the language generated by G from M is defined as
L ( G , M ) = { ω E * σ T * : M [ σ and ( σ ) = ω } .
Furthermore, given a set of markings Y R ( N , M 0 ) of G, we define the language generated from the markings in Y as
L ( G , Y ) = M Y L ( G , M ) .
A string belonging to L ( G , M 0 ) is called an observation. Let ω be an observation of an LPN G = N , M 0 , E , . We define
C ( ω ) = { M N m σ T * : M 0 [ σ M and ( σ ) = ω } .
as the set of markings consistent with ω . We also define the set of markings generating ω as
I ( ω ) = { M R ( N , M 0 ) σ T * , M R ( N , M 0 ) : M [ σ M and ( σ ) = ω } .
By definition, once the word (string) ω is observed, the sets C ( ω ) and I ( ω ) are non-empty sets. Given an observation ω L ( G , M 0 ) , ω is a prefix of ω if and only if there exists a string ν E * such that ω = ω ν . We write ω ¯ to denote the prefix set of ω with ε ω ¯ and ω ω ¯ . For a set of observations L L ( G , M 0 ) , we define the prefix-closure of L as L ¯ = { ν L ( G , M 0 ) ω L : ν ω ¯ } . Simply put, L ¯ consists of all the prefixes of all the strings in L. It is trivial that ε L ¯ and for any string ω L , ω L ¯ if L is not empty.

3. Minimal Explanation and Basis Reachability Graph

The concept of a basis reachability graph is proposed in [39,40], which serves as a compact way to represent the reachability set of an LPN to solve fault diagnosis and many other problems in the context of discrete-event systems. It has been used to address the issues related to observability, e.g., diagnosability and opacity verification and enforcement problems [39,40,41]. A generalization of the basis reachability graph is proposed by Ma and his colleagues in [42], where a more fundamental structure that only contains basis markings independently from the system’s partition is defined. In this section, we will provide some basic definitions that will be used in the following.

3.1. Minimal Explanation and Minimal E-Vector

Definition 1 
(Basis Partition [42]). Given a net N = ( P , T , P r e , P o s t ) with T = T E T I and T E T I = , a pair π = ( T E , T I ) is called a basis transition partition of the transition set T if the T I -induced subnet is acyclic.
The transitions in T E (resp. T I ) are said to be explicit (resp. implicit). Write | T E | = n E and | T I | = n I . In our research, unobservable transitions in a labeled Petri net will be collected in set T I . The assumption that in the T I -induced subnet, there is no cycle ensures that an observable event can be observed within a finite time; otherwise, a system may be infinitely cycled without any observational output. Given a Petri net N = ( P , T , P r e , P o s t ) , a basis partition π = ( T E , T I ) , a marking M, and a transition t T E , we define the set of explanations of transition t at marking M as
Σ ( M , t ) = { σ T I * M [ σ M and M P r e ( · , t ) } .
The set of e-vectors (explanation vectors), which collects the firing vectors associated with the firing sequences in Σ ( M , t ) , is defined as
Y ( M , t ) = { y σ N n I σ Σ ( M , t ) } .
We also define the set of minimal explanations of transition t T E at marking M as
Σ min ( M , t ) = { σ Σ ( M , t ) σ Σ ( M , t ) : y σ y σ } .
The corresponding set of minimal explanation vectors is
Y min ( M , t ) = { y σ N n I σ Σ min ( M , t ) }
Given a marking M and an explicit transition t T E , the work in [39] proposes an efficient algorithm to compute the set of minimal e-vectors Y min ( M , t ) .

3.2. Basis Reachability Graph

Definition 2 
(Basis Marking [42]). Given a Petri net N = ( P , T , Pre , Post ) with an initial marking M 0 and a basis partition π = ( T E , T I ) , its basis marking set M ( N , M 0 , π ) is defined as follows:
  • M 0 M ( N , M 0 , π ) ;
  • If M M ( N , M 0 , π ) , then the predicate holds: y Y min ( M , t ) : ( M = M + C I · y + C ( · , t ) ) ( M M ( N , M 0 , π ) )
where C I is the incidence matrix of N restricted to the transition set T I . A marking M in M ( N , M 0 , π ) is called a basis marking of N , M 0 with respect to π = ( T E , T I ) .
Definition 3 
(Basis Reachability Graph [42]). Given a bounded net N = ( P , T , Pre , Post ) with an initial marking M 0 and a basis partition π = ( T E , T I ) , its basis reachability graph (BRG) is a non-deterministic finite state automaton, represented by a quadruple B = ( M , T r , Δ , M 0 ) such that
  • the state set M is the set of basis markings;
  • the event set T r is the set of pairs ( t , y ) T E × N n I ;
  • the transition relation Δ is
    Δ = { ( M 1 , ( t , y ) , M 2 ) t T E , y Y min ( M 1 , t ) , and M 2 = M 1 + C · y + C ( · , t ) }
  • the initial state is the initial marking M 0 .
An algorithm is proposed in [42] that iteratively computes basis markings and constructs a BRG. We use B ( N , M 0 , π ) to denote the BRG of a net N , M 0 with basis partition π . If no confusion arises, it is simply written as B .
This algorithm computes the set of all minimal explanations of each selected marking M and associates each explanation y Y min ( M , t ) with a new marking M defined by the state equation of a basis marking M = M + C I · y + C ( · , t ) . Each new marking is defined as an unchecked marking, and this procedure runs iteratively until there are no unchecked markings. For a bounded Petri net, based on M R ( N , M 0 ) , such an algorithm can terminate in a finite amount of time.
Given a labeled Petri net (not associated with a real system), ( T E , T I ) is a purely theoretical partition that can be arbitrary: Different partitions lead to different BRGs with different sizes. In particular, if T I = , the BRG under the partition ( T , ) is exactly the reachability graph of a net system. BRG-based methods are extensively developed for addressing multiple problems in DESs, e.g., opacity verification and enforcement, fault diagnosis and diagnosability analysis, fault predictability, and supervisory control, where the unobservable transitions are collected into T I for the construction of a BRG.
In a general case, the size of a BRG of a net system is (much) smaller than its reachability graph. Suppose that in a reachability graph, there are k paths from a marking M to markings M 1 , M 2 , …, M k through unobservable transition sequences σ u 1 , σ u 2 , , σ u k , respectively, i.e., M [ σ u i M i , for all i { 1 , 2 , , k } , and there exists an explicit transition t T E that is enabled at M i for all i { 1 , 2 , , k } . Then in its corresponding BRG, only one path is kept, whose associated unobservable transition sequence has a minimal explanation vector. Other paths can be removed from the reachability graph, which does not affect the observational behavior. This is why BRGs are, in general, small-sized, such that they find their extensive applications in many problems in the DES community, such as opacity verification and enforcement, fault diagnosis, diagnosability analysis and enforcement, supervisory control, and so on. Note that it has been interesting to apply the idea of BRGs to the automata such that a reduced model may be obtained. Experimental studies show that with the increase of net system size, the effect of using BRGs instead of reachability graphs would become much more obvious and beneficial in computation [42].

4. Deadlock Analysis

In this section, we will give a brief overview of reachability graph-based methodologies dealing with the deadlock problem in a DES modeled with Petri nets. In fact, when treating the problem, we can distinguish between structure and reachability graph analysis. In this paper, we are interested in the latter, providing effective solutions for the deadlock problem for an LPN.

4.1. Analysis of Reachability Graph

The authors of [43] split a reachability graph of a net model into two zones: a deadlock zone (DZ) and a live zone (LZ). The DZ is composed of deadlock states (or called deadlock markings), at which no transition is defined or feasible, and partial deadlock states, which are deadlock-reachable but not co-reachable with respect to the initial marking—from which the initial marking cannot be reached but a deadlock can be reached. Then, LZ contains all the markings in the reachability set, which do not belong to the DZ. In other words, a marking (state) in LZ is reachable and co-reachable with respect to the initial marking. Suppose that all the transitions in a system model are controllable. A control policy is maximally permissive if the closed-loop system keeps all the states/markings in its LZ [44].
Sometimes, we also use L Z ( D Z ) to stand for the set of elements in LZ (DZ). Note that in [45], a state/marking M in LZ is said to be dangerous if its one-step extension falls into the DZ, i.e., there exist a transition t T and a marking M such that M [ t M and M D Z holds. In this case, the pair ( M , t ) is called a marking/transition separation instance. If a monitor can be designed for each marking/transition separation instance such that all the states in the LZ are kept in the closed-loop system and all the states in the DZ are removed, then we say that the policy derived from the set of monitors is the least restrictive or maximally permissive. In Figure 2, we show the partition of the reachability graph of some LPN, where { t 1 , t 4 , t 5 , t 6 , t 8 } is the set of observable transitions.
However, the computation of a reachability graph is usually expensive, as the state space of a system modeled with a Petri net grows exponentially with the system scale, i.e., the place set and the initial marking. Given a real system, a complete enumeration of reachable is, in general, infeasible. This is why we have to explore other computationally efficient methods to address the related problems in DESs, leading to the birth of BRGs. As seen after the proposal of BRG, there is a deluge of methods for the various problems in DESs using Petri nets. In this paper, we try to employ this notion to address the deadlock characterization and analysis of a DES, which is partially observed, using labeled Petri nets.

4.2. Analysis of Basis Reachability Graph

Under the assumption that the T u o -induced subnet is acyclic, the study in [39,40] uses the original BRG to solve the fault diagnosis problem. A generalization of BRG has been introduced later in [42]. This particular graph preserves the necessary information on marking reachability but is much smaller in practice application systems so that the notorious state explosion problem is, to some extent, mitigated. In this subsection, we focus on analyzing deadlocks based on BRGs and studying their effectiveness in characterizing deadlocks in systems modeled by LPN.
Definition 4 
([42]). Given a net N = ( P , T , Pre , Post ) , a basis partition π = ( T E , T I ) , and a basis marking M b M , the implicit reach of M b , denoted by R I ( M b ) , is defined as
R I ( M b ) = { M N m σ T I * : M = M b + C · y σ } .
By definition, the implicit reach of a basis marking M b is the set of markings reachable from M b by firing only implicit transitions.
Corollary 1 
([42]). Given a Petri net N , M 0 and its BRG B , the following holds
R ( N , M 0 ) = M b M R I ( M b ) .
As Corollary 1 shows, we can easily observe that the implicit reaches of all basis markings span exactly the state space of a net system. The main contribution of a BRG is that it prevents the exhaustive exploration of all reachable states. As only the minimal e-vector is taken into account for each basis marking and observable transition when constructing a BRG, some edges in a reachability graph are not explicitly represented in a BRG so that its size is significantly reduced, particularly if the set of implicit transitions is large. However, this may ignore useful information about deadlock markings. Note that, for fault diagnosis and diagnosability analysis, under the assumption that a plant is live, a BRG does not lose any useful information. However, as suggested by the liveness assumption, the aforementioned BRG is problematic for deadlock analysis of a labeled Petri net. We now touch upon some definitions that are essential and critical to formalize and develop the main results in this paper.
Definition 5. 
Given a marking M and an explicit transition t T E , the set of entire explanations at M is defined as
E ( M ) = t T E Σ ( M , t ) .
We also define the set of entire explanation vectors as
Y T ( M ) = t T E Y ( M , t ) .
Similarly, we introduce the set of entire minimal explanations at M as
E min ( M ) = t T E Σ min ( M , t ) .
and its corresponding set of entire minimal e-vectors as
Y T min ( M ) = t T E Y min ( M , t ) .
In other words, E ( M ) represents the set of all implicit sequences whose firing at the marking M enables an explicit transition t T E , while E min ( M ) is the set of all minimal implicit sequences feasible at M b , at which an explicit transition t T E is enabled. The number of arcs in a BRG, where M b is the input vertices, is equal to the cardinality of E min ( M b ) .
Lemma 1. 
Given an LPN G = ( N , M 0 , E , ) , a basis partition π = ( T E , T I ) , and an explicit transition t E T E , a basis marking M b is reachable from another basis marking if it satisfies
M b = i = 1 n α i M b i + C I · y I + C ( · , t E )
with y 1 Y min ( M b , t E ) , i = 1 n α i = 1 , and α i { 0 , 1 } .
Proof. 
This result stems from the state equation of a basis marking. By α i { 0 , 1 } and i = 1 n α i = 1 , we have one and only one α i = 1 for some i. In other words, we have at least one basis marking M b i such that
M = M b i + C I · y I + C ( · , t E ) .
Based on the state equation of a basis marking, if M M ( N , M 0 , π ) , then for all t T E and for all y Y min ( M , t ) , we have
M = M + C I · y + C ( · , t ) M M ( N , M 0 , π ) .
Thus, we conclude that M is a reachable basis marking.    □
As indicated by the lemma, a marking M is a reachable basis marking if there exists, at least, another reachable basis marking from which M can be reachable by firing a minimal explanation followed by its corresponding explicit transition t E .
Definition 6. 
Given an LPN G = ( N , M 0 , E , ) , a basis partition π = ( T E , T I ) , and an explicit transition t E T E , a marking M is a dead basis marking (DBM) if it satisfies the following linear system:
D B M ( M b ) : = M b = i = 1 n α i M b i + C I · y I + C ( · , t E ) ( a ) E ( M b ) = ( b ) i = 1 n α i = 1 ( c ) α i { 0 , 1 } ( d ) y 1 Y min ( M b , t E ) ( e )
In other words, a marking M is said to be a DBM if there exists a basis marking M b i , from which it is reachable by firing σ = σ I t E with σ I a minimal explanation of t E , and there does not exist any implicit sequence feasible at M b that can enable an explicit transition. Note that, despite the set of entire explanations at M b is empty, the set of implicit reaches R I ( M b ) could not be so. From Definition 10, we derive the following sufficient condition for deadlock existence in an LPN.
Theorem 1. 
(Sufficient Condition) Given an LPN G = ( N , M 0 , E , ) , a basis partition π = ( T E , T I ) , a DBM M b , and a marking M N m , the following predicate holds:
M R I ( M b ) M D Z
Proof. 
The fact that M b is a DBM implies E ( M b ) = . We have R ( N , M b ) = R I ( M b ) , and for all M R I ( M b ) such that M 0 [ σ M , it holds σ E ( M b ) , leading to the truth of M D Z .    □
Proposition 1. 
Given an LPN G = ( N , M 0 , E , ) , a basis partition π = ( T E , T I ) , and a marking M, if M is a DBM, then M D Z holds.
Proof. 
The proof of Proposition 1 derives from Theorem 1. Suppose that M is a dead basis marking. Theorem 1 has shown R ( N , M ) = R I ( M ) D Z . We conclude that from M, only the markings in D Z are reachable. Hence, M D Z holds.    □
Theorem 1 gives a sufficient condition to make a decision about the safeness of a basis marking’s reaches. In fact, once the set of entire explanations feasible at M b is empty, we can easily conclude that only implicit transitions can be feasible at M b . This means that the reachability set of the basis marking M b is equal to its implicit reach. Note that a BRG is founded under the assumption of acyclicity of the T I -induced subnet. Therefore, there does not exist any implicit sequence feasible at M b that can return the system to its optimal behavior. In this case, any marking M reachable from M b (with M R I ( M b ) ) should necessarily be a dead state, a partial deadlock state that necessarily leads to deadlocks.
Example 1. 
Let us consider the LPN in Figure 3, whose transition partition is π = ( T I , T E ) with T E = { t 1 , t 4 , t 5 } and T I = { t 2 , t 3 } . The initial marking is M 0 = p 1 + p 2 . As shown in Figure 4, the reachability graph contains seven markings, from which we can easily extract the deadlock zone D Z = { M 3 , M 5 } . The BRG of this example is visualized in Figure 5. The basis marking M b 2 is a DBM since it is reachable from M b 0 by firing ( t 5 , y ) , where y = [ 0 , 0 ] and E ( M b 2 ) = . Consider the implicit reach of M b 2 , R I ( M b 2 ) = { M 5 } D Z holds. By Proposition 1, we have M b 2 D Z .
Although the DMBs of an LPN are covered by its BRG, it is not able to fully characterize the deadlock problem in the LPN. In fact, the basis reachability graph covers only deadlock states reachable by firing minimal explanations, neglecting thus other feasible implicit events that may threaten the system’s safeness and lead to deadlocks. To clearly explain this point, let us introduce Example 2, which illustrates the weakness of a BRG in deadlock recognition.
Example 2. 
Consider the Petri net in Figure 1 with an initial marking M 0 , where M 0 ( p 1 ) = 2 , M 0 ( p 5 ) = M 0 ( p 6 ) = 1 , and M 0 ( p ) = 0 for other places. The set of transitions T is divided into T 0 = { t 2 , t 3 } and T u o = { t 1 , t 4 } .
The reachability graph of the net model, shown in Figure 6, has five reachable markings. The firing of t 1 from the marking M 2 leads the system to a dead marking M 4 . While considering a basis partition π = ( T E , T I ) with T E = T 0 and T I = T u o , Figure 7 defines its BRG. As shown in the figure, this graph is composed of three basis markings. Regarding deadlocks, it gives D Z = { M 4 } . However, since this dead state is not reachable by firing a minimal explanation, the BRG of this example does not contain any DBM, and the sequence of transitions leading the system to the deadlock zone is not taken into account by the BRG. Thus, the weakness of a BRG facing this type of deadlock clearly appears. Note that the cycle in Figure 7 is due to the unobservability of transitions t 1 and t 4 .
In this section, we have shown that using the original BRG we cannot fully address the deadlock problem. In the next section, we will introduce new concepts that are able to deal with deadlock characterization and analysis of an LPN.

5. Dangerous Implicit Reaches

In this section, we propose new concepts that enable us to identify the existence of deadlocks in systems modeled by an LPN. A system under consideration in this research is supposed to be arbitrarily labeled, i.e., no condition or restriction is imposed on the labeling function : T * E * . Hence, the system may contain undistinguishable transitions, i.e., at a marking M, two (or more) enabled transitions may share the same label (e.g., a). We denote the set of undistinguishable transitions with respect to a label σ as T u d ( σ ) = { t T | ( t ) = σ E ε } . Moreover, the set of distinguishable transitions in an LPN is denoted by T d . By definition, T u o T u d holds, where T u d = σ E ε T u d ( σ ) is the set of undistinguishable transitions. Hence, the transitions are grouped as T = T d T u d o T u o , where T u d o is the set of undistinguishable transitions but observable, i.e., T u d o = σ E ε T u d o ( σ ) , where T u d o ( σ ) = { t T | ( t ) = σ E } .
Consider a system modeled with an LPN and consistent with the aforementioned description. With respect to the concept of basis reachability graph, we can classify the set of implicit reachable states from a basis marking M b M to three main subsets: minimal explanations, non-minimal explanations, and non-explanation sequences. As we have proven in the previous section, if a deadlock state is reachable by firing an explicit transition preceded by one of its minimal explanations, the BRG can identify such a deadlock state. However, the BRG is still unable to identify deadlocks reachable by firing non-minimal explanations or implicit sequences that can never belong to the set of entire explanations.

5.1. Dangerous Implicit Markings (DIMs) and Dangerous Implicit Vectors (DIVs)

At the beginning of this subsection, let us introduce some results that will be used in the following to minimize the related computations.
Theorem 2. 
Suppose that σ = t 1 t 2 T * is firable starting from a marking M 1 with M 1 [ t 1 M 2 [ t 2 M 3 in an PLN. The following holds:
( M 1 [ t 1 M 2 [ t 2 M 3 ) ( M 4 N m : M 1 [ t 2 M 4 ) M 4 [ t 1 M 3
Proof. 
Let σ = t 1 t 2 and M 1 [ t 1 M 2 [ t 2 M 3 . This implies that M 3 = M 1 + C ( · , t 1 ) + C ( · , t 2 ) 0 . Suppose that t 2 is firable from M 1 with M 1 [ t 2 M 4 . Then, we have M 4 = M 1 + C ( · , t 2 ) 0 . Hence, we obtain the following system
M 1 + C ( · , t 1 ) + C ( · , t 2 ) 0 M 1 + C ( · , t 2 ) 0
which indicates M 4 + C ( · , t 1 ) 0 . Accordingly, we conclude that from M 4 we necessarily have M 4 [ t 1 and the reachable marking is M 3 .    □
Corollary 2. 
Given two sequences σ , σ T * , where σ = t 1 t 2 t n , t i σ , and σ = σ { t i } , suppose that there is a marking M 1 N m from which t 1 , t 2 , , t n are firable sequentially with M 1 [ t 1 M 2 [ t 2 [ t n M n . If σ is firable from M 1 with M 1 [ σ M x , then M x [ t i M n holds.
Proof. 
The proof of this corollary derives from Theorem 2. In fact, suppose that from a marking M N m we have M [ σ M . This implies that (1) M + C y 0 with y = π ( σ ) and C y = C ( · , t 1 ) + C ( · , t 2 ) + + C ( · , t n ) . If M [ σ M , then (2) M = M + C ( · , t 1 ) + + C ( · , t i 1 ) + C ( · , t i + 1 ) + + C ( · , t n ) and C ( · , t i + 1 ) + + C ( · , t n ) 0 . By (1) and (2) we conclude M + C ( · , t i ) 0 and M + C ( · , t i ) = M .    □
As a matter of fact, Corollary 2 is a generalization of Theorem 2. In what follows, we touch upon a primary notion called dangerous implicit marking, which is pivotal to the development of this research.
Definition 7. 
Given an LPN G = ( N , M 0 , E , ) , a basis marking M b , and a vector y I N n I , let M b = M b + C I · y I with y I 0 and y I Y T ( M b ) such that y I y I . Then y I is said to be a dangerous implicit vector (DIV), while M b is called a dangerous implicit marking (DIM).
Further, we define the set of Dangerous Implicit Vectors (DIVs) at M b by
Y β ( M b ) = { y N n I M b = M b + C I · y I 0 and ( y I Y T ( M b ) : y I y I ) }
Moreover, we define the set of Dangerous Implicit Markings (DIMs) reachable from M b as
M β ( M b ) = { M N m M b = M b + C I · y I 0 and y I Y β ( M b ) }
In other words, consider a basis marking M b and a vector y N n I feasible at M b . The vector y I is dangerous because it can never be an explanation vector of any explicit transition at M b , i.e., for any feasible implicit sequence of transition σ at M , where M = M b + C I · y I is the marking reachable by firing y I from M b , the sequence σ σ I can never belong to the set of entire explanations at M b . In this case, the marking reachable by firing an implicit sequence σ I from M b , with y I = π ( σ I ) , is called a dangerous implicit marking.
Theorem 3. 
Given an LPN G = ( N , M 0 , E , ) , a basis marking M b , and a sequence of implicit transitions σ I satisfying:
M b [ σ I , σ I E ( M b ) ¯ , σ I T I * ,
( E ( M b ) ¯ denotes the prefix-closure of E ( M b ) ). let S = { M N m M = M b + C I · y I 0 , σ I T I * , y I = π ( σ I ) , and σ I σ I ¯ } be a set of markings, where σ I ¯ denotes the prefix set of σ I . ( σ I ¯ denotes the prefix set of σ I ). Then, for any M S , M D Z .
Proof. 
Let M b N m be a basis marking and σ I , σ I T I * be two implicit sequences with σ I σ I ¯ . Suppose that M b and σ I verify Theorem 3. Since σ I σ I ¯ and σ I E ( M b ) , we have σ I E ( M b ) . Let us consider now S = { M N m M = M b + C I · y I 0 } . We aim to prove that for all M S , M D Z .
(a)
By M b [ σ I , M = M b + C I · y I > 0 . Moreover, there does not exist t E T E such that M [ t E due to σ I E ( M b ) .
(b)
As is known, the T I -induced subnet is acyclic, implying that the predicate holds: σ I = t I 1 , t I 2 , , t I k : M 1 [ t I 1 M 2 [ t I 2 M k [ t I k M 1 . That is to say, from the marking M , we cannot co-reach M 0 by firing only implicit transitions.
By (a) and (b), we conclude that for all M S , M 0 R ( N , M ) holds.    □
In simple words, consider an LPN G = ( N , M 0 , E , ) , an arbitrary basis partition π = ( T E , T I ) , and a basis marking M b . Under the assumption that the T u o -induced subnet is acyclic, we have proven by Theorem 3 that any marking M reached by firing an implicit sequence σ I that does not belong to E ( M b ) ¯ , the prefix-closure of the set of entire explanations E ( M b ) , is either a dead marking or a marking that inevitably leads the system to a blocking state. Thus, M belongs necessarily to the dead zone (DZ).
Proposition 2. 
Given an LPN G = ( N , M 0 , E , ) , a basis marking M b , and a dangerous implicit vector y I Y β ( M b ) with M I = M b + C I · y I , M b is a DIM and for all y I N n I such that M b = M b + C I · y I 0 , M B D Z holds.
Proof. 
Given a basis marking M b and a sequence of implicit transitions σ I T I * firable from M B with π ( σ I ) = y I , suppose that y I is a DIV, i.e., there does not exist y I Y T ( M b ) such that y I y I . Then, for all y x N n I , there does not exist y I Y T ( M b ) such that y I y I + y x . We have for all σ = σ I σ x such that M b [ σ , σ E ( M b ) ¯ is true and thus by Theorem 3, M b = M b + C I · y σ D Z holds.    □
By virtue of DIV and DIM notions, Proposition 2 represents a generalization of Theorem 3. In fact, when checking the safeness of a non-dead-basis marking, if an implicit vector y I is feasible at a basis marking M B ( M b + C I · y I 0 ) and there does not exist any explanation vector y I feasible at M b such that y I y I , we do not need to check the maximal cardinality that the implicit vector y I can reach, since it is certain by Proposition 2 that we will never find a vector included in the set of entire e-vectors.
In the following, Algorithm 1 is introduced to check the safeness of all non-dead basis markings. Given a basis marking M b and its set of entire e-vectors Y T ( M b ) , the role of the proposed algorithm is to check if there exists any DIV, i.e., any implicit vector feasible at M b but not belonging to the set of entire explanations E ( M b ) , that can threaten the system deadlock-freedom, thereby providing more information about deadlocks that can be reached from the basis marking M b .
Algorithm 1: Computation of DIVs and DIMs
Input: 
A labeled Petri net G = ( N , M 0 , E , ) , a marking M b , its set of entire explanations E ( M b ) , and the set of implicit transitions T I .
Output: 
Set of dangerous implicit vectors and that of implicit dangerous markings Ψ ( M b ) = [ M β ( M b ) Y β ( M b ) ] .
Mathematics 12 03523 i001
Algorithm 1 works in a breadth-first manner. Considering the set of entire explanation vectors, this algorithm checks whether there exist any undesirable implicit vectors that can fire and lead to deadlocks. A first test is performed by step 6 to verify the existence of the sufficient condition given by Theorem 3 and Proposition 2. Specifically, the matrix C defines the set of entire e-vectors. If there does not exist any row j * in C such that C ( j * , · ) I n I x n I ( j , · ) + B ( i * , · ) , the conditions given by Theorem 3 and Proposition 2 are satisfied. Hence, the reached marking will be added to the set of dangerous implicit markings without adding it to the set M new . A second condition is introduced by step 9 of Algorithm 1. Indeed, this test aims to minimize the computation by checking whether the conditions in Theorem 2 and Corollary 2 are satisfied. Once M new becomes empty, a set of dangerous implicit vectors DIVs and its corresponding set of implicit dangerous markings DIMs are obtained by Ψ ( M b ) = [ M β ( M b ) Y β ( M b ) ] .
Proposition 3. 
The complexity of Algorithm 1 is O ( 2 | T I | + [ | T I | 2 · | P | + | T I | · | Y T ( M b ) | ] ) .
Proof. 
In the worst case, the first step of the algorithm, i.e., the while loop, takes the time of O ( 2 | T I | ) , where | T I | represents the number of implicit transitions of the studied Petri net. In the second step, browsing through the matrix C I T takes the time of O ( | T I | ) . The third step considers the checking of the existence of the new implicit vector I n I x n I ( j , · ) + B ( i * , · ) in the two matrices B and C of size O ( | T I | ) and O ( | Y T ( M b ) | ) , respectively, with | Y T ( M b ) | being the cardinality of the set of entire e-vectors of M b . Therefore, the total cost for “the else if statement” is O ( | T I | + | P | + | Y T ( M b ) | ) . Finally, the asymptotic total cost of Algorithm 1 is O ( 2 | T I | · [ | T I | 2 + | T I | · | P | + | T I | · | Y T ( M b ) | ] ) .    □
Although, in the worst case, the number of iterations of Algorithm 1 may grow exponentially with the maximal length of a path in the subnet derived from the implicit transition set T I , the computation in this algorithm is still tractable, as the main operations are the vector/matrix addition.
Example 3. 
Let us consider the Petri net system shown in Figure 8, which consists of 9 places P = { p 1 , , p 9 } and 8 transitions T = { t 1 , , t 8 } . The transition set partition is defined by π = ( T E , T I ) with T E = T o = { t 1 , t 4 , t 5 , t 6 , t 8 } and T I = T u o = { t 2 , t 3 , t 7 } . Consider the initial marking M 0 = p 1 + p 7 + p 9 . The reachability graph, shown in Figure 9, contains 16 reachable markings, 12 of which are legal markings and 4 of which are deadlock markings. In Figure 10, we present its BRG composed of 6 markings.
Let us focus on the basis marking M b 5 , which is the marking M 14 in the reachability graph. As shown in the BRG, M b 5 is not a DBM. However, from the reachability graph, one observes that M 15 is a dead marking reachable implicitly from M 14 and neglected by the BRG. By applying Algorithm 1, we can easily obtain Ψ ( M b ) = [ M β ( M b ) Y β ( M b ) ] with Y β ( M b ) Y β ( M b ) = [ 0 , 1 , 0 ] and M β ( M b ) = [ 000001102 ] . In fact, the set of entire e-vectors at M 14 contains only one element Y T ( M b 5 ) = { [ 0 , 0 , 1 ] } which belongs to ( M b 5 , a ( t 1 ) ) . However, the vector y T = [ 0 , 1 , 0 ] is feasible from M b 5 . Since there does not exist any vector y T Y T ( M b 5 ) such that y T y T , y T is a dangerous implicit vector at M b 5 and M d = M 15 = [ 000001102 ] is its corresponding DIM. As Theorem 3 and Proposition 3 indicate, this DIM belongs to the dead zone DZ.

5.2. Non-Minimal Explanations

As we have previously mentioned, the concept of dangerous implicit markings is able to deal with the deadlock states reachable by an implicit sequence that can never be an explanation of any explicit transition at a given basis marking. However, in this subsection, we touch upon the last type of dead markings reachable from a basis marking, which is a non-minimal explanation. In plain words, the principle of the basis reachability graph is to find the minimal implicit path to activate each explicit transition. By this principle, non-minimal explanations will not be considered.
Proposition 4. 
Given an LPN G = ( N , M 0 , E , ) , a basis partition π = ( T E , T I ) , a marking M, and a sequence σ I T I * such that M [ σ I M , if σ I E ( M ) , M is not a dead marking.
Proof. 
Let M N m be a marking and σ I T I * be a sequence of implicit transitions firable from M. σ I ( M , t ) signifies that there exists a transition t T E such that M [ σ I M [ t . We can then conclude that σ I does not lead to a dead marking.    □
By definition, an explanation is a sequence of implicit transitions feasible at a given basis marking to enable an explicit transition. Thus, it is seen that a marking reachable from a basis one by firing an explanation of any explicit transition is not a dead marking.
Theorem 4. 
Given an LPN G = ( N , M 0 , E , ) , a basis marking M b , an explicit transition t E , and y I Y ( M b , t E ) that is a non-minimal explanation vector of t E at M b , let M N m be a marking reachable by firing t E preceded by σ I , an explanation consistent with y I . If M is a dead marking, then there exists a basis marking M b reachable from M b by firing σ min t E , where σ min is a minimal explanation of t E at M b in comparison with σ I , from which a dangerous implicit marking M is reachable, i.e., M b [ σ min t E M b , and M M β ( M b ) .
Proof. 
Consider a basis marking M b , an implicit transition t E T E , and a non-minimal explanation vector y I Y ( M b , t E ) , i.e., y I Y min ( M b , t E ) . Suppose that M = M b + C I · y I + Pre ( · , t E ) is a dead marking. The fact that y I is a non-minimal e-vector implies that there exists an e-vector y I Y min ( M b , t E ) verifying y I < y I . That is to say that there exists a vector y I N I n such that y I = y I + y I . Thus we have
M b 1 = M b + C I · y I + C ( · , t E ) 0 M = M b + C I · y I + C I · y I + C ( · , t E ) 0
We conclude that M can be reached from the basis marking M b 1 by firing an implicit sequence of transitions σ I T I * such that y I = π ( σ I ) . However, M is a dead marking. Hence, there does not exist any e-vector y Y T ( M b 1 ) such that y y I . Finally, we obtain M M β ( M b 1 ) .    □
By Theorem 4, we have proved that if a dead state is reachable by firing a non-minimal explanation, we can certainly reach it by firing only implicit transitions from a basis marking. Thus, the concept of dangerous implicit reach can cover this type of dead reachable state and identify dangerous sequences leading to such markings.
Example 4. 
Consider again the LPN in Figure 8 whose unobservable subnet is acyclic. Let us focus our attention on the basis marking M b 1 . The set of explanations of t 4 at M b 1 is ( M b 1 , t 4 ) = { t 2 , t 2 t 3 , t 3 t 2 , t 2 t 7 , t 7 t 2 } . Therefore, we have min ( M b 1 , t 4 ) = { t 2 } and Y min = { [ 1 , 0 , 0 ] } . In the BRG, only the minimal explanation is considered. Although this minimal explanation leads the system to a legal state, we can observe that according to the reachability graph, the non-minimal explanations t 2 t 7 and t 7 t 2 conduct the system inevitably to the dead state M 12 = [ 100010000 ] . Since M b 1 [ t 2 t 4 M b 2 with σ I = t 2 is the minimal explanation in comparison with the aforementioned two explanations, one sees M 12 M β ( M b 2 ) .

6. Observed Graph: A Deadlock Characterization for Labeled Petri Nets

In this section, we propose a new graph that is able to fully characterize deadlocks in systems modeled by labeled Petri nets.
Definition 8 
(Observed Graph). Given a bounded Petri net N = ( P , T , Pre , Post ) with an initial marking M 0 and a basis partition π = ( T E , T I ) , the observed graph of the Petri net is a non-deterministic finite state automaton that is a quadruple G = ( M O , T r , Δ O , M 0 ) , where
  • the state set M O = M B M D is the set of observed markings with:
    the state set M B being the set of observed basis markings;
    the state set M D being the set of observed dead markings;
  • the event set T r is the set of pairs ( t , y ) ( T E { } ) × N n I ;
  • the transition relation is Δ O = Δ B Δ D with:
    Δ B = { ( M 1 , ( t , y ) , M 2 ) t T E , y Y min ( M 1 , t ) , and M 2 = M 1 + C I · y + C ( · , t ) }
    Δ D = { ( M 1 , ( , y ) , M 2 ) y N n , y Y β ( M 1 ) , and M 2 = M 1 + C I · y }
  • the initial state is the initial marking M 0 .
Algorithm 2 presents a method to calculate the observed graph G . By steps (3–16), we first compute the original BRG. By step 7, the set of entire explanations Y T ( M b ) is computed. Steps (17–21) check the existence of the sufficient condition given by Theorem 1. If the tested marking M is a DBM, then we add it to the set of dead markings M D , assign a tag to M, and return to step 2 to check another marking without a tag from M B if there is one. If the first sufficient condition of Theorem 1 is not satisfied by steps (18–21), we check the safeness of the implicit reaches of the marking M. If β (the set of dangerous implicit vectors and its corresponding markings computed by Algorithm 1) is not empty, for all y I β we add the reachable implicit marking M I to M D and ( M , ( , y I ) , M I ) to Δ D . This procedure runs iteratively until there is no unchecked marking in M B . For a bounded Petri net, based on ( M B M D ) R ( N , M 0 ) , Algorithm 2 terminates in a finite time.
Algorithm 2: Construction of observed graph.
Input: 
A labeled Petri net G = ( N , M 0 , E , ) and a basis partition π = ( T E , T I )
Output: 
An observed graph G = ( M B , M D , T r , Δ B , Δ D , M 0 )
Mathematics 12 03523 i002
We first consider the complexity of the observed graph G , i.e., the number of observed markings in it. In the worst case, when each transition in the net system has a self-loop, i.e., the partition ( T E , T I ) is T E = T and T I = , the observed graph G has the same complexity as the basis reachability graph and the reachability graph, i.e., | M B | = | M O | = | R ( N , M 0 ) | . In plain words, the complexity of Algorithm 2 is exponential with respect to a plant. Despite in the aforementioned case that the computation of G shares the same complexity as a reachability graph and a BRG, there always exists a basis partition ( T E , T I ) with the implicit transition set not being empty such that G is as small as possible in size, i.e., | M O | | R ( N , M 0 ) | and more precisely | M B | | M O | | M B | + | D | , where | D | represents the number of dead markings. Such a partition can be found via offline simulation or decided by the sensor configuration of a real system.
Theorem 5. 
Given an LPN G = ( N , M 0 , E , ) and its observed graph G = ( M O , T r , Δ O , M 0 ) , if there is no dead marking in G , G is a deadlock-free net.
Proof. 
This is trivial. Suppose that the observed graph of G does not contain any dead observed markings. There is no marking in G that can be a deadlock state at which no transition is enabled, which completes the proof. □
Example 5. 
Consider again the Petri net system given by Figure 8. The set of deadlock markings is D = { M D 1 = [ 000002001 ] , M D 2 = [ 100001000 ] , M D 3 = [ 100010000 ] , M D 4 = [ 000001102 ] } . In Figure 10, we present the BRG composed of six markings. However, only one dead marking M b 3 = [ 001001001 ] exists in the BRG.
Using Algorithm 2, we construct the observed graph of the Petri net system. The resulting graph is shown in Figure 11, which contains eight markings. From M b 2 = [ 001010001 ] , the set of DIVS and DIMs are β = Ψ ( M b 2 ) = [ 100010000 | 001 ] . By steps (20–21), we add M D 1 = [ 100010000 ] to M D and ( M b 2 , ( , [ 001 ] ) , M D 1 ) to Δ D . However, M b 3 = [ 001001001 ] is defined as a dead basis marking (DBM). Since Y T ( M b 3 ) = , we tag M b 3 as an old node and execute step 2 to check the existence of a marking without a tag in M B . Considering Theorem 1, there is no need to check the safeness of the implicit reaches of M b 3 . Similar to M b 2 , at M b 5 we have β and its value is β = [ 000001102 | 010 ] . Thus, a new node M d 2 = [ 000001102 ] and a new relation ( M b 5 , ( , [ 010 ] ) , M d 2 ) will be added to M D and Δ D , respectively.
The proposed approach to deadlock characterization and analysis of labeled Petri nets can be algorithmically scheduled as follows. Given a labeled Petri net, we first construct its BRG provided that the T u o -induced subset is acyclic, leading to a basis partition ( T E , T I ) with T I = T u o and T E = T T I . Then, based on the BRG, a structure called an observed graph is constructed, which contains deadlock-related information, in which dangerous implicit markings and dangerous implicit vectors are full indicators associated with deadlocks. If there is no dead marking in the observed graph, we conclude that there is no deadlock in the original labeled Petri net.

7. Experimental Results

In this section, we will introduce the experimental results of this work. A flexible manufacturing system is used to illustrate the proposed deadlock characterization policy for labeled Petri nets. The Petri net model of the system shown in Figure 12 is a pure and bounded Petri net taken from [46].
In the net, there are 13 places { p 0 , , p 12 } and 10 transitions { t 0 , , t 9 } . Given the system partition π = ( T E , T I ) with T E = T o = { t 1 ( a ) , t 2 ( b ) , t 3 ( b ) , t 4 ( a ) , t 5 ( c ) , t 8 ( c ) } and T I = T u o = { t 0 ( ε ) , t 6 ( ε ) , t 7 ( ε ) , t 9 ( ε ) } and the initial marking M 0 = 2 p 0 + p 5 + p 6 + 2 p 7 + p 11 + p 12 , Figure 13 shows that the net has thirty-two reachable markings, twenty-eight of which are legal markings depicted in solid lines and four of which are deadlock ones depicted in dashed lines. The set of deadlock markings is D = { M D 1 = 2 p 0 + p 5 + p 6 + p 8 + p 9 , M D 2 = p 0 + p 2 + p 6 + p 8 + p 9 , M D 3 = p 2 + p 3 + p 8 + p 9 , M D 4 = p 0 + p 3 + p 5 + p 8 + p 9 } .
In Figure 14, we present the basis reachability graph of the net system. As the BRG shows, the number of basis markings is | M | = 11 . However, none of the dead markings appears in the BRG, i.e., for all M D , M M . We construct the observed graph with Algorithm 2. The number of markings is | M O | = 15 . We observe that | M | | M O | | R ( N , M 0 ) | and M M O R ( N , M 0 ) . From the marking M b 0 , we have β = [ 2000011011000 | 0 , 2 , 1 , 0 ] . Thus, the dead markings M d 0 is added to the observed graph since it represents a dangerous implicit reachable marking. In the same way as M b 1 , the computation of the set of DIVs and DIMs results in β = [ 1010001011000 | 0 , 2 , 1 , 0 ] and a new dead node M d 1 = [ 1010001011000 ] is added. From the marking M b 2 , we also have a dangerous implicit reach given by M d 2 = [ 1001010011000 ] thanks to β = [ 1001010011000 | 0 , 2 , 1 , 0 ] . Finally, from the marking M b 4 , β = [ 0011000011000 | 0 , 2 , 1 , 0 ] is obtained, and a dead observed marking M d 3 = [ 0011000011000 ] is added to the observed graph (see Figure 15).
From this example, it is found that a BRG fails to fully expose the dead markings in a labeled Petri net, while the proposed observed graph can capture the dead markings. The reason that a BRG is capable of addressing fault diagnosis of DESs seems obvious: A fault is usually treated as an unobservable transition since, otherwise, its occurrence can be immediately observed after it happens such that the BRG does not lose any useful information for diagnosability analysis. For deadlock characterization and analysis, a system may unobservably reach a deadlock state without any observational indicator, rendering that a BRG needs to be modified, and the observed graphs are developed in this research.

8. Conclusions and Future Work

This paper addresses the deadlock characterization and analysis in labeled Petri nets whose transitions can be unobservable and undistinguishable. In the first part of the paper, we show that the notion of BRG cannot correctly and accurately define and characterize the deadlock problem in an LPN. We propose a first algorithm to compute the max-cardinality of the implicit vector, which can fire from a given state of the system. After that, we introduce two sufficient conditions described by linear algebraic equations, which will be useful for constructing the observed graph. Then, we provide an algorithm for computing the observed graph. Finally, experimental results implemented using the C # tool confirmed the correctness and effectiveness of the proposed solution. To move forward, future research in this framework will focus on using observed graphs to ensure the deadlock-freeness and to study the liveness enforcement of systems modeled by labeled Petri nets.
It is also interesting to explore deadlock analysis and detection approaches for a DES that is subject to external malicious attacks. An attack can delete and replace a label in an observation in such a way that the observed graph established in this research is not real. To this end, a robust deadlock characterization and analysis method is needed.

Author Contributions

Conceptualization, Z.L. and A.Z.; methodology, A.Z.; software, A.Z.; formal analysis, Z.L.; writing—original draft preparation, A.Z.; writing—review and editing, Z.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

No new data were created or analyzed in this study.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
DESDiscrete-event system
LPNLabeled Petri net
BRGBasis reachability graph
DIMDangerous implicit marking
DIVDangerous implicit vector

References

  1. Cassandras, C.G.; Lafortune, S. Introduction to Discrete Event Systems, 2nd ed.; Springer: New York, NY, USA, 2008. [Google Scholar]
  2. Liang, Y.; Liu, G.Y.; El-Sherbeeny, A.M. Polynomial-time verification of decentralized fault pattern diagnosability for discrete-event systems. Mathematics 2023, 11, 3398. [Google Scholar] [CrossRef]
  3. Li, Y.Y.; Chen, Y.F.; Zhou, R. A set covering approach to design maximally permissive supervisors for flexible manufacturing systems. Mathematics 2024, 12, 1687. [Google Scholar] [CrossRef]
  4. Dou, H.; You, D.; Wang, S.G.; Zhou, M.C. Designing liveness-enforcing supervisors for manufacturing systems by using maximally good step graphs of Petri nets. IEEE Trans. Autom. Sci. Eng. 2024, 1–12. [Google Scholar] [CrossRef]
  5. Zhang, R.P.; Feng, Y.X.; Yang, Y.K.; Li, X.L.; Li, H.N. Polynomial-complexity deadlock avoidance policy for tasks offloading in satellite edge computing with data-dependent constraints and limited buffers. IEEE Trans. Aerosp. Electron. Syst. 2024, 60, 6822–6838. [Google Scholar] [CrossRef]
  6. Qi, H.D.; Wang, J.L.; Yan, C.G.; Jiang, C.J. The probabilistic liveness decision method of unbounded Petri nets based on machine learning. IEEE Trans. Syst. Man Cybern. Syst. 2024, 54, 1070–1081. [Google Scholar] [CrossRef]
  7. Zhang, L.; Holloway, L.E. Forbidden state avoidance in controlled Petri nets under partial observation. In Proceedings of the 33rd Allerton Conference on Communication, Control, and Computing, Monticello, IL, USA, 27–29 September 1995; pp. 146–155. [Google Scholar]
  8. Li, Y.; Wonham, W.M. Controllability and observability in the state-feedback control of discrete-event systems. In Proceedings of the 27th IEEE Conference on Decision and Control, Austin, TX, USA, 7–9 December 1989; pp. 203–208. [Google Scholar]
  9. Zhou, Y.; Hu, H.S.; Deng, G.L.; Cheng, K.; Lin, S.W.; Liu, Y.; Ding, Z.H. Distributed motion control for multiple mobile robots using discrete-event systems and model predictive control. IEEE Trans. Syst. Man Cybern. Syst. 2024, 54, 997–1010. [Google Scholar] [CrossRef]
  10. Basile, F.; Chiacchio, P.; Giua, A.; Seatzu, C. Deadlock recovery of Petri net models controlled using observers. In Proceedings of the 8th IEEE Conference on Emerging Technologies and Factory Automation, Antibes, France, 15–18 October 2001; pp. 441–449. [Google Scholar]
  11. Giua, A.; Seatzu, C. Deadlock characterization for Petri nets controlled using GMECs and observers. In Proceedings of the 2003 American Control Conference, Denver, CO, USA, 4–6 June 2003; pp. 320–325. [Google Scholar]
  12. Wonham, W.; Cai, K. Supervisory Control of Discrete-Event Systems; Springer: Cham, Switzerland, 2018. [Google Scholar]
  13. Li, Z.; Zhao, M. On controllability of dependent siphons for deadlock prevention in generalized Petri nets. IEEE Trans. Syst. Man Cybern. A Syst. Hum. 2008, 38, 369–384. [Google Scholar]
  14. Li, Z.; Zhang, J.; Zhao, M. Liveness-enforcing supervisor design for a class of generalised Petri net models of flexible manufacturing systems. IET Control Theory Appl. 2007, 1, 955–967. [Google Scholar] [CrossRef]
  15. Chen, Y.F.; Li, Z.W. On structural minimality of optimal supervisors for flexible manufacturing systems. Automatica 2012, 48, 2647–2656. [Google Scholar] [CrossRef]
  16. Ezpeleta, J.; Colom, J.M.; Martinez, J.A. A Petri net based deadlock prevention policy for flexible manufacturing systems. IEEE Trans. Robot. Autom. 1995, 11, 173–184. [Google Scholar] [CrossRef]
  17. Fanti, M.P.; Zhou, M.C. Deadlock control methods in automated manufacturing systems. IEEE Trans. Syst. Man Cybern. A Syst. Hum. 2004, 34, 5–22. [Google Scholar] [CrossRef]
  18. Lautenbach, K.; Ridder, H. The Linear Algebra of Deadlock Avoidance–A Petri Net Approach; Tech. Rep. No. 25–96; Institute of Software Technology, University of Koblenz-Landau: Koblenz, Germany, 1996. [Google Scholar]
  19. Wang, S.G.; You, D.; Wang, C.Y. Optimal supervisor synthesis for Petri nets with uncontrollable transitions: A bottom-Up algorithm. J. Inf. Sci. 2016, 363, 261–273. [Google Scholar] [CrossRef]
  20. Xing, K.Y.; Zhou, M.C.; Wang, F.; Liu, H.X.; Tian, F. Resource-transition circuits and siphons for deadlock control of automated manufacturing systems. IEEE Trans. Syst. Man Cybern. A Syst. Hum. 2011, 41, 74–84. [Google Scholar] [CrossRef]
  21. Ezpeleta, J.; Rcalde, L. A deadlock avoidance approach for non-sequential resource allocation systems. IEEE Trans. Syst. Man Cybern. A Syst. Hum. 2004, 34, 93–101. [Google Scholar] [CrossRef]
  22. Hsieh, F.S. Fault-tolerant deadlock avoidance algorithm for assembly processes. IEEE Trans. Syst. Man Cybern. A Syst. Hum. 2004, 34, 65–79. [Google Scholar] [CrossRef]
  23. Wu, N.Q.; Zhou, M.; Li, Z.W. Resource oriented Petri net for deadlock avoidance in flexible assembly systems. IEEE Trans. Syst. Man Cybern. A Syst. Hum. 2008, 38, 56–69. [Google Scholar]
  24. Wu, N.Q.; Zhou, M.C. Modeling, analysis and control of dual-arm cluster tools with residency rime constraint and activity time variation based on Petri nets. IEEE Trans. Autom. Sci. Eng. 2012, 9, 446–454. [Google Scholar]
  25. Wu, N.Q.; Zhou, M.C. Schedulability analysis and optimal scheduling of dual-arm cluster tools with residency time constraint and activity time Variation. IEEE Trans. Autom. Sci. Eng. 2012, 9, 203–209. [Google Scholar]
  26. Xing, K.Y.; Zhou, M.C.; Liu, H.X.; Tian, F. Optimal Petri-net-based polynomial-complexity deadlock-avoidance policies for automated manufacturing systems. IEEE Trans. Syst. Man Cybern. A Syst. Hum. 2009, 39, 188–199. [Google Scholar] [CrossRef]
  27. Dotoli, M.; Fanti, M.P. Deadlock detection and avoidance strategies for automated storage and retrieval systems. IEEE Trans. Syst. Man Cybern. C Appl. Rev. 2007, 37, 541–552. [Google Scholar] [CrossRef]
  28. Huang, Y.S.; Pan, Y.L.; Su, P.J. Transition-based deadlock detection and recovery policy for FMSs using graph technique. ACM Trans. Embed. Comput. Syst. 2013, 12, 11:1–11:13. [Google Scholar] [CrossRef]
  29. Kumaran, T.K.; Chang, W.; Cho, H.; Wysk, R.A. A structured approach to deadlock detection, avoidance and resolution in flexible manufacturing systems. Int. J. Prod. Res. 1994, 32, 2361–2379. [Google Scholar] [CrossRef]
  30. Wysk, R.A.; Yang, N.S.; Joshi, S. Resolution of deadlocks in flexible manufacturing systems: Avoidance and recovery approaches. J. Manuf. Syst. 1994, 13, 128–138. [Google Scholar] [CrossRef]
  31. Chen, Y.; Li, Z.W.; Al-Ahmari, A.; Wu, N.Q.; Qu, T. Deadlock recovery for flexible manufacturing systems modeled with Petri nets. J. Inf. Sci. 2017, 381, 290–303. [Google Scholar] [CrossRef]
  32. Giua, A.; Seatzu, C.; Basile, F. Observer-based state-feedback control of timed Petri nets with deadlock recovery. IEEE Trans. Autom. Control 2004, 49, 17–29. [Google Scholar] [CrossRef]
  33. Chen, F.; Barkaoui, K. Maximally permissive Petri net supervisors for flexible manufacturing systems with uncontrollable and unobservable transitions. Asian J. Control 2014, 16, 1646–1658. [Google Scholar] [CrossRef]
  34. Corona, D.; Giua, A.; Seatzu, C. Marking estimation of Petri nets with silent transitions. In Proceedings of the 43rd IEEE Conference on Decision and Control, Paradise Island, Bahamas, 14–17 December 2004; pp. 966–971. [Google Scholar]
  35. Ren, K.X.; Zhang, Z.P.; Xia, C.Y. Event-based fault diagnosis of networked discrete event systems. IEEE Trans. Circuits Syst. II Express Briefs 2022, 69, 1787–1791. [Google Scholar] [CrossRef]
  36. Murata, T. Petri nets: Properties, analysis, and applications. Proc. IEEE 1989, 77, 541–580. [Google Scholar] [CrossRef]
  37. Zaghdoud, A.; Li, Z. Preliminaries of Finite State Automata and Petri Nets. 2024. Available online: https://github.com/Zhiwuli/File/blob/main/Preliminaries_FSA_and_LPN.pdf (accessed on 1 September 2024).
  38. Peterson, J.L. Petri Net Theory and the Modelling of Systems; Prentice-Hall: Rutherford, NJ, USA, 1981. [Google Scholar]
  39. Cabasino, M.; Giua, A.; Seatzu, C. Fault detection for discrete event systems using Petri nets with unobservable transitions. Automatica 2010, 46, 1531–1539. [Google Scholar] [CrossRef]
  40. Cabasino, M.; Giua, A.; Pocci, M.; Seatzu, C. Discrete event diagnosis using labeled Petri nets: An application to manufacturing systems. Control Eng. Pract. 2011, 19, 989–1001. [Google Scholar] [CrossRef]
  41. Tong, Y.; Li, Z.W.; Seatzu, C.; Giua, A. Verification of state-based opacity using Petri nets. IEEE Trans. Autom. Control 2017, 62, 2823–2837. [Google Scholar] [CrossRef]
  42. Ma, Z.Y.; Tong, Y.; Li, Z.W.; Giua, A. Basis marking representation of Petri net reachability spaces and its application to the reachability problem. IEEE Trans. Autom. Control 2017, 62, 1078–1093. [Google Scholar] [CrossRef]
  43. Uzam, M.; Zhou, M.C. An improved iterative synthesis method for liveness enforcing supervisors of flexible manufacturing systems. Int. J. Prod. Res. 2006, 44, 1987–2030. [Google Scholar] [CrossRef]
  44. Chen, Y.; Li, Z.W.; Barkaoui, K. Maximally permissive Petri net supervisors with a novel structure. In Proceedings of the 12th IFAC/IEEE International Workshop on Discrete Event Systems, Cachan, France, 14–16 May 2014; pp. 80–85. [Google Scholar]
  45. Chen, Y.F.; Li, Z.W.; Al-Ahmari, A. Nonpure Petri net supervisors for optimal deadlock control of flexible manufacturing systems. IEEE Trans. Syst. Man Cybern. Syst. 2013, 43, 252–265. [Google Scholar] [CrossRef]
  46. Zhang, X.; Uzam, M. Transition-based deadlock control policy using reachability graph for flexible manufacturing systems. Adv. Mech. Eng. 2016, 8, 1–9. [Google Scholar] [CrossRef]
Figure 1. A labeled Petri net.
Figure 1. A labeled Petri net.
Mathematics 12 03523 g001
Figure 2. Partitioned reachability graph of an LPN.
Figure 2. Partitioned reachability graph of an LPN.
Mathematics 12 03523 g002
Figure 3. A labeled Petri net.
Figure 3. A labeled Petri net.
Mathematics 12 03523 g003
Figure 4. Reachability graph of the LPN in Figure 3.
Figure 4. Reachability graph of the LPN in Figure 3.
Mathematics 12 03523 g004
Figure 5. The BRG of the LPN in Figure 3.
Figure 5. The BRG of the LPN in Figure 3.
Mathematics 12 03523 g005
Figure 6. RG of the LPN in Figure 1.
Figure 6. RG of the LPN in Figure 1.
Mathematics 12 03523 g006
Figure 7. BRG of the LPN in Figure 1.
Figure 7. BRG of the LPN in Figure 1.
Mathematics 12 03523 g007
Figure 8. A labeled Petri net.
Figure 8. A labeled Petri net.
Mathematics 12 03523 g008
Figure 9. Reachability graph of an LPN.
Figure 9. Reachability graph of an LPN.
Mathematics 12 03523 g009
Figure 10. BRG of the LPN in Example 2.
Figure 10. BRG of the LPN in Example 2.
Mathematics 12 03523 g010
Figure 11. Observed graph of the LPN in Example 2.
Figure 11. Observed graph of the LPN in Example 2.
Mathematics 12 03523 g011
Figure 12. Labeled Petri net of Example 3.
Figure 12. Labeled Petri net of Example 3.
Mathematics 12 03523 g012
Figure 13. Reachability graph of the LPN in Example 3.
Figure 13. Reachability graph of the LPN in Example 3.
Mathematics 12 03523 g013
Figure 14. BRG of the LPN in Example 3.
Figure 14. BRG of the LPN in Example 3.
Mathematics 12 03523 g014
Figure 15. Observed graph of the LPN in Example 3.
Figure 15. Observed graph of the LPN in Example 3.
Mathematics 12 03523 g015
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zaghdoud, A.; Li, Z. On Deadlock Analysis and Characterization of Labeled Petri Nets with Undistinguishable and Unobservable Transitions. Mathematics 2024, 12, 3523. https://doi.org/10.3390/math12223523

AMA Style

Zaghdoud A, Li Z. On Deadlock Analysis and Characterization of Labeled Petri Nets with Undistinguishable and Unobservable Transitions. Mathematics. 2024; 12(22):3523. https://doi.org/10.3390/math12223523

Chicago/Turabian Style

Zaghdoud, Amal, and Zhiwu Li. 2024. "On Deadlock Analysis and Characterization of Labeled Petri Nets with Undistinguishable and Unobservable Transitions" Mathematics 12, no. 22: 3523. https://doi.org/10.3390/math12223523

APA Style

Zaghdoud, A., & Li, Z. (2024). On Deadlock Analysis and Characterization of Labeled Petri Nets with Undistinguishable and Unobservable Transitions. Mathematics, 12(22), 3523. https://doi.org/10.3390/math12223523

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop