52
Introduction to Hybrid Systems G ERARDO S CHNEIDER [email protected] IRISA/INRIA ´ E QUIPE L ANDE R ENNES -F RANCE Introduction to Hybrid Systems – p.1/21

Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Introduction to Hybrid Systems

GERARDO SCHNEIDER

[email protected]

IRISA/INRIA

EQUIPE LANDE

RENNES - FRANCE

Introduction to Hybrid Systems – p.1/21

Page 2: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Motivation

� Computers are everywhere

� Electronic commerce

� Education

� Thermostat

� Automated highway systems

� Air traffic management systems

� Automotive industry (robots)

� Chemical plants

� � �

Introduction to Hybrid Systems – p.2/21

Page 3: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Motivation

� Computers are everywhere

� Many of these systems have a “hybrid” nature.Systems exhibiting both:

� Continuous evolutions

� Discrete transitions

Introduction to Hybrid Systems – p.2/21

Page 4: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Motivation

� Computers are everywhere

� Many of these systems have a “hybrid” nature.Systems exhibiting both:

� Continuous evolutions

� Discrete transitions

� Some examples:

� Thermostat: Temperature + switch On/Off

� Robotic systems: Distance, speed, etc +switch direction

� Chemical plants: Chemical reactions +closing/opening valves

� � �

Introduction to Hybrid Systems – p.2/21

Page 5: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Hybrid Systems: Why a new theory?

� Two main reasons: Academic and practical

Introduction to Hybrid Systems – p.3/21

Page 6: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Hybrid Systems: Why a new theory?

� Two main reasons: Academic and practicalAcademic reason: People competent in specific

domains of knowledge

� Control theoreticians

� Computer scientists

� Mathematicians

Introduction to Hybrid Systems – p.3/21

Page 7: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Hybrid Systems: Why a new theory?

� Two main reasons: Academic and practicalAcademic reason: People competent in specific

domains of knowledge

� Control theoreticians

� Computer scientists

� MathematiciansPractical reason: Finding suitable abstract models

and analysis techniques for naturalphenomena

Introduction to Hybrid Systems – p.3/21

Page 8: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Hybrid Systems: Why a new theory?

� Two main reasons: Academic and practicalAcademic reason: People competent in specific

domains of knowledge

� Control theoreticians

� Computer scientists

� MathematiciansPractical reason: Finding suitable abstract models

and analysis techniques for naturalphenomena

� Hybrid models offer clean modelling solutions forphenomena for which classical models areinadequate

Introduction to Hybrid Systems – p.3/21

Page 9: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Overview of the presentation

� Continuous models

� Discrete systems

� Hybrid automata

� Verification

� Discussion

Introduction to Hybrid Systems – p.4/21

Page 10: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Continuous Models

Traditional formalisms for describing system dynamicsare based on continuous dynamical systems

Introduction to Hybrid Systems – p.5/21

Page 11: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Continuous Models

Traditional formalisms for describing system dynamicsare based on continuous dynamical systems

� Initially: Conceived for predicting the behaviour ofuncontrolled systems (e.g. solar system)

Introduction to Hybrid Systems – p.5/21

Page 12: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Continuous Models

Traditional formalisms for describing system dynamicsare based on continuous dynamical systems

� Initially: Conceived for predicting the behaviour ofuncontrolled systems (e.g. solar system)

� Later: Adapted for systems with inputs - controlledsystems (e.g. robots)

� In the presence of disturbance or controlsignals: Need for input (or control) variables

Introduction to Hybrid Systems – p.5/21

Page 13: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Continuous Models

Traditional formalisms for describing system dynamicsare based on continuous dynamical systems

� Initially: Conceived for predicting the behaviour ofuncontrolled systems (e.g. solar system)

� Later: Adapted for systems with inputs - controlledsystems (e.g. robots)

� In the presence of disturbance or controlsignals: Need for input (or control) variables

� Such systems are specified by differential ordifference equations, describing the evolution ofthe state-variable

Introduction to Hybrid Systems – p.5/21

Page 14: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Continuous Models: Limitations

� The dynamics of many physical components ofplants cannot be modelled using purely-continuous models

� Behaviour of valves and switches are bestmodelled as discrete systems

� Continuous sensors and actuators aresaturated beyond certain values

Introduction to Hybrid Systems – p.6/21

Page 15: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Continuous Models: Limitations

� The dynamics of many physical components ofplants cannot be modelled using purely-continuous models

� Some “intelligent” control might not be expressedin terms of continuous trajectories

� Movement in physical space may contain“objects” and “places”: Inherently discreteinvolving phenomena like collision

Introduction to Hybrid Systems – p.6/21

Page 16: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Continuous Models: Limitations

� The dynamics of many physical components ofplants cannot be modelled using purely-continuous models

� Some “intelligent” control might not be expressedin terms of continuous trajectories

� Even in the presence of continuous models, thedynamics could be highly non-linear

