Fault Diagnosis for Discrete Event Systems Using Partially Observed Petri Nets

)is study proposes a fault diagnosis method of discrete event systems on the basis of a Petri net model with partially observable transitions. Assume that the structure of the Petri net model and the initial marking are known, and the faults can be modeled by its unobservable transitions. One of the contributions of this work is the use of the structure information of Petri net to construct an online fault diagnoser which can describe the system behavior of normal or potential faults. By modeling the flow of tokens in particular places that contain fault information, the variation of tokens in these places may be calculated.)e outputs and inputs of these places are determined to be enabled or not through analyzing some special structures. With the structure information, traversing all the states is not required. Furthermore, the computational complexity of the polynomial allows the model to meet real-time requirements. Another contribution of this work is to simplify the subnet model ahead of conducting the diagnostic process with the use of reduction rules. By removing some nodes that do not contain the necessary diagnostic information, the memory cost can be reduced.


Introduction
Fault diagnosis is a critical issue in most industrial systems when preserving the safety of equipment and human operators. is issue has been studied in numerous studies that concern discrete event systems [1][2][3][4][5][6]. Once a fault has been detected and identified, the control law needs to be modified to safely advance the operations. A discrete event system (DES) is a dynamic system which is driven by events. When a signal of a sensor or a movement of an executive device in the system is detected, the state of DES can be transformed automatically. Nowadays, DESs exist in so many intelligent systems including robot system, manufacturing system, and transportation system.
In some previous literature, the fault diagnosis of DESs is discussed by several approaches based on models [7][8][9][10], such as automata models, which usually lead to constructing a diagnoser automaton. Moreover, the diagnoser can be applied to analyze some diagnosable properties of systems, i.e., to check whether detecting the occurrences of unobservable events associated with faults is possible by observing words with finite lengths.
Although automata models are suitable for describing DESs, the size of the system would limit their application. e models explicitly determine all possible states and thus would result in some quite large models when the size of the systems grows. To avoid enumerating system states and the consequent enlargement of states, Petri nets are exploited to address fault diagnosis given their merits of graphical structure. Most of the recent studies on fault diagnosis are based on the analysis of Petri net reachability graph [11][12][13][14], the direct properties of Petri nets [15,16], and structural analysis of Petri nets [17,18].
Given that the approach proposed in the present work is based on Petri nets, the past related studies are briefly recalled. Giua and Seatzu [19] presented a diagnostic approach to avoid the exhaustive enumeration of DES states and introduced basis marking and justifications, in which the markings consistent with actual observations are characterized and the set of unobservable transitions that enables the characterizations are established. Cabasino et al. [20] developed similar approaches, such as the modified basis reachability graph and the basis reachability diagnoser, to compress the construction of a state space of bounded Petri nets. Basile et al. [21] forwarded an approach for checking K-diagnosability with the use of the technique of the integer linear programming. Liu et al. [22] proposed a technique called an on-the-fly incremental diagnostic. It can be applied to analyze both the diagnosability and K-diagnosability of bounded and also live Petri nets. Ben et al. [23] used T-invariants to define the priorities of branch investigation and rapidly determine the existence of an indeterminate cycle. Hadjicostis and Verghese [24] introduced system redundancy to detect and then isolate the fault markings. Prock [25] proposed an online technique for fault diagnosis. It can monitor the number of tokens within the P-invariants. If the total number of tokens within P-invariants is changed, then the error can be detected. Ru et al. [26] presented a method to address DESs by conducting the partial observation of states and events on the basis of the transformation of partially observed Petri nets into labeled Petri nets. Dotoli et al. [12] presented an algorithm based on the definition and solution of integer linear programming problems. e algorithm was used to characterize the fault-behavior properties needed by the system to reduce online computational effort. Fabre et al. [27] proposed a net-unfolding approach to design an online asynchronous diagnoser that can avoid state explosion. However, the online computational effort of the proposed approach is high because of the online construction of the Petri net structure by means of the unfolding.
It is easy to figure out that most of the previous methods cannot avoid the state explosion problem. e computational complexities of the proposed algorithms are exponential, and they are not suitable for online use with large intelligent systems.
For avoiding the state explosion problem, an online fault diagnosis strategy is proposed in this paper on the basis of the structure information of partially observed Petri nets. A number of reduction rules are adopted to simplify the construction of special structures without having to change the diagnosability property of the system. More precisely, assuming that the structure of the Petri net model and the initial marking are known, the faults can be modeled by their unobservable transitions. Furthermore, any additional unobservable transition may be associated with system legal behavior. en, an algorithm decides whether the system behavior is normal or has potential faults when observed sequences occur, and special paths are defined to depict the structure information of Petri nets. Furthermore, subnets that contain fault information are constructed to describe the flow situation of the tokens. Based on these tokens, some of the inputs or outputs of particular places, which are the inputs or outputs of fault transitions, are considered for enabling. Finally, the fault diagnoser determines the inherent fault behavior. e main advantages of the present work are as follows. Compared with the work of Fabre et al. [27], our algorithm does not require offline calculations using the structure information of Petri nets. Our method is also more likely applicable than that of Fabre et al. [27] for minimizing memory cost with the reduction rules. e diagnostic algorithm in this paper is with great advantage for avoiding the state explosion especially when looking for a reasonably efficient method for online use with large intelligent systems. e remainder of the paper is structured as follows. Section 2 provides the basic definitions and notations. Section 3 presents the special structures used to describe the inherent fault information and the reduction rules applied to simplify the model. Section 3.5 specifies the algorithm for online fault diagnosis and proposes the fault diagnoser. Section 4 gives an example of an intelligent warehouse center to verify the algorithm. Section 5 draws the conclusions.

