This paper addresses the fault diagnosis problem of PLC-based systems that can be modeled as Petri nets under a certain level of abstraction. The existing Petri-net-based fault diagnosis approaches often associate transitions and/or places with sensors and require that any change in sensor readings needs to be treated by a PLC, leading to a situation that the PLC would be too busy processing the changes in sensor readings to perform other tasks. This paper assumes that a PLC does not monitor the changes of readings of sensors all the time, but periodically reads the values of sensors when needed. The system output is defined as a marking sequence interleaved with possible observed transitions. A fault diagnosis algorithm is developed by defining and solving integer linear programing (ILP) problems whose size is regardless of the length of the system output. The proposed approach enjoys high computational efficiency compared with other ILP-based approaches and is more suitable for fault diagnosis of PLC-based systems with low computing power.
The rapid development of electronic technology has made the computer-integrated systems, which can be abstracted as discrete event systems (DESs),1 more and more complex, structurally and functionally. Fault diagnosis aims to ensure the safe and stable operation of these systems by detecting and isolating faults as soon as possible (In this paper, “failure” and “fault” have the same meaning and we use them interchangeably. However, they may have slightly different meanings in some publications). More specifically, fault diagnosis requires to complete three tasks: fault detection, fault isolation, and fault identification, corresponding to determining if a system is running normally, revealing the locations and numbers of faults, and identifying the specific nature of faults, respectively.2–5
In real industrial systems, the control of a system can often be implemented by a programmable logic controller (PLC). In general, a PLC consists of a central processing unit, a storage unit, and an input-output unit, and can receive, send and process various electronic signals. A PLC is connected to the sensors distributed on the components of a system such that it can collect the control parameters of the system by reading these sensors. Many existing fault diagnosis approaches in the literature can be implemented with PLCs.
In the domain of DESs, many existing fault diagnosis approaches have two main disadvantages: (i) a number of approaches6–9 have exponential computational complexity in the worst case and their computational cost may be prohibitive for large systems and (ii) some approaches10–12 require that any change in sensor readings needs to be treated by a PLC such that the PLC would be too busy processing the changes in sensor readings to perform other tasks.
To overcome these disadvantages, we propose a fault diagnosis approach which equips a system with more sensors and reads sensors at a fixed time interval. The proposed approach has higher computational efficiency and is more appropriate for use in real-world systems with low computing power. On the other hand, the main drawback of the proposed approach is the higher cost of purchasing sensors and the higher difficulty of deploying them.
Differently from the Petri-net-based approach proposed in this paper, some other approaches based on structural analysis13,14 or fault trees15,16 are also exposed. In contrast to actively detect and isolate faults in this paper, the stability property of a system is explored in Foroozanfar et al.17 and Lutz-Ley and Lopez-Mellado.18 A stable system can automatically return to a normal state from a fault state in finite number of steps. Before presenting the details of the proposed approach, we review some typical publications on fault diagnosis of DES.
Some original theoretical results for fault diagnosis are exposed based on automata. In Sampath et al.,6 a plant is modeled as an automaton in which faults are represented by unobservable events and each observable event is associated with a sensor. A diagnoser for fault diagnosis is constructed offline by an algorithm with exponential complexity. When an event is observed, by inspecting the diagnoser, the fault state of the plant may be one of three cases: faults do not occur, faults may have occurred, and faults must have occurred. This fault diagnosis approach is applied to a realistic HVAC system in Sampath et al.19
In contrast to automaton models, Petri nets, as a typical mathematical model of DESs, have been widely used in supervisory control,20–23 performance optimization,24–26 and model identification10,11,27,28 because of their intrinsic distributed features and efficiency in handling large systems. Simultaneously, in recent decades, many fault diagnosis approaches based on Petri nets have also been reported, which can be generally categorized into two classes.
In the first class, the sensors are equipped with observable transitions and the output of a system is defined as a sequence of observable transitions. Integer linear programing (ILP) problems often need to be built and solved for performing fault diagnosis. In Dotoli et al.,7 an online fault diagnosis approach is reported that builds an ILP problem based on the observed transition sequence. By assigning two different objective functions to the ILP problem and solving it, whether a fault has occurred can be determined. This approach is extended to the case of labeled Petri net in Fanti et al.8 and Zhu et al.29
Basile et al.30 deal with the fault diagnosis problem by means of the notion of generalized markings, that is, markings in which the number of tokens can be a negative integer. By solving an ILP problem built according to the negative elements of a generalized marking, the occurrence of a fault can be deduced. Wang et al.31 employ generalized markings to backward conflict-free Petri nets and propose a more efficient fault diagnosis approach by constructing an ILP problem with smaller size.
In Giua and Seatzu,32 the notion of basis markings is first defined and a fault diagnosis approach based on basis markings is proposed. Given an observed transition sequence, the corresponding basis markings are computed by an algorithm using only algebraic manipulations. The diagnosis result of a fault is obtained by checking the basis markings and, if necessary, solving some ILP problems. The notion of basis markings is further extended to basis reachability graphs in Cabasino et al.9,33 where a basis reachability graph is first constructed offline and then an online diagnosis algorithm is developed by inspecting the basis reachability graph at each step.
In the second class, the sensors are equipped with observable transitions as well as certain places of a Petri net. The system dynamic is represented as an observable transition sequence or a transition-marking sequence. In Zhu et al.,10,11 faults are described by unobservable transitions not contained in the initial net model of a plant and the output of a system is defined as an observed evolution, that is, a transition-marking sequence. By solving an ILP problem constructed based on the observed evolution, the unobservable transitions are identified that characterize the number and locations of faults.
Ru and Hadjicostis12 model systems as partially observed Petri nets (i.e. nets equipped with transition and place sensors) and define the system output as an ordered sequence of three tuples ’s, where and are two markings and is a transition. After transforming the partially observed Petri net into a labeled net, they propose an online fault diagnosis algorithm based on reachability graph analysis of the unobservable subnet of the labeled net. The study in Lefebvre34 also utilizes partially observed Petri nets and provides an efficient fault diagnosis algorithm by solving a number of linear matrix inequalities. The number of times of solving inequalities is linear in the length of an observed sequence.
In Ramirez-Trevino et al.,35 a bottom-up modeling methodology is explored to build an interpreted Petri net (IPN) model of a system. By dividing the set of places into a subset of places modeling fault states and a subset of places modeling normal states, the diagnosability of the built IPN is formally defined and a scheme for detecting and locating fault states is developed. By assuming that all places are observable, Genc and Lafortune36 extend the diagnoser approach based on automata in Sampath et al.6 to the context of Petri nets. A Petri net diagnoser is constructed to perform online diagnosis. This approach is of high computational complexity since the marking enumeration upon observing an transition at each step is needed.
The study in Pencole and Subias37 explores the diagnosability of safe labeled time Petri nets based on the notion of event patterns. An efficient approach of determining diagnosability of a safe Petri net is reported by means of model-checking techniques. Al-Ajeli and Parker propose a fault diagnosis approach for labeled Petri nets based on Fourier-Motzkin elimination. A diagnoser in the form of sets of inequalities is first constructed offline and then online fault diagnosis is performed by checking the constructed diagnoser when observing an event. This approach provides a better trade-off between the size of the diagnoser and diagnosis time. In recent years, some extended versions of fault diagnosis are studied, such as robust diagnosis,38 diagnosability enforcement,39 and synchronous diagnosis.40,41 Two comprehensive surveys on fault diagnosis can be found in Al-Ajeli and Parker42 and Lafortune et al.43
Contributions
As already mentioned above, the first class of fault diagnosis approaches often needs to solve ILP problems whose size is linear or polynomial with respect to the length of the observed sequence. When the observed sequence is very long, these approaches become computationally prohibitive. On the other hand, the second class of approaches generally assumes that all or part of places are observable, that is, these places are equipped with sensors. Moreover, the approaches in the second class usually require that any change in the readings of place sensors needs to be treated by a PLC. A Petri net model of a real-world system may include a large number of places and there are a deluge of changes of sensor readings during the operation of the system. The PLC would be too busy processing the changes in sensor readings to perform other tasks. Consequently, in some cases, the existing fault diagnosis approaches are not applicable to real-world systems.
In this paper, we assume that part of transitions and all places are equipped with sensors. In addition, due to the limited processing power of a PLC, we assume that it does not monitor the changes of readings of place sensors all the time, but periodically reads the values of the sensors when needed. The system output is defined as a marking sequence interleaved with possible observed transitions.
Based on the observed system output, a fault diagnosis algorithm is developed by defining and solving ILP problems whose size is regardless of the length of the system output. Thus, the computational cost of the algorithm will not increase with the increase of the length of the system output. Namely, the algorithm enjoys a high computational efficiency for those systems that satisfy the assumptions made in this paper. On the other hand, since the PLC only requires to read place sensors once in a time period and does not monitor the changes of sensor-readings all the time, the proposed algorithm is more suitable for fault diagnosis of some PLC-based systems.
This paper is organized as follows. In Section 2, some basic definitions on Petri net are provided. In Section 3, the problem to be addressed is formally defined and a solution to the problem is reported in Section 4. In Section 5, we extend the fault diagnosis algorithm for Petri nets to the case of labeled Petri nets. To show the effectiveness of the proposed approach, in Section 6, we apply the approach to a case study example. Finally, a conclusion is drawn in Section 7.
Basic definitions
In this section, we introduce the definitions and notations used throughout the paper. For the complete details of Petri nets, the reader is referred to Giua and Silva44 and Murata.45
A Petri net is a bipartite graph represented as a four-tuple , where is a set of places, is a set of transitions with and , ( is the set of non-negative integers) and are two functions represented as two matrices, which specify the arcs of the graph. We denote by the incidence matrix of net . The sets of input places and of output places of a transition are denoted by and , respectively. Similarly, for a place , we define and .
A marking of a Petri net is a mapping . The number of tokens in a place at a marking is represented by . A marking is written as (the items whose coefficients are zero are omitted) for simplicity. By associating a Petri net with an initial marking , a Petri net system is defined.
A transition is said to be enabled at marking denoted by if the number of tokens in each input place of is greater or equal to the weight of the corresponding arc, that is, for all With a slight abuse of notation, we use to denote that a transition sequence is enabled at marking A marking is reachable from after firing , denoted by . In addition, is computed by the state equation of a net
where is a function, defined by , which computes the Parikh vector of a transition sequence . If a transition is in , we write for simplicity.
The set of transition sequences that are enabled at the initial marking is defined as
The reachability set, represented as , of a net system contains all markings that are reachable from by firing a transition sequences that is,
A transition is said to be observable if it is equipped with a sensor that monitors its firing; otherwise, it is called unobservable. We denote by and the set of observable transitions and the set of unobservable transitions, respectively. In addition, the cardinalities of and are represented as and , respectively. Thus, the set of transitions is partitioned into two disjoint subsets and with . A place of a Petri net is said to be measurable if the number of tokens residing into it can be detected by a sensor. In this paper, we assume that all places of a Petri net are measurable. A Petri net is said to be acyclic if it does not contain any directed cycle.
Theorem 1.45A markingis reachable fromin an acyclic Petri net systemif and only if there exists a column vectorsuch that, where and are the numbers of places and transitions, respectively.
Definition 1.Given a Petri netand a transition subset, the-induced subnet of is defined as , where and are the restrictions ofandonrespectively.
According to Def. 1, it is straightforward to obtain the -induced subnet of , denoted by . We also call the -induced subnet the unobservable subnet of . The incidence matrix of is represented by . Unless otherwise stated, the unobservable subnet of the considered Petri nets in this paper is assumed to be acyclic.
To characterize failures in a real-world system, the unobservable transitions in are further divided into regular unobservable transitions, denoted by , and fault transitions, denoted by , that is, and . The fault transition set is partitioned into fault classes, that is, , and the partition is represented as . For simplicity, we say that occurs if a fault takes place in a system. Given a sequence , we use to denote that is contained in and to denote that there exists at least a transition such that .
A Petri net system with a labeling function is called a labeled Petri net (LPN) system, denoted by , where is an alphabet and represents the empty string. The label of the empty string is itself, that is, . The set of transitions that have the same label is denoted by . The labeling function is extended to a transition sequence with being its length by defining . We obtain the underlying Petri net of an LPN by removing all labels of transitions of the LPN.
Problem definition
In general, faults in a system can be divided into three types: incipient, intermittent, and permanent. The approach proposed in this paper is based on Petri nets (a typical discrete event model) and are appropriate for faults that cause a distinct change in the state of system components but do not necessarily bring the system to a halt. Thus, the proposed approach can be used to detect intermittent or permanent faults. These faults may originate from different system components, such as sensors, actuators, or controllers.
The problem of fault diagnosis consists in determining whether faults have occurred according to the behavior of a system. In general, the behavior of a system is described by its output, that is, sensor-readings at each step during the system evolution.
This paper deals with the fault diagnosis problem of PLC-based Petri nets. Though all places of the considered net are measurable, we assume that a PLC does not monitor the changes of readings of place sensors all the time due to the limited processing power of the PLC. To define the output of a Petri net system, the following assumptions hold for the systems under consideration:
(A1) Reading place sensors and firing any transition can be done instantly.
(A2) Place sensors are read once in time units.
In a real PLC-controlled system, reading sensors is usually implemented by a hardware interrupt and performing an action (i.e. firing a transition) is usually carried out by a callback function of programing languages. In this way, the controller of the system can know if the operation of reading sensors or performing an action is successful and obtain the corresponding sensor data if the answer is positive. However, in this paper, we mostly focus on the logic steps of a fault diagnosis algorithm, without explicitly considering its software implementation. Thus, we make Assumption (A1) for the convenience of discussion. Simultaneously, we make Assumption (A2) to avoid a situation that the PLC of a system is too busy processing the changes of readings of place sensors to perform other tasks.
On the basis of Assumptions (A1) and (A2), the output of a system at each step is represented by two possible cases:
(1) A marking pair with .
(2) A three tuple with and .
In the first case, is reachable from by firing an unobservable transition sequence , that is, , and is obtained by reading place sensors after time units from the starting point .
In the second cases, starting from , an observable transition fires before reaching time units and the output is represented as satisfying , where and . Namely, marking is reached from by firing an unobservable transition sequence. After observing transition , the timer is reset to zero and the elapsed time units are recounted. Subsequently, we provide an example to clarify this.
Example 1.Consider the Petri net shown in
Figure 1
, where, , and the initial marking is. If the time interval to read place sensors is four time units (i.e. ), then a possible evolution of the net is shown in
Figure 2
. The timeline shows the moments to read place sensors. The output sequence obtained along this timeline is represented as a marking-transition sequence, that is, , which contains five stepsand, as shown in the lower part of
Figure 2.
A Petri net for Example 1.
A possible output sequence of the net in Figure 1.
In Step 1, from the starting point, no observable transition is observed during four time units. Then, at the fourth time unit, place sensors are read and the markingis obtained. Thus, the output in Step 1 is the first case mentioned above, that is, a marking pair. In Step 2, a timer restarts from markingand we observe transitionbefore four time units elapse. In addition, by reading place sensors, the reached marking after firingis. Thus, the output in Step 2 can be represented as the second cases defined previously, that is, a three tuple. The outputs in Steps 3–5 can be similarly explained and are illustrated in
Figure 2.
∇
Definition 2.A trace of a Petri net systemwithis a sequencesuch that there exist unobservable transition sequencessatisfying, whereis a positive integer, , , ∇
The set of traces of a net system is defined as Obviously, the output sequence of a Petri net in this paper, defined under Assumptions (A1) and (A2), is a trace. For example, the output sequence, say , in Example 1 is a trace and it holds . Now, we are ready to formally define the fault diagnosis problem addressed in this paper.
Problem 1.Given a Petri net systemand a partitionoffault classes, the problem consists in determining the occurrence of each fault class () till observing a tracethat contains multiple steps with each being in the form of a marking pairor a three tuple
Fault diagnosis algorithm for Petri nets
In this section, we define a local diagnoser and a global diagnoser for solving Problem 1 and develop a fault diagnosis algorithm based on integer linear programing techniques. To formally present the algorithm, several new definitions are first provided.
Definition 3.Given a net systemwithand two markings, the set of unobservable transition sequences whose firings bring the system fromtois defined by∇
It is clear that if is reachable from by firing a sequence , that is, , then When observing a pair during the evolution of a step of a system, the following local diagnoser describes the diagnosis decision of each fault class after observing
Definition 4.A local diagnoser is a functionwhich associates a pairand each fault classwith a diagnosis state such that
• if for all and for all it holds , that is, there are multiple paths from to in the reachability graph but each path does not contain transition . In such a case, the system behaves normally between and and no fault occurs.
• if there exist two unobservable transition sequences such that (i) there exists a fault satisfying , and (ii) for all , it holds , that is, there are at least two possible paths from to in the reachability graph, one passing a fault but another passing none of them.
• if for all there exists a fault satisfying , that is, each path from to in the reachability graph contains a fault ∇
Example 2.By specifyingand, let us consider the Petri net shown inFigure 1again. Consider two markingsandas shown in
Figure 2.
Figure 3is a part of the reachability graph, describing all possible paths fromtothat contain unobservable transitions only.
A part of the reachability graph of the net in Figure 1.
It is easy to verify that there are four paths from to , as shown in the following:
Sinceis contained inand, it holdsaccording to Def. 4. Following a similar reasoning, the diagnosis decisionis obtained. ∇
It is not realistic to compute diagnosis decision of each fault class via reachability graph analysis because of the state explosion problem. we next provide a linear algebraic characterization of all possible unobservable transition sequences from one marking to another.
For two markings and a fault class , we construct the following two ILP problems
where is a non-negative integer vector of -dimension. The item stands for the sum of components of corresponding to all fault transitions in . On the basis of these two ILP problems, we obtain the following theorem:
Theorem 2.Letbe a Petri net system withandFor two markingswithbeing reachable fromby firing an unobservable transition sequence, and a fault class, it holds
(1) if and only if ILPP 1 has no feasible solution,
(2) if and only if ILPP 2 has no feasible solution,
(3) if and only if both ILPP 1 and ILPP 2 admit a solution,
Proof. We prove the results (1)–(3) in turn.
(1): (if) Since is reachable from by firing an unobservable transition sequence, there necessarily exists a column vector satisfying . On the other hand, if ILPP 1 has no feasible solution, then there does not exist an unobservable transition sequence that contains none of fault transitions in and whose firing brings the system from to , that is, for all , . According to Def. 4, we have . (only if) If ILPP 1 admits a solution, there exists a sequence such that and according to Theorem 1. Namely, it holds or . Clearly, this violates the condition . Thus, this result is proved by contradiction.
(2): (if ) If ILPP 2 has no feasible solution, all possible unobservable transition sequences from to in the reachability graph do not pass one of fault transition , that is, for all , . Thus, we conclude by Def. 4. (only if) We prove this result by contradiction. If ILPP 2 has a solution, by Theorem 1, there is a sequence satisfying and , that is, . This violates the condition .
(3): (if ) If both ILPP 1 and ILPP 2 have a solution, by Theorem 1, there exist two sequence such that and . Thus, it holds by Def. 4. (only if) By contradiction, we first assume that ILPP 1 has no solution. Then, we have according to the result (1). This violates the condition . Thus, ILPP 1 necessarily has a solution. If we assume that ILPP 1 has no solution, it holds according to the result (2). This violates . Thus, we prove that both ILPP1 and ILPP1 admit a solution. □
Given two markings and a fault class , the local diagnoser can be computed by solving ILPPs 1 and 2 according to Theorem 2. However, the final aim of fault diagnosis is to determine the occurrence of faults till observing a trace , as described in Problem 1. Thus, we provide the following definitions to achieve the aim.
Definition 5.Given a traceof a net system, the set of its associated marking pairs is define as
where if ∇
Example 3.Consider the net shown in
Figure 1
and one of its traces, as shown in
Figure 4
. In this trace, we haveand. In addition, it is clear that. Thus, by Def. 5, it holds
When computing the set , we delete a marking pair since (i.e. ).
Definition 6.A global diagnoser of a netis a functionthat associates a traceand a fault classwith a diagnosis decision such that
• if for all pairs , it holds ,
• if (i) there exists a pair such that and (ii) there does not exist a pair such that ,
• if there exists a pair such that ∇
In plain terms, the diagnosis decision means that the fault class does not occur during each step of the trace . The decision implies that necessarily has occurred in one of steps of . Consequently, all paths from to in the reachability graph include the transitions in the step and necessarily pass a fault transition .
In Def. 6, we observe that the global diagnoser of a trace can be computed by inspecting all local diagnosers of steps in the trace. Next, we develop an algorithm to detect faults that have occurred till the observation of a trace.
The main logical flow of Algorithm 1 is illustrated by the flowchart shown in Figure 5. More specifically, in Line 1, the global diagnoser is initialized to an -dimensional column vector such that stands for the diagnosis decision of fault class , where is the number of fault classes and 0, 1, and 2 are the diagnosis decisions. We compute the diagnosis decisions of all fault classes in turn, as shown in Line 3. For a fault class , the fault decision is computed in Lines 5–18. The variable in Line 1 represents the global diagnosis decision and in Line 7 denotes a local decision. For all marking pairs , the local diagnosis decision is obtained by solving ILPP 1 and/or ILPP 2. The global diagnosis decision is computed by selecting the maximal local decision of all marking pairs, as shown in Line 17.
Algorithm 1: Fault diagnosis of a trace in a Petri net system
Input: A trace in a net system Output: Diagnosis decision of each fault class 1 2 Compute the set of marking pairs associated with according to Def. 5 3 fordo 4 Consider the fault class 5 6 for all do 7 8 Build and solve ILPP 1, i.e., 9 ifILPP 1 has no feasible solutionthen 10 11 else 12 Build and solve ILPP 2, i.e., 13 ifILPP 2 has no feasible solutionthe 14 15 else 16 17 18 19 Output
The main computational cost of Algorithm 1 stems from the solution of ILPP 1 and/or ILPP 2. It is well known that the complexity of an integer linear programing problem is NP-complete and is closely related to its size (i.e. the numbers of unknown variables and constraints). However, in practice, many integer linear programing problems can be efficiently solved using commercial solvers (such as Gurobi Solver46 used in the paper). Since integer linear programing problems ILPP 1 and ILPP 2 have the same size, we analyze the size of ILPP 1 only. The number of unknown variables is denoted by
where is the number of unobservable transitions; the number of constraints is denoted by
where is the cardinality of place set. We observe that the size of ILPP 1 is regardless of the length of a trace .
Proposition 1.Given a traceof a net system, for all fault classes, Algorithm 6 outputs the correct diagnosis decision.
Proof. According to Theorem 2, the local diagnosis decision of each marking pair is correctly computed in Lines 6–16. We next prove that it is correct to compute the global diagnosis decision by selecting the maximal local diagnosis decision, that is, in Line 17. If for all , we have , that is, , then the algorithm outputs . This is obviously correct according to Def. 6. On the other hand, if there exists a pair with and there does not exist a pair with , the maximal value will be 1,that is, . This result can be readily verified by Def. 6. Finally, if there exists a pair with , it is clear that . This is also consistent with Def. 6. □
Example 4.Let us consider the net system shown in
Figure 6
, where, , , and. Assume that one of the traces of the net is
A Petri net for Example 4.
We compute the global diagnoserandusing Algorithm 1. The global diagnosis decisions are represented as a two-dimensional column vectorsuch thatand. At first, is set to. According to Def. 5, we have, ,
For the pair, the local diagnosis decision for is by Lines 7–16. The global diagnosis decision ofis updated by. Using the same reasoning, we have. For the pair, we haveand. Analogously, for, the local diagnosis decision isand the global diagnosis decision is updated by. Finally, for, we have and∇
Fault diagnosis algorithm for LPNs
This section extends the fault diagnosis algorithm for Petri nets to the case of labeled Petri nets. In LPNs, two or more observable transitions may share the same label and an observation often corresponds to multiple traces of the underlying Petri nets. Thus, the algorithm for LPNs needs to enumerate all possible transitions with the same label and combine diagnosis results for different traces.
Definition 7.A labeled trace of an LPN systemis a sequencesuch that there exists a trace, where is a positive integer, and∇
In plain words, if we observe a labeled trace , the underlying evolution of a system is a trace such that with . We use to denote that is contained in , . To conveniently present the fault diagnosis algorithm for LPNs, we define the following operator.
Definition 8.The operator associates two operands with a value according to Table 1, which is written as.
Binary operator ⊗.
⊗
0
1
2
0
0
1
1
1
1
1
1
2
1
1
2
Given a labeled trace , there often exist multiple traces ’s that have the same observation. We use the operator ⊗ to combine the diagnosis decisions of these traces to form the diagnosis result of the labeled trace. Algorithm 2 illustrates the usage of ⊗. Before present the algorithm, we define an ILP problem:
which characterizes if there exists an unobservable transition sequence such that and . If admits a solution, there necessarily exists such a sequence by Theorem 1. Otherwise, such a sequence does not exist. Now, it is ready to present the fault diagnosis algorithm for LPNs.
Algorithm 2: Fault diagnosis of a labeled trace in an LPN system
Input: A labeled trace of an LPN Output: Diagnosis decision of each fault class 1 2 3 fordo 4 Consider 5 6 ifthen 7 8 fordo 9 Compute the local diagnosis decision by solving ILPP 1 and/or ILPP 2; 10 11 else 12 forall do 13 14 ifadmits a solutionthen 15 fordo 16 Compute by solving ILPP 1 and/or ILPP 2; 17 18 with 19 20 Output
In Algorithm 2, the global diagnosis decisions of a labeled trace are stored in an -dimensional vector , as shown in Line 1. All steps () are considered in turn in Line 3. For each , the local diagnosis decisions are recorded in . If is the empty string in Line 6, we compute the diagnosis decision of each fault class by solving ILPP 1 and/or ILPP 2. Otherwise, we check all transitions ’s with label in Line 12 and update by If the programing has a solution in Line 14, there necessarily exists an unobservable transition sequence such that Then, the diagnosis decision can be computed by solving ILPPs 1 and 2 and the diagnosis decisions for different ’s are combined by the operator ⊗ in Line 17. Finally, the global diagnosis are obtained by combine diagnosis vector ’s of all steps ’s using the max operation in Line 18.
Example 5.Let us consider an LPNwith, , and. The labels of all unobservable transitions are the empty string and the labels of observable transitions are represented asand(i.e.and). Given a labeled trace, we show how Algorithm 2 works by takingas an input. The fault diagnosis process is illustrated by
Figure 7.
An example of fault diagnosis process of Algorithm 2.
For Step 1 “” of, we considerin turn, as shown in Line 12. In
Figure 7
, for bothand, admits a solution. The corresponding diagnosis decisions are denoted byand, respectively. According to Line 17, the diagnosis decision vectorfor Step 1 is obtained by combiningand using the operator ⊗, that is, , as shown in
Figure 7
. For Step 2 “,” the condition in Line 6 holds and the diagnosis vector in this step is represented by. Similar to Step 1, two observable transitions and with the same labelin Step 3 “” are inspected in turn. For, the programinghas a solution. However, it has no feasible solution forin
Figure 7
. We mark this case with a symbol “×” in
Figure 7
. Finally, the global diagnosis result vectoris obtained by combining all local diagnosis vectors of Steps 1–3 using max operation in Line 18. ∇
Case study
In this section, we show the application and computational efficiency of the proposed approach by means of a plant example. Let us consider the plant shown in Figure 8, which contains five machines (M1–M5), four robotic arms (R1–R4), two buffers with capacity 4 (B1 and B2), two entrances (I1 and I2), two exits (O1 and O2), and two automatic guided vehicles (AGV1 and AGV2).
A plant including five machines and four robotic arms.
This plant has two production lines, as shown by the left part and right part of Figure 8, respectively:
In production line 1 (i.e. the left part of Figure 8), robotic arm R1 first takes a raw part from entrance I1 and then load it into machine M1 or M2. After machine M1 or M2 finishes processing the part, robotic arm R3 unloads the part and puts it into buffer B1. When buffer B1 is not empty, R3 takes a part from B1 and loads it into machine M3. Robotic arm R2 unloads the finished part from M3 and puts it into AGV1 that transfers the part to exit O1.
In production line 2 (i.e. the right part of Figure 8), robotic arm R1 takes a raw part from entrance I2 and loads it into machine M4. Robotic arm R4 unloads the processed part from M4 and puts it into buffer B2. When B2 is not empty, R4 takes a part from B2 and puts it into machine M5. Robotic arm R2 takes the finished part from M5 and puts it into AGV 2. Finally, the part is transferred to exit O2 by AGV 2.
Each production line contains nine events, as indicated by the numbers 1–9 in Figure 8. The Petri net model of the plant is shown in Figure 9. Nine events of production line 1 and their corresponding transitions in Figure 9 are demonstrated in Table 2. The events of production line 2 and the corresponding transitions can be analogously explained. Apart from the events in each production line, the components (machines, robotic arms, etc.) of the plant shown in Figure 8 are also explicitly characterized by the places of the Petri net model shown in Figure 9, as listed in Table 3.
A labeled Petri net model of an automated manufacturing system.
Nine events of production line 1 and their corresponding transitions.
Event no.
Transition
Explanation
1
R1 takes a part from I1
2
R1 puts a part into M1
2′
R1 puts a part into M2
3
R3 takes a part from M1
3′
R3 takes a part from M2
4
R3 puts a part into B1
5
R3 takes a part from B1
6
R3 puts a part into M3
7
R2 takes a part from M3
8
R2 puts a part into AGV1
9
AGV1 transfers a part to O1
Explanations of some places of the net shown in Figure 9.
Place
Explanation
Token(s) in the place
entrance I1
number of raw part in I1
entrance I2
number of raw part in I2
machine M1
availability of M1
machine M2
availability of M2
buffer B1
number of free positions in B1
machine M1
availability of M3
AGV 1
availability of AGV1
machine M4
availability of M4
buffer B2
number of free positions in B2
machine M4
availability of M5
AGV 1
availability of AGV1
robotic arm R1
availability of R1
robotic arm R2
availability of R2
robotic arm R3
availability of R3
robotic arm R4
availability of R4
We assume that there are two failures in the plant, which are described by two fault transitions and in Figure 9, respectively. Transition characterizes a failure that a part is stored into buffer B1 before being machined by machine M1 and describes that a part is directly processed by machine M5 before being stored into buffer B2.
The labeled Petri net model in Figure 9 has 32 places and 32 transitions, where , and . The initial marking is Given an alphabet , the labels of the observable transitions are represented as , , , , and . In Figure 9, the label of each observable transition is demonstrated in parenthesis beside the transition.
In this case study, we compare the computational efficiency of the proposed approach with the ones in Fanti et al.8 and Zhu et al.29 by following the steps below:
Step 1: Simulate the operation of the net system shown in Figure 9 and generate an evolution, that is, a sequence that records all reached markings and fired transitions in order.
Step 2: Compute three observations of the evolution generated in Step 1, which correspond to this paper Fanti et al.8 and Zhu et al,29 respectively.
Step 3: Run the diagnosis algorithms proposed in this paper,8,29 respectively, by taking as input the corresponding observation, and record the running time at each step of the observation.
The generated evolution in Step 1 is shown in Figure 10. For this paper, the corresponding observation of the evolution is demonstrated in Figure 11, which is represented as . Meanwhile, for the approaches in Fanti et al.8 and Zhu et al.,29 the observation of the evolution is , that is, these two approaches have the same observation. Since the length of is 28 and the approaches in Fanti et al.8 and Zhu et al.29 use an online manner to perform diagnosis, we take with as an input of Algorithm 2 in turn.
An evolution recording all reached markings and fired transitions in order.
The observation of the evolution shown in Figure 10 in this paper.
The running times of these three algorithms when observing a step of the corresponding observation are shown in Tables 4 and 5, which are tested on a laptop with Intel Core i7-1165G7 processor and 16G RAM using Gurobi Solver (academic license).46 The relationship of running times of these three approaches in each step is visualized in Figure 12.
Comparison of approaches in this paper Fanti et al.8 and Zhu et al.29
We observe that the running times of the approaches in Fanti et al.8 and Zhu et al.29 significantly increase as the increase of the length of the observation. The main reason for such a situation is that the size of the ILP problems built in Fanti et al.8 and Zhu et al.29 is linear with the length of an observation. However, the size of the ILP problem constructed in this paper is regardless of the length of an observation, as indicated by equations (6) and (7). Thus, the running time of our approach in each step remains basically the same and does not quickly increase when the observation becomes longer. In this case study, our approach is more efficient in contrast to the ones in Fanti et al.8 and Zhu et al.29
Conclusion
In this paper, we solve the fault diagnosis problem using Petri net models. Two fault diagnosis algorithms for Petri nets and LPNs are developed, respectively. The proposed approach enjoys higher computational efficiency compared with those in Fanti et al.8 and Zhu et al.29 and is more suitable for use in real-world systems with low computing power. Future works are two-fold. Firstly, we plan to employ the proposed approach to a real-world system and report its effectiveness. Secondly, the proposed approach will be extended to stochastic Petri nets by associating a firing probability with each transition.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was funded in part by the National Natural Science Foundation of China under Grant No. 62103349, in part by the Science and Technology Development Fund, Macau SAR under Grant 0012/2019/A1, and in part by the Young and Middle-aged Scientific Research Basic Ability Promotion Project of Guangxi under Grant No. 2020KY02031.
ORCID iD
Guanghui Zhu
References
1.
CassandrasCGLafortuneS. Introduction to discrete event systems. New York, NY: Springer, 2009.
2.
ZadSHKwongRHWonhamWM. Fault diagnosis in discrete-event systems: Framework and model reduction. IEEE Trans Automat Contr2003; 48(7): 1199–1212.
3.
López-EstradaFRRotondoDValencia-PalomoG. A review of convex approaches for control, observation and safety of linear parameter varying and Takagi-Sugeno systems. Processes2019; 7(11): 814.
4.
WitczakM. Fault diagnosis and fault-tolerant control strategies for non-linear systems. New York, NY: Springer, 2014.
5.
BlankeMKinnaertMLunzeJ, et al. Diagnosis and fault-tolerant control. New York, NY: Springer, 2006.
6.
SampathMSenguptaRLafortuneS, et al. Diagnosability of discrete-event systems. IEEE Trans Automat Contr1995; 40(9): 1555–1575.
7.
DotoliMFantiMPManginiAM, et al. On-line fault detection in discrete event systems by Petri nets and integer linear programming. Automatica2009; 45(11): 2665–2672.
8.
FantiMPManginiAMUkovichW. Fault detection by labeled Petri nets in centralized and distributed approaches. IEEE Trans Autom Sci Eng2013; 10(2): 392–404.
9.
CabasinoMPGiuaASeatzuC. Fault detection for discrete event systems using Petri nets with unobservable transitions. Automatica2010; 46(9): 1531–1539.
10.
ZhuGLiZWuN, et al. Fault identification of discrete event systems modeled by Petri nets with unobservable transitions. IEEE Trans Syst Man Cybern Syst2019; 49(2): 333–345.
11.
ZhuGLiZWuN. Model-based fault identification of discrete event systems using partially observed Petri nets. Automatica2018; 96: 201–212.
12.
RuYHadjicostisCN. Fault diagnosis in discrete event systems modeled by partially observed Petri nets. Discrete Event Dyn Syst2009; 19(4): 551–575.
13.
CommaultCDionJMYacoub AghaS. Structural analysis for the sensor location problem in fault detection and isolation. Automatica2008; 44(8): 2074–2080.
14.
DoostmohammadianMRabieeHR. On the observability and controllability of large-scale IOT networks: reducing number of unmatched nodes via link addition. IEEE Control Syst Lett2021; 5(5): 1747–1752.
15.
ShuXGuoYYangH, et al. Reliability study of motor controller in electric vehicle by the approach of fault tree analysis. Eng Fail Anal2021; 121: 105165.
16.
VásquezJWPérez-ZuñigaGSotomayor-MorianoJ, et al. New concept of safeprocess based on a fault detection methodology: Super alarms. IFAC-PapersOnLine2019; 52(14): 231–236.
17.
ForoozanfarMDoustmohammadiANikraveshS. Exponential stability of Petri net systems. In: Proceedings of the 6th international conference on electrical engineering ICEENG, Cairo, Egypt, May 2008, pp.1–9. New York: Springer.
18.
Lutz-LeyALopez-MelladoE. Stability analysis of discrete event systems modeled by Petri nets using unfoldings. IEEE Trans Autom Sci Eng2018; 15(4): 1964–1971.
19.
SampathMSenguptaRLafortuneS, et al. Failure diagnosis using discrete-event models. IEEE Trans Control Syst Technol1996; 4(2): 105–124.
20.
ChenYLiZBarkaouiK, et al. Compact supervisory control of discrete event systems by Petri nets with data inhibitor arcs. IEEE Trans Syst Man Cybern Syst2017; 47(2): 364–379.
21.
DemongodinIKoussoulasNT. Differential Petri net models for industrial automation and supervisory control. IEEE Trans Syst Man Cybern Part C2006; 36(4): 543–553.
22.
MaZLiZGiuaA. Characterization of admissible marking sets in Petri nets with conflicts and synchronizations. IEEE Trans Automat Contr2017; 62(3): 1329–1341.
23.
AmmourRLeclercqESanlavilleE, et al. State estimation of discrete event systems for RUL prediction issue. Int J Prod Res2017; 55(23): 7040–7057.
24.
YinX. Verification of prognosability for labeled Petri nets. IEEE Trans Automat Contr2018; 63(6): 1828–1834.
25.
HeZLiZGiuaA. Cycle time optimization for deterministic timed weighted marked graphs under infinite server semantics. IEEE Trans Automat Contr2018; 63(8): 2573–2580.
26.
TongYLiZSeatzuC, et al. Verification of state-based opacity using Petri nets. IEEE Trans Automat Contr2017; 62(6): 2823–2837.
27.
BasileFChiacchioPCoppolaJ. A novel model repair approach of timed discrete-event systems with anomalies. IEEE Trans Autom Sci Eng2016; 13(4): 1541–1556.
28.
YinXLafortuneS. On the decidability and complexity of diagnosability for labeled Petri nets. IEEE Trans Automat Contr2017; 62(11): 5931–5938.
29.
ZhuGFengLLiZ, et al. An efficient fault diagnosis approach based on integer linear programming for labeled Petri nets. IEEE Trans Automat Contr2021; 66(5): 2393–2398.
30.
BasileFChiacchioPDe TommasiG. An efficient approach for online diagnosis of discrete event systems. IEEE Trans Automat Contr2009; 54(4): 748–759.
31.
WangYZhuGWuN. Fault diagnosis of backward conflict-free Petri nets by generalized markings. IEEE Access2020; 8: 154871–154880.
32.
GiuaASeatzuC. Fault detection for discrete event systems using Petri nets with unobservable transitions. In: Proceedings of the 44th IEEE conference on decision and control, Seville, Spain, 15–15 December 2005, pp.6323–6328. New York, NY: IEEE.
33.
CabasinoMPGiuaAPocciM, et al. Discrete event diagnosis using labeled Petri nets. An application to manufacturing systems. Control Eng Pract2011; 19(9): 989–1001.
34.
LefebvreD. On-line fault diagnosis with partially observed Petri nets. IEEE Trans Automat Contr2014; 59(7): 1919–1924.
35.
Ramirez-TrevinoARuiz-BeltranERivera-RangelI, et al. Online fault diagnosis of discrete event systems. A Petri net-based approach. IEEE Trans Autom Sci Eng2007; 4(1): 31–39.
36.
GencSLafortuneS. Distributed diagnosis of discrete-event systems using Petri nets. In: Proceedings of international conference on application and theory of Petri nets, Eindhoven, The Netherlands, June 2003, pp.316–336. New York: IEEE.
37.
PencoleYSubiasA. Diagnosability of event patterns in safe labeled time Petri nets: a model-checking approach. IEEE Trans Autom Sci Eng2022; 19: 1151–1162.
38.
YinXChenJLiZ, et al. Robust fault diagnosis of stochastic discrete event systems. IEEE Trans Automat Contr2019; 64(10): 4237–4244.
39.
HuYMaZLiZ, et al. Diagnosability enforcement in labeled Petri nets using supervisory control. Automatica2021; 131: 109776.
40.
CabralFGMoreiraMV. Synchronous diagnosis of discrete-event systems. IEEE Trans Autom Sci Eng2020; 17(2): 921–932.
41.
VerasMZMCabralFGMoreiraMV.Distributed synchronous diagnosis of discrete event systems modeled as automata. Control Eng Pract2021; 115: 104892.
42.
Al-AjeliAParkerD. Fault diagnosis in labelled Petri nets: a Fourier–Motzkin based approach. Automatica2021; 132: 109831.
43.
LafortuneSLinFHadjicostisCN. On the history of diagnosability and opacity in discrete event systems. Annu Rev Control2018; 45: 257–266.
44.
GiuaASilvaM. Petri nets and automatic control: a historical perspective. Annu Rev Control2018; 45: 223–239.
45.
MurataT. Petri nets: properties, analysis and applications. Proc IEEE1989; 77(4): 541–580.
46.
Gurobi Optimization. Gurobi Optimizer, http://www.gurobi.com/ (2021, accessed 25 October 2021).