Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08 Model-Based Development and Validation of Multirobot Cooperative System Jüri Vain Dept.

Slides:



Advertisements
Similar presentations
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Advertisements

Automata Theory Part 1: Introduction & NFA November 2002.
Ch. Eick: More on Machine Learning & Neural Networks Different Forms of Learning: –Learning agent receives feedback with respect to its actions (e.g. using.
1.6 Behavioral Equivalence. 2 Two very important concepts in the study and analysis of programs –Equivalence between programs –Congruence between statements.
UPPAAL Introduction Chien-Liang Chen.
CS 290C: Formal Models for Web Software Lecture 4: Implementing and Verifying Statecharts Specifications Using the Spin Model Checker Instructor: Tevfik.
Timed Automata.
Vision Based Control Motion Matt Baker Kevin VanDyke.
An Introduction to Markov Decision Processes Sarah Hickmott
Hidden Markov Models Theory By Johan Walters (SR 2003)
Natural Language Processing Spring 2007 V. “Juggy” Jagannathan.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
Analysis of a Clock Synchronization Protocol for Wireless Sensor Networks Faranak Heidarian Julien Schmaltz Frits Vaandrager.
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture7: PushDown Automata (Part 1) Prof. Amos Israeli.
SPECIFYING COGNITIVE MODELS Using Patterns and Conflicts A. Macklem, F. Mili Oakland University S. Dungrani TARDEC June, 2004.
Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08 Synthesis of Test Purpose Directed Reactive Planning Tester for Nondeterministic Systems.
Foundations of (Theoretical) Computer Science Chapter 2 Lecture Notes (Section 2.2: Pushdown Automata) Prof. Karen Daniels, Fall 2009 with acknowledgement.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2004 Project.
Contemporary Logic Design Finite State Machine Design © R.H. Katz Transparency No Chapter #8: Finite State Machine Design 8.5 Finite State Machine.
1 Hidden Markov Model Instructor : Saeed Shiry  CHAPTER 13 ETHEM ALPAYDIN © The MIT Press, 2004.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2001 Lecture 6 Start of Part II Material Monday,
November 18, 2004 Embedded System Design Flow Arkadeb Ghosal Alessandro Pinto Daniele Gasperini Alberto Sangiovanni-Vincentelli
Simulation Waiting Line. 2 Introduction Definition (informal) A model is a simplified description of an entity (an object, a system of objects) such that.
CS5371 Theory of Computation Lecture 8: Automata Theory VI (PDA, PDA = CFG)
Testing and Monitoring at Penn An Integrated Framework for Validating Model-based Embedded Software Li Tan University of Pennsylvania September, 2003.
1 Formal Engineering of Reliable Software LASER 2004 school Tutorial, Lecture1 Natasha Sharygina Carnegie Mellon University.
Radial Basis Function Networks
Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08 Model-Based Development and Validation of Multirobot Cooperative System Jüri Vain Dept.
Imperative Programming
Institute for Applied Information Processing and Communications 1 Karin Greimel Semmering, Open Implication.
ECE 720T5 Winter 2014 Cyber-Physical Systems Rodolfo Pellizzoni.
1 Performance Evaluation of Computer Networks: Part II Objectives r Simulation Modeling r Classification of Simulation Modeling r Discrete-Event Simulation.
CDC related research at the Dept. of Computer Science TUT Jüri Vain CDC Workshop - Tallinn, Jan , 2008.
Models of Computation: FSM Model Reading: L. Lavagno, A.S. Vincentelli and E. Sentovich, “Models of computation for Embedded System Design”
Lecture 23: Finite State Machines with no Outputs Acceptors & Recognizers.
Lexical Analysis - An Introduction Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved. Students enrolled in Comp 412 at.
Lexical Analysis - An Introduction Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved. Students enrolled in Comp 412 at.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/ Input-output conformance testing for channel-based connectors 1.
::ICS 804:: Theory of Computation - Ibrahim Otieno SCI/ICT Building Rm. G15.
CS 321 Programming Languages and Compilers Lectures 16 & 17 Introduction to Formal Languages Regular Languages Lexical Analysis.
1 Black-box conformance testing for real-time systems Stavros Tripakis VERIMAG Joint work with Moez Krichen.
Simultaneously Learning and Filtering Juan F. Mancilla-Caceres CS498EA - Fall 2011 Some slides from Connecting Learning and Logic, Eyal Amir 2006.
Neural Networks Chapter 7
Learning Agents MSE 2400 EaLiCaRA Spring 2015 Dr. Tom Way.
Jüri Vain Tallinn University of Technology J.Vain Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'09.
CS1Q Computer Systems Lecture 11 Simon Gay. Lecture 11CS1Q Computer Systems - Simon Gay 2 The D FlipFlop The RS flipflop stores one bit of information.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
CSCI 115 Chapter 8 Topics in Graph Theory. CSCI 115 §8.1 Graphs.
Towards Interoperability Test Generation of Time Dependent Protocols: a Case Study Zhiliang Wang, Jianping Wu, Xia Yin Department of Computer Science Tsinghua.
Copyright 2001, Matt Dwyer, John Hatcliff, and Radu Iosif. The syllabus and all lectures for this course are copyrighted materials and may not be used.
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Foundations of (Theoretical) Computer Science Chapter 2 Lecture Notes (Section 2.2: Pushdown Automata) Prof. Karen Daniels, Fall 2010 with acknowledgement.
TM Design Macro Language D and SD MA/CSSE 474 Theory of Computation.
Chapter 8. Learning of Gestures by Imitation in a Humanoid Robot in Imitation and Social Learning in Robots, Calinon and Billard. Course: Robots Learning.
LECTURE 5 Scanning. SYNTAX ANALYSIS We know from our previous lectures that the process of verifying the syntax of the program is performed in two stages:
Reinforcement Learning Guest Lecturer: Chengxiang Zhai Machine Learning December 6, 2001.
1 8.4 Extensions to the Basic TM Extended TM’s to be studied: Multitape Turing machine Nondeterministic Turing machine The above extensions make no increase.
Lecture 7: Turning Machines 虞台文 大同大學資工所 智慧型多媒體研究室.
Universal Turing Machine
CS5270 Lecture 41 Timed Automata I CS 5270 Lecture 4.
CS b659: Intelligent Robotics
Timed Automata Formal Systems Pallab Dasgupta Professor,
High-Level Abstraction of Concurrent Finite Automata
Discrete Controller Synthesis
Lexical Analysis - An Introduction
Presentation transcript:

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08 Model-Based Development and Validation of Multirobot Cooperative System Jüri Vain Dept. of Computer Science Tallinn University of Technology

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08 Syllabus  Monday morning: (9:00 – 12.30) 9:00 – 9:45 Introduction 10:00 – 11:30 Hands-on exercises I: Uppaal model construction 11:45 – 12:30 Theoretical background I: XTA semantics,  Lunch –  Monday afternoon: (13:30 – 16:30) – 14:15 Applications I: model learning for Human Addaptive Scrub Nurse Robot – Theoretical background II: model checking – 16:15 Hands-on exercises II: model checking  Tuesday morning: (9:00 – 12.30) 9:00 – 9:45 Theoretical background III: Model based testing 10:00 – 10:45 Applications II: reactive planning tester 11:00 – 12:30 Hands-on exercises III (model refinement)

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08 Lecture #L2 : Model construction Lecture Plan  Extended Timed Automata (TA) (slides by Brien Nielsen, Aalborg Univ. ) Syntax Semantics (informally) Example  Learning XTA Motivation: why learning? Basic concepts Simple Learning Algorithm Adequacy of learning: Trace equivalence

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08 Timed automata

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08 Timed automata

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08

Timed automata: Semantics

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08

Timed automata: Example  Flash Light

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08

See Uppaal Help for details!

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08 Learning XTA: about terminology  General term is Machine Learning Passive vs active Supervised vs unsupervised Reinforcement learning (reward guided) Computational structures used:  FSA  Hidden Markov Model  Kohonen Map  NN  Timed Automata  etc

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08 Learning XTA (lecture plan)  Problem context  Simplifying assumptions I/O observability Generally non-deterministic models Fully observable (output determinism)  The learning algorithm  Estimating the quality of learning

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08 Camera2 Marker Camera1 Marker Patient Monitor for endoscope Operating surgeon Assistant Endoscope assistant Scrub nurse Surgical instruments Camera2 Camera1 Anesthetist Problem context: SNR scene and motion analysis get idle insert work extract return. prepare_istr pick_instr hold_wait pass withrow stretch wait-return receive idle Scrub Nurse: Surgeon: Anesthetic machine & monitors for vital signs

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08 SNR Control Architecture Reactive action planning Targeting and motion control Motion recognition 3D position tracking Direct manipulator control Predicted further motions Data samplings of hand position Force & position feedback Control parameters Model(s) of Surgeon’s motions Reactive ctrl. layer Deliberative ctrl. layer Symbolic control loop SNR’s “world” model Surgeon’s behaviour model Nurse’s behaviour model Reference scenario Instrumentationlayer Recognized motion SNR action to be taken Collision avoidance

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08 Scrub Nurse Robot (SNR): Motion analysis  analysis_1_2.wmv analysis_1_2.wmv Camera2 Marker

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08 Current coordinates Preprocessing and filtering NN-based detection Statistics based detection Decision making Motion recognition Kohonen Map- based detection

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08 Motion recognition using statistical models - working->extracting, - extracting->passing, - passing->waiting, - waiting->receiving, - receiving->inserting, - inserting->working

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08 SNR Control Architecture Reactive action planning Targeting and motion control Motion recognition 3D position tracking Direct manipulator control Predicted further motions Data samplings of hand position Force & position feedback Control parameters Model(s) of Surgeon’s motions Reactive ctrl. layer Deliberative ctrl. layer Symbolic control loop SNR’s “world” model Surgeon’s behaviour model Nurse’s behaviour model Reference scenario Instrumentationlayer Recognized motion SNR action to be taken Collision avoidance

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08 (Timed) automata learning algorithm  Input:  Time-stamped sequence of observed i/o events (timed trace TTr(Obs))  Observable inputs/outputs X Obs of actors  Rescaling operator  : X Obs  X XTA  where X XTA is a model state space  Equivalnece relation “~” defining the quotient state space X / ~  Output:  Extended (Uppaal version) timed automaton XTA s.t. TTr(XTA) =  (TTr(Obs)) / ~ % = equivalence of traces

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08  Initialization L  {l 0 } % L – set of locations, l 0 – (auxiliary) initial location T  % T – set of transitions k,k’  0,0% k,k’–indexes distinguishing transitions between same location pairs h  l 0 % h – history variable storing the id of the previous motion h’  l 0 % h’ – variable storing the id of the motion before previous h cl  0% h cl – clock reset history l  l 0 % l – destination location of the current switching event cl  0% cl – clock variable of the automaton being learned g_cl  % g_cl - 3D matrix of clock reset intervals g_x  % g_x - 4D matrix of state intervals that define switching cond.s Algorithm 1: model compilation (one learning session)

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08 Match with existing eq.class Encode new motion Encode motion previously observed Extend existing eq.class Create a new eq.class 1: while E   do 2:e  get(E )% get the motion switching event record from buffer E 3:h’  h, h  l 4:l  e[1], cl  (e[2] - h cl ), X  e[3] 5:if l  L then % if the motion has never occurred before 6: L  L  {l}, 7: T  T  {t(h,l,1)}% add transition to that motion 8: g_cl(h,l,1)  [cl, cl] % add clock reset point in time 9: for all x i  X do 10:g_x(h,l,1,x i )  [x i, x i ] % add state switching point 11: end for 12:else % if switching e in existing equivalence class 13: if  k  [1,|t(h,l,.)|],  x i  X,: x i  g_x(h,l,k,x i )  cl  g_cl(h,l,k) then 14:goto 34 15: else % if switching e extends the equival. class 16: if  k  [1,|t(h,l,.)|],  x i  X: x i  g_x(h,l,k,x i )  Ri  cl  g_cl(h,l,k)  Rcl 17: then 18: if cl < g_cl(h,l,k) - then g_cl(h,l,k)  [cl, g_cl(h,l,k) + ] end if 19: if cl > g_cl(h,l,k) + then g_cl(h,l,k)  [g_cl(h,l,k) -, cl] end if 20: for all x i  X do 21: if x i < g_x(h,l,k,x i ) - then g_x(h,l,k,x i )  [x i, g_x(h,l,k,x i ) + ] end if 22: if x i > g_x(h,l,k,x i ) + then g_x(h,l,k,x i )  [g_x(h,l,k,x i ) -, x i ] end if 23: end for 24: else % if switching e exceeds allowed limits of existing eqv. class 25: k  |t(h,l,.)| +1 26: T  T  {t(h,l,k)}% add new transition 27: g_cl(h,l,k)  [cl, cl] % add clock reset point in time 28: for all x i  X do 29: g_x(h,l,k,x i )  [x i, x i ] % add state switching point 30: end for 31: end if 32: end if 33: a(h’,h,k’)  a(h’,h,k’)  X c % add assignment to previous transition 34: end while Create a new eq.class

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08 35: for all t(l i,l j,k)  T do % compile transition guards and updates 36: g(l i,l j,k)  ‘cl  g_cl(l i,l j,k) /\  s [1,|X|] x i  g_x(l i, l j, k, x s )’ 37:a(l i,l j,k)  ‘X c  random(a(l i,l j,k)), cl  0’ % assign random value in a 38: end for 39: for all l i  L do 40:inv(l i )  ‘/\ k g(t ki ) /\ ¬ \/ j g(t ij )’% compile location invariants 41: end for Interval extension operator: (.)  R : [x -, x + ]  R = [x - - , x + +  ], where  = R - (x + - x - ) Finalize TA syntax formatting

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08  Given Observation sequence E = System configuration Rescaling operator  with region [0,30] for all x i Granularity of the quotient space X / ~ : 2 Learning example (1) nY sY nXsX NurseSurgeon

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08 Learning example (2) ||

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08 Does XTA exhibit the same behavior as the traces observed?  Question 1: How to choose the equivalence relation “~” do define a feasible quotient space?  Question 2: How to choose the equivalence relation to compare traces TTr(XTA) and TTr(Obs)? TTr(XTA) =  (TTr(Obs)) / ~ ?

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08 How to choose the equivalence relation “~” do define a feasible quotient space?  Granularity parameter  i defines the maximum length of an interval [x - i,x + i ), of equivalent (regarding ~) values of x i where x - i,x + i  X i for all X i (i = [1,n]).  Partitioning of dom X i (i = [1,n]) to intervals (see line 16 of the algorithm) is implemented using interval expansion operator (.)  R : [x -, x + ]  R = [x - - , x + +  ], where  = R - (x + - x - )

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08 On Question 2:  Possible candidates: Equivalence of languages? Simulation relation? Conformace relation?...?

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08 How to choose the equivalence relation to compare languages? Nerode’s right congruence.  Given a language L ( A ), we say that two words u, v  Σ* are equivalent, written as u  L ( A ) v, if,  w  Σ*: uw  L ( A ) iff vw  L ( A ).   L ( A )  Σ*  Σ* is a right congruence, i.e., it is an equivalence relation that satisfies  w  Σ*: u  L ( A ) v  uw  L ( A ) vw.  We denote the equivalence class of a word w wrt.  L ( A ) by [ w ] L ( A ) or just [ w ]  A language L ( A ) is regular iff the number of equivalence classes of Σ* with respect to  L ( A ) is finite.

Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08

Conclusions  Proposed XTA learning makes the on-line synthesis of model-based planning controllers for HA robots feasible.  Other aspects: o learning is incremental, i.e., pre-existing knowledge about the agent’s behaviour can be re-used; o formal semantics of XTA models - functional correctness and performance can be verified on the model before used for planner synthesis; o adjustable level of abstraction of the model generated.