<<

SUPERVISORY CONTROL OF HEAP MODELS USING SYNCHRONOUS COMPOSITION

Jan Komenda Mathematical Institute, Czech Academy of Sciences, Brno Branch Zizkova 22, 616 62 Brno, Czech Republic [email protected]

Jean-Louis Boimond and Sébasten Lahaye LISA Angers, 62, Avenue Notre Dame du Lac, 49000 Angers, France {boimond,lahaye}@istia.univ-angers.fr

Keywords: Heap models, synchronous product, supervisory control, dioid algebra.

Abstract: Heaps models are powerful models for concurrent timed discrete event systems. They admit linear description using dioid algebras. Inspired by supervisory control of logical discrete event systems we introduce parallel composition of heap models, called synchronous product, to formally describe the action of supervisor (rep- resented by another heap model) on the system. This additional explicit concurrency for naturally concurrent heap models is useful for studying supervisory control in the algebraic framework of dioid algebras. Timing aspects of supervisory control, i.e. optimal timing of the controller, is studied based on residuation theory.

1 INTRODUCTION (max,+) automata corresponding to safe timed Petri nets, where synchronous product is standard com- There are two major streams in control theory of position of subnets through shared (synchronization) Discrete Event (dynamical) Systems (DES). The first transitions. The intermediate formalism of heap mod- stream, known as supervisory control theory, has els enables a letter driven (max,+)-linear representa- been introduced by Wonham and Ramadge for logi- tion of 1-safe timed Petri nets. Therefore it is in- cal automata (e.g. (Ramadge and Wonham, 1989)). teresting to work with heaps of pieces instead of The second stream more particularly deals with the (max,+)-automata and introduce a synchronous com- class of timed Petri nets, called timed event graphs, position of heap models that yields essentially re- based on linear representation in the (max,+) alge- duced nondeterministic (max,+)- automata represen- bra. Being inspired by papers on (max,+) automata tation of synchronous composition of corresponding (e.g. (Gaubert and Mairesse, 1999), (Gaubert, 1995)), (max,+)-automata. This way we obtain representa- which generalize both logical automata and (max,+)- tions allowing for use of powerful dioid algebras tech- linear systems, it is interesting to develop a control niques and the reduced dimension of concurrent sys- method for (max,+) automata by considering super- tems at the same time: the dimension of synchronous visory control approach. However the time seman- product of two heap models is the sum of each models tics of the parallel composition operation (called su- dimensions, while the dimension of supervised prod- pervised product) we have proposed for control of uct of (max,+)-automata is the product of the individ- (max,+) automata in (Komenda et al., 2007) are dif- ual dimensions, which causes an exponential blow up ferent from the standard time semantics for timed au- of the number of states in the number of components. tomata or timed Petri nets. One has to increase the The extension of supervisory control to timed number of clocks in order to define a synchronous DES represented by timed automata is mostly based product of (max,+) automata viewed as 1-clock timed on abstraction methods (e.g. region construction turn- automata. This goes in general beyond the class of ing a timed automaton into a logical one). On the (max,+) automata and makes powerful algebraic re- other hand abstraction methods are not suitable for sults for (max,+) automata difficult to use. (max,+) or heap automata, because their timed se- The results of (Gaubert and Mairesse, 1999) mantics (when weights of transitions are interpreted suggest however an alternative for the subclass of as their minimal durations) are based on the earliest

467 ICINCO 2007 - International Conference on Informatics in Control, Automation and Robotics

possible behavior similarly as for timed Petri nets. duced by the formula

