# Interpreted Petri Nets Applied to Autonomous Components within Electric Power Systems
## 2 Background on Interpreted Petri Nets  
For easier understanding and reading, some preliminaries are introduced.  
**Definition 1**.: _A Petri net [1] is a four-tuple PN = (P, T, F, M\({}_{0}\)), where P is a finite set of places, T is a finite set of transitions, F \(\subseteq\) (P \(\times\) T) \(\cup\) (T \(\times\) P) is a finite set of arcs and M\({}_{0}\) is an initial marking. A marking involves all places that contain a token. A transition is enabled in marking M, if each of its input places contains a token. A transition can be fired if it is enabled. Then, a token is removed from all its input places and added to all its output places. A marking is reachable from any other marking if it can be reached by a sequence of transition firings._  
**Definition 2**.: _A Petri net is live [1] if it is always possible to fire any transition of the net by progressing through some further firing sequence._  
**Definition 3**.: _A Petri net is safe [2] if there is no reachable marking such that any place contains more than one token._  
**Definition 4**.: _A Petri net is reversible [2] if a return to the initial marking is always possible._  
Sample Petri nets with various properties are shown in Figure 1. The set of places and transitions is the same for all examples, each one consisting of three elements: \(P=\{p1,p2,p3\}\) and \(T=\{t1,t2,t3\}\). The initial marking is also the same, M\({}_{0}=\{p1\}\). The only difference is in set \(F\), which includes the relations between places and transitions. This aspect influences the basic properties.  
Figure 1: Petri nets and their structural properties: (**a**) live, safe, and reversible; (**b**) safe but not live; (**c**) live but not safe.  
**Definition 5**.: _An interpreted Petri net [23] is a six-tuple IN = (P, T, F, M0, X, Y), where the first four elements describe a Petri net that is live and safe; X is a finite set of logic input signals and Y is a finite set of logic output signals. A transition in an interpreted net can be fired if it is enabled and all the conditions of its input signals (assigned to it) are fulfilled._  
To illustrate the above definitions, a sample Petri net is presented in Figure 2a, while an interpreted Petri net (with the same structure but extended with input and output signals) is shown in Figure 2b. Both nets contain four places and four transitions connected with each other. However, the ordinary Petri net (Figure 2a) does not include any additional information, while the interpreted Petri net (Figure 2b) takes into account input and output signals for communication with the environment. In the example, the interpreted net models the functionality of a two-bit counter, counting from zero (binary 00) to three (binary 11), showing the current number with light-emitting diode (LED) lights. One input signal (\(go\)) is used to proceed with counting (if it equals 0, then the counter freezes). Two output signals are used to control the LEDs (\(y1\) and \(y0\)). Initially, the counter is set to zero (place \(p1\) contains a token) and the LEDs are turned off. With active signal \(go\), the counting proceeds, transition \(t1\) fires (as its input place contains a token and its guard is fulfilled) and the appropriate LED is turned on.  
**Definition 6**.: _An interpreted Petri net is weakly deterministic [28] if for each reachable state (marking) and for any fixed input value, the net comes into a stable marking and at the same time there is no stable marking into which the net can come with the same input values._  
**Definition 7**.: _An interpreted Petri net is strongly deterministic [28] if it is weakly deterministic and for each reachable marking and any fixed input values there is only one next marking possible._