CPS Week 2013
Feedback Control for Real-Time Systems
Chenyang Lu
Cyber-Physical Systems Laboratory Department of Computer Science and Engineering
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
CPS Week 2013
Cyber-Physical Systems Laboratory Department of Computer Science and Engineering
CPS Week 2013
q Model PredicCve Control
q Nested Control Design
2
CPS Week 2013
q Model PredicCve Control
q Nested Control Design
3
CPS Week 2013
4
CPS Week 2013
5
CPS Week 2013
6
q Unknown sensor data or user input
q Aperiodic events q Bursty service requests
q Denial of Service a[acks
CPS Week 2013
7
q Periodic: All the subtasks of a task run at a same rate.
q Within a range q Higher rate à higher uClity
Remote Invocation Subtask
T1 T2 T3 T11 T12 T13
CPS Week 2013
8
{rj (k)|1≤ j≤n}
i=1 n
CPS Week 2013
9
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)}
ORB Middleware, IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS'03), May 2003.
CPS Week 2013
10
à ReplicaCng a SISO controller on all processors does not work!
T1 T2 T3 T11 T12 T13
CPS Week 2013
11
⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ Δ Δ ) ( ) (
1
k r k r
m
Predictive Controller B
1
Bn ! " # # # # $ % & & & & , Rmin,1 Rmin,m Rmax,1 Rmax,m ! " # # # # $ % & & & &
1
n
(m tasks, n processors)
Utilization Monitor Rate Modulator RM UM UM RM Feedback Loop Remote Invocation Subtask
Control Input Measured Output
Distributed Real-Time Systems with End-to-End Tasks, IEEE Transactions
CPS Week 2013
12
CPS Week 2013
13
T jl ∈Si
CPS Week 2013
14
q fij = cjl if task Tj has a subtask Tjl on processor Pi q fij = 0 if Tj has no subtask on Pi
T1 T2 T11
T21 T22 T3 T31
31 22 21 11
CPS Week 2013
15
q Cost funcCon: tracking error and control cost. q Predict cost based on a system model and feedback. q Compute input subject to constraints.
CPS Week 2013
16
2 i=1 P
2 i= 0 M −1
− Ts Tref i
CPS Week 2013
17
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
q Shic Cme window and re-compute Δr(k+1), Δr(k+2), ... Δr(k+M) based
CPS Week 2013
18
Least Squares Solver
1
n
1
m
System Model Cost Function Reference Trajectory
n
Rate Constraints Least Squares Solver
1
n
1
m
System Model Cost Function Reference Trajectory
n
Rate Constraints
Difference from reference trajectory Desired trajectory for u(k) to converge to B Constrained
solver
1
m
CPS Week 2013
19
CPS Week 2013
20
0.2 0.4 0.6 0.8 1
50 100 150 200 250 300
Time (sampling period) CPU utilization P1 P2 Set Point
CPS Week 2013
21
0.2 0.4 0.6 0.8 1 100 200 300 Time (sampling period) CPU utilization P1 P2 Set Point
CPS Week 2013
22
actual execution time / estimation Predicted bound for stability
CPS Week 2013
23
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
Distributed Real-Time Middleware via End-to-End Utilization Control, IEEE Real-Time Systems Symposium (RTSS'05), December 2005.
CPS Week 2013
24
Cme-varying execuCon Cmes disturbance from periodic tasks
CPS Week 2013
25
1. Norbert fails. 2. move its tasks to other processors. 3. reconfigure controller 4. control u?liza?on by adjus?ng task rates
CPS Week 2013
26
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 MIMO: mulC-input (knobs), mulC-output (objecCves) q Coupling between objecCves q Constraints on knobs
CPS Week 2013
q Model PredicCve Control
q Nested Control Design
27
CPS Week 2013
28
CPS Week 2013
q Prevent processor overheaCng q Avoid hardware thro[ling à unpredictable slowdown
q Maintain real-Cme performance q Enforce schedulable uClizaCon bound
q Power, ambient temperature, thermal faults, execuCon Cme
29
CPS Week 2013
30
CPS Week 2013
q Rate adaptaCon based on temperature and uClizaCon feedback
q Modular: separate controllers for temperature and uClizaCon q Efficiency control algorithms: O(1) complexity q Rigorous stability and sensiCvity analysis
31
Feedback Thermal Control for Real-time Systems, IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS'10), April 2010.
CPS Week 2013
32
Tasks rates (control input) Temperature (controlled variable)
Power
i i
aU(k) + P idle(1−U(k))
UClizaCon (control input) (controlled variable)
CPS Week 2013
q Handle slower thermal dynamics
q Handle faster load dynamics
33
Thermal Controller
Rate Actuator UClizaCon Monitor Thermal Monitor UClizaCon Controller Tb Ub T(k) U(k’) Us(k) {△ri(k’) } Tasks
CPS Week 2013
Ac?ve power = 2 x es?mate
34
CPS Week 2013
Execu?on ?me = 2 x es?mate
35
CPS Week 2013
36
CPS Week 2013
37
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