Escolar Documentos
Profissional Documentos
Cultura Documentos
Abstract— Although the theory of failure diagnosis of discrete-event systems (DES) has been proved effective,
one question remains open: assuming that the generated language is diagnosable, how long does the diagnosis
system take to detect the failure occurrence? In this paper, although we still consider the DES as a dynamic
system whose evolution is determined by the asynchronous occurrence of events, we add to each transition
a weight that corresponds to the maximum time that takes for the event to occur since the moment it fires
(the so-called time-weighted model), to propose an effective algorithm to determining the maximum time for
failure diagnosis. This result was only possible because we present a new necessary and sufficient condition for
diagnosability verification that replaces the search for cycles with the search for strongly connected components
and by the use max-plus algebra to obtain a matrix representation for time-weighted automata.
Resumo— Embora a teoria de diagnose de falhas de sistemas a eventos discretos (SED) esteja consolidade,
uma pergunta ainda não foi respondida: supondo que a linguagem gerada seja diagnosticável, quanto tempo o
sistema de diagnose leva para detectar a ocorrência da falha? Neste artigo, embora SEDs sejam ainda considerados
como sistemas dinâmicos cuja evolução se dá pela ocorrência, em geral assı́ncrona de eventos, será acrescentado
a cada transição um peso que corresponde ao tempo máximo que o evento leva para ocorrer, desde o instante
em que ele dispara (o chamado modelo ponderado no tempo), para propor um algoritmo eficaz para determinar
o tempo máximo para o diagnóstico da falha. Esse resultado somente foi possı́vel porque foi apresentada uma
nova condição necessária e suficiente para a diagnosticabilidade que substitui a busca por ciclos pela busca de
componentes fortemente conectadas e pelo uso da álgebra max-plus, que permite obter representações matriciais
para autômatos ponderados no tempo.
3519
Anais do XX Congresso Brasileiro de Automática
Belo Horizonte, MG, 20 a 24 de Setembro de 2014
for diagnosability of discrete-event systems and automaton G with unobservable events can
a test based on the search of strongly connected be described by a deterministic automaton
components. In Section 4 we present an algorithm called observer, here denoted as Obs(G) =
for computing the maximum time the diagnosis (Xobs , Σo , fobs , Γobs , x0obs , Xmobs ). The states of
system takes to detect the failure occurrence; as- Xobs indicate where automaton G can be after the
suming, of course, language diagnosability. An recording of the observable events, and for this
example is presented in Section 5 to illustrate the reason Xobs ∈ 2X (2X denotes the power set of
results of the paper. Finally, conclusions and out- X). An algorithm for computing all the states and
line of future works are presented in Section 6. transitions of Obs(G) can be seen in (Cassandras
and Lafortune, 2008, p. 89).
2 Background
2.1 Failure diagnosis of DES
Let G = (X, Σ, f, Γ, x0 , Xm ) denote a determin- Let Σf = {σf } ⊆ Σuo denote the set of failure
istic automaton, where X is the finite state space, events of G and assume that the occurrence of σf
Σ is the set of events, f is the transition function, must be diagnosed, i.e, we must somehow be sure,
assumed here to be partially defined in the event after a finite number of steps of the occurrence of
set, Γ is the active event set, i. e., Γ(x) = {σ ∈ Σ : σf that it has actually occurred. This language
(∃y ∈ X)[f (x, σ) = y]}, x0 is the initial state, and property is called diagnosability.
Xm is the set of marked states. We will assume Let us assume that Ψ(Σf denote the set of all
that the event set is partitioned as Σ = Σo ∪Σ ˙ uo ,
traces of L that ends with the failure event σf .
where Σo (resp. Σuo ) denotes the set of observ- With a slight abuse of notation, we use Σf ∈ s
able (resp. unobservable) events. The languages to denote that s ∩ Ψ(Σf ) 6= ∅. Therefore, s ∈ L
generated and marked by G will be denoted as is a trace that has the failure event σf if Σf ∈ s.
= L(G) = L and Lm (G) = Lm , respectively. Language diagnosability can be formally defined
Given a trace s ∈ L, we define the post-language as follows (Sampath et al., 1995).
of L after s as L/s = {t ∈ Σ∗ : st ∈ L}. The as-
sumption usually made in the literature (Sampath Definição 1 A live and prefix-closed language L
et al., 1995; Debouk et al., 2000) that G does not is diagnosable with respect to Po : Σ∗ → Σ∗o and
possess and cyclic path formed with unobservable Σf if
events only are not required here. As a conse-
quence, we can assume that the language gener- (∃n ∈ N)(∀s ∈ Ψ(Σf ))(∀t ∈ L/s, |t| ≥ n) ⇒ D,
ated by G is always live, since any non-live lan-
guage can be made live by adding a self-loop at where the diagnosability condition D is expressed
the states x, for which Γ(x) = ∅, labeled by unob- as follows:
servable events.
The natural projection (Ramadge and Won- (∀ω ∈ Po−1 [Po (st)] ∩ L)(Σf ∈ ω).
ham, 1989) Po : Σ∗ → Σ∗o is defined in the usual
One way to verify diagnosability is by means
way as Po (σ) = σ, if σ ∈ Σo , and , if σ ∈ Σuo , and
of an automaton called diagnoser (Sampath et al.,
Po (sσ) = Po (s)Po (σ) for s ∈ Σ∗ and σ ∈ Σ. Its ex-
1995; Carvalho et al., 2012) given by
tension to a language L is carried out in a straight-
forward way by applying Po to all traces of L, i.e., Gd = (Xd , Σo , fd , Γd , x0d ) = Obs(GkA` ),
Po (L) = {t ∈ Σ∗o : (∃s ∈ L)[Po (s) = t]}. The in-
∗
verse projection is the mapping Po−1 : Σ∗ → 2Σ , where A` = (X` , Σ` , f` , Γ` , x0` ) is the so-called la-
where, for any s ∈ Σ∗o , Po−1 (s) = {t ∈ Σ∗ : Po (t) = bel automaton, with X` = {N, Y }, x0` = N , and
s}. f` (N, σf ) = f` (Y, σf ) = Y . It is not difficult to
Let G1 = (X1 , Σ1 , f1 , Γ1 , x01 , Xm1 ) and see that L(Gd ) = Po (GkA` ) = Po (L).
G2 = (X2 , Σ2 , f2 , Γ2 , x02 , Xm2 ) denote two The states of Gd not only provide information
automata whose generated languages are L1 on the possible states of G after the occurrence of
and L2 , respectively. The parallel composition the observed trace (formed only with observable
between G1 and G2 is defined as (Cassandras and events) but also provide information on the occur-
Lafortune, 2008): G1 kG2 = Ac(X1 × X2 , Σ1 ∪ rence or not of the failure event. In this regard,
Σ2 , f1k2 , Γ1k2 , (x01 , x02 ), Xm1 × Xm2 , where a state xd ∈ Xd is called certain (or faulty), if
f1k2 [(x1 , x2 ), σ] = (f1 (x1 , σ), f2 (x2 , σ)), if σ ∈ ` = Y for all (x, `) ∈ xd , and normal (or non-
Γ1 (x1 ) ∩ Γ2 (x2 ), f1k2 [(x1 , x2 ), σ] = (f1 (x1 , σ), x2 ), faulty) if ` = N for all (x, `) ∈ xd . If there exist
if σ ∈ Γ1 (x1 ) \ Σ2 , f1k2 [(x1 , x2 ), σ] = ˜ ∈ xd , x not necessarily distinct from
(x, `), (y, `)
(x1 , f2 (x2 , σ)), if σ ∈ Γ2 (x2 ) \ Σ1 , and un- y such that ` = Y and `˜ = N , then xd is an un-
defined otherwise. If we define Σ = Σ1 ∪ Σ2 , certain state of Gd . When the diagnoser is in a
Po1 : Σ∗ → Σ1 and Po2 : Σ∗ → Σ2 , then, it is not certain (normal) state, it is certain that a fault
difficult to prove that L1k2 = Po−1 1
(L1 ) ∩ Po−1
2
(L2 ). has (resp. has not) occurred. However, if the di-
The dynamic behavior of a deterministic agnoser is in an uncertain state, it is not sure if
3520
Anais do XX Congresso Brasileiro de Automática
Belo Horizonte, MG, 20 a 24 de Setembro de 2014
the fault event has occurred or not. As a conse- when it reaches the corresponding normal, faulty
quence, if there exists a cycle formed with uncer- and uncertain states, in spite of the plant evolu-
tain states, only, where the diagnoser can remain tion. We say, in this case, that there exists hidden
forever, then it will never be able to diagnose the cycles in the above states.
fault occurrence; on the other hand if somehow it
always leaves this cycle of uncertain states, then Definição 3 (Hidden cycles and in-
this cycle is not indeterminate. Therefore, it is im- determinate hidden cycles of Gd ) Let
portant to distinguish between cycles of uncertain xd = {x1 `1 , x2 `2 , . . . , xn `n } be a state of
states that are indeterminate (in the sense that Gd . There exists a hidden cycle in xd if for
the diagnoser is not able to determine if the fault some {i1 , i2 , . . . , ik } ⊆ {1, 2, . . . , n}, the following
has occurred) and those cycles of uncertain states conditions hold true:
that are not indeterminate.
HC.1) xi1 , xi2 , . . . , xik form a cycle in G;
Definição 2 (Sampath et al., 1995) (Indetermi-
nate observed cycles of Gd ) A set of uncertain HC.2) {σi1 , σi2 , . . . , σik } ⊆ Σuo , where
states {xd1 , xd2 , . . . , xdp } ⊂ Xd forms an indeter- σi1 , σi2 , . . . , σik are such that f (xij , σij ) =
minate observed cycle if the following conditions xij+1 , j = 1, 2, . . . , k − 1, and
hold true: f (xik , σik ) = xi1 .
IOC.1) xd1 , xd2 , . . . , xdp form a cycle in Gd ; If xd is an uncertain state of Gd and besides con-
ditions HC.1) and HC.2), the following condition
IOC.2) ∃(xkl l , Y ), (x̃rl l , N ) ∈ xdl , xkl l not nec- is also satisfied,
essarily distinct from x̃rl l , l = 1, 2, . . . , p,
HC.3) `ij = Y , j = 1, 2, . . . , k,
kl = 1, 2, . . . , ml , and rl = 1, 2, . . . , m̃l in
such a way that the sequence of states {xkl l }, then xd has an indeterminate hidden cycle.
l = 1, 2, . . . , p, kl = 1, 2, . . . , ml and {x̃rl l },
l = 1, 2, . . . , p, rl = 1, 2, . . . , m̃l form cycles In accordance with Definition 3, there exist
in G; hidden cycles in states xN Y
d and xd of Gd and an
YN
indeterminate hidden cycle in xd . Notice that
IOC.3) there exist s = s1 s2 . . . sp ∈ Σ∗ and in the verification of language diagnosability, state
s̃ = s̃1 s̃2 . . . s̃p ∈ Σ∗ such that Po : Σ∗ → xYd (xNd ) ensures that the fault has (resp. has not)
Σ∗o (s) = Po : Σ∗ → Σ∗o (s̃) 6= , where occurred, and so, the existence of hidden cycles in
sl = σl,1 σl,2 . . . σl,ml −1 , f (xjl , σl,j ) = xj+1
l , normal or certain states of Gd does not affect the
j = 1, 2, . . . , ml − 1, f (xm 1
l , σl+1,0 ) = xl+1 ,
l
language diagnosability. On the other hand, the
m
and f (xp p , σ1,0 ) = x11 , and similarly for s˜l . existence of indeterminate hidden cycles implies
that the language is not diagnosable since there
Assume now that there exists a set of states
exist two traces, a faulty one, s, and a normal
{xi1 , xi2 , . . . , xik } ⊂ X that form a cycle of states
one, s00 , such that Po (s) = Po (s00 ).
connected with unobservable events. Consider a
trace s = so (σi1 , σi2 , . . . , σik )n ∈ L (n ∈ N), where The necessary and sufficient condition for di-
(σi1 , σi2 , . . . , σik )n ∈ Σ∗uo and assume, without agnosability proposed in (Sampath et al., 1995)
loss of generality, that the last event of so is ob- has been extended in (Carvalho et al., 2012) to
servable. Let us suppose, initially, that σf ∈ / s and take into account hidden cycles as follows.
that there is no faulty trace1 s0 such that Po (s) =
Po (s0 ). In this case there will exist in Gd a state Theorem 1 (Sampath et al., 1995; Carvalho
xN N et al., 2012) The language L generated by au-
d such that {xi1 N, xi2 N, . . . , xik N } ⊆ xd . On
the other hand, if Σf ∈ so and f` (x0,` , so ) = xY` , tomaton G is diagnosable with respect to projec-
where f` is the transition function of G` = GkA` , tion Po : Σ∗ → Σ∗o and Σf = {σf } if, and only if,
x0,` and xY` are, respectively, the initial and a its diagnoser Gd has no indeterminate (observed
certain state of G` , and if there is no normal or hidden) cycles.
trace s00 such that Po (s) = Po (s00 ). Therefore,
there will exist a certain state xYd of Gd such that 2.2 Max-plus algebra
(xY` ∪ {xi1 Y, xi2 Y, . . . , xik Y }) ⊆ xYd . It is still pos-
sible that a normal trace s00 (bounded length or Let us define ε := −∞, e := 0 and Rmax = R∪{ε},
not) such that f` (x0,` , so ) = xN N where R denotes the set of real numbers. For two
` , where x` is a
00
normal state of G` , and Po (s) = Po (s ), exists. In elements a, b ∈ Rmax , the ⊕ e ⊗ operations are
this case, there will exist an uncertain state xYd N defined as follows:
in Gd such that (xY` ∪ {xi1 Y, xi2 Y, . . . , xik Y } ∪
a ⊕ b := max(a, b) and a ⊗ b := a + b. (1)
xN YN
` ) ⊆ xd . In all the above cases, Gd halts
1 A trace s is said to be faulty (normal) if Σ ∈ s (resp.
f
It is not difficult to see that a ⊕ ε = ε ⊕ a = a and
Σf ∈
/ s). a⊗ε = ε⊗a = ε. The four-tuple (Rmax , ⊕, ⊗, ε, e)
3521
Anais do XX Congresso Brasileiro de Automática
Belo Horizonte, MG, 20 a 24 de Setembro de 2014
3522
Anais do XX Congresso Brasileiro de Automática
Belo Horizonte, MG, 20 a 24 de Setembro de 2014
3523
Anais do XX Congresso Brasileiro de Automática
Belo Horizonte, MG, 20 a 24 de Setembro de 2014
We may now state the following result. to diagnosis a fault occurrence. In order to do so,
we make two assumptions.
Theorem 5 The language L generated by au- A1. The language L, generated by the automa-
tomaton G is diagnosable with respect to projec- ton, is diagnosable with respect to projection Po
tion Po : Σ∗ → Σ∗o and Σf = {σf } if, and only if, and Σf .
Gscc has no strongly connected components formed A2. The time-weighted automaton G =
with states (xd , x` ), such that xd is uncertain and ((G, w), h) is such that h = Σ × Σ.
x` certain. Assumption A1. is necessary since the prob-
lem addressed here would not make sense if L were
Proof. (⇒) Assume that there exists a
not diagnosable. Assumption A2. implies that
strongly connected component formed with states
any event cannot start firing if there is another one
(xd1 , x`1 ), (xd2 , x`2 ), . . . , (xdn , x`n ) such that xdi ,
that is under execution, which makes sense since
i = 1, . . . , n, x` are, respectively, uncertain and
we are interested in computing the maximum time
certain states.
for diagnosis.
Two possibilities arise:
Let G denote the time-weighted automaton
(i) xd1 = xd2 = xd3 = . . . = xdn = xd . that models the plant and A` the time-weighted
This means that states (xd1 , x`1 ), (xd2 , x`2 ), label automaton. In addition, let us denote G` =
. . . , (xdn , x`n ) are connected by unobservable GkA` and Gd = Obs(G` ) with respect to Po . We
events since these events are private events of start by calculating a new automaton Gfi accord-
G` . In addition, due to Lemma 4, x`i ∈ xd , ing to the following algorithm.
i = 1, 2, . . . , n, which, together with the fact
that x`i are certain states, implies that there Algorithm 1
exists an indeterminate hidden cycle in xd .
Input Time-weighted automata G, G` , and Gd .
(ii) There exists {i1 , i2 , . . . , ip } ⊆ {1, . . . , n} such Output Automaton Gfi .
that xdik 6= xdil , k 6= l, k, l ∈ {1, 2, . . . , p}.
Since x`i , i = 1, 2, . . . , n are certain, and Step 1. Compute G`m from G` by marking all
L(Gscc ) = L, then, there exists an un- states of G` that have only labeled Y.
bounded trace sY = st ∈ L such that s ∈
Step 2. Compute Gdm from Gd by marking all cer-
Ψ(Σf ) and |t| ≥ n, for all n ∈ N. In ad-
tain states Gd .
dition, since xdik i = 1, 2, . . . , p, are un-
m
certain states, then, as proved in (Sampath Step 3. Compute Gscc = Gdm kG`m .
et al., 1995), there exists a trace sN ∈ L
such that Po (sY ) = Po (sN ), which implies Step 4. Set Γ(xm ) = ∅ for all marked states
m
that L is not diagnosable with respect to xm of Gscc , i.e., remove all output tran-
Po : Σ∗ → Σ∗o and Σf . sitions from the marked states xm of
m m m
Gscc , and compute Gscc,t = trim(Gscc ) =
(⇐) Assume, now, that L is not diagnosable m m m m m m
(Xscc,t , Σscc,t , fscc,t , Γscc,t , xscc,t,0 , Xscc,t,m )
with respect to Po and Σf . Thus, there exist two
m
traces: an unbounded trace sY = st, s ∈ Ψ(Σf ), Step 5. Find all states xi of Gscc,t that satisty
and |t| > n for all n ∈ N and a not necessarily un- σf ∈ Γ(xi ). Suppose that there exists p states
bounded trace sN , such that Σf ∈ / sN , which sat- that satisfy this requirement. For each i =
isfy Po (sY ) = Po (sN ). Let the |Xd ||X` | = q and 1, 2, . . . , p:
set n > q. Then fscc (xscc0 , sY ) = (xd , x` ), x` cer- Step 5.1 Construct an automaton Gscc,i =
tain, and (xd , x` ) already exists in Gscc , therefore, i
(Xscc , Σiscc , fscc
i
, Γiscc , xiscc,0 , Xm,scc
i
),
forming a cycle, and, as a consequence, a strongly
such that Xscc = Xscc,t , Σscc = Σm
i m i
scc,t ,
connected component in Gscc . Assume, now that i m
fscc = fscc,t , Γiscc = Γm scc,t ,
xd is certain. Since, after entering in a cycle, i m i m
a certain state cannot become uncertain again, xscc,0 = fscc,t (xi , σf ) e Xm,scc = Xscc,t .
then, any trace s ∈ L such that Po (s) = Po (sY ) Step 5.2 Gfi = trim(Gscci )
will be certain, which, contradicts the assump-
tion that there exists sN , Σf ∈ / sN such that We may state the following results.
Po (sY ) = Po (sN ). Therefore, the component xd
Lemma 6 Let L(Gfi ) denote the language gener-
must be uncertain for all states in the strongly
ated by Gfi , i = 1, 2, . . . , p. Then
connected component.
∪pi=1 L(Gfi ) = {t ∈ Σ∗ : (∃s ∈ Ψ(Σf ) ∩ L(Gscc m
)∧
4 Failure diagnosis of DES modeled by m m
(∃xm ∈ Xm,scc )[(st ∈ L(Gscc ))∧
m
time weighted automata (fscc (xi0,scc , t) = xm )]}
In this section we will address the problem of find- Proof. The proof is straightforward and comes
ing the maximum time the diagnosis system takes from the construction of L(Gfi ).
3524
Anais do XX Congresso Brasileiro de Automática
Belo Horizonte, MG, 20 a 24 de Setembro de 2014
3525
Anais do XX Congresso Brasileiro de Automática
Belo Horizonte, MG, 20 a 24 de Setembro de 2014
3526