Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE –...

76
Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University of Cagliari, Italy Joint work with: - Carla Seatzu (U. of Cagliari) - Francesco Basile (U. del Sannio)

Transcript of Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE –...

Page 1: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

Control and Deadlock Recoveryof Timed Petri Nets

Using Observers

Alessandro GiuaDIEE – Department of Electrical and Electronic Engineering

University of Cagliari, Italy

Joint work with: - Carla Seatzu (U. of Cagliari) - Francesco Basile (U. del Sannio)

Page 2: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 2

OUTLINE

0) Petri nets

1) Motivation for discrete event observers

2) Relevant literature

3) Main idea

4) Marking estimation

5) Marking estimation with initial macromarking

6) Control using observers

7) Deadlock recovery and estimate after net time out

8) Using timing information to improve the procedure

9) Conclusions and future work

Page 3: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 3

0 – PETRI NETSA place/transition net is a 4-ple : N=(P,T,Pre,Post)

• P={ p1, p2, …, pm} set of places (circles);

• T={ t1, t2, …, tn} set of transitions (bars);

• Pre: matrix denoting # of arcs from places to transitions• Post: matrix denoting # of arcs from transitions to places

p1

p2 p3

p5

t6 t1

p8

t2p4

p5 p6 p7

t3

t4 t5

Page 4: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 4

0, MN

MwMMNLwNMMNR m000 :),(),(

wMTwMNL 0*

0 ),(

• Net system (a net N with initial marking M0):

• Set of firable sequences:

• Set of reachable markings:

Siphon: a set of places S such that if a transition inputs into S then it also outputs from S (Ex: S = {p1, p2} )

p1

p2

p3

t1

t3

t2

An empty siphon will always remain empty all its output transitions are deadlocked

PETRI NETS (cont’d)

Page 5: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 5

OUTLINE

0) Petri nets

1) Motivation for discrete event observers

2) Relevant literature

3) Main idea

4) Marking estimation

5) Marking estimation with initial macromarking

6) Control using observers

7) Deadlock recovery and estimate after net time out

8) Using timing information to improve the procedure

9) Conclusions and future work

Page 6: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 6

1 - MOTIVATION FOR DISCRETE EVENT OBSERVERS

Two approaches to design of observers for discrete event

Systems

• Computer science approach (CSA): the state is unknown because the system structure is nondeterministic

• Control theory approach (CTA): the system structure is deterministic but the initial state is unknown

Page 7: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 7

• CTA - Supervisory control theory is based on

language specifications (a set of legal words):

plant

w

word of events

controllerKlegalwords

control

language specification event-feedback

MOTIVATION (cont’d)

Page 8: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 8

• When dealing with Petri nets it is natural to use state specifications (a set of legal markings):

plant

M

state / marking

controller

control

L

legal markings

state specification state-feedback

MOTIVATION (cont’d)

Page 9: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 9

• A mixed structure is often used:

State specification = marking of the net

Output events = transitions firing

plant

w

model

controller

M=Mww

L

M00

legal markings

• When the net structure and the initial marking is known (and the net labeling is deterministic) event observation is sufficient to reconstruct the net marking.

MOTIVATION (cont’d)

Page 10: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 10

If the initial marking is not completely known:

use “observers” to estimate the marking after the word of events w has been observed

wM0M

w Bw

In our approach the observer determines two parameters

Estimate: Bound:

plant

w

observer

controller

ww Bww

L

MOTIVATION (cont’d)

legalmarkings

Page 11: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 11

C(w)

Mw

),( ww Bfw C

),( tg wwt

),,( tBhB wwwt

wwB

MOTIVATION (cont’d)

Unlike other approaches based on automata, the PN

structure allows one to “describe” the set of consistent

markings in terms of these two parameters that

are recursively updated.

wC

Linear constraint set

Page 12: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 12

In this talk we present: Algorithms for computing estimate and consistent set Algorithms for control using observers Algorithms for deadlock recovery Deadlock analysis of the closed loop system

PROBLEM: incomplete information due to the presence of an observer in the control loop may lead to deadlock.

MOTIVATION (cont’d)

All these problems are solved using the same approach

based on integer programming

Page 13: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 13

OUTLINE

0) Petri nets

1) Motivation for discrete event observers

2) Relevant literature

3) Main idea

4) Marking estimation

5) Marking estimation with initial macromarking

6) Control using observers

7) Deadlock recovery and estimate after net time out

8) Using timing information to improve the procedure

9) Conclusions and future work

Page 14: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 14

2 - RELEVANT LITERATURE • State-feedback control with partial observability

- Li & Wonham [CDC88] [T-AC93] (state observ.)- Takai, Ushio & Kodama [T-AC95] (state observ.)- Zhang & Holloway [Allerton95] (event observ.)

