Toward Self-Adaptive Software Employing Model Predictive Control - - PowerPoint PPT Presentation

toward self adaptive software employing model predictive
SMART_READER_LITE
LIVE PREVIEW

Toward Self-Adaptive Software Employing Model Predictive Control - - PowerPoint PPT Presentation

Toward Self-Adaptive Software Employing Model Predictive Control NII Shonan Meeting on Controlled Adaptation of Self-Adaptive Systems (CASaS) Shonan, Japan, April 24-28, 2016 Holger Giese , Thomas Vogel , and Sona Ghahremani Hasso Plattner


slide-1
SLIDE 1

Toward Self-Adaptive Software Employing Model Predictive Control

NII Shonan Meeting on Controlled Adaptation of Self-Adaptive Systems (CASaS) Shonan, Japan, April 24-28, 2016

Holger Giese, Thomas Vogel, and Sona Ghahremani Hasso Plattner Institute University of Potsdam, Germany holger.giese@hpi.de, thomas.vogel@hpi.de http://hpi.de/giese/

slide-2
SLIDE 2

What is Model-Predictive Control?

Idea of Model-Predictive Control (MPC):

  • Make required control decision based
  • n predictions for a model of the

controlled process by solving a related optimization problem (e.g., maximizing a profit function, minimizing a cost function, maximizing a production rate) at runtime.

  • Usually MPC is running on top of

simpler controllers (e.g., PID) that control the subsystems of the process according to the control inputs from MPC (hierarchical control). Capabilities:

  • Can handle complex MIMO processes
  • Can realize different optimization

goals

  • Can handle constraints on the control

inputs and process outputs/state

  • Can compensate loss of actuators

(determine control structure + check for ill-conditioning)

  • Can be combined with online

identification Remark: also named moving horizon control or receding horizon control

2 25.04.16

“Model predictive control has had a major impact on industrial practice, with thousands of applications world-wide.”

[Seborg+2011]

  • H. Giese & T. Vogel | Toward Self-Adaptive Software Employing Model Predictive Control | CASaS 2016
slide-3
SLIDE 3

Advanced MPC in Terms of MAPE-K

  • H. Giese & T. Vogel | Toward Self-Adaptive Software Employing Model Predictive Control | CASaS 2016

3 25.04.16

  • nline

identification beh. model

Runtime model Activity

state identification current state static

  • ptimization
  • ptimal

state dynamic

  • ptimization
  • ptimization

function

  • Seq. of

control actions execute first control action

analyze plan monitor execute knowledge

slide-4
SLIDE 4

Mapping Advanced MPC to classical MPC

  • H. Giese & T. Vogel | Toward Self-Adaptive Software Employing Model Predictive Control | CASaS 2016

4

[Seborg+2011] Classical linear MPC: Advanced MPC:

25.04.16

  • nline

identification beh. model state identification current state static

  • ptimization
  • ptimal

state dynamic

  • ptimization
  • ptimization

function

  • Seq. of

control actions execute first control action

analyze plan monitor execute

knowledge

slide-5
SLIDE 5
  • ver time accumulated utility (reward)

Finite Receding Horizons in MPC

  • (prediction horizon – control horizon) * sampling time ≈ settling time

(horizons = number of considered steps)

  • Sequence decision problem (agents)
  • H. Giese & T. Vogel | Toward Self-Adaptive Software Employing Model Predictive Control | CASaS 2016

5 25.04.16

utility of state control

  • ld opt.

state new opt. state control horizon prediction horizon

slide-6
SLIDE 6

Example: Self-Repair

  • Failures of different types:

– Various exceptions – Crash of a component – ...

  • Multiple repair strategies

for each failure type: – Restart the component – Redeploy the component – Replace the component – ... 1. Which strategy should be applied to repair a specific failure? 2. If there are multiple failures, which one should be repaired first?

  • H. Giese & T. Vogel | Toward Self-Adaptive Software Employing Model Predictive Control | CASaS 2016

6 25.04.16

slide-7
SLIDE 7

Architectural meta model

Example: MAPE-K with EUREMA & MORISIA

25.04.16 7

  • H. Giese & T. Vogel | Toward Self-Adaptive Software Employing Model Predictive Control | CASaS 2016

Performance meta model Failure meta model

EJB meta model

[Vogel+2009, EUREMA] Adaptation engine Plan rules Analysis rules

(Executable Runtime Megamodels)

mdelab.de/mdelab-projects/software-engineering- for-self-adaptive-systems/eurema/

(Models at Runtime for Self- Adaptive Software)

mdelab.de/mdelab-projects/software-engineering-for-self-adaptive- systems/morisia/

slide-8
SLIDE 8

Example: Analysis & Plan - Which strategy to apply?

25.04.16

  • H. Giese & T. Vogel | Toward Self-Adaptive Software Employing Model Predictive Control | CASaS 2016

8

k: number of prediction steps

  • Predicting two steps, Restart appears to be the better strategy
  • Predicting seven steps, Redeploy appears to be better (e.g.,

using a different node with more resources)

  • Short vs. long term (steady state utility dominates reward)
