Modeling and Control for Balanced Timed and Weighted Event Graphs in Dioids Bertrand Cottenceau, Laurent Hardouin, Jean-Louis Boimond
To cite this version: Bertrand Cottenceau, Laurent Hardouin, Jean-Louis Boimond. Modeling and Control for Balanced Timed and Weighted Event Graphs in Dioids. Soumis a` IEEE Transactions on Automatic Control. 2012, pp.x-x.
HAL Id: hal-00846179 https://hal.archives-ouvertes.fr/hal-00846179 Submitted on 27 Aug 2013
HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.
L’archive ouverte pluridisciplinaire HAL, est destin´ee au d´epˆot et `a la diffusion de documents scientifiques de niveau recherche, publi´es ou non, ´emanant des ´etablissements d’enseignement et de recherche fran¸cais ou ´etrangers, des laboratoires publics ou priv´es.
1
Modeling and Control for Balanced Timed and Weighted Event Graphs in Dioids Bertrand Cottenceau, Laurent Hardouin, Jean-Louis Boimond
Abstract The class of Timed Event Graphs (TEGs) has widely been studied for the last 30 years thanks to an algebraic approach known as the theory of Max-Plus linear systems. In particular, the modeling of TEGs via formal power series has led to input-output descriptions for which some model matching control problems have been solved. In the context of manufacturing applications, the controllers obtained by these approaches have the effect of regulating material flows in order to decrease internal congestions and intermediate stocks. The objective of this work is to extend the class of systems for which a similar control synthesis is possible. To this end, we define first a subclass of timed Petri nets that we call Balanced Timed and Weighted Event Graphs (B-TWEGs). B-TWEGs can model synchronisation and delays (B-TWEGs contains TEGs) and can also describe some dynamic phenomena such as batching and event duplications. Their behavior is described by some rational compositions of four elementary operators γ n , δ t , µm and βb on a dioid of formal power series. Then, we show that the series associated to B-TWEGs have a three dimensional graphical representation with a property of ultimate periodicity. This modeling allows us to show that B-TWEGs can be handled thanks to finite and canonical forms. Therefore, the existing results on control synthesis, in particular the model matching control problem, have a natural application in that framework.
Index Terms Discrete-Event Systems, Timed and Weighted Event Graphs, Dioids, Formal Power Series, Residuation, Three Dimensional Representation, Controller Synthesis.
LUNAM Universit´e, LISA, Angers, 62 Avenue Notre-Dame du Lac, 49000, France. Corresponding author B. Cottenceau. Tel. +33 (0)2.41.22.65.36. Fax +33 (0)2.41.22.65.61. E-mail
[email protected].
July 17, 2012
DRAFT
2
I. I NTRODUCTION Since the beginning of the 80s, it has been known that the class of Timed Event Graphs (TEGs) can be studied thanks to linear models in some specific algebraic structures called dioids (or idempotent semirings) [22][5][1][9] [16]. Among different representations, a specific approach lies on an operatorial description of such systems. By denoting Σ the semimodule of counter functions1 , one can describe the behavior of a TEG by combining two shift operators (see [5]) denoted respectively γ, δ : Σ → Σ γ : (γx)(t) = x(t) + 1 δ : (δx)(t) = x(t − 1) The input-output behavior of a TEG is then described by a matrix the entries of which are some elements of the rational closure2 of the set {ε, e, γ, δ}, i.e. the transfer matrix of a TEG can be written with a finite composition of these operators. Moreover, due to some fundamental 0
0
0
0
equivalences such as γ n ⊕ γ n = γ min(n,n ) and δ t ⊕ δ t = δ max(t,t ) , a rational expression has a canonical form which is ultimately periodic [9][18][10]. In other words, we can manipulate TEG transfer as periodic formal series in two variables γ and δ, with some simplification rules, within a dioid called Max in Jγ, δK [5][1]. On the one hand, this fact has made it possible to
elaborate software tools to compute the transfer matrix of any TEG [13] [8]. On the other hand, such an input-output model is well suited to address some model matching control problems [7] [20] [17] [15]. By analogy with the classical control theory, controllers are computed in order to achieve, for the closed-loop system, some prescribed performances. In a manufacturing production context, the controller describes how to manage the input of raw parts into the production line in order to achieve some performance. The controllers obtained by this approach lead to improve the internal flows of products by decreasing internal stocks. The main objective of this work is to study a class of systems greater than those described by TEGs, but with similar algebraic tools. We focus here on the class of Timed and Weighted Event Graphs (TWEGs). They correspond to TEGs the arcs of which are valued by some positive integers. The arcs valuations express how many tokens the firing events consume/produce in the graph. The modeling power is greatly increased by the introduction of these valuations since in 1
A counter function x : Z → Z, t 7→ x(t) gives the cumulative number of occurrences of the events labeled x at date t. Such
a function plays the role of signal. 2
Where ε (resp. e) is the null (resp. neutral) operator.
July 17, 2012
DRAFT
3
addition to synchronisations and delays, TWEGs can also describe batch constitution (several successive input events are necessary to release one output event) and duplication (one input event instantaneously produces several output events). These situations are usual in manufacturing systems (lot making, batch splitting) and cannot be accurately modeled with ordinary TEGs. In literature, TWEGs have been studied both as a modeling tool for manufacturing systems and as a model for computation in the field of concurrent applications. In both domain, TWEGs can describe the scheduling of tasks with precedence constraints and also parallel executions. The analysis and the optimization problems associated to TWEGs aim at checking or enforcing the liveness (can an event be executed an infinite number of times in the model), and also at evaluating the throughput (number of events/unit of time) of the system, in particular for cyclic scheduling (see [21] [2]). When applied to concurrent programming, real-time and embedded systems, an equivalent graphical model called Synchronous Data-Flow (SDF) is generally used (see [19][24][11]). In order to adapt the control problems described in [7] and [20] to the context of TWEGs, an input-output representation (transfer function) is necessary. The model proposed here seems to be well adapted to that aim. Our work is in the spirit of [4] where a class of Fluid TWEGs is analyzed thanks to a dioid of formal power series. The authors introduce a multiplier operator denoted µ that models the effect of the graph valuations. They thus obtain a necessary and sufficient condition under which a Fluid TWEG can be reduced to a Fluid TEG. This gives a way to ”linearize” some TWEGs. This work has been extended in several papers, for instance in [14] where some hybrid Fluid/Discrete TWEGs are considered. In the context of SDF modeling, the studies developed in [11] and [12] are very close to that approach too. We focus here on the discrete functioning of TWEGs. As in [5] and [4], one uses the classical shift operators γ n and δ t to describe event-shift and time-shift, but we also introduce two additional ones denoted βb and µm that represent respectively a batch operation (which is modeled by an integer division3 on a counter variable) and a duplication phenomenon (multiplier operator), ∀x ∈ Σ βb : (βb x)(t) = bx(t)/bc µm : (µm x)(t) = x(t) × m. 3
bxc denotes the greatest integer less than or equal to x.
July 17, 2012
DRAFT
4
The behavior of a TWEG denoted G can be described by a rational expression on the set of operators OM,B = {ε, e, γ, δ, µ2 , µ3 , ..., µM , β2 , ..., βB }, where M is the maximal multiplier value and B the maximal batch value of G. But, it is not clear whether, for the general case, there exists a canonical form for a rational expression on OM,B : the formal computation of the behavior of a TWEG does not necessarily lead to a unique expression. In particular, the non unitary TWEGs seem to be difficult to handle. We show that for a subclass of TWEGs that we call Balanced Timed and Weighted Event Graphs (B-TWEGs), the rational expressions generated have a canonical periodic form. The class of B-TWEGs corresponds to TWEGs such that parallel paths have the same gain4 . For these systems, the transfer relation can be expressed, on a dioid of series denoted EJδK, by an ultimately periodic power series in one variable δ with coefficients in a dioid E of event operators5 . The construction of EJδK is done so as to include dioid Max in Jγ, δK [5] [1]. The main feature is that the graphical representation of series in EJδK is three-dimensional : two dimensions to describe event operators in E and a third dimension for time shift operators. As in Max in Jγ, δK,
the graphical representation of series in EJδK helps us to understand the simplification rules
on operators generated by B-TWEGs. Since the input-output behavior of a B-TWEG can be described by a periodic formal series, the existing results on control synthesis can be directly applied. It is only necessary to express the residuation of the product by the elementary operators. The paper is organised as follows. In section 2, the subclass of Balanced Timed and Weighted Event Graphs is first defined. Then, the modeling via an operatorial description is presented. Section 3 is devoted to define the dioid of formal series denoted EJδK and to associate a 3D graphical representation. In section 4, the result concerning the periodicity of B-TWEGs’ transfer series is stated. Eventually, the question of control synthesis is addressed in section 5 after some reminders on the residuation theory and its application to dioid EJδK. II. BALANCED T IMED AND W EIGHTED E VENT G RAPHS (B-TWEG S ) A. Definitions Weighted Event Graphs (WEGs) constitute a subclass of generalized Petri Nets given by a set of places P = {p1 , ..., pm } and a set of transitions T = {t1 , ..., tn } (see [23] for a survey on 4
Thus, we also reduce the problems of liveness.
5
Operators that act only on the event numbering
July 17, 2012
DRAFT
5
Petri nets). An event graph cannot describe concurrency phenomenon, then every place pk ∈ P is defined between an input transition ti and an output transition to . The arcs ti → pk and pk → to are oriented and valued6 by strictly positive integers denoted respectively wi (pk ) and wo (pk ). A transition without input (resp. output) place is called a source or input (resp. sink or output) transition. An initial marking (a set of initial tokens depicted with black dots) denoted M0 (pk ) is associated to each place pk ∈ P . A given transition tj is said enabled as soon as each input place pl contains at least wo (pl ) tokens. A transition can be fired only if it is enabled. At each firing of a transition, wo (pl ) tokens are removed from each input place pl , and wi (pk ) tokens are added to each output place pk . Example 1: For the WEG depicted on Fig. 1, t1 (resp. t3 ) is an input (resp. output) transition. The initial marking is given by M0 (p1 ) = 1 and M0 (p2 ) = 2. All arcs are assumed to be 1-valued except when mentioned, for instance wi (p1 ) = 2 and wo (p1 ) = 3. Transition t3 is enabled when place p1 has 3 tokens and place p2 has two tokens. The firing of transition t1 adds 2 tokens in place p1 .
Figure 1.
Weighted Event Graph
Definition 1 (Gain of a path): The gain of an elementary (oriented) path ti → pk → to is defined as Γ(ti , pk , to ) , wi (pk )/wo (pk ) ∈ Q. For a general path π passing through places pi , Q the gain corresponds to the product of elementary paths, i.e. Γ(π) = pj ∈π wi (pj )/wo (pj ). Definition 2 (Neutral and Balanced WEG): A WEG is said neutral if all its circuits have a gain of 1. A WEG is said balanced if ∀ti , tj ∈ T , all the paths from ti to tj have the same gain. 6
From a graphical point of view, the valuations are depicted directly on the arcs
July 17, 2012
DRAFT
6
Remark 1: A balanced WEG is necessarily neutral. In [21], a WEG which is neutral and strongly connected is said unitary. It is important to note that the strongly connectedness is not required for the class of Balanced WEG. For a WEG, a holding time denoted ∆(pk ) ∈ N can be associated to each place pk ∈ P . Each token entering in a place pk has to wait ∆(pk ) time units before contributing to enable the output transition. A WEG with holding times is called a Timed and Weighted Event Graph (TWEG). Hereafter, we will only consider Balanced Timed and Weighted Event Graphs (in short B-TWEGs). Example 2: For the TWEG depicted on Fig. 2, holding times are attached to some places: ∆(p1 ) = 2, ∆(p6 ) = 1, ∆(p4 ) = 1 and ∆(p5 ) = 2. This is a Balanced TWEG since it is neutral and all the parallel paths from t1 to t4 have the same gain equal to 3/2. For instance, Γ(t1 , p1 , t2 ) = 1/2 and Γ(t1 , p2 , t3 ) = 3. Remark 2 (Ordinary TEG): If all the existing arcs are 1-valued, the TWEG is said Ordinary, or simply Timed Event Graph (TEG). A TEG is obviously a Balanced TWEG.
Figure 2.
Balanced Timed and Weighted Event Graph
Definition 3 (Earliest Functioning): The earliest functioning of a B-TWEG consists in firing transitions7 as soon as they are enabled. 7
Except source transitions.
July 17, 2012
DRAFT
7
B. Operatorial representation of B-TWEGs A dioid (or idempotent semiring) is an algebraic structure with two inner operations, a sum and a product. The sum is commutative, associative and idempotent (a ⊕ a = a) and the product is associative and distributes over the sum. The neutral elements of these operations are usually denoted ε for the sum, and e for the product. Since the sum is idempotent, a natural order can be associated to a dioid as a b ⇐⇒ a = a ⊕ b. When the sum of any finite or infinite subset of a dioid is defined, and the product distributes over infinite sums, the dioid is said complete. A complete dioid is an ordered set with a complete lattice structure : the inf operator is defined L as a ∧ b = {x|x ⊕ a = a and x ⊕ b = b}. The operatorial representation of TWEGs requires to associate a counter function xi : Z → Z ∪ +∞ to each transition ti . The set of counter functions denoted Σ has a semimodule structure for the internal operation ⊕ = min and for the scalar operation defined by λ.x(t) = x(t) + λ. An operator is a map H : Σ → Σ which is said linear if ∀x, y ∈ Σ, a) H(x ⊕ y) = H(x) ⊕ H(y) and b) H(λ.x) = λ.H(x). An operator is said additive if only a) is satisfied. Definition 4 (Dioid O of additive operators [22]): The set of additive operators on Σ, with the operations defined below, is a non commutative complete dioid denoted O : ∀H1 , H2 ∈ O H1 ⊕ H2 , ∀x ∈ Σ, (H1 ⊕ H2 )(x) = min(H1 (x), H2 (x)) H1 ◦ H2 , ∀x ∈ Σ, (H1 ◦ H2 )(x) = H1 (H2 (x)) The null operator (neutral for ⊕ and absorbing for ◦) is denoted ε : ∀x ∈ Σ, (εx)(t) = +∞ and the unit operator (neutral for ◦) is denoted e : ∀x ∈ Σ, (ex)(t) = x(t). For the sequel, we will simply denote by Hx (instead of H(x)) the image of the counter x ∈ Σ by the additive operator H ∈ O. And we will also often omit the ◦ symbol for the product of O, H1 H2 = H1 ◦ H2 . Two additive operators H1 , H2 ∈ O are equal if ∀x ∈ Σ, H1 x = H2 x. Definition 5 (Operators for B-TWEGs): The operators found in B-TWEGs are generated from a family of additive operators in O defined by : let x ∈ Σ be a counter, τ ∈ Z, δ τ : ∀x, (δ τ x)(t) = x(t − τ ) ν ∈ Z, γ ν : ∀x, (γ ν x)(t) = x(t) + ν b ∈ N∗ , βb : ∀x, (βb x)(t) = bx(t)/bc m ∈ N∗ , µm : ∀x, (µm x)(t) = x(t) × m. July 17, 2012
DRAFT
8
On the basis of these operators, we can remark that the unit operator e has several equivalent expressions : e = γ 0 = δ 0 = µ1 = β1 . Hereafter, operators γ ν , βb and µm (and their ⊕ and ◦ compositions) are considered as event operators (in short E-operators). Proposition 1: The next formal equivalences can be stated 0
0
0
0
γ n γ n = γ n+n δ t δ t = δ t+t 0
0
0
(1) 0
γ n ⊕ γ n = γ min(n,n ) δ t ⊕ δ t = δ max(t,t )
(2)
γ 1 δ 1 = δ 1 γ 1 µm δ 1 = δ 1 µm βb δ 1 = δ 1 βb
(3)
µm γ n = γ m×n µm γ n βb = βb γ n×b
(4)
Proof: For all counter x ∈ Σ we have (1) : ∀t, (x(t) + n0 ) + n = x(t) + (n0 + n) and x(τ −t−t0 ) = x(τ −(t+t0 )). (2) : ∀t, min(x(t)+n, x(t)+n0 ) = x(t)+min(n, n0 ). Since ∀t, x(t) ≥ x(t − 1) (x is monotone non-decreasing), then min(x(τ − t), x(τ − t0 ) = x(τ − max(t, t0 )). (3) c. : immediate (4): m × (x(t) + n) = m × x(t) + m × n and bx(t)/bc + n = b x(t)+n×b b Remark 3: We can note that equalities (2) are those expressed by the simplification rules in Max in Jγ, δK.
Definition 6 (Kleene star): The Kleene star of an operator in O is defined by : ∀H ∈ O, M Hi = e ⊕ H ⊕ H2 ⊕ ... H∗ = i∈N n
with H = H ◦ ... ◦ H (n times). Theorem 1: On a complete dioid D, the implicit equation x = ax ⊕ b has x = a∗ b as least solution. Proof: see [1] Theorem 2: For all operator H ∈ O, the next equalities are satisfied H = H(δ −1 )∗ = (δ −1 )∗ H = (γ 1 )∗ H = H(γ 1 )∗ . Proof: Since a counter function x is monotone, then ∀t, x(t + 1) ≥ x(t) ⇐⇒ δ −1 x x. For the same reason, ∀t, x(t) + 1 ≥ x(t)
⇐⇒
γx x. Therefore, ∀x ∈ Σ, ∀H ∈ O,
H(γ 1 )∗ x = Hx = (γ 1 )∗ Hx = H(δ −1 )∗ x = (δ −1 )∗ Hx. C. Modeling of B-TWEGs The B-TWEGs are analysed here with the earliest functioning rule (see Def. 3). We can model a path of a B-TWEG by a product of operators in O, the synchronization of parallel paths by a July 17, 2012
DRAFT
9
sum ⊕ of operators, and the circuits by the Kleene star of some operators. Each elementary path ti → pk → tj of a B-TWEG, where M0 (pk ) is the initial marking of place pk and τ = ∆(pk ) its holding time, can be described by the relation xj = βw(pk ,tj ) γ M0 (pk ) µw(ti ,pk ) δ τ xi ,
(5)
where xi (resp. xj ) is the counter function associated to transition ti (resp. tj ). Example 3 (B-TWEG of Fig. 1): We can link the counter functions xi associated to the transitions ti of the B-TWEG depicted in Fig. 1 as follows. For the earliest functioning, we have x3 (t) = min(b 2×x13(t)+1 c, b x2 (t)+2 c) 2 = min(b 2×x13(t)+1 c, b x22(t) c + 1) Therefore, the counter functions are linked by x3 = β3 γ 1 µ2 δ 0 x1 ⊕ β2 γ 2 δ 0 x2 = β3 γ 1 µ2 δ 0 x1 ⊕ γ 1 β2 δ 0 x2 with β3 γ 1 µ2 δ 0 , γ 1 β2 δ 0 ∈ O. Example 4 (B-TWEG of Fig. 2): For the B-TWEG depicted in Fig. 2 and for the earliest functioning, we have c, x2 (t − 2) + 1) x2 (t) = min(b x1 (t−2) 2 x3 (t) = min(x1 (t) × 3, x3 (t − 1) + 2) Therefore, the counter functions are linked by x2 = β2 δ 2 x1 ⊕ γ 1 δ 2 x2 and thanks to Th. 1, x2 = (γ 1 δ 2 )∗ β2 δ 2 x1 . Similarly, x3 = (γ 2 δ 1 )∗ µ3 x1 . Finally, the counter function associated to the output transition is x4 = µ3 x2 ⊕ β2 γ 1 δ 1 x3 = (µ3 (γ 1 δ 2 )∗ β2 δ 2 ⊕ β2 γ 1 δ 1 (γ 2 δ 1 )∗ µ3 )x1 . The inputoutput behavior (or transfer function) of the B-TWEG is described by the rational expression µ3 (γ 1 δ 2 )∗ β2 δ 2 ⊕ β2 γ 1 δ 1 (γ 2 δ 1 )∗ µ3 in O. Theorem 3 (Transfer matrix of a B-TWEG): The behavior of a B-TWEG is described by a matrix the elements of which belong to the rational closure of the set of operators OM,B = {ε, e, γ 1 , δ 1 , µ2 , ..., µM , β2 , ..., βB } where B = maxi wo (pi ) and M = maxi wi (pi ) with pi ∈ P . Proof: For each place pk we associate an operator µm γ n βb δ t (see (5)). Then, the different graph compositions (parallel, serial, loop) are expressed by operations in {⊕, ◦, ∗}. Since a B-TWEG is a finite graph, the rationality is straightforward.
July 17, 2012
DRAFT
10
III. T HREE DIMENSIONAL REPRESENTATION OF OPERATORS According to (3) in Prop. 1, operator δ 1 can commute with any simple or composed event operator. For instance, δ 1 γ 1 δ 2 µ3 β2 δ 1 = γ 1 µ3 β2 δ 4 = δ 4 γ 1 µ3 β2 . Hence, in every finite composition (product) of elementary operators in {δ t , γ n , µm , βb }, we can factorize the time-shift operator. Therefore, the rational expressions on OM,B can be considered as formal power series in one variable δ where coefficients are some event operators. Moreover, in the particular case of BTWEGs, the generated event operators have a canonical form. A. Bi-dimensional representation of E-operators 1) Event operators: The set of operators generated by sum and composition of operators in γ n , µm and βb has a dioid structure. Definition 7 (Dioid of E-operators E): We denote by E the dioid of operators obtained by sums and compositions of operators in {ε, e, γ n , µm , βb }, with n ∈ Z, and m, b ∈ N∗ . The elements of E are called E-operators hereafter. Dioid E is a complete subdioid of O (additive operators). Since the ◦ operation is not commutative on E, checking the equality of two E-operators is not immediate. Nevertheless, the comparison of E-operators is possible thanks to an associate map called operator function. Since an E-operator w ∈ E induces modifications only on the event numbering (no time shift), we can describe its behavior by the means of a counter-to-counter function denoted Fw : Z → Z, ki 7→ ko which maps an input counter value to an output counter value. For an E-operator, this input-output relation does not depend on time. An E-operator can be considered as an instantaneous system. For instance, the γ 2 E-operator is described by Fγ 2 (ki ) = ki +2. This function can be interpreted as follows : for the γ 2 E-operator, if ki input events have occurred at date t, then ki + 2 output events have occurred at this date. Similarly, E-operator µ2 β3 γ 1 is described by the function Fµ2 β3 γ 1 (ki ) = b(ki + 1)/3c × 2 (see Fig. 3). Function Fw gives an unambiguous representation of E-operator w. Moreover, we have Fw1 ⊕w2 = min(Fw1 , Fw2 ) and Fw1 ◦w2 = Fw1 ◦ Fw2 . On the graphical representation, the axis are labeled by I-Count (Input Count) and O-Count (Output Count). The equality of E-operators can be checked thanks to the operator function : w1 , w2 ∈ E, w1 = w2 ⇐⇒ Fw1 = Fw2 . For instance, we can graphically check (see Fig. 4) the equality µ3 β2 γ 1 ⊕ γ 2 µ3 β2 = β2 γ 1 µ3 , even if Prop. 1 does not give all the formal equalities necessary to transform July 17, 2012
DRAFT
11
Figure 3.
Representation of Fµ2 β3 γ 1 and Fγ 2 β3 µ4
the left hand part into the right hand part of the equality. In the right side of Fig. 4, we have depicted Fβ2 γ 1 µ3 with grey dots, and on the left side, Fµ3 β2 γ 1 is depicted with black dots and Fγ 2 µ3 β2 with white dots.
Figure 4.
Representation of Fµ3 β2 γ 1 ⊕γ 2 µ3 β2 = Fβ2 γ 1 µ3
2) Graphical considerations: The operator function leads to a natural bi-dimensional graphical representation of E-operators. Some features have to be kept in mind. Partial order on E : the comparison of two E-operators is graphically interpreted as follows w1 w2
⇐⇒ w1 ⊕ w2 = w2 ⇐⇒ min(Fw1 , Fw2 ) = Fw2 ⇐⇒ epigraph(Fw1 ) ⊂ epigraph(Fw2 )
Graphically, the sum of two E-operators amounts to do the union of their epigraphs8 . On Fig. 3 and Fig. 4 the epigraph corresponds to the gray zone.
8
epigraph(Fw1 ) , (ki , k) ∈ Z2 s.t. k ≥ Fw1 (ki ).
July 17, 2012
DRAFT
12
Left and right product by γ n : For w ∈ E, Fγ n w ⇐⇒ Fw vertically shifted of n units to the top Fwγ n0 ⇐⇒ Fw horizontally shifted of n’ units to the left . This last feature must be kept in mind when we consider ultimately periodic series that have a 3-D representation. 3) Periodic E-operators: The elementary E-operators γ n , µm , βb are described by periodic9 operator functions, i.e. the associate operator function satisfies ∀ki ∈ Z, F(ki + n) = F(ki ) + n0 . For E-operators γ n , µm and βb we obtain Fγ n (0) = n, Fγ n (ki + 1) = Fγ n (ki ) + 1 Fµm (0) = 0, Fµm (ki + 1) = Fµm (ki ) + m 0 ≤ ki < b, Fβb (ki ) = 0, Fβb (ki + b) = Fβb (ki ) + 1 Operators γ n and µm are 1-periodic, and operator βb is b-periodic. The set of periodic E-operators is denoted Eper . Definition 8 (Gain of w ∈ Eper ): Let w ∈ Eper be a k-periodic E-operator s.t. Fw (ki + k) = Fw (ki ) + k 0 . The gain10 of w is defined as Γ(w) = k 0 /k. It is the average slope of Fw . Proposition 2: Let w1 , w2 ∈ Eper be two periodic E-operators. We have w1 w2 ∈ Eper and Γ(w1 w2 ) = Γ(w1 ) × Γ(w2 )
(6)
if Γ(w1 ) = Γ(w2 ) then w1 ⊕ w2 ∈ Eper
(7)
if Γ(w1 ) = Γ(w2 ) then w1 ∧ w2 ∈ Eper
(8)
Proof: The periodic operator functions satisfy Fw1 (ki + k1 ) = Fw1 (ki ) + k10 and Fw2 (ki + k2 ) = Fw2 (ki ) + k20 . Hence, Fw2 (ki + k1 .k2 ) = Fw2 (ki ) + k1 .k20 and Fw1 (Fw2 (ki + k1 .k2 )) = Fw1 (Fw2 (ki )+k1 .k20 ) = Fw1 (Fw2 (ki ))+k10 .k20 = Fw1 w2 (ki )+k10 .k20 . Therefore, operator w1 w2 is a periodic operator the gain of which is (k10 .k20 )/(k1 .k2 ). For the sum of periodic operators with the same gain, we can write both operators with the same periodicity: Fw1 (ki + k1 .k2 ) = Fw1 (ki ) + k10 .k2 and Fw2 (ki + k1 .k2 ) = Fw2 (ki ) + k20 .k1 with k10 .k2 = k1 .k20 (since both operators have the 9
More exactly, they are only quasi periodic
10
A path of a B-TWEG the gain of which is g is described by an E-operator the gain of which is g too.
July 17, 2012
DRAFT
13
same gain). Hence, the min of these two operator functions is also periodic. By symmetry, the max (∧) of two periodic E-operators with the same gain is also periodic. Remark 4: Due to the structural definition of the subclass of B-TWEGs (see Def. 2), the parallel paths have the same gain. The periodicity of E-operators is therefore kept by the structural compositions of Balanced TWEGs. Said differently, the E-operators generated by B-TWEGs are periodic. A k-periodic E-operator w ∈ Eper can be handled by the means of a finite representation : a pair (k, k 0 ) ∈ N2 describing the gain Γ(w) = k 0 /k and the values of Fw (i) for one period i ∈ {0, ..., k − 1}. The canonical form of a periodic function is the one for which the period is minimal. Definition 9 (Canonical form of w ∈ Eper ): A periodic E-operator w s.t. Γ(w) = k 0 /k has a canonical form which is given by w=
Li=N i=1
0
γ ni ∇m|b γ ni
with ∇m|b , µm βb , m/b = k 0 /k and N, b are minimal. For periodic operators of gain 1, we will also use the simplified notation ∇m , ∇m|m = µm βm . A periodic E-operator can be canonically decomposed on a basis of ∇m|b operators, right and left shifted by some γ n operators. Operator ∇m|b is graphically represented by a staircase function from Z to Z (see Fig. 3 for the representation of ∇2|3 γ 1 = µ2 β3 γ 1 ). As shown in the following example, the canonical form is not necessarily the most concise one. Example 5: To establish the canonical form of γ 2 β3 µ4 , we can graphically represent Fγ 2 β3 µ4 (see Fig. 3). We have, Γ(γ 2 β3 µ4 ) = 34 , Fγ 2 β3 µ4 (0) = 2, Fγ 2 β3 µ4 (1) = 3, Fγ 2 β3 µ4 (2) = 4, Fγ 2 β3 µ4 (ki + 3) = Fγ 2 β3 µ4 (ki ) +4. The operator function Fγ 2 β3 µ4 can be seen as a min combination Fγ 2 β3 µ4 = min(Fγ 2 µ4 β3 γ 2 , Fγ 3 µ4 β3 γ 1 , Fγ 4 µ4 β3 ). Hence, we have the equality γ 2 β3 µ4 = γ 2 ∇4|3 γ 2 ⊕ γ 3 ∇4|3 γ 1 ⊕ γ 4 ∇4|3 . Translated into a B-TWEG model, the previous equality means that the two B-TWEGs depicted in Fig. 5 are equivalent from an input-output point of view : the same input sequence will produce the same output sequence11 . 11
This assertion is true only for the earliest functioning.
July 17, 2012
DRAFT
14
Figure 5.
Input-output equivalence for E-operators : γ 2 β3 µ4 = γ 2 ∇4|3 γ 2 ⊕ γ 3 ∇4|3 γ 1 ⊕ γ 4 ∇4|3 .
Remark 5: We can remark that, even if the canonical form is not necessarily the most compact, sometimes the periodicity may also be reduced by ⊕ combination. For instance, we let the reader verifying that the following equality is satisfied : γµ2 β2 γ ⊕ γ 2 µ2 β2 = γ∇2 γ ⊕ γ 2 ∇2 = γ. Remark 6: If Γ(w1 ) 6= Γ(w2 ), then w1 ⊕ w2 is not necessarily a periodic operator. Said differently, Eper is not a subdioid of E. B. Dioid EJδK The previous subsection shows that E-operators generated by B-TWEGs are periodic and have a canonical form. Moreover, all the E-operators commute with the time-shift operator δ τ (see Prop. 1). Therefore, all the operators generated by a B-TWEG can be described by the means L of formal series in one variable δ denoted i wi δ ti , where coefficients wi are taken in Eper and the exponents are in Z. 1) Three Dimensional representation of operators in B-TWEGs: By analogy with [4], we can describe discrete B-TWEGs as rational combination of periodic E-operators and time-shift operators. Definition 10 (Dioid EJδK): The set of formal power series in one variable δ with exponents in Z and coefficients in the non commutative complete dioid E, with the simplification rule: ∀s ∈ EJδK, s = s(δ −1 )∗ = (δ −1 )∗ s, is a non commutative complete dioid denoted EJδK. A series s ∈ EJδK is written s =
July 17, 2012
(9) L
t∈Z
s(t)δ t
DRAFT
15
with s(t) ∈ E. For two series s1 , s2 ∈ EJδK : (s1 ⊕ s2 )(t) = s1 (t) ⊕ s2 (t) L 0 (s1 ⊗ s2 )(t) = τ +τ 0 =t s1 (τ ) ◦ s2 (τ ) Adding the simplification rule (9) to formal series in δ allows us to assimilate the variable δ in dioid EJδK to the time-shift operator δ 1 : Σ → Σ, δ 1 x(t) = x(t − 1) in dioid O. Therefore, in dioid EJδK, all the equalities given in Th. 2 are satisfied. The series of EJδK have a graphical representation which consists in describing for each t ∈ Z the value of s(t) ∈ E. The convention adopted here is to represent s in a 3D basis, where t is described along the z-axis and coefficients s(t) ∈ E are represented by their operator function in the x × y basis (more exactly, by the epigraph of the operator function). Moreover, according to Th. 2, a series is invariant by a product with (δ −1 )∗ and by (γ 1 )∗ . Therefore, if a piece of information of a series s is depicted by a point p = (x, y, z) ∈ Z3 , then all the points p0 = (x0 , y 0 , z 0 ) in the cone described by x0 ≤ x, y 0 ≥ y and z 0 ≤ z are dominated by p. This domination must be understood in the sense that the information represented by each point of the cone is yet contained in those represented by the vertex p. Therefore, the graphical representation of a series s ∈ EJδK may be seen as an infinite union of cones. We will see later on that the protruding vertices constitute the essential information that we must keep to represent a series in EJδK. From an equivalent point of view, each monomial s(t)δ t of a series s generates a volume described by s(t)δ t (δ −1 )∗ = s(t)δ t ⊕ s(t)δ t−1 ⊕ .... For this reason, the 3D representation of a series in EJδK is a volume which also looks like a flight of stairs. Example 6: The simple series (with only one term) γ 2 β3 µ4 δ 5 ∈ EJδK is depicted on Fig. 6. The graphical representation of Fγ 2 β3 µ4 (see Fig. 3) is depicted in a 3D basis at height 5 (value of the time-shit operator). In order to improve the readability of the picture, the 3D representation is truncated to the positive values, i.e. to (x, y, z) ∈ N3 . Remark 7 (Simplifications): The equivalences given in Th. 2 lead to some rules to simplify series in EJδK. In the 3D domain, two operators are equal if they have the same representation. L Said differently, by considering a series s = s(t)δ t of EJδK, if a term s(τ )δ τ is not visible in the 3D representation of s, then it means that it can be removed from s. For instance, let us consider the series α = γ 2 ∇2 δ 2 ⊕ γ 1 ∇2 γ 1 δ 5 ⊕ γ 2 δ 4 . The representation of γ 2 δ 4 is not visible since it is hidden by those of γ 1 ∇2 γ 1 δ 5 (see Fig. 7). It means that the next simplification applies July 17, 2012
DRAFT
16
Figure 6.
3D representation of γ 2 β3 µ4 δ 5
α = γ 2 ∇2 δ 2 ⊕ γ 1 ∇2 γ 1 δ 5 ⊕ γ 2 δ 4 = γ 2 ∇2 δ 2 ⊕ γ 1 ∇2 γ 1 δ 5 . Finally, the main pieces of information in a series of EJδK are those coded by the protruding vertices (depicted by some balls in the figures).
Figure 7.
Simplifications in EJδK
Due to the specific structure of B-TWEGs, we do not consider the whole set of series of EJδK but only the series the coefficients of which are periodic E-operators. This subset is denoted Eper JδK.
Definition 11 (Balanced series in Eper JδK): A series s =
L
s(t)δ t ∈ Eper JδK is said balanced
if all its coefficients s(t) ∈ Eper have the same gain. The gain of s is denoted Γ(s) and corresponds to the gain of all its coefficients. A balanced series is said conservative if Γ(s) = 1. July 17, 2012
DRAFT
17
2) Polynomials in Eper JδK: The series that can be described by finite sums
LT
i=1
s(ti )δ ti are
called polynomials. Balanced polynomials have a canonical form. According to remark 7, it consists in only keeping for each monomial wi δ ti the information that is not yet contained in monomials wj δ tj such that tj > ti . As said in remark 7, it amounts to keeping protruding vertices. Li=T Definition 12: Let us consider a balanced polynomial p = i=1 wi δ ti ∈ Eper JδK with wi ∈
Eper . The canonical form of p is such that ∀i, ti < ti+1 and ^ M M wi = {w ⊕ wj = wk } w
j>i
(10)
k≥i
Expression (10) conveys the fact that we only want to keep the essential information, i.e. coefficient wi only keeps the information not yet contained in the coefficients wj with j > i. Example 7: The canonical form is obtained thanks to a backward analysis starting from the monomial with the greatest exponent. For polynomial p = δ 2 ⊕ (∇3 γ 2 ⊕ γ 2 ∇3 )δ 4 ⊕ ∇3 γ 2 δ 7 depicted on Fig. 8, we obtain the next simplifications. The monomial ∇3 γ 2 δ 4 is not visible ( since ∇3 γ 2 δ 4 ∇3 γ 2 δ 7 ), so it can be removed from p. Then, the monomial δ 2 has a non canonical expanded form δ 2 = (γ 2 ∇3 ⊕ γ∇3 γ ⊕ ∇3 γ 2 )δ 2 . The only part of the dynamic of δ 2 which is not yet described by γ 2 ∇3 δ 4 ⊕ ∇3 γ 2 δ 7 is described by the operator γ∇3 γδ 2 . Finally, we have p = δ 2 ⊕ (∇3 γ 2 ⊕ γ 2 ∇3 )δ 4 ⊕ ∇3 γ 2 δ 7 = γ∇3 γδ 2 ⊕ γ 2 ∇3 δ 4 ⊕ ∇3 γ 2 δ 7
Figure 8.
Polynomial γ∇3 γδ 2 ⊕ γ 2 ∇3 δ 4 ⊕ ∇3 γ 2 δ 7
July 17, 2012
DRAFT
18
IV. B-TWEG S ARE DESCRIBED BY ULTIMATELY PERIODIC SERIES OF Eper JδK In this section, we show that the behavior of a B-TWEG is described by ultimately periodic and balanced series of Eper JδK. This result has to be compared to the well known result for
ordinary Timed Event Graphs : the entries of the transfer matrix of a TEG are some ultimately periodic series of Max in Jγ, δK. For TEGs, operations (and algorithms) on ultimately periodic series of Max in Jγ, δK have already been studied in [5] [1] [9] [10] [8] [13].
Since we consider B-TWEGs, only balanced series of Eper JδK are considered hereafter.
Definition 13 (Ultimately periodic series of Eper JδK): A balanced series s ∈ Eper JδK is said
ultimately periodic if it can be written as s = p ⊕ q(γ ν δ τ )∗ , where p and q are balanced polynomials such that Γ(p) = Γ(q), p=
M i=1..n
wi δ ti q =
M
Wj δ Tj ,
j=1..N
wi , Wj ∈ Eper . The property of periodicity has a natural graphical interpretation. For the 3D representation of s, the representation of q(γ ν δ τ )∗ = q ⊕ qγ ν δ τ ⊕ qγ 2ν δ 2τ ⊕ ... is a periodic staircase. The polynomial q is depicted as a group of steps that is repeated periodically (we have the same steps but shifted by τ units to the top and by ν units toward the decreasing I-count values). Example 8: Fig 9 gives the graphical description of s = γ 2 ∇3|2 δ 3 ⊕γ 4 ∇3|2 γ 1 δ 4 ⊕[(γ 6 ∇3|2 γ 1 ⊕ γ 7 ∇3|2 )δ 6 ⊕ γ 7 ∇3|2 γ 1 δ 7 ](γ 4 δ 3 )∗ . From the T-shift value equals to 6, we have the same two-steps repeated each 3 units to the top but shifted by 4 units toward the decreasing I-count values. Remark 8: The periodic form is not unique. For instance, s = p ⊕ q(γ ν δ τ )∗ and s = p ⊕ q ⊕ qγ ν δ τ (γ ν δ τ )∗ are two different ultimately periodic forms of the same series. Remark 9: Balanced polynomials in Eper JδK can always be considered as ultimately periodic
series since (γ 1 δ 0 )∗ = e.
Even if the product of EJδK is not commutative, an ultimately periodic balanced series of Eper JδK has two periodic forms.
Proposition 3 (Left/Right periodicity): An ultimately (right) periodic series s = p ⊕ q(γ ν δ τ )∗ 0
0
in Eper JδK has also an ultimately left periodic form s = p ⊕ (γ ν δ τ )∗ q 0 where q 0 is a balanced polynomial. The left (resp. right) asymptotic slope is defined as σl (s) = τ 0 /ν 0 (resp. σr (s) = τ /ν), and the next equality is satisfied Γ(s) = σr (s)/σl (s).
July 17, 2012
DRAFT
19
Figure 9.
Ultimately periodic series in Eper JδK
L Proof: Let Γ(s) = k 0 /k be the gain of s. The coefficients of polynomial q = wj δ tj L nij 0 ∇mj |bj γ nij with k 0 /k = mj /bj . Let us in their canonical form are given by wj = iγ remark that thanks to (4), ∇mj |bj γ bj = µmj βbj γ bj = µmj γ 1 βbj = γ mj µmj βbj = γ mj ∇mj |bj . More generally, ∇mj |bj γ αbj = γ αmj ∇mj |bj . Therefore, if we take B = lcm(bj ) and M = B.k 0 /k, 0 0 then ∀i, j, γ nij ∇mj |bj γ nij γ B = γ M γ nij ∇mj |bj γ nij , and consequently ∀i, wi γ B = γ M wi . Since we can develop (γ ν δ τ )∗ = (e ⊕ γ ν δ τ ⊕ ... ⊕ γ (B−1)ν δ (B−1)τ )(γ Bν δ Bτ )∗ , then q(γ ν δ τ )∗
= q(e ⊕ ... ⊕ γ (B−1)ν δ (B−1)τ )(γ Bν δ Bτ )∗ = q(γ Bν δ Bτ )∗ (e ⊕ ... ⊕ γ (B−1)ν δ (B−1)τ ) =
(γ M ν δ Bτ )∗ q(e ⊕ ... ⊕ γ (B−1)ν δ (B−1)τ )
=
(γ M ν δ Bτ )∗ q 0
Finally, σr (s) = τ /ν and σl (s) = (Bτ )/(M ν) and σr (s)/σl (s) = Γ(s) = k 0 /k. Example 9: For the series depicted on Fig. 9, a left and a right forms are given by s = γ 2 ∇3|2 δ 3 ⊕ γ 4 ∇3|2 γ 1 δ 4 ⊕ [(γ 6 ∇3|2 γ 1 ⊕ γ 7 ∇3|2 )δ 6 ⊕ γ 7 ∇3|2 γ 1 δ 7 ](γ 4 δ 3 )∗ = γ 2 ∇3|2 δ 3 ⊕ γ 4 ∇3|2 γ 1 δ 4 ⊕ (γ 6 δ 3 )∗ [(γ 6 ∇3|2 γ 1 ⊕ γ 7 ∇3|2 )δ 6 ⊕ γ 7 ∇3|2 γ 1 δ 7 ]. The left and right slopes are σl (s) = 3/6 and σr (s) = 3/4. They are respectively the asymptotic slope of the 3D representation in the y × z direction (see the plan x = 0 in Fig. 9) and in the x × z direction.
July 17, 2012
DRAFT
20
As for series in Max in Jγ, δK, the ultimately periodic series of Eper JδK have different expressions.
But, we can provide two canonical forms, left and right periodic, where the periodicity is minimal. Definition 14 (Canonical forms): An ultimately periodic series of Eper JδK has a left and a
right canonical forms for which the degree of p is minimal and the value of ν (resp. ν 0 ) is minimal. The main result concerning the class of B-TWEGs is that they structurally keep the ultimate periodicity property. To obtain this result, one has to analyze how the sum, the product and the Kleene star operations behave on ultimately periodic series in Eper JδK.
First, we recall a result given in [5, Lemma 6] and detailed in [9, Lemma 4.1.4]. This result
ax is stated in Max in Jγ, δK and is still valid in Eper JδK since Min Jγ, δK is a subdioid.
Lemma 1: For given ν, τ, ν 0 , τ 0 , α, T, α0 , T 0 some positive integers, if τ /ν > τ 0 /ν 0 then the 0
0
0
0
periodic series γ α δ T (γ ν δ τ )∗ is asymptotically greater than γ α δ T (γ ν δ τ )∗ , say ∃N : ∀n0 ≥ N, ∃n s.t. 0
0
0
0
0
γ α δ T (γ ν δ τ )n γ α δ T (γ ν δ τ )n . Proposition 4: Let us consider two ultimately right periodic series of Eper JδK denoted s1 =
p1 ⊕ q1 (γ ν1 δ τ1 )∗ and s2 = p2 ⊕ q2 (γ ν2 δ τ2 )∗ .
(a) If Γ(s1 ) = Γ(s2 ) then s1 ⊕ s2 is an ultimately periodic series of Eper JδK such that σr (s1 ⊕ s2 ) = max(σr (s1 ), σr (s2 )) σl (s1 ⊕ s2 ) = max(σl (s1 ), σl (s2 )) (b) s1 ⊗ s2 is an ultimately periodic series s.t. Γ(s1 ⊗ s2 ) = Γ(s1 ) × Γ(s2 ) σr (s1 ⊗ s2 ) = max(σr (s2 ), Γ(s2 ) × σr (s1 )) σl (s1 ⊗ s2 ) = max(σl (s1 ), σl (s2 )/Γ(s1 )) Proof: These results come from a direct adaptation of results given in [9] for periodic series in Max in Jγ, δK. We only give the main ideas.
Outline of Proof for (a) : according to Lemma 1, if (τ1 /ν1 ) > (τ2 /ν2 ), then the simple periodic
series ∇m|b γ α1 δ T1 (γ ν1 δ τ1 )∗ is asymptotically greater than ∇m|b γ α2 δ T2 (γ ν2 δ τ2 )∗ . We can choose m and b such that m/b = Γ(s1 ) = Γ(s2 ) and some integers α1 , T1 , α2 , T2 such that we obtain two approximations of q1 (γ ν1 δ τ1 )∗ and q2 (γ ν2 δ τ2 )∗ satisfying ∇m|b γ α1 δ T1 (γ ν1 δ τ1 )∗ q1 (γ ν1 δ τ1 )∗ ∇m|b γ α2 δ T2 (γ ν2 δ τ2 )∗ q2 (γ ν2 δ τ2 )∗ July 17, 2012
DRAFT
21
By applying Lemma 1, we obtain that q1 (γ ν1 δ τ1 )∗ is asymptotically greater than q2 (γ ν2 δ τ2 )∗ . Therefore, series s1 is asymptotically greater than s2 , and then s1 ⊕ s2 is asymptotically periodic with the periodicity of s1 . When (τ1 /ν1 ) = (τ2 /ν2 ), s1 ⊕ s2 is also asymptotically periodic. Outline of Proof for (b) : We can write s1 and s2 with their right and left forms : s1 ⊗ s2 = (p1 ⊕ q1 (γ ν1 δ τ1 )∗ ) 0
0
⊗(p2 ⊕ (γ ν2 δ τ2 )∗ q20 ) 0
0
= p1 p2 ⊕ p1 (γ ν2 δ τ2 )∗ q20 ⊕q1 (γ ν1 δ τ1 )∗ p2 0
0
⊕q1 (γ ν1 δ τ1 )∗ (γ ν2 δ τ2 )∗ q20 0
0
Series p1 (γ ν2 δ τ2 )∗ q20 and q1 (γ ν1 δ τ1 )∗ p2 are finite sums of periodic series, due to (a), the result is 0
0
periodic. The last term (γ ν1 δ τ1 )∗ (γ ν2 δ τ2 )∗ is also a ultimately periodic series in Max in Jγ, δK (see [9]), and therefore in EJδK too.
Let us now focus on the behavior of circuits in B-TWEGs. They are algebraically described by Kleene star operations on series of Eper JδK. L ti Proposition 5: Let p = i=N i=1 wi δ be a conservative balanced polynomial (∀i, Γ(wi ) = 1). Then, series p∗ is a conservative and ultimately periodic series of Eper JδK. Proof: The complete proof is detailed in [6].
Proposition 6: Let s = p ⊕ q(γ ν δ τ )∗ be a conservative (Γ(s) = Γ(p) = Γ(q) = 1) ultimately periodic series in Eper JδK. Then s∗ is a conservative ultimately periodic series. L Nj L ni Nj0 Tj n0i ti and q = Proof: We can write p = j γ ∇M γ δ . If we take r = i γ ∇M γ δ γ M ν δ M τ , then monomial r commutes with p and q, i.e. pr = rp and qr = rq. First, we can write (γ ν δ τ )∗ = e ⊕ γ ν δ τ ⊕ γ 2ν δ 2τ ⊕ ... ⊕ γ (M −1)ν δ (M −1)τ r∗ . Then, series s can be written s = p ⊕ q(e ⊕ γ ν δ τ ⊕ ... ⊕ γ (M −1)ν δ (M −1)τ )r∗ = p ⊕ q 0 r∗ . Moreover, r also commutes with q 0 , i.e. q 0 r = rq 0 . Since, (a ⊕ b)∗ = a∗ (ba∗ )∗ , therefore s∗ = (p ⊕ q 0 r∗ )∗ = p∗ (q 0 r∗ p∗ )∗ . Since rp = pr, then r∗ p∗ = (r ⊕ p)∗ (see [5, Lemma3 ]). Finally, one also have (ab∗ )∗ = e ⊕ a(a ⊕ b)∗ , therefore, we can write s∗ = p∗ (q 0 (r ⊕ p)∗ )∗ = p∗ (e ⊕ q 0 (q 0 ⊕ r ⊕ p)∗ ). Since (q 0 ⊕ r ⊕ p) is a conservative polynomial, then (q 0 ⊕ r ⊕ p)∗ is a periodic series (see Prop. 5). Since the product of periodic series is periodic too, the Kleene star of a conservative and ultimately periodic series is an ultimately periodic series.
July 17, 2012
DRAFT
22
Proposition 7 (Transfer of a B-TWEG): The transfer matrix of a B-TWEG is composed of ultimately periodic series of Eper JδK.
Proof: We recall first that all the elementary operators γ n , δ t , µm and βb can be considered
as ultimately periodic series. Then, due to the specific structure of B-TWEGs, the modeling by series in Eper JδK is such that: •
the sum (⊕) of series in Eper JδK are necessarily done on series with the same gain (balanced property). The periodicity is kept by the balanced synchronization (see Prop. 4)
•
the product of ultimately periodic series is done when we the serial composition of systems arises, and the product keeps the periodicity property (see Prop. 4)
•
the Kleene star is done only on conservative ultimately periodic series since the loops of a B-TWEG are neutral. (see Prop. 6)
Remark 10 (Liveness): The liveness of a B-TWEG depends on the initial marking of the circuits. If a B-TWEG is not alive, then the transfer relation computed in Eper JδK will contain L 1 ∗ 1 ∗ ti some degenerate periodic series such as i wi δ ⊕ W (δ ) = p ⊕ W (δ ) , where wi and W are periodic E-operators in Eper . The last monomial W (δ 1 )∗ , that can be considered as W δ +∞ , describes the situation where, after a finite number of output events, the B-TWEG is definitely blocked, and the system can not release output event anymore : some events are infinitely delayed. Prop. 7 considers the cases of ultimately blocked B-TWEGs as some degenerate ultimately periodic cases. V. C ONTROL OF B-TWEG S The input-output model obtained in the previous section for B-TWEGs allows us to consider some model matching control problems such as the ones studied in [7] [20] [17] [15]. We only need to express the residuation of the product in Eper JδK. The first step is to express the residuation of the product in Eper . A. Residuation in Eper On a complete dioid, the product is not invertible. But the theory of residuation developped in [3], and applied to idempotent semirings in [1], can be used to find optimal solutions to some inequalities. On a complete dioid, mappings La : x 7→ ax and Ra : x 7→ xa are residuated. It July 17, 2012
DRAFT
23
means that ∀b, La (x) b and Ra (x) b have maximal solutions, that are respectively denoted L L ◦ = ◦ = L]a (b) = a\b {x|ax b} and Ra ](b) = b/a {x|xa b}. Mappings L]a and Ra] are said residual mappings of La et Ra . When the dioid product is commutative, then L]a = Ra] . Theorem 4 ([3] [1]): On a complete dioid D, abx c
⇐⇒
◦ \c ◦ x b\a
(11)
xba c
⇐⇒
◦ /b ◦ x c/a
(12)
(a ⊕ b)x c
⇐⇒
◦ ∧ b\c ◦ a\c
(13)
x(a ⊕ b) c
⇐⇒
◦ ∧ c/b ◦ c/a
(14)
The dioid of E-operators denoted E is complete. It is then possible to define the residual mappings of La and Ra on E. More precisely, concerning the elementary operators of E, we obtain the following results. Proposition 8: Let us consider w ∈ E an E-operator. We have : ◦ γ n\w = γ −n w
◦ n = wγ −n w/γ
(15)
◦ µm\w = βm γ m−1 w
◦ m = wβm w/µ
(16)
◦ ◦ b = wγ b−1 µb βb\w = µb w w/β
(17)
Proof: Since operator γ n is invertible (γ n γ −n = γ −n γ n = e), then we obtain (15). For (16), the right product by µm is invertible since βm µm = e. For the left product, the residual mapping satisfies ◦ µm\w =
M
{v ∈ E|µm v w}.
Let us remind that w1 , w2 ∈ E, then w1 w2 ⇐⇒ Fw1 ≥ Fw2 . Therefore, we also can express the residual mapping as L {v ∈ E|Fµm v ≥ Fw } L = {v ∈ E|m.Fv ≥ Fw } L = {v ∈ E|Fv ≥ Fw /m}
◦ µm\w =
◦ Therefore, the operator function of µm\w satisfies
∀k ∈ Z, Fµm\◦w (k) ≥ Fw (k)/m
July 17, 2012
DRAFT
24
Since an operator function is defined on Z, it is equivalent to, ∀k ∈ Z Fµm\◦w (k) = dFw (k)/me = b(Fw (k) + m − 1)/mc ◦ It comes that µm\w = βm γ m−1 w.
For (17), we know that the left product by βb is invertible. For the right product, we have L ◦ b = w/β {v ∈ E|Fvβb ≥ Fw } L = {v ∈ E|∀k ∈ Z, Fv (bk/bc) ≥ Fw (k)}. ◦ b has to satisfy the following constraints Therefore, the operator function of w/β
0 ≤ k ≤ b − 1,
Fw/◦βb (0) ≥ Fw (k)
b ≤ k ≤ 2b − 1,
Fw/◦βb (1) ≥ Fw (k)
2b ≤ k ≤ 3b − 1,
Fw/◦βb (2) ≥ Fw (k)
... Since Fw is a not decreasing function, Fw/◦βb satisfies Fw/◦βb (0) = Fw (b − 1), Fw/◦βb (1) = Fw (2b − 1) ... ◦ b = wγ b−1 µb . i.e. Fw/◦βb (k) = Fw (b.k + (b − 1)), which amounts to w/β ◦ 2 β3 µ4 ) ∈ E. By Example 10: Let us develop the computation of an example : (γ 1 µ2 )\(γ
applying results from Prop. 8 and from Prop. 1, we obtain ◦ 2 β3 µ4 ) = µ2\(γ ◦ 1\(γ ◦ 2 β3 µ4 )) (γ 1 µ2 )\(γ ◦ −1 (γ 2 β3 µ4 )) = µ2\(γ
= β2 γ 1 (γ 1 β3 µ4 ) = β2 γ 2 β3 µ4 = γ 1 β2 β3 µ4 = γ 1 β6 µ4 = γ 1 β3 µ2 Let us note that the canonical form of γ 1 β3 µ2 is γ 1 µ2 β3 γ 1 ⊕ γ 2 µ2 β3 = γ 1 ∇2|3 γ 1 ⊕ γ 2 ∇2|3 . ◦ 2 β3 µ4 )] 6= Since residuation is not an exact inversion, we can check here that (γ 1 µ2 )[(γ 1 µ2 )\(γ
(γ 2 β3 µ4 ). Indeed, we obtain ◦ 2 β3 µ4 )] = (γ 1 µ2 )[γ 1 β3 µ2 ] (γ 1 µ2 )[(γ 1 µ2 )\(γ
= γ 3 ∇4|3 γ 1 ⊕ γ 5 ∇4|3 , whereas the canonical form of γ 2 β3 µ4 is γ 2 ∇4|3 γ 2 ⊕ γ 3 ∇4|3 γ 1 ⊕ γ 4 ∇4|3 . July 17, 2012
DRAFT
25
◦ 1 and w1/w ◦ 2 are also periodic EProposition 9: Let us consider w1 , w2 ∈ Eper . Then w2\w ◦ 1 ) = Γ(w1 )/Γ(w2 ) and Γ(w1/w ◦ 2 ) = Γ(w1 )/Γ(w2 ). operators such that Γ(w2\w
Proof: Thanks to th. 4 and Prop. 8, and since we can write periodic E-operators as finite L L 0 0 sums, w1 = i γ ni ∇m|b γ ni and w2 = j γ nj ∇M |B γ nj , then L nj n0j ◦ L ni n0i ◦ 1 = [ w2\w j γ ∇M |B γ ]\[ i γ ∇m|b γ ] V n0j ◦ L ni nj n0i = γ ∇m|b γ ] j [γ ∇M |B γ ]\[ V L −n0 M −1 −nj ni n0i jµ β = γ γ γ γ ∇ γ B M m|b j i It is then a finite inf of periodic E-operators, that is also a periodic E-operator thanks to Prop. 2. B. Residuation in Eper JδK Thanks to (13) and (14), we can express the residuation of the product of balanced polynomials. L L Let p1 = w1i δ t1i and p2 = w2j δ t2j be two balanced polynomials in Eper JδK. Then, we can
◦ 1 and p1/p ◦ 2 as write p2\p
L L t2j t1i ◦ 1 = ( ◦ p2\p )\[ j w2j δ i w1i δ ] V L t2j t1i ◦ = )\[ j (w2j δ i w1i δ ] V L t1i −t2j ◦ = ] j[ i (w2j\w1i )δ and ◦ 2 = p1/p
V L t1i −t2j ◦ ] . i (w1i/w2j )δ j[
The computation of operations \◦ and /◦ on polynomials lies on the residuation of coefficients in Eper , and it is then equivalent to an infimum operation on some polynomials in Eper JδK. When
we extend the computation of operations \◦ and /◦ to ultimately periodic series of Eper JδK, we obtain the next result that we can not show here. As for polynomials, the residuation of two periodic series is equivalent to compute an infimum of a finite set of ultimately periodic series. Assertion 1: Let s1 and s2 be two ultimately periodic series of Eper JδK. If σr (s1 ) ≥ σr (s2 )
◦ 2 and s2\s ◦ 1 are ultimately periodic series of Eper JδK such that then s1/s ◦ 2 ) = σr (s1 ) σr (s1/s
◦ 2 ) = Γ(s1 )/Γ(s2 ) Γ(s1/s ◦ 1 ) = σr (s1 ) σr (s2\s ◦ 1 ) = Γ(s1 )/Γ(s2 ) Γ(s2\s ◦ 2 = s2\s ◦ 1 = ε. If σr (s1 ) < σr (s2 ) then s1/s
July 17, 2012
DRAFT
26
C. Example We will apply our work to obtain an output feedback control for the B-TWEG of Fig. 10. First, we state the transfer relation of Fig. 2 in its canonical form. In example 4 we obtained x4 = µ3 (γ 1 δ 2 )∗ β2 δ 2 x1 ⊕ β2 γ 1 δ 1 (γ 2 δ 1 )∗ µ3 x1 , i.e. x4 = Hx1 . The gain of series H is clearly the gain of all paths from t1 to t4 , Γ(H) = 3/2. Series H is depicted in its 3D representation in Fig. 10. The left and the right canonical forms of H are given below (where coefficients are also described in their canonical form in Eper ) H = p ⊕ q(γ 2 δ 3 )∗ = p ⊕ (γ 1 δ 1 )∗ q 0 with p = ∇3|2 δ 2 ⊕ γ 2 ∇3|2 γ 1 δ 3 ⊕ γ 3 ∇3|2 δ 4 ⊕γ 4 ∇3|2 γ 1 δ 5 ⊕ (γ 5 ∇3|2 γ 1 ⊕ γ 6 ∇3|2 )δ 6 q = [(γ 6 ∇3|2 γ 1 ⊕ γ 8 ∇3|2 )δ 7 ⊕(γ 7 ∇3|2 γ 1 ⊕ γ 9 ∇3|2 )δ 8 ] q 0 = [(γ 6 ∇3|2 γ 1 ⊕ γ 8 ∇3|2 )δ 7 ] The left and the right slopes are given by σr (H) = 3/2 and σl (H) = 1/1.
Figure 10.
Transfer series of the B-TWEG of Fig. 2
Thanks to results obtained in [7], we can compute the greatest neutral output feedback for the B-TWEG described by the transfer matrix H. From a practical point of view, it is the slowest
July 17, 2012
DRAFT
27
controller that we can add between the output and the input so that the closed loop system has the same behavior as the system alone. The benefit from this controller is to reduce the internal stocks as much as possible. By knowing H, this controller is expressed by (see [7]) ◦ ◦ Fˆ = (H\H) /H. For the B-TWEG of Fig. 2, the computation gives Fˆ = γ 3 ∇2|3 γ 1 δ 0 ⊕ γ 4 ∇2|3 δ 2 ⊕ (γ 2 δ 3 )∗ [γ 6 ∇2|3 δ 4 ] = γ 3 ∇2|3 γ 1 δ 0 ⊕ γ 4 ∇2|3 δ 2 ⊕ [γ 6 ∇2|3 δ 4 ](γ 3 δ 3 )∗ . The controller is described by an ultimately periodic series the slopes of which are σr (Fˆ ) = 3/3 and σl (Fˆ ) = 3/2. We obtain naturally that Γ(Fˆ ) = 2/3 is equal to 1/Γ(H) : the supplementary circuit due to the feedback loop is neutral, and the closed-loop system is still a B-TWEG. The transfer series of Fˆ is described in Fig. 11. Controller Fˆ also can be described by a B-TWEG which is depicted in Fig. 12. The grey zone corresponds to the realization of controller Fˆ .
Figure 11.
Transfer series of the optimal neutral output feedback for the B-TWEG of Fig. 2
VI. C ONCLUSION This work presents a modeling approach for the class of Balanced Timed and Weighted Event Graphs (B-TWEGs) in a dioid of additive operators. Four elementary operators denoted γ n , δ t , µm and βb are necessary to describe the dynamical phenomena modeled by a B-TWEG. The input-output behavior of B-TWEGs can be embedded into some rational formal series in a dioid denoted EJδK. Each formal series has a natural three dimensional graphical representation which has an ultimate periodicity property. Since a B-TWEG is completely charaterized by a July 17, 2012
DRAFT
28
Figure 12.
Greatest neutral output feedback
finite series (or a matrix for multivariate systems), some model reference control problems can be stated and solved in that framework. This work provides a natural extension of the max-plus theory for Timed Event Graphs to a class of weighted TEGs. R EFERENCES [1] F. Baccelli, G. Cohen, G.J. Olsder, and J.P. Quadrat. Synchronization and Linearity: An Algebra for Discrete Event Systems. John Wiley and Sons, New York, 1992. [2] A. Benabid-Najjar, C. Hanen O. Marchetti, and A. Munier-Kordon. Periodic schedules for bounded timed weighted event graphs. IEEE TAC, 57:1222–1232, 2012. [3] T.S. Blyth and M.F. Janowitz. Residuation Theory. Pergamon Press, Oxford, 1972. [4] G. Cohen, S. Gaubert, and J.P. Quadrat. Timed event graphs with multipliers and homogeneous min-plus systems. IEEE TAC, 43(9):1296 – 1302, September 1998. [5] G. Cohen, P. Moller, J.P. Quadrat, and M. Viot. Algebraic Tools for the Performance Evaluation of Discrete Event Systems. IEEE Proceedings: Special issue on Discrete Event Systems, 77(1):39–58, January 1989. [6] B. Cottenceau, L. Hardouin, and J.-L. Boimond. Input-Output Representation for a Subclass of Timed and Weighted Event Graphs in Dioids. Technical report, LISA Universit´e d’Angers, July 2012. [7] B. Cottenceau, L. Hardouin, J.-L. Boimond, and J.-L. Ferrier. Model Reference Control for Timed Event Graphs in Dioids. Automatica, vol. 37:1451–1458, 2001. [8] B. Cottenceau, M. Lhommeau, L. Hardouin, and J.L. Boimond. Data processing tool for calculation in dioid. In 5th Workshop on Discrete Event Systems, 2000. [9] S. Gaubert. Th´eorie des syst`emes lin´eaires dans les dio¨ıdes. Ph.D. thesis (in French), Ecole des Mines de Paris, Paris, 1992.
July 17, 2012
DRAFT
29
[10] S. Gaubert. Rational series over dioids and discrete event systems. In Proc. of the 11th Conf. on Anal. and Opt. of Systems: Discrete Event Systems, number 199 in Lect. Notes. in Control and Inf. Sci, Sophia Antipolis, June 1994. Springer. [11] M.C.W. Geilen. Synchronous data flow scenarios. ACM Transactions on Embedded Computing Systems, 10(2), December 2010. [12] M.C.W. Geilen and S. Stuijk. Worst-case performance analysis of synchronous dataflow scenarios. In International Conference on Hardware-Software Codesign and System Synthesis, New-York, 2010. [13] M. Mc Gettrick, G. Cohen, S. Gaubert, and J.P. Quadrat. Max-plus toolbox 2.3.3 for scilab. 2005. [14] S. Hamaci, J.-L. Boimond, and S. Lahaye. Modeling and Control of Hybrid Timed Event Graphs with Multipliers using (Min,+) Algebra. Discrete Event Dynamic Systems, vol. 16, n 2:241–256, 2006. [15] L. Hardouin, C. A. Maia, B. Cottenceau, and M. Lhommeau. Observer Design for (max,+) Linear Systems. IEEE Transaction on Automatic Control, 55-2, 2010. [16] B. Heidergott, G.J. Olsder, and J.van der Woude. Max Plus at Work - Modelling and Analysis of Synchronized Systems A Course on Max-Plus Algebra and Its Applications. Princeton University Press, Princeton, 2006. [17] L. Houssin, S. Lahaye, and J.-L. Boimond. Control of (max,+)-linear systems minimizing delays. Discrete Event Dynamic Systems, to appear. [18] D. Krob and A. Bonnier-Rigny. A complete system of identities for one letter rational expressions with multiplicities in the tropical semiring. J. Pure Appl. Algebra, 134:27–50, 1994. [19] E.A. Lee and D.G. Messerschmitt. Synchronous data flow. Proc. IEEE, 75(9):1235–1245, 1987. [20] C.A. Maia, L. Hardouin, R. Santos Mendes, and B. Cottenceau. Optimal Closed-Loop Control for Timed Event Graphs in Dioid. IEEE Transaction on Automatic Control, vol. 48:2284–2287, 2003. [21] O. Marchetti and A. Munier-Kordon. Complexity results for weighted timed event graphs. Discrete Optimization, 7:166– 180, 2010. ´ ´ enements Discrets. Th`ese, Ecole [22] P. Moller. Th´eorie alg´ebrique des Syst`emes a` Ev´ des Mines de Paris, 1988. [23] T. Murata. Petri nets: Properties, analysis and applications. Proceedings of the IEEE, 1989. [24] S. Sriram and S. Bhattacharyva. Embedded Multiprocessors: Scheduling and Synchronization. Marcel Dekker, New-York, 2000.
July 17, 2012
DRAFT