The method we propose avoids any abstraction and ∗ Å n works with timed DES (TDES) represented by heap a = a N models. Similarly as for logical DES our approach n∈ to supervisory control is based on the parallel compo- with a0 = e. dioids are introduced in the same sition (synchronous product) of the system with the manner as in the conventional linear algebra. supervisor (another heap model). The simplest examples of commutative dioids are Our research is motivated by applying supervi- number dioids such as Rmax = (R ∪ {−∞},max,+) sory control on heap models, which are appropriate with maximum playing the role of idempotent addi- to model 1-safe timed Petri nets. This is realized by tion, denoted by ⊕: a ⊕ b = max(a,b), and conven- using the synchronous product: the controlled system tional addition playing the role of multiplication, de- is the synchronous product of the system with its con- noted by a⊗b or ab when no mistake is possible. Ex- troller (another heap model). The algebraization of amples of non commutative dioids are matrix number the synchronous product that is translated into idem- dioids, formal languages and formal power series. potent sum of suitable block matrices together with a Let us recall from (Baccelli et al., 1992) and linear representation of composed heap models using (Gaubert, 1992) the following results. its decomposed morphism matrix is then applied to Theorem 2.1 Let D be a complete dioid, x,a,binD the control problem for heap models. and The paper is organized as follows. Algebraic pre- x = x ⊗ a ⊕ b. (1) liminaries needed in the paper are recalled in the next The least solution to equation (1) exists and is given section. In Section 3 are introduced heap models to- ∗ gether with their synchronous product and their mod- by b ⊗ a . elling by fixed-point equations in the dioid of for- Lemma 2.2 Let D be a complete dioid, a,b in D. mal power series. Section 4 is devoted to the study Then (a ⊕ b)∗ = (a∗b)∗a∗ = a∗(ba∗)∗ = b∗(ab∗)∗ = of properties of synchronous product of heap models (b∗a)∗b∗. that will be applied in Section 5 to supervisory con- In the sequel we will work with the dioid of formal trol of heap models. Residuation theory can be used power series in the noncommutative variables from A in supervisory control of heap models. and coefficients from Rmax (corresponding to time). The standard notation A∗ is used for the free monoid of finite sequences (words) from A. The empty word 2 DIOID ALGEBRAS is denoted by 1. Formal power series form a dioid de- noted Rmax(A), where addition and (Cauchy or con- Basic algebraic structures and their properties that volution) multiplication are defined as follows. For R will be used in the paper are briefly presented in this two formal power series in max(A): ′ ′ section. s = ⊕w∈A∗ s(w)w) and s = ⊕w∈A∗ s (w)w, we have ′ ′ An idempotent semiring is a M endowed with s ⊕ s = ⊕w∈A∗ (s(w) ⊕ s (w))w and two inner operations. A commutative and associative ′ ′ addition denoted ⊕ that has a unit element ε and satis- s ⊗ s = ⊕w∈A∗ (⊕uv=ws(u)s (v))w. fies the idempotency condition (∀a ∈ M : a ⊕ a = a). This dioid is isomorphic to the dioid of generalized ∗ A second operation, called multiplication, and de- dater functions from A to Rmax via a natural isomor- noted ⊗ is associative and has a unit element e, dis- phism similarly as the dioid Zmax(γ) of formal power tributes over ⊕ both on the left and on the right, and series, used to study Timed Event Graphs (TEG), is ∀a ∈ M : a ⊗ ε = ε ⊗ a = ε. An idempotent semiring isomorphic to the dioid of daters from Z to Zmax. ∗ is said to be commutative if the multiplication ⊗ is This associates to any y : A → Rmax commutative. the formal power series ⊕w∈A∗ y(w)w in Rmax(A). The There is a naturally defined partial order  on any zero and identity series are denoted by ε and e, re- idempotent , namely, a  b if and only if spectively, because it will be clear from the context a ⊕ b = b. An idempotent semiring M is called to whether a number dioid or dioid of formal power se-

be complete if any nonempty subset A of M admitss ries is meant. Let us recall that ∀w ∈ A∗ : ε(w) = −∞ Ä a least upper bound denoted by x∈A x and the dis- and tributivity axiom extends to infinite sums. Idempotent 0 if w = 1 e(w) = ∞ semirings are usually called dioids.  − if w 6= 1. Let N denote the set of natural numbers with zero. We consider in the sequel the complete version of In complete dioids the star operation can be intro- Rmax(A) with coefficients in Rmax ∪ ∞. The notion of

468 SUPERVISORY CONTROL OF HEAP MODELS USING SYNCHRONOUS COMPOSITION

