dynamic scheduling and control-quality optimization of self-triggered control applications soheil...

19
Dynamic Scheduling and Control- Quality Optimization of Self- Triggered Control Applications Soheil Samii , Petru Eles, Zebo Peng Department of Computer and Information Science Linköping University, Sweden Paulo Tabuada Department of Electrical Engineering University of California, Los Angeles, USA Anton Cervin Department of Automatic Control Lund University, Sweden

Upload: kelley-walters

Post on 05-Jan-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Dynamic Scheduling and Control-Quality Optimization of Self-Triggered Control Applications Soheil Samii, Petru Eles, Zebo Peng Department of Computer and

Dynamic Scheduling and Control-Quality Optimization of Self-Triggered Control

Applications

Soheil Samii, Petru Eles, Zebo Peng

Department of Computer and Information Science

Linköping University, Sweden

Paulo Tabuada

Department of Electrical Engineering

University of California, Los Angeles, USA

Anton Cervin

Department of Automatic Control

Lund University, Sweden

Page 2: Dynamic Scheduling and Control-Quality Optimization of Self-Triggered Control Applications Soheil Samii, Petru Eles, Zebo Peng Department of Computer and

2

Motivation Act SenP1

Act SenP2

Act SenP3

CP

U Periodic implementation

Conservative CPU usage when the control error is small

Constraints in the number of controller executions

Sensing, computation, actuation

Page 3: Dynamic Scheduling and Control-Quality Optimization of Self-Triggered Control Applications Soheil Samii, Petru Eles, Zebo Peng Department of Computer and

3

Motivation

Self-triggered control: Control ”when needed”

[Velasco et al., 2003], [Anta and Tabuada, 2008]

More often when the control error is large, and vice versa

Reduced number of controller executions

Ensures stability

Page 4: Dynamic Scheduling and Control-Quality Optimization of Self-Triggered Control Applications Soheil Samii, Petru Eles, Zebo Peng Department of Computer and

4

Motivation

This paper:

Scheduling of multiple self-triggered tasks on a CPU

Optimize control quality and reduce CPU usage

Page 5: Dynamic Scheduling and Control-Quality Optimization of Self-Triggered Control Applications Soheil Samii, Petru Eles, Zebo Peng Department of Computer and

5

Outline

Self-triggered control

System model

Motivational example

Scheduling heuristic

Experimental results

Conclusions

Page 6: Dynamic Scheduling and Control-Quality Optimization of Self-Triggered Control Applications Soheil Samii, Petru Eles, Zebo Peng Department of Computer and

6

Act SenPSelf-triggered control

Deadline based on

control law

plant state

plant model

Deadline must be met to ensure stability

Executing earlier than the deadline can give better control

time

Periodic execution

Self-triggered execution

Page 7: Dynamic Scheduling and Control-Quality Optimization of Self-Triggered Control Applications Soheil Samii, Petru Eles, Zebo Peng Department of Computer and

7

System model

Act SenP1

Act SenP2

Act SenP3

CP

U

Sch

edu

ler

d1

d2

d3

Control quality

Deadline constraints

Reduce CPU usage

dx1/dt = Ax1(t) + Bu1(t)

u1 x1

u1=K1x1

u2

u3

x2

x3

Page 8: Dynamic Scheduling and Control-Quality Optimization of Self-Triggered Control Applications Soheil Samii, Petru Eles, Zebo Peng Department of Computer and

8

Scheduling – Control quality

time

10 13

Next execution

Co

ntr

ol c

os

t

J(t start ) = x(t)TQx(t)dtCompletion time

Deadline

∫ Control cost

Latest measurements

Difference between deadline and completion time

Normalized!

Page 9: Dynamic Scheduling and Control-Quality Optimization of Self-Triggered Control Applications Soheil Samii, Petru Eles, Zebo Peng Department of Computer and

9

Scheduling – CPU cost

time

13

Next execution

CP

U c

ost

10

Page 10: Dynamic Scheduling and Control-Quality Optimization of Self-Triggered Control Applications Soheil Samii, Petru Eles, Zebo Peng Department of Computer and

10

Scheduling – Trade-off!

time

13

To

tal c

os

t

Next execution

(CPU demand)+ ρ =

Combined cost of a task

10

Page 11: Dynamic Scheduling and Control-Quality Optimization of Self-Triggered Control Applications Soheil Samii, Petru Eles, Zebo Peng Department of Computer and

11

Scheduling – How?

time

10 13

How does the scheduler

1. find the best trade-off?

2. decide whether and where to move scheduled executions?

3. guarantee that all deadlines are met?

?

Page 12: Dynamic Scheduling and Control-Quality Optimization of Self-Triggered Control Applications Soheil Samii, Petru Eles, Zebo Peng Department of Computer and

12

Problem formulation

When a task completes execution:

Schedule its next execution before its deadline

The other tasks are already scheduled for execution

Can be moved!

Cost to minimize:

J control + ρ JCPU

all tasks

∑all tasks

Page 13: Dynamic Scheduling and Control-Quality Optimization of Self-Triggered Control Applications Soheil Samii, Petru Eles, Zebo Peng Department of Computer and

13

Scheduler outline

Optimization of start time

Schedule realization

Candidate start times

Set of candidate schedules

Choose best solution Emergency schedule

Not empty Empty

Page 14: Dynamic Scheduling and Control-Quality Optimization of Self-Triggered Control Applications Soheil Samii, Petru Eles, Zebo Peng Department of Computer and

14

Optimization of start timeT

ota

l co

st

Next execution

Golden-section search

Cost evaluation for a limited number of points

Precalculated values

Interpolation

time

1310

Page 15: Dynamic Scheduling and Control-Quality Optimization of Self-Triggered Control Applications Soheil Samii, Petru Eles, Zebo Peng Department of Computer and

15

DA E F

CA B D E F

B C

Schedule realization

1. Are deadlines for tasks C and D violated?

2. Compute new costs for tasks C and D

Golden-section search has been performed at previous scheduling points

time

time

Candidate start time

Page 16: Dynamic Scheduling and Control-Quality Optimization of Self-Triggered Control Applications Soheil Samii, Petru Eles, Zebo Peng Department of Computer and

16

Emergency schedule

Can we guarantee that all deadlines are met?

Yes, if Σ WCET ≤ minimum deadline!

How?

time

?

Page 17: Dynamic Scheduling and Control-Quality Optimization of Self-Triggered Control Applications Soheil Samii, Petru Eles, Zebo Peng Department of Computer and

17

Scheduler – summary

1. Golden-section optimization of start times

2. Conflicting executions are moved forward

3. Stability is guaranteed by construction of the heuristic and an offline verification

Page 18: Dynamic Scheduling and Control-Quality Optimization of Self-Triggered Control Applications Soheil Samii, Petru Eles, Zebo Peng Department of Computer and

18

Comparison to periodic control

Time overhead of the scheduler has been considered!

CPU usage [%]

To

tal c

on

tro

l co

st

Periodic

Our approach

Page 19: Dynamic Scheduling and Control-Quality Optimization of Self-Triggered Control Applications Soheil Samii, Petru Eles, Zebo Peng Department of Computer and

19

Conclusion

Runtime scheduling of multiple control tasks

Adaptive implementation of self-triggered controllers achieving the required trade-off between control quality and CPU usage