slide-9
SLIDE 9

Example: Analysis & Plan – Which failure to repair first?

25.04.16

  • H. Giese & T. Vogel | Toward Self-Adaptive Software Employing Model Predictive Control | CASaS 2016

9

Explore the strategies for the different failures (f1 and f2):

  • Steady state utility is the same but order matters considering

the reward

  • Repair the failure first whose repairing improves most the

reward (f1)

slide-10
SLIDE 10

Utility-Based View of the Solution Space

Analysis: Check whether the current state is optimal concerning its utility

 Static optimization: Check whether a better optimal solution state exists.

(side-effect is that we also have one optimal/satisficing goal state)

Planning: Find a path with optimal rewardleading to the chosen solution

 Dynamic optimization: what is the optimal path to the chosen solution state  Trivial in case solution space can be easily configured

25.04.16

  • H. Giese & T. Vogel | Toward Self-Adaptive Software Employing Model Predictive Control | CASaS 2016

10

Valid solutions .

positive negative

  • ptimal

control process

find goal state (with max. utility) find path to goal state (with max. reward)

slide-11
SLIDE 11

Cases for the Selection of the Horizons

  • Solution space is not fragmented (you can compensate “failures” ...)

➔ (small) finite horizon may be sufficient

  • No or unlikely interference with process behavior

➔ usually 0 settling time ➔ prediction horizon = control horizon

  • Multiple control inputs feasible in one control step

➔ receding horizon may be skipped or “reduced” ...

  • H. Giese & T. Vogel | Toward Self-Adaptive Software Employing Model Predictive Control | CASaS 2016

11 25.04.16

  • ver time accumulated utility (reward)

utility of state control

  • ld opt.

state new opt. state control horizon prediction horizon

slide-12
SLIDE 12

Beyond Classical and Advanced MPC

  • Infinite horizon can lead to better results (if long term

predictions are accurate), as it considered the steady state assuming optimal behavior, but it requires more resources.

  • Stochastic MPC considers probabilities for process

behavior and optimizes the expected reward. Beyond advanced MPC:

  • For non-deterministic models (e.g. PTA) the control

inputs (strategy) requires to be safe (any or too high risk is avoided by excluding unsafe control options).

  • Agents learning the expected rewards (not via state)

leads to predict reward rather than process behavior.

25.04.16

  • H. Giese & T. Vogel | Toward Self-Adaptive Software Employing Model Predictive Control | CASaS 2016

12

slide-13
SLIDE 13

Beyond MPC: Layered Architecture & Adapt

  • Adapt MPC (monitor, analysis, plan, execute)? e.g., adapt rules, attention
  • Adapt underlying controllers (omitted in the architecture)

25.04.16

  • H. Giese & T. Vogel | Toward Self-Adaptive Software Employing Model Predictive Control | CASaS 2016

13

slide-14
SLIDE 14

Conclusions & Outlook

  • MPC can handle many properties of complex process models typically

present for software (MIMO, different optimization goals, constraints on the control inputs and process outputs/state, loss of actuators)

  • Advanced MPC seems suitable as a framework to understand and fine-

tune many approaches based on models and related predictions. – Can employ for a variety of techniques (simulation, optimization, search, synthesis, ...) and models (linear, non-linear, state space, probabilistic) ...

  • The horizons for control and predictions result in a useful design space in

many cases (depending on the characteristics of the state space). – Enlarging the control and prediction horizon can help to engineer more accurate solutions (infinite = optimal?) – Limitation of the control and prediction horizon (and also input blocking) can help to engineer better scalable solutions

  • But: MPC with bad models of the process don’t work!
  • H. Giese & T. Vogel | Toward Self-Adaptive Software Employing Model Predictive Control | CASaS 2016

14 25.04.16

slide-15
SLIDE 15

References

[Calinescu+2011] Radu Calinescu, Lars Grunske, Marta Kwiatkowska, Raffaela Mirandola and Giordano Tamburrelli. Dynamic QoS Management and Optimization in Service-Based Systems. In IEEE Transactions on Software Engineering, Vol. 37(3):387-409, IEEE Computer Society, Los Alamitos, CA, USA, 2011. [Seborg+2011] Dale E. Seborg, Thomas F. Edgar, Duncan A. Mellichamp, Francis J. Doyle III: Process Dynamics and Control (Third Edition), Wiley, 2011. [Vogel+2009] Thomas Vogel, Stefan Neumann, Stephan Hildebrandt, Holger Giese and Basil Becker. Model-Driven Architectural Monitoring and Adaptation for Autonomic Systems. In Proceedings of the 6th IEEE/ACM International Conference on Autonomic Computing and Communications (ICAC 2009), Barcelona, Spain, ACM, June 2009. [EUREMA] Thomas Vogel and Holger Giese: Model-Driven Engineering of Self- Adaptive Software with EUREMA, ACM Trans. Auton. Adapt. Syst.,

  • vol. 8, no. 4, pp. 18:1-18:33, 2014.
  • H. Giese & T. Vogel | Toward Self-Adaptive Software Employing Model Predictive Control | CASaS 2016

15 25.04.16