Dina Workshop Analysing Properties of Hybrid Systems Rafael Wisniewski Aalborg University.

Slides:



Advertisements
Similar presentations
Partial Order Reduction: Main Idea
Advertisements

Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
Vered Gafni – Formal Development of Real Time Systems 1 Statecharts Semantics.
1 Nondeterministic Space is Closed Under Complement Presented by Jing Zhang and Yingbo Wang Theory of Computation II Professor: Geoffrey Smith.
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Pages COMPUTABILITY THEORY.
ECE Synthesis & Verification - L271 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Model Checking basics.
Timed Automata.
Supervisory Control of Hybrid Systems Written by X. D. Koutsoukos et al. Presented by Wu, Jian 04/16/2002.
1 COMP 382: Reasoning about algorithms Unit 9: Undecidability [Slides adapted from Amos Israeli’s]
CS 267: Automated Verification Lecture 10: Nested Depth First Search, Counter- Example Generation Revisited, Bit-State Hashing, On-The-Fly Model Checking.
1 Temporal Claims A temporal claim is defined in Promela by the syntax: never { … body … } never is a keyword, like proctype. The body is the same as for.
1 Mechanical Verification of Timed Automata Myla Archer and Constance Heitmeyer Presented by Rasa Bonyadlou 24 October 2002.
Best-First Search: Agendas
Planning under Uncertainty
Synthesis of Embedded Software Using Free-Choice Petri Nets.
Review: Search problem formulation
An Introduction to Input/Output Automata Qihua Wang.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
CS 536 Spring Global Optimizations Lecture 23.
CSE115/ENGR160 Discrete Mathematics 03/03/11 Ming-Hsuan Yang UC Merced 1.
4/25/08Prof. Hilfinger CS164 Lecture 371 Global Optimization Lecture 37 (From notes by R. Bodik & G. Necula)
CHAPTER 4 Decidability Contents Decidable Languages
Scheduling Using Timed Automata Borzoo Bonakdarpour Wednesday, April 13, 2005 Selected Topics in Algorithms and Complexity (CSE960)
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
Data Flow Analysis Compiler Design Nov. 8, 2005.
Prof. Fateman CS 164 Lecture 221 Global Optimization Lecture 22.
Chapter 11: Limitations of Algorithmic Power
Fall 2004COMP 3351 A Universal Turing Machine. Fall 2004COMP 3352 Turing Machines are “hardwired” they execute only one program A limitation of Turing.
*Department of Computing Science University of Newcastle upon Tyne **Institut für Informatik, Universität Augsburg Canonical Prefixes of Petri Net Unfoldings.
Data Flow Analysis Compiler Design Nov. 8, 2005.
CS5371 Theory of Computation Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)
Prof. Bodik CS 164 Lecture 16, Fall Global Optimization Lecture 16.
The Game of Algebra or The Other Side of Arithmetic The Game of Algebra or The Other Side of Arithmetic © 2007 Herbert I. Gross by Herbert I. Gross & Richard.
Antoine Girard VAL-AMS Project Meeting April 2007 Behavioral Metrics for Simulation-based Circuit Validation.
Continuity ( Section 1.8) Alex Karassev. Definition A function f is continuous at a number a if Thus, we can use direct substitution to compute the limit.
Zvi Kohavi and Niraj K. Jha 1 Memory, Definiteness, and Information Losslessness of Finite Automata.
Benjamin Gamble. What is Time?  Can mean many different things to a computer Dynamic Equation Variable System State 2.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Pushdown Automata (PDAs)
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
Lecture 05: Theory of Automata:08 Kleene’s Theorem and NFA.
Lecture #5 Properties of hybrid systems João P. Hespanha University of California at Santa Barbara Hybrid Control and Switched Systems.
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport Massachusetts Computer Associates,Inc. Presented by Xiaofeng Xiao.
Recognizing safety and liveness Presented by Qian Huang.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
Verification & Validation By: Amir Masoud Gharehbaghi
Problem Reduction So far we have considered search strategies for OR graph. In OR graph, several arcs indicate a variety of ways in which the original.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Impossibility of Distributed Consensus with One Faulty Process By, Michael J.Fischer Nancy A. Lynch Michael S.Paterson.
SAT-Based Model Checking Without Unrolling Aaron R. Bradley.
1 CSEP590 – Model Checking and Automated Verification Lecture outline for July 9, 2003.
Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb
Program Correctness. The designer of a distributed system has the responsibility of certifying the correctness of the system before users start using.
1 Specification A broad term that means definition Used at different stages of software development for different purposes Generally, a statement of agreement.
Presented by: Belgi Amir Seminar in Distributed Algorithms Designing correct concurrent algorithms Spring 2013.
ALGORITHMS THIRD YEAR BANHA UNIVERSITY FACULTY OF COMPUTERS AND INFORMATIC Lecture nine Dr. Hamdy M. Mousa.
Overview of Previous Lesson(s) Over View  A token is a pair consisting of a token name and an optional attribute value.  A pattern is a description.
CSC317 1 At the same time: Breadth-first search tree: If node v is discovered after u then edge uv is added to the tree. We say that u is a predecessor.
Lecture #4 Thinking of designing an abstract machine acts as finite automata. Advanced Computation Theory.
Chapters 11 and 12 Decision Problems and Undecidability.
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
Copyright © Cengage Learning. All rights reserved.
Automatic Verification
Intermediate Value Theorem
STATE SPACE REPRESENTATION
Intermediate Value Theorem
Review material on discrete event systems I
Instructor: Aaron Roth
Discrete Mathematics CS 2610
Presentation transcript:

Dina Workshop Analysing Properties of Hybrid Systems Rafael Wisniewski Aalborg University

Dina Workshop Contents Example of Coffee Machine Models for Closed Systems Reachability Problem Control Synthesis Continuous Systems

Dina Workshop Example of the Coffe Machine Consider a machine M, which distributes coffee and tea. A customer inserts a unit coin and presses a button for tea or coffee, the machine heats water with certain ingredients and releases plastic cups filled with appropriate drinks. Such a system is decomposed into: Physical Interface (takes care of signals and energy exchange) Information Processing (processes information enterring the system regardless the physical origin)

Dina Workshop Physical Interface vs. Information Processing

Dina Workshop Information Processing Components PortMeaning 1 A coin was inserted 2 cancel button pressed 3 release the coin 4 suffucuent money inserted 5 money returned to user 6 drink distribution ended 7 coffee button pressed tea button pressed 8 drink preparation ended 9 start preparing coffee start preparing tea

Dina Workshop Machines M1 and M2 – Formalism of Automata

Dina Workshop Synchronous Product M = M1 || M2 Consider two automata G 1 = (X 1, E 1, f 1, G 1, x 01, X m1 ), G 2 = (X 2, E 2, f 2, G 2, x 02, X m2 ) and event in G 1 ||G 2 occurs if it occurs either in G 1 or G 2, G 1 ||G 2 = (X 1 x X 2, E 1  E 2, f, G 1||2, (x 01, x 02 ), X m1 x X m2 ) where (f(x 1, e), f(x 2, e)) if e  G 1 (x 1 )  G 2 (x 2 ) f((x 1, x 2 ),e) = (f(x 1, e), x 2 )) if e  G 1 (x 1 ) \ E 2 (x 1, f(x 2, e)) if e  G 2 (x 2 ) \ E 1 and G 1||2 (x 1, x 2 ) = (G 1 (x 1 )  G 2 (x 2 ))  (G 1 (x 1 ) \ E 2 )  (G 2 (x 2 ) \ E 1 )

Dina Workshop M1 and M2

Dina Workshop M1 || M2

Dina Workshop Fixing the Bug by ”lock” Label

Dina Workshop Well Behaving Product of M1 and M2

Dina Workshop Conclusions from the Example Systems may consist of a great number of components thus the global system appears to be very complicated. Set of behaviors are paths in the global transition graph. The desired behavior of a system can be specified as a set of allowed sequences of states and events. Proving that the system is correct amounts to showing that all sequences generated by the system are those allowed by the specifications.

Dina Workshop System D-I D-I is a system not exposed to the external influence and its future evolution depends exclusively on its current state Definition (System D-I) A transition system is S = (X, f), where X is a set of finite states, and f: X  X is the transition function and x 0 is the initial state. Notation X* denotes the set of all sequences over X X k are sequences of length k Definition (Behavior) Given a transition system S = (X, f) the behavior of S starting from an initial state x 0 X is a sequence  = {  i }  X*, i  N such that  0 = x 0 and  i+1 = f(  i )  i  N.

Dina Workshop Basic Reachability Problem Definition (Basic Reachability Problem) For a system S with given x 0 and a set P  X the Basic Reachability Problem is the question if the behavior of S starting at x 0 reaches P (does there exist k such that  k  P ?). Set of all reachable sets can be generated by Algorithm 1 (Forward Simulation/Reachability)  0 := x 0 F 0 := {x 0 } repeat  k+1 := f(  k ) F k+1 := F k  {  k+1 } until F k+1 = F k F* := F k if F*  P   then the system is reachable Finiteness of X plays a crucial role since the sets P, F k, and the transition functions can be stored in finite data structure, secondly the algorithm converges

Dina Workshop System with One Input Definition (System D-II) A one-input transition system is S = (X, V, f), where X and V are finite sets and f: X x V  X is the transition function (a partial function).

