01 CyberPhysicalSystems
01 CyberPhysicalSystems
Principles of Cyber-Physical
Systems
Examples:
Automotive controllers
Avionics
Medical devices
Industrial control
Infrastructure
Transportation
2
Embedded Everywhere!
3
What are Embedded Systems?
Computational
but not first-and-foremost a computer
Integral with physical processes
sensors, actuators, physical dynamics
Reactive
at the speed of the environment (timing matters!)
Heterogeneous
hardware/software/networks, mixed architectures
Networked
concurrent, distributed, dynamic
4
Differences Between Embedded Systems and
General-Purpose Computation:
Time matters
“as fast as possible” is not good enough
Concurrency is intrinsic
it’s not an illusion (as in time sharing), and
it’s not (necessarily) about exploiting parallelism
Processor requirements can be specialized
predictable, repeatable timing
support for common operations (e.g. FIR filters)
need for specialized data types (fixed point, bit vectors)
Programs need to run (essentially) forever
memory usage has to be bounded (no leaks!!)
rebooting is not acceptable
5
Other Characteristics of Embedded Sys.
• Dependable
• Reliability R(t) = probability of system working correctly
provided that is was working at t=0
• Maintainability M(d) = probability of system working
correctly d time units after error occurred.
• Availability A(t): probability of system working at time t
• Safety: no harm to be caused
• Security: confidential and authentic communication
• Making the system dependable must not be an
after-thought, it must be considered from the very
beginning
6
Other Characteristics of Embedded Sys.
• Efficiency
• Code-size efficient (especially for systems on a chip)
• Run-time efficient
• Weight efficient
• Cost efficient
• Energy efficient
7
Cyber-Physical Systems (CPS)
CPS are the tight integration of and coordination
between computation with physical processes.
CPS include embedded systems and networks to
monitor and control physical processes.
Future CPS will be much stronger in
Adaptability, autonomy, efficiency, functionality, reliability,
safety, and usability.
The challenge is the interactions between the
embedded computers and the physical processes.
Need to understand the joint dynamics of HW, SW,
networks and physical processes.
8
Applications
9
Medical Devices
Robotic surgery
10
Medical Devices: Assisted Living
For example:
• Artificial eye: several
approaches, e.g.:
• Camera attached to
glasses; computer worn at
belt; output directly
connected to the brain,
“pioneering work by William
Dobelle”. Previously at
[www.dobelle.com]
11
Medical Devices: Assisted Living (cont’d)
Examples
Integrated cooling, lightning,
room reservation, emergency
handling, communication
Goal: zero-net energy buildings
Expected contribution to fight
against global warming
13
Transportation: Avionics
14
Transportation: Automotive electronics
15
Transportation: DARPA Grand Challenge
16
Google Self-Drive Cars
http://youtu.be/PgTc4Np9YX4
17
Typical Embedded System Architecture
18
Structure of CPS
19
Where CPS Differs from the traditional
embedded systems problem:
20
A Key Challenge on the Cyber Side:
Real-Time Software
Correct execution of a program in C, C#,
Java, Haskell, etc. has nothing to do with how
long it takes to do anything. All our
computation and networking abstractions are
built on this premise.
21
Techniques Exploiting the
Fact that Time is Irrelevant
Programming languages
Virtual memory
Caches
Dynamic dispatch
Speculative execution
Power management (voltage scaling)
Memory management (garbage collection)
Just-in-time (JIT) compilation
Multitasking (threads and processes)
Component technologies (OO design)
Networking (TCP)
…
22
What about “Real Time”?
23
A Story
24
Abstraction Layers
The purpose for an
abstraction is to
hide details of the
implementation
below and provide
a platform for
design from above.
25
Abstraction Layers
Every abstraction
layer has failed for
time-sensitive
applications.
26
Is the problem
intrinsic in the
technology?
Electronics technology
delivers highly repeatable and
precise timing…
20.000 MHz (± 100 ppm)
27
CPS is Multidisciplinary
28
CPS is at boundary of EE and CS
29
Traditionally, embedded systems has been an industrial
(not academic) problem, principally about resource
limitations.
Small memory
Small data word sizes
Relatively slow clocks
30
Content of an Embedded Systems Course
• Interrupts • Timing
• Imperative logic
• C programming
• Concurrency
• Assembly language
• Verification
• FPGA design
• …
• RTOS design
•…
31
Main Challenge
32
What this course is about
34
Modeling, Design, Analysis
35
What is Modeling?
36
More on Model-Based Design
37
Topics we will study
Model-Based Design
Represent systems based on mathematical models
System Analysis
Verify that your model & implementation will meet a spec.
Concurrency
Run multiple tasks correctly and efficiently
Real-Time
Ensuring that tasks finish on time
Joint discrete-continuous dynamics
Consider CPS as a whole
38
Read Chapter 1 of Lee & Seshia
39