On-line Detection and Sensor Activation for Discrete Event Systems1

On-line Detection and Sensor Activation for Discrete Event Systems1

On-line Detection and Sensor Activation for Discrete Event Systems 1 Shaolong Shu*. Zhiqiang Huang*. Feng Lin*☆ * School of Electronics and Informatio...

291KB Sizes 0 Downloads 36 Views

On-line Detection and Sensor Activation for Discrete Event Systems 1 Shaolong Shu*. Zhiqiang Huang*. Feng Lin*☆ * School of Electronics and Information Engineering, Tongji University, Shanghai, China (e-mail: shushaolong@ hotmail.com). ☆ Department

of Electrical and Computer Engineering, Wayne State University USA Detroit, MI,USA (e-mail: [email protected])

Abstract: This paper investigates on-line detection and sensor activation problem of discrete event systems. The objective is to derive minimal sensor activation policy while preserving strong detectability and strong periodic detectability. After reviewing strong detectability and strong periodic detectability, we introduce a new concept called distinguishability. Distinguishability is used for two purposes. First, it is used to characterize detectability. Secondly, it is used for on-line state estimation and sensor activation. To this end, we proposed an on-line state estimation framework which estimates the state of the system. Sensor activation is then achieved based on the state estimation. State-estimation-based sensor activation has some interesting and surprising properties that we will investigate in this paper. In particular, we introduce a new concept called coherence that plays a key role in state-estimation-based sensor activation. To obtain state-estimation-based sensor activation policy that is minimal and coherent, two algorithms are derived. One algorithm is for strong detectability. It minimizes sensor activation while preserving distinguishability, and hence strong detectability. The other algorithm deals with strong periodic detectability. For strong periodic detectability, a new property called information-preserving must be incorporated. Both algorithms are of polynomial complexity. Keywords: Discrete event systems, State estimation, Detectability, Sensor activation, On-line. 1. INTRODUCTION In a discrete event system, the goal of state estimation is to provide state information of the system for some purposes such as supervisory control [Ramadge & Wonham, 1987; Lin & Wonham, 1988] and fault diagnosis [Lin, 1994; Sampath, et al, 1995] which have been investigated for many years. Needless to say, the state estimation problem is important in discrete event systems and is related to many properties such as diagnosability [Lin, 1994; Sampath, et al, 1995], detectability [Caines, Greiner, & Wang, 1988; Ozveren & Willsky, 1990; Shu, Lin, & Ying, 2007; Shu & Lin, 2010] and observability [Lin & Wonham, 1988]. Generally speaking, for detection and state estimation, there are two problems which we need to consider. The first one is whether the state information obtained by state estimation is sufficient to distinguish certain sets of pairs of states called specification. The second problem is how to estimate the current state on-line based on the output of the system. In previous works, the problems were investigated using observers off-line [Caines, Greiner, & Wang, 1988; Ozveren & Willsky, 1990; Shu, Lin, & Ying, 2007; Shu & Lin, 2010]. The observer describes the relationship between the state estimation and the output. Based on the observer, both problems can be solved. However, the cardinality of the state 1

set of the observer is exponential. To reduce complexity we have investigated how to solve state estimation problem with polynomial complexity [Shu & Lin, 2010]. The results so far show that although checking detectability can be done in polynomial complexity, the state estimation cannot be done in polynomial complexity. We are convinced that exponential complexity cannot be avoided using off-line approach. Therefore, in order to solve large practical problem, an online approach will be desirable. We construct a dynamic (that is, on-line) observer to estimate the state of the system. A dynamic observer only uses the last state estimation and the current output to compute the current state estimation. Because a dynamic observer estimates states one by one after the occurrence of an observable event, the computational complexity of estimating state is polynomial at each step. Even though a dynamic observer estimates states of the system one at time, the state estimation obtained by the online approach is sufficient for ensuring detectability. This is because we introduce a new concept called distinguishability. A system is called k-step distinguishable if we can distinguish the pairs of states in the specification in no more than k observations. We show that distinguishability is connected to detectability and distinguishability can be ensured using on-line approach.

This research is supported in part by NSF under grants ECS-0624828 and ECS-0823865, NIH under grant 1R01DA022730, NSFC under grants 60904019 and 60804042, and by Program for Young Excellent Talents in Tongji University.

