Real Tim e Controller Synthesis with Gerd Behrmann, Franck - - PowerPoint PPT Presentation

real tim e controller synthesis
SMART_READER_LITE
LIVE PREVIEW

Real Tim e Controller Synthesis with Gerd Behrmann, Franck - - PowerPoint PPT Presentation

TI GA TI GA TI GA Real Tim e Controller Synthesis with Gerd Behrmann, Franck Cassez, Agnes Counard, Alexandre David Emmanuel Fleury, Didier Lime See CAV 2007 & CONCUR 2005 UCb UC Informationsteknologi Real Tim e Model Checking


slide-1
SLIDE 1

Real Tim e Controller Synthesis

with

Gerd Behrmann, Franck Cassez, Agnes Counard, Alexandre David Emmanuel Fleury, Didier Lime

TI GA TI GA TI GA

slide-2
SLIDE 2

Informationsteknologi

UC UCb

See CAV 2007 & CONCUR 2005

slide-3
SLIDE 3

Informationsteknologi

UC UCb

Real Tim e Model Checking

sensors actuators

a c b 1 2 4 3 a c b 1 2 4 3 1 2 4 3 1 2 4 3 a c b

UPPAAL Model

Model

  • f

environment (user-supplied / non-determinism) Model

  • f

tasks (automatic?)

Plant

Continuous

Controller Program

Discrete

SAT φ ?? SAT φ ??

slide-4
SLIDE 4

Informationsteknologi

UC UCb

??

Real Tim e Scheduling & Control Synthesis Plant

Continuous

Controller Program

Discrete

sensors actuators

a c b 1 2 4 3 a c b 1 2 4 3 1 2 4 3 1 2 4 3 a c b

Partial UPPAAL Model

Model

  • f

environment (user-supplied)

Synthesis

  • f

tasks/scheduler (automatic)

SAT φ !! SAT φ !!

slide-5
SLIDE 5

Controller Synthesis and Timed Games

Production Cell GIVEN System moves S, Controller moves C, and property φ FIND strategy sC such that sC||S ² φ

  • A Two-Player Game

GIVEN System moves S, Controller moves C, and property φ FIND strategy sC such that sC||S ² φ

  • A Two-Player Game
slide-6
SLIDE 6

Dynamic Scheduling = Controller Synthesis

Section Reading time is uncontrollable

slide-7
SLIDE 7

Untimed and Timed Games

Reachability / Safety Games

Uncontrollable Controllable

1 ☺ 2 3 4

  • x>1

x·1 x<1 x:=0 x<1 x·1 x≥2

slide-8
SLIDE 8

Untimed Games

Reachability / Safety Games

Uncontrollable Controllable

Strategy: F : Run(A) Ec Memoryless strategy: F : Q Ec Winning Run: States(ρ) ∩ G ≠ Ø States(ρ) ∩ G = Ø Winning Strategy: Runs(F) ⊆ WinRuns

slide-9
SLIDE 9

Untimed Games

Reachability / Safety Games

Uncontrollable Controllable

Strategy: F : Run(A) Ec Memoryless strategy: F : Q Ec Winning Run: States(ρ) ∩ G ≠ Ø States(ρ) ∩ G = Ø Winning Strategy: Runs(F) ⊆ WinRuns

slide-10
SLIDE 10

Untimed Games

Reachability / Safety Games

Uncontrollable Controllable

Loosing (memoryless) strategy

Strategy: F : Run(A) Ec Memoryless strategy: F : Q Ec Winning Run: States(ρ) ∩ G ≠ Ø States(ρ) ∩ B = Ø Winning Strategy: Runs(F) ⊆ WinRuns

slide-11
SLIDE 11

Untimed Games

Reachability / Safety Games

Uncontrollable Controllable

Winning (memoryless) strategy)

Strategy: F : Run(A) Ec Memoryless strategy: F : Q Ec Winning Run: States(ρ) ∩ G ≠ Ø States(ρ) ∩ B = Ø Winning Strategy: Runs(F) ⊆ WinRuns

slide-12
SLIDE 12

Untimed Games