plant

controller

control

Llegal

markings

Mmarking

mask

equivalenceclass

Derived nec & suff condition for optimality given a mask.

Page 15: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 15

• DES state estimation for FSM / Predicate Transformers- Ramadge [CDC86] (FMS)- Caines, Greiner, Wang [CDC88] [CDC89] (FMS)- Özveren, Willsky [T-AC90] (FMS)- Kumar, Garg & Markus [T-AC93] (PT)

DRAWBACKThese approaches enumerate at each step the set of consistent states (high complexity). No notion of “estimate error”.

LITERATURE (cont’d)

Page 16: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 16

• Diagnosis- Wang, Schwartz [T-net 93] (state estimation)- Ushio, Onishi & Okuda [SMC98] (place observation)

• Petri net observability- Meda, Ramirez [SMC98] (interpreted nets)- Ramirez, Riveda, Lopez [ICRA2000]

• Partial knowledge of the marking- Cardoso, Valette & Dubois [ICATPN90] Concept of macromarking and “membership function”.

LITERATURE (cont’d)

Page 17: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 17

OUTLINE

0) Petri nets

1) Motivation for discrete event observers

2) Relevant literature

3) Main idea

4) Marking estimation

5) Marking estimation with initial macromarking

6) Control using observers

7) Deadlock recovery and estimate after net time out

8) Using timing information to improve the procedure

9) Conclusions and future work

Page 18: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 18

3 - MAIN IDEA

• Initially observed sequence:

• Initial marking

• Estimate:

• Set of consistent markings:

0w

Tw MM 11100

Tw 0000

00 w

m MMw NC

t 2 p 1 p 2

p 3

t 1 t 3

t 2 p 1 p 2

p 3

t 1 t 3

Page 19: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 19

firing is detected

t 2 p 1 p 2

p 3

t 1 t 3

t 2 p 1 p 2

p 3

t 1 t 3

1t

MAIN IDEA (cont’d)

Page 20: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 20

After fires

• Observed sequence:

• Actual marking

• Estimate:

• Set of consistent markings: t 2 p 1 p 2

p 3

t 1 t 3

t 2 p 1 p 2

p 3

t 1 t 3

Tw 0011

TwM 0121

11 tw 1t

MAIN IDEA (cont’d)

11 w

m MMw NC

Page 21: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 21

firing is detected2t

t 2 p 1 p 2

p 3

t 1 t 3

t 2 p 1 p 2

p 3

t 1 t 3

MAIN IDEA (cont’d)

Page 22: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 22

• Observed sequence:

• Actual marking

• Estimate:

• Set of consistent markings: t 2 p 1 p 2

p 3

t 1 t 3

t 2 p 1 p 2

p 3

t 1 t 3

Tw 0102

212 ttw TwM 021

2

After fires21tt

MAIN IDEA (cont’d)

22 w

m MMw NC

Page 23: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 23

OUTLINE

0) Petri nets

1) Motivation for discrete event observers

2) Relevant literature

3) Main idea

4) Marking estimation

5) Marking estimation with initial macromarking

6) Control using observers

7) Deadlock recovery and estimate after net time out

8) Using timing information to improve the procedure

9) Conclusions and future work

Page 24: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 24

4 - MARKING ESTIMATION

• Hypothesis:

- The net structure is known

- The transition firing can be observed

- The initial marking is not known

PostPreTPN ,,,

0M

• Algorithm

1 - Initial estimate: Let

2 - Wait until fires

3 - Update previous estimate:

4 - New estimate:

5 - ; goto 2.

00

w string)(empty 0ww

t

)(Premax ,t,wwt ,t)C(wtwt

wtw

Page 25: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 25

ESTIMATION (cont’d)

• Can define place error:

ww M

)()(),( ppMMe wwwwp

),(),(),( wwpwtwpwtwtp MeMeMe

),(),(),( wwwtwwtwt MeMeMe

wmmm MMMwMMMw NNNC 00 :)(

• Estimate is a lower bound:

• The set of markings consistent with observation w is:

and estimation error:

• Error functions are non-increasing:

wwww MMe 1),(

Properties

Page 26: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 26

Properties

• An observed word is marking complete if w ww M

w L(N,M ) 0

ww

wt

• A net system is:

- Marking Observable (MO) if there exists a complete word

- Strongly Marking Observable (SMO) in k steps if:

a) all with are complete

b) all with that are not complete can be continued in a word

N M, 0

ESTIMATION (cont’d)

Page 27: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 27

Observer reachability graph

• Each node of the graph is labeled with:

The real marking Mw The estimation error uw = Mw - w

t1

