Feedback Control for Real-Time Systems Chenyang Lu Cyber-Physical - - PowerPoint PPT Presentation

feedback control for real time systems
SMART_READER_LITE
LIVE PREVIEW

Feedback Control for Real-Time Systems Chenyang Lu Cyber-Physical - - PowerPoint PPT Presentation

Feedback Control for Real-Time Systems Chenyang Lu Cyber-Physical Systems Laboratory Department of Computer Science and Engineering CPS Week 2013 Outline q CPU UClizaCon Control for Distributed Real-Time Systems q Model PredicCve Control q


slide-1
SLIDE 1

CPS Week 2013

Feedback Control for Real-Time Systems

Chenyang Lu

Cyber-Physical Systems Laboratory Department of Computer Science and Engineering

slide-2
SLIDE 2

CPS Week 2013

Outline

q CPU UClizaCon Control for Distributed Real-Time Systems

q Model PredicCve Control

q Thermal Control for Real-Time Systems

q Nested Control Design

2

slide-3
SLIDE 3

CPS Week 2013

Outline

q CPU UClizaCon Control for Distributed Real-Time Systems

q Model PredicCve Control

q Thermal Control for Real-Time Systems

q Nested Control Design

3

slide-4
SLIDE 4

CPS Week 2013

4

Control for Distributed Real-Time Systems

q Common characterisCcs of compuCng problems

q MIMO: mulC-input (knobs), mulC-output (objecCves) q Coupling between objecCves. q Constraints on knobs.

q Model PredicCve Control

q OpCmizaCon + PredicCon + Feedback

slide-5
SLIDE 5

CPS Week 2013

5

Why CPU U?liza?on Control?

q Overload protecCon

q CPU over-uClizaCon à system crash

q Meet response Cme requirement

q CPU uClizaCon < bound à meet deadlines

slide-6
SLIDE 6

CPS Week 2013

6

Challenge: Uncertain?es

q ExecuCon Cmes?

q Unknown sensor data or user input

q Request arrival rate?

q Aperiodic events q Bursty service requests

q Disturbance?