Uncontrollable Controllable Backwards Fixed-Point Computation

cPred(X) = { q∈Q | ∃ q’∈ X. q c q’} uPred(X) = { q∈Q | ∃ q’∈ X. q u q’}

π(X) = cPred(X) \ uPred(XC) ]

Theorem: The set of winning states is

  • btained as the least fixpoint
  • f the function:

X a π(X) ∪ Goal

slide-13
SLIDE 13

Untimed Games

Uncontrollable Controllable Backwards Fixed-Point Computation

cPred(X) = { q∈Q | ∃ q’∈ X. q c q’} uPred(X) = { q∈Q | ∃ q’∈ X. q u q’}

π(X) = cPred(X) \ uPred(XC) ]

Theorem: The set of winning states is

  • btained as the least fixpoint
  • f the function:

X a π(X) ∪ Goal

slide-14
SLIDE 14

Untimed Games

Uncontrollable Controllable Backwards Fixed-Point Computation

cPred(X) = { q∈Q | ∃ q’∈ X. q c q’} uPred(X) = { q∈Q | ∃ q’∈ X. q u q’}

π(X) = cPred(X) \ uPred(XC) ]

Theorem: The set of winning states is

  • btained as the least fixpoint
  • f the function:

X a π(X) ∪ Goal

slide-15
SLIDE 15

Untimed Games

Uncontrollable Controllable Backwards Fixed-Point Computation

cPred(X) = { q∈Q | ∃ q’∈ X. q c q’} uPred(X) = { q∈Q | ∃ q’∈ X. q u q’}

π(X) = cPred(X) \ uPred(XC) ]

Theorem: The set of winning states is

  • btained as the least fixpoint
  • f the function:

X a π(X) ∪ Goal

slide-16
SLIDE 16

Untimed Games

Uncontrollable Controllable Backwards Fixed-Point Computation

cPred(X) = { q∈Q | ∃ q’∈ X. q c q’} uPred(X) = { q∈Q | ∃ q’∈ X. q u q’}

π(X) = cPred(X) \ uPred(XC) ]

Theorem: The set of winning states is

  • btained as the least fixpoint
  • f the function:

X a π(X) ∪ Goal

slide-17
SLIDE 17

Untimed Games

Uncontrollable Controllable Backwards Fixed-Point Computation

cPred(X) = { q∈Q | ∃ q’∈ X. q c q’} uPred(X) = { q∈Q | ∃ q’∈ X. q u q’}

π(X) = cPred(X) \ uPred(XC) ]

Theorem: The set of winning states is

  • btained as the least fixpoint
  • f the function:

X a π(X) ∪ Goal

slide-18
SLIDE 18

Timed Games

Reachability / Safety Games

1 ☺ 2 3 4

  • x>1

x·1 x<1 x:=0 x<1 x·1 Uncontrollable Controllable x≥2

Strategy: F : Run(A) Ec ∪ λ Memoryless strategy: F : Q Ec ∪ λ Winning Run: States(ρ) ∩ G ≠ Ø States(ρ) ∩ G = Ø Winning Strategy: Runs(F) ⊆ WinRuns

slide-19
SLIDE 19

Timed Games

Reachability / Safety Games

1 ☺ 2 3 4

  • x>1

x·1 x<1 x:=0 x<1 x·1 Uncontrollable Controllable x≥2

Strategy: F : Run(A) Ec ∪ λ Memoryless strategy: F : Q Ec ∪ λ Winning Run: States(ρ) ∩ G ≠ Ø States(ρ) ∩ G = Ø Winning Strategy: Runs(F) ⊆ WinRuns

x != 1 : λ x=1 : c x<2 : λ x≥2 : c x != 1 : λ x=1 : c

Winning (memoryless) strategy)

x<1 : λ x≥1 : c

slide-20
SLIDE 20

Timed Games – State-of-the-Art

Timed Automata + Reachability [AD94] Time Game Automata: Control [MPS95, AMPS98] Time Optimal Control (reachability) [AM99] “False” On-the-fly Algorithm [AT01] Priced Timed Automata (reachability) [LBB+01, ALTP01, LRS04, RL05] Price Timed Automata (safety) [BBL04] Price Optimal Control (reachability):

