Title: Integrated Scheduling and Synthesis of Control Applications on Distributed Embedded Systems
1Integrated Scheduling and Synthesis of Control
Applications on Distributed Embedded Systems
- Soheil Samii1, Anton Cervin2, Petru Eles1, Zebo
Peng1
1 Dept. of Computer and Information
Science Linköping University Sweden
2 Dept. of Automatic Control Lund
University Sweden
2Motivation
- Many embedded control systems are distributed
- Typical example the modern car
- Timing delays
- Sampling, computation, and actuation
- Sharing of computation and communication
resources - Problem Degradation of control performance
- System scheduling
- Controller design
Plant
Plant
3Outline
- Motivation
- System model
- Example and problem formulation
- Scheduling and synthesis approach
- Experimental results
- Summary and contribution
4System model
Plant disturbance v(t)
Internal-state vector x(t)
Plant
Output y(t)
Input u(t)
Measurement noise e(t)
A/D
D/A
What is a good sampling period? What is a good
control law u?
Controller
- Linear plant model
- dx(t)/dt Ax(t) Bu(t)
- y(t) Cx(t)
- Application model
- Periodic tasks
- Data dependencies
- Linear plant model
- dx(t)/dt Ax(t) Bu(t) v(t)
- y(t) Cx(t) e(t)
5Control performance
- Quadratic cost J E xTQ1x uTQ2u
- Depends on
- the sampling period,
- the control law, and
- the distribution of the delay between sampling
and actuation of the control signal - Synthesis of optimal control-law for given
- sampling period and
- constant delay
- Toolbox Jitterbug, developed at Lund University
in Sweden
6Example Control of two pendulums
0.2 m
0.1 m
J Ey2 0.002u2
- Measure the angle y
- Stabilize in upright position y0
- Control the acceleration u of the cart
7Example Platform
S
S
C
C
A
A
Decide (1) sampling periods, (2) design control
laws, and (3) schedule the tasks and messages
8Example Ideal control
Sample 20 ms
Sample 30 ms
S
S
C
C
A
A
- Control laws synthesized for the constant delays
of each application (9 and 13) - J10.9, J22.4, Total3.3 (achieved for the
ideal runtime scenario dedicated resources)
9Example Scheduling
Sample 20 ms
Sample 30 ms
- Ideal case
- J10.9, J22.4, Total3.3
S
S
C
C
A
A
- Delay distribution
- Application 1 32, 29, 14
- Application 2 44, 24
- J14.2, J26.4, Total10.6
10Example Scheduling
Sample 20 ms
Sample 30 ms
- Ideal case
- J10.9, J22.4, Total3.3
S
S
C
C
A
A
- First schedule
- J14.2, J26.4, Total10.6
- Compensate for the delays in the schedule (14 and
21) - J11.0, J23.7, Total4.7
- Delay distribution
- Application 1 14 (constant)
- Application 2 18, 24
- J11.1, J25.6, Total6.7
11Example Change periods
Sample 30 ms
Sample 20 ms
S
S
C
C
A
A
Good selection of periods combined with
integrated scheduling and control-law synthesis
is important!
- With periods 20 ms and 30 ms
- J11.0, J23.7, Total4.7
- Delay distribution
- Application 1 13, 23
- Application 2 18
- J11.3, J22.1, Total3.4 (with delay
compensation)
12Problem formulation
Available sampling periods
Execution-time specifications
?
Deadlines
Scheduling and synthesis tool
Minimize
Periods
Control laws
13Approach (Static-cyclic scheduling)
Select controller periods
Task periods
Schedule the tasks and messages
What if we have priority-based scheduling?
Delay distributions
Synthesize control-laws and compute cost
Cost
Stop?
Yes
Done!
No
14Approach (Priority-based scheduling)
Select task and message priorities
Priorities
No
Schedulable?
Yes
Simulate
Delay distributions
Synthesize control-laws and compute cost
Cost
Yes
No
Stop?
Cost
15Experimental results
Average cost improvement
Integrated approach
Isolated scheduling and control-law synthesis
Straightforward period assignment
Number of plants
16Summary and contribution
- Problem Sharing of computation and communication
resources degrades the control performance - Solution Integrate scheduling with control
design (period assignment and control-law
synthesis) - Contribution
- A tool for such integrated design of distributed
embedded control systems with - static-cyclic scheduling or
- priority-based scheduling
17EXTRA SLIDES
18Evaluation
Period optimization with genetic algorithms
Integrated control-law synthesis and scheduling
Straightforward period assignment
Isolated control-law synthesis and scheduling
19Experiments
Period optimization with genetic algorithms
Integrated control-law synthesis and scheduling
Straightforward period assignment
Isolated control-law synthesis and scheduling
- Straightforward approach as a baseline, JSF
- Compute relative cost improvement
- (JSF J) / JSF
- Evaluate each part of the optimization in
isolation
20Static-cyclic scheduling
Average cost improvement
Number of plants
21Priority-based scheduling
Average cost improvement
Number of plants
22Optimization time
Average runtime seconds
Number of plants