t2

t3

p1 p2

p3

2 0 0 / 2 0 0

1 1 0 / 1 0 0

1 0 1 / 1 0 0

2 0 0 / 1 0 0

t2

t2

t3

t1

0 2 0 / 0 0 0 1 1 0 / 0 0 0

0 1 1 / 0 0 0 2 0 0 / 0 0 0

0 0 2 / 0 0 0 1 0 1 / 0 0 0

t3

t3 t3 t2

t1

t1

t2

t2

t1

t3

t2

t2

ESTIMATION (cont’d)

Page 28: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 28

Observer coverability graph

• If the net is unbounded, is it possible to construct an observer coverability graph (OCG). The error vector u is now only an upper bound.

t1 t2 p

1 / 1

/ 1

t1

t1, t2

t1, t2

t2 t1

t1

0 / 0

1 / 0

/ 0

t2

ESTIMATION (cont’d)

Page 29: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 29

Analysis of properties

Theorem 1

A net system is:N M, 0

),(),( 0000MNLMNLMM

• marking observable iff

• marking observable if there exist a node in the

OCG with

• strongly marking observable iff in the OCG for each

dead node and for each node in a cycle

ESTIMATION (cont’d)

Page 30: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 30

OUTLINE

0) Petri nets

1) Motivation for discrete event observers

2) Relevant literature

3) Main idea

4) Marking estimation

5) Marking estimation with initial macromarking

6) Control using observers

7) Deadlock recovery and estimate after net time out

8) Using timing information to improve the procedure

9) Conclusions and future work

Page 31: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 31

5 – MARKING ESTIMATION WITH INITIAL MACROMARKING

• Sometimes partial information on the initial marking is available

0M

),(0 MNRM

X

MXMXMMNR TTmN),(

• Example: assume the net starts from marking (known) evolving unobserved until it reaches ; at this point we start observations.

Then we may use the information that

• This characterization in terms of PN reachability is hard to use but we can approximate it using a matrix of invariants :

M

Page 32: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 32

Generalizing, we define an initial macromarking.

bMVMbV Tm NM ,

P rPPPP 10

jP1j jb

jPjv

Tr

r

bbbb

vvvV

21

21

0P

• The set of places is written as:

• For each , the token content of is known to be

Nothing is known about the marking in

• Let be the char vector of and define

• Macromarking:

MACROMARKING (cont’d)

Page 33: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 33

A MANUFACTURING EXAMPLE

p1

p10

p3 p4

p5

p6

p7

p8 p9

p2

t6

t7

t1

t4

t2

t3

t5

p11

p12

M0(p11)+M0 (p12) = 1M0(p1)+M0 (p3)+M0 (p4) = 5M0(p1)+M0 (p5)+M0 (p6) = 5M0(p1)+M0 (p3)+M0 (p6) +M0 (p11) = 6M0(p1)+M0 (p4)+M0 (p5) +M0 (p12) = 5

Initial macromarking: we know the token content in each cycle

M0(p2)+M0 (p8) +M0 (p9) = 6M0(p2)+M0 (p3)+M0 (p4)+M0 (p7)+M0 (p10) = 6M0(p2)+M0 (p5)+M0 (p6)+M0 (p7)+M0 (p10) = 6M0(p2)+M0 (p3)+M0 (p6)+M0 (p7)+M0 (p10)+M0 (p11) = 7M0(p2)+M0 (p4)+M0 (p5)+M0 (p7)+M0 (p10)+M0 (p12) = 6

MACROMARKING (cont’d)

Page 34: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 34

Algorithm (estimation with macromarking)

1 – Initial estimate with

2 - Initial bound

3 - Let the current observed word be w=w0.

4 - Wait until t fires.

5 - Update the estimate to

6 - New estimate:

7 - New bound:

8 - Goto 4.

0w 00

(p)w

bBw

0

,t)C(wtwt

)(VBB wwtT

wwt

MACROMARKING (cont’d)

),(Pre),(max)( tppp wwt w

Page 35: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 35

Elementary results

• The estimate is a lower bound: ww M

MwMbVMMMw m [:),( 00

def NC

• The error functions are non-increasing

• The set of markings consistent with the observation w is:

MACROMARKING (cont’d)

wwwTTm

ww M,BVMVMBw Ndef

,CC

• This set can also be characterized as:

Page 36: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 36

OUTLINE

0) Petri nets

1) Motivation for discrete event observers

2) Relevant literature

3) Main idea

4) Marking estimation

5) Marking estimation with initial macromarking

6) Control using observers

7) Deadlock recovery and estimate after net time out

8) Using timing information to improve the procedure

9) Conclusions and future work

Page 37: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 37