� Many models based on a linear approximationare valid only in a certain region. Whenleaving such region a new linear model shouldbe used

Introduction to Hybrid Systems – p.6/21

Page 17: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Continuous Models: Limitations

� The dynamics of many physical components ofplants cannot be modelled using purely-continuous models

� Some “intelligent” control might not be expressedin terms of continuous trajectories

� Even in the presence of continuous models, thedynamics could be highly non-linear

� Many control systems need interaction withentities other than continuous sensors: e.g. withcomputers or human operators

� Such entities may activate or suspend thecontroller execution or force it to switch toanother mode of operation Introduction to Hybrid Systems – p.6/21

Page 18: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Continuous Models: PracticalSolution

� Control Engineers know how to solve many of theabove problems:

Introduction to Hybrid Systems – p.7/21

Page 19: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Continuous Models: PracticalSolution

� Control Engineers know how to solve many of theabove problems:

� A continuous model is given for each “mode”of operation

� Control laws are synthesised for each of thesemodes and then “glue” together

Introduction to Hybrid Systems – p.7/21

Page 20: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Continuous Models: PracticalSolution

� Control Engineers know how to solve many of theabove problems:

� A continuous model is given for each “mode”of operation

� Control laws are synthesised for each of thesemodes and then “glue” together

� However, the transition between them is not apart of the “official” dynamics of the system

Introduction to Hybrid Systems – p.7/21

Page 21: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Continuous Models: PracticalSolution

� Control Engineers know how to solve many of theabove problems:

� A continuous model is given for each “mode”of operation

� Control laws are synthesised for each of thesemodes and then “glue” together

� However, the transition between them is not apart of the “official” dynamics of the system

� The formal notion of dynamical system isreserved only for the continuous modes; otherphenomena are treated as “extra-modelic”

Introduction to Hybrid Systems – p.7/21

Page 22: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Overview of the presentation

� Continuous models

� Discrete systems

� Hybrid automata

� Verification

� Discussion

Introduction to Hybrid Systems – p.8/21

Page 23: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Discrete Systems

� The design of reactive systems in ComputerScience has similar goals to Control Theory

� To design systems that interact with anexternal environment

Introduction to Hybrid Systems – p.9/21

Page 24: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Discrete Systems

� The design of reactive systems in ComputerScience has similar goals to Control Theory

� To design systems that interact with anexternal environment

� Example: A mechanism which controls theaccess of clients to some shared resources

Introduction to Hybrid Systems – p.9/21

Page 25: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Discrete Systems

� Main difference between Control Theory andComputer Science

� Control Theory:

� State variables are physical magnitudes(e.g. temperature)

� Interaction is done through measurementsof physical magnitudes

� Computer Science:

� State variables are non-numerical values(e.g. “ready”, “waiting”)

� Interaction via messages and events such as“request” or “release”

Introduction to Hybrid Systems – p.9/21

Page 26: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Discrete Systems: How to Model?

� State-transition dynamics: For each state andinput event, it defines what is the next state

Introduction to Hybrid Systems – p.10/21

Page 27: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Discrete Systems: How to Model?

� State-transition dynamics: For each state andinput event, it defines what is the next state

� Small state-space: It can be explicitly written in atable

� Larger systems are described using two methods:

� Composition, where interacting sub-systemsare described separately

� Implicit (symbolic) description (e.g. usingprogramming formalisms)

Introduction to Hybrid Systems – p.10/21

Page 28: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Discrete vs. Continuous Systems

The state space of a discrete system is much smallerthan that of a continuous one

Introduction to Hybrid Systems – p.11/21

Page 29: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Discrete vs. Continuous Systems

The state space of a discrete system is much smallerthan that of a continuous one

� Are Discrete systems easier to analyse thanContinuous systems?

Introduction to Hybrid Systems – p.11/21

Page 30: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Discrete vs. Continuous Systems

The state space of a discrete system is much smallerthan that of a continuous one

� Are Discrete systems easier to analyse thanContinuous systems?

Not Always!

Introduction to Hybrid Systems – p.11/21

Page 31: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Discrete vs. Continuous Systems

The state space of a discrete system is much smallerthan that of a continuous one

� D.S. are defined on impoverish mathematicaldomains: Analysis and synthesis are more difficult

� Examples:

��� � �

defined over the reals: Simple solutionusing division and subtraction

� Finding whether there is a Boolean vectorsatisfying a formula in propositional logic, is anNP-hard problem: We need to explore allpossible vectors!

Introduction to Hybrid Systems – p.11/21

Page 32: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Discrete vs. Continuous Systems

The state space of a discrete system is much smallerthan that of a continuous one

� D.S. are defined on impoverish mathematicaldomains: Analysis and synthesis are more difficult

� Examples:

� In C.S.

�� � ��� : Knowledge about thetrajectories by inspecting

� In D.S.: No “holistic” way to capture the globalbehaviour of the systems. Sometimes, need toexplore all the possible trajectories.

Introduction to Hybrid Systems – p.11/21

