dynamic scheduling and control-quality optimization of self-triggered control applications soheil...
TRANSCRIPT
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
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
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
4
Motivation
This paper:
Scheduling of multiple self-triggered tasks on a CPU
Optimize control quality and reduce CPU usage
5
Outline
Self-triggered control
System model
Motivational example
Scheduling heuristic
Experimental results
Conclusions
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
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
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!
9
Scheduling – CPU cost
time
13
Next execution
CP
U c
ost
10
10
Scheduling – Trade-off!
time
13
To
tal c
os
t
Next execution
(CPU demand)+ ρ =
Combined cost of a task
10
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?
?
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
∑
13
Scheduler outline
Optimization of start time
Schedule realization
Candidate start times
Set of candidate schedules
Choose best solution Emergency schedule
Not empty Empty
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
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
16
Emergency schedule
Can we guarantee that all deadlines are met?
Yes, if Σ WCET ≤ minimum deadline!
How?
time
?
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
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
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