6 - CONTROL USING OBSERVERS

• GMEC specifications: a set of linear constraints

for j = 1, …, q.

Example:

jT

j kMx

})(|{ jT

jm kMxjM NL

• The set of legal markings is:

1)()(2)()(

43

21pMpMpMpM

Page 38: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 38

• Control with observer

Prevent the firing of t after w has been observed iff there exists a

legal consistent marking M such that the firing of t from M leads to a

forbidden marking i.e., if exists j such that where

enabledcontrolisif1disabledcontrolisif0

, )(tt

tf wCControl pattern:

CONTROL (cont’d)

),('),,1(

)(..

'max

tCMMpikMx

wMts

Mx

iT

i

Tjj

C

jj k*

Page 39: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 39

• EXAMPLE

t2

p1 p2

p3t1 t3

}2)(|{ 1 pMML

3)()()(),( 321 pMpMpMMbVM

The firing of t1 is legal from but

111

0M

),()(102

0 bVwM MLCL

L

003

102

1tt1 is disabled

Page 40: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 40

• EXAMPLE

t2

p1 p2

p3t1 t3

1 0 2 / 0 0 0 / 0

1 1 1 / 0 1 0 / 1

0 2 1 / 0 1 0 / 1

0 1 2 / 0 1 0 / 1

0 0 3 / 0 0 0 / 0

t3

t2

t3

t3

t1

2 1 0 / 0 1 0 / 1

1 2 0 / 0 1 0 / 1

0 3 0 / 0 1 0 / 1

t2

t1

t1

t3

t3

0 2 1 / 0 1 1 / 2

0 1 2 / 0 1 1 / 2

0 0 3 / 0 0 1 / 1

1 0 2 / 0 0 1 / 1

t2

t3

t3

t1

0 1 2 / 0 0 1 / 1

1 1 1 / 0 0 1 / 1

0 2 1 / 0 0 1 / 1

1 2 0 / 0 0 0 / 0

t2

t1

t2

t1

2 1 0 / 1 1 0 / 2

t1

1 1 1 / 0 1 1 / 2

t1

t1

2 0 1 / 0 0 1 / 1

t1

t3

2 1 0 / 0 0 0 / 0 t1

t3

t3

1 0 2 / 1 0 1 / 2 t3

2 0 1 / 1 0 1 / 2

t1

t2

1 1 1 / 1 1 1 / 3

Actual marking Mw Estimation error uw = Mw - w

Bound

Page 41: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 41

• Usually, the control law using observers is not optimal

since it can disable the firing of transitions that do not

yield illegal markings.

• Such a control law may easily cause the controlled plant

to block.

• We want to add to the observer the possibility of

recovering from deadlocks caused by the incomplete

information.

CONTROL (cont’d)

Page 42: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 42

A MANUFACTURING EXAMPLE p1

p10

p3 p4

p5

p6

p7

p8 p9

p2

t6

t7

t1

t4

t2

t3

t5

p11

p12

M(p9) 3

M(p3)+M(p5) 3

Page 43: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 43

( 4 5 1 0 0 1 0 1 0 0 0 1 / 0 0 0 0 0 0 0 0 0 0 0 0 / 1 5 5 6 5 6 6 6 7 6 )

( 4 5 0 1 0 1 0 1 0 0 1 0 / 0 0 0 1 0 0 0 0 0 0 1 0 / 0 4 5 5 4 6 5 6 6 5 )

( 5 5 0 0 0 0 1 1 0 0 1 0 / 1 0 0 0 0 0 1 0 0 0 1 0 / 0 4 4 4 4 6 5 5 5 5 )

( 5 6 0 0 0 0 0 0 0 0 1 0 / 1 1 0 0 0 0 0 0 0 0 1 0 / 0 4 4 4 4 5 5 5 5 5 )

t1

t4

t3

Deadlock

Actual marking Mw Estimate w

Bound w

Page 44: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 44

p1

p10

p3 p4

p5

p6

p7

p8 p9

p2

t6

t7

t1

t4

t2

t3

t5

p11

p12

M(p9) 3

M(p3)+M(p5) 3

Only the green tokens have been detected

t6 and t7 are disabled by the controller

?

?

?

Page 45: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 45

OUTLINE

0) Petri nets

1) Motivation for discrete event observers

2) Relevant literature

3) Main idea

4) Marking estimation

5) Marking estimation with initial macromarking

6) Control using observers

7) Deadlock recovery and estimate after net time out

8) Using timing information to improve the procedure

9) Conclusions and future work

Page 46: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 46

IDEA:

use the info that the net is deadlocked to improve the estimate (reducing the set of consistent markings)

B,C

bM

Theorem: In an ordinary net a marking

