Presentation at the 2nd International Workshop on Model-driven Approaches for Simulation Engineering
(held within the SCS/IEEE Symposium on Theory of Modeling and Simulation part of SpringSim 2012)
Please see: http://www.sel.uniroma2.it/mod4sim12/ for further details
Long journey of Ruby standard library at RubyConf AU 2024
Calibration of Deployment Simulation Models
1. Karel de Grote-Hogeschool
TERA-Labs
www.kdg.be
Universiteit Antwerpen
ANSYMO
www.ua.ac.be
Calibration of Deployment
Simulation Models
A Multi-Paradigm Modelling Approach
Joachim Denil
Hans Vangheluwe
Paul De Meulenaere
Serge Demeyer
2. Introduction
• Problem Statement
– MDE has advantages
– Simulation is used often
• For example: early deployment space
exploration
www.teralabs.org
2
http://Ansymo.ua.ac.be
3. m of user static scheduling policy is defined here.current */ }
software. However, in the E.g. RMA version of SystemC (2.0),
1600 processor. Due to the structure of the problem, dynamic or
e_policy(vector<rt_task*> &tasks,sc_time %t) we propose in this
this feature is still missing [3]. Therefore,
preemptive scheduling does not lead to better results. So, since
of user online scheduling policy is defined here. E.g. EDF */ } extension to work on
paper the scheduling simulation capability
this robot is not a highly safe-critical application, event driven
SystemC models aiming to extend of its usage for real-timeis considered as the most feasible strategy in this
Examples
8.scheduling assessment.Port basic approach of [7] is mapped to
Re-scheduling by The Binding scheduling
case. One comes up to this result from high-level analysis of
SystemC by extending the scope considerably to this embedded information system. allow for a
Flow to Experiment Results scheduling simulation into the
complete integration of HW/SW
ionembedded system co-design flow. proposed
demonstrates the feasibility of the Table 1. Simulation Performance Results
embedded systems design by means of an BCET ACET WCET
ample. Simulation Framework Overview
3. As an example we exploit an autonomous Time triggered 540 ms 540 ms 540 ms
d with ultrasound distance sensors, lev camera, and
sy s t e m
a el Event Driven 331 ms 357 ms 431 ms
ta link subsystem, where its entire specification
S y st e m C Priority-based Ordering 335 ms 361 ms 435 ms
m odel
17 tasks is captured os a task graph along with a n d Preemptive Scheduling
e v e nts
335 ms 361 ms 435 ms
HW Model
properties (estimated max-min execution times). d a t a re ce pt io n
6. Conclusions and Future Work
ow starts with the allocated specification model.g in g a n d p re s e n t a t io n
lo g
m design,che d ule a s A dd -In
u s e r s the functional specification is then
s che du ling In this paper, a SystemC based scheduling simulator along
lo g f ile s
s im u lat ion e ng ine
nto multiple processing elements (PEs). In this with its integrated environment is presented. It provides a
envisaged generic hardware architecture for the G U I framework for assessing scheduling algorithms options, while
s t a t ic o ff-lin e
a lg o rit h m
s e ctio n
ocessing of this robot is a multi-processor system the bulk of the design is modeled in SystemC at a high
d y n a m ic u t abstraction level. It is thus possible to exercise both hardware
m a set of Pes,lgi.e.,ma co-processornon e PCI FPGA csotmralaeif
a o rit h
o -lin
a o g
nd a microcontroller attached tose ctio n the mobile robot. and real-time software modules of system-level allowing early
e rro r
municate throughn a PCI bus (between PC and system performance assessment as well as verification and
in je c t io
a a set of wirelessf oRS232 modems (between rC ult analys is validation of different implementation alternatives and
a lg o rit h m r es
bot and PC). r in je c t io nto the inherently sequential
e rro
Due scheduling strategies. Application scenarios for modeling
PE, tasks mappedProposed Simulationto be
Figure 1. to the same PE need Framework distributed system is a challenging subject for future work in
then scheduled statically orKlaus, andIn case Huss; Anto extend theSystemC framework for real-
TheHastono, S. dynamically. S. integrates functional
P. proposed simulation framework A. order integrated simulation methodology for global
scheduling scheduling assessments is system on
time implementation, scheduler on scheduling analysis.
c validation with architectural aand scheduling explorationlevel; in Proceedings of IEEE Int. Real-
re in the proposed framework isengine along with software code
system level. The simulation a customizable
Time Systems Symposium, 2004. 7. References
scheduling simulator module. [1] C. M. Harmonosky, Simulation-Based Real-Time Scheduling:
e process of generating SystemC models of the Review of Recent Developments, In Proc. of the 1995 Winter
ormation processing of the robot is based on
www.teralabs.org the Simulation Conference, December 1995. 3
odel of the specification. This generated model
http://Ansymo.ua.ac.be [2] SystemC, http://www.systemc.org.
4. Examples
S. Becker, H. Koziolek, and R. Reussner; The Palladio component model for
model-driven performance prediction, Journal of Systems and Software, vol.
82, no. 1, pp. 3-22, Jan. 2009.
www.teralabs.org
4
http://Ansymo.ua.ac.be
5. Examples
J. Denil, H. Vangheluwe, P. Ramaekers, P. De Meulenaere, and S. Demeyer;
DEVS for AUTOSAR platform modelling; in Proceedings of the 2011 SpringSim
Multi-Conference: DEVS/TMS, 2011.
www.teralabs.org
5
http://Ansymo.ua.ac.be
6. Introduction
• Problem Statement
– MDE has advantages
– Simulation is used often
– PROBLEM: Calibration of simulation
models
• Solution:
– Use MDE techniques (generative) to
calibrate models
www.teralabs.org
6
http://Ansymo.ua.ac.be
7. Calibration?
• Estimate model parameters to reflect
reality
• For example:
– Physical model: Gain of a motor
– Queuing system: Distribution of arrival
times
– In Previous examples:
• WCET
• Distribution of Execution Times
www.teralabs.org
7
http://Ansymo.ua.ac.be
8. Calibration?
• State of Art:
– Instrument Source Code
– Make test programs (trace driven)
– Execute on Target or Cycle-true
Simulator
• Cyber-Physical Systems:
– Input not only from environment but
also from feedback!
www.teralabs.org
8
http://Ansymo.ua.ac.be
10. windowPos
<
CInitAngularVelocity CInitPositionWindow
0.0 100.0
motorSignal
MPM Design of+ the Power Window
goingUp
SWC windowPos
CAtTop joinedUpDown
AngularVelocity FAV
Control_Passenger X
+
m
0.0
goingDown
AtTop
MotorGain <
motorSignal AngularVelocity
SWC 0.0
UP
>
SWC 50.0
Logic SWC +
Multi-Paradigm Modelling (MPM):
Control_Driver 1.0
friction >
DC_Motor
PsgrButtons AtBottom
CAtBottom
DOWN Cfriction
X
0.0 10.0
UP
“Model Everything
invFriction
windowPos
DriverButtons TopOrBottom
SWC
ObjectIn
at the right level(s) of abstraction,
DOWN FeedBack
Sensor_Load
motorSignal + + =
DrvChildLock ObjectDetected
Controller
using (an) appropriate formalism(s)”
noObject
0.0
DrvIgnition
ToMotor
PsgrButton
ForceDetect
ObjectInWindow
www.teralabs.org
10
http://Ansymo.ua.ac.be
11. Problem Revisited
SWC
Control_Passenger
SWC
SWC
Logic SWC
Control_Driver
DC_Motor
Deploy
SWC
Sensor_Load
DrvDoor BodyLogic PsgDoor
MPC5567 MPC5567 MPC5567
Performance
Characteristics
Body
CAN
www.teralabs.org
11
http://Ansymo.ua.ac.be
12. Architecture
• Use target hardware for SW
• Use host for simulation
Input Values and Triggers
Output Values and Traces
Host Target Platform
www.teralabs.org
12
http://Ansymo.ua.ac.be
25. Figure 7. The combined model using generic links to conn
invFriction
TopOrBottom
Results
= +
FeedBack
our generated infrastructure match the values obtained by th
noObject
ObjectDetected
hardware instrumentation.
Execution Time (µs) Childlock Off ChildLock On
SWC
SWC
Logic
Control_Passenger
SWC
DC_Motor
20.375 12500 12000
19.875 2500 3000
SWC
SWC
Table 1. Results for the Control Driver runnable.
SWC
Logic
Control_Driver
DC_Motor
Execution Time (µs) Childlock Off ChildLock On
SWC
Sensor_Load
11.375 9000 10000
10.875 6000 5000
ities in the different formalisms.
Table 2. Results for the Control Passenger.
Execution Time (µs) Childlock Off ChildLock On
Execution Time (µs) Childlock Off ChildLock On
20.000 7500 4999
7.625 15000 15000
20.500 0 10001
Table 3. Results for the Sensor Load runnable.
20.875 7499 0
21.375 1 0 The obtained values from the different runnables can b
DrvDoor
Table 4. Results for the Logic runnable. The strange result MPC5567
used as input parameters for the system performance simula
f the last row is because of a special condition thattion models.
Validated using hardware measurements! only can
ccur in the first execution round.
Execution Time (µs) Childlock Off
www.teralabs.org ChildLock On
6. DISCUSSION
http://Ansymo.ua.ac.be On the tooling side of this approach a problem25 occu
can
8.00 6000 3000
26. Discussion
• Tooling: Combining different
formalisms?
– Super-meta-model
• More HW platforms, other
performance measure?
– Use other template
• Limitation:
– Caching, pipelines, …
www.teralabs.org
26
http://Ansymo.ua.ac.be
27. Conclusion
• Problem Statement
– Calibration of simulation models
• Solution:
– Use MDE techniques (generative) to
calibrate models
www.teralabs.org
27
http://Ansymo.ua.ac.be