Professional Documents
Culture Documents
Cyber Physical Systems: Trường Đại Học Công Nghệ Thông Tin
Cyber Physical Systems: Trường Đại Học Công Nghệ Thông Tin
Cyber Physical Systems: Trường Đại Học Công Nghệ Thông Tin
o Cyber-Physical Systems
o Model-based System Design
o Motivating Example of a CPS
1
The fourth industrial revolution
2
Industry 4.0
Industry 4.0 refers to the intelligent networking of machines and
processes for industry with the help of information and
communication technology (Plattform Industrie 4.0)
3
Industry 4.0 – Cyber Physical Systems
4
Cyber-Physical Systems
E Pluribus Unum: Out of Many, One
Smarter
Machine to
Internet of Planet
Machine
Everything
(M2M)
Internet of
Things The Fog
(IoT) TSensors
Industry 4.0 The (Trillion
Industrial Sensors)
Internet
Cyber-Physical Systems
5
Cyber-Physical Systems
6
Cyber-Physical Systems
Characteristics of Cyber-Physical Systems
• Reactive
operates at the speed of the environment
• Real-time
timing of events matters!
• Concurrent
system + environment, at a minimum
• Heterogeneous
hardware/software/networks, physical processes
• (increasingly) Networked
distributed, exposed to attacks
7
Cyber-Physical Systems
Example structure of a cyber-physical system.
8
Cyber-Physical Systems
Full of Contradictory Requirements Biomedical
Manufacturing Buildings
Military
9
Cyber-Physical Systems
Full of Contradictory Requirements
Contradictions:
• Adaptability vs. Repeatability
Energy
• High connectivity vs. Security and Privacy
• High performance vs. Low Energy
• Asynchrony vs. Coordination/Cooperation
• Scalability vs. Reliability and Predictability Avionics
• Laws and Regulations vs. Technical Possibilities
• Economies of scale (cloud) vs. Locality (fog)
• Open vs. Proprietary
• Algorithms vs. Dynamics
Innovation:
Cyber-physical systems require new engineering
methods and models to address these contradictions.
10
Internet of Things
11
Internet of Things
12
Internet of Things
• Sensors
• Local Processing
• Local Storage
• Network
• Internet
• Cloud
Processing
• Cloud Storage
13
The Hype Around The Internet of Things
Internet of Things
Peak of
Inflated
Expectations
http://www.gartner.com/technology/research/hype-cycles/
14
The Hype Around The Internet of Things
Internet of Things
Trough of
Disillusionment
http://www.gartner.com/technology/research/hype-cycles/
15
Cyber-Physical Systems
IoT is the use of Internet technology for
Cyber-Physical Systems
16
Cyber-Physical Systems
Example – Flying Paster
17
Cyber-Physical Systems
Example – Flying Paster
Source: http://offsetpressman.blogspot.com/2011/03/how-flying-paster-works.html
18
Cyber-Physical Systems
Automotive CPS and Societal Challenges
• Safer Transportation
• Reduced Emissions
• Smart Transportation
• Energy Efficiency
• Climate Change
• Human-Robot Collaboration
19
Cyber-Physical Systems
Example: Air-Fuel ratio control to reduce emissions
• Catalytic converters reduce CH4, CO2, and NOx emissions
• Conversion efficiency optimal at stoichiometric value
Exhaust manifold
Fuel injectors
Measured
A/F
Software
Measured
Air Flow
21
Report: McKinsey Global Institute
22
Economic Potential
23
The Emerging IT Scene
Infrastructural
core
The Cloud!
Sensory
swarm
Mobile
access
24
What this course is about
25
Modeling, Design, Analysis
26
Determinacy
Some of the most valuable models are deterministic
27
Determinacy
Physicists continue to debate whether the world is
deterministic
Deterministic
model
Determinism is a
property of models,
Deterministic not a property of the
system? systems they model.
28
Schematic
A simple Cyber-Physical System
Signal Signal
Differential Equations
are deterministic models.
33
Cyber-Physical Systems
A major problem for CPS: combinations of
deterministic models are nondeterministic
Not Dependable!
Signal Signal
34
Cyber-Physical Systems
Timing is not part of software and network semantics
Correct execution of a program in all widely used programming
languages, and correct delivery of a network message in all
general-purpose networks has nothing to do with how long it takes
to do anything.
35
The Value of Models
36
A Model
37
A Physical Realization
38
Model Fidelity
I’m an engineer…
39
Cyber-Physical Systems
For CPS, we need to change the question
40
Cyber-Physical Systems
Existence proofs that useful deterministic models
for CPS exist
Together, these
Deterministic models for CPS with faithful
technologies give a
implementations exist:
programming model for
distributed and concurrent
PTIDES: distributed real-time software
real-time systems that is
http://chess.eecs.berkeley.edu/ptides
deterministic in the sense
of single-threaded
PRET: time-deterministic architectures
imperative programs, and
http://chess.eecs.berkeley.edu/pret
also deterministic w.r.t. to
timing of external
These two projects ended in 2015.
interactions.
41
Model-Based Design
1. Create a mathematical model of all the parts of the
cyber-physical system
o Physical processes
o Controllers: software, hardware, etc.
o Software environment
o Hardware platform
o Network
o Sensors and actuators
43
Modeling Techniques (2)
o Finite-State Machines à for Modal Behavior, as in a
controller, software
o Determinism, Receptiveness
o Trace – modeling the input/output behavior of an FSM
o Composition and Hierarchy
Synchronous/Asynchronous composition,StateCharts
44
Modeling Techniques (3)
45
Modeling & Design: Sensors and Actuators
46
Design: Memory Architectures
q Types of Memory
q Memory Maps and Organization
q Memory Model for C programs
q Memory Hierarchy and Protection
47
Concurrent Programming with Interrupts
q I/O Mechanisms in Software: Polling vs. Interrupts
q Setting up Interrupts
q Reasoning about Interrupt-Driven Programs
volatile uint timer_count = 0;
void ISR(void) {
if(timer_count != 0) {
timer_count--;
}
}
int main(void) {
// initialization code
SysTickIntRegister(&ISR);
... // other init
timer_count = 2000;
while(timer_count != 0) {
... code to run for 2 seconds
}
}
48
Concurrency: Modeling and Design
o Threads
o Processes
o Synchronous/Reactive Languages
o Dataflow
49
Real-Time: Design and Analysis
o Scheduling
• Pre-emptive and non-preemptive
• RMS vs EDF
• Priority inversion, protocols: PIP, PCP
• Anomalies in multiprocessor scheduling
50
Modeling & Analysis:
51
Analysis and Verification
o Reachability Analysis
• Compute the set of all states of the system reachable from any
initial state
o Model Checking
• Does the (closed-loop) system satisfy a temporal logic property?
52
Fault Tolerance and Security
53
Distributed Systems and Networking
o Time-Triggered Ethernet, …
54
Other Relevant Topics
55
Future of CPS Design
Our goal has been to give you what you need to think
critically about the technology.
56
Motivating Example of a CPS
STARMAC quadrotor aircraft (Tomlin, et al.)
Modeling:
• Flight dynamics (ch2)
• Modes of operation (ch3)
• Transitions between modes (ch4)
• Composition of behaviors (ch5) Design:
• Multi-vehicle interaction (ch6) • Sensors and Actuators (ch7)
• Processors (ch8)
• Memory system (ch9)
• Sensor interfacing (ch10)
• Concurrent software (ch11)
• Real-time scheduling (ch12)
Analysis
• Specifying safe behavior (ch13)
• Achieving safe behavior (ch14)
• Verifying safe behavior (ch15)
• Guaranteeing timeliness (ch16)
• Security and privacy (ch17)
58
STARMAC Design Block Diagram
LIDAR RS232
URG-04LX 115 kbps
10 Hz ranges PC/104 WiFi
USB 2
Stereo Cam Pentium M
480 Mbps
802.11g+
Firewire 1GB RAM, 1.8GHz ≤ 54 Mbps
Videre STOC
30 fps 320x240 480 Mbps RS232 Est. & control
GPS UART
Superstar II 19.2 kbps Stargate 1.0 WiFi
10 Hz CF
UART
Intel PXA255 802.11b
64MB RAM, 400MHz 100 Mbps ≤ 5 Mbps
IMU 115 Kbps UART
3DMG-X1 UART Supervisor, GPS
Robostix
76 or 100 Hz 115 kbps
Atmega128
Low level control
Ranger I2C PPM
SRF08 400 kbps 100 Hz
13 Hz Altitude Analog
Ranger Beacon
Mini-AE
ESC & Motors
Timing/ Tracker/DTS Phoenix-25, Axi 2208/26
10-50 Hz Altitude Analog 1 Hz
59
A Theme in This Course: Think Critically
Our goal is to teach you how things are done today, and
why that is not good enough. So you will not be surprised
by the changes that are coming.
60