M is dead iff:

• is a siphon

• for all

0)( pMpS

StTt ,

Mw

7 - DEADLOCK RECOVERY AND ESTIMATE UPDATE AFTER NET TIME-OUT

Set of blocking markings

Page 47: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 47

• Given a structurally bounded net N, a marking M is dead iff a vector ({0,1}m such that:

1Pre1

1PostPre

)( 22

1

sMs

KMsKssK

N

T

TT

D

s

DEADLOCK RECOVERY (cont’d)

)(),(:}1,0{|)( NsMsMN mmb DM N

The set of blocking markings of N:

is the characteristic vector of a siphon s

contains only empty places s

contains all empty places s

each transitions has at least apre arc coming from s

Page 48: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 48

DEADLOCK RECOVERY (cont’d) Algorithm (Control pattern updating after net time-out)

Let C =C(,B). Assume f(.,C) has led the net to a time-out.

1. Let i=0 and f0 = f(., C).

2. Let Ti={tT | fi(t)=1} and let Ni the net obtained by N

removing all transitions not in Ti.

3. Update the control pattern to fi+1=f(., C Mb(Ni))

4. If fi+1= fi THEN exit: (the deadlock procedure has failed)

5. Wait until

(a) a transition fires (net has recovered from deadlock)

(b) a new net time-out occurs: let i=i+1 and go to 2.

Page 49: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 49

A unique linear algebraic formalism for:

– state estimation

– control

– deadlock recovery

DEADLOCK RECOVERY (cont’d)

Main advantages of the approach:

This procedure is denoted NTO procedure (net time-out procedure).

Page 50: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 50

A MANUFACTURING EXAMPLE (cont’d) p1

p10

p3 p4

p5

p6

p7

p8 p9

p2

t6

t7

t1

t4

t2

t3

t5

p11

p12

M0(p11)+M0 (p12) = 1M0(p1)+M0 (p3)+M0 (p4) = 5M0(p1)+M0 (p5)+M0 (p6) = 5M0(p1)+M0 (p3)+M0 (p6) +M0 (p11) = 6M0(p1)+M0 (p4)+M0 (p5) +M0 (p12) = 5

M(p9) 3

Initial macromarking: we know the token content in each cycle

M(p3)+M(p5) 3

M0(p2)+M0 (p8) +M0 (p9) = 6M0(p2)+M0 (p3)+M0 (p4)+M0 (p7)+M0 (p10) = 6M0(p2)+M0 (p5)+M0 (p6)+M0 (p7)+M0 (p10) = 6M0(p2)+M0 (p3)+M0 (p6)+M0 (p7)+M0 (p10)+M0 (p11) = 7M0(p2)+M0 (p4)+M0 (p5)+M0 (p7)+M0 (p10)+M0 (p12) = 6

Page 51: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 51

( 4 5 1 0 0 1 0 1 0 0 0 1 / 0 0 0 0 0 0 0 0 0 0 0 0 / 1 5 5 6 5 6 6 6 7 6 )

( 4 5 0 1 0 1 0 1 0 0 1 0 / 0 0 0 1 0 0 0 0 0 0 1 0 / 0 4 5 5 4 6 5 6 6 5 )

( 5 5 0 0 0 0 1 1 0 0 1 0 / 1 0 0 0 0 0 1 0 0 0 1 0 / 0 4 4 4 4 6 5 5 5 5 )

( 5 6 0 0 0 0 0 0 0 0 1 0 / 1 1 0 0 0 0 0 0 0 0 1 0 / 0 4 4 4 4 5 5 5 5 5 )

t1

t4

t3

NTO

Page 52: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 52

( 5 6 0 0 0 0 0 0 0 0 1 0 / 5 1 0 0 0 0 0 0 0 0 1 0 / 0 0 0 0 0 5 5 5 5 5 )

t6

( 4 5 1 0 0 1 0 1 0 0 0 1 / 0 0 0 0 0 0 0 0 0 0 0 0 / 1 5 5 6 5 6 6 6 7 6 )

( 4 5 0 1 0 1 0 1 0 0 1 0 / 0 0 0 1 0 0 0 0 0 0 1 0 / 0 4 5 5 4 6 5 6 6 5 )

( 5 5 0 0 0 0 1 1 0 0 1 0 / 1 0 0 0 0 0 1 0 0 0 1 0 / 0 4 4 4 4 6 5 5 5 5 )

( 5 6 0 0 0 0 0 0 0 0 1 0 / 1 1 0 0 0 0 0 0 0 0 1 0 / 0 4 4 4 4 5 5 5 5 5 )

t1

t4

t3

NTO

Page 53: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 53

NTO

NTO

( 5 6 0 0 0 0 0 0 0 0 1 0 / 5 1 0 0 0 0 0 0 0 0 1 0 / 0 0 0 0 0 5 5 5 5 5 )

t6

( 5 5 0 0 0 0 0 0 1 1 1 0 / 5 0 0 0 0 0 0 0 1 1 1 0 / 0 0 0 0 0 5 5 5 5 5 )t7

( 4 5 1 0 1 0 0 0 1 0 1 0 / 4 0 1 0 1 0 0 0 1 0 1 0 / 0 0 0 0 0 5 5 5 5 5 )t2

( 4 5 1 0 0 1 0 0 1 0 0 1 / 4 0 1 0 0 1 0 0 1 0 0 1 / 0 0 0 0 0 5 5 5 5 5 ) t5

( 4 5 1 0 0 1 0 1 0 0 1 0 / 4 0 1 0 0 1 0 1 0 0 0 1 / 0 0 0 0 0 5 5 5 5 5 ) t1

( 4 5 0 1 0 1 0 1 0 0 1 0 / 4 0 0 1 0 1 0 1 0 0 1 0 / 0 0 0 0 0 5 5 5 5 5 )

( 5 5 0 0 0 0 1 1 0 0 1 0 / 5 0 0 0 0 0 1 1 0 0 1 0 / 0 0 0 0 0 5 5 5 5 5 )

( 5 6 0 0 0 0 0 0 0 0 1 0 / 5 1 0 0 0 0 0 0 0 0 1 0 / 0 0 0 0 0 5 5 5 5 5 )

t4

t3

Page 54: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 54

NTO

NTO

( 5 6 0 0 0 0 0 0 0 0 1 0 / 5 1 0 0 0 0 0 0 0 0 1 0 / 0 0 0 0 0 5 5 5 5 5 )

t6

( 5 5 0 0 0 0 0 0 1 1 1 0 / 5 0 0 0 0 0 0 0 1 1 1 0 / 0 0 0 0 0 5 5 5 5 5 )t7

( 4 5 1 0 1 0 0 0 1 0 1 0 / 4 0 1 0 1 0 0 0 1 0 1 0 / 0 0 0 0 0 5 5 5 5 5 )t2

( 4 5 1 0 0 1 0 0 1 0 0 1 / 4 0 1 0 0 1 0 0 1 0 0 1 / 0 0 0 0 0 5 5 5 5 5 ) t5

( 4 5 1 0 0 1 0 1 0 0 1 0 / 4 0 1 0 0 1 0 1 0 0 0 1 / 0 0 0 0 0 5 5 5 5 5 ) t1

( 4 5 0 1 0 1 0 1 0 0 1 0 / 4 0 0 1 0 1 0 1 0 0 1 0 / 0 0 0 0 0 5 5 5 5 5 )

( 5 5 0 0 0 0 1 1 0 0 1 0 / 5 0 0 0 0 0 1 1 0 0 1 0 / 0 0 0 0 0 5 5 5 5 5 )

( 5 6 0 0 0 0 0 0 0 0 1 0 / 5 1 0 0 0 0 0 0 0 0 1 0 / 0 0 0 0 0 5 5 5 5 5 )

t4

t3

( 5 6 0 0 0 0 0 0 0 0 1 0 / 5 6 0 0 0 0 0 0 0 0 1 0 / 0 0 0 0 0 0 0 0 0 0 )

Page 55: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 55

Proposition: if the initial macromarking is such that

(i.e., each column of V is a P-invariant) then, for all

observed words w,

bV

,M0CV T

bVww

,0 MCC

DEADLOCK RECOVERY (cont’d)

If a marking is consistent with the observation w then it

is also consistent with the initial observation

Page 56: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 56

Theorem 1: if the initial macromarking is such that

then the closed loop system will never time out if the following constraint set does not admit feasible solutions

wt, T | ft T 1))(( 00 C

bV

,M0CV T

)( 0N M

bMVb

T

M

DEADLOCK RECOVERY (cont’d)

where

Page 57: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 57

Definition: the maximal control pattern for a set C is:

where and i

iff

lim),(max C

),(0 C ff ))(N, f()g(ff ibii MC1

DEADLOCK RECOVERY (cont’d)

When a controlled system times out, if it is deadlocked

eventually a control pattern is reached ),(max Cf

Page 58: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 58

Theorem 2: if the initial macromarking is such that

then the closed loop system will always recover from a time-out if the following constraint set does not admit feasible solutions

bVt, T | ft T 1)),((maxmax

M

bV

,M0CV T

)( maxN M

bMVb

T

M

DEADLOCK RECOVERY (cont’d)

where

Page 59: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 59

p1

p10

p3 p4

p5

p6

p7

p8 p9

p2

t6

t7

t1

t4

t2

t3

t5

p11

p12

M(p9) 3

M(p3)+M(p5) 3

A MANUFACTURING EXAMPLE (cont’d)

Initial macromarking: the net is a marked graph

each cycle corresponds to a P-invariant

the initial macromarking is such that

bV

,M 0CV T

Page 60: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 60

A MANUFACTURING EXAMPLE (cont’d)

Theorem 1 does not apply:

the following constraint set admits feasible solutions

the net might time out (it actually does)

)( 0N M

bMVb

T

M

Theorem 2 does apply:

the following constraint set does not admit feasible solutions

the closed loop system with net time-out recovery

is deadlock-free

)( maxN M

bMVb

T

M

Page 61: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 61

OUTLINE

0) Petri nets

1) Motivation for discrete event observers