projection will be needed. Similarly as for formal lan- • l : A × R → R ∪ {−∞} is function such that l(a,r) guages, (natural) projection will be introduced such gives the height of the lower contour of piece a at that it will be morphism with respect to both ⊕ and the slot r. ⊗. • u : A×R → R∪{−∞} is function such that u(a,r) Finally, residuation of matrix multiplication will gives the height of the upper contour of piece a at be needed in Section 5. Residuation theory gener- the slot r. By convention, u ≥ l, l(a,r) = u(a,r) = alizes the concept of inversion for mappings that do ∞ − if r 6∈ R(a), and minr∈R(a) l(a,r) = 0. not necessarily admit an inversion, in particular those The dynamics of heap models is described by row among ordered sets. If f : C → D is a mapping be- vectors x(w) , w ∈ A∗, r ∈ R corresponding to the tween two dioids, in most cases there does not exist r height of the heap w = a ...a on slot r ∈ R. It has a solution to the equation f x b. Instead of so- 1 n ( ) = been shown in (Gaubert and Mairesse, 1999) that the lutions to this equation, the greatest solution to the upper contour of a heap w, denoted by x(w), and the inequality f (x)  b or the least solution to the in- overall height of the heap w, denoted y(w), are given equality b f x are considered. In the case these  ( ) by the following letter driven dynamic equations: exist for all b ∈ D, the mapping f is called residu- ated, and dually residuated, respectively. The corre- x(1) = (0...0) (2) sponding mappings that to any b ∈ D associate the x(wa) = x(w)µ(a) (3) greatest, resp. least, solutions of the corresponding y(w) = x(w)(0...0)T , (4) inequalities are called residuated, resp. dually resid- where uated mappings. In this paper only residuated map- 0, if s = r and s 6∈ R(a) pings of matrix multiplication are used. The residu- µ(a)sr =  u(a,r) − l(a,s), if r ∈ R(a) and s ∈ R(a) ated mapping of the left matrix multiplication, i.e. the  −∞, otherwise greatest solution to the inequality A ⊗ X  B, is de-  (5) noted A\◦B. Similarly, the residuated mapping of the is the morphism matrix associated to the heap model right matrix multiplication, i.e. the greatest solution H . It is shown in (Gaubert and Mairesse, 1999) that to the inequality X ⊗ A  B, is denoted B/◦A. Recall heap models are special (max,+)-automata with in- from (Gaubert, 1992) that for matrices A ∈ Dm×n,B ∈ put and output functions as row, resp. column vec- Dm×p,C ∈ Dn×p over a complete dioid D tors of identity elements, and the morphism matrix m above. The (max,+)-automaton given by the triple in- n×p ^ A\◦B ∈ D : (A\◦B)ij = Ali\◦Blj put function, output function, and the morphism ma- l=1 trix described above is then called heap automaton. p Therefore we can associate heap models with special m×n ^ B/◦C ∈ D : (B/◦C)ij = Bik/◦Cjk. (max,+)-automata called heap automata.

k=1 We assume in the definition of synchronous prod- Î

We recall the notation s∈S s for the infimal element uct below that there are no shared resources between Ä of a set S ⊆ D (recall that s∈S s is the correspond- two heap models. Otherwise stated: resources are ing supremal element of S when lattice structure of a shared only by tasks within individual heap mod- complete dioid is considered). els. This requirement is best understood if one con- siders safe timed Petri nets (which can be viewed (Gaubert and Mairesse, 1999) as particular heap mod- 3 SYNCHRONOUS els), where synchronous compositions of subnets is realized by synchronizing shared transitions (in heap COMPOSITION OF HEAP models tasks), while the set of places (in heap models MODELS resources) of the individual subnets are disjoint. Definition 3.1 (Synchronous product) Let Hi = Let us first recall the definition of time extension (Ai,Ri,ri,li,ui), i = 1,2 be two heap models with of heap models (Gaubert and Mairesse, 1999), also R1 ∩ R2 = 0/. Their synchronous product is the heap called task-resource systems, which model an impor- model tant class of TDES. Formally, a heap model is the H kH = (A ∪ A ,R ∪ R ,r,u,l) (6) structure H = (A,R,r,l,u), where 1 2 1 2 1 2 (7) • A is a finite set of pieces (also called tasks). with • R is a finite set of slots (also called resources). r1(a) ∪ r2(a), if a ∈ A1 ∩ A2 • r : A → Pwr(R) gives the subset of slots required r(a) =  r1(a), if a ∈ A1 \ A2 , 0/ by a piece. It is assumed that ∀a ∈ A : R(a) 6= .  r2(a), if a ∈ A2 \ A1 

469 ICINCO 2007 - International Conference on Informatics in Control, Automation and Robotics

