On the synthesis of provably correct discrete controllers Jri Vain - - PowerPoint PPT Presentation

on the synthesis of provably correct discrete controllers
SMART_READER_LITE
LIVE PREVIEW

On the synthesis of provably correct discrete controllers Jri Vain - - PowerPoint PPT Presentation

On the synthesis of provably correct discrete controllers Jri Vain Dept. of Computer Science/Institute of Cybernetics Tallinn University of Technology Eesti arvutiteaduse teooriapev, sgis 2004 1 Controller synthesis problem (I)


slide-1
SLIDE 1

Eesti arvutiteaduse teooriapäev, sügis 2004 1

On the synthesis of provably correct discrete controllers

Jüri Vain

  • Dept. of Computer Science/Institute of

Cybernetics Tallinn University of Technology

slide-2
SLIDE 2

Eesti arvutiteaduse teooriapäev, sügis 2004 2

Controller synthesis problem (I)

 Given:

 a dynamical system P (plant) with all its possible

behaviors

 a subset of plant’s behaviors, defined as good

(acceptable)

 Find:

 a controller C interacting with P by observing the state of

P and by issuing control actions that influence the behavior of P restricting it to be subset of good behaviors

slide-3
SLIDE 3

Eesti arvutiteaduse teooriapäev, sügis 2004 3

Controller synthesis problem (II)

 CSP formulations differ in the kind:

 How dynamics is considered  How acceptability criteria are specified

 Two extreme examples:

 Reactive program synthesis  Classical control theory

slide-4
SLIDE 4

Eesti arvutiteaduse teooriapäev, sügis 2004 4

CSP as reactive program synthesis problem

 Models base on discrete TS-s (automata):

 Plant represents reactions to environment and control

actions.

 The program has control over some of the transitions

(non-determinism).

 Control problem: find at each (plant’s) state one among possible transitions s.t. exclude ‘bad’ behaviors.

slide-5
SLIDE 5

Eesti arvutiteaduse teooriapäev, sügis 2004 5

CSP in classical control theory

 Models base on differential equations

 The plant is a continuous dynamical system.  Plant’s inputs express the non-determinism of

environment (disturbances) and the effects of controller actions.

 Control problem: define a feed-back law, which continuously determines inputs to P s.t. specification is met.

slide-6
SLIDE 6

Eesti arvutiteaduse teooriapäev, sügis 2004 6

Current approach to CSP

 Given:

 Plant model (timed automaton TP):  Discrete state transitions  Continuous passage of time  Correctness criteria ϕ stated in TL

 Find: the controller automaton TC s.t. TP || TC |= ϕ

slide-7
SLIDE 7

Eesti arvutiteaduse teooriapäev, sügis 2004 7

(d)

An example: RT game

 A pursuit game:

left-bridge right-bridge

running (e1) run-left (e2) run-right (e2)

junction Player P1 Player P2 finsh Possible catch areas

(e3) (e3)

(d)

  • Player P1 wins if finish is reached with < c sec
  • Winning strategy exists iff max(d, e1) + e2+ e3 < c
  • Strategy for P1: stay in junction until max(d,e1).

(ew )

slide-8
SLIDE 8

Eesti arvutiteaduse teooriapäev, sügis 2004 8

The game as two interacting TA

slide-9
SLIDE 9

Eesti arvutiteaduse teooriapäev, sügis 2004 9

The discrete case

 Plant (automaton): P = (Q, ∑c, δ, q0)

 Q – finite set of states  ∑c – set of controller commands  δ – transition relation : Q × ∑c |→ 2Q  q0 – initial state

 Controller automaton C for plant P implements a function C: Q |→ ∑c  Memoryless controllers observe only current state of P , i.e., ∀q ∈ Q, w, w’ ∈ Q*, C(w q) = C(w’ q)

slide-10
SLIDE 10

Eesti arvutiteaduse teooriapäev, sügis 2004 10