q Denial of Service a[acks

Control-theoreCc approach à Robust uClizaCon control in face of workload uncertainty

slide-7
SLIDE 7

CPS Week 2013

7

End-to-End Tasks in Distributed Systems

q Task Ti: sequence of subtasks {Tij} on different processors

q Periodic: All the subtasks of a task run at a same rate.

q Task rate can be adjusted

q Within a range q Higher rate à higher uClity

Remote Invocation Subtask

T1 T2 T3 T11 T12 T13

P1 P2 P3

slide-8
SLIDE 8

CPS Week 2013

8

q Bi: UClizaCon set point of processor Pi (1 ≤ i ≤ n) q ui(k): UClizaCon of Pi in the kth sampling period q rj(k): Rate of task Tj (1 ≤ j ≤ m) in the kth sampling period subject to rate constraint: Rmin,j ≤ rj(k) ≤ Rmax,j (1 ≤ j ≤ m)

Problem Formula?on

min

{rj (k)|1≤ j≤n}

(Bi − ui(k))2

i=1 n

slide-9
SLIDE 9

CPS Week 2013

9

Single-Input-Single-Output (SISO) Control

Single Processor

Monitor Processor OS Application Sensor Inputs Set point Us = 69% Task Rates R1: [1, 5] Hz R2: [10, 20] Hz Middleware Actuator Controller u(k) {r(k+1)}

  • C. Lu, X. Wang, and C. Gill, Feedback Control Real-Time Scheduling in

ORB Middleware, IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS'03), May 2003.

slide-10
SLIDE 10

CPS Week 2013

10

New in Distributed Systems

q Need to control uClizaCon of mulCple CPUs q UClizaCon of CPUs are coupled due to end-to-end tasks

à ReplicaCng a SISO controller on all processors does not work!

q Constraints on task rates

T1 T2 T3 T11 T12 T13

P1 P2 P3

slide-11
SLIDE 11

CPS Week 2013

11

EUCON: Mul?-Input-Mul?-Output Control

⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ Δ Δ ) ( ) (

1

k r k r

m

  • Model

Predictive Controller B

1

 Bn ! " # # # # $ % & & & & , Rmin,1  Rmin,m Rmax,1  Rmax,m ! " # # # # $ % & & & &

⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ ) ( ) (

1

k u k u

n

  • Distributed System

(m tasks, n processors)

Utilization Monitor Rate Modulator RM UM UM RM Feedback Loop Remote Invocation Subtask

Control Input Measured Output

  • C. Lu, X. Wang and X. Koutsoukos, Feedback Utilization Control in

Distributed Real-Time Systems with End-to-End Tasks, IEEE Transactions

  • n Parallel and Distributed Systems, 16(6): 550-561, June 2005.
slide-12
SLIDE 12

CPS Week 2013

12

Control Design Methodology

1. Derive a dynamic model of the system 2. Design a controller 3. Analyze stability

slide-13
SLIDE 13

CPS Week 2013

13

Dynamic Model: One Processor

q Si: set of subtasks on Pi q cjl: esCmated execuCon Cme of Til q gi: uClizaCon gain of Pi

q raCo between actual and esCmated change in uClizaCon q models uncertainty in execuCon Cmes

ui(k) = ui(k −1) + gi c jlΔrj(k −1)

T jl ∈Si

slide-14
SLIDE 14

CPS Week 2013

14

Dynamic Model: Mul?ple Processors

q G: diagonal matrix of uClizaCon gains q F: subtask allocaCon matrix q models the coupling among processors

q fij = cjl if task Tj has a subtask Tjl on processor Pi q fij = 0 if Tj has no subtask on Pi

u(k) = u(k-1) + GFΔr(k-1)

T1 T2 T11

P1 P2

T21 T22 T3 T31

⎥ ⎦ ⎤ ⎢ ⎣ ⎡ =

31 22 21 11

c c c c F

slide-15
SLIDE 15

CPS Week 2013

15

Model Predic?ve Control

q Suitable for coupled MIMO control problems with constraints. q Compute input to minimize cost over a future interval.

q Cost funcCon: tracking error and control cost. q Predict cost based on a system model and feedback. q Compute input subject to constraints.

q OpCmizaCon + PredicCon + Feedback

slide-16
SLIDE 16

CPS Week 2013

q Cost q Reference trajectory: exponenCal convergence to B

Cost Func?on

16

V(k) = u(k + i) − ref (k + i)

2 i=1 P

+ Δr(k + i) − Δr(k + i −1)

2 i= 0 M −1

Tracking Error Control Cost

ref (k +i) = B −e

− Ts Tref i

(B −u(k))

slide-17
SLIDE 17

CPS Week 2013

17

Model Predic?ve Controller

At the end of each sampling period

q Compute inputs in future sampling periods Δr(k), Δr(k+1), ... Δr(k+M-1) to minimize the cost funcCon q Cost is predicted using (1) feedback u(k-1) (2) approximate dynamic model q Apply Δr(k) to the system

At the end of the next sampling period

q Shic Cme window and re-compute Δr(k+1), Δr(k+2), ... Δr(k+M) based

  • n feedback
slide-18
SLIDE 18

CPS Week 2013

18

EUCON Controller

Least Squares Solver

⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ ) ( ) (

1

k u k u

n

⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ Δ Δ ) ( ) (

1

k r k r

m

  • Model Predictive Controller

System Model Cost Function Reference Trajectory

⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡

n

B B

  • 1

Rate Constraints Least Squares Solver

⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ ) ( ) (

1

k u k u

n

⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ Δ Δ ) ( ) (

1

k r k r

m

  • Model Predictive Controller

System Model Cost Function Reference Trajectory

⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡

n

B B

  • 1

Rate Constraints

Difference from reference trajectory Desired trajectory for u(k) to converge to B Constrained

  • p?miza?on

solver

⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ + Δ + Δ ) 1 ( ) 1 (

1

k r k r

m

slide-19
SLIDE 19

CPS Week 2013

19

Stability Analysis

q Stability: uClizaCon of all processors converge to set points q Derive stability condiCon à range of G q Tolerable variaCon of execuCon Cmes à Provides analyCcal assurance despite uncertainty

slide-20
SLIDE 20

CPS Week 2013

20

Stable System

0.2 0.4 0.6 0.8 1

50 100 150 200 250 300

Time (sampling period) CPU utilization P1 P2 Set Point

execuCon Cme factor = 0.5 (actual execuCon Cmes = ½ of esCmates)

slide-21
SLIDE 21

CPS Week 2013

21

Unstable System

execuCon Cme factor = 7 (actual execuCon Cmes = 7 Cmes esCmates)

0.2 0.4 0.6 0.8 1 100 200 300 Time (sampling period) CPU utilization P1 P2 Set Point

slide-22
SLIDE 22

CPS Week 2013

22

Stability

q Stability condiCon à tolerable range of execuCon Cmes AnalyCcal assurance on uClizaCons despite uncertainty

actual execution time / estimation Predicted bound for stability

slide-23
SLIDE 23

CPS Week 2013

23

FC-ORB Middleware

Feedback lane

Remote request lanes

Priority Manager Rate Modulator Model Predic?ve Controller

Remote request lanes

U?liza?on Monitor

⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ ) ( ) ( ) (

3 2 1

k u k u k u

Measured Output

⎥ ⎦ ⎤ ⎢ ⎣ ⎡ ) ( ) (

2 1

k r k r

Control Input Priority Manager Rate Modulator U?liza?on Monitor Priority Manager Rate Modulator U?liza?on Monitor

  • X. Wang, C. Lu and X. Koutsoukos, Enhancing the Robustness of

Distributed Real-Time Middleware via End-to-End Utilization Control, IEEE Real-Time Systems Symposium (RTSS'05), December 2005.

slide-24
SLIDE 24

CPS Week 2013

24

Workload Uncertainty

Cme-varying execuCon Cmes disturbance from periodic tasks

slide-25
SLIDE 25

CPS Week 2013

25

Processor Failure

1. Norbert fails. 2. move its tasks to other processors. 3. reconfigure controller 4. control u?liza?on by adjus?ng task rates

slide-26
SLIDE 26

CPS Week 2013

26

Summary: Model Predic?ve Control

q ApplicaCon to CPU uClizaCon control

q Robust uClizaCon control for distributed systems q Handle coupling among processors q Enforce constraints on task rates q Analyze tolerable range of execuCon Cmes

q Applicable to many compuCng problems

q MIMO: mulC-input (knobs), mulC-output (objecCves) q Coupling between objecCves q Constraints on knobs

slide-27
SLIDE 27

CPS Week 2013

Outline

q CPU UClizaCon Control for Distributed Real-Time Systems

q Model PredicCve Control

q Thermal Control for Real-Time Systems

q Nested Control Design

27

slide-28
SLIDE 28

CPS Week 2013

Nested Control

q MulCple control objecCves

q Coupling between objecCves q Dynamics at different Cme scales

q Approach: Nested feedback control loop

28

slide-29
SLIDE 29

CPS Week 2013

Thermal Control for Real-Time Systems

q Temperature control

q Prevent processor overheaCng q Avoid hardware thro[ling à unpredictable slowdown

q UClizaCon control

q Maintain real-Cme performance q Enforce schedulable uClizaCon bound

q UncertainCes

q Power, ambient temperature, thermal faults, execuCon Cme

29

slide-30
SLIDE 30

CPS Week 2013

Goals

q Enforce both thermal and real-Cme constraints

q Temperature bound Tb < hardware thro[ling threshold q CPU uClizaCon bound Ub < schedulable uClizaCon bound

q Robust against uncertainCes q Run-Cme efficiency

30

slide-31
SLIDE 31

CPS Week 2013

Control-theore?c Approach

q Deal with uncertainCes through feedback control

q Rate adaptaCon based on temperature and uClizaCon feedback

q Nested control structure

q Modular: separate controllers for temperature and uClizaCon q Efficiency control algorithms: O(1) complexity q Rigorous stability and sensiCvity analysis

31

  • Y. Fu, N. Kottenstette, Y. Chen, C. Lu, X. Koutsoukos and H. Wang,

Feedback Thermal Control for Real-time Systems, IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS'10), April 2010.

slide-32
SLIDE 32

CPS Week 2013

Dynamic System Model

32

Tasks rates (control input) Temperature (controlled variable)

Power

U(k +1) = U(k) + Gu ciΔr

i i

P(k) = GpP

aU(k) + P idle(1−U(k))

dT(t) dt = −c2(T(t) − T0) + c1P(t) Thermal Control UClizaCon Control

UClizaCon (control input) (controlled variable)

slide-33
SLIDE 33

CPS Week 2013

TCUB: Thermal Control under U?liza?on Bound

q Outer loop: thermal control

q Handle slower thermal dynamics

q Inner loop: CPU uClizaCon control

q Handle faster load dynamics

33

U(k’)

TCUB

Thermal Controller

Processor

Rate Actuator UClizaCon Monitor Thermal Monitor UClizaCon Controller Tb Ub T(k) U(k’) Us(k) {△ri(k’) } Tasks

slide-34
SLIDE 34

CPS Week 2013

Varying Power

Ac?ve power = 2 x es?mate

34

TCUB UClizaCon Control

slide-35
SLIDE 35

CPS Week 2013

Varying Execu?on Times

Execu?on ?me = 2 x es?mate

35

TCUB Thermal Control

slide-36
SLIDE 36

CPS Week 2013

Summary: Nested Control

q Example: Thermal control for real-Cme systems

q Control both temperature and uClizaCon bounds q Robust against uncertainCes

q Nested control approach

q Control variables with dynamics at different Cme scales q Modular design q Efficient control algorithm

36

slide-37
SLIDE 37

CPS Week 2013

37

References

q Centralized Control (EUCON): C. Lu, X. Wang and X. Koutsoukos, Feedback UClizaCon Control in Distributed Real-Time Systems with End-to-End Tasks, IEEE TransacCons on Parallel and Distributed Systems, 16(6): 550-561, June 2005. q Middleware (FC-ORB): X. Wang, C. Lu and X. Koutsoukos, Enhancing the Robustness of Distributed Real-Time Middleware via End-to-End UClizaCon Control, IEEE Real-Time Systems Symposium (RTSS'05), December 2005. q Decentralized Control (DEUCON): X. Wang, D. Jia, C. Lu and X. Koutsoukos, DEUCON: Decentralized End-to-End UClizaCon Control for Distributed Real-Time Systems, IEEE TransacCons on Parallel and Distributed Systems, 18(7): 996-1009, July 2007. q Thermal Control (Single Core): Y. Fu, N. Ko[enste[e, Y. Chen, C. Lu, X. Koutsoukos and H. Wang, Feedback Thermal Control for Real-Cme Systems, IEEE Real-Time and Embedded Technology and ApplicaCons Symposium (RTAS'10), April 2010. q Thermal Control (Mul?core): Y. Fu, N. Ko[enste[e, C. Lu and X. Koutsoukos, Feedback Thermal Control of Real-Cme Systems on MulCcore Processors, ACM InternaConal Conference on Embedded Socware (EMSOFT'12), October 2012. q Model Predic?ve Control: J.M. Maciejowski, PredicCve Control with Constraints, PrenCce Hall, 2002. q Adap?ve QoS Control Project: h\p://www.cse.wustl.edu/~lu/control.html