10
1. Introduction The observability is an important property of a Discrete-Event System (DES). Different frameworks have been proposed to face the problems related to the study of this property. In the finite automata (FA) framework, automatons are used for modelling a DES, and the analysis of properties is typically done by linguistic approaches. Mainly, the observability notions in the FA framework consist on dividing the automata language into equivalence classes. The control techniques consider that a specification is feasible to be implemented if the classes induced by the observability are finer than those induced by the controllability. This is a class of β€œstatic observability” that does not consider the concept of an observer for progressively discover the system’s state, as part of the control scheme [6]-[12]. In Vector Additive Systems (VAS) framework, similar approaches, as those used in FA, are applied. The plant is modelled as a system of vectors, while a set of linear inequalities are the specifications. In a similar way such as in FA, the observability notions require that if two different states of a VAS produce the same output signal, then they must require the same control action. Accordingly, the observability notion in a VAS produces results that are consistent to those of FA. Consequently, a VAS does not consider the notion of an observer for reconstructing the system state [13], [14]. The design of observers in Petri Nets (PN) framework has been addressed in a fewer number of works than those presenting designs of controllers based on this modeling tool. In [16], the problem of discovering the marking of the net is addressed. The proposed scheme produces marking estimations, which are always a lower bound of the current marking of the net. In [17] and [18], the problem of discovering the marking of an Interpreted PN is considered. The sequence invariance and a geometrical approach are used for the analysis and observer design. Some related works of the authors are reported in the literature. In [1] and [4], the authors state results about the observability analysis focused on the subclass of PN’s known as Free-choice nets. In [5], the authors show that a combination of a PN observer and a supervisor allows for addressing problems that has no solution with the solely use of a supervisor, as in [14] and [15]. In [3] and [2], a framework of practical interest based on Matlab/Simulink for the study of DES, including controllers and observers, is reported. This work addresses the design of observers for a class of PN known as S-Nets. A Lyapunov criterion is proposed for the stability analysis. The major contributions of this paper are: a) polynomial algorithms for the observer construction; b) the use of a Lyapunov stability criterion for the observer characterization, and c) analysis of the stability region of the pair, system and observer. The rest of this paper is organized as follows. Section 2 provides some background notions Observers Design for Discrete-Event Systems Modelled by S-Nets Raul CAMPOS-RODRIGUEZ, Mildreth ALCARAZ-MEJIA ITESO University, Periferico Sur # 8585, Tlaquepaque, 45604, Mexico. [email protected], [email protected]. Abstract: This paper addresses the design of observers for Discrete-Event Systems modelled by Output Petri nets. The observer is conceived as a copy of the system and a corrective term based on the execution trajectories. The observer performs a tracking of the transition sequence executed by the net. Based on this information, the observer is able to produce approximations of the initial and current state of the system. The focus is a subclass of Petri nets called S-Nets. A Lyapunov criterion is used for testing the stability of the herein proposed scheme. This criterion allows for proving that the observers are asymptotically stable and it supports characterizing the region of stability of the System/Observer pair, as well. An application example is developed through the paper to illustrate the results. Some graphs are provided to show the approximation error of the observer under different initial conditions. Keywords: Observer Design, Petri Nets, S-Nets, Discrete-Event Systems, Sequence Observer, Lyapunov Stability. Studies in Informatics and Control, Vol. 26, No. 1, March 2017 http://www.sic.ici.ro 13

Observers Design for Discrete-Event Systems Modelled by S-NetsΒ Β· structure vector (𝑃𝑃,𝑇𝑇,𝐼𝐼,𝑂𝑂), 𝑀𝑀. 0. is the initial marking and πœ‘πœ‘ is the output

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Observers Design for Discrete-Event Systems Modelled by S-NetsΒ Β· structure vector (𝑃𝑃,𝑇𝑇,𝐼𝐼,𝑂𝑂), 𝑀𝑀. 0. is the initial marking and πœ‘πœ‘ is the output

1. Introduction

The observability is an important property of a Discrete-Event System (DES). Different frameworks have been proposed to face the problems related to the study of this property. In the finite automata (FA) framework, automatons are used for modelling a DES, and the analysis of properties is typically done by linguistic approaches. Mainly, the observability notions in the FA framework consist on dividing the automata language into equivalence classes. The control techniques consider that a specification is feasible to be implemented if the classes induced by the observability are finer than those induced by the controllability. This is a class of β€œstatic observability” that does not consider the concept of an observer for progressively discover the system’s state, as part of the control scheme [6]-[12].

In Vector Additive Systems (VAS) framework, similar approaches, as those used in FA, are applied. The plant is modelled as a system of vectors, while a set of linear inequalities are the specifications. In a similar way such as in FA, the observability notions require that if two different states of a VAS produce the same output signal, then they must require the same control action. Accordingly, the observability notion in a VAS produces results that are consistent to those of FA. Consequently, a VAS does not consider the notion of an observer for reconstructing the system state [13], [14]. The design of observers in Petri Nets (PN) framework has been addressed in a fewer

number of works than those presenting designs of controllers based on this modeling tool. In [16], the problem of discovering the marking of the net is addressed. The proposed scheme produces marking estimations, which are always a lower bound of the current marking of the net. In [17] and [18], the problem of discovering the marking of an Interpreted PN is considered. The sequence invariance and a geometrical approach are used for the analysis and observer design.

Some related works of the authors are reported in the literature. In [1] and [4], the authors state results about the observability analysis focused on the subclass of PN’s known as Free-choice nets. In [5], the authors show that a combination of a PN observer and a supervisor allows for addressing problems that has no solution with the solely use of a supervisor, as in [14] and [15]. In [3] and [2], a framework of practical interest based on Matlab/Simulink for the study of DES, including controllers and observers, is reported.

This work addresses the design of observers for a class of PN known as S-Nets. A Lyapunov criterion is proposed for the stability analysis. The major contributions of this paper are: a) polynomial algorithms for the observer construction; b) the use of a Lyapunov stability criterion for the observer characterization, and c) analysis of the stability region of the pair, system and observer.

The rest of this paper is organized as follows. Section 2 provides some background notions

Observers Design for Discrete-Event Systems Modelled by S-Nets

Raul CAMPOS-RODRIGUEZ, Mildreth ALCARAZ-MEJIA ITESO University, Periferico Sur # 8585, Tlaquepaque, 45604, Mexico. [email protected], [email protected].

Abstract: This paper addresses the design of observers for Discrete-Event Systems modelled by Output Petri nets. The observer is conceived as a copy of the system and a corrective term based on the execution trajectories. The observer performs a tracking of the transition sequence executed by the net. Based on this information, the observer is able to produce approximations of the initial and current state of the system. The focus is a subclass of Petri nets called S-Nets. A Lyapunov criterion is used for testing the stability of the herein proposed scheme. This criterion allows for proving that the observers are asymptotically stable and it supports characterizing the region of stability of the System/Observer pair, as well. An application example is developed through the paper to illustrate the results. Some graphs are provided to show the approximation error of the observer under different initial conditions. Keywords: Observer Design, Petri Nets, S-Nets, Discrete-Event Systems, Sequence Observer, Lyapunov Stability.

Studies in Informatics and Control, Vol. 26, No. 1, March 2017 http://www.sic.ici.ro 13

Page 2: Observers Design for Discrete-Event Systems Modelled by S-NetsΒ Β· structure vector (𝑃𝑃,𝑇𝑇,𝐼𝐼,𝑂𝑂), 𝑀𝑀. 0. is the initial marking and πœ‘πœ‘ is the output

on PN and on the sequence detection in S-Nets. The major contribution of this work is in sections 3 and 4. Section 3 details the proposed observer scheme and the metric space for the measurement of its error. Section 4 proposes a

functional term based on the number of sequences that the observer is tracking at every step. It also shows that the observer satisfies the Lyapunov stability criteria. An example at the end of this section illustrates the developed technique. Section 5 provides the conclusions and finally, are the bibliographical references.

2. Background

This section shows basic PN notions, and briefly reviews the main results on sequence-detectability that are relevant for this work.

Output Petri Nets An OPN is a tuple (𝐡𝐡,𝑀𝑀0,πœ‘πœ‘) where 𝐡𝐡 is a PN structure (𝑃𝑃,𝑇𝑇, 𝐼𝐼,𝑂𝑂), 𝑀𝑀0 is the initial marking and πœ‘πœ‘ is the output function. For simplicity, 𝐡𝐡 also stands for the incidence matrix of the PN structure. The pre-set β‹„ 𝑑𝑑𝑗𝑗 and post-set 𝑑𝑑𝑗𝑗 β‹„ of a transition 𝑑𝑑𝑗𝑗 ∈ 𝑇𝑇 are as usual. Likewise, are the pre-set β‹„ 𝑝𝑝𝑖𝑖 and post-set 𝑝𝑝𝑖𝑖 β‹„ of a place 𝑝𝑝𝑖𝑖 ∈ 𝑃𝑃. The operator β‹„ is extended in a natural way for sets. This work deals with well-formed nets, which in summary are strongly connected, conservative and repetitive nets [19]. The compact representation of a marking π‘€π‘€π‘˜π‘˜{π‘₯π‘₯𝑝𝑝𝑖𝑖} for π‘€π‘€π‘˜π‘˜(𝑝𝑝𝑖𝑖) = π‘₯π‘₯, with 𝑝𝑝𝑖𝑖 ∈ 𝑃𝑃 and π‘₯π‘₯ ∈ β„•+, is as in [1]. The state equation of an OPN is:

π‘€π‘€π‘˜π‘˜+1 = π‘€π‘€π‘˜π‘˜ + 𝐡𝐡𝑒𝑒�⃗ π‘˜π‘˜ , π‘¦π‘¦π‘˜π‘˜ = πœ‘πœ‘(π‘€π‘€π‘˜π‘˜) (1)

The notation π‘€π‘€π‘˜π‘˜ β†’π‘‘π‘‘π‘—π‘—π‘€π‘€π‘˜π‘˜+1 means that from π‘€π‘€π‘˜π‘˜

the transition 𝑑𝑑𝑗𝑗 is fired reaching π‘€π‘€π‘˜π‘˜+1. A net is safe if βˆ€π‘€π‘€π‘˜π‘˜ ∈ 𝑅𝑅(𝐡𝐡,𝑀𝑀0), it holds that π‘€π‘€π‘˜π‘˜(𝑝𝑝𝑖𝑖) ≀1,βˆ€π‘π‘π‘–π‘– ∈ 𝑃𝑃, and non-safe otherwise. The length of a sequence of transitions 𝜎𝜎 is denoted by |𝜎𝜎|. This sequence or trajectory is denoted by 𝑀𝑀0 β†’

πœŽπœŽπ‘€π‘€π‘ π‘ .

As in the automata theory, πœŽπœŽβˆ— denotes the Kleen closure of a sequence 𝜎𝜎, which extends in a natural way to sets [20]. The output word associated to a sequence 𝜎𝜎, defined as πœ‘πœ‘(𝜎𝜎) = πœ‘πœ‘(π‘€π‘€π‘˜π‘˜)πœ‘πœ‘(π‘€π‘€π‘˜π‘˜+1) β€¦πœ‘πœ‘(π‘€π‘€π‘˜π‘˜+π‘Ÿπ‘Ÿ)πœ‘πœ‘(π‘€π‘€π‘˜π‘˜+𝑠𝑠), is the information that an external observer is able to detect from an OPN.

