Copyright © IFAC New Trends in Design of Control Systems, Smolenice, Slovak Republic, 1997
D.E.D.S. MODELLING AND KNOWLEDGE-BASED CONTROU Frantisek Capkovic Institute of Control Theory and Robotics, Slovak Academy of Sciences Dubravskci cesta 9, 84237 Bratislava, Slovak Republic e-mail:
[email protected], http://www.savba.skFut7·rcapk/capkhome.htm
Abstract. An alternative approach to modelling the discrete-event dynamic systems (DEDS) and to knowledge-based control of them is presented in this paper. Petri nets and oriented graphs are simultaneously used in order to express in analytical terms the new combined model of DEDS and to represent analytically knowledge about the control task specifications (like criteria, constraints, etc.) by means of such a new combine approach. Both the DEDS model and the knowledge base are simultaneously used in the procedure of the control system synthesIs. Key Words. Control system synthesis, discrete-event dynami c systems, knowledge representation , knowledge-based control, modelling, oriented graphs, Petri nets
1. INTRODUCTION
DEDS control synthesis consists in finding a suitable sequence of the controllable discrete events (at respecting the spontaneous ones, of course), the joint activity of both the system model and the KB makes possible to do it better. The potentional elementary control possibilities are generated by means of the DEDS model in any step of the control synthesis procedure. These elementary control possibilities are tested with respect to existence cond itions. When there are several control possibilities satisfying the existence conditions the most suitable control possibility is chosen by means of the knowledge base. Summarized, this paper present.s the combined approach (based on Petri nets and oriented graphs) to both the DEDS modelling and the knowledge representation. Such an approach contributes to simplifying the process of handling both information about the system to be controlled and knowledge about the control task specifications. The simultaneous utilizing of the DEDS model and the KB makes the procedure of th e knowledge-based control synthesis more qualifi ed. This paper rep resents the contribution t.o the previous author's works Capkovic (1991-1997d) and respects the undestanding of the fuzzy Petri nets presented by Looney( 1988)
In order to synthetize the control of DEDS (discrete-event dynamic systems) two basic requirements cannot be usually avoided - a correct model of the system to be controlled and a domain oriented knowledge base (KB) expressing knowledge about the control task specifications . DEDS are systems discrete in nature, usually asynchronouos. Their state is changed owing to the occurrence of discrete events. There are two kinds of discrete events in DEDS - spontaneous events (they cannot be influenced from outside) and controllable ones (they can be influenced from outside and, consequently, they are chosen to be the DEDS control variables). Although DEDS (like manufacturing systems, transport systems , communication systems, etc.) are artificial systems as to their structure and the variability of possibilities of their development , there is not any uniform technique of their mathematical description in the control th eo ry. In addition to this, the existence of the spontaneouos discrete events makes the DEDS modelling and control synthesis more difficult. The need] of the knowledge representation flows from the fact that the control task specifications (like criteria, constraints, different circumstances concerning the surrounding influences, etc .) are, as a rule, given not in analytical terms but e.g . verbally. Because the
2. THE COMBINED MODEL OF DEDS Although there are many different approaches how to model DEDS the Petri nets (PN) are used very frequently. In order to describe the new approach
The work was partially supported by the Slovak Grant Agency for Science (VEGA) in frame of the project No. 1
2/4036/97
297
2.1. The PN-based model
combining PN and oriented graphs, that is proposed in this paper, consider PN to be (as to their structure) the directed bipartite graphs I.e. the graphs with two kinds of nodes (positions and transitions) and two kinds of edges (i.e. the arcs oriented from positions to transitions and the arcs oriented from transitions to positions). On the other hand, the PN can be considered to be the ordinary oriented graphs - i.e. the graphs with one kind of nodes (positions) and one kind of edges (oriented arcs among positions). In this idea the PN transitions are understood to be fixed on the oriented arcs among positions. The combined structure where one part of the PN is described by means of the bipartite oriented graph and another part by means of the ordinary oriented graph, can be formally described as follows ( P, T , F, G, .6. ); P
nT
= 0;
F
n G
Such a model can be expressed form
F.Uk
=
-
k
= 0, N
(2)
F
(3)
(4)
Xk
k is the disrete step of the DEDS dynamics development.
(17;I,· .. ,17;JT;k
O, N is the ndimensional state vector of the DEDS in the step k; 17;. ' i = 1, n is the state of the elementary subprocess Pi in the step k (in the PN analogy it is the state of the elementary position Pi) - its activity is expressed by 1 and its passivity by O. Xk
o (1)
Uk ell' ·.. ,")Lf; k 0, N is the mdimensional control vector (it represents the discrete events) of the DEDS in the step k ; , j = 1, m is the state of occurring th e discrete event tj in the step k. In the PN analogy it is the state of the elementary transition tj(1 - enabled , 0 disabled).
is a finite set of the PN positions 1, n, being the elementary PN posi-
I; ,
T = {t I, .. , t m } is a finite set of the PN transitions with tj , j = 1, m, being the elementary PN transitions.
B is the (n x m )-dimensional structural matrix of constant elements expressing the causal relations between subprocesses and discrete events. It is given by means of the (n x m )-dimensional matrix F of constant elements expressing causal relations between the subprocesses and the discrete events and (m x n )-dimensional matrix G of constant elements expressing the mutual causal relations between the discrete events and the subprocesses.
F ~ P x T is a set of the oriented arcs emerging from the positions and entering the transitions. It can be expressed by means of the arcs incidence matrix F = {jij}, !ij E {O, I} , i = 1, n ; j = 1, m. Its element !ij represents the absence (when 0) or presence (when 1) of the arc oriented from the position Pi to its output transition tj. G ~ T x P is a set of the oriented arcs emerging from the transitions. The arcs incidence matrix G {gij} , gij E {O,l} , i 1,m;j = 1,nexpresses the occurrence of the arc oriented from the transition ti to its output position Pj.
=
<
+ B.Uk
the following
where
= {PI , ... , Pn}
with Pi , i tions .
GT
B
where
P
Xk
Xk+1
111
T symbolizes the matrix or vector transposition .
=
This model is most suitable in case when all of the discrete evets are controllable .
.6. ~ P x P is a set of the oriented arcs (implicitly including the PN transitions) among the positions. The arcs incidence matrix .6. = {5 ij } , i = 1, n ; j = 1, n is the functional matrix. Its element bij expresses not only the occurrence of the arc oriented from the position Pi to another position Pj but also the transition function of the corresponding transition fixed on this arc (it will be explained below in the connection with modelling the spontaneous discrete events).
2.2. The model based on oriented graphs This kind of the model is the following
k IV
= O, N
(5)
here
.6. = {bij}, bij , i = 1, n ; j = 1, n is the (n x n )dimensional functional structural matrix expressing the causal relations between subprocesses that are influenced by spontaneous discrete events occurring in the system. The elements of this matrix represent the transition functions of the transitions representing the spontaneouos discrete events - e.g. 5ij = 'Yp,lp. is concerning the transition fixed on the arc oriented form Pi to Pj .
Using the analogy between the PN positions and the DEDS subprocesses as well as the analogy between the PN transitions and the DEDS discrete events (e.g starting or ending the subprocesse , etc.) we can represent the DEDS model on three different ways. 298
=
of knowledge) Si, i 1, n and the set of the PN positions must be made as well as the analogy between the set of IF- THEN rules R j , j = 1, m and the set of the PN transitions. The mutual causal interconnections between the statements and the rules or among the statements are understood to be analogical to the mutual causal interconnections between the PN positions and transitions or among the PN positions. In addition to this the ordinary PN are replaced by means of logical PN (LPN) or/and fuzzy PN (FPN). Consequently, we have also three possibilities of the knowledge representation. In order to avoid any ambiguity with respect to previous symbolics used in the DEDS modelling, let us denote here the state vector to be ~ K, control vector to be OK , and incidence matrices to be Wand r.
This model is most suitable in case when all of the discrete evets are spontaneous, i.e. uncontrollable, and consequently, they represent the system parameters.
2.3. The combined model
When there are simultaneously present both the spontaneous discrete events and the controllable ones in the DEDS to be modelled, the combined model is most suitable . In such a case the set of transitions T representing the discrete events consists of two subsets Tc (representing controllable discrete events) and Tu (representing uncontrollable spontaneous discrete events). It means that T = Tc U Tu, Tc n Tu = 0. Consequently, the transition functions of the transitions representing the controllable discrete events create the components of the control vector Uk while the transition functions of the transitions representing the spontaneous discrete events create the elements of the functional matrix a - i.e. the system parameters. Hence, the DEDS model can be expressed as follows A,Xk
Xk+l
A B F.Uk
<
+ B.Uk
k
= O,N
3.1. The PN-based model
Such a kind of the knowledge representation can be analytically described as follows ~K+l
(6)
In + a GT - F
(8)
Xk
(9)
(7)
= ~KorBandOK , B = rTorw
K
= 0, N 1
wandO!,' ::; ~f{
( 10) (11) (12)
where ~K = (
where
=
A is the (n x n )-dimensional functional matrix - the system matrix consisting of the (n x n)dimensional identity matrix In and the functional matrix a that is the (n x n )-dimensional functional matrix expressing the causal relations between subprocesses that are influenced by spontaneous discrete events in the system.
o -
)T.' Y\ -- ON I " con, 1 'IS t1e trol" vector of the KB expressing the rul es enabling (or better the rules evaluability, i. e. t.he readiness of the rules to be eval uated) in the step K. wf{ , j = I , m is the state of enabling the elementary rule R j to be fir ed in th e step 1\'. f(
B is the (n x m)-dimensional structural matrix of constant elements expressing the causal relations between subprocesses and controllable discrete events. It is given by means of the (n x m)dimensional matrix F of constant elements expressing causal relations between the su bprocesses and the controllable discrete events and (m x n)dimensional matrix G of constant elements expressing the mutual causal relations between the controllable discrete events and the subprocesses.
-
(wRl"",wRm f( f(
}
01' are , respectively , the operator of log ical multiplying and additioning.
and,
The inference mechanism of the statements tru th propagation can be analytically expressed as follows
3. THE KNOWLEDGE REPRESENTATION BY MEANS OF THE COMBINED APPROACH
~K VK
Yf{
An analogy to the above introduced combined approach to DEDS modelling can be utilized also for the knowledge representation . However, the analogy between the set of statements (some pieces
=
neg ~h' I" - ~f( T W and ~ !,' negvf{
= Im -
299
(14)
VK
neg(wT and(neg ~J())
where
( 13)
(15 )
4 , THE DEDS CONTROL SYNTHt;~l~
neg is the operator of logical negation.
The problem of the D EDS control synthesis is that of finding the most suitable sequence of th e control vectors Uk , k 1, N. Usually, th e re are several possibilities of the further development of the system dynamics in any step k . Hen ce, the control synthesis procedure has to be able to generate these possibilities. It is performed by means of the DEDS modeL Consequently, the most suitable possibility has to be chosen by means of the KB. Because the KB operates in each step k of the DEDS model development, the step of the KB dynamics deve lopment was denoted as !\' in order to distinguish th e m. The KB has to co nsid er the situation in any step k very thorougly from the aspect of the global development of the controlled object, The KB decision in any step k depends on both the actual situation existing in the system itself - i,e, on the present state of the controlled system Xk corresponding to th e control vecto r in the previous step Uk-J - and the actual final state (fl K of knowledge inferellce ill the step k: Several steps 1\ 0 , NI of t.he KB dynamics developm e nt may be necessary ill allY ste p k of the system dynamics development . The KB dec ision directly influences the choice of the control vector Uk . This fact can be formally expressed as follows
v K is a m-dimensional auxiliary vector pointing out (by its nonzero elements) the rules that cannot be evaluated, because there is at least one false statement among its input statements. This declaration is qualified only in the analogy with the LPN. In the analogy with FPN any statement is always true with a fuzzy measure.
=
T K is a m-dimensional vector pointing out the rules that have all their input statements true and , consequently, they can be evaluated in the step f{ of the KB dynamics development. This vector is a base of th e inference , because it contains information abou t the rules that can contribute to obtaining the new knowledge . These rules correspond to the nonzero elements of the vector T K. This is also qualified only in the analogy with the LPN. In the analogy with the FPN any rule is a lways evaluable with a fuzzy measure - i.e. it always contributes to ob taining the new knowledge. If there is not any important obstacle in utilizing of co mplete knowl edge yielding by T K , this vect.or can be used as the KB " control" vector , i.e. n K = TK.
=
In is n-dimensional constant vector with all its elements equal to 1.
(21) or more exac tly
3.2. The mod el bas ed on onented graphs The approach based on the oriented graphs yields the following form of the knowledge representation in analytical terms
1\
= 0, NI
where
.1"(.) is a symbolical operator. It cannot. be ex-
( 16)
pressed in analytical terms. It depends on the actual case of the DEDS , on actual case of the control task specifications, etc. The off-line approach to control synthesis is g iven
The infe rence mechanism is implicitly included owing to the fact that the rules (as the analogy with the PN transitions) are fixed on the oriented arcs among the statements. This model is suitable es pecially for expressing both-sided implications.
System Model 1 - - - - - - ,
33. The combzned model
Knowledge Base
Co mbining bo th of the prev ious approaches th e following kn o wl edge re presentation can be obtained {fl/\+I
= Aand
f( Bandnl-; 1\' = 0, NI A = In ar 6. B = rT ar 'l' a7'
{Uk}
(17)
ontrol Vecto r Ge neration
Wk
Con trol Base C reation
(18) ( 19) (20)
Fig.!. The principial schel\le of th e co ntrol sy nthesi s (off line approach)
The infe rence m echalllsm is th e same like in th e PN-based mod el introd uc ed above.
on Fig . 1 and th e on-line one on Fig . 2. In t.hese
'l' .nJ{
S
{fl f{
300
Table 1
Cat Behaviour Mous e Behaviour Step k = 0 cx o =(OOlOOj1 mx o=(OOOO1) l "' Xo = ( 1 1 1 10 f cXo = (1 101 If cw o =(OOIOOO f "' w o = (OOOO l Of' Cu o = cWo "' u o = "' w o cxl=(lOOOOf "' Xl= (OOO lO f
Real System
{Uk} Con t rol Vectors
Wk
Ge neration
The res ults of the co ntrol synthesis
Control Base C reation
=
Ste p k 1 cwl =(100100)i "' wl=(O OOOO I )i the control possibilities are {~. C'I. m t;} all of t hem a re possi ble "' Ul=m Wl cui=(IOOOOO )T c x~ = (0 1000)T "'xz = (l oooo f' cu? = (00010 Of = non e = c x ~ = (0 0 0 10 )T = n on e = c x~ f:. mx :? ; c x~ f:. mx :? Step k 2 c w ~=(O lOOOO ) i ''' w :>=( I OOIUU)l c w ~=( OOOOlO) T = n o n e= the contro l possi bili ties a re {cz, 1ftl' m4} ; c:? h as priority to nl] {¥5, 1fth m4} ; m4 h as priority to C5 c u ~ =(OIOOOO )T "' u 2=(000 10 0)T c u ~ =(OOO OOOf = n one= c x ~ =(OOII O)T "'x3=(OOOOI)T C X~l= c X O "' X3=11! XO c x~=( OIOIOf = n on e =
Fig. 2. The principial scheme of the control synthesis (o n lin e approach)
=
3
a)
4
3
b)
4
F ig. 3. The new rep resen t atio n of the maze. a) possible behaviour of th e cat ; b) possible behaviour of the mouse
introduced matrices cF , cG , CA a nd the paramet ers of the mouse model are exp ressed by m eans of the followin g matrices'" F , m G . m A .
fi g ures the vecto r Xt symbolizes the desirable terminal state of the controlled object and the vector W k symbolizes the co ntro l base vector (Capkovic, 1994c) pointing out a ll of the enabled disc rete events in the step k. The pro p osed combine approach to the DEDS modelling yields a simplier so luti on of the cont rol sy nthesis problem It will be illustrated on the follow ing exam ple .
n=5
CF
1001 00 1 010000 001000 ( 000010 000001
=
5. THE ILL USTRATIVE EXAMPLE Consider the examp le defined by Won ham and Ramadge ( 1987) I t is the sam e maze problem t hat was so l ved in (C:apkov ic, 1994c) by means o f t he Pt\'-based approa ch . To demonst.rate th e advantages of th e approac h proposed in this pape r the co mbin ed model of the a nimals behaviour will be used. Th e K B expressing the co ntrol tasks spec ifi cat ions stays the same. The new combined mo del of the maze can be graphically expressed by means of Fig. 3. It can be seen that the un contro ll able door of the maze is rep laced not by means of t.wo P N transi tions d , c~ like befo re - i.e. in (C apkovic. 1994 c), but by means o f the edges o f the Oriented grap h . Hence, t he parameters of the cat model are expresse d by means of the be low
n=5
mF
17/ ",
100 1 0 0 001000 010000 000001 000010
=
( 301
01000 00100 1 0000 00010 UOOOl 1 0000
=G "' G T
~~~~~1
o0
1 0 0 01010 00001
'" A
=
=
UUIU O l UI000U 100000 000010 000100
(~ ~ ~ ~ ~ 1 0 0 I 0 0 0 0 U 1 0 000 0 I
niques and Soft Computing EUFIT'95, Aachen, Germany, August 28-31, 1995, (H.J. Zimmer-
The results of the problem solving are introduced in a comprehensive form in Table 1. The control synthesis process is simplier, because the cat control vector has a smaller dimensionality. The solution of the control synthesis problem is the same like that introduced in (Capkovic , 1994c), of course.
menn, Ed.), VoI.III, pp. 1780-1784, ELITE , Aachen. Capkovic F. (1995b). Petri nets-based approach to intelligent control synthesis of FMS . In : Proceedings of the 1995 INRIA/IEEE Sympo sium on Emerging Technologies and Factory Automation - ETFA '95, Paris , France , October 1995, Vol. 1, pp. 323-331, IEEE Computer
6. CONCLUSIONS
Society Press, Los Alamitos, CA, USA. Capkovic, F. (1995c). Using fuzzy logi c for knowledge representation at control synthesis. B USEFAL , 63, 4-9. Capkovic, F. (1996a). A Petri net approach to analysis of complex discrete event systems and to synthesis of their control. In: Proceedings
The new alternative approach to modelling of DEDS and to knowledge representation about the control task specifications was presented in this paper. It is based on combination of both the Petri net-based approach and the approach based on ordinary oriented graphs. The results achieved by means of the presented approach were compared with the results achieved in the previous author's approach based on Petri nets. It was performed on the same illustrative example.
of the 13th European Meeting "CybernetIC s and Systems '96", Vienna , Austria, April 9-12,
1996, (R. Trappl, Ed.), Vol. 1, pp. 83-88. Capkovic, F. (1996b) . Knowledge-Based Control of DEDS. In: Proceedings of the 13th IFAC World Congress 1996, San Francisco , USA, June 3~-Ju ly 5, 1996, Vol. J , paper J-3c-02.6 . pp. 347-352 , Compact. Disc , Elsevier Science Ltd. , Pergamon. Capkovic , F. (1997a). Petri nets and oriented graphs in fuzzy knowledge representation for DEDS control purposes. BUSEFAL , 69, 21-30. Capkovic F. (1997b). Synthesis of knowledgebased control systems of flexible manufacturing systems . In: Proceedings of the 2nd World
7. REFERENCES Capkovic, F. (1991). Petri nets-based computer aided synthesis of control systems for discrete event dynamic systems. In: Prepnnts of th e 5th IFAC Symposium on Computer Aided D esign in Control Systems CA DCS '91, Swansea, U.K., July 1991 (H .A . Barker , Ed.), pp. 409-
414. Pergamon Press, Oxford. Capkovic, F. (1993). Modelling and justifying discrete production processes by Petri nets. Computer Integrated Manufacturing Systems, 6, No 1,2 1-35. Capkovic, F. (1994a) . Computer-aided design of intelligent control systems for discrete event dynamic systems. In : Proceedings of th e
Congress on Intelligent M anufactunng Processes & Systems - IMPS '97, Budapest, Hungary , June 10-13, 1997 (L. Monostori, Ed.) , pp.
303-308, Springer Veriag , Budapest , Hungary. Capkovic F. (1997c). Synthesis of the flexible manufacturing systems control by means of simulation. In: Proceedings of the 13th International
IEEE/IFAC Joint Symposium on ComputerAided Contro l System Design CACSD'94, Tucson, Arizona, USA, March 1994 (S.E . Matts-
Conference on Computer-Aided Productiol1 El1gineering - CAPE'97, Warsaw , Poland, JUl1 t
son , J .0 . Gray, F .E. Cellier, Eds.) , pp. 55-60. IEEE Service Center, Piscataway. Capkovic, F (1994b) . A rule-based representation offuzzy knowlege for control purposes by means of Petri nets. In: Proceedings of the 2nd Eu-
1997 (J.k McGeough , S. Strzelczak , Eds.). pp . 359-366, Warsaw University of Technology, Poland. Capkovic F. (1997d). Fuzzy knowledge in DEDS control synthesis. In: Proceedings of th e 7th 111-
ropean Congress on Intelligent Techniques and Soft Computing EUFIT'94, Aachen, Germany, September 1994 (H.J. Zimmermenn , Ed.) , Vol.
ternational Fuzzy Systems Association World Congress - IFSA '97, Prague , Czech Republzc. June 25-29, 1997 (M. Mares , R. rvl es iar \' .
3, pp. 1451-1455. ELITE, Aachen . Capkovic , F. (1994c). A Pet ri net-based approach to synthesis of control systems for discrete event dynamic systems. In: Preprints of the 1st I FA C
Novcik, J . Ramik , A. Stupnanova, Eds.). pp. 550-554, Academia, Prague, Czech Rep ubli c. Looney, C.G. (1988) . Fuzzy Petri nets for rul ebased decisionmaking . IEEE Trans. Syst. :\-fall Cybern., SMC-18, No 1, 178-183. Wonham , W.M. and P.J . Ramadge (1987) On the supremal controllable sublanguage of a given language. SIAM 1. Control and Optimi za ilOll. 25, No 3, 637-659.
Workshop New Trends in Design of Control Systems - NTDCS'94, Smolenice, Slovak R epublic, September 7- 10, 1994, pp. 398-403.
Capkovic, F. (1995a) . Fuzzy knowledge representation by means of the Petri net-based model with variable parameters. In: Proceedings of the 3rd European Congress on Intelligent Tech-
302