2) Relevant literature

3) Main idea

4) Marking estimation

5) Marking estimation with initial macromarking

6) Control using observers

7) Deadlock recovery and estimate after net time out

8) Using timing information to improve the procedure

9) Conclusions and future work

Page 62: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 62

8 - USING TIMING INFORMATION TO IMPROVE THE PROCEDURE

We extend the previous approach to exploit available information on the timing structure so as to obtain a better estimate of the set of consistent markings.

A known delay time (t) is associated to each transition.

We say that a transition t has timed-out at time now if it has been control enabled without firing during [now- (t), now].

We can be sure that at time now the actual marking Mw is such that Mw |t.

Page 63: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 63

IDEA:

If Tto is the set of transitions that have timed out at time now, we know for sure that the actual marking is such that

We compute a (possibly) less restrictive control pattern using as set of consistent markings

i.e., for all we compute

USING TIMING INFORMATION (cont’d)

)( tobw N M M

)()( tob N w MC Tt

)()( tob N w MCt,f

Page 64: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 64

USING TIMING INFORMATION (cont’d)

Main Advantages:

• Accelerates the state estimation

• Accelerates the deadlock recovery procedure

• Enables to recover from partial deadlocks

The new approach is denoted TTO procedure (transition time-out procedure).

Page 65: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 65

A MANUFACTURING EXAMPLE (cont’d) p1

p10

p3 p4

p5

p6

p7

p8 p9

p2

t6

t7

t1

t4

t2

t3

t5

p11

p12

M(p9) 3

M(p3)+M(p5) 3

(t1) = 2 (t2) = 5

(t3) = 3 (t4) = 1

(t5) = 2 (t6) = 6

(t7) = 3

Transition time-out

Transition firing

Delays:

Page 66: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 66

( 3 4 1 0 1 0 0 1 0 0 0 1 / 0 0 0 0 0 0 0 0 0 0 0 0 / 6 5 5 5 5 5 4 4 4 1 )

( 3 4 0 1 1 0 0 1 0 0 1 0 / 0 0 0 1 1 0 0 1 0 0 1 0 / 4 4 4 4 4 3 3 3 3 0 )

( 3 4 1 0 1 0 0 1 0 0 0 1 / 0 0 0 0 0 0 0 0 0 0 0 0 / 6 5 5 5 5 5 4 4 4 1 )

( 3 4 0 1 1 0 0 1 0 0 1 0 / 0 0 0 1 0 0 0 0 0 0 1 0 / 5 4 5 4 5 4 3 4 3 0 )

t1

( 3 4 0 1 1 0 0 1 0 0 1 0 / 0 0 0 1 1 0 0 1 0 0 1 0 / 4 4 4 4 4 3 3 3 3 0 )

( 3 4 0 1 1 0 0 1 0 0 1 0 / 0 0 0 1 1 0 0 1 0 0 1 0 / 4 4 4 4 4 3 3 3 3 0 )

t2

( 3 4 0 1 0 1 0 1 0 0 0 1 / 0 0 0 1 0 1 0 1 0 0 0 1 / 4 4 4 4 4 3 3 3 3 0 ) t4

( 4 4 0 0 0 0 1 1 0 0 0 1 / 1 0 0 0 0 0 1 1 0 0 0 1 / 4 4 4 4 4 3 3 3 3 0 )

now = 1

now = 2

now = 2

now = 3

now = 4

now = 7

now = 8

{ t4 }

{ t5 }

{ t3, t4, t5 }

{ t1, t3, t4, t5 }

Page 67: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 67

t4

( 4 4 0 0 0 0 1 1 0 0 0 1 / 1 0 0 0 0 0 1 1 0 0 0 1 / 4 4 4 4 4 3 3 3 3 0 )

( 4 4 0 0 0 0 1 1 0 0 0 1 / 4 0 0 0 0 0 1 1 0 0 0 1 / 4 4 4 4 4 0 0 0 0 0 )

t3

( 4 5 0 0 0 0 0 0 0 0 0 1 / 4 1 0 0 0 0 0 0 0 0 0 1 / 4 4 4 4 4 0 0 0 0 0 )

( 4 5 0 0 0 0 0 0 0 0 0 1 / 4 1 0 0 0 0 0 0 0 0 0 1 / 4 4 4 4 4 0 0 0 0 0 )

( 4 5 0 0 0 0 0 0 0 0 0 1 / 4 5 0 0 0 0 0 0 0 0 0 1 / 0 0 0 0 0 0 0 0 0 0 )

now = 8

now = 9

now = 11

now = 12

now = 14

{ t1, t4, t5 }

{ t1, t2, t4, t5, t7 }

{ t1, t2, t3, t4, t5, t7 }

Page 68: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 68

OUTLINE

0) Petri nets

