Beruflich Dokumente
Kultur Dokumente
Petri nets
Learning objectives :
• Introduce Petri nets
• Dynamic behavior modeling of manufacturing systems using PN
• Analysis of Petri net models
Textbook :
J.-M. Proth and X. Xie, Petri nets: a tool for design and management of
manufacturing systems, John Wiley & Sons, 1996
C. Cassandras and S. Lafortune, Introduction to Discrete Event Systems,
Springer, 2007
1
Plan
2
2
Introduction to Petri nets
3
3
A two-product system
t1 t4
t2 t5
t3 t6
5
A two-product system
Process modelling
• Goal: model the manufacturing process of each product.
• Include eventual constraints related to production control.
p1 p4
t1 t4
p2 p5
t2 t5
p3 p6
t3 t6
6
A two-product system
Resource modelling
• Goal: modelling resource contraint + eventual priority constraints
p1 p4
Identifies
t1 t4
p7
p2 p5 • transitions after
t2 t5 which the resource is
p3 p6
first needed
t3 t6
• transitions after
which the resource is
no longer needed
7
Places and transitions
Representations of a marking:
• a vector M = (m1, m2, …, mn) where mi = nb
of tokens in place pi
• a multi-set such as M = p1 2p3
p1
The initial state of the system = the initial t1 p3 t3 p5 t5
p1
t1 p3 t3 p5 t5
12
Formal definitions
13
Petri Nets
p2 t2 p4 t4
p1 2
t1 p3 t3 p5 t5
15
Transition firing
2 2 2 2
2 2
17
Basic concepts
Online illustration
Incidence matrices
Example:
Pre = ???, Post = ???, C = ???
p2 t2 p4 t4
p1 2
t1 p3 t3 p5 t5
Incidence matrices
Example:
Markings after s = t1t5t2t3t5
p2 t2 p4 t4
p1 2
t1 p3 t3 p5 t5
Petri net models of manufacturing
systems
PN models of key characteristics
Alternative processes:
Synchronization:
Alternattive Waiting
Start process End Sync
24
PN models of key characteristics
Part arrival
Part request
pb
FIFO system:
25
PN models of key characteristics
Shared resources:
Process with
Other Resource
Waiting for
Activities Resource
p1
p2
26
PN models of key characteristics
27
PN models of key characteristics
pf
output buffer
capacity
n
1
Input buffer
n pw pb
2
pr
28
A robotic cell
Z
1
M1 t1 M1
P1
S
t2
Robot Unload
M2 T
R Stock n Q
load
t3
P2
t4 M2
Z
29 2
O
A two-product system
t1 t4
t2 t5
t3 t6
31
Process modelling
p1 p4
t1 t4
p2 p5
t2 t5
p3 p6
t3 t6
32
Resource modelling
p1 p4
Identifies
t1 t4
p7
p2 p5 • transitions after
t2 t5 which the resource is
p3 p6
first needed
t3 t6
• transitions after
which the resource is
no longer needed
33
Elementary classes of Petri nets
34
Pure Petri nets
Definition: A Petri net free of self loop is said pure, i.e. ot to
= .
Theorem : All impure Petri nets can be transformed into pure Petri nets.
p1 p1
b1
t1
e1
p0
p2 p2
b2
t2
e2
35
Ordinary Petri nets
STATE MACHINES
Each transition has exactly one input place and one output place.
t1 t2
t3 t4 p3
p2
36
Ordinary Petri nets
FREE-CHOICE NETS
card(p°) > 1 °(p°) = {p}, p P.
37
Ordinary Petri nets
Theorem : For any asymmetric choice net, the set {p1, p2, …, pk} of
input places of any transition can be renumbered such that p1° p2° …
pk°.
p1
p2
38
Relations between different classes
PN = Petri Net
AC = Assymmetric choice FC
EFC = Extended Free Choice PN
AC EFC SM EG
Ord.
FC = Free Choice PN
SM = State Machine
EG = Event Graph
noSM
noFC 39
Properties of PN models
40
Reachability
Example: R(M0) = {(1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1)} and
p1 :
(1, 0, 1, 0) not reachable.
t1 p2 t3
t2
p3
t4
t5
41
p4
Reachability
Ex: Find a PN and a marking that is not reachable but for which condition
of Theorem 2 holds.
42
Boundedness
A Petri net is said k-bounded if all places are k-bounded, i.e. M(p) ≤ k,
p and M Œ R(M0).
43
Boundedness
p p
p'
44
Boundedness
Theorem (monotonicity) : If (N, M0) is bounded, then (N, M0’) such that
M0' ≤ M0 is bounded.
45
Liveness
A Petri net is said quasi live if all transitions are quasi live.
46
Liveness
R3
PN1 R2
R3
PN2 R2
47
Reversibility
A Petri net (N, M0) is said reversible if the initial marking remains
reachable from any reachable marking, i.e. M0 Œ R(M), M Œ R(M0)
Existence of the reversibility ensures that the system can always recover
the normal behavior and is important for systems subject to failures.
Reversiblity implies existence of home states but the reverse is not true.
48
Reversibility
p1
p1
t1 p2 t3
t1 p2 : t3
t2 p3
t2 p3
t4 t4
t4 t4 t5
t5
p4 p5:
p4 p5: mach free but not usable
49
Analysis methods
50
Reachability tree
t1 t2 t2
p1 p2
[0, 1] [0, 0]
M0 M1
t2
p1 [0, 2]
[1, 1] t1 M1
t1 t2 M0 t2
p2 [2, 0]
t1 M2
t1 t2 t1 t1
p1 p2 [0, 2]
[0, 0] [0, 1]
M2 •••
M0 M1 t2
t2
Coverability tree
t1 t2 • M1 covers M0
p1 p2 t1
Step1 [0, 0] [0, ] • Repeat t1 leads to w tokens in p2.
M0 M1
• Replace M1 by [0, w]
old
t1 [0, w]
t1 M1
[0, 0] [0, w]
Step2 M0 M1
t2 old
[0, w]
M1
t1
new
t1
Step3 [0, 0] [0, w]
M0 M1 t2
52
Coverability tree
Theorem (boundedness) :
A Petri net (N, M0) is bounded iff the symbol wdoes not appear in the
coverability tree.
Remark:
Liveness and reversibility of unbounded PN cannot be checked with
coverability trees.
54
Siphons and traps
then if
if then
Siphon
Trap
55
Siphons and traps
then if
if then
Siphon
Trap
56
Siphons and traps
Theorem: A connected event graph (N, M0) is live iff every circuit contains a
token. A live event graph is reversible. A connex event graph is bounded iff it is
strongly connected.
Theorem: A connected state machine is always bounded. It is live and reversible
iff it is strongly connected.
Theorem : A free-choice (extended or not) (N, M0) is live iff all siphon contains
a trap marked at M0.
Theorem : An assymetric net (N, M0) is live iff no siphon can become unmarked.
Remarks:
• Whether all siphons remain marked can be checked by integer programming.
• For usual manufacturing systems, both liveness and reversibility are ensured if
no siphon can become unmarked
57
Siphons and traps
up ≤ zt, t, p / t
•p
{0, 1}
up , zt Œ
up = 1 S
- S can become unmarked:
1{M(p)} + up ≤ 1 , p Œ
P (NL)
M = M0 + CY
M ≥ 0, Y ≥ 0.
R1
R1 n1
R3 R2
R3 R2 n3 n2
p3
59
p-invariants
Definition:
• A integer vector X≥0 of dimension n = |P| is a p-invariant if Xt C = 0.
• The set of places pi with Xi > 0 is called the support of the p-invariant
and is denoted ||X||.
• A p-invariant X is said minimal if there does not exist another p-invariant
X’ such that X' ≠ X and X' ≤ X.
Exampel: S1
R1
S2
R2 R3
60
p-invariants
R2 R3
61
t-invariants
Definition:
• A integer vector Y≥0 of dimension m = |T| is a t-invariant if CY = 0.
• The set of transitions ti with Yi > 0 is called the support of the t-invariant
and is denoted ||Y||.
• A t-invariant Y is said minimal if there does not exist another t-invariant
Y’ such that Y' ≠ Y and Y' ≤ Y.
Exampel: S1
R1
S2
R2 R3
62
t-invariants
R2 R3
63
Structural properties
STRUCTURAL BOUNDEDNESS
A Petri net N is structurally bounded if it is bounded starting from any M0.
Criterion : N is structurally bounded X > 0, XTC ≤ 0.
CONSERVATIVENESS
A Petri net N is conservative if there exists a vector X > 0 associated with
places such that XTM = XTM0, M0, M R(M0).
Criterion : N is conservative X > 0, XTC = 0.
Theorem:
• (N, M0) is bounded if it is conservative.
• A Petri net is conservative if all places are covered by some p-invariant.
64
Structural properties
REPETITIVENESS
A Petri net N is repetitive if there exists M0 and a feasible firing sequence
such that each transition appears infinitely often.
Criterion : N is repetitive Y > 0, CY ≥ 0.
CONSISTENCY
A Petri net N is consistent if there exist an initial marking M0 and a firing
sequence s such that > 0 and M0 [s >M0.
Criterion : N is consistent Y > 0, CY = 0.
Theorem :
• A live Petri net (N, M0) with a home state is consistent.
• A live and bounded Petri net (N, M0) is consistent. It is also conservative
if it is live and structurally bounded.65
Structural properties
66
Determination of p- and t-invariants
replaced by CT.
67
Topics not addressed in Chapters 2-3
68