43
EECE 396-1 Hybrid and Embedded Systems: Computation T. John Koo, Ph.D. Institute for Software Integrated Systems Department of Electrical Engineering and Computer Science Vanderbilt University 300 Featheringill Hall April 20 , 2004 [email protected] http://www.vuse.vanderbilt.edu/~kootj

EECE 396-1 Hybrid and Embedded Systems: Computation

  • Upload
    kiley

  • View
    36

  • Download
    1

Embed Size (px)

DESCRIPTION

EECE 396-1 Hybrid and Embedded Systems: Computation. T. John Koo, Ph.D. Institute for Software Integrated Systems Department of Electrical Engineering and Computer Science Vanderbilt University 300 Featheringill Hall April 20 , 2004 [email protected] - PowerPoint PPT Presentation

Citation preview

Page 1: EECE 396-1 Hybrid and Embedded Systems: Computation

EECE 396-1Hybrid and Embedded Systems: Computation

T. John Koo, Ph.D.Institute for Software Integrated Systems

Department of Electrical Engineering and Computer ScienceVanderbilt University

300 Featheringill HallApril 20 , 2004

[email protected]://www.vuse.vanderbilt.edu/~kootj

Page 2: EECE 396-1 Hybrid and Embedded Systems: Computation

2

Summary

Page 3: EECE 396-1 Hybrid and Embedded Systems: Computation

3

Hybrid System A system built from atomic discrete

components and continuous components by parallel and serial composition, arbitrarily nested.

The behaviors and interactions of components are governed by models of computation (MOCs).

Discrete Components Finite State Machine (FSM) Discrete Event (DE) Synchronous Data Flow (SDF)

Continuous Components Ordinary Differential Equation (ODE) Partial Differential Equation (PDE)

q1q2 q3

u

xç = f (x) + g(x)u

x

Page 4: EECE 396-1 Hybrid and Embedded Systems: Computation

4

Why Hybrid Systems? Modeling abstraction of

Continuous systems with phased operation (e.g. walking robots, mechanical systems with collisions, circuits with diodes)

Continuous systems controlled by discrete inputs (e.g. switches, valves, digital computers)

Coordinating processes (multi-agent systems) Important in applications

Hardware verification/CAD, real time software Manufacturing, communication networks, multimedia

Large scale, multi-agent systems Automated Highway Systems (AHS) Air Traffic Management Systems (ATM) Uninhabited Aerial Vehicles (UAV) Power Networks

Page 5: EECE 396-1 Hybrid and Embedded Systems: Computation

5

Topics Modeling

Finite State Machines Time Automata Ordinary Differential Equations Hybrid Automata

Analysis Reachability - Discrete Reachability - Continuous Reachability - Hybrid

Tool Ptolemy II HyTech Requiem d/dt Checkmate

Verification Temporal Logic Model Checking Time Automata

q1q2 q3

u

xç = f (x) + g(x)u

x

Page 6: EECE 396-1 Hybrid and Embedded Systems: Computation

6

Hybrid Automaton

Page 7: EECE 396-1 Hybrid and Embedded Systems: Computation

7

Hybrid Automaton Hybrid Automaton (Lygeros, 2003)

Page 8: EECE 396-1 Hybrid and Embedded Systems: Computation

8

Hybrid Automaton

Q

X

Execution

Page 9: EECE 396-1 Hybrid and Embedded Systems: Computation

9

Examples: Thermostat

t

Page 10: EECE 396-1 Hybrid and Embedded Systems: Computation

10

Examples: Bouncing Ball

Page 11: EECE 396-1 Hybrid and Embedded Systems: Computation

11

Motivating Examples:Two Tanks

Page 12: EECE 396-1 Hybrid and Embedded Systems: Computation

12

Hybrid Automaton

t

i

012

34

Page 13: EECE 396-1 Hybrid and Embedded Systems: Computation

13

Hybrid Automaton

i

012

34

t

Page 14: EECE 396-1 Hybrid and Embedded Systems: Computation

14

Hybrid Automaton

i

012

34

t

Page 15: EECE 396-1 Hybrid and Embedded Systems: Computation

15

Hybrid Automaton

Page 16: EECE 396-1 Hybrid and Embedded Systems: Computation

16

Examples: Bouncing Ball

Page 17: EECE 396-1 Hybrid and Embedded Systems: Computation

17

Hybrid Automaton

i

012

tfinite

i

012

tinfinite

Page 18: EECE 396-1 Hybrid and Embedded Systems: Computation

18

Hybrid Automaton

i

012

tfinite

i

012

tZeno

Page 19: EECE 396-1 Hybrid and Embedded Systems: Computation

19

Hybrid Automaton Zeno of Elea, 490BC

Ancient Greek philosopher The race of Achilles and the turtle

Achilles, a renowned runner, was challenged by the turtle to a race. Being a fair sportsman, Achilles decided to give the turtle a 10 meter head-start. To overtake the turtle, Achilles will have to first cover half the distance separating them. To cover the remaining distance, he will have to cover half that distance, and so on.

No matter how fast Achilles is, he can never overtake the turtle. Why???

Ans: Covering each one of the segments in this series requires a non zero amount of time. Since there is an infinite number of segments, Achilles will never overtake the turtle.

Page 20: EECE 396-1 Hybrid and Embedded Systems: Computation

20

Hybrid Automaton Non-Determinism

Multiple Executions for the same initial condition Sources of non-determinism

