Copyright @ IF AC Control Systems Design, Bratislava, Slovak Republic, 2000
SUPERVISORY CONTROL OF DISCRETE EVENT SYSTEMS AND ITS SOLUTION WITH THE PETRI NET P-INVARIANTS
Marhin Harusl'ak, Branislav HrUz
Slovak Technical University, Faculty ofElectrical Engineering and lnfonnation Technology, Department ofAutomatic Control Systems, l/kovicova 3,81219 Bratislava, SlovakRepublic
Abstract: This paper deals with the supervisol)' control of the discrete event dynamic systems (DEDS). It contains descriptions of the different approaches to the supervisol)' control synthesis, their comparison and analysis. Fwther and implementation of the method based on the place invariants of a Petri net is described. It also outlines possibilities for further enhancements of the considered methods. Copyright © 2000 IFAC Keywords: discrete event dynamic systems, Petri nets, supervisol)' control.
1.
INTRODUCTION
formal languages and Petri nets. This paper deals with methods based on Petri nets. One can fmd the theoretical basis of the Petri nets e.g. in Murata, 1989.
of the computer integrated Development manufacturing results in an increasing size and growing complexity of the flexible manufacturing systems. This is accompanied with new requirements imposed on the control of the systems. In the field of the continuous systems a comparatively solid theol)' has already been developed. In recent years there has been paid an increasing attention to another branch of the control theol)' - the complex control of the flexible manufacturing systems based on the theol)' of the discrete event dynamic systems (DEDS). The supervisol)' control is an important problem to be solved in DEDS.
The Petri net reachability graph construction and analysis is one of the approaches to the supervisol)' control design. This approach can solve both the problem of the uncontrollable transitions and the problem of the required accessibility of the home places (HrUz, 1994). Its disadvantage is a possible large cardinality of the reachability set, which makes it computationally unusable for the large systems. The structure analysis of one class of the Petri nets the controlled cyclic marked graphs - is another way to the supervisol)' control solution (Holloway, et aI., 1990). It doesn't require the Petri net model state space construction. Method solves the problem of uncontrollable transitions, as well, but it does not solve the problem of required accessibility of the home places.
The pW'pose of this work was to compare different approaches to the supervisory control problem and to use a method based on the place invariants of the Petri net for the computer aided design of the DEDS supervisol)' control. The selected methods are implemented into a software tool.
2.
Method based on the place invariants (Yamalidou, et aI., 1996) appeared to be capable to deal with some problems indicated above. It doesn't require state space construction, it is computationally vel)' effective and it can be used for large and complex systems. The method doesn't solve directly neither the problem of uncontrollable transitions nor the problem of required accessibility of home places. It enables a partial elimination of these drawbacks by the transformation of the problem into the proper
SUPER VISORY CONTROL
The central issue of the DEDS supervisol)' control is to determine a supervisor which guarantees the required behavior of the system with maximal permissiveness. The behavior depends on the controllable and uncontrollable events. The most often used approaches to the supervisol)' control analysis and synthesis are based on finite automata,
385
matrix D of the system. Thus D is composed of two matrices, the matrix D p of the system to be
system constraints. There is also a possibility to transform the constraints given in other forms into the form required by the method.
controlled and matrix 3.
De of the controller net.
The arcs connecting the controller place to the original Petri net of the system can be computed by the place-invariant defming equation [I]
SUPERVISORY CONTROL DESIGN BASED ON THE PLACE INVARIANTS OF THE PETRI NET
x T D = OT ,
The method using the place invariants of the Petri net and enabling the design of the feedback supervisory controller is described in Yamalidou, et of., 1996. The place invariants are derived from the linear constraints put on the Petri net markings. The constraints represent the supervisory requirements imposed on the system. A place invariant determines the set of places for which the weighted sum of the tokens remains constant for all possible markings from the reachability set R PN (m o ).
OT
= [0,0, ...,0],
(3)
where unknown are the elements of the new rows of the matrix D and the vector X is the desired place invariant according to [2] and it is obviously defined by equality condition
xT=[II ... ln1]
(4)
All constraints in the form (2) can be aggregated in the matrix form as follows (5)
where
Let a Petri net with n places and m transItions be given representing the controlled system. Let D p be
L is an ne X n integer matrix b is an ne x 1 integer vector
the incidence matrix of this net. We suppose that the transitions of the Petri net can be enabled or disabled. Control requirements for the net are realized by a Petri net supplement part representing a Petri net controller. Incidence matrix of the supplemented control part of the Petri net will be denoted as De. A control requirement imposed on the system is formulated in the form of inequality
Pp is the marking vector of the Petri net with n components
Pe is an ne x 1 integer vector that represents the marking of the controller places ne is the number of constraints For all constraints we have
n
'L1iPi 5: p,
(I)
X'D =(0)= [L
i=1
where
I)[~:]
(6)
Pi is the marking of the place Pi (integer)
1;, P are the integer coefficients This inequality constraint can be transformed into equality by introducing a nonnegative slack variable
where X represents place invariants I is an
Pe
Matrix De contains the arcs that connect the controller net places to the process net transitions
n
'LliPi + Pe
= p,
(2)
De=-LD p .
i=1
where
Pe' which holds the extra tokens to meet the
Lp pO + P eO = b
equality. The described procedure can be applied to all constraints given in the form (I). Then the structure of supplemented control Petri net have to be determined. It is based on the determination of the place invariants. A constraint in the form of equality introduces a place invariant into the Petri net (the weighted sum of the tokens in all places Pi and in
Pe is constant and equal
(7)
The initial marking of the controller Petri net is calculated so that the place invariant conditions are initially satisfied
Pe represents marking of a new control place
the place
ne x ne identity matrix
::::> 4.
Peo
=b - Lp
(8) pO
PROGRAM IMPLEMENTAnON
Two methods of the supervisory control synthesis and corresponding background of the Petri nets modeling were implemented under operating systems Windows 95™, Windows NTTM using C++ programming language with development tool Borland Builder 3.0.
p). The number
of places of the controller net is equal to the number of constraints to be enforced. Every place of the controller net part adds one row to the incidence
386
The resulting software enables for a user to create Petri net models of systems and to compute supervisory control for these models. The supervisory control synthesis method based on place invariants and the method based on the reachability graph construction was implemented.
Components Library) are utilized. Thus the user interface is fully Windows based and it is user friendly.
5.
The software consists of three modules. The first module is used to edit the Petri net models, validate these models, to compute the reachability graph and the incidence matrix of the Petri net model. The module is capable of working with several Petri net models at the same time. It is possible to save and to load the Petri net models to and from the storage device.
The program described above was validated in the supervisory control design. One case will be presented for illustration here. Consider a flexible manufacturing cell with the automatically guided vehicles displayed in Fig. 2. It consists of two input stations denoted as i and j, three workstations denoted as x, y and vw, and one output station denoted as o. The processed parts are transported between pairs of the stations using five automatical1y guided vehicles a, b, c, d and e. Two semi-products from input stations i and j are first worked out in workstations x and y (i in x, j in y), then assembled in the workstation vw and transported to the output station o. Trajectories of vehicles c, d, and e are divided into five, three and two zones respectively, trajectories of vehicles a and b are not divided.
The second module implements the method of the supervisory control synthesis based on the place invariants. It enables for a user to input the supervisory control constraints in different forms, then it automatically transforms these constraints into the form required by the supervisory control synthesis method and finally it computes the corresponding controlled Petri net model. The third module implements the method of the supervisory control synthesis based on the reachability graph construction (HrUz, 1994). It enables for a user to input the supervisory control constraints and then to compute the set of enabled and forbidden markings respectively for the given Petri net model and the given constraints.
r
:~
~) :~:~iS-··"~~·~·'-:''''
,
i
J
;;.. -
;:;~~
;;:j ... II'I .... r:.~
~;:;.~.~I ..
VALIDATION OF THE IMPLEMENTED PROGRAM
....<., ...
:ill.-t.':._:; ... :
·. ·.~g-.· .· .· C- ~·_"_· .·_·.f-_'_A_. G_V_a_!- =f:-: ' ' F----~ ~
:: __
Zotle I u
'.,"
,,;:;-
);
:~: ~;~:
":
:>::~,.
0G~~]
l
• •
·i·~·~::(.l
;1
.:1
:::
o
N
....
"c:
if. ><
;;;·::::iU" .:".
,~
~
~
t:~: :~.
~
\.0
~
::::
-"';':\1'-
::: o
'J
'""
_. 1";':0'1";;1 • • 1------...,.,C
t'
Zon.:: 3d
.-.\1;< :::'
--
--._.
Zone jc
'll
rl ~
C
Fig. 1. Resulting window of the method based on the incidence matrix
o
N Znne le
The part of the software that computes the reachability graph is optimized as for the memory usage. It enables the software to work with the large and complex Petri nets. Software is created strictly on the basis of the object-oriented principle. It enables the software to be enhanced with other functions in the future. The software uses mostly the dynamic memory allocation and the memory usage optimization. Further it conserves the memory and enables to process the larger amounts of data. The user interface components from the VCL (Visual
Zone Id .:::::-
"
rl
~ [~9..y.~]
1'.:.
•
Fig. 2. Flexible manufacturing cell with automatically guided vehicles
387
::
o
Tab. 1 Meaning of the places in the Petri net model of AGV example i
i
Po' PI j
Input station i is empty I contains a semi-product j
Po' PI
Input station j is empty I contains a semi-product
P; - P;
State of the workstation x
P; - pj v
State of the workstation y w
v
w
vw
vw
Po' PI ' Po' PI ' P2 ' P3 o 0 Po' PI a
a
b
b
c
State of the workstation vw Output station c
d
d
~
~
Po - Ps ' Po - Ps ' Po - P13' Po - P9 ' Po - P7
0
is empty I contains a product
Location of the vehicles a, b, c, d, e
c,
c.
Fig. 3. Control of the flexible manufacturing cell with AGVs
388
The sensors detect the transllions of the vehicles between the zones. The only controllable events are departures of transitions from the stations and further movements of the vehicles on their paths are not controllable. The trajectories of the vehicles intersect in four places. Trajectories of vehicles a and c intersect in the zones 1all c, trajectories of vehicles b and c intersect in the zones I b/3c, trajectories of vehicles c and d intersect in the zones 5c/3d and trajectories of vehicles d and e intersect in the zones Id/le. The control objective is to avoid collisions of vehicles in the shared zones with respect to the degree of controllability of the vehicles.
partial results are not presented here because of the large matrix size. The
method
adds
(pc! , pC2, pC3 , pc4) with (1,1,1,1). The places control
a
b
e
. (t Ia' t3' t I ' t3' t I ' t 7' tI ' tS' tI' te. statIOns 4 m Fig. 3). The meaning of the places are described in the table Tab. 1. b
C
d
C
d
The shared zones are in - the Petri net model
(p;, P; ,P; ,P~3 ),
represented by the sets of places ( _b
cc)
b
\R2 ,Ps ,P4,PII'
(p~,p:,p;,p;).
(_c
C
d
d)
\R6,P9,P4,P7
an
d
The vehicles cannot meet in the
shared zones. That constraints can be described by the restrictions on markings in the shared zones
P2 + Ps + P2C + PI3C <1 - . Q
(9)
P; + P; + P; ~ 1.
cc Cl P2+Ps +P2 +P9 +PIO+PIl+PI2+Pt3~ p~ +p~ +P; +P; +P~ +P; +P~O+P~1 ~I, C
C
C
(10)
~ +~ +I{ +j{+A +Jt +d +If +d +~~. p~ + p~ +
the marking of each
CONCLUSIONS
The method based on the place invariants in our analysis proved to be well applicable. Further it would be desirable to enlarge the method for solving of the uncontrollable transitions problem, too. One possible approach can be based on the precedence path construction using the structure analysis of the Petri nets. Another more complicated problem is the solution of the required accessibility of the home places. A combination of the invariant method with the reachability graph construction appears to be a possible way how to improve the method: in the fIrst step the control is designed using the method of the place invariants and in the second step the reachability graph can be constructed for the system with control. Such an graph has usually the lower order number of nodes and it makes possible to use the graph for the solution of the required accessibility of the home places.
Murata, T (/989). Petri Nets - Properties, Analysis and Applications. In: Proceedings ofthe IEEE. vol. 77, No. 4, pg. 541-580 Yamalidou, K., Moody, 1., Lemmon, M. and P. Antsaklis (1996). Feedback Control of Petri Nets Based on Place Invariants. In: Automatica, vol. 32, No. 1, pg. 15-28 Holloway, L. E. and B. H. Krogh (1990). Synthesis of Feedback Control Logic for a Class of Controlled Petri Nets. IEEE Transactions of Automatic Control, vol. 35, No. 5 HrUz, B. (I 994). The Supervisory Control Problem Solved via Petri Nets. In: Postprints ofthe IFAC Workshop on New Trends in Design of Control Systems, Bratislava, pg. 386-391
Constraints (9) do not consider the problem of the uncontrollable transitions. It is necessary to add the next constraints. The places lying between the controllable transitions and the controlled places must be included into the constraints Q
the initial marking
REFERENCES
P; +P;+p/+P;' sI.
Q
places
Q
P:+P;+P:+P/~ sI, p~ +
control
shared zone. The Petri net model with the control Petri net is depicted in Fig. 3. The resulting control is maximally permissive with respect to the required constraints.
6. The control synthesis is based on the Petri net model of the system. The semi-products, availability of the workstations and the locations of the vehicles are interpreted by the tokens in the Petri net model. The only controllable transitions are the transitions representing the departure of vehicles from the
four
P: + P; +p; + P; +P; ~ 1.
These constraints are in the form required by the method and they need no further transformations. Matrix L and vector b are constructed from the constraints (10). The incidence matrix of the control net is computed using equation (7) and the initial marking of the control net is computed using equation (8). These
389