Note that this 1-safe Petri net is T-timed (timing u (a,r), if r ∈ R is associated to transitions) and it can be decomposed u(a,r) = 1 1 ,  u2(a,r), if r ∈ R2 into three parts, which are synchronized using shared (synchronization) transitions a and c. Equivalently, and each component of this Petri net can be viewed as a l (a,r), if r ∈ R l(a,r) = 1 1 . separate heap model. The "global" heap model cor-  l2(a,r), if r ∈ R2 responding to the whole timed Petri net is the syn- chronous product of "local" heap models. Since the slots (resources) of component heaps are An order relation on R (A) will be needed for disjoint, l and u are well defined: even though A ∩ max 1 introduction and study of control problems in Section A 6= 0/, for any r ∈ R there is only one i ∈ {1,2}, 2 5. Let us recall the natural order relation on formal namely such that r ∈ R , with l (a,r) being defined. i i power series from R (A). For s,s′ ∈ R (A) we Similarly as in the supervisory control of (logi- max max put s  s′ iff ∀w ∈ A∗ : s(w) ≤ s(w′), where in the lat- cal) automata the purpose of synchronous product is ter inequality usual order in R that coincides with twofold. Firstly, explicitly concurrent heap models max the natural order is used. (cf. concurrent or modular automata) are heap models Similarly as a TEG admits a linear representation built by the synchronous product of "local" heap mod- in the dioid of formal power series Z (γ) (Baccelli els, whence the interest in studying the properties of max et al., 1992), a heap model admits linear representa- synchronous composition of heap models. Secondly, tion in the dioid of formal power series with noncom- synchronous product is used to describe the action of mutative variables from A: R (A). As example let the supervisor, i.e. interaction of the supervisor with max us consider the following heap automaton H . the system (cf. (Kumar and Heymann, 2000)). The set of tasks is A = {a,b,c,d}. The set of re- Note that if the above definition is used for con- sources is R = {r1,r2,r3}. Let r(a) = r(b) = {r1,r2} trol purposes, it is symmetric with respect to both the and r(c) = r(d) = {r1,r3}. The lower and upper con- plant (say H1) and the controller (say H2). We then tours are given by implicitly assume in the above definition that the su- pervisor is complete, i.e. that it never attemps to dis- l(a,.) = [0 0 − ∞], l(b,.) = [0 0 − ∞] able an uncontrollable task. This is always true if all l(c,.) = [0 − ∞ 0], l(d,.) = [0 − ∞ 0] tasks are controllable. u(a,.) = [0 1 − ∞], u(b,.) = [2 0 − ∞] Now (max,+)-linear representation (2), (3), (4) of u c 0 ∞ 3 u d 4 ∞ 0 heap models will be used in study of the morphism ( ,.) = [ − ], ( ,.) = [ − ] matrix of the synchronous product of two heap mod- It has been shown in (Gaubert and Mairesse, 1999) els. An approach for just in time control of flex- that any heap model is a special (max,+)-automaton ible manufacturing systems based on Petri net and with the morphism matrix defined in equation (5). heap models, that builds upon the approach of (Men- The graphical interpretation of the morphism matrix guy, 1997), has been developped in (Al Saba et al., is given in terms of transition weights: µ(a)ij = k 2006). Our aim is to develop the control theory di- means that there is a transition labelled by a ∈ A from rectly for heap models using synchronous composi- state i to state j with weight k provided k 6= −∞, tion of a heap model with its controller (another heap in case k = −∞ there is no transition from i to j. model). Note that the morphism matrix µ of a heap model |R|×|R| Let us consider the following flexible manufactur- can be also considered as element of Rmax(A) , ing system modelled by Petri net in Figure 1. i.e. µ = ⊕w∈A∗ µ(w)w by extending the definition of µ from a ∈ A to w ∈ A∗ using the morphism property

µ(a1 ...an) = µ(a1)...µ(an). However µ has an important property of being finitely generated, because it is completely determined by its values on A. For this reason we have in fact µ∗ = ∗ (⊕a∈Aµ(a)a) . Since we are interested in behaviors of heap models that are given in terms of µ∗ we abuse the notation and write simply µ = ⊕a∈Aµ(a)a. The corresponding heap automaton is in Figure 2 below. The state vector is associated to resources Figure 1: The Petri net model of a flexible manufacturing system. of H variables (formal power series) x2,x1,x3 ∈ Rmax(A) from left to right. We obtain the following

470 SUPERVISORY CONTROL OF HEAP MODELS USING SYNCHRONOUS COMPOSITION

of resources) of the synchronous product of subsys- tems is the sum of dimensions of each subsystem. It should be intuitively clear that morphism matrices of synchronous products are block matrices, where the blocks are formed according to dimensions (number of resources) of the component heap models. In order to simplify the approach we require that Figure 2: Example of a heap automaton. l(a,r) = 0 whenever r ∈ R(a), which simply means that pieces are on the ground in all slots. Thus, the upper contour gives information about the duration of equations in dioid Rmax(A) endowed with pointwise tasks for different resources used. We recall at this addition and convolution multiplication: point that l(a,r) = −∞ for r 6∈ R(a). Let H1 and H2 be two heap models with mor- x = x ⊗ (0a ⊕ 2b ⊕ 0c ⊕ 4d) ⊕ x ⊗ (0a ⊕ 2b) 1 1 2 phism matrices denoted by µ1 and µ2, respectively. ⊕ x3 ⊗ (0c ⊕ 4d) ⊕ e Let εij, i, j = 1,2 be the rectangular matrices of ze- ∞ x2 = x1 ⊗ (1a ⊕ 0b) ⊕ x2 ⊗ (1a ⊕ 0b ⊕ 0c ⊕ 0d) ⊕ e ros (− ) of dimensions mi × m j and Ei, i = 1,2 the square (max,+)-identity matrices of dimensions mi × x3 = x1 ⊗ (3c ⊕ 0d) ⊕ x3 ⊗ (0a ⊕ 0b ⊕ 3c ⊕ 0d) ⊕ e mi. We have the following block form of µH (a), a ∈ y = x1 ⊕ x2 ⊕ x3. A.

