15-424/15-624: Foundations of Cyber-Physical Systems

Transcription

15-424/15-624: Foundations of Cyber-Physical Systems
15-424/15-624: Foundations of Cyber-Physical Systems
01: Overview
André Platzer
[email protected]
Carnegie Mellon University, Pittsburgh, PA
http://symbolaris.com/course/fcps14.html
http://www.cs.cmu.edu/~aplatzer/course/fcps14.html
0.8
1.0
0.2
0.4
0.6
0.5
0.4
0.3
0.2
0.1
André Platzer (CMU)
FCPS/01: Overview
FCPS
1 / 24
Outline
1
CPS: Introduction
Hybrid Systems & Cyber-Physical Systems
Applications
Robot Labs
2
15-424: Foundations of Cyber-Physical Systems
Objectives
Outline
Assessment
Labs
Resources
3
Approach
CPS Contracts
CPS Logic
Differential Dynamic Logic Family
4
Summary
André Platzer (CMU)
FCPS/01: Overview
FCPS
1 / 24
Can you trust a computer to control physics?
André Platzer (CMU)
FCPS/01: Overview
FCPS
2 / 24
Can you trust a computer to control physics?
Rationale
1
Safety guarantees require analytic foundations
2
Foundations revolutionized digital computer science & society
3
Need even stronger foundations when software reaches out into our
physical world
Cyber-physical Systems
CPS combine cyber capabilities with physical capabilities to solve problems
that neither part could solve alone.
How can we provide people with cyber-physical systems they can bet their
lives on?
– Jeannette Wing
André Platzer (CMU)
FCPS/01: Overview
FCPS
2 / 24
Can you trust a computer to control physics?
Rationale
1
Safety guarantees require analytic foundations
2
Foundations revolutionized digital computer science & society
3
Need even stronger foundations when software reaches out into our
physical world
Cyber-physical Systems
CPS combine cyber capabilities with physical capabilities to solve problems
that neither part could solve alone.
1
CPS Foundations: intellectual grand challenge
2
Research & Industry applications abound
André Platzer (CMU)
FCPS/01: Overview
FCPS
2 / 24
Outline
1
CPS: Introduction
Hybrid Systems & Cyber-Physical Systems
Applications
Robot Labs
2
15-424: Foundations of Cyber-Physical Systems
Objectives
Outline
Assessment
Labs
Resources
3
Approach
CPS Contracts
CPS Logic
Differential Dynamic Logic Family
4
Summary
André Platzer (CMU)
FCPS/01: Overview
FCPS
2 / 24
CPS Analysis: Car Control
Challenge (Hybrid Systems)
Fixed rule describing state
evolution with both
Discrete dynamics
(control decisions)
Continuous dynamics
(differential equations)
x
v
a
7
3.0
2
6
2.5
m
5
1
2.0
4
0
1
2
3
4
5
t
1.5
3
1.0
-1
0.5
-2
0.0
0
André Platzer (CMU)
2
1
1
2
3
4
FCPS/01: Overview
0
5t 0
1
2
3
4
FCPS
5
t
3 / 24
Hybrid Systems & Cyber-Physical Systems
Mathematical model for complex physical systems:
Definition (Hybrid Systems)
systems with interacting discrete and continuous dynamics
Technical characteristics:
Definition (Cyber-Physical Systems)
(Distributed network of) computerized control for physical system
Computation, communication and control for physics
André Platzer (CMU)
FCPS/01: Overview
FCPS
4 / 24
What CPS are around us?
What CPS will be around us in the future?
Which CPS do we trust with our lives?
André Platzer (CMU)
FCPS/01: Overview
FCPS
5 / 24
Successful CPS Proofs
(rx , ry )
fy
(vx , vy )
ey
(lx , ly ) xb
ex
fx
FM’11,LMCS’12,ICCPS’12,ITSC’11,ITSC’13,IJCAR’12
André Platzer (CMU)
FCPS/01: Overview
FCPS
6 / 24
CPS Analysis & Design: Robot Lab
Challenge (Hybrid Systems)
Design & verify controller for
a robot avoiding obstacles
3.5
3.0
2.5
Accelerate / brake
(discrete dynamics)
2.0
1.5
1.0
1D motion
(continuous dynamics)
0.5
0.0
0
1
v
a
2
3
4
6
5
p
0.2
5
0.8
0.1
2
4
6
8
10
t
4
0.6
3
0.4
-0.1
px
2
0.2
-0.2
1
-0.3
2
André Platzer (CMU)
4
6
8
FCPS/01: Overview
10 t
py
2
4
6
8
FCPS
10
t
7 / 24
CPS Analysis & Design: Robot Lab
Challenge (Hybrid Systems)
Design & verify controller for
a robot avoiding obstacles
3.5
3.0
2.5
Accelerate / brake
(discrete dynamics)
2.0
1.5
1.0
1D motion
(continuous dynamics)
0.5
0.0
0
a
1
2
3
4
6
5
d
Ω
1.0
0.2
dx
0.00008
0.1
0.8
0.00006
2
4
6
8
10
t
0.6
0.00004
0.4
-0.1
0.00002
0.2
-0.2
2
-0.3
4
6
8
10
t
2
André Platzer (CMU)
FCPS/01: Overview
4
dy
6
8
FCPS
10
t
7 / 24
CPS Analysis & Design: Robot Lab
Challenge (Hybrid Systems)
Design & verify controller for
a robot avoiding obstacles
3.5
3.0
2.5
Accelerate / brake / stop
(discrete dynamics)
2.0
1.5
1.0
1D motion
(continuous dynamics)
0.5
0.0
0
a
2
4
6
8
10
1
2
3
4
6
5
p
v
t1.2
px
3.5
1.0
3.0
0.8
2.5
0.6
2.0
-0.05
-0.10
1.5
0.4
1.0
-0.15
0.2
-0.20
2
André Platzer (CMU)
py
0.5
4
6
8
FCPS/01: Overview
10
t
2
4
6
8
FCPS
10
t
8 / 24
CPS Analysis & Design: Robot Lab
Challenge (Hybrid Systems)
Design & verify controller for
a robot avoiding obstacles
3.5
3.0
2.5
Accelerate / brake / stop
(discrete dynamics)
2.0
1.5
1.0
1D motion
(continuous dynamics)
0.5
0.0
0
a
2
4
6
8
10
1
2
3
4
d
Ω
t0.00012
1.0
dx
0.00010
-0.05
6
5
0.5
0.00008
0.00006
-0.10
2
4
6
dy
8
10
t
0.00004
-0.15
-0.5
0.00002
2
-0.20
André Platzer (CMU)
4
6
8
FCPS/01: Overview
10
t-1.0
FCPS
8 / 24
CPS Analysis & Design: Robot Lab
Challenge (Hybrid Systems)
Design & verify controller for
a robot avoiding obstacles
3.5
3.0
2.5
Accelerate / brake
(discrete dynamics)
2.0
1.5
1.0
1D motion
(continuous dynamics)
0.5
0.0
0
1
2
4
6
5
p
v
a
3
0.2
2.5
0.8
px
0.1
2.0
2
4
6
8
10
t0.6
1.5
0.4
-0.1
1.0
0.2
-0.2
-0.3
2
André Platzer (CMU)
py
0.5
4
6
8
FCPS/01: Overview
10
t
2
4
6
8
FCPS
10
t
9 / 24
CPS Analysis & Design: Robot Lab
Challenge (Hybrid Systems)
Design & verify controller for
a robot avoiding obstacles
3.5
3.0
2.5
Accelerate / brake
(discrete dynamics)
2.0
1.5
1.0
1D motion
(continuous dynamics)
0.5
0.0
0
a
1
2
3
4
6
5
d
Ω
1.0
0.2
dx
0.00008
0.1
0.8
2
4
6
8
10
t
0.00006
0.6
0.00004
0.4
-0.1
0.00002
0.2
-0.2
2
-0.3
4
6
8
10
t
2
André Platzer (CMU)
FCPS/01: Overview
4
dy
6
8
FCPS
10
t
9 / 24
CPS Analysis & Design: Robot Lab
Challenge (Hybrid Systems)
Design & verify controller for
a robot avoiding obstacles
3.5
3.0
2.5
Accel / brake / steer
(discrete dynamics)
2.0
1.5
1.0
2D motion
(continuous dynamics)
0.5
0.0
0
1
v
a
2
3
4
6
5
p
1.0
0.2
8
2
4
6
8
10
t
0.8
6
0.6
-0.2
px
4
0.4
-0.4
0.2
-0.6
2
-0.8
2
André Platzer (CMU)
4
6
8
FCPS/01: Overview
10 t
py
2
4
6
8
FCPS
10
t
10 / 24
CPS Analysis & Design: Robot Lab
Challenge (Hybrid Systems)
Design & verify controller for
a robot avoiding obstacles
3.5
3.0
2.5
Accel / brake / steer
(discrete dynamics)
2.0
1.5
1.0
2D motion
(continuous dynamics)
0.5
0.0
0
a
1
2
1.0
0.5
2
4
6
8
4
6
5
d
Ω
0.2
3
10 t
2
4
6
8
10
t
dx
0.5
-0.2
-0.5
-0.4
2
4
dy
6
8
10
t
-1.0
-0.6
-0.5
-0.8
André Platzer (CMU)
FCPS/01: Overview
FCPS
10 / 24
CPS Analysis & Design: Robot Lab
Challenge (Hybrid Systems)
Design & verify controller for
a robot avoiding obstacles
3.5
3.0
2.5
Dynamic obstacles
(other agents)
2.0
1.5
1.0
Avoid collisions
(define safety)
0.5
0.0
0
a
2
4
6
8
10
1
v
t1.0
2
3
4
6
5
p
px
4
0.8
-1
3
0.6
-2
2
0.4
-3
1
0.2
-4
2
André Platzer (CMU)
4
6
8
FCPS/01: Overview
10 t
py
2
4
6
8
FCPS
10
t
11 / 24
CPS Analysis & Design: Robot Lab
Challenge (Hybrid Systems)
Design & verify controller for
a robot avoiding obstacles
3.5
3.0
2.5
Dynamic obstacles
(other agents)
2.0
1.5
1.0
Avoid collisions
(define safety)
0.5
0.0
0
a
1
2
4
6
8
10
4
6
5
d
Ω
2
3
t
1.0
dx
0.5
-1
0.5
2
4
6
8
10
t
-2
2
-0.5
4
6
8
10
t
dy
-3
-1.0
-0.5
-4
André Platzer (CMU)
FCPS/01: Overview
FCPS
11 / 24
CPS Analysis & Design: Robot Lab
Challenge (Hybrid Systems)
Design & verify controller for
a robot avoiding obstacles
3.5
3.0
2.5
Control robot
(respect delays)
2.0
1.5
1.0
Environment interaction
(obstacles, agents,
uncertainty)
0.5
0.0
0
1
2
4
6
5
p
v
a
3
1.2
7
1.0
6
0.4
0.2
2
4
6
8
10
t
5
0.8
4
0.6
px
3
-0.2
0.4
2
-0.4
0.2
1
-0.6
2
André Platzer (CMU)
4
6
8
FCPS/01: Overview
10
py
t
2
4
6
8
FCPS
10
t
12 / 24
CPS Analysis & Design: Robot Lab
Challenge (Hybrid Systems)
Design & verify controller for
a robot avoiding obstacles
3.5
3.0
2.5
Control robot
(respect delays)
2.0
1.5
1.0
Environment interaction
(obstacles, agents,
uncertainty)
a
0.5
0.0
0
1
2
3
4
6
5
d
Ω
1.0
0.4
0.5
dx
0.2
2
4
6
8
10
t
2
4
6
8
10
t
0.5
dy
-0.5
-0.2
2
4
6
8
10
t
-0.4
-1.0
-0.6
-0.5
André Platzer (CMU)
FCPS/01: Overview
FCPS
12 / 24
Proof
Theory
Modal
Logic
Computer
Algebra
Algebraic
Geometry
Theorem
Proving
Model
Checking
Differential
Algebra
Logic
Algebra
Lie
Algebra
Differential
Equations
Closure
Ordinals
Logical
Foundations
of
Cyber-Physical
Systems
Fixpoints
& Lattices
Algorithms
Proof
Search
Dynamical
Systems
Analysis
Differentiation
Decision
Procedures
Limit
Processes
Weierstraß
Approximation
Stochastics
Numerics
Hermite
Interpolation
Numerical
Quadrature
André Platzer (CMU)
Error
Analysis
Doob’s
Supermartingales
Stochastic
Differential
Equations
Differential
Generators
Dynkin’s
Infinitesimal
Generators
FCPS/01: Overview
FCPS
13 / 24
Outline
1
CPS: Introduction
Hybrid Systems & Cyber-Physical Systems
Applications
Robot Labs
2
15-424: Foundations of Cyber-Physical Systems
Objectives
Outline
Assessment
Labs
Resources
3
Approach
CPS Contracts
CPS Logic
Differential Dynamic Logic Family
4
Summary
André Platzer (CMU)
FCPS/01: Overview
FCPS
13 / 24
About 15-424/14-624 Foundations of CPS
Foundations!
Modeling & Control
1
2
3
Understand the core principles behind CPSs.
Develop models and controls.
Identify the relevant dynamical aspects.
Computational Thinking
1
2
3
4
5
Identify safety specifications and critical properties of CPSs.
Understand abstraction and system architectures.
Learn how to design by invariant.
Reason rigorously about CPS models.
Verify CPS models of appropriate scale.
CPS Skills
1
2
3
Understand the semantics of a CPS model.
Develop an intuition for operational effects.
Use higher-level model-predictive control.
Byproducts
1
2
Exposure to numerous math areas in action.
...
André Platzer (CMU)
FCPS/01: Overview
FCPS
14 / 24
Course Outline
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Cyber-physical systems: introduction
Differential equations & domains
Choice & control
Safety & contracts
Dynamical systems & dynamic axioms
Truth & proof
Control loops & invariants
Events & delays
Differential equations & differential invariants
Differential equations & proofs
Dynamic logic & dynamical systems
Dynamical systems: discrete & continuous & hybrid
Robots / railway / air traffic / car CPS & applications
Virtual substitution & real arithmetic
Hybrid systems & games
André Platzer (CMU)
FCPS/01: Overview
FCPS
15 / 24
Assessment
Read Collaboration and Academic Integrity Policy
≈22% Theory homework
Policy
Due at beginning of lecture
≈51% Labs, including ≈22% final project
Due at 22:00
Whitepaper
For final project
Proposal
For final project
Term paper
Due with final project
≈11% Midterm
≈11% Final
≈5% Participation in class and in online comments
André Platzer (CMU)
FCPS/01: Overview
FCPS
16 / 24
Robot Labs
1
Robot on Rails
a
b
2
Robot on Highways
a
b
3
with event-driven control
with time-triggered control
Robot on Racetracks
a
b
4
Autobots, Roll Out
Charging Station
stay on the circular racetrack
slow down to avoid collisions
Robot in a Plane
a
b
with obstacle avoidance
Robot vs. Roguebot: avoid collisions with moving obstacles
5
Robot in Star-lab: self-defined final project
6
Final project presented at CPS V&V Grand Prix
André Platzer (CMU)
FCPS/01: Overview
CPS v&V Grand Prix
FCPS
17 / 24
Resources
Prerequisites
15-122 Principles of Imperative Computation
21-122 Integration, Differential Equations, and Approximation
(21-241 Matrix algebra or
18-202 Mathematical Foundations of Electrical Engineering or
15-251 Great Theoretical Ideas in Computer Science)
You will be expected to follow extra background reading material as
needed.
Further reading and background material on the course web page
Check course web page periodically
http://symbolaris.com/course/fcps14.html
KeYmaera
Piazza
Autolab
Ask!
André Platzer (CMU)
FCPS/01: Overview
FCPS
18 / 24
Textbook
André Platzer.
Logical Analysis of Hybrid Systems.
Springer, 426p., 2010.
DOI 10.1007/978-3-642-14509-4
http://symbolaris.com/lahs/
CMU library e-book
André Platzer.
Foundations of Cyber-Physical Systems.
Lecture notes.
Computer Science Department
Carnegie Mellon University.
http://symbolaris.com/course/
fcps14-schedule.html
André Platzer (CMU)
FCPS/01: Overview
FCPS
19 / 24
Outline
1
CPS: Introduction
Hybrid Systems & Cyber-Physical Systems
Applications
Robot Labs
2
15-424: Foundations of Cyber-Physical Systems
Objectives
Outline
Assessment
Labs
Resources
3
Approach
CPS Contracts
CPS Logic
Differential Dynamic Logic Family
4
Summary
André Platzer (CMU)
FCPS/01: Overview
FCPS
19 / 24
CPS Design & CPS Contracts in Programs
Reveal in layers
HP
Contracts
Reason about CPS
@ r e q u i r e s (0<=x & x=H & v =0)
@ r e q u i r e s ( g>0 & 1>=c>=0)
@ensures(0<=x & x<=H)
{
{x ’=v , v’=−g , x >=0};
i f ( x = 0) {
v := −c ∗ v ;
}
}∗ @ i n v a r i a n t ( 2 ∗ g ∗ x <= 2∗ g ∗H − v ˆ2 & x>=0)
CPS
Simulate for intuition
André Platzer (CMU)
CT
FCPS/01: Overview
Design-by-invariant
FCPS
20 / 24
CPS Contracts & CPS Logic
Logic for CPS
dL
Contracts
Reason in Logic
0<=x & x=H & v=0
& g>0 & 1>=c>=0
−>
[{
{x ’=v , v’=−g , x >=0};
i f ( x = 0) {
v := −c ∗ v ;
}
}∗ @ i n v a r i a n t ( 2 ∗ g ∗ x <= 2∗ g ∗H − v ˆ2 & x>=0)
] (0<=x & x<=H)
CPS
Analyze for precision
André Platzer (CMU)
CT
FCPS/01: Overview
Proof-by-invariant
FCPS
21 / 24
Family of Differential Dynamic Logics
c o n ti n
rsar
i
nondet
tic
adv
e
has
stoc
al
uous
d i s cr
e te
JAR’08,CADE’11,LMCS’12,LICS’12,LICS’12
André Platzer (CMU)
FCPS/01: Overview
FCPS
22 / 24
Family of Differential Dynamic Logics
differential dynamic logic
[α]φ
dL = DL + HP
φ
α
c o n ti n
uous
d i s cr
e te
dGL = GL + HG
SdL = DL + SHP
nondet
adv
e
φ
tic
hαiφ
has
rsar
i
al
stochastic differential DL
stoc
differential game logic
hαiφ
φ
quantified differential DL
QdL = FOL + DL + QHP
JAR’08,CADE’11,LMCS’12,LICS’12,LICS’12
André Platzer (CMU)
FCPS/01: Overview
FCPS
22 / 24
Proof
Theory
Modal
Logic
Computer
Algebra
Algebraic
Geometry
Theorem
Proving
Model
Checking
Differential
Algebra
Logic
Algebra
Lie
Algebra
Differential
Equations
Closure
Ordinals
Logical
Foundations
of
Cyber-Physical
Systems
Fixpoints
& Lattices
Algorithms
Proof
Search
Dynamical
Systems
Analysis
Differentiation
Decision
Procedures
Limit
Processes
Weierstraß
Approximation
Stochastics
Numerics
Hermite
Interpolation
Numerical
Quadrature
André Platzer (CMU)
Error
Analysis
Doob’s
Supermartingales
Stochastic
Differential
Equations
Differential
Generators
Dynkin’s
Infinitesimal
Generators
FCPS/01: Overview
FCPS
23 / 24
Outline
1
CPS: Introduction
Hybrid Systems & Cyber-Physical Systems
Applications
Robot Labs
2
15-424: Foundations of Cyber-Physical Systems
Objectives
Outline
Assessment
Labs
Resources
3
Approach
CPS Contracts
CPS Logic
Differential Dynamic Logic Family
4
Summary
André Platzer (CMU)
FCPS/01: Overview
FCPS
23 / 24
Can you trust a computer to control physics?
André Platzer (CMU)
FCPS/01: Overview
FCPS
24 / 24
Can you trust a computer to control physics?
Rationale
1
Safety guarantees require analytic foundations
2
Foundations revolutionized digital computer science & society
3
Need even stronger foundations when software reaches out into our
physical world
Cyber-physical Systems
CPS combine cyber capabilities with physical capabilities to solve problems
that neither part could solve alone.
How can we provide people with cyber-physical systems they can bet their
lives on?
– Jeannette Wing
André Platzer (CMU)
FCPS/01: Overview
FCPS
24 / 24
Can you trust a computer to control physics?
Rationale
1
Safety guarantees require analytic foundations
2
Foundations revolutionized digital computer science & society
3
Need even stronger foundations when software reaches out into our
physical world
Cyber-physical Systems
CPS combine cyber capabilities with physical capabilities to solve problems
that neither part could solve alone.
1
CPS Foundations: intellectual grand challenge
2
Research & Industry applications abound
André Platzer (CMU)
FCPS/01: Overview
FCPS
24 / 24

Similar documents