<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>OF-PENDA: A Software Tool for Fault Diagnosis of Discrete Event Systems Modeled by Labeled Petri Nets</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Baisi Liu</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mohamed Ghazel</string-name>
          <email>mohamed.ghazelg@ifsttar.fr</email>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Armand Toguyeni</string-name>
          <email>armand.toguyeni@ec-lille.fr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Ecole Centrale de Lille, LAGIS</institution>
          ,
          <addr-line>F-59651, Villeneuve d'Ascq</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>IFSTTAR, Cosys/Estas</institution>
          ,
          <addr-line>F-59666, Villeneuve d'Ascq</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Univ. Lille Nord de France</institution>
          ,
          <addr-line>F-59000, Lille</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper, a software tool to deal with diagnosis of discrete event systems (DESs) is presented. This tool called On-the-Fly PEtri-Net-based Diagnosability Analyzer (OF-PENDA) implements the techniques developed in [13] for the diagnosis of DESs modeled by labeled Petri nets (LPNs). This technique aims to cope with the state explosion problem which is a major issue when dealing with diagnosis of DESs. In particular, OF-PENDA implements an incremental and onthe- y algorithm which makes it possible to analyze (K-)diagnosability without necessarily generating the whole state space of the model. Three aspects for OF-PENDA are discussed in this paper: an overview on the implemented technique is given; some features of the tool are discussed; then two illustrative case studies are processed to show the e ciency in terms of time and memory compared with some existing approaches.</p>
      </abstract>
      <kwd-group>
        <kwd>fault diagnosis</kwd>
        <kwd>discrete event system</kwd>
        <kwd>labeled Petri net</kwd>
        <kwd>onthe- y analysis</kwd>
        <kwd>incremental search</kwd>
        <kwd>C++</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Diagnosability analysis and online diagnosis are two crucial issues in safety
critical systems. Most of such systems can be modeled as DESs [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] in a su ciently
high abstraction level. For technical and/or economical reasons, it is generally
inconceivable to sense all the behavioral variations in a complex dynamic system.
Thereby, very often, monitoring activities in such systems have to be carried out
under partial observability. In particular, DES diagnosis is often explained as the
task which consists in deducing and identifying the occurrence of faulty
unobservable events, based on the occurrence of observable events; and diagnosability
is the ability to diagnose any fault in a nite delay after its occurrence.
      </p>
      <p>
        In the past two decades, diagnosability analysis has been studied using
techniques such as diagnoser automata [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ], veri er automata [
        <xref ref-type="bibr" rid="ref17 ref7">7, 17</xref>
        ], integer linear