Acyclic PTA [LTMM02] Bounded length [ABM04] Strong non-zeno cost-behaviour [BCFL04]

More to come !!

UPPAAL UPPAAL Cora Cora To be To be improved improved !! !! UPPAAL UPPAAL

slide-21
SLIDE 21

Timed Games – State-of-the-Art

Backwards Fixed-Point Computation

Theorem: The set of winning states is obtained as the least fixpoint

  • f the function: X a π(X) ∪ Goal

cPred(X) = { q∈Q | ∃ q’∈ X. q c q’} uPred(X) = { q∈Q | ∃ q’∈ X. q u q’} Predt(X,Y) = { q∈Q | ∃ t. qt∈X and ∀ s·t. qs∈YC } π(X) = Predt[ X ∪ cPred(X) , uPred(XC) ] Definitions

X Y

Predt(X,Y)

slide-22
SLIDE 22

Timed Games – State-of-the-Art

1 ☺ 2 3 4

  • x>1

x·1 x<1 x:=0 x<1 x·1 x≥2 Backwards Fixed-Point Computation

1 2

slide-23
SLIDE 23

Timed Games – State-of-the-Art

1 ☺ 2 3 4

  • x>1

x·1 x<1 x:=0 x<1 x·1 x≥2 Backwards Fixed-Point Computation

1 2

slide-24
SLIDE 24

Timed Games – State-of-the-Art

1 ☺ 2 3 4

  • x>1

x·1 x<1 x:=0 x<1 x·1 x≥2 Backwards Fixed-Point Computation

1 2

slide-25
SLIDE 25

Timed Games – State-of-the-Art

1 ☺ 2 3 4

  • x>1

x·1 x<1 x:=0 x<1 x·1 x≥2 Backwards Fixed-Point Computation

1 2

slide-26
SLIDE 26

Timed Games – State-of-the-Art

1 ☺ 2 3 4

  • x>1

x·1 x<1 x:=0 x<1 x·1 x≥2 Backwards Fixed-Point Computation

1 2

slide-27
SLIDE 27

Timed Games – State-of-the-Art

1 ☺ 2 3 4

  • x>1

x·1 x<1 x:=0 x<1 x·1 x≥2 Backwards Fixed-Point Computation

1 2

slide-28
SLIDE 28

Timed Games – State-of-the-Art

1 ☺ 2 3 4

  • x>1

x·1 x<1 x:=0 x<1 x·1 x≥2 Backwards Fixed-Point Computation

1 2

slide-29
SLIDE 29

Timed Games – State-of-the-Art

1 ☺ 2 3 4

  • x>1

x·1 x<1 x:=0 x<1 x·1 x≥2 Backwards Fixed-Point Computation

1 2 We want Forward and On-The-Fly Algorithm in order to avoid constructing all (backwards) reachable state-space and to allow for discrete variables (e.g. in UPPAAL)

slide-30
SLIDE 30

On-the-fly Algorithms for Timed Games

S Win(S)

slide-31
SLIDE 31

On-the-fly Algorithms for Timed Games

S Win(S)

U P P A A L T i g a = O n

  • t

h e

  • f

l y a l g

  • r

i t h m f

  • r

t i m e d g a m e s

[CONCUR’05]

slide-32
SLIDE 32

UPPAAL Tiga : New Concrete Time Simulator

CAV 2007 CAV 2007

slide-33
SLIDE 33

UPPAAL Tiga : CTL Control Objectives

Reachability properties:

control: A[ p U q ] until control: A<> q ⇔ control: A[ true U q ]

Safety properties:

control: A[ p W q ] weak until control: A[] p ⇔ control: A[ p W false ]

Time-optimality :

control_t*(u,g): A[ p U q ]

u is an upper-bound to prune the search, act like an invariant but on the path = expression on the current state. g is the time to the goal from the current state (a lower-bound in fact), also used to prune the search. States with t+g > u are pruned

.

slide-34
SLIDE 34

