1 / 76

Control and Deadlock Recovery of Timed Petri Nets Using Observers

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). OUTLINE. 0) Petri nets

benito
Download Presentation

Control and Deadlock Recovery of Timed Petri Nets Using Observers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Control and Deadlock Recoveryof Timed Petri NetsUsing 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)

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

  3. p1 p2 p4 t2 t3 p3 t1 t6 p8 p5 p6 p5 p7 t4 t5 0 – PETRI NETS A place/transition netis a 4-ple :N=(P,T,Pre,Post) • P={p1, p2, …, pm}set of places (circles); • T={t1, t2, …, tn}set of transitions (bars); • Pre:matrix denoting # of arcs from places to transitions • Post: matrix denoting # of arcs from transitions to places A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004

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

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

  6. 1 - 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, 2004

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

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

  9. MOTIVATION (cont’d) • 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. A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004

  10. MOTIVATION (cont’d) • 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: legal markings A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004

  11. 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 C (w) M w A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004

  12. MOTIVATION (cont’d) PROBLEM:incomplete information due to the presence of an observer in the control loop may lead to deadlock. 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 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, 2004

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

  14. 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, 2004

  15. LITERATURE (cont’d) • 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”. A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004

  16. LITERATURE (cont’d) • 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”. A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004

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

  18. 3 - 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, 2004

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

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

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

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

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

  24. 4 - 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, 2004

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

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

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

  28. ESTIMATION (cont’d) 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. A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004

  29. ESTIMATION (cont’d) 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 A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004

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

  31. 5 – MARKING ESTIMATION WITH INITIAL MACROMARKING • Sometimes partial information on the initial marking is available • Example: assumethe 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, 2004

  32. MACROMARKING (cont’d) 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: A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004

  33. MACROMARKING (cont’d) p1 p3 A MANUFACTURING EXAMPLE t1 p4 p12 p7 p10 t4 t7 t3 p11 t6 p6 t2 p8 p9 p5 t5 p2 Initial macromarking: we know the token content in each cycle M0(p11)+M0(p12) = 1 M0(p1)+M0(p3)+M0(p4) = 5 M0(p1)+M0(p5)+M0(p6) = 5 M0(p1)+M0(p3)+M0(p6) +M0(p11) = 6 M0(p1)+M0(p4)+M0(p5) +M0(p12) = 5 M0(p2)+M0(p8) +M0(p9) = 6 M0(p2)+M0(p3)+M0(p4)+M0(p7)+M0(p10) = 6 M0(p2)+M0(p5)+M0(p6)+M0(p7)+M0(p10) = 6 M0(p2)+M0(p3)+M0(p6)+M0(p7)+M0(p10)+M0(p11) = 7 M0(p2)+M0(p4)+M0(p5)+M0(p7)+M0(p10)+M0(p12) = 6 A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004

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

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

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

  37. 6 - 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, 2004

  38. CONTROL (cont’d) • Control with observer Prevent the firing of t after w has been observed iffthere 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: A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004

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

  40. EXAMPLE Bound Actual marking MwEstimation error uw = Mw - mw A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004

  41. CONTROL (cont’d) • 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. A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004

  42. A MANUFACTURING EXAMPLE p1 p3 M(p3)+M(p5)  3 t1 p4 p12 p7 p10 t4 t7 t3 p11 t6 p6 t2 p8 p9 p5 M(p9)  3 t5 p2 A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004

  43. Bound Bw Actual marking MwEstimatemw ( 4 5 1 0 0 1 0 1 0 0 0 1 / 0 0 0 0 0 0 0 0 0 0 0 0 / 1 5 5 6 5 6 6 6 7 6 ) t1 ( 4 5 0 1 0 1 0 1 0 0 1 0 / 0 0 0 1 0 0 0 0 0 0 1 0 / 0 4 5 5 4 6 5 6 6 5 ) t4 ( 5 5 0 0 0 0 1 1 0 0 1 0 / 1 0 0 0 0 0 1 0 0 0 1 0 / 0 4 4 4 4 6 5 5 5 5 ) t3 ( 5 6 0 0 0 0 0 0 0 0 1 0 / 1 1 0 0 0 0 0 0 0 0 1 0 / 0 4 4 4 4 5 5 5 5 5 ) Deadlock A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004

  44. p1 p3 M(p3)+M(p5)  3 t1 p4 ? p12 p7 p10 t4 t7 t3 p11 t6 ? p6 t2 p8 p9 p5 M(p9)  3 ? t5 p2 Only the green tokens have been detected t6 and t7 are disabled by the controller A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004

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

  46. 7 - DEADLOCK RECOVERY AND ESTIMATE UPDATE AFTER NET TIME-OUT 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 Mw Set of blocking markings A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004

  47. DEADLOCK RECOVERY (cont’d) • Given a structurally bounded net N, a marking M is dead iff  a vector ({0,1}msuch that: 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 The set of blocking markings ofN: A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004

  48. 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 f0 = f(.,C). 2. Let Ti={tT | fi(t)=1} and let Nithe net obtained by N removing all transitions not in Ti. 3. Update the control pattern to fi+1=f(.,CMb(Ni)) 4. If fi+1= fiTHEN 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, 2004

  49. DEADLOCK RECOVERY (cont’d) Main advantages of the approach: A unique linear algebraic formalism for: • state estimation • control • deadlock recovery 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, 2004

  50. A MANUFACTURING EXAMPLE (cont’d) p1 p3 M(p3)+M(p5)  3 t1 p4 p12 p7 p10 t4 t7 t3 p11 t6 p6 t2 p8 p9 p5 M(p9)  3 t5 p2 Initial macromarking: we know the token content in each cycle M0(p11)+M0(p12) = 1 M0(p1)+M0(p3)+M0(p4) = 5 M0(p1)+M0(p5)+M0(p6) = 5 M0(p1)+M0(p3)+M0(p6) +M0(p11) = 6 M0(p1)+M0(p4)+M0(p5) +M0(p12) = 5 M0(p2)+M0(p8) +M0(p9) = 6 M0(p2)+M0(p3)+M0(p4)+M0(p7)+M0(p10) = 6 M0(p2)+M0(p5)+M0(p6)+M0(p7)+M0(p10) = 6 M0(p2)+M0(p3)+M0(p6)+M0(p7)+M0(p10)+M0(p11) = 7 M0(p2)+M0(p4)+M0(p5)+M0(p7)+M0(p10)+M0(p12) = 6 A. Giua, Control and Deadlock Recovery of Timed Petri Nets Using Observers, MOSIM’04 - Sept 2, 2004

More Related