programming [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and veri er Petri nets [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Software tools, such as the UMDES
library [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] can analyze diagnosability. A major issue that these works have to
deal with is the computation complexity. In particular, the state explosion
phenomenon constitutes a major obstacle especially for the approaches based on
building and/or investigation of the state space. In [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], we have developed a
new technique which aims to cope (even partially) with this problem, by
adapting an incremental and on-the- y building of the state space in parallel with
(K-)diagnosability analysis.
      </p>
      <p>
        OF-PENDA is a software tool developed in C++ for the diagnosability
analysis and the online diagnoser generation for DESs modeled by LPNs. It is the
implementation of various algorithms developed in [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. Diagnosability verdict
is emitted and when the system is diagnosable, an online diagnoser is generated
in a straightforward way. In addition, for diagnosable systems, Kmin, the
minimum number of steps (observable events) after the occurrence of fault to ensure
diagnosability, is also given to help describe diagnosability in a ner way.
      </p>
      <p>The reminder of this paper is organized as follows. Section 2 brie y introduces
some notations pertaining to LPN and (K)-diagnosability. Section 3 discusses
the on-the- y and incremental techniques implementated in OF-PENDA. In
Section 4, we present the features of OF-PENDA. Then, two cases WODES and
level crossing (LC) benchmarks are used to show the e ciency of OF-PENDA
in Section 5 and 6, respectively. Finally, some concluding remarks are given in
Section 7.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Preliminaries</title>
      <p>2.1</p>
      <p>Labeled Petri Nets
A Petri net (PN) is a tuple N = (P; T; P re; P ost), where P is a nite set of
places; T is a nite set of transitions; P re and P ost are the pre- and
postincidence mappings. C = P ost P re is the incidence matrix. A marking is a
vector M 2 N jP j that assigns a non-negative integer to each place. A marked PN
(N; M0) is a PN N with given initial marking M0. For short, a marked PN will be
called PN afterward. A transition ti is enabled at marking M if M P re( ; ti),
denoted by M [ ti &gt;.</p>
      <p>A PN (N; M0) is bounded if the number of tokens in each place does not
exceed a nite number m 2 N for any marking reachable from M0. A PN is
live if, no matter what marking has been reached from M0, it is possible to
ultimately re any transition of the net by progressing through some further
ring sequence.</p>
      <p>An LPN is a tuple NL = (N; M0; ; '), where (N; M0) is a marked PN; is
a nite set of events and ' : T ! is the transition labeling function. ' is also
extended to sequences of transitions, ' : T ! . The language generated by
NL is L(NL) = f'( ) 2 j 2 T ; M0 [ &gt;g. For short, we write L instead
of L(NL). We denote by s = s1s2 : : : sn the concatenation of s1; s2; : : : ; sn, where
s1; s2; : : : ; sn 2 .</p>
      <p>K-diagnosability
In event-based diagnosis of DESs, event set is partitioned into two disjoint
sets, = o ] u, where o is a nite set of observable events and u is a
nite set of unobservable events. Fault events are unobservable, thus the set of
fault events f u. Likewise, the set of transitions T is partitioned into sets
of observable and unobservable transitions: T = To ] Tu. Moreover, the faulty
transitions are unobservable (Tf Tu). Also, the set of fault events can be
partitioned into m sets, f = Uim=1 Fi , where Fi denotes one class of faults.</p>
      <p>Let Po : ! o be the projection which \erases" the unobservable events
in a sequence s 2 . The inverse projection operator Po 1 is de ned as Po 1(r) =
fs 2 L j Po(s) = rg for r 2 o . Given a live and pre x-closed language L
and a string s 2 L, the post-language of L after s denoted by L=s is L=s =
fs0 2 j ss0 2 Lg. We denote the length of string s by jsj, and the ith event
of sequence s by si. For a 2 and s 2 , we write a 2 s if i exists such that
si = a.</p>
      <p>De nition 1. Given an LPN NL and K 2 N , e 2 f is K-diagnosable if
8u 2 L; ujuj 2 f and 8v 2 L=u such that jPo(v)j K, then</p>
      <p>r 2 Po 1(Po(uv)) ) e 2 r</p>
      <p>For a K-diagnosable system S, it is obvious that S is K 0-diagnosable for any
K 0 K. Besides, Kmin exists such that S is Kmin-diagnosable, and S is not
K 0-diagnosable for all K 0 &lt; Kmin.
3
3.1</p>
    </sec>
    <sec id="sec-3">
      <title>Techniques Applied in OF-PENDA</title>
      <sec id="sec-3-1">
        <title>On-the- y Analysis</title>
        <p>
          For most existing approaches, diagnosability analysis is composed of two stages.
First, advanced models are developed for extracting the necessary information
for diagnosability analysis from the original model, e.g., diagnoser automata [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ],
veri er automata [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ], veri er Petri nets [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ], and linear inequalities [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]. Secondly,
diagnosability analysis is tackled based on the structure analysis of the plant (or
by solving mathematical models), e.g., through checking the existence of certain
speci c states or cycles, and verifying the existence of linear inequalities
solutions. Traditionally, the two stages are proceeded independently and sequentially.
The analysis of advanced models is performed after their state spaces have been
completely generated. This presents the state explosion problem when dealing
with large systems. In OF-PENDA, we tackle this problem by using on-the- y
techniques [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ], since such techniques have the following advantages:
        </p>
        <p>On-the- y techniques can save memory resources. Generally, on-the- y
techniques permit us to generate and investigate only a part of the state space to
nd solutions, unlike the classic enumerative approaches which have to build
the whole state space a priori. On-the- y exploration techniques do not reduce
the complexity of the original algorithms, but they do save memory resources in
general, depending on the system structure and on the searching strategy.</p>
        <p>On-the- y techniques can save computing time. On the one hand,
on-they exploration terminates as soon as some speci c features are found, which
requires less time than investigating the whole state space. On the other hand,
for two-stage analysis, such as our approaches that will be given in this paper,
the advanced models can be derived and analyzed step by step as the on-the- y
building of the basic models, rather than being analyzed after building the whole
basic models, which can save time from both analysis stages.</p>
        <p>On-the- y techniques can deal with some unbounded systems, since they
return a verdict as soon as some speci c features are found, instead of investigating
the whole in nite state space, as will be shown in Section 5.
3.2</p>
        <p>
          Incremental Search Technique
The incremental method [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ] is a search technique that reuses the information
from previous searches when some parameters change. Generally, it is faster than
performing the search for each changed parameter from scratch. The analysis of
the kth step is based on the search result of the (k 1)th step. Di erent from
other speeding up searches, it can guarantee nding the shortest paths.
        </p>
        <p>
          As in [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ], the classic diagnosability can be analyzed based on incrementally
investigating K-diagnosability with increasing the value of K, and the Kmin
value which ensures the diagnosability will be eventually found (for diagnosable
systems). Note that some approaches based on integer programming [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] have to
rebuild and solve the equation system (or inequalities) when seeking out Kmin,
without using the previous search results.
        </p>
        <p>The incremental technique is a skillful technique to speed up the search
procedure. It should be used for bounded systems so that the search can terminate
well. In particular, it can be used for unbounded systems when some conditions
for terminating the search exist.</p>
        <p>Incremental techniques can be used with on-the- y analysis to perform an
e cient analysis. Both techniques do not change the computation complexity.
However, they improve the searching e ciency when dealing with real systems.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Features of OF-PENDA</title>
      <p>
        In [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], we deal with diagnosability of LPN models using on-the- y and incremental
techniques. Classic diagnosability is transformed into a series of K-diagnosability,
where K increases progressively. Unlike several existing approaches [
        <xref ref-type="bibr" rid="ref15 ref17 ref7">7,15,17</xref>
        ], we
do not enumerate the state space. Instead, the state space is often partially
generated as necessary, and the investigation is stopped as soon as some special
criteria are met. This can potentially o er e ciency in terms of time and
memory, compared with the aforementioned approaches.
      </p>
      <p>
        OF-PENDA is the implementation of various algorithms elaborated in [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]
for the diagnosis of DESs modeled by LPNs. It is a command-line software tool
developed in C++.
      </p>
      <p>
        OF-PENDA takes the mathematical model of an LPN as input, i.e., the
matrices P re, P ost, M0, the event-mapping matrix [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] and the fault partitions.
While analyzing (K-)diagnosability, the generated model for the Kth step are
used for (K + 1)th step. If the system is diagnosable, the minimum value Kmin
ensuring K-diagnosability is given, and the on-line diagnoser is generated.
      </p>
      <p>
        In order to show the e ciency of on-the- y and incremental techniques in
diagnosability analysis, the WODES benchmark [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] and the LC diagnosis
benchmark are used in the comparative simulation using OF-PENDA and the UMDES
library [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], with the help of TINA tool [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], as will be presented in Section 5 and 6.
Based on the simulation results, we will point out the similarities and di erences
between our approach and some existing diagnosis approaches.
5
5.1
      </p>
    </sec>
    <sec id="sec-5">
      <title>Application to the WODES Diagnosis Benchmark</title>
      <sec id="sec-5-1">
        <title>WODES Benchmark</title>
        <p>
          The WODES diagnosis benchmark [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] is shown in Figure 1 and describes a
manufacturing system characterized by three parameters: n; m and k, where:
{ n is the number of production lines;
{ m is the number of units of the nal product that can be simultaneously
produced. Each unit of product is composed of n parts;
{ k is the number of operations that each part must undergo in each line.
The observable transitions are indicated by white boxes, and the unobservable
transitions by black boxes.
5.2
        </p>
        <p>Comparative Results
We now analyze the diagnosability upon the fault class F 1 = ff1; : : : ; fn 1g.
In other terms, only one class of faults is considered here. In order to
perform a comparative simulation with OF-PENDA and the UMDES library, some
preparations are necessary. The UMDES library deals with automata models by
importing a .fsm le. Thus, we rst generate the reachability graph of the
considered PN with the help of TINA yielding to a .aut le, which is then transformed
into a .fsm le by a script integrated in OF-PENDA that we have developed.
This ensures that the comparative simulation is performed with the same input.</p>
        <p>The simulation has been performed on a PC Intel with a clock of 2.26 GHz
and the results are shown in Table 1.</p>
        <p>{ The rst 3 columns entitled \m", \n" and \k" are the basic structural
parameters of the WODES diagnosis benchmark.
{ The 4th column entitled \jRj" is the number of nodes in the marking graph
computed by TINA, which is equal to the number of states of the automaton
for building the diagnoser by the UMDES library.</p>
        <p>{ The 5th column entitled \jN j" is the number of the FM-graph nodes.
{ The 6th column entitled \jDiagj" is the number of the diagnoser automaton
states generated by UMDES.
{ The 7th column entitled \jXvj" is the number of the fault marking set tree
(FM-set tree) nodes.
{ The 8th (resp. 9th) column entitled \DD" (resp. DO) is the diagnosability
verdict returned by UMDES (resp. OF-PENDA), where \Yes" indicates that
the system is diagnosable and \No" indicates undiagnosable.
{ The 10th column is the stopping value of K in the incremental search. Note
that for a diagnosable case (cf. Column 9), this \K " value is equal to \Kmin".</p>
        <p>All the results are obtained under a simulation time of less than 6 hours.
\o.t." (out of time) means the result cannot be computed within 6 hours.
5.3</p>
        <p>
          Discussions
A Finer Version of Diagnosability Both the OF-PENDA and the UMDES
library allow us to check diagnosability for bounded DESs. In particular, thanks
to our incremental investigation of diagnosability, our tool also gives Kmin for
diagnosable systems, while the UMDES library [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ] does not. It is worth recalling
that the K-diagnosability is a ner version of diagnosability with the following
two main features:
        </p>
        <p>
          Online, the value of Kmin gives us a valuable piece of information
indicating the minimum number of steps necessary to detect and identify faults for a
m n k jRj jN j jDiagj jXvj DD DO K m n k jRj jN j jDiagj jXvj DD DO K
1 2 1 15 8 4 3 Yes Yes 2 1 5 1 3,295 2,607 o.t. 66 o.t. Yes 5
1 2 2 24 10 4 3 Yes Yes 2 1 5 2 9,691 o.t. o.t. o.t. o.t. o.t. o.t.
1 2 3 35 12 4 3 Yes Yes 2 2 2 1 96 68 20 9 No No 8
1 2 4 48 14 4 3 Yes Yes 2 2 2 2 237 137 o.t. 9 o.t. No 8
1 3 1 80 52 10 6 Yes Yes 3 2 3 1 1,484 801 20 12 No No 11
1 3 2 159 90 10 6 Yes Yes 3 2 3 2 5,949 2,746 o.t. 12 o.t. No 11
1 3 3 274 138 10 6 Yes Yes 3 2 4 1 28,203 8,795 o.t. 15 o.t. No 14
1 3 4 431 196 10 6 Yes Yes 3 2 4 2 180,918 o.t. o.t. o.t. o.t. o.t. o.t.
1 4 1 495 367 29 17 Yes Yes 4 3 2 1 377 290 66 12 No No 11
1 4 2 1,200 822 29 17 Yes Yes 4 3 3 1 12,048 5,165 o.t. 16 o.t. No 15
1 4 3 2,415 1,533 o.t. 17 o.t. Yes 4 3 4 1 484,841 o.t. o.t. o.t. o.t. o.t. o.t.
1 4 4 4,320 2,554 o.t. 17 o.t. Yes 4
diagnosable system. Note that in [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ], K is the number of both observable and
unobservable transitions after a faulty transition. While here, as well as in [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]
K is the value relative to only observable events. Modifying our algorithm to
compute both observable and unobservable transitions can be done easily.
        </p>
        <p>Secondly, K-diagnosability allows a meticulous description of the
diagnosability for multiple faults. It is advisable to discuss the traditional diagnosability as
a series of K-diagnosability problems for each class of faults F i f .
Further analysis on K could help to enhance the diagnosability. In order to solve
K-diagnosability for each F i, it is su cient to perform our algorithm for each
class of faults F i iteratively. Thus, the computational complexity will be linear
with the number of fault classes.</p>
        <p>
          An On-the- y and Incremental Method The UMDES library deals with
diagnosability of systems modeled by automata based on the construction of an
observer and a diagnoser automaton, which requires an exhaustive enumeration
of the state space. However, we solve the classic diagnosability by handling a
series of K-diagnosability problems, where K increases progressively. In other
words, we reuse the state space generated while analyzing K-diagnosability to
deal with (K + 1)-diagnosability. This is totally di erent from the approach
in [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ], since for each value of K a new system of equations is generated in their
technique based on linear programming. Additionally, by progressively increasing
K, it is certain to nd Kmin if the system is diagnosable.
        </p>
        <p>
          Thanks to the on-the- y investigation of diagnosability, building the whole
FM-set tree is not necessary. Actually, for undiagnosable systems, the FM-set
tree building as well as its exploration are stopped as soon as an indeterminate
cycle is found. Moreover, for diagnosable systems, while generating a branch
in the FM-set tree, we stop as soon as an F -certain or an existing node is
obtained. This is a notable advantage compared with the existing approaches [
          <xref ref-type="bibr" rid="ref15 ref4">4,
15</xref>
          ] which rst build an exhaustive diagnoser or a reachability graph. The test
result using the WODES diagnosis benchmark has shown this point since we
were able to investigate diagnosability on models which are not tractable using
UMDES library.
        </p>
        <p>Relation between Diagnosability and Boundedness of PNs The UMDES
library solves the diagnosability problem based on exhaustive enumeration of the
state space. Therefore, it can only deal with bounded systems modeled by nite
state automata.</p>
        <p>
          It is worth noting that there exist two PN-based approaches for the
diagnosability analysis of unbounded models. In [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ], the authors check the diagnosability
of unbounded PN models by analyzing the structure of the generated veri er
net reachability graph. This approach requires an exhaustive enumeration of the
reachability set of the veri er net, which may be larger than the reachability set
of the original PN. In [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ], the proposed approach is based on linear programming
technique. System behavior is represented by a series of linear equations. The
diagnosability of the unbounded PN models can be veri ed only if the faulty
behavior can be described by a nite number of equations.
        </p>
        <p>
          With the help of the on-the- y computation, our algorithm can determine
undiagnosability as soon as an Fi-indeterminate cycle is detected. Hence, this
approach can be applied to some unbounded PNs with an Fi-indeterminate
cycle. Although an unbounded PN has in nite fault markings, which may result
in an in nite number of fault marking sets (FM-sets), the construction of an
FM-set tree terminates once an Fi-indeterminate cycle is detected and a negative
diagnosability verdict is emitted. From a practical point of view, some thresholds
need to be used if our algorithm is used to deal with unbounded LPNs.
Case of Unlive PNs Note that we have extended our algorithm to also deal
with unlive systems, while considering the de nition of diagnosability relative to
unlive DES, given in [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ]. Besides, the WODES diagnosis benchmark we dealt
with is unlive when n 2, which is against the assumption of liveness in [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ].
Concretely, as the computation of the FM-set tree is performed on the y, we
have added an additional stopping condition: when some F -uncertain FM-set
containing a deadlock state is obtained. Indeed, in this case, the system may
stay inde nitely in this uncertain state, and no diagnosis verdict can be emitted.
Limitations It is shown that some limitations of the WODES benchmark exist
when testing diagnosability analysis approaches:
{ The benchmark is only live when k = 1.
        </p>
        <p>{ The benchmark is only diagnosable when m = 1.</p>
        <p>
          In order to overcome these limitations, we develop the bounded and live n-line
LC benchmark [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ], which integrates both diagnosable and undiagnosable faults
for any parameter n, as will be introduced in the following section.
        </p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>Application to the LC benchmark</title>
      <p>In this section, OF-PENDA is applied to a case study pertinent to railway safety.
We study the fault diagnosis problems on an LC system. Our purpose here is
twofold: rst, we show that OF-PENDA can deal with complex systems; secondly,
the analysis results obtained on a quite complex example can show the e ciency
of on-the- y and incremental techniques in terms of time and memory compared
with other existing approaches. Here, the complex model, namely the n-line LC
will be modeled by an LPN with a great number of reachable markings.
6.1</p>
      <p>
        n-line LC Benchmark
The n-line LC benchmark, as shown in Figure 2, describes an n-line LC system
composed of railway tra c, LC controller and barriers subsystems. The n-line
LC benchmark can be obtained from the single-line LC model [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] while ful lling
the following controlling rules under a nominal situation:
{ The LC must be closed if any approaching train is detected in any line;
{ The LC can be reopened if there is no train in the \within" or \before"
sections in any line.
      </p>
      <p>In other terms, the above rules eliminate all the possibilities that the collision
between railway and road tra c may take place.</p>
      <p>In this global model, all the transitions are observable, but the faulty
transitions, i.e., To = T nTu and Tu = Tf = ft6g [ ([ifti;5g).</p>
      <p>
        The n-line LPN model can be rather big when n takes great values. The
state space of the corresponding LPN models for the various values of n can be
calculated by the TINA tool [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], as will be shown in Table 2.
      </p>
      <p>Recall here that not the whole state space will be generated while using our
on-the- y technique. However, the reachability graphs are generated in order to
transform them into the input le (language equivalent automata) for UMDES.</p>
      <p>As shown in Table 2, the size of the reachability graph grows very quickly as
n increases, since places p2 and p6 can hold as many as n tokens, due to which
so many markings exist.
6.2</p>
      <p>Diagnosability Analysis
In this section, we will analyze the diagnosability of the LC model while
considering various values of n. Here, we will consider two fault classes:
n
{ For TF 1 = [i=1fti;5g, we consider all the faults ti;5 in each track as belonging
to the same class. Recall that such faults express the fact that trains can
enter the crossing zone while the barriers are not ensured to be down.
{ For TF 2 = ft6g, this fault class depicts an early lowering of the barriers, i.e.,
before all the trains are ensured to have left the LC.
railway tra c
tn;4, aw4
tn;5, ig
tn;2,inn
pn;1 tn;1, apn
pn;2
pn;3 tn;3, lvn
pn;4
p1;1 t1;1, ap1
p1;2
p1;3
t1;3, lv1</p>
      <p>p1;4
t4
t1;5, ig
t1;2, in1
p9
p3</p>
      <p>p4
t2, or
n p6
p7, upn</p>
      <p>n
t6, bf</p>
      <p>t5, rs
p8, down
LC controller p1</p>
      <p>p2 n
t1, cr</p>
      <p>p5
barriers
t3, kd
t4, lw</p>
      <p>A comparative simulation with UMDES library is performed on an Intel PC
(CPU: 2.50 GHz, RAM: 3.16 GB) and the results are given in Table 2, Figure 4
and Figure 3, where:
{ n is the number of railway tracks;
{ F i is the considered fault class ( F 1 or F 2);
{ jP j and jT j are the number of places and transitions of the LPN model
respectively;
{ jAj and jRj, which are the number of the arcs and the nodes of the
reachability graph respectively, give the scale of the LPN reachability graph computed
by TINA and which serves as the input automaton states for UMDES;
k
r
a
h
c
n
e
b
L
e
n
i
l
n
n
o
d
e
s
a
b
s
t
l
u
s
e
r
n
o
i
t
e
v
i
t
a
r
a
p
m
o
C</p>
      <p>O
T
j
R
j
i
F</p>
      <p>Lecture Notes in Computer Science: Authors' Instructions 11
s s s s s s s s s s s s s s s m ..t ..t ..t ..t ..t S
m m m m m m m m m m m m m m 09 4 o o o o o E
1 5 6 2 8 5 6 3 9 6 7 0 1 3 1 h D
&lt; 1 4 6 7 2 5 0 4 9 6 6 &lt; 45 2
1 1 2 2 2 ,4 ,4 M
1 5 U
f
o
e
x
e
.
e
l
c
y
c
d
t a
i
e
x
e
.
a
i
d
r
e
i
IN re
T v
m V &lt; &lt;</p>
      <p>T
C T</p>
      <p>D &lt; 1 1 3 3 6 o o</p>
      <p>3
m h
8 1
2</p>
      <p>&lt; &lt;</p>
      <p>&lt; &lt; &lt; 2 1 o o o
b b
D Y N N N N N N N N N N N Y Y Y a o o o o o ) o o
V S O O O ..t ..t ..t ..t - - - - S S S S .t ..t ..t ..t - 6h lts lts
D E N N N o o o o</p>
      <p>E E E E .o o o o &gt; u u</p>
      <p>Y Y Y Y ( s s
Y</p>
      <p>. . . - - - - S S S S S .t ..t ..t - e re re
D SE ..q ..q ..q ..q .t .t .t
D a a a a o o o</p>
      <p>E E E E E .o o o im</p>
      <p>Y Y Y Y Y t
Y
. . . . f
j 5 8 8 8 8 8 8 8 8 8 8 8 5 7 2 0 .t .t .t .t .t o
v 1 1 1 1 1 1 1 1 1 1 1 1 1 0 4 7 . S</p>
      <p>2 8 6 o o o o o t
X u E
j 1 5
m
7
2
n U E
e P
d g
i
. cc ida FO</p>
      <p>4 6 3 0 7 4 1 8 5 2 2 2 9 7 9 3 .t ..t ..t ..t ..t
j 2 1 7 3 8 4 0 5 1 7 4 8 2 7 0 5 .</p>
      <p>1 1 2 2 3 4 4 5 5 ,1 ,2 2 ,1 ,3 o o o o o
N
j 1 2
2 3</p>
      <p>1
2 1 3 0 0 5 8 6 m .m .m .m 2 1 3 0 0 5 8 6 m</p>
      <p>2 ,6 ,0 ,6 ,4 ,1 ,7 .o o o o 2 ,6 ,0 ,6 ,4 ,1 ,7 .o A
j 1 6 1 6 1 6 1 6 1 6 6 6 1 6 1 6 1 6 1 6 1 u u
T 1 1 2 2 3 3 4 4 5 5 0 0 1 1 2 2 3 3 4 4 5 = se se
j 1 2 . r r
2 2</p>
      <p>1
3 0 7
2 2</p>
      <p>1
j
b
a Aj
T
8 0 6 4 0 2 0 4 . . . . 8 0 6 4 0 2 0 4 . ro b b
2 54 ,256 ,7065 ,88244 ,,27621 ,,48005 ,,30470 .om .om .om .om 2 54 ,265 ,7605 ,82844 ,,26721 ,,40805 ,,34070 .om feomm iteandb iteandb
o o
1 1 8 3 9 0
1 6 0 6 2
4 ,2 ,</p>
      <p>3
2 2</p>
      <p>1 y y y
3 0 7
2 2 t
1 ou lts lt
s
{ jN j is the number of (on-the- y) generated fault markings by OF-PENDA
when the diagnosability verdict is issued;
{ jDiagj is the number of diagnoser states generated by UMDES (the diagnoser
approach) which were needed to give the diagnosability verdict;
{ jXvj is the number of (on-the- y) generated FM-sets by OF-PENDA when
the diagnosability verdict is issued, and corresponds also to the number of
nodes of the diagnoser derived from this FM-set tree when the model is
diagnosable;
{ DD, DV and DO are the diagnosability verdicts obtained by diagnoser
approach, veri er approach of UMDES and OF-PENDA respectively, where
\Yes" indicates that the system is diagnosable and \No" indicates
undiagnosable;
{ K is the minimum value ensuring diagnosability computed by OF-PENDA,
if the system is diagnosable; otherwise, it is the last value under which
Kdiagnosability is investigated before concluding that the system is
undiagnosable;
{ TT is the time needed to generate the LPN reachability graph computed
by TINA, i.e., the time used for preparing the input automaton needed for
UMDES;
{ TD, TV and TO are the times needed to obtain the diagnosability verdict
by dcycle.exe (diagnoser approach), verifer dia.exe (veri er approach) of
UMDES and OF-PENDA (on-the- y approach), respectively.
6.3
For the comparative simulation results, the following remarks can be made:
o ered by our on-the- y technique in terms of memory consumption in terms
of memory consumption. Besides, it is worthwhile to mention that the
FMsets can be far fewer than the diagnoser states when an indeterminate cycle
exists, i.e., if the model is undiagnosable, and is detected early.
7. It is worthwhile to notice that the FM-set tree is generated by OF-PENDA
directly from the LPN, while the UMDES takes an automaton as an input
which is equivalent to the reachability graph of the LPN. In other words,
the inputs for UMDES and OF-PENDA are not the same and we had to
compute the LPN reachability graph a priori before performing analysis via
UMDES, whereas, on the contrary, the reachable markings are computed on
the y while investigating diagnosability by OF-PENDA.
8. The results (cf. column TD and TV ) show that the diagnoser approach is
more e cient than the veri er approach while dealing with the n-line LC
benchmark. This does not violate the claim that the veri er approach is more
e cient in terms of time complexity (polynomial for the veri er approach
vs. exponential for the diagnoser approach), since the theoretical complexity
is always computed while considering the worst case.</p>
      <p>More importantly, compared with the diagnoser and veri er approaches, our
on-the- y approach can deal with some quite complex models that UMDES
cannot deal with (e.g., for the cases F 1 when n 7), especially for some
undiagnosable systems, and shows better e ciency in terms of time and memory.
For example, the diagnosability analysis for the LC model is performed in less
than 6 seconds, for even when n = 40, whereas UMDES (diagnoser and veri er
techniques) do not issue a verdict within 6 hours for n &gt; 4. However, for the
diagnosable cases ( F 2), we spend less memory but more time than UMDES,
although the obtained results remain comparable: OF-PENDA and
UMDESveri er block from n = 4, whereas UMDES-diagnoser blocks at n = 5. This
gap in terms of e ciency depending on whether the model is diagnosable or
not can be explained as follows: For the undiagnosable models, the analysis by
OF-PENDA is completed as soon as an indeterminate cycle is found which can
occur quickly, hence avoiding the generation and analysis of an important part
of the state space. However, for diagnosable models, it is likely that a bigger part
of the state space is generated/analyzed since, in this case, the only stopping
condition which allows us to avoid building/investigating the whole state space
is when a faulty node is generated. Indeed, since we deal with permanent faults,
it is useless to continue investigating the following nodes since they are faulty as
well.
7</p>
    </sec>
    <sec id="sec-7">
      <title>Conclusion</title>
      <p>
        OF-PENDA is a software tool for the diagnosis of DESs modeled by LPNs, on
the basis of the techniques developed in [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. For diagnosable bounded systems,
the minimum value Kmin ensuring K-diagnosability is given. Besides, thanks
to the incremental search it implements, OF-PENDA can also issue diagnosis
verdict for some unlive and/or unbounded LPN models under some conditions.
Two benchmarks have been used in this paper for illustrating the e ciency of
OF-PENDA while a comparison discussion is carried out w.r.t some existing
techniques. As future works, we intend to improve the source code of our tool
and to integrate some heuristics to guide the depth- rst search technique adopted
here, while de ning some priority rules as regards the branches to be investigated
rst.
      </p>
    </sec>
    <sec id="sec-8">
      <title>Acknowledgement</title>
      <p>The present research work has been partially supported by the International
Campus on Safety and Intermodality in Transportation, the Nord-Pas-de-Calais Region,
the European Community, the Regional Delegation for Research and Technology, the
Ministry of Higher Education and Research, and the National Center for Scienti c
Research. The authors gratefully acknowledge the support of these institutions.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>F.</given-names>
            <surname>Basile</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Chiacchio</surname>
          </string-name>
          , and G. De Tommasi.
          <article-title>On K-diagnosability of Petri nets via integer linear programming</article-title>
          .
          <source>Automatica</source>
          ,
          <volume>48</volume>
          (
          <issue>9</issue>
          ):
          <year>2047</year>
          {2058, Sept.
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>B.</given-names>
            <surname>Berthomieu</surname>
          </string-name>
          , P.
          <article-title>-</article-title>
          <string-name>
            <surname>O. Ribet</surname>
            , and
            <given-names>F.</given-names>
          </string-name>
          <string-name>
            <surname>Vernadat</surname>
          </string-name>
          .
          <article-title>The tool TINA - Construction of abstract state spaces for Petri nets and time Petri nets</article-title>
          .
          <source>International Journal of Production Research</source>
          ,
          <volume>42</volume>
          (
          <issue>14</issue>
          ):
          <volume>2741</volume>
          {
          <fpage>2756</fpage>
          ,
          <year>July 2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>M. P.</given-names>
            <surname>Cabasino</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Giua</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Lafortune</surname>
          </string-name>
          , and
          <string-name>
            <given-names>C.</given-names>
            <surname>Seatzu</surname>
          </string-name>
          .
          <article-title>A new approach for diagnosability analysis of Petri nets using veri er nets</article-title>
          .
          <source>IEEE Transactions on Automatic Control</source>
          ,
          <volume>57</volume>
          (
          <issue>12</issue>
          ):
          <volume>3104</volume>
          {
          <fpage>3117</fpage>
          ,
          <string-name>
            <surname>Dec</surname>
          </string-name>
          .
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>M. P.</given-names>
            <surname>Cabasino</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Giua</surname>
          </string-name>
          , and
          <string-name>
            <given-names>C.</given-names>
            <surname>Seatzu</surname>
          </string-name>
          .
          <article-title>Fault detection for discrete event systems using Petri nets with unobservable transitions</article-title>
          .
          <source>Automatica</source>
          ,
          <volume>46</volume>
          (
          <issue>9</issue>
          ):
          <volume>1531</volume>
          {
          <fpage>1539</fpage>
          ,
          <string-name>
            <surname>Sept</surname>
          </string-name>
          .
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>C. G.</given-names>
            <surname>Cassandras</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Lafortune</surname>
          </string-name>
          .
          <article-title>Introduction to discrete event systems</article-title>
          . Springer,
          <volume>2</volume>
          <fpage>edition</fpage>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>A.</given-names>
            <surname>Giua</surname>
          </string-name>
          .
          <article-title>A benchmark for diagnosis</article-title>
          . http://www.diee.unica.it/giua/WODES/ WODES08/media/benchmark diagnosis.pdf,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>S.</given-names>
            <surname>Jiang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Huang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Chandra</surname>
          </string-name>
          , and
          <string-name>
            <given-names>R.</given-names>
            <surname>Kumar</surname>
          </string-name>
          .
          <article-title>A polynomial algorithm for testing diagnosability of discrete-event systems</article-title>
          .
          <source>IEEE Transactions on Automatic Control</source>
          ,
          <volume>46</volume>
          (
          <issue>8</issue>
          ):
          <volume>1318</volume>
          {
          <fpage>1321</fpage>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>S.</given-names>
            <surname>Koenig</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Likhachev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Liu</surname>
          </string-name>
          , and
          <string-name>
            <given-names>D.</given-names>
            <surname>Furcy</surname>
          </string-name>
          .
          <article-title>Incremental heuristic search in AI</article-title>
          .
          <source>AI Magazine</source>
          ,
          <volume>25</volume>
          (
          <issue>2</issue>
          ):
          <volume>99</volume>
          {
          <fpage>112</fpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>S.</given-names>
            <surname>Lafortune</surname>
          </string-name>
          .
          <article-title>UMDES-Lib software library</article-title>
          . http://www.eecs.umich.edu/ umdes/toolboxes.html,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>N. G.</given-names>
            <surname>Leveson</surname>
          </string-name>
          and
          <string-name>
            <given-names>J.</given-names>
            <surname>Stolzy</surname>
          </string-name>
          .
          <article-title>Analyzing safety and fault tolerance using time petri nets</article-title>
          .
          <source>Formal Methods and Software Development</source>
          ,
          <volume>186</volume>
          ,
          <year>1985</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <given-names>B.</given-names>
            <surname>Liu</surname>
          </string-name>
          .
          <article-title>An e cient approach for diagnosability and diagnosis of DES based on labeled Petri nets - untimed and timed contexts</article-title>
          .
          <source>PhD thesis</source>
          , Univ. Lille Nord de France,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <given-names>B.</given-names>
            <surname>Liu</surname>
          </string-name>
          .
          <article-title>N-track level crossing benchmark</article-title>
          . http://6814.isprogrammer.com/posts/45619.html,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13. B.
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Ghazel</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Toguyeni</surname>
          </string-name>
          .
          <article-title>Toward an e cient approach for diagnosability analysis of DES modeled by labeled Petri nets</article-title>
          .
          <source>In The 13th European Control Conference (ECC'14)</source>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>M. Sampath</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Lafortune</surname>
            , and
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Teneketzis</surname>
          </string-name>
          .
          <article-title>Active diagnosis of discrete-event systems</article-title>
          .
          <source>IEEE Transactions on Automatic Control</source>
          ,
          <volume>43</volume>
          (
          <issue>7</issue>
          ):
          <volume>908</volume>
          {
          <fpage>929</fpage>
          ,
          <year>July 1998</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>M. Sampath</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Sengupta</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Lafortune</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          <string-name>
            <surname>Sinnamohideen</surname>
            , and
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Teneketzis</surname>
          </string-name>
          .
          <article-title>Diagnosability of discrete-event systems</article-title>
          .
          <source>IEEE Transactions on Automatic Control</source>
          ,
          <volume>40</volume>
          (
          <issue>9</issue>
          ):
          <volume>1555</volume>
          {
          <fpage>1575</fpage>
          ,
          <year>1995</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <given-names>S.</given-names>
            <surname>Schwoon</surname>
          </string-name>
          and
          <string-name>
            <given-names>J.</given-names>
            <surname>Esparza</surname>
          </string-name>
          .
          <article-title>A note on on-the- y veri cation algorithms</article-title>
          . Springer,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>T</surname>
            .-
            <given-names>S.</given-names>
            Yoo and S.
          </string-name>
          <string-name>
            <surname>Lafortune</surname>
          </string-name>
          .
          <article-title>Polynomial-time veri cation of diagnosability of partially observed discrete-event systems</article-title>
          .
          <source>IEEE Transactions on Automatic Control</source>
          ,
          <volume>47</volume>
          (
          <issue>9</issue>
          ):
          <volume>1491</volume>
          {
          <fpage>1495</fpage>
          ,
          <string-name>
            <surname>Sept</surname>
          </string-name>
          .
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>