optimizing control strategy using smc - nasa control strategy.pdf · •generalization of...

35
Optimizing Control Strategy Using SMC Alexandre David Dehui Du Kim G. Larsen Axel Legay Marius Mikucionis

Upload: others

Post on 03-Feb-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

Optimizing Control Strategy Using SMC

Alexandre David Dehui Du

Kim G. Larsen Axel Legay

Marius Mikucionis

Page 2: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

What This Work is About

• 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.

16/05/2013 NFM 2

Page 3: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

Overview

• Energy aware buildings

– The case-study in a nutshell

• Choosing the parameters

– Naïve approach

• Efficiently choosing the (best) parameters

– ANOVA

16/05/2013 NFM 3

Page 4: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

Energy Aware Buildings

• The case:

– Building with rooms separated by doors or walls.

– Contact with the environment by windows or walls.

– Few transportable heat sources between the rooms.

– Objective: maintain the temperature within range.

16/05/2013 NFM 4

Page 5: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

Energy Aware Buildings

• Model:

– Matrix of coefficients for heat transfer between rooms.

– Environment temperature weather model.

– Different controllers user profiles.

• Goal:

– Optimize the controller.

16/05/2013 NFM 5

Page 6: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

Energy Aware Buildings

• Model:

– Matrix of coefficients for heat transfer between rooms.

– Environment temperature weather model.

– Different controllers user profiles.

• Goal:

– Optimize the controller.

16/05/2013 NFM 6

Page 7: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

Model Overview

16/05/2013 NFM 7

Room

Room

Room

Heater

Heater

Local bang-bang controllers.

Controller

User Profiles (per room)

Monitor

Global controller.

Weather model

Page 8: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

Stochastic Timed Automata

16/05/2013 NFM 8 Kim Larsen [8]

Uniform Distribution

Page 9: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

Stochastic Timed Automata

16/05/2013 NFM 9 Kim Larsen [9]

Uniform Distribution

Page 10: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

Stochastic Timed Automata

16/05/2013 NFM 10

Exponential Distribution

Input enabled broadcast channels

Page 11: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

Stochastic Timed Automata

16/05/2013 NFM 11

Exponential Distribution

Input enabled broadcast channels

Composition = Repeated races between components

Page 12: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

Stochastic Hybrid Model of the Room

16/05/2013 NFM 12

Page 13: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

Stochastic Hybrid Model of the Room

16/05/2013 NFM 13

Page 14: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

Model of the Heater

16/05/2013 NFM 14

Local “bang-bang” controller.

Page 15: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

Main Controller

16/05/2013 NFM 15

Page 16: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

Global Monitoring

16/05/2013 NFM 16

+ Maximize comfort. - Minimize energy. ? Play with Ton and Tget. (Possible with Toff but not here).

Page 17: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

Simulations

16/05/2013 NFM 17

Weather Model

User Profile

Page 18: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

Simulations

16/05/2013 NFM 18

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 }

Page 19: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

How to Pick the Parameter Values?

• 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? 16/05/2013 NFM 19

Page 20: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

How to Pick the Parameter Values?

• 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?

16/05/2013 NFM 20

energy

discomfort

Page 21: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

How to Pick the Parameter Values?

• 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?

16/05/2013 NFM 21

energy

discomfort

Page 22: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

“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.

16/05/2013 NFM 22

discomfort

probability

Page 23: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

“Naïve” Approach

16/05/2013 NFM 23

For each (Ton,Tget)

energy

discomfort

Page 24: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

ANOVA Method

• 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.

16/05/2013 NFM 24

Page 25: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

ANOVA Method

• 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. 16/05/2013 NFM 25

Page 26: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

ANOVA Method

1. Generate balanced measurements for each configuration to compare.

2. Apply ANOVA on the data (used the tool R).

3. If the factors are not significant, goto 1.

4. Reuse the data and compute the confidence intervals of the means for each comparison.

5. Compute the Pareto frontier.

16/05/2013 NFM 26

Page 27: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

ANOVA Method

1. Generate balanced measurements for each configuration to compare.

2. Apply ANOVA on the data (used the tool R).

3. If the factors are not significant, goto 1.

4. Reuse the data and compute the confidence intervals of the means for each comparison.

5. Compute the Pareto frontier.

16/05/2013 NFM 27

Page 28: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

ANOVA Method

1. Generate balanced measurements for each configuration to compare.

2. Apply ANOVA on the data (used the tool R).

3. If the factors are not significant, goto 1.

4. Reuse the data and compute the confidence intervals of the means for each comparison.

5. Compute the Pareto frontier.

16/05/2013 NFM 28

Fewer runs, more efficient than before.

Page 29: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

ANOVA Results

16/05/2013 NFM 29

P<0.05significant

Page 30: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

Results

16/05/2013 NFM 30

Page 31: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

Visualization of the Cost Model

16/05/2013 NFM 31

Page 32: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

Results

16/05/2013 NFM 32

Page 33: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

Comparison

• Naïve approach: 738 runs per evaluation per cost *2 (energy & discomfort) *49 (configurations). 1h 5min

• ANOVA: 3136 runs 6min 6s.

• Core i7 2600

16/05/2013 NFM 33

Page 34: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

Conclusion

• 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

16/05/2013 NFM 34

Page 35: Optimizing Control Strategy Using SMC - NASA Control Strategy.pdf · •Generalization of Student’s t-test. –Compare 2 distributions using the mean of their difference. –If

Conclusion

• 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

16/05/2013 NFM 35