State estimation is not only needed for detectability, but also needed for sensor activation. In this paper, we investigate minimal sensor activation problem. Our minimal sensor activation policy will be implemented on-line along with online state estimation. The policy will be state-estimationbased because we do not know the state of the system, but only its estimation. State-estimation-based sensor activation has some interesting and surprising properties that we will investigate in this paper. In particular, we will introduce a new concept called coherence. Intuitively, a state-estimationbased sensor activation policy is coherent if the occurrences of unobservable events will not change the policy. We will show that coherence plays a key role in state-estimationbased sensor activation. To obtain state-estimation-based sensor activation policies that are minimal and coherent, we propose three algorithms. All of them are of polynomial complexity. The problem of minimizing sensor activation has been studied in discrete event system framework. The early papers deal with the problem of minimizing the set of events to be observed by the supervisors or/and agents [Haji-Valizadeh & Loparo, 1996]. More recently, minimizing sensor activation for each occurrence of observable events is investigated. In [Thorsley & Teneketzis, 2007], the problem of minimizing sensor activation for each occurrence of observable events to preserve diagnosability is investigated. In [Wang, Lafortune, & Lin, 2008], the problem of minimizing sensor activation for each occurrence of observable events to preserve observability is investigated. In [Shu & Lin, 2010], the problem of minimizing sensor activation for each occurrence of observable events to preserve detectability is investigated. All the above papers use off-line approach. The only paper discussing on-line approach is [Wang, Lafortune, Lin, & Girard, 2009], where the problem of observability is investigated. 2. DETECTABILITY In this paper, a discrete event system is modelled by an automaton as follows: G = (Q , Σ , f , q 0 ) where Q is the set of finite discrete states; Σ is the set of finite discrete events; f : Q × Σ → Q is the transition function; q 0 ∈ Q is the initial state of the system. The transition function is extended to f : Q × Σ ∗ → Q in the usual way. We use f ( q , s )! to denote that f ( q , s ) is defined. We assume that a set of sensors are installed and the event set is divided into two subsets accordingly: observable event set Σ o and unobservable event set Σ uo . We first discuss the case when all sensors are activated. In this case, the output mapping can be described by the natural projection P : L (G ) → Σ *o as follows. P (ε ) = ε ,

⎧ P ( s )σ P ( sσ ) = ⎨ ⎩ P (s)

if σ ∈ Σ o if σ ∉ Σ o

where ε denotes the empty string. As in [Shu, Lin, & Ying, 2007; Shu & Lin, 2010], we make the following two assumptions without loss of generality. Assumption 1 G is deadlock free, that is, for any state of the system, at least one event is defined at that state: (∀ q ∈ Q )( ∃ σ ∈ Σ ) f ( q , σ )! . Assumption 2 No loops in G contain only unobservable events: ¬ ( ∃ q ∈ Q )( ∃ s ∈ Σ *uo ) s ≠ ε ∧ f ( q , s ) = q . For a state estimation problem, the initial state of the system may not be known exactly. It could be in some subset of states. We use Q 0 ( ⊆ Q ) to denote the set of possible initial states. So the automaton used for state estimation can be rewritten as: G = (Q , Σ , f , Q 0 ) . The language generated by G is defined as: L (G ) = { s ∈ Σ * : ( ∃ q 0 ∈ Q 0 ) f ( q 0 , s )!} . A possible trajectory of the system is represented by an infinite sequence of events that the system may generate. The set of all possible trajectories of G is denoted by the ω language Lω (G ) [Thistle & Wonham, 1994]. Suppose that the discrete event system G is currently in a set of possible states Q ′ ⊆ Q , then the set of all possible states after observing t ∈ Σ *o is denoted by R ( Q ′, t ) = {q ∈ Q : ( ∃ q ′ ∈ Q ′)( ∃ s ∈ Σ ∗ ) P ( s ) = t ∧ q = f ( q ′, s )} In particular, the unobservable reach of Q ′ is defined as: UR (Q ′) = R (Q ′, ε ) .

