Checkin Ch king g in in UPP PPAAL AL Alexandre Al xandre Dav - - PowerPoint PPT Presentation

checkin ch king g in in upp ppaal al
SMART_READER_LITE
LIVE PREVIEW

Checkin Ch king g in in UPP PPAAL AL Alexandre Al xandre Dav - - PowerPoint PPT Presentation

Sy Symb mboli lic c and St Statis istica tical l Model el Checkin Ch king g in in UPP PPAAL AL Alexandre Al xandre Dav avid id Kim Ki m G. Lar . Larsen n nis, Peter Bulychev, Marius us Mikuc ucio ioni Axel Legay, Dehui


slide-1
SLIDE 1

Al Alexandre xandre Dav avid id Ki Kim m G. Lar . Larsen n

Sy Symb mboli lic c and St Statis istica tical l Model el Ch Checkin king g in in UPP PPAAL AL

Marius us Mikuc ucio ioni nis, Peter Bulychev, Axel Legay, Dehui Du, Guangyuan Li, Danny B. Poulsen, Amélie Stainer, Zheng Wang

CAV11, FORMA RMATS11, TS11, PDMC11, C11, QAP APL12, 12, LPAR1 AR12, 2, NFM12, 12, iWIG WIGP12, 12, RV12, FORMA RMATS12, TS12, HBS12, BS12, ISOLA OLA12, 12, SCIE IENCE CE China na

slide-2
SLIDE 2

Ov Overview view

  • Stochastic Hybrid

id Automata

  • Biological Oscillator
  • Continuous vs. Stochastic Models
  • Parameter Optimization – ANOVA
  • Energy Aware Building
  • Controller Synthesis for Hybrid Systems

Greno noble e Summ mmer er Schoo hool Alexand andre David [2]

slide-3
SLIDE 3

Sto Stochas chastic tic Hyb Hybri rid Au Auto tomata mata

slide-4
SLIDE 4

Sto toch chastic astic Semantics antics of

  • f TA

TA

Greno noble e Summ mmer er Schoo hool Alexand andre David [4]

Uniform Distribution Exponential Distribution Input enabled Compositi tion

  • n =

Repeated races between components for output utti ting ng

1 2 3 4 5 0.5 1

Let’s make this hybrid. What happens to the semantics if you add differential equations?

slide-5
SLIDE 5

Sto toch chastic astic Hy Hybrid rid Systems tems

  • A Bouncing Ball

Greno noble e Summ mmer er Schoo hool

Ball Player r 1 Player r 2

simulate 1 [<=20]{Ball1.p, Ball2.p} Pr[<=20](<>(time>=12 && Ball.p>4))

Alexand andre David [5]

slide-6
SLIDE 6

UPPAAL AAL SMC MC

  • Un

Unif iform m dis istri tribu bution tions s (bound unded ed dela lay) y)

  • Exponential distributions (unbounded delay)
  • Discrete probabilistic choices
  • Distribution on successor state – random
  • Hybrid flow by use of ODEs
  • + usual UPPAAL features
  • Logic: MITL support.

Greno noble e Summ mmer er Schoo hool Alexand andre e David [6]

slide-7
SLIDE 7

UPPAAL AAL SMC MC

  • Uniform distributions (bounded delay)
  • Exponen

nentia ial l dis istrib ibuti utions

  • ns (unb

nbounde unded d dela lay) y)

  • Discrete probabilistic choices
  • Distribution on successor state – random
  • Hybrid flow by use of ODEs
  • + usual UPPAAL features
  • Logic: MITL support.

Greno noble e Summ mmer er Schoo hool Alexand andre e David [7]

slide-8
SLIDE 8

UPPAAL AAL SMC MC

  • Uniform distributions (bounded delay)
  • Exponential distributions (unbounded delay)
  • Dis

iscret ete e probab abil ilistic istic choic ices

  • Distribution on successor state – random
  • Hybrid flow by use of ODEs
  • + usual UPPAAL features
  • Logic: MITL support.

Greno noble e Summ mmer er Schoo hool Alexand andre e David [8]

slide-9
SLIDE 9

UPPAAL AAL SMC MC

  • Uniform distributions (bounded delay)
  • Exponential distributions (unbounded delay)
  • Discrete probabilistic choices
  • Dis