Thus, by (1) πœ‘πœ‘π‘€π‘€π‘˜π‘˜+1 = πœ‘πœ‘π‘€π‘€π‘˜π‘˜ + πœ‘πœ‘π΅π΅π‘’π‘’οΏ½βƒ— π‘˜π‘˜. The vector πœ‘πœ‘π΅π΅π‘’π‘’οΏ½βƒ— π‘˜π‘˜, denoted by πœ‘πœ‘π΅π΅(𝑒𝑒�⃗ π‘˜π‘˜), is the change, or increment, in the system sensors due to the firing of π‘’π‘’π‘˜π‘˜, which the observer tries approximate. Notice that it is possible πœ‘πœ‘π΅π΅οΏ½π‘‘π‘‘π‘–π‘–οΏ½ = 0, while 𝐡𝐡𝑑𝑑𝑖𝑖 β‰  0. The transition 𝑑𝑑𝑖𝑖 is known as silent [11]. This class of transitions are out of the scope of this work. For additional notions about PN see [19].

Sequence Detectability in S-Nets This work is devoted to the design of an observer for tracking the transition sequence executed by an OPN. The Sequence-Detectability (SD) is a useful concept. An efficient solution for the SD is derived in [1] on Output S-System (OSS), as the one shown in Figure 1. A first step in the testing of the SD is the construction of the Event-Detectability (ED) table 𝐸𝐸𝐡𝐡. Given a safe OSS (𝐡𝐡,𝑀𝑀0,πœ‘πœ‘), with 𝑇𝑇 = {𝑑𝑑1, … , 𝑑𝑑𝑛𝑛}, 𝐸𝐸𝐡𝐡 is a square arrangement [𝑛𝑛 βˆ’ 1 Γ— 𝑛𝑛 βˆ’ 1], where columns represent transitions from 𝑑𝑑1 to π‘‘π‘‘π‘›π‘›βˆ’1 and rows represent transitions from 𝑑𝑑2 to 𝑑𝑑𝑛𝑛. The entries of 𝐸𝐸𝐡𝐡, for 2 ≀ 𝑖𝑖 ≀ 𝑛𝑛; 1 ≀ 𝑗𝑗 ≀ 𝑛𝑛 βˆ’ 1; 𝑗𝑗 < 𝑖𝑖, are defined as follows:

𝑖𝑖𝑖𝑖 πœ‘πœ‘π΅π΅οΏ½π‘‘π‘‘π‘–π‘–οΏ½ β‰  πœ‘πœ‘π΅π΅οΏ½π‘‘π‘‘π‘—π‘—οΏ½, π‘‘π‘‘β„Žπ‘’π‘’π‘›π‘› 𝐸𝐸𝐡𝐡�𝑑𝑑𝑖𝑖, 𝑑𝑑𝑗𝑗� = βˆ… π‘œπ‘œπ‘‘π‘‘β„Žπ‘’π‘’π‘’π‘’π‘’π‘’π‘–π‘–π‘’π‘’π‘’π‘’,𝐸𝐸𝐡𝐡�𝑑𝑑𝑖𝑖, 𝑑𝑑𝑗𝑗� = ⋃{𝑑𝑑𝑒𝑒, 𝑑𝑑𝑣𝑣}βˆ€π‘‘π‘‘π‘’π‘’ ∈ (𝑑𝑑𝑖𝑖 β‹„) β‹„,βˆ€π‘‘π‘‘π‘£π‘£ ∈ �𝑑𝑑𝑗𝑗 β‹„οΏ½ β‹„

(2)

The Table 1 shows 𝐸𝐸𝐡𝐡 for the net in Figure 1. A further refinement of 𝐸𝐸𝐡𝐡 leads to the Sequence-Detectability (SD) table 𝐸𝐸𝐡𝐡𝑠𝑠 . The entries of 𝐸𝐸𝐡𝐡𝑠𝑠

p11

p21

p31

p41

p51

p61

p71

p81

p91

p101

p22

p32

p42

p52

p62

p72

p82

p92

p12

p13

p23

p33

p43

p53

p63

p73

p83

p14

p24

p34

p44

p54

p64

p74

p15

p25

p35

p45

p55

p65

t21

t31

t41

t51

t61

t71

t81

t91

t101

t11

t111 t10

2

t12

t22

t32

t42

t52

t62

t72

t82

t92

t13

t23

t33

t43

t53

t63

t73

t83

t93

t14

t24

t34

t44

t54

t64

t74

t84

t15

t25

t35

t45

t55

t65

t75

p16

J

C

F

H

L

A2

D/A1

A1

C

F

G/A2

I/A2

K/A2

A3

A5A4

C

D/A3

G/A1

I/A1

K/A1

F

G/A3

H

I/A3

J

C

D/A5

F

H

G/A5

D/A2

H

J

C

D/A4

F

G/A4

H

I/A4

Z

Figure 1. A well-formed OSS.

http://www.sic.ici.ro Studies in Informatics and Control, Vol. 26, No. 1, March 2017 14

Page 3: Observers Design for Discrete-Event Systems Modelled by S-NetsΒ Β· structure vector (𝑃𝑃,𝑇𝑇,𝐼𝐼,𝑂𝑂), 𝑀𝑀. 0. is the initial marking and πœ‘πœ‘ is the output

are obtained from the entries in 𝐸𝐸𝐡𝐡 by a repetitive procedure as follows:

𝐸𝐸𝐡𝐡𝑠𝑠�𝑑𝑑𝑖𝑖, 𝑑𝑑𝑗𝑗� = 𝐸𝐸𝐡𝐡�𝑑𝑑𝑖𝑖, 𝑑𝑑𝑗𝑗� βˆ– (𝑑𝑑𝑒𝑒, 𝑑𝑑𝑣𝑣) 𝑖𝑖𝑖𝑖𝑖𝑖 𝐸𝐸𝐡𝐡(𝑑𝑑𝑒𝑒, 𝑑𝑑𝑣𝑣) = βˆ… π‘Žπ‘Žπ‘›π‘›π‘Žπ‘Ž π‘π‘π‘œπ‘œπ‘‘π‘‘β„Ž,β‹„ 𝑑𝑑𝑖𝑖 βˆ©β‹„ 𝑑𝑑𝑗𝑗 = βˆ… π‘Žπ‘Žπ‘›π‘›π‘Žπ‘Ž 𝑑𝑑𝑖𝑖 β‹„βˆ© 𝑑𝑑𝑗𝑗 β‹„= βˆ…

(3)

The definition (3) is recursively applied until no new empty entries appear. In [1], the authors shown that the non-empty entries in 𝐸𝐸𝐡𝐡𝑠𝑠 lead to circuits of transitions, denoted by Δ𝐸𝐸𝐡𝐡𝑠𝑠 , that are closely related to the SD of the net. Theorem 1. A safe OSS (𝐡𝐡,𝑀𝑀0,πœ‘πœ‘) is SD if and only if Δ𝐸𝐸𝐡𝐡𝑠𝑠 = βˆ…. ∎ Proposition 1. Let 𝐸𝐸𝐡𝐡𝑠𝑠 be the SD table of the OSS (𝐡𝐡,𝑀𝑀0,πœ‘πœ‘). Then, for any nonempty entry 𝐸𝐸𝐡𝐡𝑠𝑠�𝑑𝑑𝑔𝑔, π‘‘π‘‘β„ŽοΏ½ there exist a pair of circuits, say πœŽπœŽπ‘”π‘” and πœŽπœŽβ„Ž, such that πœ‘πœ‘οΏ½πœŽπœŽπ‘”π‘”οΏ½ = πœ‘πœ‘(πœŽπœŽβ„Ž). ∎ When an OSS is non-safe, the results of the safe nets have to be extended. Theorem 2. Let (𝐡𝐡,𝑀𝑀0,πœ‘πœ‘) be a non-safe OSS. Then, the net is SD if and only if 𝐸𝐸𝐡𝐡 is empty. ∎

Observability in S-Nets Besides the tracking of the transition sequence of an OSS, in some cases, the observer is able to determine the marking of the net. Informally, an OPN (𝐡𝐡,𝑀𝑀0,πœ‘πœ‘) is observable if its initial and current markings, 𝑀𝑀0 and 𝑀𝑀𝑠𝑠 respectively, could be determined in finite time, by using the information of the output word πœ‘πœ‘(𝜎𝜎) and the structure of (𝐡𝐡,𝑀𝑀0,πœ‘πœ‘). The Firing-Vector-Detectability (FVD) and the

Marking-Detectability (MD) are sufficient conditions for the Observability in a PN. Proposition 2. An OPN (𝐡𝐡,𝑀𝑀0,πœ‘πœ‘), which is FVD and MD, is Observable. ∎ For the case of OSS nets, the ED and the SD lead to efficient solutions of the FVD and the MD. Proposition 3. If a well-formed and safe OSS (𝐡𝐡,𝑀𝑀0,πœ‘πœ‘) is SD then, it is also MD. ∎ Thus, the next holds for the observability. Corollary 1. If a well-formed and safe OSS is SD, then it is observable. When the OSS is non-safe, the next theorem shows how 𝐸𝐸𝐡𝐡 allows for testing the SD. Theorem 3. Let (𝐡𝐡,𝑀𝑀0,πœ‘πœ‘) be a non-safe OSS. Then, the net is SD if and only if 𝐸𝐸𝐡𝐡 is empty. ∎ The SD, as in the case of safe nets, does not directly imply the MD in a non-safe OSS. Theorem 4. A non-safe OSS (𝐡𝐡,𝑀𝑀0,πœ‘πœ‘) is MD if and only if π‘˜π‘˜π‘’π‘’π‘’π‘’πœ‘πœ‘ = βˆ…. ∎ Corollary 2. Let (𝐡𝐡,𝑀𝑀0,πœ‘πœ‘) be a non-safe OSS. Then (𝐡𝐡,𝑀𝑀0,πœ‘πœ‘) is observable if and only if kerπœ‘πœ‘ = βˆ…. ∎

3. Observer Design

Consider Figure 2, which depicts the block diagram of the proposed observer scheme. The observer is designed as a copy of the system plus a corrective term, as shown.

Table 1. Event-Detectability table of a well-formed OSS.

t21 { }

t31 { } { }

t41 { } { } { }

t51 { } { } { } { }

t61 { } { } { } { } { }

t71 { } { } { } { } { } { }

t81 { } { } { } { } { } { } { }

t91 { } { } { } { } { } { } { } { }

t101 { } { } { } { } { } { } { } { } { }

t111 { } { } { } { } { } { } { } { } { } { }

t121 { } { } { } { } { } { } { } { } { } { } { }

t12 { } { } { } { } { } { } { } { } { } { } { } { }

t22 { } { } { } { } { } { } { } { } { } { } { } { } { }

t32 { } { } {t4

2,t41} { } { } { } { } { } { } { } { } { } { } { }

t42 { } { } { } {t5

2,t51} { } { } { } { } { } { } { } { } { } { } { }

t52 { } { } { } { } {t6

2,t61} { } { } { } { } { } { } { } { } { } { } { }

t62 { } { } { } { } { } {t7

2,t71} { } { } { } { } { } { } { } { } { } { } { }

t72 { } { } { } { } { } { } {t8

2,t81} { } { } { } { } { } { } { } { } { } { } { }

t82 { } { } { } { } { } { } { } {t9

2,t91} { } { } { } { } { } { } { } { } { } { } { }

t92 { } { } { } { } { } { } { } { } {t10

2,t101} { } { } { } { } { } { } { } { } { } { } { }

t102 { } { } { } { } { } { } { } { } { } {t11

2,t111} { } { } { } { } { } { } { } { } { } { } { }

