The Supervisory Control Problem Solved VIA Petri Nets

The Supervisory Control Problem Solved VIA Petri Nets

Copyright © IFAC New Trends in Design of Control Systems. Smolenice. Slovak Republic. 1994 THE SUPERVISORY CONTROL PROBLEM SOLVED VIA PETRI NETS B. H...

1MB Sizes 0 Downloads 48 Views

Copyright © IFAC New Trends in Design of Control Systems. Smolenice. Slovak Republic. 1994

THE SUPERVISORY CONTROL PROBLEM SOLVED VIA PETRI NETS B. HRUZ* ·Slovllk TedllliClll Univusil)" Fllcuhy of Elearical Engineering, Depllrrment of AUlomlllic Control Systems. 812 19 BrlltUlo'·II.IUOl·;CO'·1I 3. SIo"lIk Republic. OfUIil: hru~QSr. e1fstub(LJk

Abstract. The supervisory control problem in the discrete event dynamic systems (DEDS) is fannulated using input-state-output system structure. A class of the Petri nets is defined enabling an effective and practically useful representation of the structural and dynamic properties of DEDS. A solution of the supervisory control using the Petri nets and the corresponding reachability graphs is presented and illustrated on an example. K~y Words. Discrete event dynamic systems; supervisory control; control system synthesis; Petri nets; reachability graph.

1. INTRODUCTION

The model (1) does not state when and how a particular string U E L of events occurs. The adopted level of abstraction assumes that the events of the set r. appear spontaneous, asonchronous and instananeous and that always only one event occurs in some instant oftime.

A new branch of the control theory, namely the control of the discrete event dynamic systems (DEDS) has got a recognizable contour in the eighties. There were, of coarse, many works preparing its occurance earlier, but the fundamental ones are those of Rarnadge and Wonham (1987, 1989) and of Ho and Cassandras (1983, 1990).

2. CONCEPTION OF THE SUPERVISORY CONTROL

Analysis of DEDS and subsequent synthesis or design of their control is gaining more and more importance due to the growing complexity of industrial systems, computer network systems, transportation systems etc. whose control cannot be solved rationally without their characterization as DEDS and without new corresponding approaches.

To achieve a required behaviour of the system S defined by the sublanguage K in the expression (1) brings about a problem of the system control. Its solution is conditioned by the existence of the controllable events, that js the events possible to be enabled or disabled. Then the set r. is split into controllable and uncontrollable ones, that is

Ramadge and Wonham proposed a highly abstract model in the form of the quadruple

(2)

s = Cr., r." ,L. K)

The control of the system S is enabled by the feedback structure depicted in Fig.I. The control system C "produces" on the basis of events string U a control string w enabling or disabling the controllable events of r.e so that always U E K is valid. The control is realized as follows. w, is the vector variable having a value from the set D = {d), d 2, .. .. d m }, where

(1)

where r. = {e) , e2, ... , en} is the set of events, r." is the set of all possible formally given sequences (strings) of events including the empty sequence E , L is a language, i.e. L ~ r." , and it represents a physically realizable dynamic (supposing the events are ordered in time) behaviour of the system and finally Kc L (it follows K is a sublanguage of L) is a prescribed behaviour of the system S out of all possibilities given by L. K can be also characterized as a restriction imposed on the system. The restriction is the result of the specific requirements the system should satisfy.

d,=

339

(3)

outputs mediate the relation of the system to its environment and the states can be understood as the internal affairs of the system. A string u of events (Fig.2) is built up of the events appurtenant to the sets just defined. Balerni et al. (1993) studied the problem how to develope the methods of Ramadge and Wonham and to add the new ones in order to improve the application possibilities of the practical control design. One of the main points there is to embed the input-output system structure in the modelling of systems.

and where the component d,.. for s= 1,2, ... ,n is associated with the event e $ . d,.. = 1 if the event is uncontrollable, otherwise d,.. equals 0 or 1 that means event disabling and event enabling respectively. It follows the set D constitutes binary assignments to the events. The maximum number of the assignments is 2 n , where n is the number of events in the set L . But possibly the particular control requires only a part of all possible binary assignments. The action of the control system C can be described as (see also Fig.l)

The system events lead up, of coarse, to the changes in the system situations or system states. In the technical applications one searches not only for the events but also for the states being the results of the appropriate events. Petri nets (Abel, 1990; Murata, 1989; David and AlIa, 1994) are the effectively usable tools for the modelling of systems and capable to represent both events and states and their causal relations as well. The aim of this paper is to show that the Petri nets enable to eXl'ress the language L in the system model (1) and to synthesize the required behaviour K.

