Prof. Dr.-Ing. Jörg Raisch Germano Schafaschek Soraia Moradi Behrang Nejad Fachgebiet Regelungssysteme Fakultät IV Elektrotechnik und Informatik Technische Universität Berlin Lehrveranstaltung Ereignisdiskrete Systeme Sommersemester 2016 3. Exercise Exercise 3.1 (Controlling a manufacturing system) The Petri net in Figure 1 represents a manufacturing system, where one robot and two machines (1 and 2) process workpieces of type A and B. Finished workpieces are taken to a depot. The displayed transitions have the following meaning: t 1/4 t 2/5 robot takes an unprocessed workpiece of type A/B, robot loads an unprocessed workpiece of type A/B into machine 1/2 and machine 1/2 starts processing the respective workpiece, t 3/6 machine 1/2 finishes processing workpiece A/B. Calculate the least restrictive control to achieve the following specifications: The capacity of each machine is 1, The robot can only hold one workpiece at a time. You can assume that all transitions are observable and preventable (controllable). t 1 t t 1 2 1 t 7 t 4 p 4 p t t 6 5 6 Figure 1: Petri net 1. 1
Exercise 3.2 (Controlling with non-preventable transitions) The Petri net in Figure 2 is given. t 1 p 1 t 2 t 4 t 5 t 3 p 4 Figure 2: Petri net 2. a) Specify a controller that guarantees that the number of tokens in never exceeds 1 under the condition that all transitions are preventable (i.e., controllable) and observable. b) In the following, t 4 is a non-controllable transitions. Show that, in this case, the specification in exercise a) is not ideally enforceable. c) Specify two other specifications (γ, b ) and (γ, b ) that are both at least as strict as the one from a) and ideally enforceable. Use the algorithm given on the attached worksheet. What are the resulting controllers? 2
Exercise 3.3 (Controlling with non-preventable and non-observable transitions) The following Petri net (Figure 3) represents a robotic assembly cell in which piston rods are assembled into engine blocks. Table 1 contains a description of every place. The number of tokens in a place denotes the number of resources that are involved in an operation. t 1 p 1 t 5 t 2 t 6 t 3 t 4 t 7 t 8 t 9 p 4 p 6 p 7 p 8 Figure 3: Petri net 3. Place p 1 p 4 p 6 p 7 p 8 Table 1: Description of the places of Petri net 3. Description Engine block and crankshaft are provided S-380 robot aligns the crankshaft S-380 robot grabs and positions a new piston rod The engine block is getting prepared M1 robot picks up a tool M1 robot places the piston rod into the engine block and returns the tool M1 robot places a coverage on the piston rod M1 robot tightens the coverage The following resources are available: 3 robots of type S-380 3 robots of type M1 2 tools Express the boundedness of the resources in form of the inequality Γx b. The transitions t 6, t 7, and t 8 are neither preventable nor observable. Is the desired specification ideally enforceable under these circumstances? If not, find another specification that is at least as strict as the previous one and ideally enforceable. Determine the incidence matrix of the controller (A c ) as well as the initial marking (x 0 c) of the controller places. 1 1 see: J. O. Moody and P. J. Antsaklis, Petri net supervisors for DES with uncontrollable and unobservable transitions, IEEE Transactions on Automatic Control, Vol. 45, No. 3, pp. 462 476, March 2000. 3
Prof. Dr.-Ing. Jörg Raisch Behrang Nejad Fachgebiet Regelungssysteme Fakultät IV Elektrotechnik und Informatik Technische Universität Berlin Lehrveranstaltung Ereignisdiskrete Systeme 1 Regelung von Petri-Netzen bei nicht verhinderbaren Transitionen Der hier vorgestellte Algorithmus zur Bestimmung der strengeren Spezifikation bzw. des Vektors r 1 N m (m : Anzahl der Stellen in (N, x)) und des Skalars r 2 N in γ := r 1 + r 2 γ b := r 2 (b + 1) 1 (1) ist dem Buch Sistemi ad Eventi Discreti von A. Di Febrarro/A. Giua (McGraw-Hill, 2002) entnommen. Dabei betrachten die Autoren nur einfache Spezifikationen γ T x b, γ Z m, b Z und lassen für r 1 sowie r 2 nur Elemente der natürlichen Zahlen zu, d.h. r 1 N m, r 2 N. Gegeben sei ein Petri-Netz (N, x 0 ) mit m Stellen und n nv nicht verhinderbaren Transitionen und der zu diesen Transitionen gehörige Teil der Inzidenzmatrix werde mit A nv bezeichnet. Die zu erzwingende Spezifikation laute γ T x b. Zur Bestimmung von r 1 und r 2, anhand derer eine strengere aber ideal erzwingbare Spezifikation gemäß (1) berechnet werden kann, konstruiere man folgende Tabelle der Dimension (m + 1) (n nv + m + 1) C := A nv E m m 0 v T r T 1 r 2 (2a) wobei E m m die Einheitsmatrix, 0 Nullvektor und zu Beginn des Algorithmus die Elemente der letzte Zeile folgendermaßen definiert seien v T := γ T A nv, r T 1 := 0 T, r 2 := 1. (2b) Ist die Spezifikation γ T x b nicht ideal erzwingbar, so gilt γ T A nv 0 T. Somit addiere man zur letzten Zeile (oder zu einem positiven Vielfachen dersleben) eine der vorherigen Zeilen (gegebenfalls multipliziert mit einer positiven (natürlichen)zahl) bis der Vektor v nur noch Elemente 0 besitze. Formal beinhaltet der Algorithmus damit die folgenden Schritte. 1. Konstruiere die Anfangstabelle entsprechend (2). 2. Sei J = {j v(j) > 0} die Menge der Spaltenindizes der positiven Einträge des Vektors v. Falls J =, gehe zu Schritt 6. 3. Falls J =, wähle einen Index j J und eleminiere das Element v( j) folgendermaßen. a) Bestimme die Menge der Zeilenindizes, welche zu negativen Einträgen der Spalte j von A nv gehören, I := {i A nv (i, j) < 0}. Falls I =, so ist es unmöglich den positiven Eintrag v( j) zu eleminieren. Gehe zu Schritt 5. 1
b) Wähle einen Index ī I und berechne d := kgv{ A nv (ī, j), v( j)} das kleinste gemeinsame Vielfache der beiden Elemente A nv (ī, j) und v( j). c) Multipliziere die letzte Zeile der Tabelle mit d/v( j) und füge zu ihr die ī-te Zeile multipliziert mit d/a nv (ī, j) hinzu, d.h. setze C(m + 1, ) := Das j-te Element des Vektor v ist nun gleich 0. 4. Gehe zu Schritt 2. 5. Der Algorithmus endet ohne Ergebnis. d d C(m + 1, ) + v( j) A nv (ī, j) C(ī, ). 6. Der Algorithmus endet und die letzte Zeile der Tabelle hat die Form v T r T 1 r 2. Falls der Algorithmus mit Schritt 6 endet, gilt v 0, während r 1 N m, r 2 N. Die strengere Spezifikation ergibt sich somit aus (1), für die man zeigen kann, dass γ T A nv = v 0 T gilt und somit die neue Spezifikation ideal erzwingbar ist. Eine abgewandelte Form des dargestellten Algorithmus schließt auch den Fall von nicht beobachtbaren Transitionen ein. Die entsprechende Anfangstabelle lautet in diesem Fall C := A nv A nbnv E m m 0 v T u T r1 T = A nv A nbnv E m m 0 r 2 γ T A nv γ T A nbnv 0... 0 1 (3) und es ist solange eine der ersten m Zeilen (oder ein positives Vielfaches derselben) zur letzten Zeile (gegebenenfalls multipliziert mit einer positiven (natürlichen) Zahl) zu addieren, bis gilt v 0 und u = 0. 2