Dina Workshop System D-II Definition (Behavior Induced by Input) Given a system S=(X,V,f) and an input sequence  = {  i }  V*. The behavior of S starting from x 0 in the presence of  is a sequence:  (  ) = {  i }  X* such that  0 = x 0 and  i+1 = f(  I,  i )  i  N. Definition (Reachability) For a D-II system S with given x 0 and a set P  X the Reachability Problem is the question if Is there some input sequence  such that  (  ) reaches P. Naive solution Use Algorithm 1 and feed it with a sufficiently large finite sequence   V* we obtain the set F*(  ) of states reached by  (  ). The set of all reachable states is F* =  F*(  ).

Dina Workshop Execution Tree

Dina Workshop Forward Reachability Algorithm in Breadth-First Search Denote f(x) the set of all immediate successors of x, i.e. f(x) = {z:  u f(x,u) = z} and f(F) = {f(x): x  F} Algorithm 2 (Forward Reachability) F 0 := {x 0 } repeat F k+1 := F k  f(F k ) until F k+1 = F k F* := F k

Dina Workshop Forward Reachability Algorithm in Depth-First Search

Dina Workshop Backward Reachability Denote f -1 (x) the set of all immediate predecessors of x, i.e. f -1 (x) = {z:  u f(z,u) = x} and f -1 (F) = {f -1 (x): x  F} Algorithm 3 (Backward Reachability) F 0 := P repeat F k+1 := F k  f -1 (F k ) until F k+1 = F k F* := F k Theorem 1(Algorithmic Verification) For each type II-D system there exists an algorithm (with a finite number of steps), which verifies reachability to a finite set P.

Dina Workshop System with Two Inputs Definition (System III-D) A two-input transition system is S = (X, U, V, f) where X, U, V are finite sets and f: X x U x V  X is the transition function. (The set U is interpreted as the set of control actions and the set V represents disturbances.) Definition (Strategy and State Strategy) Let S = (X, U, V, f) be III-D system. A strategy for U is a function c: X*  U. A state strategy is a strategy satisfying c( x) = c(  ´x) for every  and  ´ and hence it can be written as a function d: X  U (I.e. strategy is only dependent on the current state, not the entire history). Remark Each state strategy converts a type III system S = (X, U, V, f) into type II, S c = (X, V, f c ) such that f c (x, v) = f(x, c(x), v). Definition (Synthesis for Reachability) Let S = (X, U, V, f) be a type III system and let P  X. The controller synthesis problem is to find a startegy c such that all the behaviors of the closed-loop system S c = (X, V, f c ) never reaches P.

Dina Workshop An Example of Type III System Let P = {x5} then the state x5 cannot be avoided from x4 by any control, since if we choose u1 the environment can choose v2 and if we choose u2 the environment can choose v1.

Dina Workshop Controller Synthesis Definition (Controllable Predecessors) Let S = (X, U, V, f) be a type III system. The set of controllable predecessors of F  X is defined  (F) = {x:  u  U  v  V f(x, u, v)  F} and it denotes all the states from which the controller, by properly selecting u, can force the system into F in the next step. Algorithm 4 (Controller Synthesis) F 0 := X-P repeat F k+1 := F k   (F k ) until F k+1 = F k F* := F k Algorithm 4 produces the set F* of states from which reaching P can be forever avoided.

Dina Workshop An Example of Type III System In the example the algorithm produces a sequence {x1, x2, x3, x4}, {x1, x2, x3}. The control strategy is c(x1) = u1, c(x2) = u2, and c(x3) = u1.

Dina Workshop General Comments on Continuous Systems In general the reachability problem for infinite state systems is undecidable. Promising idea is to investigate morphisms from infinite-state systems to finite ones. One can investigate system of the form dx/dt = f(x,  ) with control signals of the form  : T  V. The first problem is simulation  ´[(n+1)  ] =  ´[n  ] + h(  ´[n  ],  ) providing approximate of the solution of  for discrete time T  = {n  : n  N}.

Dina Workshop Continuous Reachability Notation x  t x’ indicates that there exists an input  : [0, t]  V such that the behavior  (  ) starting at x reaches x’ at time t. Let F  X and I  R + then I-successors of F are all the states that can be reached from F within the time interval I i.e. f I (F) = {x’:  x  F  t  I x  t x’ } Algorithm 5 (Continuous Reachability) F 0 := {x 0 } repeat F k+1 := F k  f [0,r] (F k ) until F k+1 = F k F* := F k

Dina Workshop Comments on Algorithm 5 The algorithm suffers from ability to compute f I (F) exactly and the lack of guarantee for convergence. Remedy is over estimation by convex polyhedra. It has a good meaning for linear systems dx/dt = Ax + Bu