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)
OUTLINE
0)
1)
2)
3)
4)
5)
6)
7)
8)
9)
Petri nets
Motivation for discrete event observers
Relevant literature
Main idea
Marking estimation
Marking estimation with initial macromarking
Control using observers
Deadlock recovery and estimate after net time out
Using timing information to improve the procedure
Conclusions and future work
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
2
0 – PETRI NETS
A
•
•
•
•
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
t2
p3 t3
p4
t1
t6
p8
p5
p5
t4
p6
t5
p7
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
3
PETRI NETS (cont’d)
• Net system (a net N with initial marking M0):
N, M0
• Set of firable sequences: L( N , M 0 ) w T * M 0 w
• Set of reachable markings:
R( N , M 0 ) M N m w L( N , M 0 ) : M 0 w M
Siphon: a set of places S such that if a transition inputs
into S then it also outputs from S (Ex: S = {p1, p2} )
t1
t3
p1
t2
p2
p3
An empty siphon will always remain empty
all its output transitions are deadlocked
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
4
OUTLINE
0)
1)
2)
3)
4)
5)
6)
7)
8)
9)
Petri nets
Motivation for discrete event observers
Relevant literature
Main idea
Marking estimation
Marking estimation with initial macromarking
Control using observers
Deadlock recovery and estimate after net time out
Using timing information to improve the procedure
Conclusions and future work
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
5
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
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
6
MOTIVATION (cont’d)
• CTA - Supervisory control theory is based on
language specifications (a set of legal words):
language specification
event-feedback
plant
control
K
legal
words
controller
w
word of events
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
7
MOTIVATION (cont’d)
• When dealing with Petri nets it is natural to use state
specifications (a set of legal markings):
state specification
state-feedback
plant
control
L
legal
markings
controller
M
state / marking
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
8
MOTIVATION (cont’d)
• A mixed structure is often used:
State specification = marking of the net
Output events
= transitions firing
L
legal
markings
plant
controller
w
model
M=Mw
M0
• 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.
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
9
MOTIVATION (cont’d)
If the initial marking M 0 is not completely known:
use “observers” to estimate the marking M w after the
word of events w has been observed
In our approach the observer determines two parameters
Estimate: w
Bound: Bw
L
legal
markings
plant
controller
w Bw
w
observer
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
10
MOTIVATION (cont’d)
Unlike other approaches based on automata, the PN
structure allows one to “describe” the set of consistent
markings C w in terms of these two parameters that
are recursively updated.
Linear constraint set
C(w)
w
Mw
C w f ( w , Bw )
Bw
wt g ( w , t )
Bwt h( w , Bw , t )
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
11
MOTIVATION (cont’d)
PROBLEM: incomplete information due to the presence of
an observer in the control loop may lead to deadlock.
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
All these problems are solved using the same approach
based on integer programming
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
12
OUTLINE
0)
1)
2)
3)
4)
5)
6)
7)
8)
9)
Petri nets
Motivation for discrete event observers
Relevant literature
Main idea
Marking estimation
Marking estimation with initial macromarking
Control using observers
Deadlock recovery and estimate after net time out
Using timing information to improve the procedure
Conclusions and future work
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
13
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.)
control
L
legal
markings
controller
equivalence
class
plant
M
marking
mask
Derived nec & suff condition for optimality given a mask.
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
14
LITERATURE (cont’d)
• 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)
DRAWBACK
These approaches enumerate at each step the set of
consistent states (high complexity). No notion of
“estimate error”.
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
15
LITERATURE (cont’d)
• Diagnosis
- Wang, Schwartz
[T-net 93]
(state estimation)
- Ushio, Onishi & Okuda [SMC98] (place observation)
• Petri net observability
- Meda, Ramirez
- Ramirez, Riveda, Lopez
[SMC98] (interpreted nets)
[ICRA2000]
• Partial knowledge of the marking
- Cardoso, Valette & Dubois
[ICATPN90]
Concept of macromarking and “membership function”.
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
16
OUTLINE
0)
1)
2)
3)
4)
5)
6)
7)
8)
9)
Petri nets
Motivation for discrete event observers
Relevant literature
Main idea
Marking estimation
Marking estimation with initial macromarking
Control using observers
Deadlock recovery and estimate after net time out
Using timing information to improve the procedure
Conclusions and future work
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
17
3 - MAIN IDEA
w0
• Initially observed sequence:
M w0 M 0 1 1 1T
• Initial marking
w0 0 0 0T
• Estimate:
• Set of consistent markings: C w0 M N m M w0
p1
t2
t1
p2
p1
t3
p3
t2
t1
p2
t3
p3
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
18
MAIN IDEA (cont’d)
t1 firing is detected
p1
t2
t1
p2
p1
t3
p3
t2
t1
p2
t3
p3
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
19
MAIN IDEA (cont’d)
After t1 fires
w1 t1
M w1 2 1 0T
• Observed sequence:
• Actual marking
w1 1 0 0T
• Estimate:
• Set of consistent markings:
p1
t2
t1
p2
p1
t3
p3
C w1 M N m M w1
t2
t1
p2
t3
p3
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
20
MAIN IDEA (cont’d)
t2 firing is detected
p1
t2
t1
p2
p1
t3
p3
t2
t1
p2
t3
p3
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
21
MAIN IDEA (cont’d)
After t1t2 fires
w2 t1t2
• Observed sequence:
M w2 1 2 0T
• Actual marking
w2 0 1 0T
• Estimate:
C w2 M N m M w2
• Set of consistent markings:
p1
t2
t1
p2
p1
t3
p3
t2
t1
p2
t3
p3
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
22
OUTLINE
0)
1)
2)
3)
4)
5)
6)
7)
8)
9)
Petri nets
Motivation for discrete event observers
Relevant literature
Main idea
Marking estimation
Marking estimation with initial macromarking
Control using observers
Deadlock recovery and estimate after net time out
Using timing information to improve the procedure
Conclusions and future work
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
23
4 - MARKING ESTIMATION
• Hypothesis:
- The net structure N P, T , Pre, Post is known
- The transition firing can be observed
- The initial marking M 0 is not known
• Algorithm
1 - Initial estimate: w0 0 Let w w0 (empty string)
2 - Wait until t fires
max w ,Pre(,t )
3 - Update previous estimate: wt
C( ,t)
4 - New estimate: wt wt
5 - w wt ; goto 2.
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
24
ESTIMATION (cont’d)
Properties
• Estimate is a lower bound: w M w
• Can define place error: e p ( M w , w ) M w ( p) w ( p )
and estimation error: e( M w , w ) 1 M w w
• Error functions are non-increasing:
) e p (M w , w )
e p ( M wt , wt ) e p ( M w , wt
) e( M w , w )
e( M wt , wt ) e( M w , wt
• The set of markings consistent with observation w is:
C ( w) M N m M 0 N m : M 0 w M M N m M w
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
25
ESTIMATION (cont’d)
Properties
• An observed word w is marking complete if
w M w
• A net system N , M 0 is:
- Marking Observable (MO) if there exists a complete
word
w L(N,M0 )
- Strongly Marking Observable (SMO) in k steps if:
a) all w with w k are complete
b) all w with w k that are not complete can be
continued in a word wt
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
26
ESTIMATION (cont’d)
Observer reachability graph
• Each node of the graph is labeled with:
The real marking Mw
The estimation error uw = Mw - w
200/200
t2
t2
t2
110/100
p1
t2
t1
p2
t3
t3
t2
101/100
t1
200/100
020/000
t2
110/000
t3
t1
011/000
t3
t2
200/000
t2
t3
002/000
t1
101/000
p3
t3
t1
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
27
ESTIMATION (cont’d)
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.
t2
1/1
t1
p
t1
t2
/1
t 1 , t2
0/0
t2
t1
1/0
t1
/0
t1, t2
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
28
ESTIMATION (cont’d)
Analysis of properties
Theorem 1
A net system N , M 0 is:
• marking observable iff M 0 M 0 L( N , M 0 ) L( N , M 0 )
• marking observable if there exist a node in the
OCG with u 0
• strongly marking observable iff in the OCG for each
dead node and for each node in a cycle u 0
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
29
OUTLINE
0)
1)
2)
3)
4)
5)
6)
7)
8)
9)
Petri nets
Motivation for discrete event observers
Relevant literature
Main idea
Marking estimation
Marking estimation with initial macromarking
Control using observers
Deadlock recovery and estimate after net time out
Using timing information to improve the procedure
Conclusions and future work
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
30
5 – MARKING ESTIMATION WITH
INITIAL MACROMARKING
• Sometimes partial information on the initial marking is
available
• Example: assume the net starts from marking M
(known) evolving unobserved until it reaches M 0;
at this point we start observations.
Then we may use the information that M 0 R( N , M )
• This characterization in terms of PN reachability is hard
to use but we can approximate it using a matrix of
invariants X :
R( N , M ) M N m X T M X T M
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
31
MACROMARKING (cont’d)
Generalizing, we define an initial macromarking.
• The set of places P is written as: P P0 P1 Pr
• For each j 1, the token content of Pj is known to be b j
Nothing is known about the marking in P0
• Let v j be the char vector of Pj and define
V v1 v2 vr
b b1 b2 br T
m
T
• Macromarking: M V , b M N V M b
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
32
MACROMARKING (cont’d)
A MANUFACTURING
EXAMPLE
p10
t6
p3
t1
p4
p7
p12
p11
t7
p9
p1
p5
t3
t4
t2
t5
p6
p8
p2
Initial macromarking: we know the token content in each cycle
M0(p11)+M0 (p12) = 1
M0(p1)+M0 (p3)+M0 (p4) = 5
M0(p1)+M0 (p5)+M0 (p6) = 5
M0(p1)+M0 (p3)+M0 (p6) +M0 (p11) = 6
M0(p1)+M0 (p4)+M0 (p5) +M0 (p12) = 5
M0(p2)+M0 (p8) +M0 (p9) = 6
M0(p2)+M0 (p3)+M0 (p4)+M0 (p7)+M0 (p10) = 6
M0(p2)+M0 (p5)+M0 (p6)+M0 (p7)+M0 (p10) = 6
M0(p2)+M0 (p3)+M0 (p6)+M0 (p7)+M0 (p10)+M0 (p11) = 7
M0(p2)+M0 (p4)+M0 (p5)+M0 (p7)+M0 (p10)+M0 (p12) = 6
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
33
MACROMARKING (cont’d)
Algorithm (estimation with macromarking)
1 – Initial estimate w with w (p) 0
0
0
2 - Initial bound
Bw0
b
3 - Let the current observed word be w=w0.
4 - Wait until t fires.
5 - Update the estimate w to wt
( p) max w ( p), Pre( p, t )
C( ,t)
6 - New estimate: wt wt
w )
7 - New bound: Bwt Bw V T ( wt
8 - Goto 4.
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
34
MACROMARKING (cont’d)
Elementary results
• The estimate is a lower bound: w M w
• The error functions are non-increasing
• The set of markings consistent with the observation w is:
def
m
C w M N
M 0 M (V , b ) : M 0 [ w M
• This set can also be characterized as:
def
C w C w , Bw M N m V T M V T w Bw , M w
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
35
OUTLINE
0)
1)
2)
3)
4)
5)
6)
7)
8)
9)
Petri nets
Motivation for discrete event observers
Relevant literature
Main idea
Marking estimation
Marking estimation with initial macromarking
Control using observers
Deadlock recovery and estimate after net time out
Using timing information to improve the procedure
Conclusions and future work
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
36
6 - CONTROL USING OBSERVERS
• GMEC specifications: a set of linear constraints
x jT M k j
for j = 1, …, q.
Example:
M ( p1 ) M ( p2 ) 2
M ( p ) M ( p ) 1
3
4
• The set of legal markings is:
L {M N m | (j ) x jT M k j }
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
37
CONTROL (cont’d)
• 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 j k j where
T
max j x j M '
s.t. M C ( w)
T
xi M ki (i 1, , p )
M ' M C (, t )
Control pattern: f t ,C ( w) 0 if t is control disabled
1 if t is control enabled
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
38
• EXAMPLE
p1
t1
t2
p3
p2
t3
M (V , b) M M ( p1 ) M ( p2 ) M ( p3 ) 3
L {M | M ( p1) 2}
1
The firing of t1 is legal from M 0 1 but
1
2
M 0 L C ( w0 ) L M (V , b)
1
2
3
0 t1 0 L
1
0
t1 is disabled
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
39
• EXAMPLE
t1
210/010/1
102/000/0
t1
t3
p1
t1
t2
p3
111/111/3
210/110/2
t3
021/011/2
120/010/1
111/010/1
102/101/2
t1
t1
t3
p2
201/101/2
t1
t3
t2
t2
t3
t2
t1
111/011/2
012/011/2
030/010/1
021/010/1
t3
t3
003/001/1
012/010/1
t3
t2
t1
t3
Bound
t1
t3
t1
003/000/0
201/001/1
102/001/1
t2
t3
Actual marking Mw
012/001/1
Estimation error uw = Mw - w
t1
111/001/1
210/000/0
t1
t2
t3
021/001/1
t1
120/000/0
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
40
CONTROL (cont’d)
• 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.
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
41
A MANUFACTURING EXAMPLE
M(p3)+M(p5) 3
p3
p1
t1
p4
p7
p10
t6
M(p9) 3
p11
t7
p9
p12
p5
t3
t4
t2
t5
p6
p8
p2
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
42
Actual marking Mw
Estimate w
Bound Bw
(451001010001/000000000000/1556566676)
t1
(450101010010/000100000010/0455465665)
t4
(550000110010/100000100010/0444465555)
t3
(560000000010/110000000010/0444455555)
Deadlock
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
43
M(p3)+M(p5) 3
p3
M(p9) 3
t7
p9
?
t1
p4
?
p10
t6
p1
?
p5
p7
p12
p11
t3
t4
t2
t5
p6
p8
p2
Only the green tokens have been detected
t6 and t7 are disabled by the controller
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
44
OUTLINE
0)
1)
2)
3)
4)
5)
6)
7)
8)
9)
Petri nets
Motivation for discrete event observers
Relevant literature
Main idea
Marking estimation
Marking estimation with initial macromarking
Control using observers
Deadlock recovery and estimate after net time out
Using timing information to improve the procedure
Conclusions and future work
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
45
7 - DEADLOCK RECOVERY AND ESTIMATE
UPDATE AFTER NET TIME-OUT
IDEA:
use the info that the net is deadlocked to improve the
estimate (reducing the set of consistent markings)
C , B
Mw
Theorem: In an ordinary net a marking
M is dead iff:
• S p M ( p ) 0 is a siphon
Mb
Set of blocking
markings
• for all t T ,
t S
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
46
DEADLOCK RECOVERY (cont’d)
• Given a structurally bounded net N, a marking M is dead
iff a vector s ({0,1}m such that:
s is the characteristic
K1PreT s
D ( N ) K2 s M
s M
PreT s
T
Post s
K2 1
1
1
vector of a siphon
s
s
contains only empty places
contains all empty places
each transitions has at least a
pre arc coming from s
The set of blocking markings of N:
Mb ( N ) M N
m
m
| s {0,1} : ( M , s ) D ( N )
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
47
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.
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
48
DEADLOCK RECOVERY (cont’d)
Main advantages of the approach:
A unique linear algebraic formalism for:
– state estimation
– control
– deadlock recovery
This procedure is denoted NTO procedure
(net time-out procedure).
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
49
A MANUFACTURING EXAMPLE (cont’d)
M(p3)+M(p5) 3
p3
p1
t1
p4
p7
p10
t6
M(p9) 3
p11
t7
p9
p12
p5
t3
t4
t2
t5
p6
p8
p2
Initial macromarking: we know the token content in each cycle
M0(p11)+M0 (p12) = 1
M0(p1)+M0 (p3)+M0 (p4) = 5
M0(p1)+M0 (p5)+M0 (p6) = 5
M0(p1)+M0 (p3)+M0 (p6) +M0 (p11) = 6
M0(p1)+M0 (p4)+M0 (p5) +M0 (p12) = 5
M0(p2)+M0 (p8) +M0 (p9) = 6
M0(p2)+M0 (p3)+M0 (p4)+M0 (p7)+M0 (p10) = 6
M0(p2)+M0 (p5)+M0 (p6)+M0 (p7)+M0 (p10) = 6
M0(p2)+M0 (p3)+M0 (p6)+M0 (p7)+M0 (p10)+M0 (p11) = 7
M0(p2)+M0 (p4)+M0 (p5)+M0 (p7)+M0 (p10)+M0 (p12) = 6
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
50
(451001010001/000000000000/1556566676)
t1
(450101010010/000100000010/0455465665)
t4
(550000110010/100000100010/0444465555)
t3
(560000000010/110000000010/0444455555)
NTO
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
51
(451001010001/000000000000/1556566676)
t1
(450101010010/000100000010/0455465665)
t4
(550000110010/100000100010/0444465555)
t3
(560000000010/110000000010/0444455555)
NTO
(560000000010/510000000010/0000055555)
t6
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
52
NTO
(560000000010/510000000010/0000055555)
t6
(550000001110/500000001110/0000055555)
t7
(451010001010/401010001010/0000055555)
t2
(451001001001/401001001001/0000055555)
t5
(451001010010/401001010001/0000055555)
t1
(450101010010/400101010010/0000055555)
t4
(550000110010/500000110010/0000055555)
t3
(560000000010/510000000010/0000055555)
NTO
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
53
NTO
(560000000010/510000000010/0000055555)
t6
(550000001110/500000001110/0000055555)
t7
(451010001010/401010001010/0000055555)
t2
(451001001001/401001001001/0000055555)
t5
(451001010010/401001010001/0000055555)
t1
(450101010010/400101010010/0000055555)
t4
(550000110010/500000110010/0000055555)
t3
(560000000010/510000000010/0000055555)
NTO
(560000000010/560000000010/0000000000)
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
54
DEADLOCK RECOVERY (cont’d)
Proposition: if the initial macromarking M V , b is such that
then, for all
V C 0 (i.e., each column of V is a P-invariant)
observed words w, C w C w0 M V , b
T
If a marking is consistent with the observation w then it
is also consistent with the initial observation
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
55
DEADLOCK RECOVERY (cont’d)
Theorem 1: if the initial macromarking M V , b is such that
V C 0 then the closed loop system will never time out if
the following constraint set does not admit feasible solutions
T
VTM b
M M ( N )
b
0
where T0 t T | f (t,C ( w0 )) 1
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
56
DEADLOCK RECOVERY (cont’d)
Definition: the maximal control pattern for a set C is:
f max (, C ) lim fi
i
where f 0 f (, C ) and fi 1 g(f i ) f( ,C
Mb(Ni ))
When a controlled system times out, if it is deadlocked
eventually a control pattern f max (, C ) is reached
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
57
DEADLOCK RECOVERY (cont’d)
Theorem 2: if the initial macromarking M V , b is such that
V C 0 then the closed loop system will always recover from
a time-out if the following constraint set does not admit
feasible solutions
T
V M b
M M ( N
b
max )
T
where Tmax t T | f max (t,M (V , b )) 1
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
58
A MANUFACTURING EXAMPLE (cont’d)
M(p3)+M(p5) 3
p3
p1
t1
p4
p7
p10
t6
M(p9) 3
p11
t7
p9
p12
p6
t2
t5
p5
t3
t4
p8
p2
Initial macromarking: the net is a marked graph
each cycle corresponds to a P-invariant
T
the initial macromarking M V , b is such that V C 0
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
59
A MANUFACTURING EXAMPLE (cont’d)
Theorem 1 does not apply:
the following constraint set admits feasible solutions
T
V M b
M M ( N )
b
0
the net might time out (it actually does)
Theorem 2 does apply:
the following constraint set does not admit feasible solutions
T
V M b
M M ( N
b
max )
the closed loop system with net time-out recovery
is deadlock-free
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
60
OUTLINE
0)
1)
2)
3)
4)
5)
6)
7)
8)
9)
Petri nets
Motivation for discrete event observers
Relevant literature
Main idea
Marking estimation
Marking estimation with initial macromarking
Control using observers
Deadlock recovery and estimate after net time out
Using timing information to improve the procedure
Conclusions and future work
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
61
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.
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
62
USING TIMING INFORMATION (cont’d)
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
M w Mb ( Nto )
We compute a (possibly) less restrictive control pattern
using as set of consistent markings C ( w) Mb ( Nto )
i.e., for all t T we compute
f t,C (w) M b ( N to )
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
63
USING TIMING INFORMATION (cont’d)
The new approach is denoted TTO procedure
(transition time-out procedure).
Main Advantages:
• Accelerates the state estimation
• Accelerates the deadlock recovery procedure
• Enables to recover from partial deadlocks
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
64
A MANUFACTURING EXAMPLE (cont’d)
M(p3)+M(p5) 3
p3
p1
t1
p4
p7
p10
t6
M(p9) 3
p11
t7
p9
p12
p5
t3
t4
t2
t5
p6
p8
p2
Delays:
(t1) = 2
(t2) = 5
(t3) = 3
(t4) = 1
Transition time-out
(t5) = 2
(t6) = 6
Transition firing
(t7) = 3
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
65
(341010010001/000000000000/6555554441)
now = 1
{ t4 }
(341010010001/000000000000/6555554441)
now = 2
t1
(340110010010/000100000010/5454543430)
now = 2
{ t5 }
(340110010010/000110010010/4444433330)
now = 3
{ t3, t4, t5 }
(340110010010/000110010010/4444433330)
now = 4
{ t1, t3, t4, t5 }
(340110010010/000110010010/4444433330)
now = 7
t2
(340101010001/000101010001/4444433330)
now = 8
t4
(440000110001/100000110001/4444433330)
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
66
now = 8
t4
(440000110001/100000110001/4444433330)
now = 9
{ t1, t4, t5 }
(440000110001/400000110001/4444400000)
now = 11
t3
(450000000001/410000000001/4444400000)
now = 12
{ t1, t2, t4, t5, t7 }
(450000000001/410000000001/4444400000)
now = 14
{ t1, t2, t3, t4, t5, t7 }
(450000000001/450000000001/0000000000)
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
67
OUTLINE
0)
1)
2)
3)
4)
5)
6)
7)
8)
9)
Petri nets
Motivation for discrete event observers
Relevant literature
Main idea
Marking estimation
Marking estimation with initial macromarking
Control using observers
Deadlock recovery and estimate after net time out
Using timing information to improve the procedure
Conclusions and future work
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
68
9 – CONCLUSIONS
• 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.
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
69
FUTURE WORK
• Language completeness:
A word is language complete if L( N , w ) L( N , M w )
This may allow to use observers in event feedback.
• 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.
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
70
FUTURE WORK (cont’d)
• Associate a probabilistic structure to the transition
firing and define : N [0,1] , where (k ) is the
probability of having a complete word after k firings.
Under which conditions (k ) k
1?
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
71
REFERENCES
•
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.
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
72
ESTIMATION (cont’d)
• A net system N , M 0 is:
- Uniformly Marking Observable (uMO) if the system
N , M is Marking Observable for all M R(N,M 0 )
- Uniformly Strongly Marking Observable (uSMO) if
the system N , M is SMO for all M R(N,M 0 )
- Structurally Marking Observable (sMO) if the system
N , M is MO for all M N m
- Structurally Strongly Marking Observable (sSMO) if
the system N , M is SMO for all M N m
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
73
ESTIMATION (cont’d)
Theorem 2
A net system N , M 0 is:
• uniformly MO iff the semi-linear set
A p M M ( p) 0
M Pre(, t ) M ( p ) Pre( p, t )
t p
is a home-space for all p P
This is a finite union of linear sets with the same period and the
home space property is decidable (Johnen & Frutos Escrig; 89)
• uniformly SMO only if it is bounded
Similar results hold for structural MO and SMO.
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
74
DEADLOCK RECOVERY (cont’d)
C , B
Mw
Mb
• After a deadlock recovery
procedure is invoked we
should remember the set of
consistent markings is
C , B Mb
• The linear characterization of
this set is rather complex (it
involves also a vector s ). We
propose to use a simpler
approximation.
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
75
DEADLOCK RECOVERY (cont’d)
• Compute for all places:
zi min
M ( pi )
s.t. M C μ, B Mb
~
~
C μw , Bw
C , B
T
~
• Define w z1 zm
Mw
~
~ )
• Compute: Bw Bw V T (
w
w
Mb
• Define the new set:
~
~
T
T ~
~
~
C μw , Bw M V M V μw Bw , M μ
w
A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004
76
© Copyright 2026 Paperzz