Dynamic Scheduling = Controller Synthesis

Section Reading time is uncontrollable

slide-35
SLIDE 35

A Buggy Brick Sorting Program

16 MCD 2001, Twente Kim G. Larsen

U C b

First UPPAAL model

So Sorting of Lego Boxes ng of Lego Boxes

Conveyer Belt

Exercise: Design Controller so that only yellew boxes are being pushed out

Boxes

Piston

Black Yellow

9 18 81 90 99 Blck Yel remove eject

Controller

Ken Tindell

MAI N PUSH

Conveyer Belt

eject

slide-36
SLIDE 36

Brick Sorting

Generic Plate Controller Piston

slide-37
SLIDE 37

Generic Plate Controller Piston Strategy for EJECT

Brick Sorting

slide-38
SLIDE 38

38 AMETIST Dortmund Dec 2002 Kim G. Larsen Ed Brinksma

UC UC b

The Chinese Juggling Problem

thanks to Oded Maler

Problem: avoid having the plates falling down

slide-39
SLIDE 39

39 AMETIST Dortmund Dec 2002 Kim G. Larsen Ed Brinksma

UC UC b

Problem: avoid having the plates falling down

The Chinese Juggling Problem

thanks to Oded Maler

slide-40
SLIDE 40

Balancing Plates / Timed Automata

A Plate The Joggler

E฀ ¬(Plate1.Bang or Plate2.Bang or …)

slide-41
SLIDE 41

Balancing Plates / Time Uncertainty

Strategy BDD/ CDD

slide-42
SLIDE 42

Production Cell

slide-43
SLIDE 43

Experimental Results

slide-44
SLIDE 44

New Experimental Results Using UPPAAL 4.0 architecture

Tricks (Alexandre):

  • UPPAAL pipeline architecture, which implies

* active clock reduction * PW-list * UPPAAL optimizations (successor computation, postponed evaluation, reduced copies..) * improved DBM library * improved copy-on-write implementations * improved subtraction (vital) * enormously improved merge (between DBMs) (vital)

slide-45
SLIDE 45

Climate Control

With Jan J. Jessen Jacob I. Rasmussen

slide-46
SLIDE 46

Climate Control

slide-47
SLIDE 47

Climate Control / Neighbor

Temperature in neighbor zone (lower/higher) Neighbor wants to receive flow? Neighboring zone

slide-48
SLIDE 48

Climate Control / Controller

Zone Controller

slide-49
SLIDE 49

Climate Control / Controller

Zone Controller

slide-50
SLIDE 50

Obtaining executable code

Stragegy

get0 give0 give0 1 temp0 temp0 temp0 get1 get1 get1 get1 give1 give1 give1 give1 temp1 temp1 temp1
  • bjective
hottest
  • bjective
hottest humid0 humid0 humid1 humid1 humid1 humid1 have0 morehumid morehumid want0 have1 want1 inlet
  • utlet
heater dec_humid morehumid morehumid have0 have0 want0 want0 have1 want1 inlet
  • utlet
heater have1 want1 inlet
  • utlet
humid0
  • bjective
humid1 humid1 dec_humid morehumid morehumid morehumid have0 have0 dec_humid want0 want0 have1 want1 have1 want1 humid0 humid1 humid1 dec_humid morehumid have0 morehumid want0 have1 want1 inlet
  • bjective
hottest humid0 humid1 humid1 dec_humid morehumid morehumid have0 want0 have1 temp1 temp1 temp1 hottest hottest hottest
  • bjective
humid0 humid1 humid1 dec_humid morehumid morehumid hottest give1 give1 give1 give1 temp1 temp1 temp1
  • bjective
hottest
  • bjective
hottest humid0 humid1 humid1 dec_humid morehumid morehumid morehumid have0 have0 want0 want0 dec_humid humid0
  • bjective
humid1 humid1 dec_humid morehumid morehumid morehumid have0 have0 dec_humid want0 want0 dec_humid humid0 humid1 humid1 dec_humid morehumid have0 morehumid want0 dec_humid
  • bjective