Non-Lipschitz continuous vectorfields, f Multiple discrete transition destinations, E & G Choice between discrete transition and continuous evolution, D & G Non-unique continuous state assignment, R

Definition: A hybrid automaton H is deterministic if for all initial conditions there exists a unique maximal sequence

Page 21: EECE 396-1 Hybrid and Embedded Systems: Computation

21

Hybrid Automaton Blocking

No Infinite executions for some initial states Source of blocking

Cannot continue in domain due to reaching the boundary of the domain where no guard is defined

Have no place to make discrete transition to

Definition: A hybrid automaton H is non-blocking if for every initial condition there exists at least one infinite execution

?

Page 22: EECE 396-1 Hybrid and Embedded Systems: Computation

22

Hybrid Automaton Zeno Executions

Infinite execution defined over finite time Infinite number of transitions in finite time Transition times converge

Definition: A hybrid automaton H is zeno if there exists an initial condition for which all infinite executions are Zeno

Page 23: EECE 396-1 Hybrid and Embedded Systems: Computation

23

Exercise

Page 24: EECE 396-1 Hybrid and Embedded Systems: Computation

24

Examples: Bouncing Ball

Is this model: Deterministics? Non-Blocking? Zeno?

Page 25: EECE 396-1 Hybrid and Embedded Systems: Computation

25

Examples: Bouncing Ball

Is this model: Deterministics?

Yes, the Guard and Domain contains only one element. Reset maps from one point to exactly another point. Also, the vector field is Lipschitz continuous.

Non-Blocking? Zeno?

Page 26: EECE 396-1 Hybrid and Embedded Systems: Computation

26

Examples: Bouncing Ball

Is this model: Deterministics? Non-Blocking?

Yes, the guard is always reachable from any initial condition within the domain and also the reset makes the state start within the domain.

Zeno?

Page 27: EECE 396-1 Hybrid and Embedded Systems: Computation

27

Examples: Bouncing Ball

Page 28: EECE 396-1 Hybrid and Embedded Systems: Computation

28

Examples: Bouncing Ball

Page 29: EECE 396-1 Hybrid and Embedded Systems: Computation

29

Examples: Bouncing Ball

Page 30: EECE 396-1 Hybrid and Embedded Systems: Computation

30

Examples: Bouncing Ball

Is this model: Deterministics? Non-Blocking? Zeno?

Yes, it is Zeno since the time sequence converges.

Page 31: EECE 396-1 Hybrid and Embedded Systems: Computation

31

Thermostat

Is this model: Deterministics? Non-Blocking? Zeno?

Page 32: EECE 396-1 Hybrid and Embedded Systems: Computation

32

Thermostat

Is this model: Deterministics? No. Non-Blocking? Yes. Zeno? No.

Page 33: EECE 396-1 Hybrid and Embedded Systems: Computation

33

Two Tanks

Is this model: Deterministics? Yes. Non-Blocking? Yes. Zeno? Yes.

Page 34: EECE 396-1 Hybrid and Embedded Systems: Computation

34

Zeno—infinitely many jumps in finite time

If

Water Tank Automaton

Page 35: EECE 396-1 Hybrid and Embedded Systems: Computation

35

Timed Automata

Is this model: Deterministics? Non-Blocking? Zeno?

Page 36: EECE 396-1 Hybrid and Embedded Systems: Computation

36

Timed Automata

Is this model: Deterministics? No. Non-Blocking? Yes. Zeno? No.

Page 37: EECE 396-1 Hybrid and Embedded Systems: Computation

37

In Summary

Deterministic Non-Blocking Zeno

Thermostat NO YES NO

Bouncing Ball YES YES YES

Two Tanks YES YES YES

Time Automaton

NO YES NO

Page 38: EECE 396-1 Hybrid and Embedded Systems: Computation

38

In Summary

Deterministic Non-Blocking Zeno

Thermostat NO YES NO

Bouncing Ball YES YES YES

Two Tanks YES YES YES

Time Automaton

NO YES NO

Mapping

Verification

Special Attention in Simulation

Verification

Page 39: EECE 396-1 Hybrid and Embedded Systems: Computation

39

Computational Tools

Page 40: EECE 396-1 Hybrid and Embedded Systems: Computation

40

Computational Tools Simulation

Ptolemy II: ptolemy.eecs.berkeley.edu Modelica: www.modelica.org SHIFT: www.path.berkeley.edu/shift Dymola: www.dynasim.se OmSim: www.control.lth.se/~cace/omsim.html ABACUSS: yoric.mit.edu/abacuss/abacuss.html Stateflow: www.mathworks.com/products/stateflow CHARON: http://www.cis.upenn.edu/mobies/charon/ Masaccio: http://www-cad.eecs.berkeley.edu/~tah/Publications/masaccio.html

Page 41: EECE 396-1 Hybrid and Embedded Systems: Computation

41

Computational Tools Simulation

Models of Computation

System Complexity

Ptolemy II

DymolaModelica

ABACUSS

SHIFT

OmSim

MasaccioCHARON

StateFlow/Simulink

Page 42: EECE 396-1 Hybrid and Embedded Systems: Computation

42

Computational Tools Verification

FiniteAutomata

TimedAutomata

LinearAutomata

LinearHybrid Systems

NonlinearHybrid Systems

d/dtCheckMate

Timed COSPANKRONOSTimed HSISVERITIUPPAAL

HYTECHCOSPANSMVVIS…

Requiem

Page 43: EECE 396-1 Hybrid and Embedded Systems: Computation

43

End