• Tidak ada hasil yang ditemukan

Supervisory Control of Timed Discrete Event Systems

2.2 Supervisory Control of Timed Discrete Event Systems

2.2 Supervisory Control of Timed Discrete Event

To use TDES models for supervisory control, Σact is also categorized as Σcon (con- trollable), Σunc(uncontrollable), and Σf or (forcible). An event is controllable if it can be prevented from occurring at a specific point in a logical event sequence or in time, and is uncontrollable otherwise. SCTDES includes a mechanism for forcing certain events to occur before a specific time instant. Specifically, forcible events can preempt a tick of the global clock. In this thesis, we are concerned with tasks having a finite deadline and hence, we assume all timed controllable events to be forcible.

2.2.2 Timed Discrete Event Systems (TDES)

A TDES Gis derived from its corresponding ATG Gact and represented by, G= (Q,Σ, δ, q0, Qm)

Thestate setQ=A×Q

{Tσ|σ ∈Σact}, where a stateq∈Qis of the formq ={a,{tσ|σ ∈ Σact}} in which a ∈ A and tσ ∈ Tσ is the timer of event σ. The initial state q0 ∈ Q is defined as q0 = {a0,{tσ0|σ ∈ Σact}}, where tσ0 is uσ if σ ∈ Σspe (respectively, lσ if σ ∈ Σrem). The marker state set Qm ⊆ Q is given by Qm ⊆ Am ×Q

{Tσ|σ ∈ Σact}.

Σ = Σact∪{tick}, where˙ tick denotes the passage of one unit time of the global clock.

δ :Q×Σ→Q is the state transition function which is defined in terms of δact and the time bounds [18].

In case of σ ∈ Σspe, δ(q, σ) is defined, provided q = (a, ), δact(a, σ) is defined, and 0 ≤ tσ ≤ µσ −lσ. An event σ ∈ Σspe is enabled at q = (a, ) ∈ Q if δact(a, σ) is defined, and is disabled otherwise. An enabled event σ (either tick or in A) is eligible if δ(q, σ) is defined. Only eligible events can actually occur. Thetimer mechanism can be summarized as: Once an eventσ is enabled, the timer tσ of σ is decremented by one time unit at every subsequenttick of the clock, until either, (i)tσ reaches zero (at which point σ is forced to occur), or (ii) σ occurs, or (iii) σ is disabled due to the occurrence of some other transition to a new activity. After all these cases, tσ is reset to its default value (i.e.,tσ =uσ if σ ∈Σspe). We use q −→σ q0 to denote δ(q, σ) = q0.

2.2 Supervisory Control of Timed Discrete Event Systems

2.2.3 Example

Let us consider a single instance of a task τi (i.e., job) with arrival time Ai, execution time Ei and deadline Di. The ATG model and its corresponding TDES model, for τi are shown in Figures 2.2 and 2.3, respectively. Here, the set of activities A = {IDLE, READY, EXECUTING, COMPLETION}, the event set Σact = {ai, si, ci}, where, the event ai represents the arrival of τi, si represents the start of execution of τi and ci represents the completion of execution of τi. All events are categorized as prospective since they are assigned with finite time bounds. We have used the shorthand notation t to represent the tick event.

IDLE ai READY si EXECUTING ci COMPLETION

[Ai, Ai] [0, Di - Ei] [Ei, Ei]

Figure 2.2: ATG for a single instance of τi with parameters Ai, Ei and Di

ai

t t

# t = Ai

si

t t t

# t = Di - Ei

si si si

t

t t t

ci

ci ci

ci

# t = Ei

t

Figure 2.3: TDES for a single instance of τi with parameters Ai, Ei andDi

2.2.4 Behavior of TDES

Let us denote by Σ+the set of all finite sequences of events (or strings) of Σ, of the form σ1σ2...σk where k ≥ 1, k ∈ N and σk ∈ Σ. Let /∈ Σ be the empty event and define Σ = {} ∪Σ+. Function δ can be extended to δ : Q×Σ → Q. The closed behavior of TDES G is the language L(G) = {s ∈ Σ|δ(q0, s) is defined}. The marked behavior of TDES G is the language Lm(G) = {s ∈ Σ|δ(q0, s) ∈ Qm}. The prefix-closure of a language L ⊆ Σ is denoted by L and consists of all the prefixes of all strings in L. L = {s ∈ Σ : (∃x ∈ Σ) [sx ∈ L]}. L is said to be prefix-closed if L = L. G is non-blocking if Lm(G) satisfies Lm(G) = L(G). Likewise, G is blocking if L(G) 6=

Lm(G).

2.2.5 Reachability, Co-reachability, Composition

A state q ∈ Q is reachable, if δ(q0, s) = q, for some s ∈ Σ. TDES G is said to be reachable, if q is reachable for all q ∈ Q. We use the notation Ac(G) to denote the operation of deleting all the states of G that are not reachable from q0. A state p∈ Q is co-reachable, if δ(p, s)∈Qm, for some s ∈Σ. A TDES G is said to be co-reachable, if p is co-reachable for every p ∈ Q. G is said to be non-blocking, if L(G) = Lm(G).