hottest humid0 humid1 humid1 dec_humid morehumid morehumid morehumid have0 want0 dec_humid temp1 temp1 temp1 hottest hottest hottest hottest
  • bjective
  • bjective
humid0 humid1 humid1 morehumid morehumid humid0 humid1 humid1 dec_humid morehumid morehumid
  • bjective
  • bjective
  • bjective
humid0 humid1 humid1 dec_humid morehumid have0 morehumid dec_humid want0 have1 want1 humid0 humid0 humid1 humid1 morehumid morehumid dec_humid dec_humid humid1 morehumid morehumid dec_humid dec_humid hottest hottest
  • bjective
  • bjective
humid0 humid1 humid1 dec_humid morehumid have0 morehumid want0 have1 humid0 humid1 humid1 dec_humid morehumid morehumid get1 get1 give1 give1 give1 give1 temp1 temp1 temp1
  • bjective
hottest
  • bjective
hottest humid0 humid1 humid1 dec_humid morehumid morehumid have0 humid0
  • bjective
humid1 humid1 dec_humid morehumid morehumid morehumid have0 dec_humid humid0 humid1 humid1 dec_humid morehumid have0 morehumid
  • bjective
hottest humid0 humid1 humid1 dec_humid morehumid morehumid have0 temp1 temp1 temp1 hottest hottest hottest
  • bjective
humid0 humid1 humid1 dec_humid morehumid morehumid hottest

1296 cases BDD 289 nodes

slide-51
SLIDE 51

Obtaining executable code

q23 q12 Ttotal q23 T2 H2 qin3 qout3 Amb u3 T3 H3 Third Zone Dynamics Amb T&H amb SafeT3 SafeT2 SafeT1 SafeH3 SafeH2 SafeH1 T2 T3 [Q_23]^+_2 [Q_23]^−_2 T objective H2 H3 H objective state Qout Qin u [Q_23]^+_3 [Q_23]^−_3 Right Zone Controller q12 qout2 qin2 u2 q23 T1 H1 T3 H3 Amb T2 H2 Middle Zone Dynamics T1 T2 T3 [Q_12]^+_1 [Q_12]^−_1 [Q_23]^+_3 [Q_23]^−_3 T objective H1 H2 H3 H objective state Qout Qin u [Q_12]^+_2 [Q_12]^−_2 [Q_23]^+_2 [Q_23]^−_2 Middle Zone Controller T1 T2 [Q_12]^+_2 [Q_12]^−_2 T objective H1 H2 H objective state Qout Qin u [Q_12]^+_1 [Q_12]^−_1 Left zone controller Htotal [u3] [u2] [u1] [H3] [H2] [H1] [T3] [T2] [T1] [T3] [T3] [T2] [T2] [T2] [T2] [H3] [T2] [H1] [H2] [H2] [H3] [H2] [H1] [T3] [T2] [T1] [u3] [T1] [u2] [u1] [H3] [H3] [H2] [H2] [H2] [H1] [H1] [T3] [T1] [T1] qout1 qin1 q12p1 q12m1 qout2 qin2 q12p2 q12m2 q23p2 q23m2 qout3 qin3 q23p3 q23m3 Qout1 Qin1 Q12 Qout2 Qin2 Q23 Qin3 Qout3 Flow Calc qout1 qin1 q12 T2 H2 Amb u1 T1 H1 First Zone Dynamics

500 1000 1500 2000 2500 3000 3500 4000 11.5 12 12.5 13 13.5 14 14.5 15 15.5 16 16.5 T1 T2 T3

Simulink

slide-52
SLIDE 52

Conclusion & Future Work

More Applications - we need you ! Efficient Algorithms for Optimal Infinite Scheduling Multipriced Timed Automata Priced Timed Games

Optimal strategies undecidable in general [Raskin ao] Decidability in setting of 1 clock or strong non- zenoness.

Timed Games with Imperfect information. Distributed and parallel implementations (PC clusters, GRID, Shared Memory Machines)

slide-53
SLIDE 53

Thanks for your attention!

Please do not hesitate to contact me:

kgl@cs.aau.dk