The corresponding matrix form is Theorem 4.1 The morphism matrix of H = H1kH2 admits the following decomposition:

x = xµ ⊕ α • If a ∈ A1 ∩ A2 then: y = xβ, µ1(a) µ2(a) α β T µH (a) = , where with x = (x1 x2 x3), = (e e e), = (e e e) , µ = µ1(a) µ2(a) ′ 0a ⊕ 2b ⊕ 0c ⊕ 4d 1a ⊕ 0b 3c ⊕ 0d µ (a) ′ : i ∈ r (a) arb., ifi ∈ r (a) ε µ (a) = 1 i j 1 2  0a ⊕ 2b 1a ⊕ 0b ⊕ 0c ⊕ 0d . 1 ij −∞, if i 6∈ r (a) 0c ⊕ 4d ε 0a ⊕ 0b ⊕ 3c ⊕ 0d  2   and In general we have the following linear description ′ of (max,+) automata in the dioid Rmax(A) of formal µ2(a)i′ j : i ∈ r2(a) arb., ifi ∈ r1(a) µ2(a)ij = power series:  −∞, if i 6∈ r1(a) α x = xµ ⊕ (8) • If a ∈ A1 \ A2 then : y = xβ, (9) µ1(a) ε12 Ä R µH (a) = ε where µ = a∈A µ(a)a ∈ max(A) is also called the  21 E2  morphism matrix. Recall that the least solution to this equation is y = • If a ∈ A2 \ A1 then: αµ∗β. E1 ε12 µH (a) = ε21 µ2(a)