Otherwise, G is said to be blocking.

Suppose we have n languages corresponding to n TDES, Li ⊆ Σi with Σ =∪ni=1Σi. The natural projection Pi : Σ →Σi is defined as: (i) Pi() = , (ii) Pi(σ) = if σ /∈Σi, (iii) Pi(σ) = σ if σ ∈ Σi and (iv) Pi(sσ) = Pi(s)Pi(σ), s ∈ Σ, σ ∈ Σ. The inverse projection of Pi is, Pi−1 : 2Σi → 2Σ. The synchronous product of L1, L2, . . ., Ln, denoted by L1||L2||. . .||Ln, is defined asP1−1L1∩P2−1L2∩ · · · ∩Pn−1Ln.

2.2.6 Supervisory Control

Formally, a supervisory control for G is a map S : L(G) → 2Σ. Given G and S, the resulting closed-loop system, denoted by S/G, is defined inductively according to (i) an empty event ∈ L(S/G) (ii) [(s ∈ L(S/G)) and (sσ ∈ L(G)) and (σ ∈ S(s))] ⇔ [sσ ∈ L(S/G)] (iii) No other strings belong to L(S/G). The marked behavior of S/G is: Lm(S/G) = L(S/G)∩Lm(G). To summarize, a supervisor of G can be considered as an automaton S that monitors each state of G, and disable certain events inG when necessary, in order to control its behavior [29].

Given the system G and a desired specification K ⊆ Lm(G), K 6= ∅, the synthesis process first builds a supervisor candidate using G||K and this must be non-blocking as well as controllable [104]. A TDES is controllable with respect to G if it always admits the occurrence of (i) uncontrollable events eligible in G, (ii) tick events, if eligible, and not preempted by an eligible forcible event. If the controllability condition is satisfied, then the resulting controlled system ensures Lm(S/G) = K. Otherwise, a largest (i.e., supremal) controllable sublanguage of K can always be found (even though it may be empty). LetC(K) denote the family of controllable sub-languages ofK. C(K) is always

2.2 Supervisory Control of Timed Discrete Event Systems

non-empty, since ∅ is controllable. C(K) is closed under arbitrary set unions and has a unique largest controllable sub-language supC(K) such that supC(K)⊆K. Therefore, it is possible to design a supervisor which restricts the system behavior to supC(K). If this supervisor is adjoined withG, then Lm(S/G) = supC(K). The supervisorS is said to be minimally restrictive in the sense that its only action is to disable certain events when necessary so as to preserve the desired behavior of the system. As a consequence, the solution generates the largest possible subset of legal sequences.

2.2.7 Supervisor Computation

In order to transform G||K (denoted by M) such that it becomes both controllable and non-blocking, we apply the standard safe state synthesis mechanism presented in Algorithm 1 (SAFE STATE SYNTHESIS) [77, 104]. The synthesis algorithm iteratively removes the blocking states, together with all predecessor states that are reachable by uncontrollable transitions, and afterwards computes the set of nonblocking states. The algorithm stops either if all remaining states are non-blocking or if the initial state becomes blocking and has been eliminated, in which case a supervisor does not exist.

This procedure returns a unique maximal least restrictive supervisor, i.e., supC(K) [74, 108]. Next, we present the detailed discussion of each step involved in Algorithm 1.

Algorithm 1 first initializes the set of safe (un-safe) states Qs (Qu) of M to empty.

Then, it invokes Algorithm 2 (CO-REACHABLE) to compute the set of co-reachable states in M, denoted by Q0. Algorithm 2 first initializesSQi to the set of marked states Qm and do not include any state in Qu, i.e.,Qm\Qu. Then, SQi is iteratively extended by adding all states that can reach the co-reachable states using PreImage1.

Next, Algorithm 1 invokes Algorithm 3 (NON-CO-REACHABLE) which first com- putes the initial set of non-co-reachable states in M through Q\Q0, denoted by SQi. Then, SQi is iteratively extended by adding: (i) Quc: The set of states in M that can reach the non-co-reachable states in SQi through only uncontrollable events using PreImage UC2. (ii)Qt: The set of states inM that contain outgoing transition on t to a

1The operatorPreImage(V, δ)computes the set of states that, by one transition, can reach a state in V (⊆Q), formally defined as: PreImage(V, δ)={qQ|∃q0V :δ(q, σ) =q0, σΣ}.

2PreImage UC(V, δ) = {qQ|∃q0V :δ(q, σ) =q0, σΣuc}.

state inSQi (usingPreImage t1). In addition, these states should not contain outgoing transition on any forcible event (obtained using Undef for2). The extended set of non- co-reachable states is denoted by Q00. In Algorithm 1, Q00 is added to the set of un-safe states Qiu and is iteratively extended until fix-point is reached.

ALGORITHM 1: SAFE STATE SYNTHESIS