15
Invariant state progress and relation
modelling of DEDS
Gabriel Juhas and Miroslav Kocian
Institute of Control Theory and Robotics, Slovak Academy of
Sciences, Ditbravskd cesta 9, 842 37 Bratislava, Slovak Republic.
Tel: 42-7-3783216. Fax: 42-7-376045.
e-mail:
[email protected]
Abstract
The states are used as the fundamental concept (instead of events) and the discrete state
change systems (DSCSs) are defined. The possibility of DSCSs modelling, control and
description of behaviour specifications using the presented state relation approach is
investigated. The generalized T-invariants of Petri nets are defined as a special case of the
presented approach.
Keywords
Discrete event system, relation, Petri nets, T-invariants
INTRODUCTION
From a historical general system theory point of view, the DEDSs follow the state/transition
systems formally defined by a state set and binary relation on this set (Klir, 1972). In the paper
it is tried to use the notion of (binary) relation (between states) in the DEDS modelling and
control in similar way like predicate calculus is used (Kumar et al., 1993). The simple set
structure given in (Klir, 1972) is used and related calculus is developed. The state space and
state changes (instead of events) are used as fundamental concepts, consequently a discrete
state change system (DSCS) is defined instead ofDEDS. An example of the approach is shown
on the cat and mouse maze problem (Ramadge and Wonham, 1989; Capkovic, 1993).
Generalized T-invariants of Petri nets can be considered as the special case of the presented
theory, if the system is modeled by a Petri net. By means of generalized T -invariants it is
possible to describe the relevant kind of discrete processes, where the cycle is understood to
repeatedly reach states that are in the given invariance relation. The behaviour according to this
relation determines the state progress. The presented definition of T- invariants is more global
than the standard definition that can be included in it as the special case.
J. Doležal et al. (eds.), System Modelling and Optimization
© Springer Science+Business Media Dordrecht 1996
148
2
Contributed Papers
RELATION MODELLING OF DEDS
2.1 Discrete state change systems
Let D is the state set of a given system D. The notion direct discrete state change (or shortly
direct state change) of a state d E D to a state d' E D expresses the fact, that during this state
change the system is not found in any state d" ED.
A discrete state change system (DSCS) is a system, where each state change of the system is
arisen from a sequence of direct state changes. If the time is ignored and only the order of
states is considered, then each possible state trajectory ofDSCS can be reduced to a sequence
of states that for each pair of neighbours in this sequence holds that direct state change from
the first element of this pair to the second element is possible. As follows, these sequences are
called the logical state trajectories of the DSCS. A (logical) state trajectory that there is
considered to run the time to infinity, is called total (logical) state trajectory. The notion
(logical) behaviour means the set of all possible (logical) state trajectories of the given DSCS.
Similarly to (Ramadge and Wonham, 1989), in control ofDSCS it is premised that certain
direct discrete state changes of the system can be disabled when it is desired.
2.2 Relation state change generator
Let S is an arbitrary set and L is an arbitrary binary relation on S x S.
Let L(s,.) is a relation given so that L(s,.) = L n ({s}x S) and let L(.,s) = L n (S x {s}).
The support of a binary relation L is given by the union of the first and the second domain of
it and denoted by L,upp (L,upp = {s; 3 s': [s, s'] E Lv [s',s] E L}).
The image of an element s in a relation L is denoted by L(s) (L(s) = {s'; [s, s'] E L}).
[Si,Si+d E L for 'Ii i E {l, ... , k}} (k is a positive
Binary relation Lk = { [SI,Sk + d ; 3{S;}~=L
integer), is called k-power ofL. The symbol L°denotes the binary relation that is the union of
all powers of the relation L (L°= U Lk, where Z+ is denoting the set of positive integers).
k
E
z+
The notion L-sequence denotes a sequence of elements from S {Si}r= l' where N E Z+ U
{oo} that next two conditions are satisfied:
l. IfN > 1 then 'Ii i E {2, .. N}: [Si-l,Si] E L. 2. IfN 00 then L(SN,.) is the empty set.
The sequence for which holds only the first condition is called part ofL-sequence.
Let S = {Si}r= 1 is a sequence of elements from S so that there exists some L-sequence q =
{sk j } ~= b M E Z+ U {oo}, q is selected from s and next three conditions hold:
'*
l. kl = l. 2. IfN = 00 then M = 00. 3. IfN,* 00 then kM = N.
Then s is denoted by symbol (L)-sequence. It is said that s is containing q and on the contrary
q is contained in s. If q is a part ofL-sequence, then s is called part of (L)-sequence.
A binary relation ~'L
= L(s,.) u {[s',s"]; [s',s"] E L /\ [s,s'] E L0} is represented in the
graph of the binary relation L by the tree with the root labelled by an element s E S.
Definition: Relation state change generator is a two tuple S = (S, F) where S is a set of
states and F is a direct discrete state change relation on S x S. Elements of the relation Fare
called possible direct discrete state changes of S. F-sequences are called total state trajectories
Invariant state progress and relation modelling of DEDS
149
of the generator S and parts of F-sequences are called state trajectories the generator S. By the
notion the behaviour of generator S is understood the set of its all state trajectories.
A state s' is reachable from a state sin S if and only if [s, s'] E Fe (i.e. iff:3 k E Z+: [s, s'] E
F\ The binary relation Fe is called the reachability relation.
Definition: Let S = (S, F) is a generator. A state s' E S is live according to a state s E S in
generator S iff for each F-sequence {Si}r= l' where N E Z+ U {(X)}, holds the statement: If:3 k
:::; N: Sk = S :::> :3 I, k < I :::; N: s, = s'. If s' is live according to each state from S, then s' is live in
S and if each state of S is live in S, then it is said that the generator S is live.
Definition: Let P = E x E *, where E is an arbitrary set and E * is the set of all sequences of
elements from E. Let G is a relation on P x P so, that for each [[ e, q], [e', q']] E G holds that if
q = [{ei }r= d and N E Z+, then q' = {ei }r=+ll, where et<+1 = e'. Then the relation state change
generator P = (P, G) is called relation state change generator with memory, the set E is called
pure state set of P and the set E* is called memory state set of P. A state trajectory of the
generator P with first element [e,e] E ExE is called the state trajectory starting from the state e
with the reseted memory.
2.3 Modelling and control of DSCS via relation generators
To model the behaviour of a DSCS it is used a generator, where states of the given system are
represented by states of the generator, and the possible direct changes of the modelled system
are represented by elements of direct discrete state change relation of the generator (direct
modelling). If the possibility of direct changes of an actual state depends on a state history of
the system, then it is used as the model a generator with memory, where the state history of the
modelled system is represented by a state of memory of the generator (memorial modelling).
The memorial modelling can be used to model logical behaviour and the control of each DEDS
that can be modelled by a formal language.
The relation between a generator (S, F) modelling some system D and a generator (S, C)
modelling this system D controlled by some supervisor is briefly formulated as follows: for
each s E C.upp holds that Fu(s) ~ C(s) ~ F(s), where elements of Fu represent uncontrollable
direct state changes of the system D.
Definition: Let S = (S, F) is a generator. Let relation Fu ~ F. Let L, L ~ F is a binary
relation on S x S and let s E Lsupp. It is said that L is controllable in the point s in regard to Fu if
and only ifFu(s,.) ~ L(s,.). IfL is controllable in each point of its support in regard to Fu, then
it is called controllable in regard to Fu.
Definition: Let S = (S, F) is a generator. Let relation Fu ~ F. Let s, s' E S. Iff exists a
controllable relation C in regard to Fu that state s' E S is live according to the state s in
generator (S, C), then s' is controllably reachable from s in regard to Fu in the generator S = (S,
F). If, in addition, holds that s' is the end point of Csupp (C(s') is the empty set) then s' is
controllably stabilizable from the state s in regard to Fu in the generator S.
2.4 Behavioural specifications and relation calculus for DSCS
The main elements of possible problem settings are properties of the system model, relations
150
Contributed Papers
and their properties, relationships between the system model and relations and mutual
relationships between relations.
Some relationships between relations can be formulated as follows. Let Land K are binary
relations on some cartesian product S x S of some set S.
1.
L ~ K0 (informally it means that K can go through L)
1.1.
L ~ K (K can detailly go through K)
1.1. 1. L = K (K have to go detailly through L)
so that SI E Lsupp is (L)-sequence (K starting in
1.2.
L ~ K0 /\ \;/ K-sequence {SJ~I
the support ofL have to go through L)
1.2.1. L = K0 (K have to go through L)
The other relevant problems consist in an investigation of relationships between some
relations L, H that both are subsets of any relation K@
If above mentioned relation K is the relation of direct state changes of some system
modelling generator, then the relationships between Land K represent relationships between
relation L and the system model. The considered system can or have to go (detailly) through
the relation L. The relation L with some mentioned relationship to the system can characterise
a possible and/or required behaviour. From this point of view the behaviour of the system
given by relation L fulfilling the criteria 1.2. can be understood as partial observable.
As follows, let L, K are arbitrary relations on S x S. If for each L-sequence q exists Ksequence s that s is containing q, then L ~ K'" (K can go through L). If, in addition, K is
transitive, then L ~ K. Let S = (S, F) is a generator. If for each s E Fsupp holds that the
cardinal number ofF(s) is equal to one, F is coherent and F0 is reflexive, then the generator is
live.
Logical expressions about properties of a relation K can be divided into two classes. Let
V(K) denotes a logical expression about a relation K.
1. If V(K) = 1 (true) and for each L ~ K holds VeL) = 1 then it is said that V(K) is an
expression of the class one.
2. IfV(K) = 1 and there exists L ~ K that VeL) = 0 (false) then V(K) is an expression of the
class two.
The following assertion can be use in the modular problem solving.
Let Hi = {I, .. , n}, n E Z+ are binary relations on S x S. Let Vi (Hi) are expressions of the class
one for all i E {1, .. ,n}, then V( I
Hi) = V 1( I
Hi) /\ .. /\ Vn( I
H;) = 1.
i
=
{I •.. ,n}
i
=
{I, ..•n}
i
=
{I, .. ,n}
The notion introduced in the paper can be used to derive a proof methodology to examine
properties of relations if the other properties (of these relations and/or other relations) are
given. The proof methodology is based on the definitions of basic proofs rules so that by the
combinations of them more complex proofs can be constructed. Assumptions of proof rules
can be given and/or derived by previous applications of proof rules and/or derived from the
detail modelling level. The nature of basic proof rules can be shown as follows. Let H, K, L are
some relations on S x S, so that K ~ W. Let holds: ifK ~ W, then L ~ W. Then L ~ W.
Let L is an arbitrary relation on S x S. Let s\, S2, S3 E Lsupp and (SI, S2) E L0. Let for each s
E Lsupp holds: if (s, S2) E L°then (s, S3) E L0. Then (SI, S3) E L@.
Invariant state progress and relation modelling of DEDS
151
Let H, K, L are some relations on S x S, so that K ~ HG (H can go through K) and L~
KG
(K can go through L). Then L ~ H@ This assertion can be used to introduce some type of
hierarchy of relations on S x S and hierarchy of the behaviour description.
2.5 The cat and mouse maze example
A cat and mouse are placed in the maze on the Figure I. Let y is a function, that maps rooms
ofthe maze onto a set of numbers A = {O,I,2,3,6} in accordance with Figure 1.
c_
3
c
m
.I.-i-,-.I.-i
m
6
+-m
I
c-
Figure 1
I
c
c
0
c
m
t-.I.-,-t-.1.
m_m
I
2
The cat and mouse maze.
Let set B = A u {7}. Let set S = A x B so, that each pair [a,b] E S represents the state, in
which the cat is in the room mapped by y onto a, and the free mouse is in the room mapped by
y onto b (ifb E A) or the cat has caught the mouse (ifb = 7).
Let Fu, Fe and F are binary relations on S x S given as follows.
Fu = {[[a,b], [a',b']]; «(a = 1 /\ a' = 3) v (a = 3/\ a' = 1)) /\ b' = b /\ bE B) v (b = a /\ a' = a
/\ b' = 7/\ a E A)}
Fe = {[[a,b], [a',b']]; ([a',b'] = [(a + l)mod3, b] /\ a E {O,I,2} /\ bE B) v
([a',b'] = [a, (b - l)mod3] /\ a E A /\ bE (O,I,2}) v
([a',b'] = [(a + 3)mod9, b] /\ a E {O,3,6} /\ bE B) v
([a',b'] = [a, (b - 3)mod9,] /\ a E A /\ bE {O,3,6})}
and F = Fu U Fe.
Then the possible movement of the animals can be directly modelled by the behaviour of the
generator S = (S, F) starting in the initial state [2,6], where elements ofFu represent direct state
changes, that cannot be disabled (the door between rooms 1 and 3 cannot be closed).
The required behaviour specification is expressed as follows.
1. The animals initially placed in these rooms (represented by pair of number [2,6]) will never
occupy the same room simultaneously.
2. It is always possible for the cat and the mouse to return to the initial state.
3. The greatest possible freedom of animal movement is demanded.
The task is to determine, whether the behaviour satisfying these requirements can be
reached by a supervision, and if it is possible, then to determine the control properties, that
must be fulfilled by the supervisor. To translate this task to modelling formalism notions the
following task is obtained. The relation C on S x S satisfying under mentioned requirements is
sought.
1. \[2.6] C = C ~ F
2. L is controllable
152
Contributed Papers
3. V [a,a] E S: [[2,6], [a,a]] Ii!' C'"
4. V [a,b] E C"'([2,6]): [[a,b],[2,6]] E CO
5. There exists no relation K on S x S for which all above mentioned requirements are fulfilled
and holds: j[2,61 C c j[2, 61K.
The relation C satisfying these all 5 requirements is formally given as follows.
C ={[[a,b], [a',b']]; ([a',b'] = [(a + l)mod3, b] /\ a E {O,1,2} /\ b = 6) v
([a',b'] = [a, (b - 3)mod9,] /\ a = 2 /\ bE {O,3,6})v
(a = 0 /\ a' = 3 /\ b' = b = 6]) v
«(a = 1 /\ a' = 3) v (a = 3 /\ a' = 1)) /\ b' = b = 6)}
Then, by comparison of the relation F and the relation C in each point of s E C,upp it is
obtained the information about direct state changes from the state represented by the s, which
must be enabled by a supervisor (direct state changes represented by elements of C(s,.)) and
disabled (prohibited) by a supervisor (direct state changes represented by elements of (F(s,.) C(s,.))). Then the behaviour of this supervised system starting in the initial state can be
modelled by the behaviour of the generator H = (S, C) starting in the initial state [2,6].
3 INVARIANT STATE PROGRESS IN PETRI NETS
The state relation is defined by the state difference function Ll, so the states are in this state
relation, if the difference between them is equal to given Ll. The behaviour according to this
relation is examined. Such behaviour (state progress) is understood as to reach the states that
are in this relation. There are many issues as the existence of infinite behaviour according to
this relation, determination of event sequences assuring this behaviour (state progress).
The problem is investigated by means of Petri nets theory (Reisig, 1985) that enable to use
analytic algebraic methods. As follows, m x n matrix is denoted by [row 1; .. ; row m].
Definition: A Petri net is a 4-tuple PN = (P, T, I, 0) such that: P = {PI, .. , Pm} is a finite
and nonempty set of places, T = {t J, .. , t n} is a finite and nonempty set of transitions P I l T is
the empty set, I(p,t): P x T ~ N is an input function, N = Z+ U {O}), O(t,p): T x P ~ N is an
output function (I and 0 can be understood as an integer m x nand n x m matrices).
In a Petri net the system states are characterised by markings m: P ~ N, m = (m(Pl); .. ;
m(Pm)). The set of all markings is denoted by M. In the equation m' = m + C • y, where C is
the structure (incidence) matrix of the given Petri net (C = ot - I), vectors y determine the
firing numbers of each transition that are necessary to reach the state m' from the state m. If
the difference Ll is given, then vectors y, that are integer solutions of the equation C . y = Ll,
determine the firing numbers of each transition in sequences of events, that assure the state
progress (to reach state m' from state m that (m,m') belongs to the relation given by the
difference Ll). Classic T - invariants are solutions of equation C . Y = 0 (Lautenbach, 1986).
The solutions of the equation C . Y = t. (when t. is understood as linear function) have the
similar geometric interpretation as the solution of equation C . Y = O. That is the reason, that
the algorithms for determination of T - invariants can be simply modified to solve the equation
C . Y = Ll. The properties of solutions of both equations (C . Y = 0, C . Y = Ll) are the same in
special cases, where difference Ll is a linear function without absolute coeficients. There is the
Invariant state progress and relation modelling of DEDS
153
possibility to define generalized T - invariants as solutions of the equation C . Y = A, where A is
understood as invariant function and the states in the relations given by A are invariant states.
The behaviour according to the relation can be formally described by the relation reachability
graph, where the neighbouring nodes belong to this relation (given by difference A) and the
arcs represent realizable solutions of the above mentioned equation (C • Y = A). The
generalized T -invariants can be understood as a special case of the state relation. By means of
generalized T -invariants it is possible to describe the relevant and interesting kind of discrete
processes i.e. real cyclic processes, where the cycle is understood to repeatedly reach some
similar (not exactly the same) state to the initial state (e.g. systems with counters).
Definition (Generalized T -invariants): Let PN = (P, T, I, 0) is a Petri net, let M is the set of
all functions (markings) m: P ~ N, let C = ot - I, m, m' EM andy is a firing vector. Let D =
{[ m, m '], [m, m '] E M x M} is the invariance relation. Then the integer solutions of the system
C . Y = m' - m are called T -invariants in m in regard to the relation D.
Let A(M,H), where H is an arbitrary set, is a function A: M x H ~ Zm (m is the number of
places in the Petri net) such that for each h E H :J [m,m '] E D that m' = m + A(m,h). The
function A is called the invariant function and the equation C . Y = A(M,H) is called the
invariance relation equation. Evidently, integer solutions of the invariance relation equation in
mare T-invariants in m in regard to the relation D. Classic T-invariants represent the special
case with the difference function A(M,H) = A(H) = O.
The further formal definitions of above mentioned notions, solutions of the equations and
the investigation of relation reachability graph properties, are presented in the (Juhas and
Kocian, 1994, 1995). A motivation of generalized T-invariant definition is shown on an
example of the simple production line.
Example: The line (modelled by Petri net in Figure 2) is formed by the input buffer, the
numeric control (NC) machine, the output buffer and the counters. In the system there is
running repeatedly the cyclic process, where the product is worked up by the NC machine, the
quality test is performed and according to the result the related product counter is incremented.
t4n
/"lK~
~P6
t6
P5o-1J
p2
C
JRCS
P7
[ 1,-1,0,0,0,0; 0,1,-1,0,0,0; 0,-1,1,0,0,0; 0,0,1,-1,-1,0;
0,0,0,1,1,-1; 0,0,0,1,0,0; 0,0,0,0,1,0]
Figure 2
The Petri net model of a simple product line
Transition tl - the arrival of the product, place pI - waiting in the input buffer, t2 - the start of
the working up, p2 - the state of working up, t3 - the finish of the working up and the quality
test start, p3 - the state of the NC machine (ready or not), p4 - the quality test, t4 and t5 - the
Contributed Papers
154
quality test finish and increment of the related counter, p5 - waiting in the output buffer, p6
and p7 - state of the correct and uncorrect product counter, t6 - the departure of the product.
The invariance relation is given as follows: D = {[m,m']; m'(Pi) - m(Pi) = 0 for i = 1 .. 5,
(m'(p6) - m(p6)) + (m'(p7) - m(p7)) = u /\ U is an integer}. This state progress leads to the
solving of the system A . x = B . u, where A is 6 x 6 matrix and A = C for i = 1 .. 5, ~ = C6 +
C7 , A and C are rows of the matrixes A and C, and B = [0;0;0;0;0;1] and u is an integer
parameter. The T-invariants: y = k . [1;1;1;1;0;1] + v . [1;1;1;0;1;1], k, v are integers. The
nonnegative T -invariants indicate numbers of the event executions that are necessary to
perform complete pass of the products trough the production line.
4
CONCLUSION
DSCSs are defined by using of state changes instead of events. The relation state change
generator is used to model DSCS and related calculus is developed. The presented relation
approach can be used to describe the possible behaviour as well as desirable behaviour of the
system (control specification). The presented approach is illustrated by an example. The
generalized T -invariants of Petri nets are defined as a special case of the presented state
relation approach. A building of the relation calculus for DSCSs including algorithms for
investigation of behavioural specifications represents the main subject of the further research.
REFERENCES
Capkovic, F (1993) Petri Net-based Approach to the Maze Problem Solving. In Balemi, S.,
Kozak, P. and Smedinga, R. (Ed.) Discrete Event Systems: Modelling and Control,. Proc.
of a Joint Workshop held in Prague, 1992, Birkhauser, 173-179.
Juhas, G. and Kocian, M. (1994) Generalized T-Invariants of Petri Nets and Control ofDEDS.
In Preprints of 1st 1FAC Workshop on New Trends in Design of Control Systems 1994,
Smolenice, Slovakia, 408-413.
Juhas, G. and Kocian, M. (1995) Invariant Relation Behaviour in Petri Nets. In Snorek,
Sujansky, and Verbraeck (Ed.) Modelling and Simulation 1995, ESM95, Prague, Czech
Republic, A publication of the [SCS], 160-164.
Klir, G. J. (1972) (Ed.)Trends in General System Theory, Wiley - Interscience, New York.
Kumar, R., Garg, V., and Marcus, S.1. (1993) Predicate and Predicate Transformers for
Supervisory Control of Discrete Event Dynamic Systems. IEEE tr. on Automatic Control,
Vo1.38, N. 2, 232-247.
Lautenbach, K. (1986) Linear Algebraic Techniques for Place/Transitions Nets. In:
Proceedings of an Advanced Course on Petri Nets, LNCS 254, 142-167.
Ramadge, P. and Wonham, W.M. (1989). The Control of Discrete Event Dynamic Systems.
Proceedings of the IEEE, Vol. 77, N. 1,81-98.
Reisig, W. (1985) Petri Nets. Springer-Verlag, Berlin.