Trajectories

 L(P) - set of all (infinite) trajectories  Lc(P) – set of controlled trajectories Lc(P) ⊆ L(P) How to define good trajectories? Let for each α ∈ L(P): Vis(α) – all states appearing in α. Inf(α) – states appearing infinitely often in α.

slide-11
SLIDE 11

Eesti arvutiteaduse teooriapäev, sügis 2004 11

Acceptance condition for P

 Ω ∈{(F,◊), (F, ), (F,◊), (F, ◊)},

where F ⊆ Q (‘good’ state) L(P, F, ) = {α ∈ L(P): Vis(α) ⊆ F} L(P, F, ◊) = {α ∈ L(P): Vis(α) ∩ F ≠ ∅} L(P, F, ◊) = {α ∈ L(P): Inf(α) ⊆ F} L(P, F, ◊) = {α ∈ L(P): Inf(α) ∩ F ≠ ∅}

slide-12
SLIDE 12

Eesti arvutiteaduse teooriapäev, sügis 2004 12

CSP

 Problem Synth(P, Ω ):

Find a controller C s.t. Lc(P) ⊆ L(P, Ω),

  • therwise show that such C does not exist.

Theorem (Maler, Pnueli, Sifakis): For every Ω the problem Synth(P, Ω ) is decidable. If (P, Ω ) is controllable then it is controllable by a simple (memoryless) controller.

slide-13
SLIDE 13

Eesti arvutiteaduse teooriapäev, sügis 2004 13

Sketch of proof (I)

 Def. Controllable predecessors of a state P is a set of states from which the controller can force the plant into P in one step: π(P) = {q: ∃σ ∈Σc . δ(q, σ) ⊆ P}  Def. Winning states W – states from which a controller C can enforce good behaviors (according to Ω).

slide-14
SLIDE 14

Eesti arvutiteaduse teooriapäev, sügis 2004 14

Sketch of proof (II)

 Set W can be characterized by fp expressions:

 : ν W(F ∩ π(W))

(1) ν - greatest fp

 ◊: µ W(F ∪ π(W))

(2) µ - least fp

 ◊: µWνH(π(H ) ∩ (F ∪ π(W))) (3)  ◊: νWµH(π(H ) ∪ (F ∩ π(W))) (4)

slide-15
SLIDE 15

Eesti arvutiteaduse teooriapäev, sügis 2004 15

Sketch of proof (III)

 For a given plant P and π it is straightforward

to calculate W using (1) - (4).

 Procedurally:

◊: W0 := ∅

: W0 := Q

for i = 0, 1,…, repeat for i = 0, 1,…, repeat Wi+1 := F ∪ π(Wi) Wi+1 := F ∩π(Wi) until Wi+1 = Wi

until Wi+1 = Wi

slide-16
SLIDE 16

Eesti arvutiteaduse teooriapäev, sügis 2004 16

Sketch of proof (IV)

 The sequences of Wi are monotone over a finite domain  ⇒ convergence is guaranteed.  Define the controller at q as C(q) = σ if ∃σ ∈Σc s.t. δ(q, σ) ⊆ Wi  The plant is controllable iff q0∈W.  When the process terminates the controller is synthesized for all winning states.

slide-17
SLIDE 17

Eesti arvutiteaduse teooriapäev, sügis 2004 17

Timed case (I)

 Timed automaton: T =(Q, X, Σ, I,G, R, q0)

Q – set of locations X = (R+d) – clock domain d - number of clocks Σ = ∑c | ∪ {e} e – environment action I: Q |→ Hk Hk – subregions of X R - clock resets R ⊆ Q × Σ × G × 2C × Q, where C – set of clocks

slide-18
SLIDE 18

Eesti arvutiteaduse teooriapäev, sügis 2004 18

Timed case (II)

 Timed trajectory

 Configuration: (q, x) ∈ Q × X  Transition - pair of configurations ((q,x),(q’, x’)) s.t.