Since the set of all possible states after observing t ∈ Σ *o is given by R ( Q 0 , t ) , we call R ( Q 0 , t ) state estimation. We also define the observable reach after the occurrence of an observable event σ ∈ Σ o as: OR (Q ′, σ ) = {q ∈ Q : ( ∃ q ′ ∈ Q ′) q = f ( q ′, σ )} For s ∈ Lω (G ) , denote the set of all its prefixes by Pr( s ) . Let us also denote the set of positive integers by N . If t is a string, then | t | denotes its length. If x is a set, then x denotes its cardinality (number of elements). Even though the goals of state estimation are different for different purposes, the requirement of distinguishing certain pairs of states can be used in most cases. Hence it is adopted in this paper. To this end, we denote the set of all state pairs T , for a given set of states Q , as T = Q×Q Since the set of all possible states after observing t ∈ Σ *o is given by R ( Q 0 , t ) , the set of all indistinguishable state pairs after observing t ∈ Σ *o is:

R (Q 0 , t ) × R (Q 0 , t ) ⊆ T We would like to distinguish certain pairs of states. We specify the set of state pairs to be distinguished as a subset of T , that is, T spec ⊆ T = Q × Q .

respect to Tspec into an easy problem of checking distinguishability of the current state estimations with respect e e . The extended specification Tspec has the following to Tspec property.

We call Tspec as a specification. A state estimation x ⊆ Q is

Lemma 1 e For any pair ( q , q ' ) ∈ Q × Q , if the pair is not in Tspec , then all its reachable pairs via an observable event are also not in e : Tspec

a subset of Q . We say that x is distinguishable if ( x × x ) ∩ Tspec = φ , where φ denotes the empty set. Four types of detectabilities are investigated in [Shu, Lin, & Ying, 2007; Shu & Lin, 2010]: (1) detectability, (2) strong detectability, (3) periodic detectability, and (4) strong periodic detectability. For on-line detection studied in this paper, only strong detectability and strong periodic detectability are relevant. Definition 1 (Strong Detectability) A discrete event system G is strongly detectable with respect to P and T spec if we can distinguish state pairs in T spec after

e ( q , q ' ) ∉ Tspec e ⇒ (∀ σ ∈ Σ o )( R ({ q}, σ ) × R ({ q ' }, σ )) ∩ T spec =φ

.

The extended specification is used in [Wang, Lafortune, Lin, & Girard, 2009] for investigating observability. While observability requires that the initial state estimation is distinguishable with respect to Tspec from the beginning,

a finite number of observations, for all trajectories of the system. That is, ( ∃ n ∈ N )( ∀ s ∈ Lω ( G ))( ∀ t ∈ Pr( s )) P ( t ) > n .

detectability requires that the state estimations are distinguishable with respect to Tspec after some finite observations. Therefore, let us define the set of all possible indistinguishable state pairs after observing k observable events as: T ( x , k ) = U ( R ( x , t ) × R ( x , t ))

Definition 2 (Strong Periodic Detectability) A discrete event system G is strongly periodically detectable with respect to P and T spec if we can distinguish state pairs

where x is the current or initial state estimation. Using the set of all possible indistinguishable state pairs, we define kstep distinguishability as follows.

in T spec periodically for all trajectories of the system. That is,

Definition 3 (k-step Distinguishability) A discrete event system G is k-step distinguishable with respect to P and Tspec if we can always distinguish state

⇒ ( R ( Q 0 , P (t )) × R ( Q 0 , P ( t ))) ∩ T spec = φ

|t | = k

ω