istribut ibution ion on successo essor state e – random

  • Hybrid flow by use of ODEs
  • + usual UPPAAL features
  • Logic: MITL support.

Greno noble e Summ mmer er Schoo hool Alexand andre e David [9]

slide-10
SLIDE 10

UPPAAL AAL SMC MC

  • Uniform distributions (bounded delay)
  • Exponential distributions (unbounded delay)
  • Discrete probabilistic choices
  • Distribution on successor state – random
  • Hybrid

id flo low by use of OD ODEs

  • + usual UPPAAL features
  • Logic: MITL support.

Greno noble e Summ mmer er Schoo hool Alexand andre e David [10 10]

slide-11
SLIDE 11

UPPAAL AAL SMC MC

  • Uniform distributions (bounded delay)
  • Exponential distributions (unbounded delay)
  • Discrete probabilistic choices
  • Distribution on successor state – random
  • Hybrid flow by use of ODEs
  • + usual UPPAAL features
  • Logi

gic: MITL su supp pport. t.

Greno noble e Summ mmer er Schoo hool Alexand andre e David [11 11]

slide-12
SLIDE 12

Hy Hybrid rid Aut utom

  • mata

ata

H=(L, L, l0,§, , X,E,F,I ,Inv nv)

where

  • L set of locations
  • l0 initial location
  • §=§i [ §o
  • set of actions
  • X set of continuous

variables valuation º: X!R (=RX)

  • E set of edges (l,g,a,Á,l’)

with gµRX and

ÁµRX£R X and a2§

  • For each l a

delay function F(l): R>0£RX ! RX

  • For each l an invariant

Inv(l)µRX

Greno noble e Summ mmer er Schoo hool Alexand andre David [12 12]

Player r 1 Player r 2 Ball

I/O – broadcast sync  input-enabled

slide-13
SLIDE 13

Hy Hybrid rid Aut utom

  • mata

ata

H=(L, L, l0,§, , X,E,F,I ,Inv nv)

where

  • L set of locations
  • l0 initial location
  • §=§i [ §o
  • set of actions
  • X set of continuous

variables valuation º: X!R (=RX)

  • E set of edges (l,g,a,Á,l’)

with gµRX and

ÁµRX£R X and a2§

  • For each l a

delay function F(l): R>0£RX ! RX

  • For each l an invariant

Inv(l)µRX

Greno noble e Summ mmer er Schoo hool Alexand andre David [13 13]

Player r 1 Player r 2 Ball

General “delay”. Handles clock rates.

slide-14
SLIDE 14

Hy Hybrid rid Aut utom

  • mata

ata

Greno noble e Summ mmer er Schoo hool Alexand andre David [14 14]

Semantics ntics

  • States

tes (l, (l,º) ) where º2RX

  • Transit

ansition ions (l, (l,º) ) !d (l, (l,º’) where º’=F(l)(d,º) provided º’2 Inv(l) (l, (l,º) ) !a

a (l’,º’) if

there exists (l,g,a,Á,l’)2E with º2g and (º,º’)2Á and º’2 Inv(l’)

(p = 10; v = 0)

d

! (p = 10 ¡ 9:81=2d2; v = ¡9:81d) bounce! ! (p = 0; v = 14:02 ¢ 0:83) at d = 1:43

d

! (p = 6:92; v = 0) at d = 1:18

d

! (p = 0; v = 11:51) at d = 1:18 bounce! ! : : :

Ball

slide-15
SLIDE 15

Sto toch chastic astic Hy Hybrid rid Aut utoma

  • mata

ta

Greno noble e Summ mmer er Schoo hool Alexand andre David [15 15] * Dirac’s delta functions for deterministic delays / next state

Stoc

  • chasti

tic Seman emanti tics cs

For each state s=(l,º) ) Delay density function* ¹s: R>0! R Output Probability Function °s: §o! [0,1] Next-state density function* ´a s: St! R R where a2§.

Ball Player r 1

𝑄𝑠

1 ℎ𝑗𝑢! 𝑐𝑝𝑣𝑜𝑑𝑓! =

2.5 𝑓−2.5𝑢 𝑒𝑢

𝑢=1.43 𝑢=0

= −𝑓−2.5𝑢

1.43 = 0.97

Player r 2

𝑄𝑠2 ℎ𝑗𝑢! 𝑐𝑝𝑣𝑜𝑑𝑓! = 1 3 𝑒𝑢

𝑢=1.43 𝑢=0

=

1 3

𝑢 0

1.43 = 0.48

(p = 10; v = 0)

d

! (p = 10 ¡ 9:81=2d2; v = ¡9:81d) bounce! ! (p = 0; v = 14:02 ¢ 0:83) at d = 1:43

slide-16
SLIDE 16

Sol

  • lving

ving OD ODEs/S s/Stoc tocha hastic stic Semantic antics

Greno noble e Summ mmer er Scho hool 16

Time Processes Ball Player <Integrator> Fixed delay dt  clock updates. Delay given by distribution  hit! Fixed delay to reach p==0  bounce.

Race between processes. Choice of dt and clock updates can be changed (solver).

slide-17
SLIDE 17

Bi Biol

  • log
  • gical

ical Os Oscillato cillator

slide-18
SLIDE 18

A Bi Biolo

  • logical

gical Os Oscillator illator

  • Circadian oscillator.
  • N. Barkai and S. Leibler. Biological rhythms:

Circadian clocks limited by noise. Nature, 403:267– 268, 2000

  • Two ways to model:

1. Stochastic model that follow the reactions. 2. Continuous model solving the ODEs.

  • Analysis:
  • Evaluate time between peaks.
  • The continuous model is the limit behavior of the

stochastic model.

  • Use frequency analysis for comparison.

Grenoble Summer School 18

slide-19
SLIDE 19

Sto toch chastic astic Mo Model el

Grenoble Summer School 19

slide-20
SLIDE 20

Con

  • ntinuou

tinuous s Mo Model el

Grenoble Summer School 20

slide-21
SLIDE 21

Results ults of

  • f Simulation

mulations

Grenoble Summer School 21

slide-22
SLIDE 22

Fre requenc quency y Doma main in An Anal alysis ysis

(Fou

  • urrier

rrier Tran ansform) sform)

Grenoble Summer School 22

slide-23
SLIDE 23

Time me Betw tween n Peaks ks

  • Use the MITL formula

true U[<=1000] (A>1100 & true U[<=5] A<=1000).

  • Generate monitors (one

shown).

  • Run SMC.

Grenoble Summer School 23

1100 1000 5

slide-24
SLIDE 24

En Energ ergy y Awa Aware re Bu Buil ildings dings

slide-25
SLIDE 25

Wha hat t Thi his s Wor

  • rk

k is Abou

  • ut
  • Find optimal parameters for, e.g., a

controller.

  • Applied to stochastic hybrid systems.
  • Suitable for different domains: biology, avionics…
  • Technique: statistical model-checking.
  • This work: Apply ANOVA to reduce the number of

needed simulations.

Greno noble e Summ mmer er Scho hool 25 25

slide-26
SLIDE 26

Ov Overview view

  • Energy aware buildings
  • The case-study in a nutshell
  • Choosing the parameters
  • Naïve approach
  • Efficiently choosing the (best) parameters
  • ANOVA

Greno noble e Summ mmer er Scho hool 26 26

slide-27
SLIDE 27

Ene nergy gy Awa ware re Bui uildings ldings

  • The case:
  • Building with rooms

ms separated by doors or walls.

  • Contact with the envir

iron

  • nment

ment by windows or walls.

  • Few transportable hea

eat source rces between the rooms.

  • Objective: mainta

ntain in the temperat perature ure within range.

Greno noble e Summ mmer er Scho hool 27 27

slide-28
SLIDE 28

Ene nergy gy Awa ware re Bui uildings ldings

  • Model:
  • Matrix of coefficients for heat transfer between

rooms.

  • Environment temperature  weather model.
  • Different controllers  user profiles.
  • Goal:
  • Op

Optimiz imize e the co control troller er.

Grenoble Summer School 28

slide-29
SLIDE 29

Mo Model el Ov Overview view

Grenoble Summer School 29

Room Room Room Heater Heater

Local bang-bang controllers.

Controller User Profiles (per room) Monitor

Global controller.

Weather model

slide-30
SLIDE 30

Stochas

  • chastic

tic Hy Hybrid rid Model el of f the Room

  • m

Grenoble Summer School 30

slide-31
SLIDE 31

Mo Model el of

  • f the

the He Heate ter

Grenoble Summer School 31

Local “bang-bang” controller.

slide-32
SLIDE 32

Ma Main in Con

  • ntroller

troller

Greno noble e Summ mmer er Scho hool 32 32

slide-33
SLIDE 33

Dyna namic mic User Profile

  • file

Greno noble e Summ mmer er Scho hool 33

slide-34
SLIDE 34

Global

  • bal Mo

Moni nitoring toring

Grenoble Summer School 34

+ Maximize comfort.

  • Minimize energy.

? Play with Ton and Tget. (Possible with Toff but not here).

slide-35
SLIDE 35

Simulations mulations

Greno noble e Summ mmer er Scho hool 35 35

Weather Model User Profile

slide-36
SLIDE 36

Simulations mulations

Greno noble e Summ mmer er Scho hool 36 36

simulate 1 [<=2*day]{ T[1], T[2], T[3], T[4], T[5] } simulate 1 [<=2*day]{ Heater(1).r,Heater(2).r,Heater(3).r }

slide-37
SLIDE 37

Ho How w to to Pi Pick ck th the Parame rameter ter Va Value lues? s?

  • Ton, Tget ∈ 16,22 → 49 𝑒𝑗𝑡𝑑𝑠𝑓𝑢𝑓 𝑑ℎ𝑝𝑗𝑑𝑓𝑡.

More if considering other parameters.

  • Stochastic simulations.
  • Weather not deterministic.
  • User not deterministic (present, absent…)
  • How to decide that one combination is

better?

  • Probabilistic comparisons?

49*48 comparisons * number of runs.

  • To optimize what? Discomfort or energy?

Greno noble e Summ mmer er Scho hool 37 37

slide-38
SLIDE 38

Ho How w to to Pi Pick ck th the Parame rameter ter Va Value lues? s?

  • Remark:
  • Stochastic hybrid system

 SMC

  • Idea:
  • Generate runs.
  • Plot the result energy/comfort.
  • Pick the Pareto frontier of the means.
  • How many runs do you need?
  • What’s the significance of the results?

Greno noble e Summ mmer er Scho hool 38 38

energy discomfort

slide-39
SLIDE 39

“Naïve” Solution

  • Estimate the probabilities

Pr[discomfort<=100](<> time >= 2*day) Pr[energy<=1000](<> time >= 2*day)

  • From the obtained distributions (confidence

known), compute the means.

  • Pick the Pareto frontier of the means.

Greno noble e Summ mmer er Scho hool 39 39

discomfort

probability

slide-40
SLIDE 40

“Naïve” Approach

Greno noble e Summ mmer er Scho hool 40 40

For each (Ton,Tget)

energy discomfort

slide-41
SLIDE 41

ANOVA OVA Me Meth thod

  • d
  • Compare several distributions.
  • Evaluate influence of each factor on the outcome.
  • Generalization of Student’s t-test.
  • Compare 2 distributions using the mean of their

difference.

  • If confidence interval does not include zero,

distributions are significantly different.

  • Cheaper than evaluating 2 means + on-the-fly

possible.

Greno noble e Summ mmer er Scho hool 41 41

slide-42
SLIDE 42

ANOVA OVA Me Meth thod

  • d
  • 2-factor factorial experiment design
  • Ton, Tget are our 2 factors.
  • Each combination gives a distribution to compare.
  • Measure cost outcome (discomfort or energy).
  • ANOVA estimates a linear model and

computes the influence of each factor.

  • The measure of the influence is the F-statistic.
  • This is translated into P-value, the factor

significance.

  • Assume balanced experiments.

Greno noble e Summ mmer er Scho hool 42 42

slide-43
SLIDE 43

ANOVA OVA Me Meth thod

  • d
  • Generate balanced measurements for each

configuration to compare.

  • Apply ANOVA on the data (used the tool R).
  • If the factors are not significant, goto 1.
  • Reuse the data and compute the confidence

intervals of the means for each comparison.

  • Compute the Pareto frontier.

Greno noble e Summ mmer er Scho hool 43 43

Fewer runs, more efficient than before.

slide-44
SLIDE 44

ANOVA OVA Resul ults ts

Greno noble e Summ mmer er Scho hool 44 44

P<0.05significant

slide-45
SLIDE 45

Results ults

Greno noble e Summ mmer er Scho hool 45 45

slide-46
SLIDE 46

Vi Visualization sualization of

  • f th

the Co Cost st Mo Model el

Greno noble e Summ mmer er Scho hool 46 46

slide-47
SLIDE 47

Results ults

Greno noble e Summ mmer er Scho hool 47 47

slide-48
SLIDE 48

Comp

  • mparis

arison

  • n
  • Naïve approach:

738 runs per evaluation per cost *2 (energy & discomfort) *49 (configurations).  1h 5min

  • ANOVA:

3136 runs  6min 6s.

  • Core i7 2600

Greno noble e Summ mmer er Scho hool 48 48

slide-49
SLIDE 49

Discussion cussion

  • Analysis of variance used sequentially to

decide when there is enough data to distinguish the effect of 2 factors.

  • Efficient use of SMC.
  • What if the factor has no influence?
  • Need an alternative test.
  • Possible to distribute.
  • Future work: Integrate ANOVA in UPPAAL

Greno noble e Summ mmer er Scho hool 49 49

slide-50
SLIDE 50

Hy Hybr brid id Con Contr trol

  • ller

ler Sy Synth nthesis sis

SMC

slide-51
SLIDE 51

Sto toch chastic astic Hy Hybrid rid Systems tems

Greno noble e Summ mmer er Schoo hool Alexand andre David [51 51]

  • n/off
  • n/off

Room 1 Room 2 Heate ter

simulate 1 [<=100]{Temp(0).T, Temp(1).T} simulate 10 [<=100]{Temp(0).T, Temp(1).T} Pr[<=100](<> Temp(0).T >= 10) Pr[<=100](<> Temp(1).T<=5 and time>30) >= 0.2

slide-52
SLIDE 52

Room

const int Tenv=7; const int k=2; const int H=20; const int TB[4]= {12, 18, 25, 28};

Con

  • ntr

trol

  • ller

ler Synt nthesi hesis

Greno noble e Summ mmer er Schoo hool Alexand andre David [52 52]

  • n/off

?? ??

const int Tenv=7; const int k=2; const int H=20; const int TB[4]= {12, 18, 25, 28};

low normal high critic ical al high critic ical al low

12 12 18 18 25 25 28 28

Room

Room Heater er Room

slide-53
SLIDE 53

Unf nfol

  • lding

ding

Greno noble e Summ mmer er Schoo hool Alexand andre David [53 53]

low normal high critic ical al high critic ical al low

12 12 18 18 25 25 28 28

slide-54
SLIDE 54

Timing ming

Greno noble e Summ mmer er Schoo hool Alexand andre David [54 54]

low normal high critic ical al high critic ical al low

12 12 18 18 25 25 28 28

slide-55
SLIDE 55

TA Abstracti traction

  • n

Greno noble e Summ mmer er Schoo hool Alexand andre David [55 55]

const int uL[3]={3,5,2}; const int uU[3]={4,6,3}; const int dL[3]={3,9,15}; const int dU[3]={4,10,16}

slide-56
SLIDE 56

Va Validation lidation by co co-Simulation Simulation

Greno noble e Summ mmer er Schoo hool Alexand andre David [56 56]

slide-57
SLIDE 57

Va Validation lidation by co co-Simulation Simulation

Greno noble e Summ mmer er Schoo hool Alexand andre David [57 57]

const int uL[3]={3,8,2}; const int uU[3]={4,9,3}; const int dL[3]={3,9,15}; const int dU[3]={4,10,16}

slide-58
SLIDE 58

Synt nthesis hesis us using ng TIG IGA

Alexand andre David [58 58] Greno noble e Summ mmer er Schoo hool

slide-59
SLIDE 59

Ot Othe her Case se Stu tudies dies

FIREWIRE BLUETOOTH 10 node LMAC Battery Scheduling

Alexand andre David [59 59] Greno noble e Summ mmer er Schoo hool

Energy Aware Buildings Genetic Oscilator (HBS) Passenger Seating in Aircraft Schedulability Analysis for Mix Cr Sys Smart Grid Demand / Response