Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University.

Slides:



Advertisements
Similar presentations
Automatic Verification Book: Chapter 6. How can we check the model? The model is a graph. The specification should refer the the graph representation.
Advertisements

Distributed Snapshots: Determining Global States of Distributed Systems - K. Mani Chandy and Leslie Lamport.
Lecture 24 MAS 714 Hartmut Klauck
1 Fault Diagnosis for Timed Automata Stavros Tripakis VERIMAG.
Knowledge Based Synthesis of Control for Distributed Systems Doron Peled.
An Introduction to Petri Nets
A university for the world real R © 2009, Chapter 3 Advanced Synchronization Moe Wynn Wil van der Aalst Arthur ter Hofstede.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
Petri Nets Section 2 Roohollah Abdipur.
Based on: Petri Nets and Industrial Applications: A Tutorial
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 1.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
Timed Automata.
26 September 2003U. Buy -- SEES 2003 Sidestepping verification complexity with supervisory control Ugo Buy Department of Computer Science Houshang Darabi.
Chapter 3 Petri nets Learning objectives : Introduce Petri nets
Merged Processes of Petri nets Victor Khomenko Joint work with Alex Kondratyev, Maciej Koutny and Walter Vogler.
IE 469 Manufacturing Systems
On Iterative Liveness-enforcement for a Class of Generalized Petri Nets YiFan Hou, Ding Liu, MengChu Zhou CASE 2012 Aug , 2012.
Parallel Scheduling of Complex DAGs under Uncertainty Grzegorz Malewicz.
Planning under Uncertainty
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Petri net modeling of biological networks Claudine Chaouiya.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
Synthesis of Embedded Software Using Free-Choice Petri Nets.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
Introduction to Computability Theory
LEARNING FROM OBSERVATIONS Yılmaz KILIÇASLAN. Definition Learning takes place as the agent observes its interactions with the world and its own decision-making.
A Schedulability-Preserving Transformation of BDF to Petri Nets Cong Liu EECS 290n Class Project December 10, 2004.
Validating Streaming XML Documents Luc Segoufin & Victor Vianu Presented by Harel Paz.
12/07/2007Jiacun Wang1 SE-561 Math Foundations Petri Nets - II Dr. Jiacun Wang Department of Software Engineering Monmouth University.
A Denotational Semantics For Dataflow with Firing Edward A. Lee Jike Chong Wei Zheng Paper Discussion for.
1 Petri Nets Marco Sgroi EE249 - Fall 2001 Most slides borrowed from Luciano Lavagno’s lecture ee249 (1998)
Data Flow Analysis Compiler Design Nov. 8, 2005.
Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad.
Regular Model Checking Ahmed Bouajjani,Benget Jonsson, Marcus Nillson and Tayssir Touili Moran Ben Tulila
1 A Petri Net Siphon Based Solution to Protocol-level Service Composition Mismatches Pengcheng Xiong 1, Mengchu Zhou 2 and Calton Pu 1 1 College of Computing,
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.
Modeling with ordinary Petri Nets Events: Actions that take place in the system The occurrence of these events is controlled by the state of the system.
Discrete dynamical systems and intrinsic computability Marco Giunti University of Cagliari, Italy
Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek.
Jana Flochová and René K. Boel Faculty of Informatics and Information Technology Slovak university of Technology, Bratislava, Slovakia EESA Department,
1 Distributed Fault Detection for untimed and for timed Petri nets René Boel, SYSTeMS Group, Ghent University with thanks to: G. Jiroveanu, G. Stremersch,
Defining Programs, Specifications, fault-tolerance, etc.
CS 415 – A.I. Slide Set 5. Chapter 3 Structures and Strategies for State Space Search – Predicate Calculus: provides a means of describing objects and.
Simultaneously Learning and Filtering Juan F. Mancilla-Caceres CS498EA - Fall 2011 Some slides from Connecting Learning and Logic, Eyal Amir 2006.
Generalized stochastic Petri nets (GSPN)
Petri Nets Lecturer: Roohollah Abdipour. Agenda Introduction Petri Net Modelling with Petri Net Analysis of Petri net 2.
Modelling by Petri nets
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
Approximation Algorithms Department of Mathematics and Computer Science Drexel University.
CSCI1600: Embedded and Real Time Software Lecture 11: Modeling IV: Concurrency Steven Reiss, Fall 2015.
School of Computer Science & Software Engineering
1 Petri Nets Ina Koch and Monika Heiner. 2 Petri Nets(1962) Carl Adam Petri.
Review n System dynamics : A sequence of state transition n model : A set of rules for state transition System S X Y Discrete event system FSM (Automata)
High Performance Embedded Computing © 2007 Elsevier Lecture 4: Models of Computation Embedded Computing Systems Mikko Lipasti, adapted from M. Schulte.
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.
Chapter 5 Finite Automata Finite State Automata n Capable of recognizing numerous symbol patterns, the class of regular languages n Suitable for.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
A SUPPORT TOOL FOR THE REACHABILITY AND OTHER PETRI NETS- RELATED PROBLEMS AND FORMAL DESIGN AND ANALYSIS OF DISCRETE SYSTEMS Department of Computers and.
Technology of information systems Lecture 5 Process management.
Process Mining – Concepts and Algorithms Review of literature on process mining techniques for event log data.
11-1 Lyapunov Based Redesign Motivation But the real system is is unknown but not necessarily small. We assume it has a known bound. Consider.
Dr. Eng Amr T. Abdel-Hamid
Clockless Computing COMP
Automatic Verification
Concurrent Systems Modeling using Petri Nets – Part II
Hidden Markov Models Part 2: Algorithms
Michael Margaliot School of Elec. Eng. -Systems
Discrete Mathematics 7th edition, 2009
Presentation transcript:

Control and Deadlock Recovery of Timed Petri Nets Using Observers Alessandro Giua DIEE – Department of Electrical and Electronic Engineering University of Cagliari, Italy Joint work with: - Carla Seatzu (U. of Cagliari) - Francesco Basile (U. del Sannio)

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, OUTLINE 0)Petri nets 1)Motivation for discrete event observers 2)Relevant literature 3)Main idea 4)Marking estimation 5)Marking estimation with initial macromarking 6)Control using observers 7)Deadlock recovery and estimate after net time out 8)Using timing information to improve the procedure 9)Conclusions and future work

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, – PETRI NETS A place/transition net is a 4-ple : N =( P,T,Pre, Post ) P={ p 1, p 2, …, p m } set of places (circles); T={ t 1, t 2, …, t n } set of transitions (bars); Pre : matrix denoting # of arcs from places to transitions Post : matrix denoting # of arcs from transitions to places p1p1 p2p2 p 3 p5 p5 t6t6 t 1 p8p8 t2t2 p4p4 p5p5 p 6 p7p7 t3t3 t4t4 t5t5

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, Net system (a net N with initial marking M 0 ): Set of firable sequences: Set of reachable markings: Siphon: a set of places S such that if a transition inputs into S then it also outputs from S (Ex: S = {p 1, p 2 } ) p 1 p2p2 p3p3 t 1 t 3 t 2 An empty siphon will always remain empty  all its output transitions are deadlocked PETRI NETS (cont’d)

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, OUTLINE 0)Petri nets 1)Motivation for discrete event observers 2)Relevant literature 3)Main idea 4)Marking estimation 5)Marking estimation with initial macromarking 6)Control using observers 7)Deadlock recovery and estimate after net time out 8)Using timing information to improve the procedure 9)Conclusions and future work

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, MOTIVATION FOR DISCRETE EVENT OBSERVERS Two approaches to design of observers for discrete event Systems Computer science approach (CSA): the state is unknown because the system structure is nondeterministic Control theory approach (CTA): the system structure is deterministic but the initial state is unknown

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, CTA - Supervisory control theory is based on language specifications (a set of legal words): language specification event-feedback MOTIVATION (cont’d)

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, When dealing with Petri nets it is natural to use state specifications (a set of legal markings): state specification state-feedback MOTIVATION (cont’d)

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, A mixed structure is often used: State specification= marking of the net Output events = transitions firing When the net structure and the initial marking is known (and the net labeling is deterministic) event observation is sufficient to reconstruct the net marking. MOTIVATION (cont’d)

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2,  If the initial marking is not completely known: use “observers” to estimate the marking after the word of events w has been observed  In our approach the observer determines two parameters Estimate: Bound: MOTIVATION (cont’d) legal markings

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, C (w) M w MOTIVATION (cont’d) Unlike other approaches based on automata, the PN structure allows one to “describe” the set of consistent markings in terms of these two parameters that are recursively updated. Linear constraint set

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, In this talk we present:  Algorithms for computing estimate and consistent set  Algorithms for control using observers  Algorithms for deadlock recovery  Deadlock analysis of the closed loop system PROBLEM: incomplete information due to the presence of an observer in the control loop may lead to deadlock. MOTIVATION (cont’d) All these problems are solved using the same approach based on integer programming

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, OUTLINE 0)Petri nets 1)Motivation for discrete event observers 2)Relevant literature 3)Main idea 4)Marking estimation 5)Marking estimation with initial macromarking 6)Control using observers 7)Deadlock recovery and estimate after net time out 8)Using timing information to improve the procedure 9)Conclusions and future work

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, RELEVANT LITERATURE State-feedback control with partial observability - Li & Wonham [CDC88] [T-AC93](state observ.) - Takai, Ushio & Kodama [T-AC95](state observ.) - Zhang & Holloway[Allerton95](event observ.) Derived nec & suff condition for optimality given a mask.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, DES state estimation for FSM / Predicate Transformers - Ramadge [CDC86](FMS) - Caines, Greiner, Wang [CDC88] [CDC89](FMS) - Özveren, Willsky [T-AC90](FMS) - Kumar, Garg & Markus [T-AC93](PT) DRAWBACK These approaches enumerate at each step the set of consistent states (high complexity). No notion of “estimate error”. LITERATURE (cont’d)

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, Diagnosis - Wang, Schwartz [T-net 93] (state estimation) - Ushio, Onishi & Okuda[SMC98] (place observation) Petri net observability - Meda, Ramirez[SMC98] (interpreted nets) - Ramirez, Riveda, Lopez [ICRA2000] Partial knowledge of the marking - Cardoso, Valette & Dubois[ICATPN90] Concept of macromarking and “membership function”. LITERATURE (cont’d)

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, OUTLINE 0)Petri nets 1)Motivation for discrete event observers 2)Relevant literature 3)Main idea 4)Marking estimation 5)Marking estimation with initial macromarking 6)Control using observers 7)Deadlock recovery and estimate after net time out 8)Using timing information to improve the procedure 9)Conclusions and future work

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, MAIN IDEA Initially observed sequence: Initial marking Estimate: Set of consistent markings:

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, firing is detected MAIN IDEA (cont’d)

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, After fires Observed sequence: Actual marking Estimate: Set of consistent markings: MAIN IDEA (cont’d)

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, firing is detected MAIN IDEA (cont’d)

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, Observed sequence: Actual marking Estimate: Set of consistent markings: After fires MAIN IDEA (cont’d)

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, OUTLINE 0)Petri nets 1)Motivation for discrete event observers 2)Relevant literature 3)Main idea 4)Marking estimation 5)Marking estimation with initial macromarking 6)Control using observers 7)Deadlock recovery and estimate after net time out 8)Using timing information to improve the procedure 9)Conclusions and future work

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, MARKING ESTIMATION Hypothesis: - The net structure is known - The transition firing can be observed - The initial marking is not known Algorithm 1 - Initial estimate: Let 2 - Wait until fires 3 - Update previous estimate: 4 - New estimate: 5 - ; goto 2.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, ESTIMATION (cont’d) Can define place error: Estimate is a lower bound: The set of markings consistent with observation w is: and estimation error: Error functions are non-increasing: Properties

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, Properties An observed word is marking complete if A net system is: - Marking Observable (MO) if there exists a complete word - Strongly Marking Observable (SMO) in k steps if: a) all with are complete b) all with that are not complete can be continued in a word ESTIMATION (cont’d)

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, Observer reachability graph Each node of the graph is labeled with: The real marking M w The estimation error u w = M w -  w ESTIMATION (cont’d)

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, Observer coverability graph If the net is unbounded, is it possible to construct an observer coverability graph (OCG). The error vector u is now only an upper bound. ESTIMATION (cont’d)

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, Analysis of properties Theorem 1 A net system is: marking observable iff marking observable if there exist a node in the OCG with strongly marking observable iff in the OCG for each dead node and for each node in a cycle ESTIMATION (cont’d)

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, OUTLINE 0)Petri nets 1)Motivation for discrete event observers 2)Relevant literature 3)Main idea 4)Marking estimation 5)Marking estimation with initial macromarking 6)Control using observers 7)Deadlock recovery and estimate after net time out 8)Using timing information to improve the procedure 9)Conclusions and future work

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, – MARKING ESTIMATION WITH INITIAL MACROMARKING Sometimes partial information on the initial marking is available Example: assume the net starts from marking (known) evolving unobserved until it reaches ; at this point we start observations. Then we may use the information that This characterization in terms of PN reachability is hard to use but we can approximate it using a matrix of invariants :

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, Generalizing, we define an initial macromarking. The set of places is written as: For each, the token content of is known to be Nothing is known about the marking in Let be the char vector of and define Macromarking: MACROMARKING (cont’d)

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, A MANUFACTURING EXAMPLE p1 p1 p 10 p3 p3 p 4 p5 p5 p6 p6 p 7 p 8 p 9 p 2 t 6 t7 t7 t 1 t4 t4 t2 t2 t 3 t 5 p 11 p 12 M 0 (p 11 )+M 0 (p 12 ) = 1 M 0 (p 1 )+M 0 (p 3 )+M 0 (p 4 ) = 5 M 0 (p 1 )+M 0 (p 5 )+M 0 (p 6 ) = 5 M 0 (p 1 )+M 0 (p 3 )+M 0 (p 6 ) +M 0 (p 11 ) = 6 M 0 (p 1 )+M 0 (p 4 )+M 0 (p 5 ) +M 0 (p 12 ) = 5 Initial macromarking: we know the token content in each cycle M 0 (p 2 )+M 0 (p 8 ) +M 0 (p 9 ) = 6 M 0 (p 2 )+M 0 (p 3 )+M 0 (p 4 )+M 0 (p 7 )+M 0 (p 10 ) = 6 M 0 (p 2 )+M 0 (p 5 )+M 0 (p 6 )+M 0 (p 7 )+M 0 (p 10 ) = 6 M 0 (p 2 )+M 0 (p 3 )+M 0 (p 6 )+M 0 (p 7 )+M 0 (p 10 )+M 0 (p 11 ) = 7 M 0 (p 2 )+M 0 (p 4 )+M 0 (p 5 )+M 0 (p 7 )+M 0 (p 10 )+M 0 (p 12 ) = 6 MACROMARKING (cont’d)

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, Algorithm (estimation with macromarking) 1 – Initial estimate with 2 - Initial bound 3 - Let the current observed word be w=w Wait until t fires. 5 - Update the estimate to 6 - New estimate: 7 - New bound: 8 - Goto 4. MACROMARKING (cont’d)

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, Elementary results The estimate is a lower bound: The error functions are non-increasing The set of markings consistent with the observation w is: MACROMARKING (cont’d) This set can also be characterized as:

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, OUTLINE 0)Petri nets 1)Motivation for discrete event observers 2)Relevant literature 3)Main idea 4)Marking estimation 5)Marking estimation with initial macromarking 6)Control using observers 7)Deadlock recovery and estimate after net time out 8)Using timing information to improve the procedure 9)Conclusions and future work

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, CONTROL USING OBSERVERS GMEC specifications: a set of linear constraints for j = 1, …, q. Example: The set of legal markings is:

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, Control with observer Prevent the firing of t after w has been observed iff there exists a legal consistent marking M such that the firing of t from M leads to a forbidden marking i.e., if exists j such that  where Control pattern: CONTROL (cont’d)

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, EXAMPLE The firing of t 1 is legal from but t 1 is disabled

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, EXAMPLE Actual marking M w Estimation error u w = M w -  w Bound

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, Usually, the control law using observers is not optimal since it can disable the firing of transitions that do not yield illegal markings. Such a control law may easily cause the controlled plant to block. We want to add to the observer the possibility of recovering from deadlocks caused by the incomplete information. CONTROL (cont’d)

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, A MANUFACTURING EXAMPLE p1 p1 p 10 p3 p3 p 4 p5 p5 p6 p6 p 7 p 8 p 9 p 2 t 6 t7 t7 t 1 t4 t4 t2 t2 t 3 t 5 p 11 p 12 M(p 9 )  3 M(p 3 )+M(p 5 )  3

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, ( / / ) ( / / ) ( / / ) ( / / ) t1t1 t4t4 t3t3 Deadlock Actual marking M w Estimate  w Bound  w

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, p1 p1 p 10 p3 p3 p 4 p5 p5 p6 p6 p 7 p 8 p 9 p 2 t 6 t7 t7 t 1 t4 t4 t2 t2 t 3 t 5 p 11 p 12 M(p 9 )  3 M(p 3 )+M(p 5 )  3 Only the green tokens have been detected t 6 and t 7 are disabled by the controller ? ? ?

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, OUTLINE 0)Petri nets 1)Motivation for discrete event observers 2)Relevant literature 3)Main idea 4)Marking estimation 5)Marking estimation with initial macromarking 6)Control using observers 7)Deadlock recovery and estimate after net time out 8)Using timing information to improve the procedure 9)Conclusions and future work

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, IDEA: use the info that the net is deadlocked to improve the estimate (reducing the set of consistent markings) Theorem: In an ordinary net a marking M is dead iff: is a siphon for all MwMw 7 - DEADLOCK RECOVERY AND ESTIMATE UPDATE AFTER NET TIME-OUT Set of blocking markings

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, Given a structurally bounded net N, a marking M is dead iff  a vector (  {0,1} m such that: DEADLOCK RECOVERY (cont’d) The set of blocking markings of N: is the characteristic vector of a siphon contains only empty places contains all empty places each transitions has at least a pre arc coming from

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, DEADLOCK RECOVERY (cont’d) Algorithm (Control pattern updating after net time-out) Let C = C ( ,B ). Assume f(., C ) has led the net to a time-out. 1. Let i=0 and f 0 = f(., C ). 2. Let T i ={t  T | f i (t)=1} and let N i the net obtained by N removing all transitions not in T i. 3. Update the control pattern to f i+1 =f(., C  M b (N i )) 4. If f i+1 = f i THEN exit: (the deadlock procedure has failed) 5. Wait until (a) a transition fires (net has recovered from deadlock) (b) a new net time-out occurs: let i=i+1 and go to 2.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, A unique linear algebraic formalism for: –state estimation –control –deadlock recovery DEADLOCK RECOVERY (cont’d) Main advantages of the approach: This procedure is denoted NTO procedure (net time-out procedure).

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, A MANUFACTURING EXAMPLE (cont’d) p1 p1 p 10 p3 p3 p 4 p5 p5 p6 p6 p 7 p 8 p 9 p 2 t 6 t7 t7 t 1 t4 t4 t2 t2 t 3 t 5 p 11 p 12 M 0 (p 11 )+M 0 (p 12 ) = 1 M 0 (p 1 )+M 0 (p 3 )+M 0 (p 4 ) = 5 M 0 (p 1 )+M 0 (p 5 )+M 0 (p 6 ) = 5 M 0 (p 1 )+M 0 (p 3 )+M 0 (p 6 ) +M 0 (p 11 ) = 6 M 0 (p 1 )+M 0 (p 4 )+M 0 (p 5 ) +M 0 (p 12 ) = 5 M(p 9 )  3 Initial macromarking: we know the token content in each cycle M(p 3 )+M(p 5 )  3 M 0 (p 2 )+M 0 (p 8 ) +M 0 (p 9 ) = 6 M 0 (p 2 )+M 0 (p 3 )+M 0 (p 4 )+M 0 (p 7 )+M 0 (p 10 ) = 6 M 0 (p 2 )+M 0 (p 5 )+M 0 (p 6 )+M 0 (p 7 )+M 0 (p 10 ) = 6 M 0 (p 2 )+M 0 (p 3 )+M 0 (p 6 )+M 0 (p 7 )+M 0 (p 10 )+M 0 (p 11 ) = 7 M 0 (p 2 )+M 0 (p 4 )+M 0 (p 5 )+M 0 (p 7 )+M 0 (p 10 )+M 0 (p 12 ) = 6

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, ( / / ) ( / / ) ( / / ) ( / / ) t1t1 t4t4 t3t3 NTO

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, ( / / ) t6t6 ( / / ) ( / / ) ( / / ) ( / / ) t1t1 t4t4 t3t3 NTO

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, NTO ( / / ) t6t6 ( / / ) t7t7 ( / / ) t2t2 ( / / ) t5t5 ( / / ) t1t1 ( / / ) ( / / ) ( / / ) t4t4 t3t3

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, NTO ( / / ) t6t6 ( / / ) t7t7 ( / / ) t2t2 ( / / ) t5t5 ( / / ) t1t1 ( / / ) ( / / ) ( / / ) t4t4 t3t3 ( / / )

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, Proposition: if the initial macromarking is such that (i.e., each column of V is a P-invariant) then, for all observed words w, DEADLOCK RECOVERY (cont’d) If a marking is consistent with the observation w then it is also consistent with the initial observation

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, Theorem 1: if the initial macromarking is such that then the closed loop system will never time out if the following constraint set does not admit feasible solutions DEADLOCK RECOVERY (cont’d) where

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, Definition: the maximal control pattern for a set C is: where and DEADLOCK RECOVERY (cont’d) When a controlled system times out, if it is deadlocked eventually a control pattern is reached

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, Theorem 2: if the initial macromarking is such that then the closed loop system will always recover from a time-out if the following constraint set does not admit feasible solutions DEADLOCK RECOVERY (cont’d) where

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, p1 p1 p 10 p3 p3 p 4 p5 p5 p6 p6 p 7 p 8 p 9 p 2 t 6 t7 t7 t 1 t4 t4 t2 t2 t 3 t 5 p 11 p 12 M(p 9 )  3 M(p 3 )+M(p 5 )  3 A MANUFACTURING EXAMPLE (cont’d) Initial macromarking: the net is a marked graph each cycle corresponds to a P-invariant the initial macromarking is such that

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, A MANUFACTURING EXAMPLE (cont’d) Theorem 1 does not apply: the following constraint set admits feasible solutions the net might time out (it actually does) Theorem 2 does apply: the following constraint set does not admit feasible solutions the closed loop system with net time-out recovery is deadlock-free

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, OUTLINE 0)Petri nets 1)Motivation for discrete event observers 2)Relevant literature 3)Main idea 4)Marking estimation 5)Marking estimation with initial macromarking 6)Control using observers 7)Deadlock recovery and estimate after net time out 8)Using timing information to improve the procedure 9)Conclusions and future work

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, USING TIMING INFORMATION TO IMPROVE THE PROCEDURE We extend the previous approach to exploit available information on the timing structure so as to obtain a better estimate of the set of consistent markings.  A known delay time  (t) is associated to each transition.  We say that a transition t has timed-out at time now if it has been control enabled without firing during [ now -  (t), now ].  We can be sure that at time now the actual marking M w is such that  M w |t .

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, IDEA: If T to is the set of transitions that have timed out at time now, we know for sure that the actual marking is such that We compute a (possibly) less restrictive control pattern using as set of consistent markings i.e., for all we compute USING TIMING INFORMATION (cont’d)

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, USING TIMING INFORMATION (cont’d) Main Advantages: Accelerates the state estimation Accelerates the deadlock recovery procedure Enables to recover from partial deadlocks The new approach is denoted TTO procedure (transition time-out procedure).

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, A MANUFACTURING EXAMPLE (cont’d) p1 p1 p 10 p3 p3 p 4 p5 p5 p6 p6 p 7 p 8 p 9 p 2 t 6 t7 t7 t 1 t4 t4 t2 t2 t 3 t 5 p 11 p 12 M(p 9 )  3 M(p 3 )+M(p 5 )  3  (t 1 ) = 2  (t 2 ) = 5  (t 3 ) = 3  (t 4 ) = 1  (t 5 ) = 2  (t 6 ) = 6  (t 7 ) = 3 Transition time-out Transition firing Delays:

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, ( / / ) ( / / ) ( / / ) ( / / ) t1t1 ( / / ) t2t2 ( / / ) t4t4 ( / / ) now = 1 now = 2 now = 3 now = 4 now = 7 now = 8 { t 4 } { t 5 } { t 3, t 4, t 5 } { t 1, t 3, t 4, t 5 }

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, t4t4 ( / / ) ( / / ) t3t3 ( / / ) ( / / ) now = 8 now = 9 now = 11 now = 12 now = 14 { t 1, t 4, t 5 } { t 1, t 2, t 4, t 5, t 7 } { t 1, t 2, t 3, t 4, t 5, t 7 }

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, OUTLINE 0)Petri nets 1)Motivation for discrete event observers 2)Relevant literature 3)Main idea 4)Marking estimation 5)Marking estimation with initial macromarking 6)Control using observers 7)Deadlock recovery and estimate after net time out 8)Using timing information to improve the procedure 9)Conclusions and future work

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, We provided a unique linear algebraic formalism for: state estimation, control, deadlock recovery. We showed how timing information can be used to accelerate the state estimation and to detect the observer induced deadlock. Some sufficient conditions for deadlock recovery have been derived. 9 – CONCLUSIONS

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, FUTURE WORK Language completeness: A word is language complete if This may allow to use observers in event feedback. Partial event observability: assume some events are unobservable or undistinguishable. This may destroy the linear algebraic formalism in the general case. Look for restricted cases.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, Associate a probabilistic structure to the transition firing and define, where is the probability of having a complete word after k firings. Under which conditions ? FUTURE WORK (cont’d)

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, A. Giua, C. Seatzu, “Observability of place/transition nets,” IEEE Trans. on Automatic Control, Vol. 47, No. 9, pp , September, F. Basile, A. Giua, C. Seatzu, “Observer based state-feedback control of timed Petri nets with deadlock recovery,” IEEE Trans. on Automatic Control, Vol. 49, No. 1, pp , Jan F. Basile, A. Giua, C. Seatzu, "Observer-based state-feedback control of timed Petri nets with deadlock recovery: theory and implementation," Proc CESA'2003 Multiconference (Lille, France), Jul A. Giua, C. Seatzu, J. Júlvez, "Marking estimation of Petri nets with pairs of nondeterministic transitions," Asian Journal of Control, June To appear. A. Giua, D. Corona, C. Seatzu, “State estimation and control of nondeterministic -free labeled Petri nets”, Proc. WODES’04. To appear. REFERENCES

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, Structurally Strongly Marking Observable (sSMO) if the system is SMO for all - Structurally Marking Observable (sMO) if the system is MO for all A net system is: - Uniformly Marking Observable (uMO) if the system is Marking Observable for all - Uniformly Strongly Marking Observable (uSMO) if the system is SMO for all ESTIMATION (cont’d)

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, uniformly MO iff the semi-linear set is a home-space for all Theorem 2 A net system is: uniformly SMO only if it is bounded Similar results hold for structural MO and SMO. This is a finite union of linear sets with the same period and the home space property is decidable (Johnen & Frutos Escrig; 89) ESTIMATION (cont’d)

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, DEADLOCK RECOVERY (cont’d) MwMw After a deadlock recovery procedure is invoked we should remember the set of consistent markings is The linear characterization of this set is rather complex (it involves also a vector ). We propose to use a simpler approximation.

A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, DEADLOCK RECOVERY (cont’d) MwMw Compute for all places: Define the new set: Compute: Define