4 MORPHISM MATRIX OF Proof For a ∈ A = A1 ∪ A2 three cases must be dis- SYNCHRONOUS PRODUCT OF tinguished. Firstly, a ∈ A1 ∩ A2 is a shared task. Then HEAP MODELS for resources r,s from R1 ∪ R2 there are four possi- bilities depending on whether these are in R1 or R2, whence the block form of µH (a). We recall here Since we introduce supervisory control of heap mod- 0/ els using the synchronous product of the plant heap that R1 ∩ R2 = . It is easy to see that in the diago- model with the controller heap model, it is impor- nal blocks the individual morphism matrices appear. tant to study properties of the synchronous product. Also, In this section the behavior of a synchronous prod- u(a, j) − l(a,i) = u1(a, j) uct of two heap models will be represented in terms  if i ∈ R2(a) and j ∈ R1(a) of morphism matrix of the synchronous product. Ac- µ1(a)ij = ∞  − cording to Definition 3.1, the dimension (here number if i 6∈ R2(a) or j 6∈ R1(a) 

471 ICINCO 2007 - International Conference on Informatics in Control, Automation and Robotics

and similarly for µ2(a). Since µ1(a)ij equals either µc, respectively. Now let us return to the description u1(a, j)(for i ∈ r2(a) and j ∈ r1(a)) or −∞ otherwise, of behaviors of heap models in the dioid of formal we can see that the rows corresponding to i ∈ r2(a) power series Rmax(A). The vector of formal power of µ1(a), i.e. µ1(a)(i,.), are the same as the rows series from Rmax(A) associated to generalized dater ′ ′ ∗ Rm×n µ1(a)(i ,.) for i ∈ r1(a), which are all the same, i.e. functions xGkC : A → max satisfies the following an arbitrary one can be taken. Thus, the correspond- equations: ing entry does not depend on j anymore. Hence, the morphism matrix of the composed heap µ (a) has H x = x µ ⊕ α, (10) the claimed form. In the much easier situation when GkC GkC GkC y x β (11) a ∈ A1 \ A2 it is sufficient to notice that no resource GkC = GkC , from R is used by a. It is easily seen that µ (a) has α 2 H where µGkC is the morphism matrix of GkC, and again the claimed form. Finally, the case a ∈ A2 \ A1 β are row, resp. column, vectors of 0’s of dimen- is symmetric. sion m + n. The structure of the morphism matrix Theorem 4.1 can be generalized to n ∈ N, where described in Theorem 4.1 is now used for control pur- morphism matrix of synchronous product are matri- poses. According to Theorem 2.1 the greatest solu- ces with n × n blocks. This is useful for decentralized tions to equations (10) and (11) are control, but in this paper we only need synchronous α ∗ xGkC = µGkC , (12) product of the system with its controller. α ∗ β We recall at this point that yGkC = µGkC , (13)

Å whence an interest in studying properties of µ∗ . µ = µ (a) ⊗ a ∈ R (A). GkC H H max Given a specification behavior (e.g. language or a∈A formal power series), the goal in supervisory control The algebraization of synchronous product pre- of DES is to find a supervisor that achieves this speci- sented in this section will be useful for control pur- fication as the behavior of the controlled system. In poses in the next section. a first approach we assume, similarly as in control of TEG, that the structure of the controller is given, which means here that the controller heap model only 5 SUPERVISORY CONTROL OF delays task executions of the plant. This is done by the choice of upper contour functions ( i.e. duration of HEAP MODELS controller’s tasks) from µc(u). The delaying effect of the controller is naturally realized via its tasks (tran- In this section supervisory control of heap models is sitions of the corresponding heap automaton) shared studied. The aim is to satisfy a behavioral specifica- with the plant heap. tion given by a formal power series. The closed-loop The morphism matrix of the composed system is

system is represented by parallel composition (syn- given by Å chronous product) of the plant with a supervisor to be Å found, which is itself represented by a heap model. µCkG = µCkG (u)u ⊕ µCkG (a)a In general a supervisor acts on both timing and u∈Ac\Ag a∈Ac∩Ag logical properties of the plant’s behavior under su- Å ⊕ µ (a)a. pervision. Since heap models are special (max,+)- CkG automata there are two aspects of supervision: dis- a∈Ag\Ac abling and delaying of tasks (events). Here we are In order to simplify the approach our attention is only interested in delaying the different tasks which from now on limited to the case Ac = Ag, which is a is similar to control of TEG in the maxplus algebra, standard assumption in the supervisory control with where input transitions are added in order to delay the complete observations. Since state vector in equa- timed behavior of a TEG. tion (8) is associated to resources, it can be written as Now we show how Theorem 4.1 can be used xCkG = (x u), where the first component corresponds for control of heap models. The synchronous prod- to the (uncontrolled) plant heap and the second to the controller heap. Owing to Theorem 4.1 we have: uct of heap models G = (Ag,Rg,rg,lg,ug) and C =

(Ac,Rc,rc,lc,uc) of dimensions m and n corresponds Å H(a)a F¯(a)a (x u) = (x u) ⊕ (α1,α2), to the controlled (closed-loop) system. The event al- H¯ (a)a F(a)a phabet of the controlled system is denoted by A. Ac- a∈A cording to Definition 3.1, we have A = Ag ∪Ac. Let us where α1 and α2 are vectors of zeros of correspond- denote the morphism matrices of G and C by µg and ing dimensions, µg(a) is for convenience denoted by

472 SUPERVISORY CONTROL OF HEAP MODELS USING SYNCHRONOUS COMPOSITION

H(a), µg(a) by H¯ (a), µc(a) by F(a), and µc(a) by as follows from Theorem 4.1, F¯ can be simply ex- F¯(a). This can be written as pressed using F. Hence, there is a hope that at least in some special cases residuation theory (see Section ¯ A F α 2) can be applied to obtain the greatest series F cor- (x u) = (x u) ¯ ⊕ , A F responding to the "controller part" of the morphism

Ä ¯ matrix µGkC such that yGkC satisfies a given specifi- where H = a∈A H(a)a and similarly for F,F, and H¯ . Hence, cation (e.g. is less than or equal to a given reference output series y ). In fact we obtain from the above x = xH ⊕ uH¯ ⊕ α re f 1 inequality the greatest FF¯ ∗ such that inequality (16) u = xF¯ ⊕ uF ⊕ α2. is satisfied. Thus it is not an easy problem. The sit- ∗ ¯ ¯ Theorem 2.1 yields u = (xF¯ ⊕ α2)F as the least uation is much simpler in case F = F and H = H. solution of the second equation, which substituted This is satisfied if we assume that the controller heap into the first equation leads to model has the same number of resources as the un- controlled heap model and the logical structure of the ¯ α ∗ ¯ α x = xH ⊕ (xF ⊕ 2)F H ⊕ 1. controller (given by rc : A → Pwr(Rc)) mimicks the   structure of the plant, formally there exists an isomor- The least solution is given by phism between Rc and Rg such that rc and rg are equal ∗ ∗ ∗ x = (α2F H¯ ⊕ α1)(H ⊕ FF¯ H¯ ) . (14) up to this isomorphism. In terms of Petri nets this can be interpreted as having a controller net with the The last equation can be viewed as the expression same net topology (i.e. logical structure as the uncon- of the closed-loop system using the feedback given trolled net), i.e. in the closed-loop system there are by F. Notice that unlike classical control theory the always parallel places of the controller corresponding control variables have their inner dynamics, which is to places of the uncontrolled net. The role of the con- caused by adopting a supervisory control approach, troller is only to act on the system through holding where a controller is itself a dynamical system of the times of the controller’s places that correct the hold- same kind as the uncontrolled system. Therefore, our ing times of the places in the original net. Because of F¯, which plays the role of feedback mapping, is de- the fixed parallel structure of the controller it is clear termined by inner dynamics of the controller given by that the controller can in this case only delay the firing its morphism matrix F. of the transitions, which are all shared by the system There is a strong analogy with the feedback ap- and the controller. proach for control of TEG, see (Cottenceau et al., It is easy to check that Theorem 4.1 in such a case 2001), which should not be surprising, because super- gives F¯ = F as well as H¯ = H and α1 = α2 = α, row visory control (realized here by synchronous product) vector of zeros of dimension n. Hence, inequality (15) is based on a feedback control architecture. In super- ∗ ∗ ∗ becomes α(F H ⊕ E)(H ⊕ FF¯ H) β ≤ yre f , where visory control the control specification (as counterpart E is the identity matrix. An easy calculation yields of reference output from control of TEG using dioid (H ⊕ FF¯ ∗H) = (E ⊕ F+)H = F∗H, hence algebras) are given in terms of behaviors of (max,+) automata (i.e. formal power series). In fact, for a ref- (F∗H ⊕ E)(F∗H)∗ = (F∗H)+ ⊕ (F∗H)∗ = (F∗H)∗. erence output y we are interested in the greatest F re f Thus, y = α(F∗H)∗β ≤ y , i.e. the problem is to find such that re f the greatest F such that y ≤ yre f , ∗ ∗ α β thus, (F H) ≤ \◦yre f/◦ . (α F∗H¯ ⊕ α )(H ⊕ FF¯ ∗H¯ )∗β ≤ y . (15) 2 1 re f Since the Kleene star is not a residuated mapping We obtain from Lemma 2.2 that in general, such a problem has only a solution if α\◦y /◦β, playing the role of reference model G (H ⊕ FF¯ ∗H¯ )∗ = H∗(FF¯ ∗HH¯ ∗)∗,i.e. re f re f from (Cottenceau et al., 2001) is of a special form to inequality (15) becomes be studied. Let us notice that H ≥ E, which follows from the form of morphism matrix and the usual as- α ∗ ¯ α ∗ ¯ ∗ ¯ ∗ ∗β ( 2F H ⊕ 1)H (FF HH ) ≤ yre f (16) sumption that any resource of the system is used by Note that while ⊗ and ⊕ are lower semicontinu- at least one task: ∀r ∈ Rg ∃a ∈ A such that r ∈ rg(A). ous and residuated, the Kleene star is not in general, The following Lemma is useful. n×n but only when the image is suitably constrained (in Lemma 5.1 If H ≥ E then for any B ∈ Rmax(A) which case it is trivially residuated with identity as every solution of (X∗H)∗ ≤ B is a solution of the corresponding residuated mapping). Moreover, H(X∗H)∗ ≤ B and vice versa.

473 ICINCO 2007 - International Conference on Informatics in Control, Automation and Robotics

Proof If X a solution of (X∗H)∗ ≤ B, then (X∗H)∗ = In fact, given a reference output series amounts to E ⊕(X∗H)+ ≤ B, hence also (X∗H)+ ≤ B. Therefore, solve a scheduling problem. A formal power series specification is not given, but it is to be found: e.g. H X∗H ∗ X∗H X∗H ∗ X∗H + B ( ) ≤ ( ) = ( ) ≤ , using Jackson rule (Jackson, 1955). where the first inequality follows from isotony of mul- tiplication and E ≤ X∗. Conversely, if X is a solu- tion of H(X∗H)∗ ≤ B, then (X∗H)∗ = E ⊗ (X∗H)∗ ≤ 6 CONCLUSION H(X∗H)∗ ≤ B as follows from isotony of multiplica- tion and the assumption that E ≤ H. It has been shown how methods of dioid algebras can Using Lemma 5.1 our problem is to find the greatest be used in supervisory control of heap models. We solution in F of have proposed a synchronous product of heap models. The structure of the morphism matrix of synchronous H(F∗H)∗ ≤ α\◦y /◦β. re f product of two heap models is derived and applied to It follows from Lemma 2.2 that control of heap models. The present reseach is a very first step in control H F∗H ∗ H F ∗ H∗ FH∗ ∗ ( ) = ( ⊕ ) = ( ) , of heap automata. Sharing of resources is only al- thus we get formally the same problem as the one lowed inside component heap models. Of potential solved in (Cottenceau et al., 2001) with H∗ playing interest is supervisory control with partial controlla- the role of transfer function H in the TEG setting. bility, partial observations, and decentralized control The following result adapted from (Cottenceau et al., of heap automata. 2001), Proposition 3, is useful: If there exists D ∈ ∗ ∗ Rmax(A) such that α\◦yre f/◦β = H D or there exists ′ ′∗ ∗ D ∈ Rmax(A) such that α\◦yre f/◦β = D H then there ∗ ∗ ∗ ACKNOWLEDGEMENTS exists the greatest F such that H (FH ) ≤ α\◦yre f/◦β, namely Partial financial support of Université d’Angers, of opt ∗ ∗ ∗ ∗ F = H \◦[α\◦yre f/◦β]/◦H = αH \◦yre f/◦H β. the Grant Agency GA AV No. KJB100190609, and of the Academy of Sciences of the Czech Republic, In the special case we have restricted attention to, our Institutional Research Plan No. AV0Z10190503 is methods yields the gretest feedback such that timing gratefully acknowledged. specification given by yre f is satisfied, provided yre f is of one of the special forms. In the special case of a controller with fixed logical structure only timed be- havior is under control. REFERENCES If we are interested in manufacturing systems, where specificatons are given in terms of Petri nets, M. Al Saba, J.L. Boimond, and S. Lahaye. On just in time the reference output is not typically required to be met control of flexible manufacturing systems via dioid algebra. Proceedings of INCOM’06, Saint-Etienne, for all sequences of tasks, but only those having a real France, vol.2, pp. 137-142, 2006. interpretation. These are given by the correponding F. Baccelli, G. Cohen, G.J. Olsder and J.P.Quadrat (1992). (logical) Petri net language, say L. Thus, the problem Synchronization and linearity. An algebra for discrete is to find the greatest F, such that event systems. New York, Wiley. ∗ ∗ ∗ αH (FH ) β char(L) ≤ yre f char(L), B. Cottenceau, L. Hardouin, J.L. Boimond, and J.L. Ferrier.

Ä Model Reference Control for Timed Event Graphs in where char(L) = w∈L e.w is the series with Boolean Dioid, Automatica, vol. 37, pp. 1451-1458, 2001. coefficients, i.e. the formal series of language L. Let S. Gaubert. Théorie des systèmes linéaires dans les dioïdes. us recall (Gaubert and Mairesse, 1999) that such a Thèse de doctorat, Ecole des Mines de Paris, 1992. restricton is formally realized by the tensor product S. Gaubert. Performance evaluation of (max,+) automata, (residuable operation) of the heap automaton with the IEEE Trans. on Automatic Control, 40(12), pp. 2014- logical (marking) automaton recognizing the Petri net 2025, 1995. language L, which is compatible with Theorem 4.1 of S. Gaubert and J. Mairesse. Task resource models and (Komenda et al., 2007). (max,+) automata, In J. Gunawardena, Editor: Idem- Note that specifications based on (multivariable) potency. Cambridge University Press, 1997. formal power series are not easy to obtain in many S. Gaubert and J. Mairesse. Modeling and analysis of timed practical problems, in particular those coming from Petri nets using heaps of pieces. IEEE Trans. on Au- production systems, often represented by Petri nets. tomatic Control, 44(4): 683-698, 1999.

474 SUPERVISORY CONTROL OF HEAP MODELS USING SYNCHRONOUS COMPOSITION

J.R. Jackson. Scheduling a Production Line to Minimize Maximum Tardiness. Research report 43. University of California Los Angeles. Management Science Re- search Project. J.Komenda, M.Al Saba, and J.L. Boimond. Supervisory Control of Maxplus Automata: Quantitative Aspects. In Proceedings ECC 2007, Kos (Greece). R. Kumar, M. Heymann. Masked prioritized synchroniza- tion for interaction and control of discrete-event sys- tems, IEEE Transaction Automatic Control 45, 1970- 1982, 2000. F. Lin and W.M. Wonham, On Observability of Discrete- Event Systems, Information Sciences, 44: 173-198, 1 E. Menguy. Contribution à la commande des systèmes linaires dans les diodes. Thèse de doctorat, Université d’Angers, 1997. P.J. Ramadge and W.M. Wonham. The Control of Discrete- Event Systems. Proc. IEEE, 77:81-98, 1989. J. Sifakis and S. Yovine. Compositional specification of timed systems. Proceedings of the 13th Symp. on The- oretical Aspects of Computer Science, STACS’96, pp. 347-359, 1996. LNCS 1046.

475