4. 4
The Importance of Computation
Today, about 98 percent of microprocessors are
embedded, connected with the outside world
through sensors and actuators. They are
increasingly connected with one another and the
internet. The physical world and the virtual
world – or cyberspace – are merging.
Today, about 98 percent of microprocessors are
embedded, connected with the outside world
through sensors and actuators. They are
increasingly connected with one another and the
internet. The physical world and the virtual
world – or cyberspace – are merging.
Source: acatech: agendaCPS.
5. 5
The Importance of Computation
Source: European Commission: ICT FP7 Work Programme 2013, ICT Challenge 2: Cognitive Systems and Robotics
[…] initiates a research and innovation
agenda, aiming to develop artificial
systems operating in dynamic real life
environments, reaching new levels of
autonomy and adaptability and interacting
in a symbiotic way with humans.
[…] initiates a research and innovation
agenda, aiming to develop artificial
systems operating in dynamic real life
environments, reaching new levels of
autonomy and adaptability and interacting
in a symbiotic way with humans.
[…] next generations of ICT systems and
products with more intelligence will open
the door to a wide range of opportunities
for ICT-based applications in a range of
sectors.
ICT systems – including robot and
robotic systems – need to be more
robust, context-aware and easy-to-
use.
[…] next generations of ICT systems and
products with more intelligence will open
the door to a wide range of opportunities
for ICT-based applications in a range of
sectors.
ICT systems – including robot and
robotic systems – need to be more
robust, context-aware and easy-to-
use.
6. 6
The Importance of Computation
Source: Forschungsunion: Where the New Growth Comes From.
Information and communication technology (ICT)
will play an ever greater active role in value-
creation processes. Intelligent networks will
simulate, monitor and optimise products and
systems.
Information and communication technology (ICT)
will play an ever greater active role in value-
creation processes. Intelligent networks will
simulate, monitor and optimise products and
systems.
7. 7
Simulation saves money
Source: M. Broy, H. Krcmar, J. Zimmermann, S. Kirstan: Economical impact of model-based development of embedded software systems in
cars. ATZ elektronik worldwide, 2/06, April 2011 (link)
Correlation modeling degree and test intensity in the software design
versus changes in the total costs
… say Broy et.al. in ATZ elektronik:
9. 9
Outline
1. Introduction – Cyber-Physical Systems
2. Value of computational semantics –
Model-Based Design
3. Heterogeneity of computational
semantics
4. Best Practices
32. 33
RatingRating
Lift off
accelerator
↓
Roll to
accelerate
↓
Scania Develops Fuel-Saving Driver
Support System for Award-Winning
Long-Haulage Trucks
―Simulink is particularly helpful
in two stages of our
development process. Early on,
it helps us try new ideas and
visualize how they will work.
After generating code and
conducting in-vehicle tests, we
can run multiple simulations,
refine the design, and regenerate
code for the next iteration.‖
Jonny Andersson
Scania
―Simulink is particularly helpful
in two stages of our
development process. Early on,
it helps us try new ideas and
visualize how they will work.
After generating code and
conducting in-vehicle tests, we
can run multiple simulations,
refine the design, and regenerate
code for the next iteration.‖
Jonny Andersson
Scania
The Scania Driver Support display panel.
Image: Jonny Andersson, Scania. MathWorks Automotive Conference 2010
39. 40
Computational semantics of heterogeneous
systems
?
Extensive code base
Approximating and interacting solvers
Extensive code base
Approximating and interacting solvers
Approximations
Numerical integration
Algebraic equations
Zero crossings
Chattering
Timing
Magnitude
Numerical algorithms
…
40. 41
Computational semantics of heterogeneous
systems
?
Approximations
Numerical integration
Algebraic equations
Zero crossings
Chattering
Timing
Magnitude
Numerical algorithms
…
Point solutions
Generate individual behaviors separately
Point solutions
Generate individual behaviors separately
41. 42
Computational semantics of heterogeneous
systems
Works (well) for standard scenarios
Environment is treated as a disturbance
Works (well) for standard scenarios
Environment is treated as a disturbance
42. 43
Computational semantics of heterogeneous
systems
An open system must work for all scenarios
Gaps are exposed
An open system must work for all scenarios
Gaps are exposed
43. 44
Computational semantics of heterogeneous
systems
<S,R>
Static analysis?
O(M) lines of code … ?
Static analysis?
O(M) lines of code … ?
44. 45
Computational semantics of heterogeneous
systems
Model the execution engine!
Separate semantics from implementation
Model the execution engine!
Separate semantics from implementation
45. 46
Computational semantics of heterogeneous
systems
!
Analyze classes of behavior
Prove absence of holes
Analyze classes of behavior
Prove absence of holes
46. 47
Computational semantics of heterogeneous
systems
!
Analyze classes of behavior
Prove absence of holes
Analyze classes of behavior
Prove absence of holes
47. 48
Fabrycky: ―Synthesis is the interesting thing
in system design‖
!
IMPLEMENTATION
Structured
Text
VHDL, VerilogC, C++
MCU DSP FPGA ASIC PLC
(quote from yesterday)
Information
ODE
Statemachine
Discrete time
Control flow
54. A Cyber-Physical System!
Justyna Zander and Pieter J. Mosterman, “Technical Engine for Democratizing Modeling, Simulation, and Prediction," in
Winter Simulation Conference, December, 2012, in review
Justyna Zander and Pieter J. Mosterman, “Technical Engine for Democratizing Modeling, Simulation, and Prediction," in
Winter Simulation Conference, December, 2012, in review
58. 59
Local Control Rules (simplified)
Red Block: wants to be on top
– If on top move 1 left, wait, then 1 left with low prio
– If not on top move 1 left, 1 right, 2 left
Green (Yellow) Block: wants to be middle
– Move 1 left, then 1 left
Blue Block: wants to be on bottom
– Move 2 left
– Should have the highest priority
61. 62
left
camera
left
camera
right
camera
right
camera
slider
motor
slider
motor
nozzle
motor
nozzle
motor
slider ECUslider ECU
pump
actuator
pump
actuator
pressure
slider force
wireless networkwireless network
nozzle_mode,
left_video, right_video
found, picked,
placed, nozzle_force
found, picked, placed
block_status, position
nozzle_mode,
slider_force, pressure
position
sensor
position
sensor
supervisory
control
supervisory
control
slider
control
slider
control
detection
logic
detection
logic
nozzle
control
nozzle
control
stereo
analysis
stereo
analysis
pump
control
pump
control
NCAPNCAPNCAPNCAPNCAPNCAP
position
block_service
left_video right_videonozzle_force
block
camera
block
camera
block ECUblock ECU
service
requests
service
requests
scenescene
An Architecture
base ECUbase ECU
64. 67
Slider control
Exert a motor force to move the slider to a give position
Compute a Gaussian (lqg) regulator (output feedback)
– r = desired slider position
– u = motor force
control plant
r y
vw
u
dtxQx
u
x
QXUux
T
EuJ
T
iii
Tu 0
,
1
lim)(min
dtyrx
T
i
0
65. 68
Slider control
Plant model
Requires a linear plant model
– The slider/rail friction ruins it …
plant
y
vw
u
vDuCxy
wBuAx
dt
dx
71. 74
Nozzle control
Feedforward (very fast) control
Two phases (down/up)
– Staged force profiles
– Predetermined profiles for set of possible lowpoints
Top of a stack of two blocks
Top of a stack of one block
– Lookup table for each lowpoint
72. 75
Nozzle control coordinator
Provide as a service
– Profile must be defined in relative time
– Reset operation state after completion
Allows initialization of relative variables
– Hold off pick or place operation till the service is available
83. 86
―Accurate modeling is essential not only for planning
investments but also to detect situations that can cause
an outage. […] we can simulate power electronics,
mechanics, and control systems in one environment,
and our models respond like the turbines we have in the
field.‖
Richard Gagnon
Hydro-Québec
―Accurate modeling is essential not only for planning
investments but also to detect situations that can cause
an outage. […] we can simulate power electronics,
mechanics, and control systems in one environment,
and our models respond like the turbines we have in the
field.‖
Richard Gagnon
Hydro-Québec
Link to user storyTurbines on a wind farm
94. 97
Technische Universität München Uses Model-Based Design to Drive
Research, Problem-Based Learning, and Industry Collaboration
Link to user story
Professor Holzapfel, research fellow Markus Hornauer, and a student test flight control
algorithms in the Research Flight Simulator.
―Flight controls and flight system
dynamics are multidomain engineering
disciplines. MathWorks tools enable our
students to build upon our fundamental
research to develop solutions that fly in
real aircraft. With Model-Based Design
we can close the gap between the
theoretical foundation and the practical
application.‖
Prof. Dr.-Ing. Florian Holzapfel
Technische Universität München
―Flight controls and flight system
dynamics are multidomain engineering
disciplines. MathWorks tools enable our
students to build upon our fundamental
research to develop solutions that fly in
real aircraft. With Model-Based Design
we can close the gap between the
theoretical foundation and the practical
application.‖
Prof. Dr.-Ing. Florian Holzapfel
Technische Universität München