optimizing control strategy using smc - nasa control strategy.pdf · •generalization of...
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/1.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/2.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/3.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/4.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/5.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/6.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/7.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/8.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/9.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/10.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/11.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/12.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/13.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/14.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/15.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/16.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/17.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/18.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/19.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/20.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/21.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/22.jpg)
“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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/23.jpg)
“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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/24.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/25.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/26.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/27.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/28.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/29.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/30.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/31.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/32.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/33.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/34.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022041713/5e49cac8aa0309774d01bc43/html5/thumbnails/35.jpg)
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