EECI-IGSC 2020: Difference between revisions

From Murray Wiki
Jump to navigationJump to search
(Created page with "<table width="100%" cellspacing=0> <tr valign=top> <td rowspan=4 align=center> 90px</td> <td align=center><font color='blue' size='+2'>Specification, De...")
 
 
(46 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<table width="100%" cellspacing=0>
<table width="100%" cellspacing=0>
<tr valign=top>
<tr valign=middle>
<td rowspan=4 align=center> [[Image:eecilogo.png|90px]]</td>
<td rowspan=4 align=center> [[Image:eecilogo.png|90px]]</td>
<td align=center><font color='blue' size='+2'>Specification, Design, and Verification <br> &nbsp;</font></td>
<td align=center><font color='blue' size='+2'><p>Specification, Design, and Verification for Self-Driving Cars</p> </font></td>
<td rowspan=4 align=center"> [[Image:cdslogo.png|90px]]</td></tr>
<td rowspan=4 align=center"> [[Image:cdslogo.png|90px]]</td></tr>
<tr><td align=center><font color='blue' size='+2'>of Networked Control Systems<br> &nbsp; </font></td></tr>
<tr valign=top><td align=center><font color='blue' size='+0'>Richard M. Murray and Nok Wongpiromsarn</font></td></tr>
<tr valign=top><td align=center><font color='blue' size='+0'><p> Richard M. Murray, Ufuk Topcu, and Nok Wongpiromsarn </p></font></td></tr>
<tr valign=top><td align=center><font color='blue' size='+0'>9-13 March 2020, Istanbul (Turkey)</font></td></tr>
<tr valign=top><td align=center><font color='blue' size='+0'><p>18-22 March 2013, Belgrade (Serbia)</p></font></td></tr>
</table> __NOTOC__
</table> __NOTOC__


== Course Description ==
== Course Description ==
Increases in fast and inexpensive computing and communications have enabled a new generation of information-rich control systems that rely on multi-threaded networked execution, distributed optimization, sensor fusion and protocol stacks in increasingly sophisticated ways. This course will provide working knowledge of a collection of methods and tools for specifying, designing and verifying networked control systems. We combine methods from computer science (temporal logic, model checking, synthesis of control protocols) with those from dynamical systems and control (Lyapunov functions, trajectory generation, receding horizon control) to analyze and design partially asynchronous control protocols for continuous systems. In addition to introducing the mathematical techniques required to formulate problems and prove properties, we also describe a software toolbox (TuLiP) that is designed for analyzing and synthesizing hybrid control systems using linear temporal logic and robust performance specifications.
Increases in fast and inexpensive computing and communications have enabled a new generation of information-rich control systems that rely on multi-threaded networked execution, distributed optimization, sensor fusion and protocol stacks in increasingly sophisticated ways. This course will provide working knowledge of a collection of methods and tools for specifying, designing and verifying control protocols for autonomous systems, including self-driving cars. We combine methods from computer science (temporal logic, model checking, reactive synthesis) with those from control theory (abstraction methods, optimal control, invariants sets) to analyze and design partially asynchronous control protocols for continuous systems. In addition to introducing the mathematical techniques required to formulate problems and prove properties, we also describe a software toolbox, TuLiP, that is designed for analyzing and synthesizing hybrid control systems using temporal logic and robust performance specifications.


== Reading ==
== Reading ==
Line 19: Line 18:


== Course information ==
== Course information ==
* Instructors: [http://www.cds.caltech.edu/~murray/wiki/Main_Page Richard M. Murray] (Caltech, CDS) and [http://www.cds.caltech.edu/~utopcu/index.php/Main_Page Ufuk Topcu] (Caltech, CDS), and [http://www.cds.caltech.edu/~nok/ Nok Wongpiromsarn] (MIT-Singapore)
* Instructors: [[http:www.cds.caltech.edu/~murray|Richard M. Murray]] (Caltech, CDS) and [[http:www.sites.google.com/site/tichakorn/|Nok Wongpiromsarn]] (UT Austin/Iowa State)
* Date and location: 18-22 May 2013, Belgrade (Serbia)
* Date and location: 9-13 March 2020, Istanbul (Turkey)
* Sponsor: [http://www.eeci-institute.eu/GSC2013 HYCON-EECI Graduate School on Control]
* Sponsor: [http://www.eeci-igsc.eu European Embedded Control Institute (EECI) Internataional Graduate School on Control]


== Lecture Schedule ==
== Lecture Schedule ==
Line 33: Line 32:
|Title  
|Title  
|Topics
|Topics
{{eeci13 entry|L1|RM|Mon, 9:00|Introduction: Protocol-Based Control Systems|
|-
* Introduction to networked control systems (NCS)
|
* Overview of control "protocols"
| Mon,10:00
* Examples: Alice, RoboFlag
| Welcome and course administration
|
{{eeci2020 entry|L1|RM|Mon, 10:30|Course Introduction|
* Introduction to self-driving cars
* Specifications and rules of the road
* Architecture for self-driving (including layers)
* Design problem, analysis/safety
}}
}}
{{eeci13 entry|L2|UT|Mon, 11:00|Automata Theory|
{{eeci2020 entry|L2|RM|Mon, 12:45|Automata Theory|
* Finite transition systems
* Finite transition systems
* Paths, traces and composition of finite transition systems
* Kripke structures
* Linear time properties; safety and liveness
* Automata classes (finite, Buchi,  ND, etc)
* Examples: traffic light
* Examples: stoplight, intersection
}}
{{eeci2020 entry|L3|RM|Mon, 14:15|Temporal Logic|
* Temporal logic
* Linear time properties
* LTL, STL
* Examples: lane change, intersection
}}
{{eeci2020 entry|L4|TW|Mon, 15:45|Model Checking|
* LTL to Buchi automata
* Ideas behind how model checkers work
* Use for “open loop” synthesis
* Examples: intersection
}}
}}
{{eeci13 entry|L3|RM|Mon, 14:00|Temporal Logic|
{{eeci2020 entry|L6|TW|Tue, 8:30|Probabilistic Systems|
* Linear temporal logic
* Stochastic models: Markov chains, Markov decision processes
* Omega regular properties
* Sigma algebra
* Buchi automata, representation of LTL using NBA
* Reachability, regular safety and omega-regular properties
* Examples: traffic light, (RoboFlag), autonomous driving
* PCTL
}}
}}
{{eeci13 entry|L4|UT|Mon, 16:00|Model Checking and Logic Synthesis|
{{eeci2020 entry|C1|TW|Tue, 10:30|Computer Session: Stormpy|
* Basic concepts in model checking
* Probabilistic model checking
* Use of model checking for logic synthesis
* Probabilistic synthesis
* Examples: traffic light, farmer puzzle
* TuLiP interface to stormpy
}}
}}
{{eeci13 entry|C1|RM|Tue, 9:00 <br> Tue, 11:00|Computer Session: Spin|
{{eeci2020 entry|L5|TW|Tue, 14:15|Discrete Abstractions|
* Introduction to Promela and Spin (statements, processes, messages)
* Finite-state approximation of hybrid systems
* Verification examples: traffic light, distributed traffic light, gcdrive
* Use of model checking for the verificatino of hybrid systems
* Synthesis examples: traffic light, farmer puzzle, robot navigation
* Construction of finite-state abstractions for synthesis
}}
}}
{{eeci13 entry|L5|RM (1h)|Wed, 9:00|Deductive Verification of Hybrid Systems|
{{eeci2020 entry|L7|RM|Wed, 8:30|Reactive Synthesis|
* Brief introduction to hybrid systems and verification techniques (deductive, algorithmic)
* Assume/guarantee formalsms
* Deductive verification using barrier certificates
* Two-player, asymmetric games
* Guarded command languages and CCL for asynchronous control protocols
* Winning set computations, solving for strategies
* Examples: multi-agent systems, RoboFlag
* Reading: WTM
* Examples: runner-blocker, grid-world (parking lot, intersection)
}}
}}
{{eeci13 entry|L6|UT (2h)|Wed, 11:00|Algorithmic Verification of Hybrid Systems|
{{eeci2020 entry|C2|RM|Thu, 10:30|Computer Session: TuLiP|
* Abstraction hierarchies for control systems
* Simulation setup
* Finite state abstractions (discretization) and model checking
* TuLiP synthesis
* Discretization of continuous state systems
* Approximate bi-simulation (if time)
* Examples: gear changing (?), ???
}}
}}
{{eeci13 entry|L7|RM (2h)|Wed, 14:00|Synthesis of Reactive Control Protocols|
{{eeci2020 entry|L8|TW|Thu, 8:30|Minimum Violation Planning|
* Open system and reactive system synthesis
* Weighted automaton
* Satisfiability, realizability
* Prioritized safety specification
* Game structures, reachability/safety games
* Minimum violation planning problem and solution for finite state systems
* Mu-calculus (if time) and GR(1) games
* Incremental sampling-based algorithm for continuous systems
* Examples: runner-blocker
}}
}}
{{eeci13 entry|L8|UT(1h)|Wed, 16:00|Receding Horizon Temporal Logic Planning|
{{eeci2020 entry|C3|TW|Thu, 10:30|Computer Session: MVP|
* Receding horizon control
Minimum violation planning using TuLiP
* Examples: reactive motion planning
* Defining system and prioritized safety specification
* Solving minimum violation planning problem
}}
}}
{{eeci13 entry|C2|UT|Thu, 9:00 <br> Thu, 11:00|Computer Session: TuLiP|
{{eeci2020 entry|L9|TW|Fri, 9:00|Behaviour Specifications of Autonomous Vehicles|
* Introduction to TuLiP
* Challenges
* Synthesis of protocols for discrete systems
* Behavior specification using rulebooks
* Discretization of continuous systems (and protocol synthesis)
* Singapore examples
* Examples: reactive motion planning
}}
}}
{{eeci13 entry|L9|UT|Fri, 9:00|Advanced Topics|
{{eeci2020 entry|L10|RM|Fri, 10:00|Safety-Critical Systems|
* Distributed protocols
* Requirements for safety-critical control systems
* Switched systems
* Incorporating ML into autonomous sytems
* Optimal synthesis
* Testing and evaluation
}}
}}
{{eeci13 entry|L10|RM|Fri, 11:00|Summary and Open Questions|
{{eeci2020 entry|L11|RM|Fri, 11:00|Course Summary|
* Review of control trends and course contents
* Summary of key concepts from the course
* Discussion of open problem areas and preliminary results
* Open issues for future research
** Optimization-based techniques
* Discussion
** Probabilistic techniques
** Others: Robustness, switching systems, timed systems
* Examples: robot motion planning, electric power systems (timed)
}}
}}
|}
|}
Line 108: Line 119:


We will make use of two programs during the lab sessions:
We will make use of two programs during the lab sessions:
* [http://spinroot.com Spin] - model checker for formal verification of distributed systems
* [https://moves-rwth.github.io/stormpy stormpy]
* [http://tulip-control.sf.net TuLiP] - python-based toolbox for temporal logic planning and controller synthesis
* [http://tulip-control.sf.net TuLiP] - python-based toolbox for temporal logic planning and controller synthesis
During the course, we will access these programs on a remote machine using ssh.  For some parts of the course it will be useful to have a local installation of MATLAB that can be used for visualizing some simulation results.


If you would like to install the software on your own, here are some basic directions for installing the two packages:
The above link provides instructions on how to install the software on your own. I highly recommend the use of virtual environments (either through [https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/ python virtualenv] or [https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html anaconda]).
* Spin: if you are using Windows, you can download a [http://spinroot.com/spin/Bin/index.html binary installation]. For Mac's, you need to compile from source. For this you will need a C compiler, such as the one that is part of the [https://developer.apple.com/technologies/tools/ Xcode developer toolbox]
 
* TuLiP: you will need a python installation (2.6 or greater) with SciPy (0.9 or greater) installed. You might consider using the [http://enthought.com Enthought Python distribution]. Once you have scipy installed, you will need to install several other python packages, including cvxopt and yices. A [http://sourceforge.net/apps/mediawiki/tulip-control/index.php?title=Main_Page list of required package] is available on the TuLiP project page.
'''TuLiP (use the eeci2020 branch where minimum violation planning is implemented):'''
 
    $ git clone https://github.com/tulip-control/tulip-control.git
    $ cd tulip-control
    $ git checkout eeci2020
    $ pip install wheel
    $ pip install cvxopt
    $ pip install -r requirements.txt
    $ python setup.py install
 
'''polytope:''' Make sure you have version 0.2.2 or higher of polytope installed
 
  $ python -c "import polytope; print(polytope.__version__)"
 
If the version is not '0.2.2' (possibly followed by some additional text, e.g., 0.2.2.dev0+f12c87a64641fed4d36a0fe904613495c434577d), then you need to install the latest version of polytope from source:
 
    $ git clone https://github.com/tulip-control/polytope.git
    $ python setup.py install
 
'''matplotlib:''' matplotlib is not required for TuLiP but will be used in the course for visualization
 
    $ pip install matplotlib
 
'''dot:''' dot is not required for TuLiP but is used for visualization.  The dot program is part of the graphviz package available on most *nix systems.  A typical way to install the package is to use the following command
 
    $ sudo apt-get install graphviz
 
'''Stormpy:''' stormpy requires multiple packages, including carl, pycarl, z3 and storm. First, get all the required libraries. I summarize it here based on Ubuntu. (I tried it on Ubuntu18.04 but other versions should work too.)
 
    $ sudo snap install cmake --classic
    $ sudo apt install build-essential libgmp3-dev libeigen3-dev libboost-all-dev libcln-dev ginac-tools autoconf glpk-utils hwloc libginac-dev automake libglpk-dev libhwloc-dev libz3-dev libxerces-c-dev libeigen3-dev
 
'''carl:'''
 
    $ git clone https://github.com/smtrat/carl.git
    $ cd carl
    $ git checkout master14
    $ mkdir build && cd build
    $ cmake -DUSE_CLN_NUMBERS=ON -DUSE_GINAC=ON -DTHREAD_SAFE=ON ..
    $ make lib_carl
 
'''pycarl:'''
 
    $ git clone https://github.com/moves-rwth/pycarl.git
    $ cd pycarl/
    $ python setup.py develop
 
'''z3:'''
 
    $ git clone https://github.com/Z3Prover/z3.git
    $ cd z3
    $ python scripts/mk_make.py
    $ cd build
    $ make
    $ sudo make install
 
Note down where z3 is installed. If you use virtualenv, it should be something like ''venv_path''/bin/z3 where venv_path is the path to the virtual environment.
 
'''storm:'''
 
    $ git clone -b stable https://github.com/moves-rwth/storm.git
    $ cd storm
    $ export STORM_DIR=''path_to_storm''
    $ mkdir build
    $ cd build
    $ cmake -DUSE_CLN_NUMBERS=ON -DUSE_GINAC=ON -DTHREAD_SAFE=ON ..
    $ ccmake ..
      Change the followings:
        Z3_EXEC: ''venv_path''/bin/z3
        Z3_INCLUDE_DIR: ''venv_path''/include
        Z3_LIBRARY: ''venv_path''/lib/libz3.so
    $ make
 
'''stormpy:'''
 
    $ git clone https://github.com/moves-rwth/stormpy.git
    $ cd stormpy
    $ git checkout 7ae4d0806edde02093d4f90ee25d381b344180ff
    $ python3 setup.py develop
 
Note that the last one has to be python3 even if in the virtual environment, python is a symbolic link to python3 already.


[[Category:Courses]]
[[Category:Courses]]
[[Category:2012-13 Courses]]
[[Category:2019-20 Courses]]

Latest revision as of 13:15, 8 April 2020

Eecilogo.png

Specification, Design, and Verification for Self-Driving Cars

Cdslogo.png
Richard M. Murray and Nok Wongpiromsarn
9-13 March 2020, Istanbul (Turkey)

Course Description

Increases in fast and inexpensive computing and communications have enabled a new generation of information-rich control systems that rely on multi-threaded networked execution, distributed optimization, sensor fusion and protocol stacks in increasingly sophisticated ways. This course will provide working knowledge of a collection of methods and tools for specifying, designing and verifying control protocols for autonomous systems, including self-driving cars. We combine methods from computer science (temporal logic, model checking, reactive synthesis) with those from control theory (abstraction methods, optimal control, invariants sets) to analyze and design partially asynchronous control protocols for continuous systems. In addition to introducing the mathematical techniques required to formulate problems and prove properties, we also describe a software toolbox, TuLiP, that is designed for analyzing and synthesizing hybrid control systems using temporal logic and robust performance specifications.

Reading

The following papers and textbooks will be used heavily throughout the course:

Additional references for individual topics are included on the individual lecture pages.

Course information

Lecture Schedule

The schedule below lists the lectures that will be given as part of the course. Each lecture will last approximately 90 minutes. The individual lecture pages give an overview of the lecture and links to additional information.

Lec Date/time Title Topics
Mon,10:00 Welcome and course administration
L1
RM
Mon, 10:30 Course Introduction
  • Introduction to self-driving cars
  • Specifications and rules of the road
  • Architecture for self-driving (including layers)
  • Design problem, analysis/safety
L2
RM
Mon, 12:45 Automata Theory
  • Finite transition systems
  • Kripke structures
  • Automata classes (finite, Buchi, ND, etc)
  • Examples: stoplight, intersection
L3
RM
Mon, 14:15 Temporal Logic
  • Temporal logic
  • Linear time properties
  • LTL, STL
  • Examples: lane change, intersection
L4
TW
Mon, 15:45 Model Checking
  • LTL to Buchi automata
  • Ideas behind how model checkers work
  • Use for “open loop” synthesis
  • Examples: intersection
L6
TW
Tue, 8:30 Probabilistic Systems
  • Stochastic models: Markov chains, Markov decision processes
  • Sigma algebra
  • Reachability, regular safety and omega-regular properties
  • PCTL
C1
TW
Tue, 10:30 Computer Session: Stormpy
  • Probabilistic model checking
  • Probabilistic synthesis
  • TuLiP interface to stormpy
L5
TW
Tue, 14:15 Discrete Abstractions
  • Finite-state approximation of hybrid systems
  • Use of model checking for the verificatino of hybrid systems
  • Construction of finite-state abstractions for synthesis
L7
RM
Wed, 8:30 Reactive Synthesis
  • Assume/guarantee formalsms
  • Two-player, asymmetric games
  • Winning set computations, solving for strategies
  • Reading: WTM
  • Examples: runner-blocker, grid-world (parking lot, intersection)
C2
RM
Thu, 10:30 Computer Session: TuLiP
  • Simulation setup
  • TuLiP synthesis
L8
TW
Thu, 8:30 Minimum Violation Planning
  • Weighted automaton
  • Prioritized safety specification
  • Minimum violation planning problem and solution for finite state systems
  • Incremental sampling-based algorithm for continuous systems
C3
TW
Thu, 10:30 Computer Session: MVP

Minimum violation planning using TuLiP

  • Defining system and prioritized safety specification
  • Solving minimum violation planning problem
L9
TW
Fri, 9:00 Behaviour Specifications of Autonomous Vehicles
  • Challenges
  • Behavior specification using rulebooks
  • Singapore examples
L10
RM
Fri, 10:00 Safety-Critical Systems
  • Requirements for safety-critical control systems
  • Incorporating ML into autonomous sytems
  • Testing and evaluation
L11
RM
Fri, 11:00 Course Summary
  • Summary of key concepts from the course
  • Open issues for future research
  • Discussion

Software Installation

We will make use of two programs during the lab sessions:

  • stormpy
  • TuLiP - python-based toolbox for temporal logic planning and controller synthesis

The above link provides instructions on how to install the software on your own. I highly recommend the use of virtual environments (either through python virtualenv or anaconda).

TuLiP (use the eeci2020 branch where minimum violation planning is implemented):

   $ git clone https://github.com/tulip-control/tulip-control.git
   $ cd tulip-control
   $ git checkout eeci2020
   $ pip install wheel
   $ pip install cvxopt
   $ pip install -r requirements.txt
   $ python setup.py install

polytope: Make sure you have version 0.2.2 or higher of polytope installed

  $ python -c "import polytope; print(polytope.__version__)"

If the version is not '0.2.2' (possibly followed by some additional text, e.g., 0.2.2.dev0+f12c87a64641fed4d36a0fe904613495c434577d), then you need to install the latest version of polytope from source:

   $ git clone https://github.com/tulip-control/polytope.git
   $ python setup.py install

matplotlib: matplotlib is not required for TuLiP but will be used in the course for visualization

   $ pip install matplotlib

dot: dot is not required for TuLiP but is used for visualization. The dot program is part of the graphviz package available on most *nix systems. A typical way to install the package is to use the following command

   $ sudo apt-get install graphviz

Stormpy: stormpy requires multiple packages, including carl, pycarl, z3 and storm. First, get all the required libraries. I summarize it here based on Ubuntu. (I tried it on Ubuntu18.04 but other versions should work too.)

   $ sudo snap install cmake --classic
   $ sudo apt install build-essential libgmp3-dev libeigen3-dev libboost-all-dev libcln-dev ginac-tools autoconf glpk-utils hwloc libginac-dev automake libglpk-dev libhwloc-dev libz3-dev libxerces-c-dev libeigen3-dev

carl:

   $ git clone https://github.com/smtrat/carl.git
   $ cd carl
   $ git checkout master14
   $ mkdir build && cd build
   $ cmake -DUSE_CLN_NUMBERS=ON -DUSE_GINAC=ON -DTHREAD_SAFE=ON ..
   $ make lib_carl

pycarl:

   $ git clone https://github.com/moves-rwth/pycarl.git
   $ cd pycarl/
   $ python setup.py develop

z3:

   $ git clone https://github.com/Z3Prover/z3.git
   $ cd z3
   $ python scripts/mk_make.py
   $ cd build
   $ make
   $ sudo make install

Note down where z3 is installed. If you use virtualenv, it should be something like venv_path/bin/z3 where venv_path is the path to the virtual environment.

storm:

   $ git clone -b stable https://github.com/moves-rwth/storm.git
   $ cd storm
   $ export STORM_DIR=path_to_storm
   $ mkdir build
   $ cd build
   $ cmake -DUSE_CLN_NUMBERS=ON -DUSE_GINAC=ON -DTHREAD_SAFE=ON ..
   $ ccmake ..
     Change the followings:
       Z3_EXEC: venv_path/bin/z3
       Z3_INCLUDE_DIR: venv_path/include
       Z3_LIBRARY: venv_path/lib/libz3.so
   $ make

stormpy:

   $ git clone https://github.com/moves-rwth/stormpy.git
   $ cd stormpy
   $ git checkout 7ae4d0806edde02093d4f90ee25d381b344180ff
   $ python3 setup.py develop

Note that the last one has to be python3 even if in the virtual environment, python is a symbolic link to python3 already.