Optimal On-Line Scheduling of Multiple
Control Tasks: A Case Study
Anton Cervin and Peter Alriksson
Department of Automatic Control
Lund University
Sweden
Anton Cervin and Peter Alriksson
Optimal On-Line Scheduling of Multiple Control Tasks
The Problem
x1
x4
u4
u1
Control
Computer
x3
x2
u2
u3
How to simultaneously control n processes using one CPU?
Anton Cervin and Peter Alriksson
Optimal On-Line Scheduling of Multiple Control Tasks
Background
Digital process control is traditionally based on periodic
sampling and actuation.
Sampled-data control theory (1960’s)
Liu and Layland’s task model (1973)
Nice separation of concerns
Anton Cervin and Peter Alriksson
Optimal On-Line Scheduling of Multiple Control Tasks
Integrated Control and Scheduling
Off-line or on-line co-design of controllers and scheduler
+ Better performance
− More complicated design and implementation
Potentially useful for severely resource-constrained
systems
Anton Cervin and Peter Alriksson
Optimal On-Line Scheduling of Multiple Control Tasks
Previous Work
Optimal off-line period assignment (Seto et al., 1996)
Optimal static cyclic scheduling (Rehbinder et al., 2000;
Lincoln et al., 2000)
On-line period assignment based on feedback from the
process states (Martí et al., 2004; Henriksson et al., 2005)
More feedback [ more reactive scheduler [ better performance
Give more resources to the control loop in need
Anton Cervin and Peter Alriksson
Optimal On-Line Scheduling of Multiple Control Tasks
This Work
Optimal on-line nonpreemptive scheduler based on
feedback from the process states
Formulation as optimal switched control problem
Approximate solution using relaxed dynamic programming
(Lincoln et al., 2002)
Smart execution of background tasks
Dynamic “idle task”
Comparative case study and performance evaluation
Anton Cervin and Peter Alriksson
Optimal On-Line Scheduling of Multiple Control Tasks
Problem Formulation (1)
n linear processes
dxi (t)
= Ai xi (t) + Bi ui (t)
dt
the control signals ui are held between updates
n quadratic cost functions
T
Z t
xi (τ )
xi (τ )
Ji (t) =
Qi
dτ
ui (τ )
ui (τ )
0
Ci = execution time for controller i
Anton Cervin and Peter Alriksson
Optimal On-Line Scheduling of Multiple Control Tasks
Problem Formulation (2)
The scheduler has access to the current system state
T
x(t k) = x1 (t k) u1 (t k ) . . . xn (t k) un (t k)
{z
}
|
N state variables
Joint optimization of
nonpreemptive scheduling policy s(tk ) = ν ( x(tk ))
state feedback control law us(tk ) (tk+1 ) = −µ ( x(tk ))
to minimize the total cost
n
1X
Ji (t)
t→∞ t
J = lim
i=1
Anton Cervin and Peter Alriksson
Optimal On-Line Scheduling of Multiple Control Tasks
Illustration of the Scheduling Policy
x1
t
x2
t
u1
t
u2
t
Task 1
t
Task 2
t k−1
tk
t k+1 t k+2
t k+3
t
At time t k:
Measure all plant states xi
Select one state feedback controller i for execution
The new control action is delivered after time Ci
Anton Cervin and Peter Alriksson
Optimal On-Line Scheduling of Multiple Control Tasks
Why Is This Better Than (Say) Preemptive EDF?
Frequent feedback from the processes
Nonpreemptive execution [ shorter input-output delay
Knowledge (prediction) of future schedule [ can adjust
the feedback gains appropriately
Under EDF, you have jitter and/or delay
Anton Cervin and Peter Alriksson
Optimal On-Line Scheduling of Multiple Control Tasks
A Multistage Decision Problem
Given any initial state x(t k), we must consider all future
scheduling and control decisions:
x(t k+1 )
s=1
s=2
x( t k )
x(t k+1 )
s=3
x(t k+1 )
Anton Cervin and Peter Alriksson
Optimal On-Line Scheduling of Multiple Control Tasks
Dynamic Programming
Optimal cost-to-go function:
Vk∗ ( x(t k))
T
∞
X
x(t j )
x ( t j )
= min
H s( t j )
v(t j )
v(t j )
s(t k )...s(∞)
v(t k )...v(∞) j = k
Dynamic programming:
n
o
Vk∗ ( x(t k )) = min Vk∗+1 ( x(t k+1 )) + l ( x(t k), s(t k), v(t k ))
{z
}
{z
} |
s(t k ),v(t k) |
cost-to-go at t k+1
step cost
s(t k) – what process to control
v(t k) – what control action to apply
Anton Cervin and Peter Alriksson
Optimal On-Line Scheduling of Multiple Control Tasks
Good News and Bad News
Good news:
Given the schedule s, it is easy to compute the control v
(standard LQ control problem)
Bad news:
The value function Vk∗ is very hard to represent
The minimum of an exponentially growing number of
quadratic functions:
Anton Cervin and Peter Alriksson
Optimal On-Line Scheduling of Multiple Control Tasks
Relaxed Dynamic Programming
Introduced by Bo Lincoln in 2001
Main idea: introduce some slack α in the solution
Work with upper and lower bounds of Vk∗ instead:
n
o
V k( x(t k )) = min Vk+1 ( x(t k+1 )) + α l ( x(t k), s(t k), v(t k ))
v(t k ),s(t k)
V k ( x(t k )) =
min
v(t k ),s(t k)
n
o
Vk+1 ( x(t k+1 )) + α −1 l ( x(t k), s, (t k ), v(t k))
Anton Cervin and Peter Alriksson
Optimal On-Line Scheduling of Multiple Control Tasks
Value Function Approximation
Vk+1
Vk
Exact
computation
Vk
Selection
Vk
Anton Cervin and Peter Alriksson
Optimal On-Line Scheduling of Multiple Control Tasks
Off-line and on-line computations
The approximate value function
Vk( x) = min x T Π i x
i
is derived off-line using relaxed dynamic programming
The value function must be evaluated on-line:
i(t k) = arg min x(t k )T Π i x(t k)
i
s(t k) v(t k)
Linear complexity in the number of quadratic functions
Anton Cervin and Peter Alriksson
Optimal On-Line Scheduling of Multiple Control Tasks
Is This A Purely Academic Result?
Yes: The on-line overhead is still far too large
Even a look-up table for Vk ( x) would be huge
No: It provides a (partial) solution to a real problem:
A1
A2
A3
Critical
Resource
Control
Computer
S1
S2
Anton Cervin and Peter Alriksson
S3
S4
Optimal On-Line Scheduling of Multiple Control Tasks
Extension: Idle Task
Idea: No need to control if things are going well
Introduce a task n + 1 that does “nothing”
Execute background tasks
Shut down the CPU to save power
Extra penalty factor β for computing a new control signal
Slightly more complex optimization problem
n + 1 controllers to choose from instead of n
Anton Cervin and Peter Alriksson
Optimal On-Line Scheduling of Multiple Control Tasks
The Case Study (1)
x2
x1
u1
u2
Control
Computer
x3
u3
One ball-and-beam process (3 state variables, unstable)
Two DC-servo processes (2 state variables each, stable)
Occasional impulse disturbances
Anton Cervin and Peter Alriksson
Optimal On-Line Scheduling of Multiple Control Tasks
The Case Study (2)
All scheduling/control policies were derived using the same
design cost functions
Preliminary control experiments were conducted to select
good cost functions and good parameters for the heuristic
policies
Anton Cervin and Peter Alriksson
Optimal On-Line Scheduling of Multiple Control Tasks
The Policies
1
Optimal on-line scheduling
Vk function of N = 10 variables
α = 1.2 [ 62 quadratic functions
2
Optimal on-line scheduling with idle task
β = 0.0125, α = 1.2 [ 34 quadratic functions (!)
3
Optimal static cyclic scheduling (Lincoln et al.)
s = {1, 2, 3, 2, 3, 1, 2, 3, 2, 3, . . .}
4
EDF with optimal static periods (Seto et al.)
T1 = 220 ms; T2,3 = 140 ms
5
EDF with a heuristic feedback scheduler (Martí et al.)
TFBS = 1 s, Tmin = 130 ms, Tmax = 170 ms
6
EDF with an optimal feedback scheduler (Henriksson et al.)
TFBS = 1 s
Anton Cervin and Peter Alriksson
Optimal On-Line Scheduling of Multiple Control Tasks
Experimental Results
Fourteen 600-second runs on the real processes
Strategy
J1
J2
J3
Optimal
Optimal + Idle
Static Cyclic
Seto et al.
Martí et al.
Henriksson et al.
0.514
0.598
0.803
2.15
1.07
1.80
0.675
0.727
0.99
4.06
4.94
3.93
0.617
0.669
0.881
5.85
7.79
4.44
P
Ji
1.81
1.99
2.67
12.1
13.8
10.2
U1
U2
U3
Idle
0.628
0.206
0.200
0.241
0.326
0.253
0.167
0.0583
0.400
0.379
0.330
0.366
0.205
0.0421
0.400
0.379
0.344
0.382
0
0.694
0
0
0
0
Optimal gives about 30% lower cost than Static Cyclic
Can idle almost 70% of the time at very small extra cost
All EDF-based policies perform very poorly
Due to one-sample delay
Anton Cervin and Peter Alriksson
Optimal On-Line Scheduling of Multiple Control Tasks
DC Servo 2 DC Servo 1 Ball & Beam
0.5
0
−0.5
−1
−1.5
128
1.5
130
132
134
136
138
140
142
144
146
148
130
132
134
136
138
140
142
144
146
148
0.5
128
130
132
134
136
138
140
142
144
146
148
Schedule
Typical Experiment under Optimal Scheduling
4
3
2
1
128
130
132
134
136
138
Time (s)
140
142
144
146
148
1
0.5
128
1.5
1
Anton Cervin and Peter Alriksson
Optimal On-Line Scheduling of Multiple Control Tasks
Conclusion
A (sub)optimal nonpreemptive scheduler/control law can
be derived using approximate dynamic programming
Perhaps not realistic for CPU scheduling
Non-preemptive execution seems very beneficial
Great potential for energy savings using idling
Anton Cervin and Peter Alriksson
Optimal On-Line Scheduling of Multiple Control Tasks
What’s Next?
Alternative parameterizations of the value function
Combine with optimal scheduling of state estimators
(observers) – very hard problem
A general theory for event-based control systems (veeery
hard problem)
Anton Cervin and Peter Alriksson
Optimal On-Line Scheduling of Multiple Control Tasks
© Copyright 2026 Paperzz