Page 33: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Overview of the presentation

� Continuous models

� Discrete systems

� Hybrid automata

� Verification

� Discussion

Introduction to Hybrid Systems – p.12/21

Page 34: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Hybrid Automata

� Hybrid automata are a good formalism formodelling

� The continuous “modes” of operation, and

� The discrete switches between such modes

� They are a generalisation of a well-establishedformalism: Timed Automata

Introduction to Hybrid Systems – p.13/21

Page 35: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Hybrid Automata: Examples

� Frictionless movement of a particle in a boundedinterval

� � ��� � � � �

subject to elastic collisions atthe endpoints of the interval

� �� �

Introduction to Hybrid Systems – p.14/21

Page 36: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Hybrid Automata: Examples

� Frictionless movement of a particle in a boundedinterval

� � ��� � � � �

subject to elastic collisions atthe endpoints of the interval

� �� �

� �

� � � � �

� � � � �

Introduction to Hybrid Systems – p.14/21

Page 37: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Hybrid Automata: Examples

� A heating system with external On/Off commands

� � � � �

�����

Introduction to Hybrid Systems – p.14/21

Page 38: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Hybrid Automata: Examples

� A heating system with a thermostat

guard reset

invariant

dynamics

label

� � �

� � �

� � � ��� �

� �� � � � �

�����

� � � �

������������� ����� ��

��

����

Introduction to Hybrid Systems – p.14/21

Page 39: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Hybrid Automata: Examples

� A heating system with a thermostat

label

invariant

dynamics

guard reset� � �

� � �

� � � ��� �

� �� � � � �

��� �

� � � �

Introduction to Hybrid Systems – p.14/21

Page 40: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Overview of the presentation

� Continuous models

� Discrete systems

� Hybrid automata

� Verification

� Discussion

Introduction to Hybrid Systems – p.15/21

Page 41: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Verification: Motivation

� How to build correct complex systems?

Introduction to Hybrid Systems – p.16/21

Page 42: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Verification: Motivation

� How to build correct complex systems?

� Synthesis (from the specification)

Introduction to Hybrid Systems – p.16/21

Page 43: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Verification: Motivation

� How to build correct complex systems?

� Synthesis (from the specification)

� Build them and then

� Test

� Simulate

Introduction to Hybrid Systems – p.16/21

Page 44: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Verification: Motivation

� How to build correct complex systems?

� Synthesis (from the specification)

� Build them and then

� Test

� Simulate

� Alternative: Formal verification

Introduction to Hybrid Systems – p.16/21

Page 45: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

What is Verification?

� Instance:

� �

: Program (e.g. Hw circuit, communicationprotocol, distributed system, C program,Real-time system, hybrid automata)

� �

: Specification

� Question:

� Does

satisfies�

?

Introduction to Hybrid Systems – p.17/21

Page 46: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

What is Verification?

� Instance:

� �

: Program (e.g. Hw circuit, communicationprotocol, distributed system, C program,Real-time system, hybrid automata)

� �

: Specification

� Question:

� Does

satisfies�

?

� Example:

� �

: Thermostat

� �

: The temperature remains always between

� andIntroduction to Hybrid Systems – p.17/21

Page 47: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Verification of Discrete Systems:Methodology

� Modelling formalisms: Based on interactingautomata and other variants of transition systems

Introduction to Hybrid Systems – p.18/21

Page 48: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Verification of Discrete Systems:Methodology

� Modelling formalisms: Based on interactingautomata and other variants of transition systems

� Formalisms for specifying systems requirements:Automata, regular expressions or formulae intemporal logic

Introduction to Hybrid Systems – p.18/21

Page 49: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Verification of Discrete Systems:Methodology

� Modelling formalisms: Based on interactingautomata and other variants of transition systems

� Formalisms for specifying systems requirements:Automata, regular expressions or formulae intemporal logic

� Methods to verify that a controller, composed withits environment, generates only acceptablebehaviours

� Algorithmic: Explore the paths in the transitiongraph

� Deductive: Try to prove some claims about allsystem behaviours

Introduction to Hybrid Systems – p.18/21

Page 50: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Overview of the presentation

� Continuous models

� Discrete systems

� Hybrid automata

� Verification

� Discussion

Introduction to Hybrid Systems – p.19/21

Page 51: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

Discussion

� Many natural phenomena and industrialapplications are hybrid by nature (continuous +discrete behaviours)

� Hybrid systems are studied by mathematicians,computer scientists and control theoreticians

� Hybrid automata are a good formalism formodelling hybrid systems

� A lot of work is still to be done for verifying andsynthesising hybrid systems!

Introduction to Hybrid Systems – p.20/21

Page 52: Introduction to Hybrid Systems - cse.chalmers.segersch/slides-talks/slides... · Introduction to Hybrid Systems – p.11/21. Discrete vs. Continuous Systems The state space of a discrete

MUITO OBRIGADO!

Introduction to Hybrid Systems – p.21/21