Preliminaries
is section introduces the basic characteristics of Petri nets. For the detailed discussion on Petri nets, refer to [28].

Basic Petri Net Notations
Definition 1. A Petri net is a structure that can be described as N � (P, T, Pre, Post), where (i) P is the finite set of places (ii) T is the finite set of transitions, and P ∩ T � ∅ (iii) Pre: where N is the set of natural numbers (iv) Post: T × P ⟶ N is the post-incidence function, where N is the set of natural numbers e symbol • p( • t) is used for the pre-set of place p ∈ P (transition t ∈ T) and p • ( • t) is used for the post-set of place p ∈ P (transition t ∈ T), respectively; e.g., t • � p ∈ P | Pre A firing sequence from M is a sequence of transitions σ � t 1 t 2 · · · t k , such that M[t 1 〉M 1 [t 2 〉M 2 · · · [t k 〉M k , which is denoted as M[σ〉M k . T * is a set of all sequences in a Petri net. An enabled sequence σ is denoted as M[σ〉, while t i ∈ σ implies that transition t i belongs to sequence σ. If and only if there exists a sequence σ and it satisfies M 0 [σ〉M ′ , then we can say the marking M ′ is reachable from the initial marking Set T can be partitioned into disjointed sets of observable transitions (represented by filled sticks) and unobservable transitions (represented by empty sticks) referred to as T o and T uo , respectively. An observed sequence is ω � t 1 t 2 · · · t k , where t 1 , t 2 , . . . , t k ∈ T o . In this paper, the fault events t f ∈ T f are supposed to be unobservable, i.e., T f ⊆T uo .
Definition 2 (see [26]). A partially observed Petri net G is a 3-tuple (N, P o , T o ), where (i) N is a Petri net with n places and m transitions (ii) P o is the set of observable places with In this paper, we assume the set P o � ∅, which means all the places are unobserved.

Subnets and Projections.
In this part we present the definitions of subnets and projections.

and Pre ′ and
Post ′ are the restrictions of Pre and Post to P ′ and T ′ , respectively.
Definition 4 (see [30]). Given a Petri net N, a path is an oriented sequence which is alternately comprised of the nodes of the Petri net N, denoted as π.
Consider a subnet N ′ and a path π in a Petri net. π is outside of N ′ if and only if all nodes of π do not belong to N ′ , denoted as π ≠ ≪ N ′ .
Definition 5. Given a set of transitions R and a sequence σ in a Petri net, ρ(σ, R) is the projection of transitions in σ on R.

Basic Assumptions.
In this part, some assumptions exploited in this study are presented in advance.

Assumption 2.
e Petri net N that models the DES and the initial marking m 0 are known. Assumption 3. Once a fault occurs, the system would remain to be faulty infinitely. en, we call these faults permanent.
Assumption 1 is commonly adopted in the field of fault diagnosis of Petri net models, whereas Assumptions 2 and 3 correspond to levels of system knowledge.

Special Structures and Reduction Rules
In this section, we focus on some special structures of Petri net and its reduction rules.

Special Structures
Definition 6. Given a place p and a path in a Petri net model, this path is defined as an observable path of this place p, denoted as π p , if it satisfies the following: (i) Its beginning node (or end node) is place p and its end node (or beginning node) is an observable transition (ii) e rest of its transitions are unobservable Definition 7. Given a place p in a Petri net N, if π p exists, an observed subnet of place p is denoted as SN p which is only comprised of all π p .
Consider a partially observed Petri net N and a place p. Assume that the number of nodes in N is |m + n| and the number of nodes in SN p is |r|. Obviously |r| ≤ |m + n| and the computational complexity of constructing SN p is polynomial.
Definition 8. Given a place p in a Petri net N, a SN p is defined as a diagnosable subnet of place p, denoted as DSN p , if it satisfies the following: (i) Any places inside SN p cannot be connected to any transitions outside SN p (ii) Any unobservable transitions inside SN p cannot be the inputs of any places outside SN p Example 2. e yellow path p 4 ε 3 p 3 t 2 is an observable path of place p 1 , namely, π p 1 , as shown in Figure 1. Figure 2 is an observed subnet of place p 4 , namely, SN p 4 . It is also a DSN p 4 .
For a fault transition t f , its inputs and outputs are • t f and t Place p 4 is the output of fault f 1 and Figure 3 is a fault-diagnosable subnet FDSN p 4 .

Reduction
Rules. e basic structures of Petri nets are and-joint, and-split, or-joint, or-split, loop, and sequence, as shown in Figure 4. Some reduction rules based on these structures were already proposed in [31,32]. However, in the rule (i) in [31,32], the authors did not consider the inherent fault information on the unobservable transition, and the rules (ii) and (iii) are not mentioned.
However, not all rules can preserve the diagnosability property. To overcome this limitation, a few other simple rules are proposed as shown in Figure 5. (Figure 5(a)). If there exists a transition between two places that is normal and unobservable, and it has one input and output, then this transition can be omitted and two places can be merged into a new place for reducing the number of nodes in the net. e marking of the new place is the sum of the markings of two previous places. Figure 5(b)). If there are several transitions with the same one input and output, and they are all normal and unobservable, then these transitions can be merged into one transition that is normal and unobservable. e new initial marking stays the same. Figure 5(c)). If there are several places with the same one input and output, then these places can be merged into one place. e marking of this place is the minimal of the several ones.

Fusion of Places in Parallel (
Example 5. As shown in Figure 3, FDSN p 4 and f 2 are a fault transition that contains fault information. By using reduction rule i), places p 7 and p 2 are merged and transition ε 3 can be suppressed. us, transition f 2 cannot be reduced because it contains fault information. e reduced model is shown in Figure 6. Theorem 1. With the use of the above reduction rules, the diagnosability of the reduced Petri net is consistent with that of the initial version. Figure 1: A partially observed Petri net. Figure 2: An observed subnet of place p 4 .  Proof. If the initial Petri net is not diagnosable, then the two sequences of σ 1 and σ 2 exist with the same observation. Furthermore, faults exist in σ 2 but not in σ 1 . After the fault occurs, σ 2 can be arbitrarily long. Let a regular and also unobservable transition ε be contained in σ 1 (σ 2 ), and this transition ε can be removed with the use of some previous reduction rules. e observation of this reduced sequence σ * 1 (σ * 2 ) is retained even removing the transition ε. erefore, the system is still not diagnosable.
If the initial Petri net is diagnosable, then no two sequences of σ 1 and σ 2 exist with the same observation. Furthermore, faults exist in σ 2 but not in σ 1 . After the fault occurs, σ 2 can be arbitrarily long. Let a regular and also unobservable transition ε be contained in σ 1 (σ 2 ), and this transition ε can be removed with the use of some previous reduction rules. e observation of this reduced sequence σ * 1 (σ * 2 ) is retained (i.e., not observable). erefore, the system is still diagnosable.

Level Functions
Definition 13. Given two transitions t 1 and t 2 in a Petri net system, if • t 1 � t • 2 , transition t 1 is called the up-transition of t 2 , and transition t 2 is called the down-transition of t 1 .
Definition 14. Given a path π p , if its end node is place p, this path is called the up-observable path of p, denoted as π p u .
Definition 15. Given a path π p , if its beginning node is p, this path is called the down-observable path of p, denoted as π p d . With the reduction rules, several unobservable transitions without fault information may be reduced. However, some unobservable transitions cannot be reduced. In reduction rule (i), if transition ε contains fault information, then places p i and p j cannot be merged. us reduction rule (i) needs to be modified. If p i is the output or input of a fault transition, then the new marking in the reduced model is M(p i ) � M(p j ) and M(p j ) � 0. If p j is the output or input of the fault transition, then the new  Definition 18. Given a FDSN p And t ′ is the up-transition of t.
And t ′ is the up-transition of t.
Definition 20. Given a FDSN p And t ′ is the down-transition of t.
And t ′ is the down-transition of t. Based on Definitions 13 to 21, the transitions in FDSN p can therefore be classified.

Maximal Number of Flow-In and Minimal Number of Flow-Out
Definition 22 (see [19]). Given an observed sequence ω in a Petri net, set   Proof.
e or-split structure comprises a single place p and multiple outputs. When the number of tokens in place p is known, we cannot know with certainty the exact times in which each output is fired, which means that the number of tokens that flow into other places cannot be calculated. Furthermore, because of the uncertain number of tokens in FDSN p  Proof.
e or-joint structure comprises a single place p and multiple inputs. When the number of tokens in place p is known, we cannot know with certainty the exact times in which each input is fired, which means that the number of tokens that flow out of other places cannot be calculated. Furthermore, because of the uncertain number of tokens in FDSN p → f , the minimal number of the flow-out cannot be calculated.

Corollary 3. Given a fault transition t f and an observed sequence ω in a FDSN
For each observed sequence ω, the following sets hold: (i) For Δ(ω, t f ) � 0, the behavior of the system is normal during the observed sequence ω (ii) For Δ(ω, t f ) � 1, the behavior is ambiguous (iii) For Δ(ω, t f ) � 2, the behavior of the system is faulty at the observed sequence ω  (8) if transition t is enabled with the marking M then (9) let M � M + C(·, t), go to 8 (10) else (11) let Mathematical Problems in Engineering 7 (9) for t ∈ ω′′, and t is the first transition of ω′′ do (10) if t is enabled at M then (11) let M � M + C(·, t) (12) else (13) if i � 1 then (14) go to 23 (15) else (16) let (25) if t is enabled at M, q � q + 1 then (26) let M � M + C(·, t), go to 6 (27) else (28) let if t is enabled at M then (34) let M � M + C(·, t), go to 6 (35) else  Table 1.
With the use of reduction rule (i), the diagnosable subnet of this model can be derived as shown in Figure 11. e input of fault transition f 1 is place P 9 , and the output is P 10 . e input of fault transition f 2 is place P 1 , and the output is P 2 .
We simulate some more sequences with Algorithm 3, and partially, details of the situations are listed in Tables 2  and 3. e structure of the Petri net is much simpler than that of the method using the reachability graph, as shown in Figure 11. e number of state markings (polynomial) is also decreased. By considering another method with basis markings, if the observable string is T 2 T 4 , then the possible occurring sequences are T 1 T 2 T 3 T 4 , T 1 T 2 T 3 T 4 T 5 , T 7 T 1 T 2 T 3 T 4 , and T 7 T 1 T 2 T 3 T 4 T 5 , the results of which are the same as our method. In the basis marking method, the larger the structure of the Petri net is, the higher the occurring sequences will be, which leads to a more complex computation.
is limitation is avoided effectively in the present Input: Petri net system, the fault transition t f , an observed sequence ω Output: Δ(ω, t f ) Figure 9: e sorting operation of an AGV.
work because not all of the possible occurring sequences are collected; i.e., we only focus on the inputs and outputs of the fault transitions and calculate the number of tokens that flow in or out. Consequently, we can diagnose the faulty behavior in the polynomial level.

Conclusions and Future Work
is work addresses the problem of fault diagnosis of DESs and proposes an online diagnoser on the basis of the partially observed Petri net. e online computation is formulated on a net structure and applied with reduction rules. e method involves an observed sequence of system events, which then   AGV is available to take a new part P 9 − P 10 Switch sw 1 (resp., sw 2 ) is activated P 11 − P 12 Output buffers B 1 -B 2 T 2 − T 7 Operations in area A 2 -A 7 are over T 8 − T 9 AGV exits the loading station with a part of type 1 (resp., 2) T 10 − T 11 A part exits the system and is stored in buffer B 1 (resp., B 2 ) T 1 Fault f 2 : AGV exits the loading station without any part T 12 Fault f 1 : a part of type 1 activates the switch sw 2   ω Φ(P 9 , ω) Φ(P 10 , ω) Δ(ω, f 1 ) is used as basis for deciding online whether the system behavior is normal, faulty, or uncertain. To achieve the goals, the maximal number of flow-in and the minimal number of flow-out are introduced. By calculating the maximal and minimal numbers for some reduced subnets, the maximal retention number of places p → f and p ← f can be obtained, which means that the number of tokens in places p → f and p ← f can be determined after an observed sequence is fired. Subsequently, the fault transition is enabled (or not). e entire process is formulated using the appropriate reduced subnets with fault information, and it permits to reduce the computational effort to solve the fault diagnosis problem at the price of a small memory increase, which meets the realtime requirement. Several directions are considered in our future work. First, we want to explore additional reduction rules for the fault diagnosis problem of DESs. In such a case, the structure of the Petri net can be further elaborated. In addition, we plan to explain in detail the relationship between transitions and places given the above special structure. Finally, we will likely extend the proposed method to labeled Petri nets in the nondeterminism context.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.