(4) W to being an initial control value given before the first event occurs. The function f ensures that only the strings of the sublanguage K can appear and not a string U of the language L such that u ~ K .The sort of the control just described is called the supervisory control of DEDS. The supervisory control does not force any event in the system as it is typical \\ith the logical control. It only disables or enables for an actual situation the events which could break the condition requiring that all event strings should be from the language K.

It should be emphasized that a certain required behaviour is given by certain properties of the system. The properties often are not practically eXl'ressible as a sublanguage K. If some method of the supervisory control design needs to have the language K explicitly given, one has to transform

S = (L, L· ,L,K) ~

S

s ei l ei 2 ··· et E L = {e),e2, ...,e n }

1I =

11

C W= WkIWk2· ··

W/ E

{d),d 2 . . . , d m }

c

Fig. I. Model ofDEDS by Ramadge and Wonham

'-_ _ _ _.... w

3. THE SUPERVISORY CONTROL APPLIED FOR PRACTICAL PROBLEMS

fig. 2. Input-state-output structure ofDEDS

the required properties of the system into the corresponding language K. One of the advantage of the Petri nets is the possibility to formulate the required properties of the system in terms of properties of the Petri nets representing the system. While Ramadge and Wonham follow a concept based on finite state automata here the Petri nets are a conceptual basis.

Let us treat Fig.2 in order to put the DEDS supervisory control into the frame of the standard control approach. Fig.2 shows the input-state-output structure. In the structure the follo\\ing kinds of events are distinguished: the set Lu of the input uncontrollable events, the set 'I' u of the output uncontrollable events and the set r u of the state uncontrollable events. The sets of the controllable events are denoted analogously. The inputs and 340

4. PETRI NETS: BASIC DEFINITIONS AND PROPERTIES

represented by the flow of tokens given by the sequences of markings. The ordinary rules for the flow of tokens are the following: the number of tokens equal to the weight of the corresponding arc is removed from each pre-place ("pre" with respect to the considered transition) and the number corresponding to the weights of the oriented arcs is added to the post-places.The flow is allowed or the transition is fireable if the flow of tokens is elligible with respect to the place capacities. It means the numbers of tokens in the pre-places are sufficient and the post-places cannot be overloaded with respect to the capacities.

As stated earlier the aim of this work is to submit a solution of the supervisory control by means of the Petri nets. Petri nets mainly in their graphical form are a transparent and understandable tool for the supervisory control problem described in the previous sections. They are especially productive in the solution of the industrial processes control design.

After recalling the ordinary Petri nets a class of non-autonomous Petri nets suitable for the control design will be introduced. In distinguishing non-autonomous or autonomous and ex1ended or abbreviated Petri nets we follow the original and excellent classification of David and Alia (1994).

5. A CLASS OF PETRI NETS INTERPRETED FOR CONTROL AND TIlE SUPERVISORY CONTROL

The ordinary Petri nets are defined as follows (Abel, 1990; David and Alia, 1994).

A class of Petri nets interpreted for the control design and denoted as C - Petri nets are to be defined. The approach pertained to those of Moalla et al. (1978), Konig and Quack (1988), Quack (1988, 1991a, 1991b), David and Alia (1994) and others.

Definition 1. The Petri net PN is the 5-tuple PN = (P, T,F, C, W)

(5)

where

Definition 2. A C - Petri net is a 6 - tuple 1. P is a set of places 2. T is a set of transitions 3. F is a relation given by the following Cartesian products Fr;;,(Px1)u(TxP)

CPN = (PN, c, Y,INH,lND,Mo)

where 1. PN is a Petri net according to the DeC.l. 2. C is a set of logical conditions which can be assigned, but not necessary, to each transition of the Petri net PN. One or more conditions can be assigned to a transition. 3. Y is a set of values of the output variables which can be associated with the places. When a place is marked ( a token is present in the place) the variables associated with the place are set up according to the values of Y. 4. INH is a relation INH r;;, P x T whose elements are called the inhibitor arcs. If the pre-place of an inhibitor arc is marked the transition to which the inhibitor arc points is not fireable. The inhibitor arcs do not influence the flow of tokens in the Petri net. 5. IND is a relation IND r;;, P x T whose elements are called the indication arcs. The function of the indication arcs is opposite to inhibitor ones. 6. Mo is an initial marking.

(6)

An element of F, seen graphically, is an

oriented arc. 4. C : P -+ N is a mapping of places to the set of natural numbers and it determines the capacities of the preplaces. 5. IV is a mapping of the oriented arcs to N u { O} , that is W:F-+Nu{O}

(7)

W determines the weights of the oriented arcs.

PN viewed as a graph is the bipartite oriented graph. That form is very useful in practice. The Petri nets utilization for the the study od the systems dynamics is based on the concept of marking. The marking of the Petri net is the mapping M : P-+Nu{O}

(9)