1) Motivation for discrete event observers

2) Relevant literature

3) Main idea

4) Marking estimation

5) Marking estimation with initial macromarking

6) Control using observers

7) Deadlock recovery and estimate after net time out

8) Using timing information to improve the procedure

9) Conclusions and future work

Page 69: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 69

• We provided a unique linear algebraic formalism for: state

estimation, control, deadlock recovery.

• We showed how timing information can be used to accelerate the

state estimation and to detect the observer induced deadlock.

• Some sufficient conditions for deadlock recovery have been derived.

9 – CONCLUSIONS

Page 70: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 70

FUTURE WORK

• Language completeness:

A word is language complete if

This may allow to use observers in event feedback.

),(),( ww MNLNL

• Partial event observability:

assume some events are unobservable or

undistinguishable. This may destroy the linear algebraic

formalism in the general case. Look for restricted cases.

Page 71: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 71

• Associate a probabilistic structure to the transition

firing and define , where is the

probability of having a complete word after k firings.

Under which conditions ?

]1,0[: N )(k

1)( kk

FUTURE WORK (cont’d)

Page 72: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 72

• A. Giua, C. Seatzu, “Observability of place/transition nets,” IEEE Trans. on

Automatic Control, Vol. 47, No. 9, pp. 1424-1437, September, 2002.

• F. Basile, A. Giua, C. Seatzu, “Observer based state-feedback control of

timed Petri nets with deadlock recovery,” IEEE Trans. on Automatic Control,

Vol. 49, No. 1, pp. 17-29, Jan 2004.

• F. Basile, A. Giua, C. Seatzu, "Observer-based state-feedback control of

timed Petri nets with deadlock recovery: theory and implementation," Proc

CESA'2003 Multiconference (Lille, France), Jul 2003.

• A. Giua, C. Seatzu, J. Júlvez, "Marking estimation of Petri nets with pairs of

nondeterministic transitions," Asian Journal of Control, June 2004. To appear.

• A. Giua, D. Corona, C. Seatzu, “State estimation and control of

nondeterministic -free labeled Petri nets”, Proc. WODES’04. To appear.

REFERENCES

Page 73: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 73

- Structurally Strongly Marking Observable (sSMO) if

the system is SMO for all

- Structurally Marking Observable (sMO) if the system

is MO for all

)R(N,MM 0

• A net system is:

- Uniformly Marking Observable (uMO) if the system

is Marking Observable for all

N M, 0

MN ,

)R(N,MM 0

- Uniformly Strongly Marking Observable (uSMO) if

the system is SMO for all MN ,

mNMMN ,

MN , mNM

ESTIMATION (cont’d)

Page 74: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 74

• uniformly MO iff the semi-linear set

is a home-space for all

Theorem 2

A net system is:N M, 0

),(Pre)(),(Pre0)( tppMtMpMMAptp

Pp

• uniformly SMO only if it is bounded

Similar results hold for structural MO and SMO.

This is a finite union of linear sets with the same period and the

home space property is decidable (Johnen & Frutos Escrig; 89)

ESTIMATION (cont’d)

Page 75: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 75

DEADLOCK RECOVERY (cont’d)

B,C

bM

Mw

• After a deadlock recovery procedure is invoked we should remember the set of consistent markings is

• The linear characterization of this set is rather complex (it involves also a vector ). We propose to use a simpler approximation.

bB MC ,

s

Page 76: Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004 76

DEADLOCK RECOVERY (cont’d)

B,C

bM

Mw

• Compute for all places:

b

iiBμMts

pMzMC

,..

)(min

Tmw zz 1~

)~(~

wwT

ww VBB

wwwTT

ww μM,BμVMVMBμ ~~~~,~ C

• Define the new set:

• Compute:

• Define

ww Bμ ~,~C