Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
Hard Real-time Guarantee of Automotive Applications during Mode Changes
P. Dziurzanski, A.K. Singh, L.S. Indrusiak
University of York
B. Saballus
Robert Bosch GmbH
Overview
Automotive technology: an overview
Modes in Engine Control Units (ECU)
DemoCar use case
Design flow
Conclusion
2
DreamCloud Kickoff 09/2013
Powertrain
systems Safety systems Comfort systems
Automotive technology: an overview
3
Source: Robert Bosch GmbH, Future mobility: automated, connected, electric, Belgian Insurance Conference, 2014
DreamCloud Kickoff 09/2013
Engine control system
800 – 1600 SW components
1000 – 1500 runnables (basic executable entities) in about 10 tasks
3000 – 6000 sub functions
7000 – 15000 messages
hard real-time and safety requirements
4
Source: Robert Bosch GmbH
Current vs future trends in cars
different HW units for different functionality
more than 100 ECUs in a premium car
static distribution
bus-based
5
2015 Future
multiple applications per HW unit
dynamic distribution
Network on Chips
Limited number of operating modes
Ignition key-On: engine off state
Cranking: engine starting state
Idle: a throttle valve is not opened
Part load: a throttle valve is partially opened
Wide open throttle: a throttle valve is wide open
6
Source: J.S. Park et al., Mode-Dynamic Task Allocation and Scheduling for an Engine Management Real-Time System Using a Multicore Microcontroller, SAE Int. J. Passeng. Cars – Electron. Electr. Syst. 7(1):133-140, 2014.
DemoCar- Minimal functionality gasoline Engine Control Unit
7
18 runnables
6 tasks
61 labels (data elements that can be read or written by runnables)
Problem formulation
8
π0,1 π1,1 π2,1
π0,0 π1,0 π2,0
Goals: • no deadline violation • minimal #used resources • minimal energy dissipation
Finite State Machine describing mode changes in DemoCar use case
9
The current state is stored in a certain variable.
Runnables execution time in different modes
10
Runnable Min op. Max op.
CylNumObserver 134 345
InstructionsDeviation 3728 5921
Runnable Min op. Max op.
CylNumObserver 245 543
InstructionsDeviation 728 921
Steps of the proposed dynamic resource allocation method
11
Design-time
optimisation
Taskset Platform
Run-time Platform
Resource Manager
Current Mode
Allocation
Result
Allocations
Modes
Mode detecting / clustering
12
Reasons: • Runnables have similar
runtime and resource consumption in neighbouring modes.
• Transition is required to be done immediately.
PowerDown PowerUp Cluster_1
Spanning tree construction
13
Static mapping for initial mode
14
M. Norazizi
Using energy dissipation as a criterion, huge
penalties for deadline violations
Genes in chromosomes
15
... ...
Runnable mapping (n genes) Core P-mode (x∙y genes)
τ1
τ2
τ3
τn
... π1,2 π2,2 πx,1
π1,1 π2,1 πx,0
π1,y π2,y πx,y
...
...
...
...
... ...
...
π0,1 π1,1
π0,0 π1,0
Optimization result
16
zzz
zzz zzz
18r
61l
P0
Static mapping for non-initial modes minimizing amount of migrated data
Multicriteria optimization: migration cost from the previous
mode energy dissipation
Huge penalties for deadline violations
17
Pareto frontier - Cluster_1
18
Data to be migrated [bytes] Energ
y u
sed in m
ode C
luste
r_1 [
μJ]
No deadline misses.
9650
9700
9750
9800
9850
9900
9950
10000
10050
10100
200000 300000 400000 500000 600000 700000
Idle hardware in states - 2x2 NoC
• 3 idle cores • 16 idle links
• 2 idle cores • 10 idle links
• 0 idle cores • 10 idle links
3093.01 µJ per hyperperiod
5909.37 µJ per hyperperiod
9719.45 µJ per hyperperiod
19
Deadlines for runnables
20
APedVoterSWCRunnableEntity
ThrottleCtlrRunnableEntity
ThrottleChangeSWCRunnableEntity
TransFuelMassSWCRunnableEntity
TotalFuelMassSWCRunnableEntity
BaseFuelMassRunnableEntity
IgnitionSWCRunnableEntity
ThrottleActuatorRunnableEntity
0 1 2 3 4 5 6 7 8 9 10
Task
_10
ms
IgnitionSWCSyncRunnableEntity
InjectionSWCSyncRunnable
0 2.5 5
Act
uat
orT
ask
runnable execution
data written to labels
APedVoterSWCRunnableEntity
ThrottleCtlrRunnableEntity
ThrottleChangeSWCRunnableEntity
TransFuelMassSWCRunnableEntity
TotalFuelMassSWCRunnableEntity
BaseFuelMassRunnableEntity
IgnitionSWCRunnableEntity
ThrottleActuatorRunnableEntity
0 1 2 3 4 5 6 7 8 9 10
Task
_10
ms
IgnitionSWCSyncRunnableEntity
InjectionSWCSyncRunnable
0 2.5 5
Act
uat
orT
ask
Schedulability analysis for taskset in any mode
21
schedulability analysis for all jobs
that can be executed in this time slot
schedulability analysis for all packets that
can be transmitted in this time slot
APedVoterSWCRunnableEntity
ThrottleCtlrRunnableEntity
ThrottleChangeSWCRunnableEntity
TransFuelMassSWCRunnableEntity
TotalFuelMassSWCRunnableEntity
BaseFuelMassRunnableEntity
IgnitionSWCRunnableEntity
ThrottleActuatorRunnableEntity
0 1 2 3 4 5 6 7 8 9 10
Task
_10
ms
IgnitionSWCSyncRunnableEntity
InjectionSWCSyncRunnable
0 2.5 5
Act
uat
orT
ask
0 10Per
iod
ic s
erve
r
Schedulability analysis for taskset during mode changes
22
schedulability analysis for all packets that can be transmitted in this time slot together with migrations
(done with periodic servers)
Network bandwidth selection
Router latency [ns]
Link latency [ns]
#Hyperperiods (100ms)
100 200 1
100 400 1
200 500 1
400 800 2
500 1000 2
23
Router latency [ns]
Link latency [ns]
#Hyperperiods (100ms)
100 200 1
100 400 2
200 500 2
400 800 3
500 1000 3
Data to be migrated [bytes]
Energ
y u
sed in m
ode C
luste
r_1 [
μJ]
9650
9700
9750
9800
9850
9900
9950
10000
10050
10100
200000 400000 600000 800000
How many hyperperiods are required to migrate all the necessary data using periodic server?
Conclusion
Static mapping of modes and dynamic migration at runtime on mode switch has been proposed to decrease the number of cores in ECUs.
The technique benefits from the modal nature of the ECU.
GA has been used to determine the allocation for all the ECU's modes, minimizing the energy dissipation and migration.
NoC bandwidth for full schedulability has been determined.
24
Thank you!
25
Estimation of dissipated energy
26
π0
π1
t0,0 t0,1
t1,0
E0=E0,init+fd0(t0,0)+fd0(t0,1)+fs0(ts)
E1=E1,init+fd1(t1,0)+fs1(ts)
fd0(t)=const0∙t
fd1(t)=const1∙t
Dynamic energy: Static energy:
ts
fs0(t)=const2∙t
fs1(t)=const3∙t