t112 { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { }

t13 { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { }

t23 { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { }

t33 { } { } {t4

3,t41} { } { } { } { } { } { } { } { } { } { } { } {t4

3,t42} { } { } { } { } { } { } { } { } { } { }

t43 { } { } { } {t5

3,t51} { } { } { } { } { } { } { } { } { } { } { } {t5

3,t52} { } { } { } { } { } { } { } { } { } { }

t53 { } { } { } { } {t6

3,t61} { } { } { } { } { } { } { } { } { } { } { } {t6

3,t62} { } { } { } { } { } { } { } { } { } { }

t63 { } { } { } { } { } {t7

3,t71} { } { } { } { } { } { } { } { } { } { } { } {t7

3,t72} { } { } { } { } { } { } { } { } { } { }

t73 { } { } { } { } { } { } {t8

3,t81} { } { } { } { } { } { } { } { } { } { } { } {t8

3,t82} { } { } { } { } { } { } { } { } { } { }

t83 { } { } { } { } { } { } { } {t9

3,t91} { } { } { } { } { } { } { } { } { } { } { } {t9

3,t92} { } { } { } { } { } { } { } { } { } { }

t93 { } { } { } { } { } { } { } { } {t10

3,t101} { } { } { } { } { } { } { } { } { } { } { } {t10

3,t102} { } { } { } { } { } { } { } { } { } { }

t103 { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { }

t14 { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { }

t24 { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { } { }

t34 { } { } {t4

4,t41} { } { } { } { } { } { } { } { } { } { } { } {t4

4,t42} { } { } { } { } { } { } { } { } { } { } {t4

4,t43} { } { } { } { } { } { } { } { } { }

t44 { } { } { } {t5

4,t51} { } { } { } { } { } { } { } { } { } { } { } {t5

4,t52} { } { } { } { } { } { } { } { } { } { } {t5

4,t53} { } { } { } { } { } { } { } { } { }

t54 { } { } { } { } {t6

4,t61} { } { } { } { } { } { } { } { } { } { } { } {t6

4,t62} { } { } { } { } { } { } { } { } { } { } {t6

4,t63} { } { } { } { } { } { } { } { } { }

t64 { } { } { } { } { } {t7

4,t71} { } { } { } { } { } { } { } { } { } { } { } {t7

4,t72} { } { } { } { } { } { } { } { } { } { } {t7

4,t73} { } { } { } { } { } { } { } { } { }

t74 { } { } { } { } { } { } {t8

4,t81} { } { } { } { } { } { } { } { } { } { } { } {t8

4,t82} { } { } { } { } { } { } { } { } { } { } {t8

4,t83} { } { } { } { } { } { } { } { } { }

t84 { } { } { } { } { } { } { } {t9

4,t91} { } { } { } { } { } { } { } { } { } { } { } {t9

4,t92} { } { } { } { } { } { } { } { } { } { } {t9

4,t93} { } { } { } { } { } { } { } { } { }

t11 t2

1 t31 t4

1 t51 t6

1 t71 t8

1 t91 t10

1 t111 t12

1 t12 t2

2 t32 t4

2 t52 t6

2 t72 t8

2 t92 t10

2 t112 t1

3 t23 t3

3 t43 t5

3 t63 t7

3 t83 t9

3 t103 t1

4 t24 t3

4 t44 t5

4 t64 t7

4

Studies in Informatics and Control, Vol. 26, No. 1, March 2017 http://www.sic.ici.ro 15

Page 4: Observers Design for Discrete-Event Systems Modelled by S-NetsΒ Β· structure vector (𝑃𝑃,𝑇𝑇,𝐼𝐼,𝑂𝑂), 𝑀𝑀. 0. is the initial marking and πœ‘πœ‘ is the output

Definition 1. Let (𝐡𝐡,𝑀𝑀0,πœ‘πœ‘) be the OPN as in (1). The equation of the Observer (𝐡𝐡,𝑀𝑀�0,πœ‘πœ‘) is:

π‘€π‘€οΏ½π‘˜π‘˜+1 = π‘€π‘€οΏ½π‘˜π‘˜ + 𝐡𝐡𝑒𝑒�⃗ π‘˜π‘˜ + β„“(π‘¦π‘¦οΏ½π‘˜π‘˜ βˆ’ π‘¦π‘¦π‘˜π‘˜)π‘¦π‘¦οΏ½π‘˜π‘˜ = πœ‘πœ‘π‘€π‘€οΏ½π‘˜π‘˜

(4)

The term β„“(π‘¦π‘¦οΏ½π‘˜π‘˜ βˆ’ π‘¦π‘¦π‘˜π‘˜) is denoted as β„“π‘˜π‘˜ where no confusion arises. The error π‘’π‘’π‘˜π‘˜ between the system and the observer is π‘’π‘’π‘˜π‘˜ = π‘€π‘€οΏ½π‘˜π‘˜ βˆ’π‘€π‘€π‘˜π‘˜. Hence, π‘’π‘’π‘˜π‘˜+1 = π‘€π‘€οΏ½π‘˜π‘˜+1 βˆ’π‘€π‘€π‘˜π‘˜+1. From (1) and (4), π‘’π‘’π‘˜π‘˜+1 = π‘€π‘€οΏ½π‘˜π‘˜ + 𝐡𝐡𝑒𝑒�⃗ π‘˜π‘˜ + β„“π‘˜π‘˜οΏ½πœ‘πœ‘π‘€π‘€οΏ½π‘˜π‘˜ βˆ’ πœ‘πœ‘π‘€π‘€π‘˜π‘˜οΏ½ βˆ’(π‘€π‘€π‘˜π‘˜ + 𝐡𝐡𝑒𝑒�⃗ π‘˜π‘˜). By expanding and rearranging the terms, it leads to π‘’π‘’π‘˜π‘˜+1 = οΏ½π‘€π‘€οΏ½π‘˜π‘˜ βˆ’π‘€π‘€π‘˜π‘˜οΏ½ βˆ’β„“π‘˜π‘˜πœ‘πœ‘οΏ½π‘€π‘€οΏ½π‘˜π‘˜ βˆ’π‘€π‘€π‘˜π‘˜οΏ½ = π‘’π‘’π‘˜π‘˜ βˆ’ β„“π‘˜π‘˜πœ‘πœ‘π‘’π‘’π‘˜π‘˜. Thus, the equation defining the dynamics of the error system for Figure 2 is as follows: π‘’π‘’π‘˜π‘˜+1 = (1 βˆ’ β„“π‘˜π‘˜πœ‘πœ‘)π‘’π‘’π‘˜π‘˜ (5)

The initial error in (5) is 𝑒𝑒0 = 𝑀𝑀�0 βˆ’π‘€π‘€0, where 𝑀𝑀�0 is an initial estimation, or β€œguess”, of the observer. In order to emphasize the initial error 𝑒𝑒0, let (𝐸𝐸, 𝑒𝑒0) denotes the system (5). Notice that a β€œtrajectory”, say π‘’π‘’π‘˜π‘˜ β†’

πœŒπœŒπ‘˜π‘˜π‘’π‘’π‘˜π‘˜+1, occurs in (5)

if and only if π‘’π‘’π‘˜π‘˜ = π‘€π‘€οΏ½π‘˜π‘˜ βˆ’π‘€π‘€π‘˜π‘˜ and π‘’π‘’π‘˜π‘˜+1 =π‘€π‘€οΏ½π‘˜π‘˜+1 βˆ’π‘€π‘€π‘˜π‘˜+1, such that πœŽπœŽοΏ½π‘˜π‘˜ ∈

ℒ�𝐡𝐡,𝑀𝑀�0οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½:π‘€π‘€οΏ½π‘˜π‘˜ β†’πœŽπœŽοΏ½π‘˜π‘˜π‘€π‘€οΏ½π‘˜π‘˜+1 and πœŽπœŽπ‘˜π‘˜ ∈

β„’(𝐡𝐡,𝑀𝑀0)οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½:π‘€π‘€π‘˜π‘˜ β†’πœŽπœŽπ‘˜π‘˜π‘€π‘€π‘˜π‘˜+1. Let β„’(𝐸𝐸, 𝑒𝑒0) be the set

of all the trajectories of (5). In this context, we say that πœŒπœŒπ‘˜π‘˜ ∈ β„’(𝐸𝐸, 𝑒𝑒0) corresponds to πœŽπœŽπ‘˜π‘˜ and πœŽπœŽοΏ½π‘˜π‘˜ in the system and observer, respectively. Thus, a sequence in (5) may be empty, single or infinite, where β„’(𝐸𝐸, 𝑒𝑒0)οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½ is the middle set of β„’(𝐸𝐸, 𝑒𝑒0), as with an OPN.

Observer Metrics In order to measure the error of the system (5), the following notions are considered. Let π‘šπ‘š be the number of places of the OPN (𝐡𝐡,𝑀𝑀0,πœ‘πœ‘). The Manhattan distance 𝜌𝜌 of 𝑒𝑒, 𝑣𝑣 ∈ β„•π‘šπ‘š, here denoted by ‖𝑒𝑒 βˆ’ 𝑣𝑣‖, is defined as usual:

𝜌𝜌(𝑒𝑒, 𝑣𝑣) = οΏ½ |𝑒𝑒(𝑖𝑖) βˆ’ 𝑣𝑣(𝑖𝑖)|π‘šπ‘š

𝑖𝑖=1 (6)

The distance from an element 𝑒𝑒 ∈ β„•π‘šπ‘š to a set 𝑉𝑉 βŠ† β„•π‘šπ‘š is 𝜌𝜌(𝑒𝑒,𝑉𝑉) = min{‖𝑒𝑒 βˆ’ 𝑣𝑣‖:𝑣𝑣 ∈ 𝑉𝑉}. Definition 2. The r-neighbourhood of a subset β„³ βŠ‚ β„•π‘šπ‘š is 𝑆𝑆(β„³, 𝑒𝑒) ∢= {𝑒𝑒 ∈ β„•π‘šπ‘š: 0 <‖𝑒𝑒 βˆ’ 𝑣𝑣‖ < 𝑒𝑒} for some 𝑒𝑒 > 0. Since 𝜌𝜌 is defined in β„•π‘šπ‘š, then it is supposed that 𝑒𝑒 ∈ β„€+. The subset β„³ βŠ‚ β„•π‘šπ‘š is said to be invariant w.r.t. (𝐸𝐸, 𝑒𝑒0), if firstly, 𝑒𝑒0 ∈ β„³, where 𝑒𝑒0 = �𝑀𝑀�0 βˆ’π‘€π‘€0οΏ½. Secondly, βˆ€π‘’π‘’π‘˜π‘˜ ∈ β„•π‘šπ‘š

such that 𝑒𝑒0 β†’πœπœπ‘˜π‘˜π‘’π‘’π‘˜π‘˜. Then, necessarily π‘’π‘’π‘˜π‘˜ ∈ β„³,

for every π‘˜π‘˜ > 0, whenever exists an infinite sequence 𝛾𝛾 in (5), that follows from πœπœπ‘˜π‘˜, i.e., 𝑒𝑒0 β†’

πœπœπ‘˜π‘˜π‘’π‘’π‘˜π‘˜ β†’

𝛾𝛾⋯. Notice that 𝛾𝛾 implies the

existence of infinite sequences, say 𝛼𝛼 and 𝛽𝛽, such that πœŽπœŽπ‘˜π‘˜Ξ± ∈ β„’(𝐡𝐡,𝑀𝑀0) and πœŽπœŽοΏ½π‘˜π‘˜π›½π›½ βˆˆβ„’οΏ½π΅π΅,𝑀𝑀�0οΏ½, respectively, where πœŽπœŽπ‘˜π‘˜ and πœŽπœŽοΏ½π‘˜π‘˜ are related to πœπœπ‘˜π‘˜. In other words, a subset β„³ βŠ‚ β„•π‘šπ‘š is invariant w.r.t. (𝐸𝐸, 𝑒𝑒0) if a) 𝑒𝑒0 belongs to β„³ and, b) for any π‘’π‘’π‘˜π‘˜ β€œreachable” from 𝑒𝑒0 by a finite trajectory πœπœπ‘˜π‘˜ ,π‘˜π‘˜ β‰₯ 0, then π‘’π‘’π‘˜π‘˜ also belongs to β„³, whenever exist an infinite trajectory 𝛾𝛾 β€œfollowing to” πœπœπ‘˜π‘˜ in (𝐸𝐸, 𝑒𝑒0). Notice that if an OSS (𝐡𝐡,𝑀𝑀0,πœ‘πœ‘) is well-formed, then for every 𝜎𝜎 ∈ β„’(𝐡𝐡,𝑀𝑀0): |𝜎𝜎| < ∞, it always exists another infinite sequence, say 𝛼𝛼 ∈ β„’(𝐡𝐡,𝑀𝑀0)οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½, such that πœŽπœŽπ›Όπ›Ό ∈ β„’(𝐡𝐡,𝑀𝑀0) (by Prop. 8.2 Home markings of live S-Nets [19]). Thus, the later requirement is trivially satisfied. Suppose that the structure (𝐡𝐡,𝑀𝑀0,πœ‘πœ‘) of the OSS is known and the net is SD. Thus, if 𝑒𝑒0 =0, i.e. 𝑀𝑀0 = 𝑀𝑀�0, then π‘’π‘’π‘˜π‘˜+1 = 0 for any π‘˜π‘˜ β‰₯ 0. On the contrary, suppose that for some π‘˜π‘˜ > 0, where π‘’π‘’π‘˜π‘˜ β†’

πœπœπ‘˜π‘˜π‘’π‘’π‘˜π‘˜+1 for πœπœπ‘˜π‘˜ ∈ β„’(𝐸𝐸, 𝑒𝑒0)οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½, with π‘’π‘’π‘˜π‘˜ =

0 and |πœπœπ‘˜π‘˜| = 1, it holds that π‘’π‘’π‘˜π‘˜+1 > 0. Then,

there must exist πœŽπœŽοΏ½π‘˜π‘˜ ∈ ℒ�𝐡𝐡,𝑀𝑀�0οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½:π‘€π‘€οΏ½π‘˜π‘˜ β†’πœŽπœŽοΏ½π‘˜π‘˜π‘€π‘€οΏ½π‘˜π‘˜+1

and

πœŽπœŽπ‘˜π‘˜ ∈ β„’(𝐡𝐡,𝑀𝑀0)οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½:π‘€π‘€π‘˜π‘˜ β†’πœŽπœŽπ‘˜π‘˜π‘€π‘€π‘˜π‘˜+1, where |πœŽπœŽοΏ½π‘˜π‘˜| = 1

and |πœŽπœŽπ‘˜π‘˜| = 1, with π‘’π‘’π‘˜π‘˜ = π‘€π‘€π‘˜π‘˜ βˆ’π‘€π‘€οΏ½π‘˜π‘˜ and π‘’π‘’π‘˜π‘˜+1 =π‘€π‘€οΏ½π‘˜π‘˜+1 βˆ’π‘€π‘€π‘˜π‘˜+1, corresponding to πœπœπ‘˜π‘˜. Let say, without loss of generality, that πœŽπœŽπ‘˜π‘˜ = π‘‘π‘‘π‘˜π‘˜ and πœŽπœŽοΏ½π‘˜π‘˜ = οΏ½Μ‚οΏ½π‘‘π‘˜π‘˜. Thus, since π‘’π‘’π‘˜π‘˜+1 > 0, it implies that π‘€π‘€οΏ½π‘˜π‘˜+1 β‰  π‘€π‘€π‘˜π‘˜+1. But, the structure of the OSS (𝐡𝐡,𝑀𝑀0,πœ‘πœ‘) is known, and since the observer has wrongly computed π‘€π‘€οΏ½π‘˜π‘˜+1 when π‘’π‘’π‘˜π‘˜ = 0, this directly implies that there must exists in the net at least one transition besides of π‘‘π‘‘π‘˜π‘˜, say π‘‘π‘‘π‘˜π‘˜β€² ∈ 𝑇𝑇, such that πœ‘πœ‘π΅π΅(π‘‘π‘‘π‘˜π‘˜β€² ) = πœ‘πœ‘π΅π΅(π‘‘π‘‘π‘˜π‘˜) where [π‘€π‘€π‘˜π‘˜βŸ©π‘‘π‘‘π‘˜π‘˜β€² , and [π‘€π‘€π‘˜π‘˜βŸ©π‘‘π‘‘π‘˜π‘˜. However, if the net is safe,

Mk+1 = Mk + Buk Ο•Mk

ek

yk

Mk+1 = Mk + Buk + l(yk - yk)Mk

-+

Ο•

-+

^ ^^

uk

yk^

Observer

^

System

Figure 2. Observer Scheme

http://www.sic.ici.ro Studies in Informatics and Control, Vol. 26, No. 1, March 2017 16

Page 5: Observers Design for Discrete-Event Systems Modelled by S-NetsΒ Β· structure vector (𝑃𝑃,𝑇𝑇,𝐼𝐼,𝑂𝑂), 𝑀𝑀. 0. is the initial marking and πœ‘πœ‘ is the output

then β‹„ π‘‘π‘‘π‘˜π‘˜β€² =β‹„ π‘‘π‘‘π‘˜π‘˜, which directly contradicts the SD of the net. On the other hand, if the OSS is non-safe, then πœ‘πœ‘π΅π΅(π‘‘π‘‘π‘˜π‘˜β€² ) = πœ‘πœ‘π΅π΅(π‘‘π‘‘π‘˜π‘˜) directly contradicts the ED of the net. Thus, οΏ½0οΏ½βƒ— οΏ½ is invariant w.r.t. (𝐸𝐸, 𝑒𝑒0), as stated. The Lyapunov stability criterion for (𝐸𝐸, 𝑒𝑒0), valid in the metric space (β„•π‘šπ‘š,𝜌𝜌), is as follows. Definition 3. A closed invariant set β„³ βŠ‚ β„•π‘šπ‘š of the error system (5) is stable in the sense of Lyapunov w.r.t. β„’(𝐸𝐸, 𝑒𝑒0), if for every πœ€πœ€ > 0, it is possible to find 𝛿𝛿 > 0, such that whenever 𝜌𝜌(𝑒𝑒0,β„³) < 𝛿𝛿, it holds that 𝜌𝜌(π‘’π‘’π‘˜π‘˜ ,β„³) < πœ€πœ€, where 𝑒𝑒0 β†’

πœŒπœŒπ‘˜π‘˜π‘’π‘’π‘˜π‘˜, for all π‘˜π‘˜ > 0. If furthermore,

𝜌𝜌(π‘’π‘’π‘˜π‘˜ ,β„³) β†’ 0 as π‘˜π‘˜ β†’ ∞, then β„³ is asymptotically stable. The region of asymptotic stability of β„³ is the subset β„³π‘Žπ‘Ž βŠ‚ β„•π‘šπ‘š of all �̅�𝑒0 ∈ β„•π‘šπ‘š for which β„³ is asymptotically stable. The next theorem provides a necessary and sufficient condition to verify asymptotic stability in a neighbourhood of (𝐸𝐸, 𝑒𝑒0). See [21] for the formal proof. Theorem 5. Let (𝐸𝐸, 𝑒𝑒0) be the error system in (5) and let β„³ = οΏ½0οΏ½βƒ— οΏ½. Then, β„³ is asymptotically stable in the sense of Lyapunov w.r.t. β„’(𝐸𝐸, 𝑒𝑒0) if and only if in a sufficiently small neighbourhood 𝑆𝑆(β„³, 𝑒𝑒), there exist a functional π‘‰π‘‰π‘˜π‘˜ fulfilling:

i. For all sufficiently small 𝑐𝑐1 > 0 it is possible to find a 𝑐𝑐2 > 0, such that when π‘‰π‘‰π‘˜π‘˜ > 𝑐𝑐2 it holds that 𝜌𝜌(π‘’π‘’π‘˜π‘˜ ,β„³) >𝑐𝑐1 for π‘’π‘’π‘˜π‘˜ ∈ 𝑆𝑆(β„³, 𝑒𝑒);

ii. For any 𝑐𝑐4 > 0 as small as required, it is possible to find a 𝑐𝑐3 > 0 so small such that when 𝜌𝜌(π‘’π‘’π‘˜π‘˜ ,β„³) < 𝑐𝑐3 it holds that π‘‰π‘‰π‘˜π‘˜ ≀ 𝑐𝑐4 for π‘’π‘’π‘˜π‘˜ ∈ 𝑆𝑆(β„³, 𝑒𝑒);

iii. π‘‰π‘‰π‘˜π‘˜ is a non-increasing function for all π‘˜π‘˜ > 0, as long as 𝑒𝑒0 β†’

πœπœπ‘˜π‘˜π‘’π‘’π‘˜π‘˜ with π‘’π‘’π‘˜π‘˜ ∈

𝑆𝑆(β„³, 𝑒𝑒) for which exist an infinite trajectory 𝛾𝛾 such that 𝑒𝑒0 β†’

πœπœπ‘˜π‘˜π‘’π‘’π‘˜π‘˜ β†’

𝛾𝛾⋯;

iv. Moreover, π‘‰π‘‰π‘˜π‘˜ β†’ 0 as π‘˜π‘˜ β†’ ∞.

The election of the functional π‘‰π‘‰π‘˜π‘˜ is the key element in the observer design for the stability testing.

This paper proposes a functional that is based in the number of transitions sequences that the term β„“π‘˜π‘˜, shown in Figure 2 as part of the observer, is tracking at every π‘˜π‘˜. Before the formal analysis, some intuitive ideas are given in the following example.

Example 1. Consider that the initial state of the OSS in Figure 1 is 𝑀𝑀0{𝑝𝑝21} and that its respective output is 𝑦𝑦0{𝐢𝐢}. The net includes dashed tokens and output signals after a slash that will be used in a later example. With a simple examination, it is easy to see that the markings 𝑀𝑀0{𝑝𝑝21}, 𝑀𝑀0{𝑝𝑝22}, 𝑀𝑀0{𝑝𝑝23}, 𝑀𝑀0{𝑝𝑝24} and 𝑀𝑀0�𝑝𝑝25οΏ½ all produce the same output 𝑦𝑦0{𝐢𝐢}. Let �𝑀𝑀��0 = 𝑀𝑀0{𝑝𝑝21} + 𝑀𝑀0{𝑝𝑝22} + 𝑀𝑀0{𝑝𝑝23} + 𝑀𝑀0{𝑝𝑝24} + 𝑀𝑀0�𝑝𝑝25οΏ½ be the observer estimation. Thus, at π‘˜π‘˜ = 0, the distance of the observer estimation and the system state is four, i.e. 𝑒𝑒0 = 4. Now, suppose that 𝑑𝑑31 is fired at π‘˜π‘˜ = 1. The output is now 𝑦𝑦1{𝐷𝐷}. Notice that πœ‘πœ‘π΅π΅(𝑑𝑑31) =πœ‘πœ‘π΅π΅(𝑑𝑑32) = πœ‘πœ‘π΅π΅(𝑑𝑑33) = πœ‘πœ‘π΅π΅(𝑑𝑑34) = πœ‘πœ‘π΅π΅οΏ½π‘‘π‘‘35οΏ½. Indeed, all of these transitions are enabled at �𝑀𝑀��0. Therefore, at π‘˜π‘˜ = 1, the observer computes the possible executed sequences as 𝜎𝜎1 = 𝑑𝑑31, 𝜎𝜎2 = 𝑑𝑑32, 𝜎𝜎3 = 𝑑𝑑33, 𝜎𝜎4 = 𝑑𝑑34 and 𝜎𝜎5 =𝑑𝑑35. Let’s denote the set of these sequences as {𝜎𝜎�}1. Corresponding to {𝜎𝜎�}1, the observer computes the possible reached markings as those with one token in the places with subscript three, i.e. from 𝑀𝑀1{𝑝𝑝31} to 𝑀𝑀1�𝑝𝑝35οΏ½. Let �𝑀𝑀��1 = 𝑀𝑀1{𝑝𝑝31} + β‹―+ 𝑀𝑀1�𝑝𝑝35οΏ½ be the summation of these markings. At this point, the observer does not improve the state estimations, i.e. the error remains the same. This is an important characteristic of the SD of an OSS, that is, it is possible that the estimations do not improve at every event execution. In this case, 𝑒𝑒1 = 4 = 𝑒𝑒0. However, the estimations must improve in a finite number of events until they match to the system. Indeed, suppose that 𝑑𝑑41 is fired, at π‘˜π‘˜ = 2 and the output changes to 𝑦𝑦2 = {𝐹𝐹}. Notice that πœ‘πœ‘π΅π΅(𝑑𝑑41) = πœ‘πœ‘π΅π΅(𝑑𝑑42) = πœ‘πœ‘π΅π΅(𝑑𝑑43) = πœ‘πœ‘π΅π΅(𝑑𝑑44) =πœ‘πœ‘π΅π΅οΏ½π‘‘π‘‘45οΏ½. By using this new information, the observer is able to update the set of possible executed sequences to {𝜎𝜎�}2 = { 𝜎𝜎1,𝜎𝜎2,𝜎𝜎3,𝜎𝜎4,𝜎𝜎5,𝜎𝜎6,𝜎𝜎7,𝜎𝜎8}, where 𝜎𝜎1 = 𝑑𝑑31𝑑𝑑41, 𝜎𝜎2 = 𝑑𝑑32𝑑𝑑42, 𝜎𝜎3 = 𝑑𝑑33𝑑𝑑43, 𝜎𝜎4 = 𝑑𝑑34𝑑𝑑44, 𝜎𝜎5 = 𝑑𝑑35𝑑𝑑45, 𝜎𝜎6 = 𝑑𝑑36𝑑𝑑46, 𝜎𝜎7 = 𝑑𝑑37𝑑𝑑47, and 𝜎𝜎8 =𝑑𝑑38𝑑𝑑48. At this point, the observer is able to discard 𝜎𝜎9, since πœ‘πœ‘π΅π΅(𝑑𝑑49) β‰  πœ‘πœ‘π΅π΅(𝑑𝑑41). Hence, the possible reached marking �𝑀𝑀��2, is that with a token on places with subscript four, from 𝑀𝑀2{𝑝𝑝41} to 𝑀𝑀2{𝑝𝑝38}. Notice that now, |{𝜎𝜎�}2| < | {𝜎𝜎�}1|, and accordingly, 𝑒𝑒2 ≀ 𝑒𝑒1.

Studies in Informatics and Control, Vol. 26, No. 1, March 2017 http://www.sic.ici.ro 17

Page 6: Observers Design for Discrete-Event Systems Modelled by S-NetsΒ Β· structure vector (𝑃𝑃,𝑇𝑇,𝐼𝐼,𝑂𝑂), 𝑀𝑀. 0. is the initial marking and πœ‘πœ‘ is the output

The next section proposes a functional term based on the number of transition sequences tracked by the observer, which satisfies the Lyapunov stability criterion.

4. Observer Stability Analysis

Generalizing the idea in the example of the previous section, let π‘¦π‘¦π‘˜π‘˜ be the π‘˜π‘˜ βˆ’ π‘‘π‘‘β„Ž system output and {𝜎𝜎�}π‘˜π‘˜ be the possible sequences executed by the system. Notice that the number of possible transition sequences that the observer may track does not necessarily decrease at every transition firing, as stated. However, this paper shows that for any evolution of the system of length π‘˜π‘˜, with a corresponding set of possible fired transition sequences {𝜎𝜎�}π‘˜π‘˜, there exist a finite integer π‘Žπ‘Ž such that |{𝜎𝜎�}π‘˜π‘˜+𝑑𝑑| < |{𝜎𝜎�}π‘˜π‘˜|. To this aim, consider the following definition for the corrective term of the scheme in Figure 2.

Definition 4. Let (𝐡𝐡,𝑀𝑀0,πœ‘πœ‘) be a SD and well-formed OSS, where 𝑀𝑀0 is probably unknown. Let 𝑦𝑦0 be the initial output of the system. Let 𝑀𝑀�0 = πœ‘πœ‘β€²π‘¦π‘¦0 be the initial estimation for the observer by (5). Let �𝑀𝑀��0 = 𝑀𝑀�0 = οΏ½π‘€π‘€οΏ½οΏ½π‘˜π‘˜ be the estimations of the initial and current markings. Define β„“π‘˜π‘˜ as follows:

(first step) For π‘˜π‘˜ = 1:

i. Let 𝑦𝑦1 be the first output of the system and let Δ𝑦𝑦1 = 𝑦𝑦1 βˆ’ 𝑦𝑦0. Let �𝑇𝑇��1 =�𝑑𝑑𝑗𝑗 ∈ 𝑇𝑇:πœ‘πœ‘π΅π΅οΏ½π‘‘π‘‘π‘—π‘—οΏ½ = Δ𝑦𝑦1οΏ½ be the first set of single transitions that have been probably fired;

ii. Let {𝜎𝜎�}1 = β‹ƒπœŽπœŽπ‘—π‘— where πœŽπœŽπ‘—π‘— = 𝑑𝑑𝑗𝑗 for 𝑑𝑑𝑗𝑗 ∈

�𝑇𝑇��1, such that ��𝑀𝑀��0οΏ½ πœŽπœŽπ‘—π‘—;

iii. Let β„“1 = βˆ’(πœ‘πœ‘β€²π‘¦π‘¦0) + βˆ‘π΅π΅+πœŽπœŽπ‘—π‘— :πœŽπœŽπ‘—π‘— ∈ �𝑇𝑇��1;

iv. Optionally, update the internal variables �𝑀𝑀��0 = �𝑀𝑀��0 βˆ’ πœ‘πœ‘β€²π‘¦π‘¦0 + βˆ‘π΅π΅βˆ’πœŽπœŽπ‘—π‘— :πœŽπœŽπ‘—π‘— ∈ �𝑇𝑇��1 and οΏ½π‘€π‘€οΏ½οΏ½π‘˜π‘˜ = οΏ½π‘€π‘€οΏ½οΏ½π‘˜π‘˜ βˆ’ πœ‘πœ‘β€²π‘¦π‘¦0 +βˆ‘π΅π΅+πœŽπœŽπ‘—π‘— :πœŽπœŽπ‘—π‘— βˆˆοΏ½π‘‡π‘‡οΏ½οΏ½1;

(iteration) For π‘˜π‘˜ > 1: i. Let π‘¦π‘¦π‘˜π‘˜ be the π‘˜π‘˜ βˆ’ π‘‘π‘‘β„Ž system output and let

Ξ”π‘¦π‘¦π‘˜π‘˜ = π‘¦π‘¦π‘˜π‘˜ βˆ’ π‘¦π‘¦π‘˜π‘˜βˆ’1. Let οΏ½π‘‡π‘‡οΏ½οΏ½π‘˜π‘˜ =�𝑑𝑑𝑗𝑗 ∈ 𝑇𝑇:πœ‘πœ‘π΅π΅οΏ½π‘‘π‘‘π‘—π‘—οΏ½ = Ξ”π‘¦π‘¦π‘˜π‘˜οΏ½;

ii. If οΏ½οΏ½π‘‡π‘‡οΏ½οΏ½π‘˜π‘˜οΏ½ = 1 then {𝜎𝜎�}π‘˜π‘˜ = πœπœπ‘‘π‘‘π‘—π‘—, for {𝜏𝜏} ={𝜎𝜎�}π‘˜π‘˜βˆ’1 and 𝑑𝑑𝑗𝑗 ∈ οΏ½π‘‡π‘‡οΏ½οΏ½π‘˜π‘˜;

iii. Otherwise, if οΏ½οΏ½π‘‡π‘‡οΏ½οΏ½π‘˜π‘˜οΏ½ > 1, let {𝜎𝜎�}π‘˜π‘˜ = β‹ƒπœπœπ‘‘π‘‘π‘—π‘— for 𝜏𝜏 = πœŽπœŽπ‘‘π‘‘π‘–π‘– ∈ {𝜎𝜎�}π‘˜π‘˜βˆ’1 and 𝑑𝑑𝑗𝑗 ∈ οΏ½π‘‡π‘‡οΏ½οΏ½π‘˜π‘˜, such

that οΏ½οΏ½π‘€π‘€οΏ½οΏ½π‘˜π‘˜βˆ’1οΏ½ 𝑑𝑑𝑗𝑗;

iv. Let {𝜎𝜎�}οΏ½οΏ½οΏ½οΏ½π‘˜π‘˜ = {𝜎𝜎�}π‘˜π‘˜βˆ’1 βˆ– {𝜎𝜎�}π‘˜π‘˜, i.e., the set of those elements in {𝜎𝜎�}π‘˜π‘˜βˆ’1 not used in {𝜎𝜎�}π‘˜π‘˜;

v. Let β„“π‘˜π‘˜+ = βˆ‘π΅π΅+𝑑𝑑𝑖𝑖 and β„“π‘˜π‘˜βˆ’ = βˆ‘π΅π΅βˆ’π‘‘π‘‘π‘–π‘– for πœŽπœŽπ‘‘π‘‘π‘–π‘– ∈ {𝜎𝜎�}π‘˜π‘˜;

vi. Let β„“π‘˜π‘˜βˆ’οΏ½οΏ½οΏ½ = βˆ‘π΅π΅βˆ’π‘‘π‘‘π‘—π‘— for π‘‘π‘‘π‘—π‘—πœŽπœŽ ∈ {𝜎𝜎�}οΏ½οΏ½οΏ½οΏ½π‘˜π‘˜;

vii. Let β„“π‘˜π‘˜ = β„“π‘˜π‘˜+ βˆ’ οΏ½β„“π‘˜π‘˜βˆ’ + β„“π‘˜π‘˜βˆ’οΏ½οΏ½οΏ½οΏ½ be the π‘˜π‘˜ βˆ’ π‘‘π‘‘β„Ž correction element;

viii. Optionally, update �𝑀𝑀��0 = �𝑀𝑀��0 βˆ’β„“(π‘¦π‘¦π‘˜π‘˜)βˆ’οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½οΏ½ and οΏ½π‘€π‘€οΏ½οΏ½π‘˜π‘˜ = οΏ½π‘€π‘€οΏ½οΏ½π‘˜π‘˜ + β„“π‘˜π‘˜.

Clearly, the element {𝜎𝜎�}π‘˜π‘˜ track the transition sequences that the system has been probably fired at every π‘˜π‘˜ > 0. Notice that in the

Figure 3. Error in the Observer estimations in a safe well-formed OSS.

http://www.sic.ici.ro Studies in Informatics and Control, Vol. 26, No. 1, March 2017 18

Page 7: Observers Design for Discrete-Event Systems Modelled by S-NetsΒ Β· structure vector (𝑃𝑃,𝑇𝑇,𝐼𝐼,𝑂𝑂), 𝑀𝑀. 0. is the initial marking and πœ‘πœ‘ is the output

construction of {𝜎𝜎�}π‘˜π‘˜ some sequences in {𝜎𝜎�}π‘˜π‘˜βˆ’1 may be discarded. Thus, if {𝜎𝜎�}π‘˜π‘˜ is a singleton (point ii in the iteration stage), then the transitions sequence is completely known. Besides, three parts comprise the corrective term, in such a way that the observer estimations approach to the system state, and at the same time, the initial state could be progressively updated. The last part is not required; however, it is included since its computation is direct from the definition of the corrective term.

Let π‘‰π‘‰π‘˜π‘˜ ≔ |{𝜎𝜎�}π‘˜π‘˜|βˆ’ 1 be the functional for the Lyapunov stability analysis. That is, the number of sequences in {𝜎𝜎�}π‘˜π‘˜ minus one. Thus, if |{𝜎𝜎�}π‘˜π‘˜| = 1 then π‘‰π‘‰π‘˜π‘˜ = 0. This make sense because under such a condition, the error in the sequence estimation is zero. Intuitively, {𝜎𝜎�}π‘˜π‘˜ tends to be a singleton as the events occurrence increase. However, it could be the case that the size of {𝜎𝜎�}π‘˜π‘˜ does not decrease at each transition firing. Moreover, if the net is safe, the knowledge of the transition sequence leads to a zero error in the estimated state, as established in [1].

Additionally, as highlighted, if the system state is known from the beginning, then the tracking sequence is unique. Thus, trivially |{𝜎𝜎�}0| = 1 and 𝑉𝑉0 = |{𝜎𝜎�}0| βˆ’ 1 = 0, as expected. Furthermore, 𝜌𝜌�0οΏ½βƒ— , οΏ½0οΏ½βƒ— οΏ½οΏ½ = 0 for every π‘˜π‘˜ β‰₯ 0, and οΏ½0οΏ½βƒ— οΏ½ is a closed invariant set of the error system (𝐸𝐸, 𝑒𝑒0) represented by (5), as previously analysed. Thus, the next theorem shows that π‘‰π‘‰π‘˜π‘˜ fulfils the Lyapunov stability requirements.

Theorem 6. Let (𝐡𝐡,𝑀𝑀0,πœ‘πœ‘) be a well-formed OSS, where 𝑀𝑀0 is probably unknown. Let (𝐡𝐡,𝑀𝑀�0,πœ‘πœ‘) be the observer defined by (4), where the initial output is 𝑦𝑦0, and the corresponding initial estimation is 𝑀𝑀�0 = πœ‘πœ‘β€²π‘¦π‘¦0. Let (𝐸𝐸, 𝑒𝑒0) be the error system in (5), where the initial error is 𝑒𝑒0 = �𝑀𝑀�0 βˆ’π‘€π‘€0οΏ½. Let 𝑒𝑒 =‖𝑒𝑒0β€– βˆ’ 1 = πœŒπœŒοΏ½π‘€π‘€οΏ½0,𝑀𝑀0οΏ½ βˆ’ 1 and let β„³ = οΏ½0οΏ½βƒ— οΏ½. Then π‘‰π‘‰π‘˜π‘˜ satisfies the Theorem 5 in the vicinity 𝑆𝑆(β„³, 𝑒𝑒).

Proof:

i. Without loose of generality, let 𝑐𝑐1 > 0 be sufficiently small such that βˆƒπ‘’π‘’π‘˜π‘˜ ∈ 𝑆𝑆(β„³, 𝑒𝑒) where π‘‰π‘‰π‘˜π‘˜ > 𝑐𝑐2 with 𝑐𝑐2 β‰₯ 𝑐𝑐1 + 1. Then, it must be the case that 𝜌𝜌(π‘’π‘’π‘˜π‘˜ ,β„³) > 𝑐𝑐1. On the contrary, suppose that 𝜌𝜌(π‘’π‘’π‘˜π‘˜ ,β„³) ≀ 𝑐𝑐1. Then, 𝜌𝜌(π‘’π‘’π‘˜π‘˜ ,β„³) ≀ 𝑐𝑐2 βˆ’ 1, since

𝑐𝑐1 ≀ 𝑐𝑐2 βˆ’ 1. Moreover, as β„³ = οΏ½0οΏ½βƒ— οΏ½, then 𝜌𝜌(π‘’π‘’π‘˜π‘˜ ,β„³) = β€–π‘’π‘’π‘˜π‘˜β€–. Thus, β€–π‘’π‘’π‘˜π‘˜β€– ≀ 𝑐𝑐2 βˆ’ 1, or β€–π‘’π‘’π‘˜π‘˜β€–+ 1 ≀ 𝑐𝑐2. But β€–π‘’π‘’π‘˜π‘˜β€– =οΏ½π‘€π‘€οΏ½π‘˜π‘˜ βˆ’π‘€π‘€π‘˜π‘˜οΏ½ for every π‘˜π‘˜ β‰₯ 0. Hence οΏ½π‘€π‘€οΏ½π‘˜π‘˜ βˆ’π‘€π‘€π‘˜π‘˜οΏ½+ 1 ≀ 𝑐𝑐2 or οΏ½π‘€π‘€οΏ½π‘˜π‘˜ βˆ’π‘€π‘€π‘˜π‘˜οΏ½ <𝑐𝑐2. By construction οΏ½π‘€π‘€οΏ½π‘˜π‘˜ βˆ’π‘€π‘€π‘˜π‘˜οΏ½ β‰₯ 0 for every π‘˜π‘˜ β‰₯ 0. Thus, it immediately follows that the number of entries in οΏ½π‘€π‘€οΏ½π‘˜π‘˜ βˆ’π‘€π‘€π‘˜π‘˜οΏ½, which are different from zero, is strictly less than 𝑐𝑐2. On the other hand, Then, 𝜌𝜌(π‘’π‘’π‘˜π‘˜ ,β„³) ≀ 𝑐𝑐2 βˆ’ 1, since 𝑐𝑐1 ≀ 𝑐𝑐2 βˆ’ 1. Moreover, as β„³ = οΏ½0οΏ½βƒ— οΏ½, then 𝜌𝜌(π‘’π‘’π‘˜π‘˜ ,β„³) =β€–π‘’π‘’π‘˜π‘˜β€–. Thus, β€–π‘’π‘’π‘˜π‘˜β€– ≀ 𝑐𝑐2 βˆ’ 1, or β€–π‘’π‘’π‘˜π‘˜β€–+1 ≀ 𝑐𝑐2. But β€–π‘’π‘’π‘˜π‘˜β€– = οΏ½π‘€π‘€οΏ½π‘˜π‘˜ βˆ’π‘€π‘€π‘˜π‘˜οΏ½ for every π‘˜π‘˜ β‰₯ 0. Hence οΏ½π‘€π‘€οΏ½π‘˜π‘˜ βˆ’π‘€π‘€π‘˜π‘˜οΏ½+ 1 ≀ 𝑐𝑐2 or οΏ½π‘€π‘€οΏ½π‘˜π‘˜ βˆ’π‘€π‘€π‘˜π‘˜οΏ½ < 𝑐𝑐2. By construction οΏ½π‘€π‘€οΏ½π‘˜π‘˜ βˆ’π‘€π‘€π‘˜π‘˜οΏ½ β‰₯ 0 for every π‘˜π‘˜ β‰₯ 0. Thus, it immediately follows that the number of entries in οΏ½π‘€π‘€οΏ½π‘˜π‘˜ βˆ’π‘€π‘€π‘˜π‘˜οΏ½, which are different from zero, is strictly less than 𝑐𝑐2. On the other hand, the computation of π‘€π‘€οΏ½π‘˜π‘˜ depends on π‘€π‘€οΏ½π‘˜π‘˜βˆ’1 and β„“π‘˜π‘˜. Furthermore, the terms β„“π‘˜π‘˜+ and β„“π‘˜π‘˜βˆ’ are computed from {𝜎𝜎�}π‘˜π‘˜ as in Definition 4, where the term β„“π‘˜π‘˜βˆ’οΏ½οΏ½οΏ½ computed from {𝜎𝜎�}οΏ½οΏ½οΏ½οΏ½π‘˜π‘˜, is used to delete some markings from π‘€π‘€οΏ½π‘˜π‘˜ corresponding to those wrongly computed sequences in previous steps. It is clear that, the current transition sequence executed by the net is always contained in {𝜎𝜎�}π‘˜π‘˜, for every π‘˜π‘˜ β‰₯ 0. Then, it must hold that |{𝜎𝜎�}π‘˜π‘˜| β‰€οΏ½π‘€π‘€οΏ½π‘˜π‘˜ βˆ’π‘€π‘€π‘˜π‘˜οΏ½, for both cases, either if the net is SD (for safe nets) or ED (for non-safe net). So, |{𝜎𝜎�}π‘˜π‘˜| < οΏ½π‘€π‘€οΏ½π‘˜π‘˜ βˆ’π‘€π‘€π‘˜π‘˜οΏ½+ 1 ≀𝑐𝑐2. But, π‘‰π‘‰π‘˜π‘˜ ≔ |{𝜎𝜎�}π‘˜π‘˜|βˆ’ 1. Hence, π‘‰π‘‰π‘˜π‘˜ < 𝑐𝑐2, which is a contradiction. Thus, necessarily 𝜌𝜌(π‘’π‘’π‘˜π‘˜ ,β„³) > 𝑐𝑐1.

ii. Without loose of generality, let 𝑐𝑐4 > 0 be sufficiently small such that there exists π‘’π‘’π‘˜π‘˜ ∈ 𝑆𝑆(β„³, 𝑒𝑒) with 𝜌𝜌(π‘’π‘’π‘˜π‘˜ ,β„³) < 𝑐𝑐3 where 0 < 𝑐𝑐3 ≀ (𝑐𝑐4 βˆ’ 1). Then, it should be the case that π‘‰π‘‰π‘˜π‘˜ ≀ 𝑐𝑐4. On the contrary, suppose that π‘‰π‘‰π‘˜π‘˜ > 𝑐𝑐4. Since π‘‰π‘‰π‘˜π‘˜ ≔|{𝜎𝜎�}π‘˜π‘˜|βˆ’ 1 and 𝑐𝑐4 β‰₯ 𝑐𝑐3 + 1, then |{𝜎𝜎�}π‘˜π‘˜| >𝑐𝑐3 + 2. Moreover, since β„“π‘˜π‘˜+ is computed from every element in {𝜎𝜎�}π‘˜π‘˜, then β€–β„“π‘˜π‘˜+β€– >𝑐𝑐3 + 2. Thus,> 𝑐𝑐3 + 2, since from Definition 4, π‘€π‘€οΏ½π‘˜π‘˜βˆ’1 β‰₯ οΏ½β„“π‘˜π‘˜βˆ’ + β„“π‘˜π‘˜βˆ’οΏ½οΏ½οΏ½οΏ½ for every π‘˜π‘˜ β‰₯ 0. But, β„“π‘˜π‘˜+ + π‘€π‘€οΏ½π‘˜π‘˜βˆ’1 βˆ’ οΏ½β„“π‘˜π‘˜βˆ’ + β„“π‘˜π‘˜βˆ’οΏ½οΏ½οΏ½οΏ½ =π‘€π‘€οΏ½π‘˜π‘˜. Thus, οΏ½π‘€π‘€οΏ½π‘˜π‘˜οΏ½ > 𝑐𝑐3 + 2. So, οΏ½π‘€π‘€οΏ½π‘˜π‘˜ βˆ’π‘€π‘€π‘˜π‘˜οΏ½ > 𝑐𝑐3 + 1. But,οΏ½π‘€π‘€οΏ½π‘˜π‘˜ βˆ’π‘€π‘€π‘˜π‘˜οΏ½ =

Studies in Informatics and Control, Vol. 26, No. 1, March 2017 http://www.sic.ici.ro 19

Page 8: Observers Design for Discrete-Event Systems Modelled by S-NetsΒ Β· structure vector (𝑃𝑃,𝑇𝑇,𝐼𝐼,𝑂𝑂), 𝑀𝑀. 0. is the initial marking and πœ‘πœ‘ is the output

𝜌𝜌(π‘’π‘’π‘˜π‘˜ ,β„³). Thus, 𝜌𝜌(π‘’π‘’π‘˜π‘˜ ,β„³) > 𝑐𝑐3 + 1, which is a contradiction. Consequently, it must be the case that π‘‰π‘‰π‘˜π‘˜ ≀ 𝑐𝑐4.

iii. In order to show that the functional π‘‰π‘‰π‘˜π‘˜ is a non-increasing function of π‘˜π‘˜, notice that by point (ii) in the iteration stage of Definition 4, if π‘‰π‘‰π‘˜π‘˜ = 0 for some π‘˜π‘˜, i.e. |{𝜎𝜎�}π‘˜π‘˜βˆ’1| = 1, then π‘‰π‘‰π‘˜π‘˜+𝑙𝑙 = 0 for every 𝑙𝑙 >0. Thus, by contradiction, consider without loss of generality that π‘‰π‘‰π‘˜π‘˜+1 >π‘‰π‘‰π‘˜π‘˜ > 0, for some π‘˜π‘˜. Then |{𝜎𝜎�}π‘˜π‘˜+1| >|{𝜎𝜎�}π‘˜π‘˜| β‰₯ 2. But, by Definition 4, {𝜎𝜎�}π‘˜π‘˜+1 =β‹ƒπœπœπ‘‘π‘‘π‘—π‘— for 𝜏𝜏 = πœŽπœŽπ‘‘π‘‘π‘–π‘– ∈ {𝜎𝜎�}π‘˜π‘˜ and 𝑑𝑑𝑗𝑗 ∈ οΏ½π‘‡π‘‡οΏ½οΏ½π‘˜π‘˜+1, such that οΏ½οΏ½π‘€π‘€οΏ½οΏ½π‘˜π‘˜οΏ½ 𝑑𝑑𝑗𝑗. Since, by contradiction, it holds that |{𝜎𝜎�}π‘˜π‘˜+1| >|{𝜎𝜎�}π‘˜π‘˜| β‰₯ 2, then it must exist at least a pair of transition sequences, say 𝛽𝛽𝑑𝑑𝑒𝑒,𝛽𝛽𝑑𝑑𝑣𝑣 ∈ {𝜎𝜎�}π‘˜π‘˜+1, constructed from the single sequence 𝛽𝛽 = πœŽπœŽπ‘‘π‘‘π‘–π‘– ∈ {𝜎𝜎�}π‘˜π‘˜ such that 𝑑𝑑𝑒𝑒, 𝑑𝑑𝑣𝑣 ∈ οΏ½π‘‡π‘‡οΏ½οΏ½π‘˜π‘˜+1, i.e. πœ‘πœ‘π΅π΅(𝑑𝑑𝑒𝑒) = πœ‘πœ‘π΅π΅(𝑑𝑑𝑣𝑣) =Ξ”π‘¦π‘¦π‘˜π‘˜. On one hand, if the net is non-safe, then πœ‘πœ‘π΅π΅(𝑑𝑑𝑖𝑖) = πœ‘πœ‘π΅π΅οΏ½π‘‘π‘‘π‘—π‘—οΏ½ is a contradiction to the ED of the OSS. On the other hand, if the net is safe, then οΏ½οΏ½π‘€π‘€οΏ½οΏ½π‘˜π‘˜οΏ½ 𝑑𝑑𝑒𝑒 and οΏ½οΏ½π‘€π‘€οΏ½οΏ½π‘˜π‘˜οΏ½ 𝑑𝑑𝑣𝑣. It implies that β‹„ 𝑑𝑑𝑒𝑒 =β‹„ 𝑑𝑑𝑣𝑣, which is a contradiction to the SD. Thus, necessarily π‘‰π‘‰π‘˜π‘˜+1 ≀ π‘‰π‘‰π‘˜π‘˜, for every π‘˜π‘˜ > 0.

iv. In order to show that π‘‰π‘‰π‘˜π‘˜ β†’ 0 as π‘˜π‘˜ β†’ ∞, let π‘‰π‘‰π‘˜π‘˜ > 0 for some π‘˜π‘˜. Then |{𝜎𝜎�}π‘˜π‘˜| > 1, which implies that there exist at least two sequences in {𝜎𝜎�}π‘˜π‘˜, say 𝜎𝜎1,𝜎𝜎2 ∈ {𝜎𝜎�}π‘˜π‘˜, where 𝜎𝜎1,𝜎𝜎2 ∈ β„’(𝐡𝐡,𝑀𝑀0) and πœ‘πœ‘(𝜎𝜎1) =πœ‘πœ‘(𝜎𝜎2), which on the one hand, it contradicts the ED if the net is non-safe. On the other hand, if the net is safe, then it should exist an integer 𝑙𝑙 < ∞, for which |{𝜎𝜎�}π‘˜π‘˜+𝑙𝑙| < |{𝜎𝜎�}π‘˜π‘˜|. On the contrary, suppose that |{𝜎𝜎�}π‘˜π‘˜+𝑙𝑙| β‰₯ |{𝜎𝜎�}π‘˜π‘˜| > 1 for every 𝑙𝑙 >0. Thus, it must exist at least two transition sequences that could be constructed from 𝜎𝜎1 and 𝜎𝜎2, say

v. 𝜎𝜎�1 = 𝜎𝜎1𝑑𝑑𝑖𝑖𝑑𝑑𝑖𝑖+1𝑑𝑑𝑖𝑖+2 … 𝑑𝑑𝑖𝑖+π‘™π‘™βˆ’2𝑑𝑑𝑖𝑖+π‘™π‘™βˆ’1𝑑𝑑𝑖𝑖+𝑙𝑙 …, 𝜎𝜎�2 = 𝜎𝜎2𝑑𝑑𝑖𝑖′𝑑𝑑𝑖𝑖+1β€² 𝑑𝑑𝑖𝑖+2β€² … 𝑑𝑑𝑖𝑖+π‘™π‘™βˆ’2β€² 𝑑𝑑𝑖𝑖+π‘™π‘™βˆ’1β€² 𝑑𝑑𝑖𝑖+𝑙𝑙′ … such that 𝜎𝜎�1,𝜎𝜎�2 ∈ {𝜎𝜎�}π‘˜π‘˜+1 for every 0 <𝑖𝑖 ≀ 𝑙𝑙, where πœ‘πœ‘(𝜎𝜎�1) = πœ‘πœ‘(𝜎𝜎�2). Now, let {𝑑𝑑𝑖𝑖, 𝑑𝑑𝑖𝑖′}, {𝑑𝑑𝑖𝑖+1, 𝑑𝑑𝑖𝑖+1β€²}, {𝑑𝑑𝑖𝑖+2, 𝑑𝑑𝑖𝑖+2β€²},…, {𝑑𝑑𝑖𝑖+π‘™π‘™βˆ’2, 𝑑𝑑𝑖𝑖+π‘™π‘™βˆ’2β€² }, {𝑑𝑑𝑖𝑖+π‘™π‘™βˆ’1, 𝑑𝑑𝑖𝑖+π‘™π‘™βˆ’1β€² }, {𝑑𝑑𝑖𝑖+𝑙𝑙 , 𝑑𝑑𝑖𝑖+𝑙𝑙′ }, β‹― , etc., be the sequence formed by pairing the corresponding transitions in 𝜎𝜎�1 and 𝜎𝜎�2, that follows from 𝜎𝜎1 and 𝜎𝜎2, respectively. Then, it holds that 𝑑𝑑𝑖𝑖 β‹„=β‹„ 𝑑𝑑𝑖𝑖+1, 𝑑𝑑𝑖𝑖+1 β‹„=β‹„ 𝑑𝑑𝑖𝑖+2, …, 𝑑𝑑𝑖𝑖+π‘™π‘™βˆ’2 β‹„=⋄𝑑𝑑𝑖𝑖+π‘™π‘™βˆ’1, 𝑑𝑑𝑖𝑖+π‘™π‘™βˆ’1 β‹„=β‹„ 𝑑𝑑𝑖𝑖+𝑙𝑙,…, etc., and also 𝑑𝑑𝑖𝑖′ β‹„=β‹„ 𝑑𝑑𝑖𝑖+1β€² , 𝑑𝑑𝑖𝑖+1β€² β‹„=β‹„ 𝑑𝑑𝑖𝑖+2β€² , …, 𝑑𝑑𝑖𝑖+π‘™π‘™βˆ’2β€² β‹„=⋄𝑑𝑑𝑖𝑖+π‘™π‘™βˆ’1β€² , 𝑑𝑑𝑖𝑖+π‘™π‘™βˆ’1β€² β‹„=β‹„ 𝑑𝑑𝑖𝑖+𝑙𝑙′ ,…, etc. Since πœ‘πœ‘(𝜎𝜎�1) = πœ‘πœ‘(𝜎𝜎�2), then in 𝐸𝐸𝐡𝐡, at least, it holds that {𝑑𝑑𝑖𝑖+1, 𝑑𝑑𝑖𝑖+1β€² } ∈ 𝐸𝐸𝐡𝐡(𝑖𝑖, 𝑖𝑖′), {𝑑𝑑𝑖𝑖+2, 𝑑𝑑𝑖𝑖+2β€² } ∈ 𝐸𝐸𝐡𝐡(𝑖𝑖 + 1, 𝑖𝑖′ + 1),…, {𝑑𝑑𝑖𝑖+π‘™π‘™βˆ’1, 𝑑𝑑𝑖𝑖+π‘™π‘™βˆ’1β€² } ∈ 𝐸𝐸𝐡𝐡(𝑖𝑖 + 𝑙𝑙 βˆ’ 2, 𝑖𝑖′ + 𝑙𝑙 βˆ’2), {𝑑𝑑𝑖𝑖+𝑙𝑙 , 𝑑𝑑𝑖𝑖+𝑙𝑙′ } ∈ 𝐸𝐸𝐡𝐡(𝑖𝑖 + 𝑙𝑙 βˆ’ 1, 𝑖𝑖′ + 𝑙𝑙 βˆ’1),…, etc. As the number of transitions in the net is finite, then at least one element in the previous list of entries in 𝐸𝐸𝐡𝐡 must appear twice. Let say that {𝑑𝑑𝑖𝑖, 𝑑𝑑𝑖𝑖′} ∈𝐸𝐸𝐡𝐡(𝑖𝑖 + 𝑙𝑙, 𝑖𝑖′ + 𝑙𝑙). This conforms a cyclic dependency implying that βˆ†πΈπΈπ΅π΅π‘ π‘  = βˆ…, which directly contradicts the SD of the OSS. Thus, π‘‰π‘‰π‘˜π‘˜ β†’ 0 as π‘˜π‘˜ β†’ ∞. ∎

Notice that the requirement 𝑐𝑐2 β‰₯ 𝑐𝑐1 + 1 with 𝑐𝑐1 > 0 implies that 𝑒𝑒 = ‖𝑒𝑒0β€– βˆ’ 1 β‰₯ 2. Additionally, the requirement 0 < 𝑐𝑐3 ≀(𝑐𝑐4 βˆ’ 1) with 𝑐𝑐4 > 0 implies that 𝑐𝑐4 β‰₯ 2. Thus, it must exist at least two transition sequences that the observer has to track. However, this observer scheme can also be useful in the case of a non-safe net, where |{𝜎𝜎�}π‘˜π‘˜| = 1,βˆ€π‘˜π‘˜ β‰₯ 0, as highlighted in the following section.

Figure 4. Error in the Observer estimations in a non-safe well-formed OSS.

http://www.sic.ici.ro Studies in Informatics and Control, Vol. 26, No. 1, March 2017 20

Page 9: Observers Design for Discrete-Event Systems Modelled by S-NetsΒ Β· structure vector (𝑃𝑃,𝑇𝑇,𝐼𝐼,𝑂𝑂), 𝑀𝑀. 0. is the initial marking and πœ‘πœ‘ is the output

Illustrative Example Consider again the OSS in Figure 1, which shows a system with five processes represented by the loops in the model. The places and transitions include superscripts, which represent the loop to which they belong. For example, 𝑑𝑑31 is the third transition of the first loop. Similarly, 𝑝𝑝14 is the first place of the fourth loop. Some sensors include a slash. The sensor before the slash is used when the net is considered safe, and that one after the slash is used when the net is considered non-safe. Thus, for 𝑝𝑝31, 𝐷𝐷 is used when the net is safe, and 𝐴𝐴1 when the net is non-safe. Also, some places include grey-filled tokens used as initial markings when the net is non-safe. The framework in [2] has been used for the simulation of the observer scheme in Figure 2. The corrective term β„“π‘˜π‘˜ was programmed as in Definition 4. The graphs in Figure 3 correspond to different simulation processes with safe markings. In this plot, the error remains at four up to π‘˜π‘˜ = 6, for the lines of Error 1, Error 4, Error 5 and Error 6. These errors correspond to the initial conditions 𝑀𝑀0{𝑝𝑝21}, 𝑀𝑀0{𝑝𝑝22}, 𝑀𝑀0{𝑝𝑝23} and 𝑀𝑀0{𝑝𝑝24}, respectively. The line of Error 1 corresponds to the observability constant of the net, i.e. it is the longest convergence error. Indeed, this error reaches zero at π‘˜π‘˜ = 9, which agrees with the sequences πœ‘πœ‘(𝜎𝜎1) = πœ‘πœ‘(𝜎𝜎3) where 𝜎𝜎1 = 𝑑𝑑31𝑑𝑑41𝑑𝑑51𝑑𝑑61𝑑𝑑71𝑑𝑑81𝑑𝑑91 and 𝜎𝜎3 =𝑑𝑑32𝑑𝑑42𝑑𝑑52𝑑𝑑62𝑑𝑑72𝑑𝑑82𝑑𝑑92. These sequences are easily constructed by chaining consecutive entries in the non-empty entries in Table 1. That is, 𝜎𝜎1 and 𝜎𝜎3, correspond to 𝐸𝐸𝐡𝐡𝑠𝑠(𝑑𝑑31, 𝑑𝑑32), 𝐸𝐸𝐡𝐡𝑠𝑠(𝑑𝑑41, 𝑑𝑑42), 𝐸𝐸𝐡𝐡𝑠𝑠�𝑑𝑑51, 𝑑𝑑52οΏ½, 𝐸𝐸𝐡𝐡𝑠𝑠(𝑑𝑑61, 𝑑𝑑62), 𝐸𝐸𝐡𝐡𝑠𝑠(𝑑𝑑71, 𝑑𝑑72), 𝐸𝐸𝐡𝐡𝑠𝑠(𝑑𝑑81, 𝑑𝑑82), and 𝐸𝐸𝐡𝐡𝑠𝑠(𝑑𝑑91, 𝑑𝑑92), which are non-empty entries in upper left section of Table 1. Indeed, the table 𝐸𝐸𝐡𝐡𝑠𝑠 provides information about the loops of a net and their relation to other loops. Thus, for example, the longest sequence of non-empty entries in 𝐸𝐸𝐡𝐡𝑠𝑠 corresponds to the observability convergence constant of the sequences observer. Moreover, if some sequence is too long that it is unacceptable for a specific application, a detailed examination of 𝐸𝐸𝐡𝐡𝑠𝑠 may provide suitable information about the best place to add a new sensor. However, the optimal sensor placement for an OSS is out of the scope of this work. In the same plot, Error 6 abruptly decreases from 4 to 0 at π‘˜π‘˜ = 6. Notice that this error corresponds to the initial condition 𝑀𝑀0{𝑝𝑝24}. Finally, Errors 4 and 5 decreases from 2 to 0 at

π‘˜π‘˜ = 8, and from 3 to 0 at π‘˜π‘˜ = 7, respectively. The region of the asymptotic stability of the net is any safe marking, i.e., β„³π‘Žπ‘Ž = {𝑀𝑀 ∈ β„•41: 0 ≀‖𝑀𝑀‖ ≀ 1}. It is not hard to conclude that the size of β„³π‘Žπ‘Ž is 41. The graphs in Figure 4 correspond to simulations of the same net, but with non-safe markings. Errors 1 and 2 are from two consecutive simulation processes of the initial marking 𝑀𝑀0�𝑝𝑝11,𝑝𝑝21,𝑝𝑝41,𝑝𝑝12,𝑝𝑝13,𝑝𝑝14,𝑝𝑝15οΏ½. The difference shown in the evolution of the errors is due to a random firing of the transitions in the system block in Figure 2, when all the transitions are allowed to be fired, i.e. when π‘’π‘’π‘˜π‘˜ = 1οΏ½βƒ— ,βˆ€π‘˜π‘˜ β‰₯ 0. See [2] for details about the firing of the transitions and other configuration options of the simulation framework. Errors 3 and 4 correspond to two simulation processes with the initial condition 𝑀𝑀0οΏ½2𝑝𝑝11, 6𝑝𝑝21, 6𝑝𝑝41, 2𝑝𝑝12, 2𝑝𝑝13, 2𝑝𝑝14, 2𝑝𝑝15οΏ½. In this case, the initial error is higher than the former due to a greater number of tokens. The error drops as the number of events increases. Notice that, in spite of the transition sequence is known from π‘˜π‘˜ = 1, the error oscillates, i.e. it increases and decreases randomly. Depending on suitable transition firings in the net, the error may approach to zero. Moreover, it is possible to show that for non-safe markings, the error in (5) is stable. However, a further analysis of this topic is out of the scope of this work.

5. Conclusions This paper presents the design of observers for DES, which are modelled with OPN. The focus is on a subclass of models called S-Nets. An scheme for tracking the transition sequences executed by the system is proposed, where the feedback for the observer is the system output. The observer is provided with a corrective term β„“π‘˜π‘˜ to update its estimations. This corrective element is tracking for every possible transition sequences executed by the system. Thus, the observer error decreases as the number of transition sequences tracked by β„“π‘˜π‘˜ decreases. A Lyapunov stability criterion for characterizing the observer scheme has been used. It shows that the technique developed in this work produces asymptotically stable observers for the case of a safe OSS such that its sequence-detectability property is verified. Thus, in this case, the initial and current state of the system could be perfectly reconstructed with the proposed scheme. When the net is non-safe, the herein introduced scheme produces estimations such that, in some cases, the error may

Studies in Informatics and Control, Vol. 26, No. 1, March 2017 http://www.sic.ici.ro 21

Page 10: Observers Design for Discrete-Event Systems Modelled by S-NetsΒ Β· structure vector (𝑃𝑃,𝑇𝑇,𝐼𝐼,𝑂𝑂), 𝑀𝑀. 0. is the initial marking and πœ‘πœ‘ is the output

oscillate. An application example illustrates the advantages of the developed techniques.

REFERENCES 1. Campos-Rodriguez R., Alcaraz-Mejia M.

(2016). An Efficient Testing for the Detection of Trajectories in Discrete-Event Systems Modelled by S-Nets, Studies in Informatics and Control, 25(3), pp. 363-374.

2. Campos-Rodriguez R., Alcaraz-Mejia M., Sanchez-Ramirez U. (2016). Simulation of Discrete-Event Systems in MATLAB, Applications from Engineering with MATLAB Concepts, Assoc. Prof. Jan Valdman (Ed.), In Tech. DIO: 10.5772/63230.

3. Campos-Rodriguez R., Alcaraz-Mejia M. (2010). A Matlab/Simulink Framework for the Design of Controllers and Observers for Discrete-Event Systems, Electronics and Electrical Engineering, 99(3), pp. 63-68.

4. Campos-Rodriguez R., Ramirez-Trevino a. & Lopez-Mellado E. (2006), Observability Analysis of Free-Choice Petri Net Models, IEEE/SMC Intel. Conf. on System of Systems Engineering, pp. 24-26.

5. Campos-rodriguez R., Alcaraz-Mejia M. & Mireles-Garcia J. (2007), Supervisory Control of Discrete Event Systems Using Observers, Mediterranean Conf. on Control & Automation, pp. 1-7.

6. Ramadge P.J.G., Wonham W.M. (1989). The Control of Discrete Event Systems, Proc. of the IEEE, 77(1), pp.81-98.

7. Kumar R., Shayman M. A. (1998). Formulae relating controllability observability and co-observability, Automatica, 2(1), pp. 211-215.

8. Wong K.C., Wonham W.M. (2004). On the Computation of Observers in Discrete-Event Systems, Discrete Event Dynamic Systems, 14(1), pp. 55-107.

9. Shaolong S., Feng L. (2013). I-Detectability of Discrete-Event Systems, IEEE Trans. Autom. Sc. and Eng., 10(1), pp.187-196.

10. Shu S., Lin F. (2011). Generalized detectability for discrete event systems, Syst. Control Lett., vol. 60, no. 5, pp. 310–317.

11. Ozveren C. M., Willsky A. S. (1990). Observability of discrete event dynamic systems, IEEE Trans. Autom. Control, vol. 35, no. 7, pp. 797-806.

12. Takai S., Ushio T., Kodama S. (1995). Static-state feedback control of discrete-event systems under partial observation, IEEE Trans. Autom. Ctrl., 40(11):1950-1954, 1995.

13. Yong L., Wonham W. M. (1994). Control of vector discrete-event systems. II: Controller Synthesis. IEEE Trans. Autom. Control, 39(3): pp. 512β€”531, 1994. 0018-9286.

14. Li Y., Wonham W. M. (1993). Control of vector discrete-event systems I: The base model, IEEE Trans. Autom. Ctrl., 38(8): pp.1214-1227.

15. Moody J. O., Antsaklis P. J. (2000). Petri net supervisors for DES with uncontrollable and unobservable transitions. IEEE Trans. Autom. Control, 45(3), pp. 462-476

16. Giua A., Seatzu C. (2002). Observability of place/transition nets. IEEE Trans. Automatic Control, 47(9), pp. 1424-1437.

17. Ramirez-Trevino A., Rivera-Rangel I., Lopez-Mellado E. (2003). Observability of discrete event systems modeled by interpreted petri nets. IEEE Trans. Robotics and Autom. 19(4), pp. 557-565.

18. Rivera-Rangel I., RamΓ­rez-TreviΓ±o A., Aguirre-Salas L..Ruiz-Leon J. (2005). Geometrical Characterization of Observability in Interpreted Petri Nets. Kybernetika. Vol. 41, No. 5, pp. 553-574.

19. Desel J.. Esparza J. (2005). Free Choice Petri Nets. Cambridge University Press.

20. Hopcroft J. E., Ullman J. D. (1979). Introduction to automata theory, languages, and computation. Addison-Wesley.

21. Passino, K.M., Burguess, K.L. (1998). Stability Analysis of Discrete Event Systems. John Wiley & Sons.

http://www.sic.ici.ro Studies in Informatics and Control, Vol. 26, No. 1, March 2017 22