The rules for the token flow are similar to those for the ordinary Petri nets with the additions resulting from the definitions of the set C. INH and IND. More about the described class and similar classes of the Petri nets interpreted for the control can be found in Hruz and Hanser (1991) and Hruz (1992).

(8)

M states an actual number of tokens occupying a place. The states of the system can be described through M . The events discussed earlier are

The marked places in the Petri nets are associated \\;th the actual states of the system to be modelled

341

and the transition firings are associated with the system events.

freedom of movement of both animals under the conditions a and b.

Let an example be treated which illustrates the supervisory control problem and an application of the C - Petri nets. The example is a modification of the often referenced example of Ramadge and Wonham (1989) on cat and mouse in a maze. Fig.3 shows the maze with the exclusively used doorways for cat and mouse. The maze situated in the environment E consists of rooms. All doorways except from the room 1 to 3 and vice versa can be fixed ( e.g. electromagnetically) and so made non-traversable. The traverses of the cat form the events L] = {CXEl , c q20 , c qQ3 , c q3 ] , c q13 , c q12 } and the traverses of the mouse the events L 2 = (m q43 , m q 3(J , m q04 } , where for example c XE2 means the passage of the cat from the surroundings into the room 2 of the maze. A particular passage of the cat or mouse from one room to another is understood as their own decision. The supervisory control delimitates possible movements but it does not determine a particular passage.

We repeat that the conditions a. and b. define the language K in (l) . The reader can imagine that to ex-press the given conditions as the language K e.g. by means of grammar rules may not be an easy task. Let us consider that the cat remain all the time outside the maze. The possible events can be formulated using regular ex-pressions as follows

If the cat realizes the passage c XE2 all doorways still can be open and the conditions a. and b. are satisfied for anv nex1 move of the animals. After the passage m q43 " the cat must be "prisoned" in the room 2 by fixing the doorway from 2 to 0 in order not to create a possibility for breaking the conditions a. and/or b. The C - Petri net for the maze system just described is in Fig.4. The meaning of the Petri net components is as follows . Staying of the cat in the room 2 is represented by the marked place denoted as cP2 . An event e.g. the passage of the mouse from the room 4 to the room 3 i.e. m q43 is represented by the firing of the transition mT4 and the transition of the token from the place m P 4 to the place m P 3 • The Petri net has two graphically not connected parts, namelv one for the cat movement and one for the mouse'. Most of the transitions have a logical condition belonging to the set C bearing in mind the item 2 of the Definition 2. The conditions are formed by means of the control variables wij . If wij = 1 then the corresponding transition is fireable and the event related to the transition occurs. Ifwi) = 0 the event is disabled.

Room 1

o

E

E

m~

3

4

E Fig. 3. The maze example

A passage is supposed to be instantaneous and only one in a discrete time point. Let the initial state of the system be given by the cat staying outside of the maze and by the mouse staying in the room 4. All possible traversions of the cat and the mouse form the strings of the language L by the model (1). Let a specific dynamic evolution be required (the language A) by the follo"ing conditions: a. disallow of the cat and mouse meeting in any room of the maze b. possibility for the cat to return from any position to the room 2 and for the mouse from any position to the room 4 and at that preserving the maximum

Fig. 4. The C-Petri net as a model of the maze

342

arcs specified in the first point, and similarly for E 2 etc. In the maze example the condition means that e.g. the cat has from all possible positions a way back to the room 2 and the mouse to the room 4 so that a move of the mouse or the cat respectively does not make impossible to complete the return ~ithout breaking the condition 2.

Formulation of the C - Petri net for the system to be supervisory controlled is the first step of the presented method. The second step is design of the corresponding reachability graph. The oriented arcs of that graph are, as usual, denoted with the transitions of the Petri nets whose firings cause the change of marking. The initial marking determines the initial node of the reachability graph. The next step of the method is imposing the system properties specified in some way on the reachability graph. In the model (1) it is ex-pressed by the language K which is not usually known. More usable specifications are expressible just through reachability graphs. The most useful specifications are: I. A partition of the oriented arcs in the reachability graph into subsets A \ ,A 2, ... ,A r where each subset is related to the particular behaviour specification of the system. In the maze example we have two subsets, namely A \ corresponding to the movement of the cat and analogously A 2 for the mouse. Fig.5 shows the reachability graph for the maze example. 2. A subset D of the graph nodes which are forbidden to appear as a result of any string of events. In other words those nodes cannot be a part of any path in the reachability graph and considering, what the case may be, the partition given above. E.g. in the maze example the subset D are given by the nodes - markings which mean the meeting of the cat and mouse in the same room. 3. Subsets E\ , E2 , .. . ,E s of the graph nodes, where at least one node of E \ must be reachable from the nodes of elligible path following one kinds of the

The supervisory control requires in terms of the reachability graph to determine values of the control variables 1\'. for each state of the system represented by a node in the reachability graph. The arcs of the reachability graph are for the purpose of the method equipped not only with the appropriate transitions but also with the control variable which is capable to disable or enable the assigned transition firing representing the related event. The algorithm solving the supervisory control is based on the analysis of the reachability graph pertaining to the C - Petri net of the controlled system and the behaviour specifications described above. Each node of the reachability graph starting from the initial node is analyzed. For a node firstly the oriented arcs of the subset A / going out of the node are considered. It is checked if there are oriented paths from the analyzed node to any node of the subset D. In the positive case the arcs going form the analyzed node which form the first arc of the path is denoted as prohibited. Then it is checked if there are paths to at least one node ("home" node) of the subset E•. The first arcs of such paths (that is such outgoing arcs of the analyzed node) are allowed. In the negative case the checked arcs are

eTO cw03

Room to return for the eat: • Fig. 5. The reachability graph for the maze example

343

for the mouse: •

prohibited. The third test is: if after the transition by the arc of the subset A J to the next node assuming that both of the previous tests are allo\\ing the transition there is not an uncontrollable arc going out of the ne~1 node and belonging to the subsets A2 ,A 3, ... ,A r which arc could start the paths breaking two previously checked conditions for the paths in A J • Again in the positive case the checked arc is prohibited. The third test is perfonned for each graph node on the routes to the "home" nodes. The described procedure is repeated for all arcs from A J , then for all arcs from A 2, etc. The real-time supervisory control is realized in accordance \\ith the analyzed reachability graph. The state of the system is given by an actual marking starting with the initial one. The control variables assigned to the prohibited arcs are set to zero. A new event means a new marking. The control variables are set to one except for those arcs which remain prohibited or are newly prohibited. The test procedures can be realized by means of the matrix operations applied on the reachability graph. They render the existence or non-existence of the oriented paths specified by the subsets A J,A 2, . .. ,A r (or in the language of the graph theory - weighted arcs) according to the required tests.

6. CONCLUSION A solution of the discrete event dynamic systems supervisory control was presented in the paper. It consists in the following conceptual parts - fonnulation of the C-Petri net for the given system - design of the reachability graph for the C-Petri net - transfonnation of the system requirements to be ensured by the supervisory control into the reachability graph - detennination of the real-time supervisory control with help of analysis of the oriented paths in the reachability graph.

Ho, Y.C. and e. Cassandras (1983). A new approach to the analysis of discrete event dynamic systems. Automatica. 19,149-167. Ho, ye. (1990). Analyzing complexity and perfonnance in a man-made world. An introduction to discrete event dynamic systems. Preprints of the 11th IFAC World Congress, Tallinn. August 13-17. 1990, Vol. 1.66-70. Hniz, B., and e. Hanser (1991). Klassifikation von Petri-Netz-Strukturen und ihre Implementierung vergleichsweise in den Echtzeitprogrammiersprachen PEARL, Occam und C. KongreJ3band der Konferen= Echtzeit '91 , 11.-13. juni 1991, Sindelfingen b. Stuttgart, Hrsgbr. Prof. H. Rzehak, Fak. fur Infonnatik, Univ. der BW. Hniz, B. (1992). A novel representation of discrete event systems. Ky bemetikn a informatikn, 5, 360-365. Konig, R. , and L. Quack (1988). Petri-Net=e in der Steuerungstechnik. YEB Verlag Technik, Berlin. Moalla, M., 1. Pulou, and 1. Sifakis (1978). Reseaux de Petri synchrinises. J. RAIRO, Automatic Control Series, 12, 103-130. Quack, L. (1991a). Aspekte der Modellierung und Realisierung der Steuerung technologischer Prozesse mit Petri-Netzen. Automatisierungstechnik. 39, 116-120. Quack, L. (1991b). Aspekte der Modellierung und Realisierung der Steuerung technologischer Prozesse mit Petri-Netzen. Automatisierungslechnik, 39, 158-164. Ramadge, PJ., and W.M. Wonham (1987). Supervisory control of a class of discrete event processes. SIAM J. Control and Optimization, 25,206-230. Ramadge, PJ., and W.M. Wonham (1989). The control of discrete event systems. Proc. IEEE, 77, 81-98.

The presented solution of the DEDS supervisory control is a basis for the elaboration of the universal software tools for the practical control design .

5. REFERENCES Abel, D. (1990). Petri-Net=e for Ingenieure. Springer-Verlag, Berlin. Balemi, S., GJ. Hoffman. P. Gyugyi. H. Wong-Toi , and G.F. Franklin (1993). Supervisory control of a rapid thermal multiprocessor. IEEE Trnns. on Automatic Control, 38. 1040-1059. David, R. , and H. AlIa (1994). Petri nets for modeling of dynamic systems - a survey. Aulomatica, 30, 175-202.

344