( ∃ n ∈ N )( ∀ s ∈ L (G ))( ∀ t ∈ Pr( s ))( ∃ t '∈ Σ ) tt '∈ Pr( s ) . ∧ | P ( t ' ) |< n ∧ ( R ( Q 0 , P ( tt ' )) × R ( Q 0 , P ( tt ' ))) ∩ Tspec = φ *

3. DISTINGUISHABILITY In the previous section, we defined distinguishability for a state estimation. We will investigate the connections between detectability and distinguishability in this section. These connections will be used in the next section for on-line sensor activation. To this end, let us assume that the current or initial state estimation is x ⊆ Q . To check if all possible future state estimations are distinguishable, extended specification is introduced in [Wang, Lafortune, Lin, & Girard, 2009] as follows. e Tspec = {( q , q ' ) ∈ Q × Q : ( ∃ s , s ' ∈ Σ * ) P ( s ) = P ( s ' ) . ∧ ( f ( q , s ), f ( q ' , s ' )) ∈ T spec } e The usefulness of the extended specification Tspec is shown in the following theorem.

Theorem 1 For a discrete event system G , let the current state estimation be x ⊆ Q . The current state estimation and all possible future state estimations are distinguishable with e respect to P and T spec if and only if ( x × x ) ∩ T spec =φ. This theorem translates a difficult problem of checking distinguishability of all possible future state estimations with

e pairs in Tspec after observing k observable events, that is, e T (UR (Q 0 ), k ) ∩ Tspec =φ,

where UR ( Q 0 ) is the initial state estimation. The relation between detectability is as follows.

k-step

distinguishability

and

Theorem 2 A discrete event system G is strongly detectable with respect to P and T spec if and only if there exists a finite k such that G is k-step distinguishable with respect to P and T spec .

Theorem 2 tells us if a system is strongly detectable, then there exists a finite k such that the system is k-step distinguishable. The following algorithm allows us to find the smallest k. Algorithm 1 (find the smallest k for distinguishability) Input:

G;

Output: k ; Step 1: Set i = 0 ; Calculate T (UR ( Q 0 ), i ) = UR ( Q 0 ) × UR ( Q 0 ) ; e Step 2: If T (UR ( Q 0 ), i ) ∩ T spec = φ , then go to Step 4;

Step 3: Else, calculate T (UR ( Q 0 ), i + 1) as T (UR (Q 0 ), i + 1) = U

U

σ ∈Σ o ( q , q ')∈T ( UR ( Q 0 ), i )

R ({ q}, σ ) × R ({ q ' }, σ )

;

Set i = i + 1 ; Go to Step 2; Step 4: Set k = i ; Step 5: End. 4. SENSOR ACTIVATION In order to reduce the energy consumption of sensors or to increase the lifetime of sensors, we would like to minimize the use of sensors. That is, we would like to activate sensors as little as possible. To investigate sensor activation, we first consider state-estimation-based sensor activation policy Ω as Ω : 2 Q → 2 Σo . Let x ⊆ Q be a state estimation. Define the extended state estimation with respect to Ω as ν ( x , Ω ) = {q ∈ Q : ( ∃ q '∈ x )( ∃ s ∈ ( Σ − Ω ( x )) * ) f ( q ' , s ) = q} . Intuitively, ν ( x , Ω ) is the unobservable reach of x under Ω . We said that a state-estimation-based sensor activation mapping Ω is coherent if (∀ x ⊆ Q ) Ω ( x ) = Ω (ν ( x , Ω )) . Coherency requires that sensor activation policies of a state estimation and its unobservable reach are same because it is unreasonable to change a sensor activation policy before observing any events. From now on, we will consider only sensor activation mappings Ω that are coherent. Given a coherent sensor activation mapping Ω , we define the unobservable reach UR Ω (Q ′) , the observable reach OR Ω ( Q ′, σ ) , the reachable set R Ω ( Q ′, t ) , and the observer Ω by extending the corresponding definitions in Section 2 G obs as follows. For Q ′ ⊆ Q , the unobservable reach UR Ω (Q ′) is given by UR Ω ( Q ′) = ν ( Q ' , Ω ) . For an observable event σ ∈ Ω (Q ′) , the observable reach OR Ω (Q ′, σ ) is given as same as before OR Ω ( Q ′, σ ) = {q ∈ Q : ( ∃ q ′ ∈ Q ′) q = f ( q ′, σ )} The reachable set R Ω ( Q ′, t ) is defined recursively as R Ω ( Q ′, ε ) = UR Ω (Q ' ) R Ω ( Q ′, σ ) = UR Ω ( OR Ω (UR Ω (Q ' ), σ )) R Ω ( Q ′, s σ ) = UR Ω ( OR Ω ( R Ω ( Q ' , s ), σ )) Clearly, the set of all possible states after observing t ∈ Σ *o is

R Ω (Q 0 , t ) which is the state estimation. Furthermore, the observer under Ω is given by Ω G obs = ( X , Σ o , δ Ω , x 0 ) = Ac ( 2 Q , Σ o , δ Ω , UR Ω (Q 0 )) , where δ Ω ( x , σ ) = R Ω ( x , σ ) .

given by

State-estimation-based sensor activation mapping Ω is very useful for on-line detection and sensor activation. Therefore, in the rest of the paper, we will focus on state-estimationbased sensor activation mapping Ω . Without repeating the obvious, we can extend the definitions of detectability and the results of Section 3 from P to Ω in a straightforward manner. Our objective is to activate sensors as little as possible while ensuring detectability of a system. To formalize “as little as possible”, for two coherent sensor activation mappings Ω 1 and Ω 2 , we say that Ω 1 ≤ Ω 2 if (∀ x ∈ 2 Q ) Ω 1 ( x ) ⊆ Ω 2 ( x ) . We say that Ω 1 < Ω 2 if Ω 1 ≤ Ω 2 ∧ (∃ x ∈ 2 Q )Ω 1 ( x ) ⊂ Ω 2 ( x ) . In this sense, the maximal sensor activation policy Ω max is given by (∀ x ∈ 2 Q ) Ω max ( x ) = Σ o .

In the next two sections, we will investigate how to find minimal sensor activation mapping Ω that ensures detectability of a system. 5. ON-LINE STATE ESTIMATION AND MINIMAL SENSOR ACTIVATION We first discuss on-line state estimation and sensor activation for strong detectability. We will estimate states and determine sensor activation in a way very similar to control of linear systems where an observer will estimate the states of the system and then the appropriate control will be determined based on state estimation. Similar to linear system control, denote the state estimation after observing j observable events and before the occurrence of any new event by x ( j ) . It is not difficult to see that initially, before the occurrence of any event, x (0 ) = Q0 . Recursively, the state estimation can be updated as follows. x ( j ) = OR Ω (UR Ω ( x ( j − 1)), y ( j )) , where y ( j ) = σ ∈ Σ o is the jth event observed. Note that this update can be computed in polynomial complexity. Based on the state estimation x ( j ) , the sensor activation policy Ω ( x ( j )) is then calculated. We assume that the updating and calculation can be done quickly before the occurrence of any new event. Let us now investigate on-line sensor activation. Our objective is to activate sensors as little as possible while ensuring strong detectability of a system. We assume that the discrete event system G is strongly detectable with respect to P and T spec . Otherwise strong detectability cannot be achieved even if we activate all sensors. By Theorem 6, there exists a finite k such that G is k-step distinguishable with respect to P and T spec . In other words, if we activate all the e sensors, we will be able to distinguish state pairs in Tspec within k steps. We assume that k is known (k can be obtained using Algorithm 1). We would like to minimize sensor

activation while ensuring k-step distinguishability. Therefore, we assume that all sensors are activated to begin with, that is, we start with maximal sensor activation policy: (∀ x ∈ 2 Q ) Ω max ( x ) = Σ o . After updating to a new state estimation x ( j ) , we try to remove events from Ω max ( x ( j )) as much as possible while ensuring i-step distinguishability, where i = max{ k − j ,0} . The reason that we can do this is given in the following theorem. Theorem 3 Given x ( j ) , update state estimation as x ( j + 1) = OR Ω max (UR Ω max ( x ( j )), σ ) .

For i > 0 , we have e T (UR Ω max ( x ( j )), i ) ∩ T spec =φ e ⇒ T (UR Ω max ( x ( j + 1)), i − 1) ∩ T spec =φ

.

For i = 0 , we have e T (UR Ω max ( x ( j )), i ) ∩ T spec =φ

Theorem 9 states that if the current state estimation is i-step distinguishable, then the next state estimation is (i-1)-step distinguishable with Ω max . Therefore, after k observations, the state estimation is 0-step distinguishable and we can e . complete distinguish state pairs in T spec The following algorithm calculates the minimal sensor activation policy Ω min ( x ( j )) while ensuring i-step distinguishability, where i = max{ k − j ,0} .

Algorithm 2 (Minimal Sensor Activation for Strong Detectability) G = ( Q , Σ , f , Q 0 ) , x ( j ) , i = max{ k − j ,0} ;

Output: Ω min ( x ( j )) ; ~ Step 1: Set Ω = φ , Ω = Σ o = {σ 1 , σ 2 , L , σ

Σo

ˆ − Ω ≠ φ , then pick the event Step 2: If Ω which has the smallest subscript,

ˆ =Σ ; }, Ω o

σk

ˆ −Ω in Ω

ˆ ←Ω ˆ − {σ } ; set Ω ← Ω ∪ {σ k } , Ω k

else, go to Step 6; Step 3: If there are some unobservable loops in G with ˆ , respect to Ω ~ ˆ ←Ω then set Ω ; go to Step 2; Step 4: Calculate ~ ˆ ) * ) f ( q ' , s ) = q} ; x = {q ∈ Q : ( ∃ q '∈ x ( j ))( ∃ s ∈ ( Σ − Ω e Step 5: If T ( ~ x , i ) ∩ T spec =φ, ~ then set Ω ← Ωˆ ; ~ ˆ ←Ω else, set Ω ;

go to Step 2;

Step 7: End. Clearly Algorithm 2 is of polynomial complexity. Using Algorithms 1 and 2, on-line detection and minimal sensor activation can be done as follows. First, using Algorithm 1, we can find the smallest k such that G is k-step distinguishable with respect to P and T spec . This can be done off line. We then use Algorithm 2 on-line. Initially x ( 0 ) = Q 0 and i = k . We calculate Ω min ( x ( 0 )) and activate the corresponding sensors. After observing the first event , we update the state estimation y (1) = σ Ω Ω x (1) = OR (UR ( x ( 0 )), y (1)) . We then use Algorithm 2 with i = k − 1 , etc. After k observations, we will reach a point when i = 0 and the current state estimation and all possible future state estimations are distinguishable with respect to P and T spec . Now, let us prove that Algorithm 2 is indeed correct, that is, the sensor activation policy Ω min generated by Algorithm 2 is state-estimation-based, coherent and minimal.

e ⇒ T (UR Ω max ( x ( j + 1)), i ) ∩ T spec =φ

Input:

~ Step 6: Set Ω min ( x ( j )) = Ω ;

Theorem 4 The sensor activation policy Ω min ( x ( j )) generated by Algorithm 2 is state-estimation-based, that is, ( ∀ x ( j ), x ( j )' ) x ( j ) = x ( j )' ⇒ Ω min ( x ( j )) = Ω min ( x ( j )' ) Theorem 5 The sensor activation policy Ω min ( x ( j )) is coherent, that is, Ω min ( x ( j )) = Ω min (ν ( x ( j ), Ω min )) , and the resulting state estimation is i-step distinguishable, that is, e T (~ x , i ) ∩ Tspec = φ with ~ x = {q ∈ Q : ( ∃ q '∈ x ( j )) ; ( ∃ s ∈ ( Σ − Ω min ( x ( j )) * ) f ( q ' , s ) = q} Furthermore, Ω min ( x ( j )) is minimal in the following sense: For all other Ω ( x ( j )) , if Ω ( x ( j )) is coherent and the resulting state estimation is i-step distinguishable, then Ω ( x ( j )) ⊄ Ω min ( x ( j )) . Remark 1 The on-line sensor activation to ensure observability is investigated in [Wang, Lafortune, Lin, & Girard, 2009]. It is not difficult to see that, by properly defining the specification T spec , a language is observable if and only if the system is 0step distinguishable. Therefore, we can use Algorithm 2 online with i = 0 to find the minimal sensor activation policy that ensures observability. 6. ON-LINE MINIMAL SENSOR ACTIVATION FOR PERIODICAL DETECTABILITY If a discrete event system G is not strongly detectable with respect to P and T spec , but only strongly periodically detectable, then Algorithm 2 needs to be modified. This is because ensuring i-step distinguishability may not be possible

for a strongly periodically detectable system. Therefore, some other criterions must be used in the algorithm. One such criterion is that deactivation of sensors will not affect the state estimation. We call sensor activation policy satisfying this criterion information-preserving. Formally, a stateestimation-based sensor activation policy Ω is informationpreserving if the policy Ω satisfies: ( ∀ x ⊆ Q )ν ( x , Ω ) = ν ( x , Ω max ) . An information-preserving sensor activation policy Ω does not change the property of strong periodical detectability as stated in the following theorem. Theorem 6: For any information-preserving sensor activation policy Ω , if the discrete event system G is strongly periodically detectable with respect to Ω max and T spec , then it is strongly periodically detectable with respect to Ω and T spec . The following algorithm calculates the minimal sensor p activation policy Ω min ( x ( j )) that is information-preserving. Algorithm 3 (Minimal Sensor Activation for Strong Periodic Detectability) Input:

G = (Q , Σ , f , Q 0 ) , x ( j ) ;

p Output: Ω min ( x ( j )) ; ~ Step 1: Set Ω = φ , Ω = Σ o = {σ 1 , σ 2 , L , σ

ˆ − Ω ≠ φ , then pick the event Step 2: If Ω

Σo

σk

ˆ =Σ ; }, Ω o

ˆ −Ω in Ω

which has the smallest subscript, ˆ ←Ω ˆ − {σ } ; set Ω ← Ω ∪ {σ k } , Ω k

else, go to Step 6; Step 3: If there is some unobservable loops in G with ˆ , respect to Ω ~ ˆ ←Ω then set Ω ; go to Step 2; Step 4: Calculate ~ ˆ ) * ) f ( q ' , s ) = q} ; x = {q ∈ Q : ( ∃ q '∈ x ( j ))( ∃ s ∈ ( Σ − Ω xˆ = {q ∈ Q : ( ∃ q '∈ x ( j ))( ∃ s ∈ ( Σ − Σ o ) * ) f ( q ' , s ) = q} Step 5: If ~x = xˆ , ~ then set Ω ← Ωˆ ; ~ ˆ ←Ω else, set Ω ;

go to Step 2; ~ p Step 6: Set Ω min ( x ( j )) = Ω ; Step 7: End. Clearly Algorithm 3 is also of polynomial complexity. Using Algorithm 3, we can compute the minimal sensor activation p policy Ω min ( x ( j )) on-line in the same way as described in Section 5. Let us prove that Algorithm 3 is correct, that is, the p sensor activation policy Ω min generated by Algorithm 3 is state-estimation-based, coherent and minimal.

Theorem 7 p The sensor activation policy Ω min ( x ( j )) generated by Algorithm 3 is state-estimation-based, that is, p p (∀ x ( j ), x ( j )' ) x ( j ) = x ( j )' ⇒ Ω min ( x ( j )) = Ω min ( x ( j )' ) Theorem 8 p The sensor activation policy Ω min ( x ( j )) is coherent and p Furthermore, Ω min is information-preserving. ( x ( j )) minimal in the following sense: For all other Ω ( x ( j )) , if information-preserving then Ω ( x ( j )) is coherent and p Ω ( x ( j )) ⊄ Ω min ( x ( j )) . REFERENCES Caines P. E., Greiner R., and Wang S., "Dynamical Logic Observers for Finite Automata," Proceedings of CDC, pp.226-233, 1988. Haji-Valizadeh A. and Loparo K. A., “Minimizing the cardinality of an event set for supervisors of discreteevent dynamical systems,” IEEE Transactions on Automatic Control, 41(11), pp. 1579–1593, 1996. Lin F., “Diagnosability of discrete event systems and its applications,” Discrete Event Dynamic Systems: Theory and Applications, 4(1), pp.197-212, 1994. Lin F., and Wonham W. M., “On observability of discrete event systems,” Information Sciences, 44(3), pp.173198, 1988. Ozveren C. M., and Willsky A. S., “Observability of discrete event dynamic systems,” IEEE Transactions on Automatic Control, 35(7), pp.797-806, 1990. Ramadge P. J., and Wonham W. M., “Supervisory control of a class of discrete event processes,” SIAM J. Control and Optimization, 25(1), pp.206-230, 1987. Sampath M., Sengupta R., Lafortune S., Sinnamohideen K., and Teneketzis D., “Diagnosability of discrete event systems,” IEEE Transactions on Automatic Control, 40(9), pp. 1555-1575, 1995. Shu S., Lin F., and Ying H., “Detectability of discrete event systems,” IEEE Transactions on Automatic Control, 52(12), pp. 2356-2359, 2007. Shu S. and Lin F., “Detectability for Discrete Event Systems with dynamic event observation,” System and Control Letter, 59(1), pp. 9-17, 2010. Thorsley D. and Teneketzis D., “Active acquisition of information for diagnosis and supervisory control of discrete event systems,” Discrete Event Dynamic Systems: Theory and Applications, 17(4), pp. 531–586, 2007. Thistle J. G. and Wonham W. M., Control of infinite behaviour of finite automata, SIAM J, Control and Optimization, 32(4), pp.1075-1097, 1994. Wang W., Lafortune S., and Lin F., “Optimal sensor activation in controlled discrete event systems,” Proceedings of the 45th IEEE Conference on Decision and Control, pp. 877-882, 2008. Wang W., Lafortune S., Lin F. and Girard A. R., “An online algorithm for minimal sensor activation in discrete event systems,” Proceedings of the 46th IEEE Conference on Decision and Control, pp. 2242-2247, 2009.