either

 t-trasition: q = q’ and ∃t ∈T. x’ = x +1t, x ∈Iq or  σ-transition: ∃r ∈ R. x ∈ g and x’ = x|xr=0  Trajectory – sequence of configurations 〈(qi, xi ), i≥0 〉 s.t.

for every i ((qi, xi ), (qi+1, xi+1)) is a transition.

slide-19
SLIDE 19

Eesti arvutiteaduse teooriapäev, sügis 2004 19

Timed case (III)

 Simple timed controller:

C: Q × X |→ ∑c

⊥ ∑c ⊥= ∑c ∪ {⊥}

∀σ ∈ ∑c

⊥ : C-1(σ) is a polyhedral set

 Controlled trajectory: given a simple controller C, a pair

((q, x),(q’, x’)) is a C-transition if it is either

 e-transition

  • r

 σ -transition s.t.C(q, x) = σ ∈∑c

  • r

 t-transition for some t∈T s.t. ∀t’ ∈[0,t) C(q, x +1t’) = ⊥

 C-trajectory consists of C- transitions.

slide-20
SLIDE 20

Eesti arvutiteaduse teooriapäev, sügis 2004 20

RT-CSP

 Given TA T and an acceptance condition Ω, RT-Synth(T , Ω): find a controller C s.t. LC(T) ⊆ L(T, Ω).

  • Def. (Extended transition relation):

∀t,σ ∈T, ∑c

⊥ . δ((q, x),(t, σ)) = {(q’, x’) s.t. (q’, x’) is a (t, σ )-

successor or (t’, e)- successor of (q, x) for some t’∈ [0, t]}.

slide-21
SLIDE 21

Eesti arvutiteaduse teooriapäev, sügis 2004 21

As for discrete case, define π that indicates the configurations from which the controller can force the automaton into a given set of configurations.

  • Def. (Controllable predecessor π):

∀K ⊆ Q × X: π(K) = {(q, x): ∃t,σ ∈T,∑c

⊥. δ((q, x),(t,

σ)) ⊆ K} How to compute?

slide-22
SLIDE 22

Eesti arvutiteaduse teooriapäev, sügis 2004 22

 Any set of configurations K can be expressed by a set tuple K = 〈 P0 × … × Pm 〉, where P0,…, Pm ⊆ X are polyhedra.  We have to show that π always maps a polyhedral set tuple to another polyhedral set tuple.  Intuitive idea: Any predecessor can be efficiently constructed using linear clock constraints. Thus the set of polyhedral regions 2Q × H is closed under π.

slide-23
SLIDE 23

Eesti arvutiteaduse teooriapäev, sügis 2004 23

slide-24
SLIDE 24

Eesti arvutiteaduse teooriapäev, sügis 2004 24

Decidability of RT-CSP

Theorem: Given a TA T and an acceptance condition Ω ∈{(F,◊), (F, ), (F,◊), (F, ◊)},the problem RT-Synth(T , Ω ) is decidable. Scetch of proof:  Any of iterative processes for fp equations (1)-(4) starts with an element of 2Q × H , e.g., starts with W0=Q × F  Any iteration applies Boolean operations and π, i.e., every Wi is also an element of 2Q × H – finite set of linear constrs.  By monotonicity, a fixed-point is eventually reached.

slide-25
SLIDE 25

Eesti arvutiteaduse teooriapäev, sügis 2004 25

q

1

q

4

q

7

q

3

q

2

q

6

q

5

q

8

q1

F

a,a b,a a,* a,a *,b *,* b,a b, b a,a

Fc

q

9

a,* b,* b,a a,b *,* a,* a,* b,b b,* b,b a,b b,a a,a

Q Q = {q1,… q10}

∑c = D = {a, b, *} F = { q1,… q8} tc – reaction time = const Solve RT-Synth(. , F)?