Logo Passei Direto
Buscar
Material
páginas com resultados encontrados.
páginas com resultados encontrados.

Prévia do material em texto

Ministry of Higher Education and 
 Scientific Research 
 University of Baghdad 
 College of Engineering 
 
 
 
The Implementation of 
Petri Net to the Modeling, 
Analysis, and Control 
 
A thesis submitted 
to the College of Engineering University of Baghdad 
in partial fulfillment of the requirements for the degree of 
Master of Science in Control and Computers Engineering 
 
 
 
By 
Hayder Hikmat Salman 
 
 
Supervised By 
Prof. Saleem M. R. Taha 
 
(2008) 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
I certify that this thesis entitled "The Implementation of 
Petri Net to the Modeling, Analysis, and Control "was 
prepared under my supervision in the Electrical Engineering 
Department at the University of Baghdad in partial fulfillment 
of the requirements for the degree of Master of Science in 
Electrical Engineering. 
 
 
 
Prof. Saleem M. R. Taha 
Baghdad University 
College of Engineering 
Electrical Department 
 
Signature: 
 
 
 
Name: Prof. Saleem M. R. Taha 
 
 Date: / /2008 
 
 
 
EXAMINING COMMITTEE'S CERTIFICATION 
 We certify that we have read this thesis titled "The Implementation of 
Petri Net to the Modeling, Analysis, and Control", and as an examining 
committee, examined the student Hayder Hikmet Salman in its content and in 
what is connected with it, and that in our opinion it is adequate with VERY GOOD 
standing as a thesis for the Degree of master of science in Control and 
Computer Engineering. 
Signature: 
Name: Prof. Dr. Ghassan H. Majeed 
 (Chairman) 
 Date: / /2008 
 
Signature: Signature: 
Name: Name: 
Prof. Dr. Raad S. Fyath Assist. Prof. Sulaiman M. Abbas 
 (Member) (Member) 
 Date: / /2008 Date: / /2008 
 
Signature: 
Name: Prof. Saleem M. R. Taha 
 (Supervisor) 
 Date: / /2008 
 
Approved by the University of Baghdad, College of Engineering Council. 
 Signature: 
 Name: Prof. Dr. Ali S. Al-Kiliddar 
 (Dean of Collage of Engineering) 
 Date: / /2008 
 
 
 
 To the candle of way, 
 my dear father, 
 because he taught me 
 the pride of being a mild man. 
 To the rose of life, 
 my groovy mother, 
 for her encouraging love to me. 
 
 
 
 
 
I would like to express my sincere appreciation to my research 
supervisor, (Prof. Saleem M. R. Taha), for given me the major steps 
to go on to explore the subject, and shearing with me the ideas in 
my Thesis. 
 
Also I wish to thank the staff of Electrical Engineering 
department at the Baghdad University for their help. 
 
 I would like to say (thank you) to my faithful friends for 
supporting and giving me advises. 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Hayder H. 
 
 
 
 
Acknowledgments 
 
 
 
I 
 
The present work deals with the implementation of Petri nets in 
modeling, analysis and control. Three Petri net types have been discussed 
namely: Time Petri Net, Supervisor Petri Net and Neural Petri Net. 
To investigate the performance of types, three different fields have been 
selected for implementation. The first implementation is the control of Traffic 
light with Intersection using Timed Transition Petri Net. 
The second implementation is the using the supervisor Petri Net for 
Rapid Thermal Process in semiconductor device. 
The third field of implementation is the Fault diagnosis of electrical 
control system by using Neural Petri Net. 
The three implementations explain the advantages and disadvantages of 
each type of Petri Net and can be used as a guide for different future studies. 
Abstract 
 
 
II 
 
No. of Figure The Title No. of Page 
2.1 Marked Petri net. 10 
2.2 A marked Petri net. 13 
2.3 Petri net after the firing. 14 
2.4 Modeling of Continuous arrival. 15 
2.5 The modeling of Shipping. 15 
2.6 Modeling a constant precondition. 16 
2.7 Modeling concurrent events. 17 
2.8 Modeling events in a conflict situation. 18 
2.9 Symmetric and asymmetric confusion 18 
2.10 Petri net with reachability graph 20 
2.11 The producer/consumer problem with unbounded 
buffer with reachability tree. 
21 
2.12 Two different Petri net. 23 
2.13 The Coverability graph for two nets shown in 
figure (2.12a) and (2.12b). 
23 
2.14 Petri net for example (2.2). 26 
2.15 Six transformations preserving liveness, safeness, 
and boundedness. 
28 
2.16 Petri net the example (2.3). 35 
2.17 A safe Petri net. 35 
2.18 A siphon in Petri net. 36 
2.19 A trap in Petri net. 37 
2.20 Subclasses of Petri nets and their Venn diagram. 39 
 
 
LIST OF FIGURES 
 
 
III 
 
No. of Figure The Title No. of Page 
3.1 Classification of Petri net models. 40 
3.2 Timed place PN. 43 
3.3 Timed token in PN. 43 
3.4 Timed arcs in PN. 44 
3.5 Timed transitions PN. 45 
3.6 Conflicts in PN. 46 
3.7 Defining the controllability and observability of 
transitions. 
54 
3.8 (a) Petri net; (b) closed loop. 55 
3.9 (a) ANP model, and (b) two-layer neural Petri 
net. 
56 
3.10 NPN for 4-bit parity problem. 58 
4.1 Modeling of Traffic signal. 61 
4.2 Modeling in two Traffic signals. 62 
4.3 Modeling for synchronization for two traffic 
lights. 
63 
4.4 Phase plans for pretimed and traffic- actuated 
control. 
65 
4.5 Work sheet of intersection. 67 
4.6 Petri net modeling of intersection. 68 
4.7 Marking of Intersection model. 78 
 
 
LIST OF FIGURES 
 
 
IV 
 
No. of Figure The Title No. of Page 
4.8 Timed Transition of model in figure (4.6). 78 
4.9 Concepts of RTP. 81 
4.10 Schematic diagram of the RTP system. 82 
4.11 The PN model for control of the RTP system. 87 
4.12 Description the supervisory Petri net to RTP. 89 
4.13 Marking of closed loop control in the figure 
(4.12). 
91 
4.14 Electric Control System for Power Supply. 94 
4.15 The NPN model for Fault Diagnosis of Electric 
Control. 
94 
4.16 RMS versus iteration of training. 100 
LIST OF FIGURES 
 
 
V 
AC Asymmetric Choice Net. 
ANN Artificial Neural Network. 
ANP Adaptive Neural Processor. 
APC Advanced Process Control. 
CVD Chemical Vapor Diffusion. 
DES Discrete Event System. 
EFC Extended Free-Choice. 
FC Free-Choice. 
MG the marked graphs. 
NPN Neural Petri Net. 
RTA Rapid Thermal Annealing. 
RTCVD Rapid Thermal Chemical Vapor Deposition. 
RTO Rapid Thermal Oxidation. 
RTN Rapid Thermal Nitration. 
RTP Rapid Thermal Processing. 
RMS Root Mean Square Error. 
SPN Stochastic Petri Net 
SM State Machine. 
SWP Single Wafer Processing. 
TMG Timed Marked Graph. 
TPPN Timed Place Petri Net. 
LIST OF ABBREVIATIONS 
 
 
VI 
TTPN Timed Transition Petri Net. 
 TPN Time Petri Net.LIST OF ABBREVIATIONS 
 
 
VII 
 
A the incidence matrix of a Petri net 
AT the transpose of the matrix A 
aij the entries of the incidence matrix. 
aij
+ the number of arcs connecting transition to place. 
aij
− the number of arcs connecting transition from place. 
b an integer column vector. 
Bf the matrix corresponds to the fundamental circuit matrix. 
𝐶 the set of states of activation for the hidden and output layer places. 
Di the total time delay in the section (3.3.3). 
D using the incidence matrix of a Petri net in section (3.5). 
D+ using the input matrix (taken with respect to incoming transition 
arcs) in section (3.5). 
D− using the output matrix (taken with respect to outgoing transition 
arcs) in section (3.5). 
𝐸 the pattern of connectivity among places and transitions 
F the set of transition arcs of a Petri net. 
G the plant model in the section (3.5). 
Gp Coverability graph. 
 
 
LIST OF SYMBOLS 
 
 
VIII 
 
H the specification model in the section (3.5). 
I the input function in the section (3.5). 
Iμ the identity matrix of order μ. 
K function represent capacity of places. 
Lμ the linear marking constraints. 
M the marking function. 
m the number of places. 
M
 t 
 M′ M enables the transition t and M′ is reached by firing t. 
M0 the initial marking in Petri net. 
M0
′ initial marking after transformations in the section (2.4). 
Md Reachable from M0. 
M pi number of token in place. 
M′ pi old marking of place. 
M′′ pi new marking of place. 
N the Petri net from places, transitions, arcs, and wieghts of arcs 
only. 
ℕ set of natural numbers. 
n the number of transition. 
N′ structure Petri net after transformations in the section (2.4). 
LIST OF SYMBOLS 
 
 
IX 
 
ℕ+ set of positive integers; ℕ+ = ℕ\ 0 . 
ℕP set of P -tuples consisting of P natural numbers 
Ni the total number of tokens in the cycle in the section (3.3.3). 
nC the number of constraints. 
O the output function in the section (3.5). 
P the places in Petri net. 
P 
° the set of input transitions of places. 
p 
° the set of output transitions of places. 
PCA Petri net with capacity of places. 
PN Petri net (N) with initial marking. 
ℝ the set of Real numbers. 
ℝ+ the set of positive real numbers. 
R(M0) Reachability set of Petri nets. 
r the rank of matrix. 
S 
∘ set of predecessors of node (place or transition) S of a Petri net 
S 
∘ set of successors of node (place or transition) S of a Petri net 
SG the plant and specification models in the section (3.5). 
 
 
LIST OF SYMBOLS 
 
 
X 
 
T the transitions in Petri net. 
t 
° the set of input places of transition. 
t 
° the set of output places of transition. 
Tuc the uncontrollable transition. 
Tu0 the unobservable transition. 
𝑣 weight between hidden layer and output layer in section (3.7). 
W the weight function in Petri net. 
x firing count vector in the section (2.4). 
y p the pth entry of y. 
μ firing sequence in the section (2.4). 
μ the cycle time in the section (3.5.5). 
∆M Md − M0 
∆t sequences of firing transition. 
 X the number of elements of the set X. 
𝜃𝑖 threshold value. 
 
 
 
 
LIST OF SYMBOLS 
 
 
XI 
 
 
π the place delay function in the section (3.5.5). 
τ the transition firing time function in the section (3.5.5). 
|| parallel to. 
∃ there exists. 
∀ for all. 
< less than. 
≤ less than or equal to. 
∈ element of. 
⊆ A ⊆ B if A is a proper subset of the set B or if A = B. 
 
LIST OF SYMBOLS 
 
 
 
IX 
 
Abstract. I 
List of Figures. II 
List of Abbreviations. V 
List of Symbols. VII 
Chapter One. Introduction. 
1.1 History of Petri nets. 1 
1.2 Literature Survey. 3 
1.3 The Work objective. 7 
1.4 Thesis Outline. 7 
Chapter Two. Concepts of Petri Nets. 
2.1 Introduction. 9 
2.2 Description of Petri nets. 9 
2.3 Firing Rules and Transition Enabling. 12 
2.3.1 Special Cases. 14 
2.3.1.1 Source and Sink Transitions. 14 
2.3.1.2 Self Loop. 15 
2.3.1.3 Capacity of Places. 16 
2.3.1.4 Parallelism. 17 
2.3.1.5 Inhibitor Arcs. 19 
2.4 Analysis Techniques (methods) of Petri Nets. 19 
2.4.1 The Coverability (Reachability) Tree. 19 
2.4.1.1 Application of the Coverability. 22 
2.4.1.2 Disadvantage. 22 
2.4.2 The Incidence matrix and State Equation. 23 
2.4.3 Simple Reduction Rules or Decomposition techniques. 27 
2.5 Invariant Analysis. 28 
2.6 Properties of Petri Nets. 30 
2.6.1 Behavioral Properties. 30 
2.6.2 Structural Properties. 32 
2.7 Petri Net Classes. 37 
Chapter Three. Types of Petri Nets. 
3.1 Introduction. 40 
3.2 Ordinary, Abbreviations, and Extensions Petri Nets. 41 
LIST OF CONTENTS 
 
 
 
X 
3.3 Timed Petri net. 42 
3.3.1 Timing Specifications. 42 
3.3.2Timed Petri nets. 46 
3.3.3 Deterministic Timed Petri Nets. 47 
3.4 Stochastic Petri Net. 49 
3.5 The supervision of Petri nets. 49 
3.6 Supervision Based on place Invariants. 51 
3.6.1 Fully Controllable and Observable Petri Nets. 52 
3.6.2 Partially Controllable and Observable Petri Nets. 53 
3.7 Neural Petri Net. 55 
Chapter Four. Application of Petri Nets. 
4.1 Introduction. 59 
4.2 modeling traffic Lights and Intersection. 60 
4.2.1Modeling Traffic. 60 
4.2.1.1 Macroscopic Models. 60 
4.2.1.2 Microscopic Models. 60 
4.2.2 Modeling of Traffic Signal. 61 
4.2.3 Modeling of Intersection. 63 
4.2.4 Signal Timing Design. 63 
4.2.5 Objective of signal timing. 65 
4.2.6 Modeling Traffic signals and Intersection. 66 
4.2.7 Controlling Traffic Lights in Intersection. 73 
4.2.8 Analysis of Modeling. 77 
4.2.9 Petri Net Model versus Other Models. 79 
4.3 Rapid Thermal Processing. 80 
4.3.1 System Description. 82 
4.3.2 Modeling of Controller. 84 
4.3.3 The Supervisory Controller of RTP. 88 
4.4 Fault Diagnosis Application. 92 
4.4.1Modeling of Fault Diagnosis. 92 
4.4.2 Description of Fault Diagnosis Model. 95 
4.4.3 Neural Petri Net versus Other Petri Net Models. 100 
Chapter Five. Conclusions and Future Work. 
5.1 Conclusions. 101 
5.2 Future Work. 104 
 
 
 
XI 
References. 
References. 106 
Appendices. 
Appendix (A): Functions of Timed Transition Petri Net. 
Appendix (B): Functions for Supervision Petri Net. 
Appendix (C): Results Training of Neural Petri Net. 
 
 
 
 
Chapter One 
Introduction 
 
Chapter One Introduction
 
 
1 
1.1 History of Petri Nets. 
A system can often be broken down into subsystems. If it is required to 
describe activities of subsystems and their mutual relations, a Petri net removes 
that inadequacy. Petri nets are named after German mathematician C.A. Petri 
who first proposed a model of that kind [1]. Historically speaking, the concept 
of the Petri net has its origin in (Carl Adam Petri's) dissertation, submitted in 
1962 to the faculty of mathematics and physics at the technical universityof 
Darmstadt, West Germany. The dissertation was prepared while C.A. Petri 
worked as a scientist at the University of Bonn. Petri's work, came to the 
attention of A.W. Holt, who later led the information system theory project of 
applied data research, lnc., in the United States. The early developments and 
applications of Petri nets (or their predecessor) are found in the reports 
associated with this project, and in the record of the 1970 project Middle 
Atlantic Conference (MAC) Conference on concurrent systems and parallel 
computation. From 1970 to 1975, the computation structure group at MIT was 
most active in conducting Petri-net related research, and produced many reports 
and theses on Petri nets. In July 1975, there was a conference on Petri Nets and 
related methods at Massachusetts Institute of Technology (MIT) but no 
conference proceedings were published. Since the late-1970's, the Europeans 
have been very active in organizing workshops and publishing conference 
proceedings on Petri nets. In October 1979, about 135 researchers mostly from 
European countries assembled in Hamburg, West Germany, for a two-week 
advanced course on general net theory of processes and systems. The 17 
lectures given in this course were published in its proceedings. The second 
advanced course was held in Bad Honnef, west Germany, in September 1986. 
The proceedings of this course contain 34 articles, including two recent articles 
by C.A. Petri; one is concerned with his axioms of concurrency theory and the 
other with his suggestions for further research. The first European workshop on 
Chapter One Introduction
 
 
2 
applications and theory of Petri Nets was held in 1980 at Strasbourg, France. 
Since then, this series of workshops has been held every year at different 
locations in Europe: 1981, Bad Honnef, west German; 1982, varenna, Italy; 
1983, Toulouse France; 1984, Aarhus, Denmark; 1985, espoo, Finland; 1986, 
oxford, Great Britain; 1987, Zaragoza, Spain; 1988, Venice, Italy and 1989, Bad 
Honnef, west Germany. The distribution of the proceedings of these workshops 
is limited to mostly the workshop participants. However, selected papers from 
these workshops and other articles have been published by Springer-Verlag as 
"Advanced in Petri Nets". The 1987 volume contains the most comprehensive 
bibliography of Petri nets listing 2074 entries published from 1962 to early 
1987. The "recent publications" section of Petri Net Newsletter lists short 
abstracts of recent publications three times a year, and is a good source of 
information about the most recent Petri net literatures. In July 1985, another 
series of international workshops was initialed. This series places emphasis on 
timed and stochastic nets and their applications to performance evaluation. The 
first international workshop on timed Petri nets was held in Torino, Italy, in July 
1985, the second was held in Madison, Wisconsin, in August 1987; the third 
held in Kyoto, Japan, in December 1989; and the fourth in Australia in 1991[2]. 
Further development was facilitated by the fact that Petri nets can be used to 
model properties such as process synchronization, asynchronous events, 
concurrent operations, and conflicts or resource sharing. These properties 
characterize discrete- event systems whose examples include industrial 
automated systems, communication systems, and computer-based systems [3]. 
 In addition, Petri net has an appealing graphical representation with a 
powerful algebraic formulation for supervisory control design [4]. 
 
 
Chapter One Introduction
 
 
3 
1.2 Literature Survey. 
 In the following presents a survey of recent researches in Petri net 
applications. 
 A paper presents a Petri net based building automation system and 
associated monitoring graphical user application [5]. The system’s model 
is built upon each use case and its translation into a state diagram or Petri 
net model. Afterwards, the set of partial models is combined through a 
composition operation, leading to the construction of a Petri net based 
behavioral model for the whole system. The proposal exploits the 
association between key characteristics of the Petri net model and key 
graphical characteristics presented in the systems synoptic. In this sense, 
execution of the Petri net model will produce an implicit update of the 
system's synoptic. 
 A paper deals with Network control systems is presented in [6]. There is 
presented problem of time delays in the network. Time delays, constant 
or even random can destabilize the system. Initializations of individual 
elements influence on quality of regulation. Paper describes advantages 
and disadvantages of different initializations and there are represented 
simulation results of with D-initialization. 
 A paper of "Modeling and analysis of fault-tolerant systems for 
machining operations based on Petri nets" introduces a methodology for 
modeling and analyzing fault-tolerant manufacturing systems that not 
only optimizes normal productive processes, but also performs detection 
and treatment of faults [7]. This approach is based on the hierarchical and 
modular integration of Petri nets. The modularity provides the integration 
of three types of processes: those representing the productive process, 
fault detection, and fault treatment. The hierarchical aspect of the 
approach allows us to consider processes on different levels of detail (i.e., 
Chapter One Introduction
 
 
4 
factory, manufacturing cell, or machine). Case studies considering 
detection and treatment of faults are presented, and a simulation tool is 
applied to verify the models. 
 Performance evaluation is required at every stage in the life cycle of a 
network protocol. Analytical modeling is the method of choice for fast 
and cost effective evaluation of a network protocol. High-level 
formalisms used for analytical modeling of network protocols is 
Stochastic Petri nets (SPN's) is proposed [8]. Complexity of nowadays 
network protocols, which results in the state space explosion of the 
underlying Markov chain (MC) model, has hindered the wide use of 
SPN's in the analysis of these protocols. This paper presents a new 
decomposition technique called behavior and delay equivalent block 
(BDEB) technique. This technique overcomes most of drawbacks of other 
techniques proposed in the literature. It introduces a new aggregation 
method that depends philosophy different from other techniques using the 
same criteria. 
 A method, called "stretching", is introduced to represent timed Petri nets 
[9]. Using this method, a new Petri net, called "stretched Petri net", 
which has only unit delays, is obtained to represent a timed-transition 
Petri net. Using this net, the state of the original timed Petri net can be 
represented easily. This representation also makes it easy to design a 
supervisory controller for a timed Petri net for any purpose. In this paper, 
supervisory controller design to avoid deadlock is considered in 
particular. Using this method, a controller is first designed for the 
stretched Petri net. Then, using this controller, a controller for the original 
timed Petri net is obtained. 
 The timed neural Petri net concept combines the new orientation of the 
neural net with the modeling capabilities of the Petri Net [10]. A big 
advantage to the utilization of Petri nets for modeling (especially in the 
Chapter One Introduction
 
 
5 
neural cases) is the proper representation of concurrent or parallel events. 
The neural Petri net concept extends the basic Petri net definition. Four 
partsof [10] is divided: introduction to neuron concept, timed neural Petri 
net (TNPN) development, analysis and example of the TNPN, and 
conclusions. 
 An algorithm for the model based design of a distributed protocol for 
fault detection and diagnosis for very large systems is proposed [11]. The 
overall process is modeled as different Time Petri Net (TPN) models 
(each one modeling a local process) that interact with each other via 
guarded transitions that becomes enabled only when certain conditions 
(expressed as predicates over the marking of some places) are satisfied 
(the guard is true). In order to use this broad class of time discrete event 
system (DES) models for fault detection and diagnosis the timing analysis 
of the TPN models with guarded transitions is derived. The paper is also 
extension of the modeling capability of the faults calling some transitions 
faulty when operations they represent take more or less time than a 
prescribed time interval corresponding to their normal execution. The 
considering here that different local agents receive local observation as 
well as messages from neighboring agents. Each agent estimates the state 
of the part of the overall process for which it has modeled and from 
which it observes events by reconciling observations with model based 
predictions. The algorithms designing that using limited information 
exchange between agents and that can quickly decide “questions” about 
“whether and where a fault occurred?” and “whether or not some 
components of the local processes have operated correctly?”. The 
algorithms allow each local agent to generate a preliminary is derived 
diagnosis prior to any communication and showing that after 
communicating the agents designing recover the global diagnosis that a 
Chapter One Introduction
 
 
6 
centralized agent would have derived. The algorithms are component 
oriented leading to efficiency in computation. 
 A supervisor synthesis technique for Petri net plants with uncontrollable 
and unobservable transitions that enforces the conjunction of a set of 
linear inequalities on the reachable markings of the plant is presented 
[12]. The approach is based on the concept of Petri net place invariants. 
Each step of the procedure is illustrated through a running example 
involving the supervision of a robotic assembly cell. The controller is 
described by an auxiliary Petri net connected to the plant’s transitions, 
providing a unified Petri net model of the closed-loop system. The 
synthesis technique is based on the concept of admissible constraints. An 
inadmissible constraint cannot be directly enforced on a plant because of 
the uncontrollability or unobservability of certain plant transitions. 
Procedures are given for identifying all admissible linear constraints for a 
plant with uncontrollable and unobservable transitions, as well as 
methods for transforming inadmissible constraints into admissible ones. 
When multiple transformations of this kind occur, a technique is 
described for creating a modified Petri net controller that enforces the 
union of all of these control laws. The method is practical and 
computationally inexpensive in terms of size, design time, and 
implementation complexity. 
 Traffic systems are discrete systems that can be heavily populated. One 
way of overcoming the state explosion problem inherent to such heavily 
populated discrete systems is to relax the discrete model. Continuous 
Petri nets (PN) represent a relaxation of the original discrete Petri nets 
that leads to a very compositional and efficient formalism to model traffic 
behaviour in between intersections. The paper [13] introduces some new 
features of continuous Petri nets that are useful in order to obtain realistic 
but compact models for traffic systems. Combining these continuous PN 
Chapter One Introduction
 
 
7 
models with discrete PN models of traffic lights leads to a hybrid Petri 
net model that is appropriate for predicting traffic behaviour, and for 
designing traffic light controllers that minimize the total delay of the 
vehicles in the system. 
 
1.3 The Work Objective. 
 The objective of this work is to study the performance, advantages and 
disadvantages of three types of Petri nets namely: Timed Petri net, Supervisor 
Petri net and Neural Petri net. The implementation of these types shows how to 
control the flow running in modeling, analysis and control. 
1.4 Thesis Outline. 
 The rest of the thesis is organized as follows: 
 Chapter two: Concepts of Petri Nets; presents the modeling Petri nets 
from formalisms, properties, and analysis methods, and how to control 
this model with figures and equations about this. 
 Chapter three: Types and Application of Petri Nets; presents types of 
Petri nets, definitions, and properties. The analyzing and applications of 
these types are given, too. 
 Chapter four: Modeling of Petri Nets; presents three modeling of Petri 
nets, the first modeling is of Traffic Lights and Intersection using Timed 
Petri net; the second modeling is of Rapid Thermal Processing (RTP) 
using Supervisor Petri net, with the results of analyzing of these models. 
And three modeling is Fault diagnosis of electric control system by using 
Neural Petri Net, with training and analyzing of the model. 
 Chapter five: Conclusions and Future works; gives conclusions of the 
whole work and suggestions for future works. 
Chapter One Introduction
 
 
8 
 Appendix (A): Functions of timed transition Petri net; shown in 
MATLAB about modeling of Intersection, description of functions, and 
result of analysis. 
 Appendix (B): Functions for supervision Petri net; written in MATLAB 
about modeling of Rapid Thermal Process, description of functions, and 
result of analysis with Reachability tree. 
 Appendix (C): Result training of Neural Petri Net: by using Qnet 
program explained by figures result of training and comparison between 
target and output of the model. 
 
 
Chapter Two 
Concepts of Petri 
Nets 
 
Chapter Two Concepts of Petri Nets
 
 
9 
2.1 Introduction. 
 Petri nets are a graphical and mathematical modeling tool applicable to 
many systems [2]. Petri nets provide a uniform environment for modeling, 
formal analysis, and design of discrete event systems [3]. With Petri nets the 
main idea is to represent states of subsystems separately. Then, the distributed 
activities of a system can be represented very effectively [1]. Petri nets as 
graphical tools provide a powerful communication medium between the user, 
typically requirements engineer, and the customer. As a mathematical tool, a 
Petri net model can be described by a set of linear algebraic equations, or other 
mathematical models reflecting the behavior of the system [3]. Petri nets can be 
used by both practitioners and theoreticians. Thus, they provide a powerful 
medium of communication between them. Practitioners can learn from 
theoreticians how to make their models more methodical, and theoreticians can 
learn from practitioners how to make their models more realistic. However, 
Petri nets incorporate the fundamental concepts which can be as a basis for 
system designer and users who require new conceptual mechanisms and 
theories to deal with their systems. One of the major advantages of using Petri 
net models is that the same model is used for the analysis of behavioral 
properties and performance evaluation, as well as for systematic construction of 
discrete-event simulators and controllers [3], [14].The major weakness of Petri 
nets is the complexity problems. Petri net based models tend to becometoo 
large for analyses [2]. 
2.2 Description of Petri Nets. 
 A Petri net may be identified as a particular kind of bipartite directed 
graph populated by three types of objects. These objects are places, transitions, 
and directed arcs connecting places to transitions and transitions to places. 
Pictorially, places are depicted by circles and transitions as bars or boxes [3]. It 
Chapter Two Concepts of Petri Nets
 
 
10 
is a bipartite graph in the sense that arcs cannot directly connect nodes of the 
same type; rather, arcs connect place nodes to transition nodes and transition 
nodes to place nodes [15]. An example of a Petri net is shown in figure (2.1), 
this net consists of five places, represented by circles, four transitions, depicted 
by bars, and directed arcs connecting places to transitions and transitions to 
places. In this net, place 𝑝1 is an input place of transition 𝑡1. Places 𝑝2, and 𝑝3 
are output places of transition 𝑡1 . In order to study dynamic behavior of the 
modeled system, in terms of its states and their changes, each may potentially 
hold either none or a positive number of tokens, pictured by small solid dots, as 
shown in figure (2.1). For a place representing the availability of resources, the 
number of tokens in this place indicates the number of available resources. At 
any given time instance, the distribution of tokens on places, called Petri net 
marking, defines the current state of the modeled system. A Petri net containing 
tokens is called a marked Petri net [3]. 
 
Figure (2.1) Marked Petri net. 
 
 
Chapter Two Concepts of Petri Nets
 
 
11 
 Formally, a Petri net can be defined as follows: 
𝑃𝑁 = 𝑃, 𝑇, 𝐹, 𝑊, 𝑀0 ……………… . (2.1) 
 Where: 
𝑃 = 𝑝1 , 𝑝2 , ………………… , 𝑝𝑚 𝑖𝑠 𝑎 𝑓𝑖𝑛𝑖𝑡𝑒 𝑠𝑒𝑡 𝑜𝑓 𝑝𝑙𝑎𝑐𝑒𝑠. 
𝑇 = 𝑡 1, 𝑡2, ………………… , 𝑡𝑛 𝑖𝑠 𝑎 𝑓𝑖𝑛𝑖𝑡𝑒 𝑠𝑒𝑡 𝑜𝑓 𝑡𝑟𝑎𝑛𝑠𝑖𝑡𝑖𝑜𝑛𝑠. 
𝐹 ⊆ 𝑃 × 𝑇 ∪ 𝑇 × 𝑃 𝑖𝑠 𝑡𝑕𝑒 𝑠𝑒𝑡 𝑜𝑓 𝑎𝑟𝑐𝑠 𝑓𝑟𝑜𝑚 𝑝𝑙𝑎𝑐𝑒𝑠 𝑡𝑜 𝑡𝑟𝑎𝑛𝑠𝑖𝑡𝑖𝑜𝑛𝑠 
𝑎𝑛𝑑 𝑓𝑟𝑜𝑚 𝑡𝑟𝑎𝑛𝑠𝑖𝑡𝑖𝑜𝑛𝑠 𝑡𝑜 𝑝𝑙𝑎𝑐𝑒𝑠 𝑖𝑛 𝑡𝑕𝑒 𝑔𝑟𝑎𝑝𝑕. 
 Where ⊆ is binary relation (subset) between two sets. 
𝑊 ∶ 𝐹 ⟶ 1,2,3, ………… . . 𝑖𝑠 𝑎 𝑤𝑖𝑒𝑔𝑕𝑡 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛 𝑜𝑛 𝑡𝑕𝑒 𝑎𝑟𝑐𝑠. 
𝑀0 ∶ 𝑃 ⟶ 0 , 1,2,3, ……… . . . 𝑖𝑠 𝑡𝑕𝑒 𝑖𝑛𝑖𝑡𝑖𝑎𝑙 𝑚𝑎𝑟𝑘𝑖𝑛𝑔. 
𝑃 ∩ 𝑇 = ∅ 𝑎𝑛𝑑 𝑃 ∪ 𝑇 ≠ ∅ 
 Sets of input and output transitions of place 𝑃𝑖: 
 𝑃 
° = 𝑡𝑗 ∈ 𝑇 ∶ (𝑡𝑗 , 𝑝𝑖) ∈ 𝐹 . 
 𝑝 
° = 𝑡𝑗 ∈ 𝑇 ∶ (𝑝𝑖 , 𝑡𝑗 ) ∈ 𝐹 [16]. 
 The set of input (output) places of transition 𝑡𝑗 : 
 𝑡 
° = 𝐼 𝑡𝑗 = 𝑝𝑖 ∈ 𝑃: (𝑝𝑖 , 𝑡𝑗 ) ∈ 𝐹 . 
 𝑡 
° = 𝑂 𝑡𝑗 = 𝑝𝑖 ∈ 𝑃: 𝑡𝑗 , 𝑝𝑖 ∈ 𝐹 [2], [3], [5]. 
 A net is said to be connected (strongly connected), if its graph is connected 
[16].The marking function gives the distribution of tokens in a given net state: 
 𝑀: 𝑃 ⟶ ℕ. 
Chapter Two Concepts of Petri Nets
 
 
12 
 A Petri net with a given initial marking is denoted by𝑃𝑁 = 𝑁 , 𝑀∘ , note 
that a Petri net is said to be ordinary if all its arc weights are equal to 1 [15]. 
2.3 Firing Rules and Transition Enabling. 
 By changing distribution of tokens on places, which may reflect the 
occurrence of events or execution of operations, for instance, one can study 
dynamic behavior of the modeled system. The following rules are used to 
govern the flow of tokens: 
1. Enabling Rule: A transition 𝑡 is said to be enabled if: 
𝑀 𝑝𝑖 ≥ 𝑤 𝑝𝑖 , 𝑡𝑗 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑝𝑖 ∈ 𝑃 ………… . . (2.2) 
Each input place 𝑝 𝑜𝑓 𝑡 contains at least the number of tokens equal to 
the weight of the directed arc connecting 𝑝 𝑡𝑜 𝑡 [3]. 
2. Firing Rule: 
a. An enable transition may or may not fire depending on whether or 
not the event modeled by the transition actually takes place in the 
real system. 
b. At firing of transition 𝑡𝑗 the value of the marking function of a place 
is decreased by the weight of the arc connecting the given place to 
transition 𝑡𝑗 , and is increased by the weight of the arc from transition 
𝑡𝑗 to the given place: 
𝑀′′ 𝑝𝑖 = 𝑀
′ 𝑝𝑖 − 𝑤 𝑝𝑖 , 𝑡𝑗 + 𝑤 𝑡𝑗 , 𝑝𝑖 𝑓𝑜𝑟 ∀ 𝑝𝑖 ∈ 𝑃 ………… (2.3) 
 Can be generalized the increases and decreases for all places in the 
net. These operations have no effect on the marking value if there is 
no logical relation between the given places and transition so this 
generalization enables a simpler treatment of markings [15], [2]. 
Chapter Two Concepts of Petri Nets
 
 
13 
 
Figure (2.2) A marked Petri net. 
Example (2.1): 
 A Petri net graph in figure (2.2) with a marking: 
 𝑀0 𝑝1, 𝑝2 , 𝑝3 , 𝑝4, 𝑝5 = 1,0,1,0,2 . 
In this initial state the transitions 𝑡1 , 𝑡3 is the only enabled transition. After its 
firing transition 𝑡3, the new marking can be given by the following: 
 𝑀1 𝑝3 = 𝑀0 𝑝3 − 𝑤 𝑝3, 𝑡3 + 𝑤 𝑡3, 𝑝3 . 
 𝑀1 𝑝3 = 1 − 1 + 0 = 0. 
 𝑀1 𝑝4 = 𝑀0 𝑝4 − 𝑤 𝑝4, 𝑡3 + 𝑤 𝑡3, 𝑝4 . 
 𝑀1 𝑝4 = 0 − 0 + 1 = 1. As shown in figure (2.3a). 
The new marking after firing transition 𝑡4 : 
 𝑀2 𝑝4 = 𝑀1 𝑝4 − 𝑤 𝑝4, 𝑡4 + 𝑤 𝑡4, 𝑝4 . 
 𝑀2 𝑝4 = 1 − 1 + 0 =0. 
 𝑀2 𝑝3 = 𝑀1 𝑝3 − 𝑤 𝑝3, 𝑡4 + 𝑤 𝑡4, 𝑝3 . 
 𝑀2 𝑝3 = 0 − 0 + 1 = 1. 
 𝑀2 𝑝2 = 𝑀1 𝑝2 − 𝑤 𝑝2, 𝑡4 + 𝑤 𝑡4, 𝑝2 . 
 𝑀2 𝑝2 = 0 − 0 + 1 = 1.As shown in figure (2.3b) 
Chapter Two Concepts of Petri Nets
 
 
14 
 
(a) After firing transition 𝑡3. (b) After firing transition 𝑡4. 
Figure (2.3) Petri net after the firing. 
2.3.1 Special Cases. 
 In this section some special cases of firing transitions and some 
extensions to the original Petri net structure will be introduced. 
2.3.1.1 Source and Sink Transitions. 
 A transition without any input place is called a Source transition. A Source 
transition can fire in any net state. It is unconditionally enabled. A Source 
transition represents an event or operation which occurs in every step. It can be 
the continuous arrival of new parts on a conveyor belt as it can be seen in figure 
(2.4) [15]. 
Chapter Two Concepts of Petri Nets
 
 
15 
 
Figure (2.4) Modeling of continuous arrival. 
 A transition without any output place is called a Sink transition. If a Sink 
transition fires, the amount of tokens decreases because this type of transition 
consumes tokens without producing them [2], [15]. A Sink transition can 
represent the shipping of the product into the depository or the intermediates 
into another unit, as seen in figure (2.5) [15]. 
 
Figure (2.5) The modeling of shipping. 
2.3.1.2 Self loop. 
 A pair of Petri nets contain a place is an input and output place of the same 
transition then this place-transition pair called a Self-loop. If the weights are the 
same in both cases then the firing of the transition does not change the marking 
value on that place. It can be proved that if the place belonging to the loop can 
Chapter Two Concepts of Petri Nets
 
 
16 
not be found in the input set of any other transition and the transition has no 
other input place then once the transition becomes enabled it remains enabled 
throughout the execution of the net. A Petri net without Self-loop is said to be 
pure. The Self-loop can refer to a continuous operation of a device, of a stirrer 
which is a precondition of every process step in the figure (2.6) [15]. 
 
Figure (2.6) Modeling a constant precondition. 
2.3.1.3 Capacityof Places. 
 In Petri net places can have an infinite number of tokens. There is no 
constraint on the marking value of a place. A Petri net of this type is called an 
Infinite Capacity net [15].The capacity restricts the number of tokens that can 
be located in a place as the following formally states: 
𝑃𝐶𝐴 = 𝑃𝑁, 𝐾 ……………… . 2.4 . 
 Where 𝑃𝑁 is standard Petri net in equation (2.1) and 𝐾 is the function 
𝐾: 𝑃 → ℕ+ [1]. 
 The modify rule for transitions to be enabled. A transition 𝑡𝑗 is said to be 
enabled if there is at least 𝑤 𝑝𝑖 , 𝑡𝑗 token in each input place 𝑝𝑖 of 𝑡𝑗 : 
𝑀′ 𝑝𝑖 ≥ 𝑤 𝑝𝑖 , 𝑡𝑗 𝑓𝑜𝑟 ∀ 𝑝𝑖 ∈ 𝑃 ……………… 2.5 . 
Chapter Two Concepts of Petri Nets
 
 
17 
 And after the firing of 𝑡𝑗 the marking in its output places does not exceed 
their upper limits: 
 𝑀′′ 𝑝𝑖 ≤ 𝐾 𝑝𝑖 𝑓𝑜𝑟 ∀ 𝑝𝑖 ∈ 𝑃 ……………………… . 2.6 . 
 This modified rule is called a Strict transition rule whereas the former rule 
for an infinite capacity net is the (Weak) transition rule [15]. 
2.3.1.4 Parallelism. 
 One of the most important modeling features of Petri nets is the handling 
of parallelism. In the real systems almost always contain serial and parallel 
steps; this is even true for simpler discrete event systems. In parallel steps one 
of the most important tasks is timing. There are two different types of 
parallelism: 
1. Concurrency: two (or more) events take place in parallel. They can occur 
at the same time because they are causally independent as in figure (2.7). 
 
Figure (2.7) Modeling concurrent events. 
2. Conflict: the event or the transitions referring to them in the net as in 
figure (2.8). 
Chapter Two Concepts of Petri Nets
 
 
18 
 
Figure (2.8) Modeling events in a conflict situation. 
 As it is seen in figure (2.8) transition 𝑡 𝑓𝑖𝑙𝑙 _𝑎 or transition 𝑡 𝑓𝑖𝑙𝑙 _𝑏 can 
fire first but they cannot fire at the same time. The situation where 
conflict and concurrency are mixed is called Confusion. There are two 
types of confusion: symmetric and asymmetric confusion. In the case of 
symmetric confusion in figure (2.9a) transition 𝑡1 and 𝑡3 are in 
concurrency. Both transitions can fire independently of each other. On the 
other fires neither of them remains enabled. Asymmetric confusion can 
be seen in figure (2.9b). In this case transitions 𝑡1 and 𝑡2 are in 
concurrency but if 𝑡2 fires first the model gets into conflict situation 
between transitions 𝑡1 and 𝑡2 [15]. 
 
Figure (2.9) Symmetric and Asymmetric confusion. 
 
Chapter Two Concepts of Petri Nets
 
 
19 
2.3.1.5 Inhibitor Arcs. 
 An inhibitor arc is always directed from a place to a transition and has a 
small circle rather than an arrowhead at its endpoint. Inhibitor arcs in the model 
allow the presence of the firing rule to transitions has to be changed as follows. 
A transition is enabled if the number of tokens in its input places connected by 
arrowhead arcs is equal to or larger than the value of weight functions assigned 
to the arcs and there is no token in its input places connected by inhibitor arcs. 
The removal and addition of tokens from the input places and to output places 
does not change [1], [15]. Application of inhibitor arcs is solving conflict 
situations between transitions. Directing an inhibitor from the separate input 
place of one transition to the other transition ensures priority for the first 
transition over the second [16]. 
2.4 Analysis Techniques (methods) of Petri Nets. 
 The success of any model depends on two factors; it's modeling power and 
its decision power. Modeling power refers to the ability of correctly 
representing the system to be modeled. Decision power refers to the ability of 
analyzing the model and determining properties of the modeled system [17]. 
 2.4.1 The Coverability (Reachability) Tree. 
 The Coverability tree technique involves the enumeration of all reachable 
marking from given initial marking. It should be able to apply to all classes of 
nets, but is limited to "small" nets due to the complexity of the state-space 
explosion [15]. Tree is represented the markings. Nodes represent markings 
generated from 𝑀0 (the root) and its successors, and each arc represents a 
transition firing, which transforms one marking to another [18]. 
 
Chapter Two Concepts of Petri Nets
 
 
20 
 
Figure (2.10) Petri net with reachability graph 
 The initial marking 𝑀1 is the root of the reachability tree in figure (2.10a). 
the search for all enabled transition to start from the root; the firing of an 
enabled transition produces a new marking which is represented as a new leaf in 
the tree in figure (2.10a), from which the procedure is iterated [17]. To 
generation of the Coverability tree for the Petri net with unbounded buffer as in 
notations: 
1. Root node: this is the first node of the tree, corresponding to the initial 
marking (state) of the given Petri net. 
2. Terminal node: this is any node from which no transition can fire. 
3. Duplicate node: this is node identical to a node already in the tree. 
4. The symbol 𝜔: this is may be thought of as "infinity" in representing the 
marking of unbounded place. using 𝜔 to identify a node dominance 
relationship in the Coverability tree, 𝜔 has the properties that for each 
integer 𝑛, 𝜔 > 𝑛, 𝜔 ± 𝑛 = 𝜔 𝑎𝑛𝑑 𝜔 ≥ 𝜔, as seen in figure (2.11b) [19]. 
 A reachability graph (possible of infinite size) captures the exact 
information about the set of reachable markings of a Petri net, whereas 
Coverability graph (always of finite size) provides an over-approximation of the 
reachability set, should it be infinite [20]. 
(a) (b) 
Chapter Two Concepts of Petri Nets
 
 
21 
 
Figure (2.11) The producer/consumer problem with unbounded buffer with 
reachability tree. 
The algorithm for generating the Coverability graph of Petri net is shown 
below: 
Input: A Petri net (𝑁, 𝑀0) with the initial marking 𝑀0. 
Output: The Coverability graph 𝐺𝑝(𝑀0) of Petri net. 
(1) Create a node 𝑀𝑖𝑛𝑖𝑡 such that 𝑀𝑖𝑛𝑖𝑡 = 𝑀0, and mark it as "new". 
(2) While there contains some new node 𝑀 do 
(3) For each transition 𝑡 enabled at 𝑀 do 
(4) Case (i) there is a node 𝑀′ = 𝑀 + ∆𝑡 𝑖𝑛 𝐺𝑝(𝑀0). 
(5) Add an edge 𝑀
 𝑡 
 𝑀′ 𝑡𝑜 𝐺𝑝(𝑀0). 
(6) Case (ii) there is a node 𝑀′′ from 𝑀𝑖𝑛𝑖𝑡 to 𝑀 such that 𝑀
′′ < 𝑀 + ∆𝑡. 
(7) Add "new" node 𝑥 with 
(8) 𝑥 𝑝 = 𝜔 𝑖𝑓 𝑀′′ 𝑝 < 𝑀 + ∆𝑡 (𝑝) 
(9) 𝑥 𝑝 = 𝑀′′ 𝑝 , otherwise 
(10) Add an edge 𝑀
 𝑡 
 𝑥 
(a) (b) 
Chapter Two Concepts of Petri Nets
 
 
22 
(11) Case (iii) otherwise 
(12) Add "new" node 𝑥 with 𝑥 = 𝑀 + ∆𝑡 and an edge 𝑀
 𝑡 
 𝑥. 
(13) End for. 
(14) Mark 𝑀 with "old". 
(15) End while 
End algorithm [20]. 
2.4.1.1 Application of the Coverability. 
Some of the properties that can be studied by using the Coverability tree 
for a Petri net (𝑁, 𝑀0) are the following; Boundedness, safety, and blocking 
problems: 
1. A net (𝑁, 𝑀0) is bounded and thus 𝑅(𝑀0) is finite iff 𝜔 does not appear 
in any node labels in tree. 
2. A net (𝑁, 𝑀0) is safe iff 0's and 1's appear in node labels in tree. 
3. A transition is dead iff it does not appear as an arc label in tree [3], [18]. 
2.4.1.2 Disadvantage. 
In general, because of the information lost by the use of the symbol 𝑤 
(which may represent only even or odd numbers, increasing or decreasing 
numbers, etc.), the reachability and Liveness problems cannot be solved by the 
Coverability treemethod alone [2]. If 𝑀 is reachable from 𝑀0, then there exists 
a node labeled 𝑀′ such that 𝑀 ≤ 𝑀′ [18]. Despite the introduced modifications 
in the construction, the reachability tree can be very large and this can cause the 
time and space needed for the construction and search to grow exponentially, 
therefore this analysis is usually a computationally hard problem [15]. The two 
different Petri nets in figure (2.12a,b) have the same Coverability tree as shown 
in figure (2.13). 
Chapter Two Concepts of Petri Nets
 
 
23 
 
Figure (2.12) Two different Petri net. 
 The net shown in figure (2.12a) is a live Petri net, which the net shown 
in figure (2.12b) is not live, since no transitions are enabled after firing 
𝑡1 , 𝑡2, 𝑎𝑛𝑑 𝑡3 [2]. 
 
Figure (2.13) The Coverability graph for two nets shown in figure (2.12a) and 
(2.12b) 
2.4.2 The Incidence Matrix and State Equation. 
 State equation can be used to address problems such as state reachability 
and conservation. It provides an algebraic alternative to the graphical 
methodology based on the Coverability tree, and it can be quite powerful in 
identifying structural properties that are mostly dependent on the topology of 
M1 
M2 
M3 
t1 
t4 
t3 
t1 
01𝜔 
 
100 
10𝜔 
t2 
M4 
Chapter Two Concepts of Petri Nets
 
 
24 
the Petri net graph captured in the incidence matrix 𝐴 [8].The fundamental to 
this approach is the incidence matrix which defines all possible interconnections 
between places and transitions in a Petri net. The incidence matrix of a pure 
Petri net is an integer (𝑛 × 𝑚) matrix 𝐴, where 𝑛 is the number of transitions, 
and 𝑚 is the number of places. The entries of the incidence matrix are defined 
as: 
𝑎𝑖𝑗 = 𝑎𝑖𝑗
+ − 𝑎𝑖𝑗
− …………………… . (2.7) 
 Where 𝑎𝑖𝑗
+ is equal to the number of arcs connecting transition 𝑡𝑖 , to its 
output place 𝑝𝑗 (𝑎𝑖𝑗
+ = 𝑂 𝑝𝑗 , 𝑡𝑖 ) and 𝑎𝑖𝑗
− is equal to the number of arcs 
connecting transition 𝑡𝑖 to its input place 𝑝𝑗 (𝑎𝑖𝑗
− = 𝐼 𝑝𝑗 , 𝑡𝑖 ) [2]. Necessary 
reachability condition: suppose that a destination marking 𝑀𝑑 is reachable from 
𝑀0 through a firing sequence 𝜇1, 𝜇2, ………… , 𝜇𝑑 . Writing the state equation 
for 𝑖 = 1,2, ……… . . , 𝑑 where 𝑑 is represents the index of reachable state and 
summing them, can obtain: 
𝑀𝑑 = 𝑀0 + 𝐴
𝑇 𝜇𝑘 ………………… . . (2.8)
𝑑
𝑘=1
 
Which can be written as: 
𝐴𝑇𝑥 = ∆𝑀 …………………… . . (2.9) 
Where ∆𝑀 = 𝑀𝑑 − 𝑀0, 𝑎𝑛𝑑 𝑥 = 𝜇𝑘
𝑑
𝑘=1 . Here 𝑥 is an 𝑛 × 1 column 
vector of nonnegative integers and is called the firing count vector. The 𝑖𝑡𝑕 
entry of 𝑥 denotes the number of times that transition 𝑖 must fire to transform 
𝑀0 𝑡𝑜 𝑀𝑑 . It is well known that a set of linear algebraic equations has a solution 
𝑥 𝑖𝑓𝑓 ∆𝑀 is orthogonal every solution 𝑦 of its homogeneous system: 
𝐴𝑦 = 0 ………………… . . (2.10) 
Chapter Two Concepts of Petri Nets
 
 
25 
Let 𝑟 be the rank of 𝐴, and partition 𝐴 is the following from: 
 
 …………… (2.11) 
Where 𝐴12 is a nonsingular square matrix of order 𝑟 . A set (𝑚 − 𝑟) 
linearity independent solution 𝑦 for (2.10) can be given as the (𝑚 − 𝑟) rows of 
the following (𝑚 − 𝑟) × 𝑚 matrix 𝐵𝑓 : 
𝐵𝑓 = 𝐼𝜇 : −𝐴11
𝑇 (𝐴12
𝑇 )−1 ……………… . . (2.12) 
Where 𝐼𝜇 is the identity matrix of order 𝜇 = 𝑚 − 𝑟. Note that 𝐴𝐵𝑓
𝑇 = 0. 
That is, the vector space spanned by the row vectors of 𝐵𝑓 . Now, the condition 
that ∆𝑀 is orthogonal to every solution for equation in (2.10) is equivalent to 
the following condition: 
𝐵𝑓∆𝑀 = 0 ………………… . . (2.13) 
Thus, if 𝑀𝑑 is reachable from 𝑀0, then the firing counter vector 𝑥 must 
exist and (2.13) must hold. Therefore, have the following necessary condition 
for reachability in an unrestricted Petri net. 
Theorem: 
If 𝑀𝑑 is reachable from 𝑀0 in a Petri net (𝑁, 𝑀0), then 𝐵𝑓∆𝑀 = 0, where 
∆𝑀 = 𝑀𝑑 − 𝑀0 and 𝐵𝑓 is given by (2.12). 
Corollary (1): In a Petri net (𝑁, 𝑀0), a marking 𝑀𝑑 is not reachable from 
𝑀0(≠ 𝑀𝑑) if their difference is a linear combination of the row vector of 𝐵𝑓 , 
that is; 
∆𝑀 = 𝐵𝑓
𝑇𝑧 
Where 𝑧 is a nonzero 𝜇 × 1 column vector [2], [19]. 
 
Chapter Two Concepts of Petri Nets
 
 
26 
Example (2.2): [13] 
 
Figure (2.14) Petri net for example (2.2). 
 For the Petri net shown in figure (2.14), the state equation is illustrated 
below, where the transition 𝑡3 fires to result in the marking 
𝑀1 = (3 0 0 2)
𝑇 𝑓𝑟𝑜𝑚 𝑀0 = (2 0 1 0)
𝑇: 
 
 The incidence matrix 𝐴 is of rank 2 and can be partitioned in the form of 
equation (2.11), where: 
 
Thus, the matrix 𝐵𝑓 can be found by equation (2.12): 
 
Chapter Two Concepts of Petri Nets
 
 
27 
 It is easy to verify that 𝐵𝑓∆𝑀 = 0 holds for 
∆𝑀 = 𝑀1 − 𝑀0 = (1 0 − 1 2)
𝑇. 
2.4.3 Simple Reduction Rules or Decomposition Techniques. 
 To facilitate the analysis of a large system, often reduce the system model 
to a simpler one, while preserving the system properties to be analyzed. 
Conversely, techniques to transform an abstracted model into a more refined 
model in a hierarchical manner can be used for synthesis [2], [14]. The 
following six operations preserve the properties of liveness, and boundedness. 
That is, let 𝑁, 𝑀0 𝑎𝑛𝑑 (𝑁
′ , 𝑀0
′ ) be the Petri nets before and after one of the 
following transformations. Then (𝑁 ′ , 𝑀0
′ ) is live, safe, or bounded iff 𝑁, 𝑀0 is 
live, safe, or bounded, respectively. 
(1) Fusion of series places (FSP) as in figure (2.15a). 
(2) Fusion of series transitions (FST) as in figure (2.15b). 
(3) Fusion of parallel places (FPP) as in figure (2.15d). 
(4) Fusion of parallel transitions (FPT) as in figure (2.15c). 
(5) Elimination of self-loop places (ESP) as in figure (2.15e). 
(6) Elimination of self-loop transitions (EST) as in figure (2.15f) [13]. 
Chapter Two Concepts of Petri Nets
 
 
28 
 
Figure (2.15) Six transformations preserving liveness, safeness, and 
boundedness. 
2.5 Invariant Analysis. 
 One of the structural properties of Petri nets, i.e. properties that depend 
only on the topological structure of the Petri net and not on the net's initial 
marking, is the net invariants. There are two kinds of invariants: Place 
invariants and Transition invariants. Place invariants are sets of places whose 
token count remains always constant [5]. An 𝑚 − 𝑣𝑒𝑐𝑡𝑜𝑟 𝑦 is a P-invariant iff 
𝑀𝑇𝑦 = 𝑀0
𝑇𝑦 for any fixed initial marking 𝑀0 and any 𝑀 reachable marking. 
Chapter Two Concepts of Petri Nets
 
 
29 
Where 𝑚 is the number of places of the Petri net, whose non-zero entries 
correspond to the places that belong to the particular place invariant and zeros 
everywhere else [2].The place invariants are defined by all integer vectors 
which satisfy the following: 
𝐴𝑇𝑦 = 0 ……………… . 2.14 . 
 Where 𝐴 is the (𝑛 × 𝑚) composite change matrix of the Petri net with 𝑛 
the number of places and 𝑚 the number of transitions of the net. It is easily 
shown that every linear combination of place invariants is also a place invariant 
for the net [1], [2]. 
 Transition invariant denotes which transitions must fire and how many 
times each, so that the initial marking is repeated. They are represented by an 
𝑚 − 𝑐𝑜𝑙𝑢𝑚𝑛 𝑣𝑒𝑐𝑡𝑜𝑟 which contains integers in the positions corresponding to 
the transitions belonging to the transition invariantand zeros everywhere else. 
The integers denote how many times the corresponding transition must fire in 
order for the initial marking to be repeated. They can be computed from the 
following: [2] 
𝐴𝑥 = 0 ……………… . . 2.15 . 
As with place invariants, any linear combination of transition invariants is 
also a transition invariant for the Petri net. The existence of transition invariants 
in the Petri net denotes a cyclic behavior [2]. Place and transition invariants are 
important means for analyzing Petri nets since they allow for the net's structure 
to be investigated independently of any dynamic process [1]. Another advantage 
of the invariants is that analyses can be performed on local subnets without 
considering the whole system. Invariants are also used for model verification 
[3]. Net invariant analyses comprise all processes which aim at the solution of 
systems of final equations derived from the incidence matrix of the net. A net is 
covered by place invariants, if there exists a P-invariant which assigns a positive 
Chapter Two Concepts of Petri Nets
 
 
30 
value to each place. A net is covered by transition invariants, if there exists a T-
invariant which assigns a positive value to each transition [1], [2]. The place or 
transition invariants of a net are the integer solutions of the homogenous system 
of linear equations (2.14) or (2.15), respectively, where 𝐴 is the incidence 
matrix of the net [2], [3]. The components of P-invariants are interpreted as 
weights of the respective place [3]. The weighted amount of tokens is invariant 
with respect to firing. The component of T-invariants can be interpreted as 
firing numbers of the respective transmission (negative values correspond to the 
reverse firing). Firing all transitions as many times as their firing number 
indicates leads to the same marking as before. Each bounded and live net has T-
invariant that is positive in all component, such a net is coverable with T-
invariants. 
2.6 Properties of Petri Nets. 
 A major strength of Petri nets is their support for analysis of many 
properties and problems associated with concurrent systems [2]. These 
properties when interpreted in the context of the model system, allow the 
system designer to identify the presence or absence of the application domain 
specific functional properties of the system under design. Two types of 
properties can be distinguished: behavioral and structural properties [3]. 
2.6.1 Behavioral Properties. 
 The behavioral properties are those which depend on the initial state, or 
marking of a Petri net [3]. 
(1) Reachability: 
 Reachability is a fundamental basis for studying the dynamic properties 
of any system. An important issue in designing distributed system is whether 
a system can reach a specific state, or exhibit a particular functional behavior 
Chapter Two Concepts of Petri Nets
 
 
31 
[2]. During execution different markings can be reached in a Petri net. The 
markings are either desirable or undesirable from the viewpoint of the 
operation of the modeled system. The reachability problem addresses the 
equation whether it is possible to reach or avoid a given marking starting 
from a given initial state [17]. 
(2) Boundedness and Safeness: 
 A Petri net (𝑁, 𝑀0) is said to be 𝐾-bounded or simply bounded if the 
number of tokens in each place never exceeds a given value. If the maximum 
value is equal to 1 then the place is called Safe [2], [15]. 
(3) Liveness: 
 Liveness addresses the equation whether it is always possible to activate a 
specific transition or the system can reach a state where this transition is 
"dead". As a generalization of this problem can investigate whether the 
system can reach a state where there is no enabled transition at all. This state 
is called a dead-lock. A system can get into a dead-lock when the operating 
procedure is over but it could also happen that the process stops before the 
final state. A dead-lock is very dangerous in the latter case because it refers 
to a state where the operator has no possibility to intervene, that is the 
system is out of control [15]. 
(4) Reversibility and Home state: 
 An important issue in the operation of real systems, such as 
manufacturing systems, process control systems, etc., is the ability of these 
systems for an error recovery [3]. The reversibility property says that for 
every reachable marking there exists at least one is firing sequence 
beginning at it and going back to the initial marking [1]. In many 
Chapter Two Concepts of Petri Nets
 
 
32 
applications, it is not necessary to get back to the initial state as long as one 
can get back to some (home) state [2]. 
(5) Coverability: 
 A marking 𝑀 in a Petri net (𝑁, 𝑀0) is said to be coverable if there exists 
a marking 𝑀′ in reachability set of 𝑀0 such that 𝑀
′(𝑝) ≥ 𝑀(𝑝) for each 𝑝 in 
the net [2], [15]. 
(6) Persistence: 
 A Petri net is said to be persistent if for any two enabled transitions, the 
firing of one cannot disable the other [17]. 
(7) Fairness: 
 A property closely related to the persistence is fairness. A Petri net is said 
to be bounded fair if every pair of its transitions is bounded fair. A transition 
pair is bounded fair if every transition of the pair can fire 𝐾 -times at 
maximum before the other transition in the pair fires [1]. 
2.6.2 Structural Properties. 
 Structural properties are those which depend on the topological structures 
of Petri nets. They are independent of the initial marking 𝑀0 in the sense that 
these properties hold for any initial marking or are considered with the existence 
of certain firing sequences from some initial marking. Thus, these properties 
can often be characterized in terms of the incidence matrix 𝐴 and its associated 
homogenous equations or inequalities [2], [3]. 
 
 
 
Chapter Two Concepts of Petri Nets
 
 
33 
(1) Structural liveness: 
 Petri net with initial marking is said to be live if there always exists some 
sample path such that any transition can eventually fire from any state 
reached from initial marking [17]. 
(2) Controllability: 
 A Petri net is said to be completely controllable if any marking is 
reachable from any other marking [2], [14]. 
(3) Structural Boundedness: 
 A Petri net is structurally bounded if it is bounded given any initial 
marking 𝑀0 [1]. It is structurally bounded iff there exist an 𝑚 − 𝑣𝑒𝑐𝑡𝑜𝑟 𝑦 of 
positive integers such that 𝐴𝑦 ≤ 0. The number of tokens in each place 𝑃, is 
bounded by: 
𝑀 𝑝 ≤ 𝑀0
𝑇𝑦 𝑦 𝑝 …………………… (2.16). 
Where 𝑦(𝑝) is the 𝑝𝑡𝑕 entry of 𝑦 [2], [5]. 
(4) Conservativeness: 
 A Petri net is (partially) conservative iff there exists an 𝑚 − 𝑣𝑒𝑐𝑡𝑜𝑟 of 
positive (nonnegative) integers such that 𝐴𝑦 = 0, 𝑦 ≠ 0 [5]. 
(5) Repetitiveness: 
 A Petri net is said to be (Partially) repetitive if there exists an 𝑛 −
𝑣𝑒𝑐𝑡𝑜𝑟 𝑥 of positive integers such that 𝐴𝑇𝑥 ≥ 0, 𝑥 ≠ 0 [2]. 
(6) Consistency: 
 A Petri net is said to be (partially) consisted iff there exists an 𝑛 −
𝑣𝑒𝑐𝑡𝑜𝑟 𝑥 of positive integers such that 𝐴𝑇𝑥 = 0, 𝑥 ≠ 0 [2]. 
 
Chapter Two Concepts of Petri Nets
 
 
34 
Table (2.1) Necessary conditions for some structural properties. 
Symbols Properties Condition 
SB Structurally Bounded ∃𝑦 > 0, 𝐴𝑦 ≤ 0. 
CN Conservative ∃𝑦 > 0, 𝐴𝑦 = 0. 
CS Consistent ∃𝑥 > 0, 𝐴𝑇𝑥 = 0. 
 Table (2.2) presents a list of corollaries that can be derived from the 
properties in table (2.1). It is helpful to understand the inequality conditions in 
table (2.1), if one interprets the expression 𝐴𝑇𝑥 as the difference of markingsin 
each place, and the expression 𝐴𝑦 as the change in weight sum of tokens for 
each transition firing [2], [14]. 
Table (2.2) Additional structural properties. 
 
Example (2.3): 
 From the structural properties shown in tables (2.1) and (2.2), it is easy to 
analyze structural properties for the net shown in figure (2.16). 
Case If Then 
1 𝑁 is structurally bounded 
and structurally live. 
𝑁 is both conservative and 
consistent. 
2 ∃𝑦 ≥ 0, 𝐴𝑦 <≠ 0. ∃ no live 𝑀0 for 𝑁, 𝑁 is not 
consistent. 
3 ∃𝑦 ≥ 0, 𝐴𝑦 >≠ 0. (𝑁, 𝑀0) is not bounded for a live 
𝑀0, 𝑁 is not consistent. 
4 ∃𝑦 ≥ 0, 𝐴𝑇𝑥 <≠ 0. ∃ no live 𝑀0 for structurally 
bounded 𝑁, 𝑁 is not conservative. 
5 ∃𝑦 ≥ 0, 𝐴𝑇𝑥 >≠ 0. 𝑁 is not structurally bounded, 𝑁 is 
not conservative. 
Chapter Two Concepts of Petri Nets
 
 
35 
 
Figure (2.16) Petri net for example (2.3). 
 Define the transpose incidence matrix 𝐴𝑇 and the incidence matrix 𝐴: 
𝐴𝑇 = 
−1 1 0
1 −1 1
 , 𝐴 = 
−1 1
1 −1
0 1
 . 
 The following structural properties can be derived: 
1. Structurally bounded: 
∃𝑦 > 0, 𝐴𝑦 ≤ 0, 𝑦 = 1 1 1 , 𝐴𝑦 = 0 1 . The net is not 
structurally bounded. 
2. Conservative: 
∃𝑦 > 0, 𝐴𝑦 = 0, 𝑦 = 1 1 1 , 𝐴𝑦 ≠ 0. The net is not conservative. 
3. Consistent: 
∃𝑥 > 0, 𝐴𝑇𝑥 = 0. The net is not consistent. 
Example (2.4): 
 For the net shown in figure (2.17), is this net live for any initial marking? 
 
Figure (2.17) A safe Petri net. 
Chapter Two Concepts of Petri Nets
 
 
36 
 The transpose incidence matrix 𝐴𝑇 for this net is: 
𝐴𝑇 =
 
 
 
 
 
−1 1 0 0 0 0
−1 0 0 0 1 0
 0 − 1 − 1 1 0 0
 0 0 1 − 1 − 1 1
 1 0 0 0 0 − 1 
 
 
 
 
 
 There exists 𝑥 = [1 1 0 0 1 1]𝑇 ≥ 0. 
𝐴𝑇𝑥 = [0 0 −1 0 0] <≠ 0. 
 From table (2.2), case4, this net is not live for any initial marking. 
(7) Siphons and Traps: 
 Siphons and Traps are two important structural objects in a Petri net and 
closely related to the Petri net properties, especially dead lock and liveness 
[1]. 
 A set of place 𝑆 ⊆ 𝑃 is called a siphon if 𝑆 
∘ ⊆ 𝑆 
∘ and it is a trap if 𝑆 
∘ ⊆ 𝑆 
∘ 
[1]. A siphon is a set of places such that every transition which outputs to 
one of the places in the siphon also inputs from one of these places. This 
means that once all of the places in the siphon become unmarked, the entire 
set of place will always be unmarked; no transition can place a token in the 
siphon because there is no token in the siphon to enable a transition which 
outputs to place in the siphon as in figure (2.18). 
 
Figure (2.18) A siphon in Petri net. 
𝑆 = 𝑝1 , 𝑝2 , 𝑝3 , 𝑆 
∘ = 𝑡1 , 𝑆 
∘ = 𝑡1, 𝑡2 . 
Chapter Two Concepts of Petri Nets
 
 
37 
 A trap is a set of places such that every transition which inputs 
from one of these places also outputs to one of these places. This means 
that once any of the places in a trap has a token there will always be a 
token in one of the places of the trap firing of transitions may move the 
tokens between places but cannot remove all tokens from a trap as in 
figure (2.19). 
 
Figure (2.19) A trap in Petri net. 
𝑆 = 𝑝1 , 𝑝2 , 𝑝3 , 𝑆 
∘ = 𝑡1 , 𝑆 
∘ = 𝑡1 , 𝑡2 . 
Union of two siphons (traps) is again a siphon (trap) [2], [16]. Finding 
siphons and traps has a variety of applications to verification and design 
of parallel systems, such as detection and prevention of deadlocks 
(usually in a correct system no siphon can be emptied) [16]. 
2.7 Petri Net Classes. 
 They serve as basic or reference Petri net models. There are many 
modifications to the basic models. They can be classified as abbreviations or 
extensions. Petri net models within each class can further be classified into sub-
classes with respect to their structural properties [1]. 
1. Binary Petri nets: 
 A Petri net is called binary or ordinary if all its weights are 1's. 
 
Chapter Two Concepts of Petri Nets
 
 
38 
2. Petri net state machine (SM): 
 A Petri net state machine is a binary Petri net such that each transition has 
exactly one input place and exactly one output place: [2] 
∀𝑡 ∈ 𝑇: 𝑡 
° = 𝑡 
° = 1 …………… 2.17 . 
3. Marked graphs (MG): 
 A binary Petri net is called a marked graph or event graph if each 
place has exactly one input transition and exactly one output transition: [2] 
∀𝑝 ∈ 𝑃: 𝑝 
° = 𝑝 
° = 1 …………… . 2.18 . 
4. A free-choice nets (FC): 
 A free-choice net is a binary Petri net such that every arc going out of a 
place is either a unique arc incoming into a transition and no other arcs go 
out of the place or there are more arcs, but each of them is unique arc going 
into the transition. Formal description of the sub class is: 
 ∀𝑝 ∈ 𝑃: 𝑝 
° ≤ 1𝑜𝑟 𝑝 
° = 𝑝 …………… 2.19 . 
° 
∀𝑝1, 𝑝2 ∈ 𝑃, 𝑝1
° ∩ 𝑝2
° ≠ ∅ ≥ 𝑝1
° = 𝑝2
° = 1, 
Where 𝑝 
° are all output transitions of place 𝑃 and 𝑝 
° 
° means the set of 
input places of all transitions of the set 𝑝 
° [1], [2]. 
5. An extended free-choice (EFC): 
 Is a binary Petri net such that: [16] 
𝑝1
° ∩ 𝑝2
° ≠ ∅ ≥ 𝑝1
° = 𝑝2
° ∀𝑝1, 𝑝2 ∈ 𝑃 …………… 2.20 . 
6. An asymmetric choice net (AC): 
 (Also known as a simple net) is a binary Petri net such that: [2] 
𝑝1
° ∩ 𝑝2
° ≠ ∅ ≥ 𝑝1
° ⊆ 𝑝2
° 𝑜𝑟 𝑝1
° ⊇ 𝑝2
° ∀𝑝1, 𝑝2 ∈ 𝑃 …… . . 2.21 . 
Chapter Two Concepts of Petri Nets
 
 
39 
The Petri net structures shown in figure (2.20) are the key structures that 
characterize theses subclasses. Where MG, SM, etc., denote non MG, nonSM, 
etc., and the Venn diagram relation is shown in figure (2.20f) [2]. 
 
Figure (2.20) Subclasses of Petri nets and their Venn diagram. 
 
 
Chapter Three 
Types of Petri 
Nets 
 
Chapter Three Types of Petri Nets
 
 
40 
3.1 Introduction. 
 The development of man-made systems requires that both functional and 
performance requirements are met. Depending on the development stage of a 
system, the knowledge of either an approximate or exact (or both) performance 
may be required. Petri net models can be classified into four classes: ordinary 
Petri net, abbreviations, extensions, and particular structures, as explain in 
figure (3.1) [3], [18]. 
 
Figure (3.1) Classification of Petri net models. 
Chapter Three Types of Petri Nets
 
 
41 
 The development of Petri nets has been, to a large extent, motivated by 
need to model the industrial systems. Ordinary Petri net are net always 
sufficient to represent and analyze complex industrial and other systems [2], 
[19]. 
3.2 Ordinary, Abbreviations, and Extensions Petri Nets. 
 Petri nets can be divided into three main classes in the literature: ordinary 
Petri nets, abbreviations, and extensions. In an ordinary Petri net, all the arcs 
have the same unity weight, there is only one kind of tokens, the place 
capacities are infinite (i.e., the number of tokens is not limited by place 
capacities), the firing of a transition can occur if and only if (iff) every place 
preceding it contains at least one token, and no time is involved. The 
abbreviations correspond to simplified representations, useful in order to lighten 
the graphical representation, to which an ordinary Petri net can always be made 
to correspond. Generalized Petri nets, finite capacity Petri nets, and colored 
Petri nets are abbreviations. They have the same power of description as the 
ordinary Petri nets. The extensions correspond to models to which functioningrules have been added in order to enrich the initial model, enabling a great 
number of applications to be treated. Three main subclasses may be considered. 
The first subclass corresponds to models which have the descriptive power of 
Turing machines: an inhibitor arc Petri net (PN) and a priority PN. The second 
subclass corresponds to extensions allowing modeling of continuous and hybrid 
systems: continuous PNs and hybrid PNs. The third subclass corresponds to 
non-autonomous PN, which describe the functioning of systems whose 
evolution is considered by external events and/or time: synchronized PNs, timed 
PNs, interpreted PNs, and stochastic PNs [21]. 
 
 
Chapter Three Types of Petri Nets
 
 
42 
3.3 Timed Petri Net. 
 A Petri net is known as an abstract, formal model of information flow. 
The properties, concepts, and techniques of Petri nets are being developed in a 
search for natural and simple methods for describing and analyzing systems that 
may exhibit synchronous and concurrent activities. The major use of Petri nets 
has been the modeling of systems of events in which it is possible for some 
events to occur concurrently but there are constraints on the concurrence, 
precedence, or frequency of these occurrences. However, this model is not 
complete enough for the study of system performance since no assumption is 
made on the duration of modeled activities. The timed Petri nets have been 
introduced by Ramchandani, in 1974, by assigning firing times to the transitions 
of Petri nets. Ramchandani studied the steady state behavior of timed Petri nets 
and developed methods for calculating the throughput rate for certain classes of 
such nets. Sfakis, in 1976 introduced another definition of the timed Petri net by 
assigning times to the places. He has shown that the maximum computation rate 
of a timed Petri net can be calculated by solving a set of linear equations 
describing the net. Some relations between the properties of boundedness and 
liveness in Petri nets and timed Petri nets have been given by Chosh, in 1977 
[22]. 
3.3.1 Timing Specifications. 
 Time is introduced in Petri nets to model the interaction among several 
activities considering their starting and completion times. The introduction of 
time specifications corresponds to an interpretation of the model by means of: 
[23] 
• Observation of the autonomous (untimed) model. 
• Definition of a non-autonomous model. 
Time specifications should provide: 
Chapter Three Types of Petri Nets
 
 
43 
• Consistency among autonomous and non-autonomous models. 
• Non-determinism reduction on the basis of time considerations. 
• Support for the computation of performance indices. 
1. Timed places: 
Several approaches are possible for the introduction of temporal 
specifications in PN models; time may be associated with places (TPPN). 
Tokens generated in an output place become available to fire a transition 
only after a delay has elapsed; the delay is an attribute of the place. As 
shown in figure (3.2) [23]. 
 
 
 
 
 
Figure (3.2) Timed place PN. 
2. Timed tokens: 
Time may be associated with tokens. Tokens carry a time stamp 
that indicates when they are available to fire a transition; this time stamp 
can be incremented at each transition firing. As shown in figure (3.3) 
[23]. 
 
 Figure (3.3) Timed token in PN. 
 
Chapter Three Types of Petri Nets
 
 
44 
3. Timed arcs: 
Time may be associated with arcs. A travelling delay is associated 
with each arc; tokens are available for firing only when they reach a 
transition, as in figure (3.4) [23]. 
 
Figure (3.4) Timed arcs in PN. 
4. Timed transitions: 
Time may be associated with transitions (TTPN); transitions 
represent activities: (1) activity start corresponds to transition enabling. 
(2) Activity end corresponds to transition firing. 
Different firing policies may be assumed: 
(i) Three-phase firing: 
1. Tokens are consumed from input places when the transition is 
enabled. 
2. The delay elapses. 
3. Tokens are generated in output places. 
(ii) Atomic firing: 
Tokens remain in input places for the transition delay; they 
are consumed from input places and generated in output places 
when the transition fires. The TTPN will consider it with atomic 
firing. TTPN with atomic firing can preserve the basic behavior of 
the underlying untimed model. It is thus possible to qualitatively 
Chapter Three Types of Petri Nets
 
 
45 
study TTPN with atomic firing exploiting the theory developed for 
untimed (autonomous) PN (reachability set, invariants, etc.). 
Timing specifications may affect the qualitative behavior of the PN 
when they describe constant and interval firing delays [24]. 
 
Figure (3.5) Timed transitions PN. 
 (iii) Internal timer: 
The behavior of one timed transition can be explained with 
atomic firing by assuming that it incorporates a timer. 
1. When the transition is enabled, its timer is set to the 
current delay value. 
2. Then, the timer is decremented at constant speed, until it 
reaches the value zero. 
3. At this point the transition fires. As shown in figure (3.5) 
[25]. 
(iv) Conflicts: 
When more than one timed transition with atomic firing is 
enabled, the behavior is similar as shown in figure (3.6), but a 
problem arises: 
Chapter Three Types of Petri Nets
 
 
46 
 
Figure (3.6) Conflicts in PN. 
Which one of the enabled transitions is going to fire? 
Two alternative selection rules: 
1. preselection: 
The enabled transition that will fire is chosen when the 
marking is entered, according to some metric (priority, 
probability, ...). 
2. race: 
The enabled transition that will fire is the one whose 
firing delay is minimum [26]. 
 
3.3.2 Timed Petri Nets. 
A Timed Petri nets is formally defined as a six-tuple 
Timed PN= 𝑃, 𝑇, 𝐹, 𝑉, 𝑀0, 𝐷 ……………… . . (3.1). 
Where: 
𝑃 is a finite set of places; 
𝑇 is a finite, ordered set of transitions 𝑡1 , . . . , 𝑡𝑚 ; 
𝑉 ∶ 𝐹 → (𝑃, 𝑇, 𝐹) is the arc multiplicity; 
𝐷 ∶ 𝑇 → 𝑁 Assigns to every transition 𝑡1 a nonnegative real number 𝑁 
indicating the duration of the firing of 𝑡1; and 
𝑀0 is the initial marking. 
Chapter Three Types of Petri Nets
 
 
47 
A Timed Petri net follows the following earliest firing schedule transition 
rule: An enabled transition at a time 𝑘 must fire at this time if there is no 
conflict. Transitions with no firing durations (𝐷(𝑡) = 0) fire first. When a 
transition starts firing at time 𝑡 it removes the corresponding number of tokens 
from its input places at time 𝑡 and adds the corresponding number of tokens to 
its output places at time 𝑘 + 𝐷(𝑡). At any time, a maximal set of concurrently 
enabled transitions (maximal step) is fired [31]. 
 
3.3.3 Deterministic Timed Petri Nets. 
 Time may be associated either with the Petri net places or transitions, or 
with both. A general approach can be followed in (Zhou and Venkatesh 1998) 
covering three associations either together or separately in a deterministic way. 
The deterministic time association is a Petri net model extension enabling 
performance analysis using time relations. The deterministic way is very 
difficult or rather impossible to apply in praxis. Therefore, the deterministic 
time association is mostly restricted to the class of the marked graphs also 
named event graphs [1]. 
The timed marked graphs are delimited by the following definition: 
𝑇𝑀𝐺 = 𝑃, 𝑇, 𝐹, 𝑊. 𝑀0 ,𝜋 , 𝜏 ………… (3.2) 
Where the meaning of 𝑃, 𝑇, 𝐹, 𝑊, 𝑀0 is thePetri net. 
𝑀𝐺 = 𝑃, 𝑇, 𝐹, 𝑊, 𝑀0 is a marked graph (𝑖. 𝑒. , ∀𝑝 ∈ 𝑃 ∶ °𝑝 = 𝑝° = 1), 
and 𝜋 is the place delay function 𝜋 ∶ 𝑃 → ℝ+ ( the set of non-negative real 
numbers), 𝜏 is the transition firing time function 𝜏 ∶ 𝑇 → ℝ+ and : 
1. A token, which arrives in a place, is not available for the connected 
transition with the place during the time associated with the place. 
2. A transition is fireable and fires if all its pre-places contain the available 
tokens (i.e., tokens not time blocked) required by the arc weights. 
Chapter Three Types of Petri Nets
 
 
48 
3. If a transition is fireable, its firing starts by removing the respective 
number of tokens from pre-places and firing completes after the time 
associated with the transition expires and the tokens are deposited in the 
respective post-places [34]. 
For this purpose the timed marked graphs will be considered having all 
arc weights equal to one. In other words, Petri nets belonging to the class of 
timed binary marked graphs. Moreover, the strongly connected timed binary 
marked graphs where for the graph connectivity property both places and 
transitions are considered as graph nodes. In the above delimited Petri net sub-
class, the performance analysis is based on directed simple cycles contained in 
the particular Petri net, which is taken as a mathematical graph with places and 
transitions given as a set of nodes. In a directed simple cycle, the total time 
delay is a sum of times associated with all places and transitions comprised in 
the cycle [1]. 
In a simple cycle the total number of tokens is the number of tokens 
present in all the places in the cycle. Note that a directed simple cycle is one 
that contains no repeated nodes except the beginning and ending ones. The 
minimum cycle time of the analyzed marked graph as a whole is: 
𝜇 = 𝑚𝑎𝑥𝑖
𝐷𝑖
𝑁𝑖
………………… . . 3.3 . 
Where 𝐷𝑖 is the total time delay of the 𝑖-th directed simple cycle and 𝑁𝑖 is 
the total number of tokens in this cycle, 𝐷𝑖 / 𝑁𝑖 is the cycle time [1]. 
The bottleneck cycle is the 𝑗 − 𝑡ℎ one where 𝐷𝑖 / 𝑁𝑖 = 𝜇 holds. A 
system may have multiple such cycles. When additional resources are available 
to improve the system productivity, one should certainly invest into the facility 
causing the bottleneck. The acquisition of a same machine can be reflected 
through the increase of a token in a loop. The improvement in the speed of a 
process can be reflected through the reduction of the delay in a place or 
transition. The delay can also be associated with the arcs in a marked graph, 
Chapter Three Types of Petri Nets
 
 
49 
simulating the time for a token to flow through the arc. This extension is useful 
in modeling transportation of goods over conveyors, or fluid flowing through a 
pipe in process industry [27]. The use of the above approach via the 
enumeration of cycles is of exponential computational complexity. In other 
words, it is not applicable to large-size marked graphs. Fortunately, the 
minimum cycle times can be obtained, e.g., by linear programming [26]. 
 
3.4 Stochastic Petri Net. 
A stochastic Petri net (SPN) is a Petri net where each transition is 
associated with an exponentially distributed random variable that expresses the 
delay from the enabling of the firing of the transition. When several transitions 
are simultaneously enabled, the transition that has the shortest delay will fire 
first. Often used for performance evaluation of systems because they allow to 
perform that evaluation by analytical methods [28]. 
 
3.5 The Supervision of Petri Nets. 
A supervisor is a discrete event system (DES) that is used to monitor and 
control another discrete event system is called plant, such that a given 
specification is satisfied. The supervisor is different from a controller in the 
sense that a controller dictates the input applied to the system, while the 
supervisor only restricts the set of inputs that can be applied to the system. The 
set of inputs is restricted dynamically, based on the observation of the plant. 
Ideally, a supervisor should forbid only the inputs that may unavoidably lead to 
the violation of the specification [29].The composition of a supervisor with a 
plant is a DES called the closed loop. When the plant is a Petri net, a supervisor 
restricts the operation of the net by restricting the set of enabled transitions that 
may fire at a given state of the Petri net. The specification may consist of 
requirements concerning the reachable markings or permissible firing 
sequences. A possible way to apply the supervision of Petri nets in the real 
Chapter Three Types of Petri Nets
 
 
50 
world is as follows. Given a plant with discrete-event-driven dynamics, a Petri 
net model is extracted. The extracted model the plant Petri net is called. In the 
plant Petri net, the occurrence of an event in the physical plant is modeled by 
the firing of a transition. The (observable) transition firings of the plant are the 
information available to the supervisor. A transition firing may trigger a change 
in the state of the supervisor, while a change in the supervisor state can change 
the set of plant events disabled by the supervisor. Physically, the event 
disablement can be done by restricting the range of the inputs of the plant [30]. 
The design of a supervisor typically involves the following requirements: 
[29] 
1. If possible, the closed loop should be representing able as a Petri net. 
2. If the exact implementation of the specification is impossible, 
transform the specification to a more restrictive form that is 
implementable. 
3. If possible, find a least restrictive supervisor. 
PNs have been used to model, analyze, and synthesize control laws for 
DES. Zhou and DiCesare (1991), moreover, addressing the shared resource 
problem recognized that mutual exclusion theory plays a key role in 
synthesizing a bounded, live, and reversible PN. In mutual exclusion theory, 
parallel mutual exclusion consists of a place marked initially with one token to 
model a single shared resource, and a set of pairs of transitions. Each pair of 
transitions models a unique operation that requires the use of the shared 
resource. 
Definition : 
Given two nets 𝐺1 = (𝑃1, 𝑇1 , 𝐼1 , 𝑂1) and 𝐺2 = (𝑃2, 𝑇2, 𝐼2 , 𝑂2) with initial 
marking 𝑀0,1, and 𝑀0,2, respectively. The synchronous composition of 𝐺1 and 
𝐺2 is a net: 
 𝐺 = (𝑃, 𝑇, 𝐼, 𝑂) with initial marking 𝑀0: 
Chapter Three Types of Petri Nets
 
 
51 
𝐺 = 𝐺1 𝐺2 …………… . . (3.4). 
Where: 
𝑃 = 𝑃1 ∪ 𝑃2 ; 
𝑇 = 𝑇1 ∪ 𝑇2 ; 
𝐼 ( 𝑝, 𝑡) = 𝐼𝑖( 𝑝, 𝑡) 𝑖𝑓 (∃𝑖 ∈ {1,2})[ 𝑝 ∈ 𝑃𝑖 ∧ 𝑡 ∈ 𝑇𝑖], 𝑒𝑙𝑠𝑒 𝐼 ( 𝑝, 𝑡) = 0 ; 
𝑂( 𝑝, 𝑡) = 𝑂𝑖( 𝑝, 𝑡) 𝑖𝑓 (∃𝑖 ∈ {1,2})[ 𝑝 ∈ 𝑃𝑖 ∧ 𝑡 ∈ 𝑇𝑖], 𝑒𝑙𝑠𝑒 𝑂( 𝑝, 𝑡) = 0; 
𝑀0 𝑝 = 𝑀0,1 𝑝 𝑖𝑓 𝑝 ∈ 𝑃1 , 𝑒𝑙𝑠𝑒 𝑀0( 𝑝) = 𝑀0,2( 𝑝). 
An agent that specifies which events are to be enabled and disabled when 
the system is in a given state is called a supervisor. For a system with plant 
model 𝐺 and specification model 𝐻 , the supervisor can be obtained by 
synchronous composition of the plant and the specification models: 
𝑆𝐺 = 𝐺 ∥ 𝐻……………… . (3.5). 
where the transitions of H are a subset of the transitions of 𝐺 , i.e. 
𝑇𝐻 ∈ 𝑇𝐺 . Note that 𝑆𝐺 obtained through the above construction, in the general 
case does not represent a proper supervisor, since it may contain deadlock states 
from which a final state cannot be reached. Thus, the behavior of S should be 
further refined and restricted by PN analysis. Mutual exclusion concept is 
adopted to build the PN specificationmodel and then compose it with the plant 
model to design the supervisor [4]. The main supervision approach is the 
supervision based on place invariants. 
 
3.6 Supervision Based on Place Invariants. 
 An effective approach used for the enforcement of linear marking 
constraints of the form 𝐿𝜇 ≤ 𝑏. The approach is called supervision based on 
Place Invariants. Literature references describing this approach as A. Giua, F. 
Dicesare, and M. Silva. "Generalized mutual exclusion constraints on nets with 
uncontrollable transitions". In proceeding of the IEEE in 1992. J.O.MOOdy and 
P.J.Antsaklis, "Supervisory Control of DES's using Petri nets" in 1998, and 
Chapter Three Types of Petri Nets
 
 
52 
"Petri net Supervisors for DES with uncontrollable and unobservable 
transitions". IEEE in 2000, and "Feedback Control of Petri nets based on Place 
invariants", in 1996 [30]. The case when all transitions of the plant Petri net are 
controllable and observable is presented first. Then, an extension to Petri nets 
with uncontrollable and unobservable transitions is also presented. 
3.6.1 Fully Controllable and Observable Petri Nets. 
The control problem considered here is to enforce a set of 𝑛𝐶 linear 
constraints 
𝐿𝜇 ≤ 𝑏……………… . . (3.6). 
In other words, the supervisor is desired to prevent the system from 
reaching markings which do not satisfy equation (3.9). The notation is as 
follows: 𝐿 is an integer 𝑛𝐶 × 𝑚 matrix (𝑛𝐶: the number of constraints, 𝑚: the 
number of places of the given Petri net), 𝑏 is an integer column vector, and μ is 
the Petri net marking. Let 𝜇𝐶 be a vector of 𝑛𝐶 nonnegative slack variables, 
defined as: 
𝜇𝐶 = 𝑏 − 𝐿𝜇 …………… . 3.7 . 
Let 𝐷 be the incidence matrix and 𝜇𝐶0 = 𝑏 − 𝐿𝜇0 , where𝜇0 is the 
initial marking of the Petri net. Then, it can be verified that the least restrictive 
supervisor can be implemented by a Petri net with the same set of transitions, 
having the marking 𝜇𝐶 , the initial marking 𝜇𝐶0, and the incidence matrix 
𝐷𝐶 = −𝐿𝐷……………… . . (3.8). 
That is, the closed-loop Petri net (the supervisor plus the plant Petri net) has the 
incidence matrix 𝐷𝐶𝑙 = [𝐷
𝑇 , 𝐷𝐶
𝑇 ]𝑇 and the marking 𝜇𝐶𝑙 = [𝜇
𝑇 ,𝜇𝐶
𝑇 ]𝑇 . This 
result is summarized in the following theorem: 
 
 
 
 
Chapter Three Types of Petri Nets
 
 
53 
Theorem: 
Let a Petri net with incidence matrix 𝐷 and initial marking 𝜇0 be given. 
A set of 𝑛𝐶 linear constraints 𝐿𝜇 ≤ 𝑏 are to be imposed. If 𝐿𝜇0 − 𝑏 ≤ 0 then a 
Petri net supervisor with incidence matrix 𝐷𝐶 = −𝐿𝐷 and initial marking 
𝜇𝐶0 = 𝑏 − 𝐿𝜇0enforces the constraint 𝐿𝜇 ≤ 𝑏 when included in the closed-
loop system 𝐷𝐶𝑙 = [𝐷
𝑇 , 𝐷𝐶
𝑇 ]𝑇. Furthermore, the supervision is least restrictive. 
The places of the supervisor Petri net are called control places. Note that each 
control place is in one of the place invariants described by equation (3.7). As an 
example, in Figure (3.8), the places 𝐶1 and 𝐶2 are the control places of a 
supervisor enforcing 2μ1 + μ3 ≥ 1 and 2μ2 + μ3 ≥ 1 [29]. 
3.6.2 Partially Controllable and Observable Petri Nets. 
 In a Petri net, a transition is uncontrollable if the supervisors are not 
given the ability to directly inhibit it. Otherwise, the transition is controllable. A 
transition is unobservable if the supervisors are not given the ability to directly 
detect its firing. Otherwise, the transition is observable. The firing of 
uncontrollable (unobservable) transitions corresponds to the occurrence of 
uncontrollable (unobservable) events. In our paradigm the supervisors observe 
transition firings, not markings. For instance, consider the Petri net of Figure 
(3.7). First assume that 𝑡1 is controllable and 𝑡2 is uncontrollable. This means 
that 𝑡2 cannot be directly controlled. So, in case (a) 𝑡2 cannot be directly 
inhibited; it will eventually fire. However in case (b) t2 can be indirectly 
prevented from firing by inhibiting 𝑡1. Now assume that 𝑡2 is unobservable and 
𝑡3 is observable. This means that cannot detect when 𝑡2 is fired. In other words, 
the state of a supervisor is not changed by firing 𝑡2 . However can indirectly 
detect that 𝑡2 has fired, by detecting the firing of 𝑡3 [30]. 
Chapter Three Types of Petri Nets
 
 
54 
 
Figure (3.7) Defining the controllability and observability of transitions. 
The Petri net supervisor is implemented in the form of control places 
connected to the plant Petri net. To deal with uncontrollable and unobservable 
transitions, it is necessary to ensure that no control place ever attempts to inhibit 
an uncontrollable transition enabled in the plant Petri net, and no control place 
marking is varied by firing unobservable transitions enabled in the closed-loop 
Petri net. To this end, it is sufficient to have the set of constraints satisfy the 
following relations of: 
𝐿𝐷𝑢𝑐 ≤ 0 ………… . . (3.9). 
𝐿𝐷𝑢0 = 0 …………… (3.10). 
Where 𝐷𝑢𝑐 = 𝐷(・, 𝑇𝑢𝑐 ) and 𝐷𝑢0 = 𝐷(・,𝑇𝑢0) are the restrictions of 
the incidence matrix 𝐷 to the columns corresponding to the set of uncontrollable 
transitions 𝑇𝑢𝑐 and to the columns corresponding to the set of unobservable 
transitions 𝑇𝑢0. All sets of constraints 𝐿𝜇 ≤ 𝑏 satisfying equations (3.9), (3.10) 
may be enforced as in Fully Controllable and Observable Petri Nets. The 
relation (3.9) ensures that there is no arc from a control place of the supervisor 
to an uncontrollable transition. Relation (3.10) ensures that there is no arc 
between a control place of the supervisor and an unobservable transition. 
 
Chapter Three Types of Petri Nets
 
 
55 
 
Figure (3.8) (a) Petri net; (b) closed loop. 
Example (3.3): 
Consider the Petri net of Figure (3.8a), where 𝑡1 is unobservable: 
 
 𝜇 = [1 0 1]𝑇 
 
The matrix𝐷𝑢𝑐 is empty. Assume that want to enforce (3.10) for : 
 
Then (3.10) can be transformed to the constraints 𝐿𝑎𝜇 ≤ 𝑏𝑎 , for: 
 
The closed-loop Petri net of Figure (3.8b) is obtained. The transition arcs 
of the supervisor are represented with dashed lines. The control places are C1 
and C2; they correspond to the first and second rows of 𝐿𝑎D, respectively [29]. 
3.7 Neural Petri Net. 
 In [3], they built ANN-like architectures of distributed intelligence that 
can learn from experience. The resulting Neural Petri Net (NPN) is feedforward 
network with alternating columns of places and transitions. The Petri net model 
of the perceptron is figure (3.9a). This model is called the adaptive Neural 
Processor (ANP). The ANP has adaptive weights restricted to {-1, 0, +1}, thus 
 
Chapter Three Types of Petri Nets
 
 
56 
excitatory and inhibitory inputs are taken care of and the incidence matrix of the 
Petri net can be formed. The cell body signal integrating and thresholding 
behavior is modeled by place-transition pair and (𝑃𝑖 𝑎𝑛𝑑 𝑇𝑖) presynaptic clefts 
are modeled by place-transition pairs (𝑝𝑖 𝑎𝑛𝑑𝑡𝑖) . The integrating place 
𝑃𝑖calculates the output. The threshold transition 𝑡𝑖 fires when the threshold 𝜃𝑖𝑖 is 
exceeded. The threshold transition 𝑇𝑖 can have one or more output places which 
represent axon or dendrites. The input places (𝑝𝑖 's) perform no processing, they 
have the only role of token passing which are the observations from the 
environment, the initial marking of the Petri net. Also, the input transitions( 𝑡𝑖 's) 
do not perform thresholding function. They are ordinary transitions [31]. Figure 
(3.9b) shows a two-layer network. 
 
Figure (3.9) (a) ANP model,and (b) two-layer neural Petri net. 
 
The NPN is a pure Petri Net (self –loops are not allowed). This leads to a 
feedforward architecture. The interaction of ANN with the environment is 
through the input and output places. One input transitions is connected to each 
Chapter Three Types of Petri Nets
 
 
57 
place that represents an input (token) to the network. The input place-transitions 
arc weights are fixed to 1 [31]. 
The NPN is formally defined as a 6 tuple: 
𝑁𝑃𝑁 = 𝑃, 𝑇, 𝑍, 𝐸, 𝐶, 𝑀0 …………… . . (3.11). 
Where: 
𝑃: is a set of places; 
𝑇: is a set of transitions; 
𝑍: is set of arcs, 𝑍 ⊆ (𝑃 × 𝑇) ∪ (𝑇 × 𝑃); 
𝐸: is a pattern of connectivity among places and transitions; 
𝐶: is a set of states of activation for the hidden and output layer places. The 
places are decomposed into three subnets: 
𝑃 = {𝐼𝑁𝑃𝑈𝑇, 𝐻𝐼𝐷𝐷𝐸𝑁, 𝑂𝑈𝑇𝑃𝑈𝑇}. 
𝑀0: 𝐼𝑁𝑃𝑈𝑇 → {0,1} is a mapping called initial marking. 
The resulting NPN is a feed forward network with alternating columns of 
places and transitions [31]. 
Given the set of 𝑙 input–output examples {𝑥𝑝 , 𝑦𝑝 , 𝑝 = 1, 2, 3, … . 𝑙} 
training the NPN using the Backpropagating is possible. However, certain 
restrictions on the values of arc weights (fixed and trainable) have to be 
enforced using constraints the topological structure or the pattern of 
connectivity of NPN can be represented by connectivity matrix. For the 
example NPN of figure (3.9b) this matrix is given by: 
 
 Therefore, learning involves finding the sub-matrices 𝑤, 𝜃, 𝑎𝑛𝑑 𝑣 of the 
incidence matrix [31]. 
 
Chapter Three Types of Petri Nets
 
 
58 
Example (3.4): 
The well-known n-bit parity problem which is essentially a generalization 
of the XOR problem? Figure (3.10) shows a 4-input NPN. Threshold values 
are𝜃11 = 0.5, 𝜃22 = 1.5, 𝜃33 = 2.5 and 𝜃44 = 3.5 . The incidence matrix of 
the NPN is given below [31]: 
 
 
Figure (3.10) NPN for 4-bit parity problem. 
 
 
 
Chapter Four 
Application of 
Petri Nets 
Chapter Four Application of Petri Nets
 
 
59 
4.1 Introduction. 
A system can often be broken down into subsystems. If it is required to 
describe activities of subsystems and their mutual relations, a finite automaton 
model can be cumbrous because each combination of subsystem states needs a 
separate state of the finite automaton. Petri nets can be used not only for the 
specification of discrete event dynamics behavior but also the control design 
[1]. Each human operation is modeled as a task with a start transition, end 
transition, progressive place and completed place. This chapter reviews the 
existing modeling of; The Traffic Lights and Intersection by using Timed Petri 
Net, Rapid Thermal Processing by using Supervisory Petri Net, and Fault 
Diagnosis of Electrical Control System by using Neural Petri Net. 
The control of Traffic Lights and Intersection in urban can be viewed as a 
complex discrete event system (DES). The Intersection consists of crossroads, 
sensors, and Traffic Signals. The control of the model can be done by separating 
the Intersection working into two intervals: Working, and Sleeping. Sensors are 
deposited in each lane to sense the emergency status, and they are using to 
change the cycle time of intersection. Timed Transition Petri Net is used to 
model of the Intersection for estimation of the real time system state. 
Petri nets are applied to construct a system model and synthesize a 
desired supervisor. The application of Rapid Thermal Process (RTP) in 
semiconductor manufacturing is controlled by monitoring (supervisor), and by 
using Supervision Petri Net control to design the closed loop system and that it 
is providing more safety requirements in industrial applications. 
In the section (4.4) preview application is considered important in many 
fields of electric control systems. Neural Petri Net (NPN) is used in the Fault 
Diagnosis of electric control system that is working online to detect the position 
of faults and can be used to process this danger state. 
Chapter Four Application of Petri Nets
 
 
60 
4.2 Modeling Traffic Lights and Intersection 
The aggregate behaviors of vehicles in a traffic network requires a large 
and complex model, with various modes of operation such as free flow traffic, 
saturated/ congested traffic Jams, stop – and – go waves, etc. the use of traffic 
models gives one the chance of analyzing, predicting and controlling the 
behaviour of traffic systems. The application of control strategies allows one to 
improve some interesting traffic performance measures such as throughput, 
delay and fuel consumption. The population of a traffic system is described by 
the number of vehicles, a discrete value. Hence discrete event models can 
accurately describe the behavior of traffic systems [13]. 
4.2.1 Modeling Traffic. 
 Different approaches to modeling traffic flow can be used to explain 
phenomena specific to traffic, like the spontaneous formation of traffic jams. 
There are two common approaches for modeling traffic; macroscopic and 
microscopic models. 
4.2.1.1 Macroscopic Models. 
 Macroscopic traffic models are based on gas-kinetic models and use 
equations relating traffic density to velocity. These equations can be extended 
with terms for build-up and relation of pressure to account for phenomena like 
stop-and-go traffic and spontaneous congestions. Although macroscopic models 
can be tuned to simulate certain driver behaviors, they do not offer a direct, 
flexible, way of modeling and optimizing them [32]. 
4.2.1.2 Microscopic Models. 
 In contrast to macroscopic models, microscopic traffic models offer a 
way of simulating various driver behaviors. A microscopic model consists of an 
infrastructure that is occupied by a set of vehicles. Each vehicle interacts with 
Chapter Four Application of Petri Nets
 
 
61 
its environment according to its own rules. Depending on these rules, different 
kinds of behavior emerge when groups of vehicles interact [32]. 
4.2.2 Modeling of Traffic Signal. 
 The most usual way to control real traffic systems is through traffic 
lights. A traffic light can be seen as a discrete event system whose state can be 
red, green, or yellow. In our model a traffic light is modeled as a Timed 
Transition Petri Net. As in figure (4.1), the traffic light's three possible settings 
are illustrated by three places(𝑝1, 𝑝2, 𝑝3); where 𝑝1is representing the red light 
and 𝑝2 is the yellow light and 𝑝3 is the green light. The three possible light 
changes are shown by three transitions,𝑡1, 𝑡2, 𝑡3 . Those transitions represent 
changes the token (event) by time-where the time is associated with transition. 
The transition 𝑡1is not time transition Petri net. It is Immediate transition can be 
controlled by condition. And 𝑡2, 𝑎𝑛𝑑 𝑡3, are time transition Petri net. Where 
work to change the token from 𝑝3(green) to 𝑝2 (yellow) and 𝑝1(red) by Timing 
instant. In each lane consist of two traffic signals and can be modeled as in 
figure (4.2). 
 
Figure (4.1) Modeling of Traffic signal. 
Imagine now that to model the traffic lights at the crossing of two one-
way streets or three or four one-way street. In the case of two one-way streets, 
Chapter Four Application of Petri Nets
 
 
62 
two sets of traffic lights that interact in such a way that one of the two is always 
red. The Petri net shown in figure (4.1) needs to duplicate. Each set of lights is 
modeled using three places and three transitions. Therefore add extra 
places 𝑝6 , 𝑎𝑛𝑑 𝑝7,which ensure that one of the two sets of lights is always at 
red as in figure (4.3). 
 
Figure (4.2) Modeling in two traffic signals. 
When both traffic lights are red, there is a token in one of the places 
𝑝6, 𝑝7. As one of set of lights changes to green, the token is removed from one 
of places 𝑝6, 𝑝7 and so other set is blocked. Only when both sets of lights are 
again red is the other able to change to green once. By using Timed Petri nets 
can be modeled traffic signal in real time. Where some transitions are can be 
associated with delay times. By internal timer, this timer is set to the current 
delay value after the transition is enabled. Then, the timer is decremented until 
it reaches the value zero, at this point the transition fires. Continue mechanism 
of transition, or Restart mechanism by generated values when needed or by 
algorithm to compute the time of transition that needed for green time (Go time) 
in the cycle time of intersection and the result can be a reduced time delay of 
vehicles (cars) in the lane. The timed transition modeled in traffic signal is 
transition (𝑡2, 𝑡3) as in figure (4.1). 
Chapter Four Application of Petri Nets
 
 
63 
 
Figure (4.3) Modeling for synchronization for two traffic lights. 
4.2.3 Modeling of Intersection. 
Before Modeling of the Intersection most learn compute or found the 
cycle time must to run the intersection or by another expression the cycle time 
needed for turn the tokens between places that represented Red, Yellow, or 
Green. More methods to design the intersection and compute cycle time. In this 
research, using Quick estimation Method for signalized intersections to design 
the model of intersection. The requirements can be into study the traffic and 
intersections. 
4.2.4 Signal Timing Design. 
 The design for operation of a traffic signal is a complex process involving 
three important decisions: type of signal controller to be used, phase plan to be 
adapted, and allocation of green time among the various phases [33]. 
1. Type of signal controller. 
 Traffic engineering reference books describe three types of traffic 
signal controllers: pretimed, fully actuated, and semiactuated. Pretimed 
controllers have a preset sequence of phases displayed in repetitive order. 
Each phase has a fixed green time and change interval that is repeated in 
each cycle to produce a constant cycle length. Fully actuated controllers 
Chapter Four Application of Petri Nets
 
 
64 
operate with timing on all approaches being influenced by vehicle 
detectors. Each phase is subject to a minimum and maximum green time, 
and some phases may be skipped if no demand is detected. The cycle 
length for fully actuated control will vary from cycle to cycle. 
Semiactuated controllers operate with some approaches (typically on the 
minor street) having detectors. The earliest form of semiactuated control 
was designed to maintain the green on the major street in the absence of a 
minor-street actuation. Once actuated, the minor-street green is displayed 
for a period just long enough to accommodate the traffic demand [33]. 
2. Phase plans. 
The most critical aspect of any design of signal timing is the 
selection of an appropriate phase plan. The phase plan comprises the 
number of phases to be used and the sequence in which they are 
implemented. As a general guideline, simple two-phase control should be 
used unless conditions dictate the need for additional phases. Because the 
change interval between phases contributes to lost time in the cycle, as 
the number of phase's increases, the percentage of the cycle made up of 
lost time generally also increases. Figure (4.4) shows a number of 
common phase plans that may be used with either pretimed or actuated 
controllers [32], [33]. 
3. Allocation of green time. 
The average cycle length and effective green time for each lane 
group must be defined. The most desirable way to obtain these values is 
by field measurement; however, there are many cases in which field 
measurement is not possible. A procedure for estimating the signal timing 
characteristics is therefore an important traffic analysis tool. Such a 
procedure is also useful in designing timing plans that will optimize some 
aspects of the signal operation. In this respect, pretimed and actuated 
control must be treated differently because the design and analysis 
Chapter Four Application of Petri Nets
 
 
65 
objectives are different. For pretimed control, the objective is to design an 
implementable timing plan as an end product. In traffic-actuated control, 
the timing plan is generated by the controller itself on the basis of 
operating parameters that are established for each phase. This operation 
creates two separate objectives for traffic-actuated control [32]. 
 
Figure (4.4) Phase plans for pretimed and traffic-actuated control. 
4.2.5 Objective of signal timing. 
 The major objectives of a signal timing plan are the minimization of 
delay and congestion of intersections and within block lengths and series of 
block lengths, and the increase in safety for all road users. Full utility of traffic 
control signals is realized only when they are operated so as to satisfy, as nearly 
as possible, actual traffic requirements. 
 In general, short cycle lengths are desirable, because the delay to standing 
vehicles is reduced. Cycle lengths ordinarily fall between 30 and 120 seconds, 
but good practice dictates the selection of a total time cycle in the range from 35 
Chapter Four Application of Petri Nets
 
 
66 
to 50 seconds for a simple right-angled intersection where the intersection 
roadways are of average width (30 to 40 feet) and traffic volumes are not 
extremely heavy. Where intersecting streets are wider, necessitating longer 
pedestrian crossing time or volumes extremely heavy or turning interferences 
substantial, the cycle will be between 45 and 60 seconds long. Three street 
intersection cycles, or three-phase operation, will range from 55 to 80 seconds. 
Heaving volumes require longer cycle lengths because the sum of the "Go" or 
green intervals must be greater to gain sufficient capacity. The sum of "go" 
intervals is a higher percentage of a cycle length with longer cycles since 
clearance times remain essentially fixed [32]. 
4.2.6 Modeling Traffic Signals and Intersection. 
By using Quick estimation input worksheet in figure (4.5). A traffic light 
ruling on intersection with four crossing lanes EB, WB, NB, and SB (East 
Band, West Band, North Band, and South Band). This procedure can be used 
when only minimal data are available for the analysis and only approximate 
results are desired. The quick estimation method consists of six steps: assembly 
of the input data, determination of left-turn treatment, lane volume 
computations, estimation of signal timing plan, calculation of the critical 𝑣/𝑐 
ratio, and calculation of average vehicle delay. 𝑣/𝑐 is represented Volume to 
Capacity Ratios [32]. The worksheet in figure (4.5) can model four sections and 
on intersection in which the traffic is regulated by traffic lights like the one in 
figure (4.3). A given phase is active when its corresponding place is marked. 
Figure (4.6) represent design of traffic system shown in figure (4.5). Table (4.1) 
is a description of places in modeling intersection, while table (4.2) is a 
description of transitions. 
Chapter Four Application of Petri Nets
 
 
67 
 
 Figure (4.5) Worksheet of Intersection. 
 
Chapter Four Application of Petri Nets
 
 
68 
 
Figure (4.6) Petri net Modeling of Intersection. 
 
 
ChapterFour Application of Petri Nets
 
 
69 
Table (4.1) Description of Places in figure (4.6). 
Place Description 
𝒑𝟏,𝒑𝟔, 𝒑𝟏𝟏,𝒑𝟏𝟔 Represented the Red light. 
𝒑𝟐,𝒑𝟕, 𝒑𝟏𝟐,𝒑𝟏𝟕 Represented the Yellow light. 
𝒑𝟑,𝒑𝟖, 𝒑𝟏𝟑,𝒑𝟐𝟐 Represented the Green light. 
𝒑𝟐𝟏,𝒑𝟐𝟒, 𝒑𝟐𝟕,𝒑𝟑𝟎 Represented controlling for moving tokens between lights 
signals. 
𝒑𝟐𝟐,𝒑𝟐𝟓, 𝒑𝟐𝟖,𝒑𝟑𝟏 
 
Represented buffer to keeping the token where waiting 2 units 
to repeat the organization of system. 
𝒑𝟐𝟑,𝒑𝟐𝟔, 𝒑𝟐𝟗,𝒑𝟑𝟐 
 
Using the enabling to another light signal or using to make the 
lights signals working as a synchronization. 
𝒑𝟒,𝒑𝟗, 𝒑𝟏𝟒,𝒑𝟏𝟗 
 
Using after interval working the lights signals for the 
intersection (interval of sleeping) where using as controlling to 
flip-flop of Yellow light. 
𝒑𝟓,𝒑𝟏𝟎, 𝒑𝟏𝟓,𝒑𝟐𝟎 Using to help of work the Yellow light flash. 
𝒑𝟑𝟗 Using as buffer to keep token that using to count the working 
interval. 
𝒑𝟒𝟒 
 
Using as Intermediate place that moving token to the counter of 
sleeping interval. 
𝒑𝟒𝟎,𝒑𝟒𝟏, 𝒑𝟒𝟐,𝒑𝟒𝟑 
 
Using as buffers and using as enable to push tokens that 
coming from places (𝑝21 , 𝑝24 , 𝑝27 , 𝑝30). 
𝒑𝟒𝟓 Using as summing point to keep tokens. 
𝒑𝟒𝟔 
 
Using as media to change path of system and enabling to five 
tokens from transition ( 𝑡42). 
𝒑𝟒𝟕 Using as enabling to repeat tokens to places (Red light). 
 
 
Chapter Four Application of Petri Nets
 
 
70 
Table (4.1) Continued. 
Place Description 
𝒑𝟒𝟖 
 
Can using as buffer to keep token until enough the time delay 
of transition ( 𝑡44 ) and represent the time at wait (sleeping 
interval). 
𝒑𝟓𝟎 Using as buffer to end of the interval of sleeping. 
𝒑𝟓𝟏 
 
Using as buffer in the path of tokens that work as enabling to 
push the tokens from places (Yellow flash). 
𝒑𝟓𝟑 Using as summing point to sum the tokens from transitions. 
𝒑𝟑𝟑,𝒑𝟑𝟒𝒑𝟑𝟓, 𝒑𝟑𝟔 Using as buffer to keep tokens from sensor the road 
(Transition). 
𝒑𝟑𝟕 
 
Using as enabling to sum the tokens from light signals (as 
enabling with capacity (1)) and change the cycle Traffic system 
to response of emergencies. 
𝒑𝟑𝟖 Using as buffer to move the tokens and repeated to cycle 
Traffic system. 
𝒑𝟓𝟐 
 
Using as enabling to sum tokens from places after ending of 
interval sleeping. 
𝒑𝟓𝟒 
 
Place with capacity (1) using to prevent the state emergency in 
sleeping interval. 
 
 
 
 
 
Chapter Four Application of Petri Nets
 
 
71 
Table (4.2) Description of Transitions in figure (4.6). 
Transition Description 
𝒕𝟏, 𝒕𝟕, 𝒕𝟏𝟑, 𝒕𝟏𝟗 Using to moving tokens from Red lights (places) to Green 
lights (places). 
𝒕𝟑, 𝒕𝟗, 𝒕𝟏𝟓, 𝒕𝟐𝟏 These Timed transitions with delay time (23 units); after 
ending the delay that moving tokens from Green light (places) 
to Yellow light (places). 
𝒕𝟐, 𝒕𝟖, 𝒕𝟏𝟒, 𝒕𝟐𝟎 These Timed transitions with Delay Time = 5 unit after 
ending the Delay that moving tokens from Yellow light 
(places) and deposit to Red light (places),(𝑝21 , 𝑝24 , 𝑝27 , 𝑝30), 
and (𝑝22 , 𝑝25 , 𝑝28 , 𝑝31). 
𝒕𝟓, 𝒕𝟏𝟏, 𝒕𝟏𝟕, 𝒕𝟐𝟑 Timed Transitions with Delay Time =2 units using as flash 
yellow in the interval sleeping. 
𝒕𝟒, 𝒕𝟏𝟎, 𝒕𝟏𝟔, 𝒕𝟐𝟐 Timed Transitions with Delay Time=2 units after ending the 
Delay that moving tokens from ( 𝑝22 , 𝑝25 , 𝑝28 , 𝑝31 ) to 
(𝑝23 , 𝑝26 , 𝑝29, 𝑝32). 
𝒕𝟔, 𝒕𝟏𝟐, 𝒕𝟏𝟖, 𝒕𝟐𝟒 Is Immediate Transitions between Yellow places, buffer place, 
and control yellow places. 
𝒕𝟑𝟕 Timed Transition with Delay Time = (18*60*60) units using 
as counter at Working Interval. 
𝒕𝟑𝟖, 𝒕𝟑𝟗, 𝒕𝟒𝟎, 𝒕𝟒𝟏 Immediate Transitions that summing tokens from 
(𝑝21 , 𝑝24 , 𝑝27 , 𝑝30). 
𝒕𝟒𝟐 Immediate Transitions to push token from places (𝑝46 , 𝑝45) to 
(𝑝21 , 𝑝24 , 𝑝27 , 𝑝32). 
𝒕𝟒𝟑 Immediate Transitions to moving tokens from ( 𝑝44 ) and 
(𝑝1 , 𝑝6, 𝑝11 , 𝑝16) to (𝑝49, 𝑝48). 
 
Chapter Four Application of Petri Nets
 
 
72 
Table (4.2) Continued. 
Transition Description 
𝒕𝟒𝟔 Immediate Transitions between ( 𝑝47 ) to ( 𝑝44 ) and ( 
𝑝1 , 𝑝6 , 𝑝11 , 𝑝16) Red places. 
𝒕𝟒𝟕 Immediate Transition to push token from ( 𝑝50 ) and 
( 𝑝5, 𝑝10 , 𝑝15 , 𝑝20 ) in Yellow flash to ( 𝑝39 ) (working 
interval) and (𝑝51) that represent to buffer. 
𝒕𝟒𝟖 Immediate Transition to push token from ( 𝑝51 ) and 
(𝑝2, 𝑝7, 𝑝12 , 𝑝17) Yellow places to (𝑝52). 
𝒕𝟓𝟎, 𝒕𝟒𝟗, 𝒕𝟓𝟏, 𝒕𝟓𝟐 Immediate Transitions to moving tokens from 
(𝑝23 , 𝑝26 , 𝑝29, 𝑝32) to (𝑝53). 
𝒕𝟓𝟑 Immediate Transition to push token from (𝑝53) to (𝑝47). 
𝒕𝟐𝟓, 𝒕𝟐𝟕, 𝒕𝟐𝟗, 𝒕𝟑𝟏 Immediate Transitions where these called source 
transition to used to sense the emergency states. 
𝒕𝟐𝟔, 𝒕𝟐𝟖, 𝒕𝟑𝟎, 𝒕𝟑𝟐 
 
 
 
 
Immediate Transitions used as : 
-to push from 𝑝33 , 𝑝38 to𝑝21 , 𝑝24 , 𝑝27 , 𝑝32 . 
-to push from 𝑝34 , 𝑝38 to𝑝24 , 𝑝23 , 𝑝27 , 𝑝30 . 
-to push from 𝑝35 , 𝑝38 to𝑝21 , 𝑝26 , 𝑝27 , 𝑝30 . 
-to push from 𝑝36 , 𝑝38 to𝑝21 , 𝑝24 , 𝑝30 , 𝑝29. 
𝒕𝟒𝟒 Timed Transition with Delay Time = (6*60*60) units 
using as counter at Sleeping Interval. 
𝒕𝟑𝟒, 𝒕𝟑𝟓, 𝒕𝟑𝟔, 𝒕𝟑𝟑 Immediate Transition using to moving tokens from cycle 
in The Traffic system and summing in token and to send 
the sensor that is enable to change the cycle at Traffic. 
 
 
Chapter Four Application of Petri Nets
 
 
73 
Table (4.2) Continued. 
Transition Description 
𝒕𝟒𝟓 
 
Immediate Transition Enable and firing in Sleeping 
interval tokens to control yellow places. 
𝒕𝟓𝟒, 𝒕𝟓𝟓, 𝒕𝟓𝟔, 𝒕𝟓𝟕, 𝒕𝟓𝟖 Immediate Transition using to prevent any emergency 
state occurring. 
 
4.2.7 Controlling of Traffic Lights in Intersection. 
The intersection in figure (4.5) is consisting of four lanes crossing, four 
Traffic signals. The modeling of Intersection is representing Traffic signal as a 
duplicate for each side of road. In figure (4.6) model of intersection is designed 
by using methods in design, analysis, and controlling for work intersections in 
the field of Traffic Engineering. Using in modeling of intersection Timed 
Transition Petri net (TTPN). Figure (4.6) consists of place and Transition that 
explained in Table (4.1) and Table (4.2). The modeling is able to running tasks 
for each lane and synchronizations by Time. This Time is evaluated and divided 
by using cycle Timing length for intersection explained in work sheet (figure 
(4.5) that contains the values of minimum and maximum of cycle Time), which 
evaluated by using equations and analysis in Traffic Engineering for ways. The 
cycle Timing length depends on components as Density (That represented 
number of vehicles per hours), number of phasing, and width of street, etc. The 
modeling in figure (4.6) is designed by using HPsim (2001) program. The net 
for modeling consist of (54) place, (58) Transitions, and (216) arcs. 
 
 
 
Chapter Four Application of Petri Nets
 
 
74 
The model work is described in the following: 
(1) In the start working of the net: 
(i) To start the time delay associated with transition (𝑡37 ) to clock 
down to become the value of time delay (64800 units) equal to 
zero. The net begin to work in interval which is called (Working 
interval) that work to change and control the lanes in the 
intersection. 
(ii) After timing is divided in cycle time which working to enable of 
transitions in Traffic signal, and clock down of timed transition in 
the model. The traffic lights are changed from Red to Green then to 
Yellow and back to Red when the delaytime associated with 
transition is finished. 
(iii) After ending of time delay (5 units) associated with transition (𝑡2) 
between Yellow place, and Red place, and place ( 𝑝21 ) (that 
represent buffer between transition (Yellow-Red) and place 
enabling) fire token and it is deposited to (𝑝22) (Enable place), and 
to (𝑝1) (Red place). 
(iv) The time delay (2 units) associated with transition (𝑡4) is finished 
(this transition using as to repeat organization of paths after 
moving token to another traffic signal, or avoid occurrences in the 
intersection), fire token to the place (𝑝23 ). This fire token is 
enabling to other traffic signal and begin the cycle which is 
followed to the Traffic signal start from new. 
(v) The immediate transition (𝑡7), firing token and deposit it to place 
(Green place) and place (𝑝21) (attach with previous Traffic signal) 
that using for controlling Traffic lights in the signal. The token in 
place Green place (𝑝8); the timed transition (𝑡9) associated with 
delay time (23 units), clock down reach to value zero, and fire 
Chapter Four Application of Petri Nets
 
 
75 
token to place Yellow place (𝑝7). The work of the model continues 
as the same as explained in step (iii). 
(vi) The counter of working interval still count to the end of time 
interval in the Intersection. 
(vii) During the work of this cycle, it is possible for the emergency 
states to occur in running of cycle time to the intersection. These 
states are represented Police cars, Relieving cars and Assuaging 
cars. The solution of emergency states is opening the way to these 
cars. 
(viii) The immediate transitions (𝑡25 , 𝑡27 , 𝑡29, 𝑡31 ) as source transitions 
that sense any event occurs by representing the emergency cases, 
and change the cycle of traffic signals (crossing) to the Green light, 
or running the Go interval of that lane which contain the 
emergency state and continuous the work from these lane in the 
intersection. 
(2) Time delay that is associated with transition (𝑡37) is equal to zero. The 
Working interval is ended and starts the Sleeping interval. Token is fired 
and it is deposited to place ( 𝑝44 ) that connect with immediate 
transition (𝑡43). And push tokens from Red places (𝑝1 , 𝑝6 , 𝑝11 , 𝑝16), and 
fires these token to places (𝑝49 , 𝑝48 ), and (𝑝40 , 𝑝41 , 𝑝42 , 𝑝43 ). Places 
( 𝑝40 , 𝑝41 , 𝑝42 , 𝑝43 ) are represented buffer and enabling places that 
connects with transitions (𝑡38 , 𝑡39 , 𝑡40 , 𝑡41) . These transitions are 
connecting with places ( 𝑝21 , 𝑝24 , 𝑝27 , 𝑝30 ) (that representing places 
condition to work in the cycle of intersection). The works of transitions 
(𝑡38 , 𝑡39 , 𝑡40 , 𝑡41) are pushing token from places conditions (that 
representing enable of move token between traffic signals in intersection). 
These transitions are fire tokens to place (𝑝45) that it is having capacity 
bounded and that using as buffer. Place (𝑝45) is connects with transition 
Chapter Four Application of Petri Nets
 
 
76 
(𝑡42) by arc (with weight (3)). In place (𝑝49) using to run the interval of 
Sleeping. Sleeping interval is working as Yellow Flash in each traffic 
signal. Place (𝑝48) is using as buffer for timed transition (𝑡44) (associated 
with time delay (9600 units)). Transition (𝑡44) is counted down to equal 
the zero (starting interval of Working). 
(3) Yellow flash is working, after starting the interval of Sleeping. After 
coming the token from (𝑝40), the transition (𝑡35) is fired tokens to places 
(𝑝4, 𝑝9, 𝑝14 , 𝑝19) . These places are connected with timed transition 
(𝑡5, 𝑡11 , 𝑡17 , 𝑡23) (associated with time delay (2 units)). Transitions 
(𝑡5, 𝑡11 , 𝑡17 , 𝑡23) are using to connect between Yellow 
places(𝑝2, 𝑝7 , 𝑝12 , 𝑝17) and places(𝑝5, 𝑝10 , 𝑝15 , 𝑝20). These transitions are 
working in Yellow flash of each traffic signal after firing transitions 
(𝑡6, 𝑡12 , 𝑡18 , 𝑡24) (with delay time (2 units) in each one). 
(4) Through the work of the model in sleeping interval, it's possible the 
sensors sense of emergency states in each lane of the intersection. By 
using place (𝑝54) that is marking after firing transition (𝑡37) (timed 
transition). Place (𝑝54) is connects with transitions (𝑡54 , 𝑡55 , 𝑡56 , 𝑡57 , 𝑡58) 
(these are connect with places (𝑝33 , 𝑝35 , 𝑝36 , 𝑝37 , 𝑝38)) to avoid the failed 
state through the working of Yellow flash in Sleeping interval. Place 
(𝑝54) is connects with transition (𝑡44) also which is using as another 
condition to control of firing it. 
(5) Sleeping interval is ended. The transition (𝑡44 ) is fired token to place 
(𝑝40 ) and immediate transition (𝑡47 ). The transition (𝑡47 ) is enabled 
because places (𝑝5, 𝑝10 , 𝑝15 , 𝑝20) are marking that connects with it. Places 
(𝑝5, 𝑝10 , 𝑝15 , 𝑝20) are used to enabling of Yellow Flash work. It is fires 
tokens to places (𝑝39 , 𝑝51) (where (𝑝39) as buffer to working interval), 
controlling place (𝑝51 ) is using with places (𝑝2, 𝑝7, 𝑝12 , 𝑝17 ) (Yellow 
places). Place (𝑝51) is connects with transition (𝑡48) to sum token and it is 
Chapter Four Application of Petri Nets
 
 
77 
fires to place (𝑝53). Place (𝑝53) is connects with transition (𝑡53) is fires 
token to place (𝑝47) after is enabling. The transition (𝑡46) is fires tokens 
to Red places (𝑝1, 𝑝6, 𝑝11 , 𝑝16), and place (𝑝46). Place (𝑝46) is using as 
buffer and enabling to transition (𝑡42 ) that it is fires tokens to places 
(𝑝21 , 𝑝24 , 𝑝27 , 𝑝32 ) (these places are represent the initial cycle of the 
intersection). 
4.2.8 Analysis of Modeling. 
 Figure (4.6) can be analyzed by using the program explained in appendix 
(A), and the result of analysis shown in the appendix (A). Steps of analysis are: 
1. A Petri net under assumption is drawn in graphical editor PM Editeur. 
2. Save as the modeling in the form ('filename.rdp'). 
3. Using the functions in the appendix (A) as representing inputs and output 
of the model are: 
(i) Number of places, number of transitions, and number of arcs. 
(ii) 𝑊 that represent input transition matrix. 
(iii) 𝑊1 that represent output transition matrix. 
(iv) 𝐴 incidence matrix. 
(v) The P-invariant. 
 Figure (4.7) is viewing Marking of the model is explained in figure (4.6). 
It is explaining distribution tokens in places where x-axis is represents index of 
places, and y-axis is represents initial marking of each place in figure (4.6). 
Timed Transition is explained in figure (4.8). X-axis is represents index of 
transition, and y-axis is represents delay time that associated with each 
transition in model is viewed in figure (4.6). 
 
 
Chapter Four Application of Petri Nets
 
 
78 
 
Figure (4.7) Marking of Intersection model. 
 
Figure (4.8) Timed Transition of model in figure (4.6). 
Chapter Four Application of Petri Nets
 
 
79 
4.2.9 Petri Net Model versus Other Models. 
 Macroscopic models depend on the design of three variables which are 
velocity, density, and volume. These parameters are used to design models of 
traffic systems. Model is design by considering only two parameters i.e. by 
using velocity and density, or volume and density, or velocity and volume. 
Designing the Macroscopic model is primary depending on the behaviour of 
street. Microscopic models are interacting with three elements which are; (1) the 
driver elements (age, sex, the vision degree, the learning degree, etc.); (2) the 
vehicle elements (motor power, width, length, height, etc.); (3) the road 
elements (asperity degree of the road, the mile, ability of the gambit, etc.). 
These elements should be used to design Microscopicmodel. Microscopic 
model is considered more effective in working than Macroscopic model, but the 
software and the design that been used in the Microscopic model are more 
complex than Macroscopic model. Petri Net is more flexible than the previous 
two models. Petri Net used to design the Intersection model by using signal 
timing and requirements of the Intersection designing according to Traffic 
Engineering. Signal timing is evaluated by using parameters which are 
depending on road elements, driver elements, Intersection geometry, and 
specification of road, etc. This model has many parameters and it is satisfied 
specifications and behaviors of Intersections and drivers. Petri Net has many 
properties that make the model more powerful in controlling and changing of 
the model behaviour in practical application. In [34], control the vehicle flow in 
the considered area has been viewed. It is proved that Petri nets are one of the 
methodologies for modeling, analyzing and controlling on discrete event 
system. A new approach via programmable logic controller (PLC) and Petri net 
synthesis is proposed in [34]. PLC can be linked with computer network. PLC 
has he advantages of flexibility, reliability, simpleness and small size. The PLC 
is used in the execution of automation tasks such as transfer lines, 
Chapter Four Application of Petri Nets
 
 
80 
manufacturing plants and chemical batch processes [34]. PLC can be considered 
as programming language in the execution of automation tasks while Petri net 
can be considered either graphical and mathematical tool or information stream 
to the modeling. 
4.3 Rapid Thermal Processing. 
Integrated circuits are at the heart of all electrical appliances. These are 
based mainly on semiconductor devices, which are fabricated in a sequence of 
batch chemical processes such as chemical vapor diffusion (CVD), oxidation, 
nitration, ion implantation, and annealing. Incremental improvements in 
integrated circuit technology, together with increased performance demands 
from semiconductor devices, have gradually led to requirements that the 
variation in the key quality variables be reduced and to the increased yields 
afforded by larger diameter silicon wafers. This in turn has increased the 
reliance of the microelectronics industry on advanced process control (APC) 
strategies, and to seek new fabrication methods. Thermal processes play an 
important role in the fabrication of semiconductor chips in the microelectronics 
industry. Shrinking device dimensions to the sub-micron range make stringent 
demands on the thermal processing of semiconductor wafers. The wafer should 
spend the minimal time close to the process temperature to reduce the solid-
state diffusion of do pants introduced in the previous fabrication steps. The 
drive to reduce this “thermal budget” and the tight quality demands gave birth 
to a new technology: single wafer processing (SWP). SWP systems must heat 
up and cool down quickly in order to compete economically with multi-wafer 
technology, and this has led to the development of rapid thermal processing 
(RTP) [35]. 
RTP as in figure (4.9) involves the processing of single silicon wafers, 
and is used for various processes for the manufacture of semiconductor devices, 
Chapter Four Application of Petri Nets
 
 
81 
such as rapid thermal annealing (RTA), rapid thermal oxidation (RTO), rapid 
thermal chemical vapor deposition (RTCVD) and rapid thermal nitration 
(RTN). 
A typical RTP operating cycle consists of three phases: [36] 
(1) Rapid heating to the desired operating temperature. 
 (2) The processing phase, in which temperature is held constant. 
 (3) Rapid cooling to ambient conditions. 
 
Figure (4.9) Concepts of RTP. 
Chapter Four Application of Petri Nets
 
 
82 
 
4.3.1 System Description. 
 A schematic diagram of the RTP system is shown in Figure (4.10), which 
is composed of: 
1. A reaction chamber with a door. 
2. A robot arm for wafer loading/unloading. 
3. A gas supply module with a mass flow controller and pressure controller-
I. 
4. A heating lamp module with a temperature controller. 
5. A flush pumping system with a pressure controller-II. 
 
Figure (4.10) Schematic diagram of the RTP system. 
 
Chapter Four Application of Petri Nets
 
 
83 
 
The specification of working the RTP as bellow: 
1. Load the raw wafer. 
2. Close the chamber door. 
3. Open the gas valve to supply gases with a desired gas flow rate and 
pressure of 2.8 liters per minute (lpm) and 0.5 Torr, respectively. 
4. Close the gas valve. 
5. Turn on the heating lamp to bake the wafer with a desired baking 
temperature and duration of 1000℃ and 4 seconds, respectively. 
6. Turn off the heating lamp to cool down the chamber to a desired 
temperature of less than 20℃. 
7. Turn on the flush pump with a desired pressure of less than 0.05 Torr. 
8. Turn off the flush pump. 
9. Open the chamber door. 
10. Unload the processed wafer. 
The initial state of the components in the RTP is either closed or off, except 
that the door is open. The following safety specifications and the constraints of 
supervisory plant that must be enforced throughout system operation are 
following: [37] 
1. Wafer Loading is allowed only when no wafer is in the chamber. 
2. Wafer Loading/unloading is allowed only when the door is open. 
3. The gas valve must be closed when the flush pump is applied to the 
chamber. 
4. The gas valve, heating lamp, and flush pump cannot be started when the 
door is open. 
 
 
Chapter Four Application of Petri Nets
 
 
84 
4.3.2 Modeling of Controller. 
 The specifications can be satisfied and involved in the sequence 
controller in the present automatic control mode. By applying the task-oriented 
concept, the PN model for the automatic control mode of the RTP is constructed 
as shown in Figure (4.11), which consists of 26 places and 20 transitions. The 
description of places and transitions are shown in table (4.3) and table (4.4), 
respectively. 
Table (4.3) Description of Places to figure (4.9). 
Place Description 
𝑷𝟏 Represent the Raw wafer buffer. 
𝒑𝟐 Represent the Loading wafer. 
𝒑𝟑 Represent the Loading wafer completed. 
𝒑𝟒 Closing chamber door. 
𝒑𝟓 Closing chamber door completed. 
𝒑𝟔 Opening gas valve. 
𝒑𝟕 Mass flow controller ready. 
𝒑𝟖 Pressure controller-I ready. 
𝒑𝟗 Opening gas valve completed. 
𝒑𝟏𝟎 Closing gas valve. 
𝒑𝟏𝟏 Closing gas valve completed. 
𝒑𝟏𝟐 Turning on heating lamp. 
𝒑𝟏𝟑 Turning on heating lamp completed. 
𝒑𝟏𝟒 Temperature controller ready. 
𝒑𝟏𝟓 Turning off heating lamp. 
 
Chapter Four Application of Petri Nets
 
 
85 
Table (4.3) Continued. 
Places Description 
𝒑𝟏𝟔 Turning off heating lamp completed. 
𝒑𝟏𝟕 Turning on flush pump. 
𝒑𝟏𝟖 Turning on flush pump completed. 
𝒑𝟏𝟗 Pressure controller-II ready. 
𝒑𝟐𝟎 Turning off flush pump. 
𝒑𝟐𝟏 Turning off flush pump completed. 
𝒑𝟐𝟐 Opening chamber door. 
𝒑𝟐𝟑 Opening chamber door completed. 
𝒑𝟐𝟒 Unloading wafer. 
𝒑𝟐𝟓 Unloading wafer completed. 
𝒑𝟐𝟔 Processed wafer buffer. 
 
Table (4.4) Description of Transitions in figure (4.9). 
Transition Description 
𝒕𝟏 Represent the start loading wafer. 
𝒕𝟐 Represent the end loading wafer. 
𝒕𝟑 Start closing chamber door. 
𝒕𝟒 End closing chamber door. 
𝒕𝟓 Represent the start opening gas valve. 
𝒕𝟔 End opening gas valve. 
𝒕𝟕 Represent to start closing gas valve. 
𝒕𝟖 Represent to Pressure controller-I ready. 
 
Chapter Four Applicationof Petri Nets
 
 
86 
Table (4.4) Continued. 
Transition Description 
𝒕𝟗 Start turning on heating lamp. 
𝒕𝟏𝟎 End turning on heating lamp. 
𝒕𝟏𝟏 Start turning off heating lamp. 
𝒕𝟏𝟐 End turning off heating lamp. 
𝒕𝟏𝟑 Start turning on flush pump. 
𝒕𝟏𝟒 End turning on flush pump. 
𝒕𝟏𝟓 Start turning off flush pump. 
𝒕𝟏𝟔 End turning off flush pump. 
𝒕𝟏𝟕 Start opening chamber door. 
𝒕𝟏𝟖 End opening chamber door. 
𝒕𝟏𝟗 Represent to start unloading wafer. 
𝒕𝟐𝟎 End unloading wafer. 
 
 In the figure (4.9) description of design modeling to the RTP without 
using supervisory to keeping in the safety state in this modeling, this model can 
be called the automatic controller of the system. 
 
Chapter Four Application of Petri Nets
 
 
87 
 
Figure (4.11) The PN model for control of the RTP system. 
 
 
Chapter Four Application of Petri Nets
 
 
88 
4.3.3 The Supervisory Controller of RTP. 
 For manual control mode, the plant model is formed by disconnecting 
each pair of transitions for the tasks in Figure (4.11). In the specification model, 
Specifications (1) and (2) can be modeled as the pre-conditions of the associated 
operations, while Specifications (3) and (4) are built by using the mutual 
exclusion concept. The PN model of both the plant and specifications is 
designed by supervisory Petri net explained in figure (4.10). Where from (A) to 
(J) are represent ten controllable tasks for the RTP system. The supervisory 
places 𝑝𝑠 consist of (7) places as ( 𝑝𝑠1 for Specification (1), 𝑝𝑠2 , 𝑝𝑠3 for 
Specification (2), 𝑝𝑠4 for Specification (3), 𝑝𝑠5 , 𝑝𝑠6 , 𝑝𝑠7 for Specification (4)). 
These tasks and specification represent the safety operation to the system, and 
divided these specifications into (7) places are used to prevent undesired and 
unsafe operations on the part of controller and system operator. Corresponding 
to the descriptions for the supervisory places they are described in Table (4.5). 
At this stage, it is chosen to verify the behavioral properties of the PN model 
due to its graphical representation, ease of manipulation, and ability to perform 
structural and performance analyses. Results of analysis reveal that the present 
PN model is live and bounded. The liveness property means that the system can 
be executed properly without deadlocks, while the boundedness property means 
that the system can be executed with limited resources (e.g., limited buffer 
sizes). 
Chapter Four Application of Petri Nets
 
 
89 
 
Figure (4.12) Description of the supervisory Petri net to RTP. 
 
 
Chapter Four Application of Petri Nets
 
 
90 
Table (4.5) Description of the places of supervisor control. 
Place Description 
𝑷𝒔𝟏 Control to the chamber is empty. 
𝒑𝒔𝟐 Using to control in the chamber door is open. 
𝒑𝒔𝟑 Using to chamber door is open. 
𝒑𝒔𝟒 Represent the gas is closed/pump is off. 
𝒑𝒔𝟓 Represent the door is closed/lamp is off. 
𝒑𝒔𝟔 Represent the door is closed/gas is closed 
𝒑𝒔𝟕 Represent the door is closed/pump is off. 
 
 In this model can be describing the sub classes in the modeling shown in 
figure (4.12) can be described as points in the following: 
A. The (𝑡1 , 𝑝2, 𝑡2 , 𝑝3) used as Load wafer. 
B. The (𝑡3 , 𝑝4 , 𝑡4, 𝑝5) used as Close chamber door. 
C. The (𝑡5 , 𝑝6 , 𝑡6, 𝑝9) used as Open gas valve. 
D. The (𝑡7 , 𝑝10 , 𝑡8, 𝑝11) used as Close gas valve. 
E. The (𝑡9, 𝑝12 , 𝑡10 , 𝑝13) used as Turn on heating lamp. 
F. The (𝑡11 , 𝑝15 , 𝑡12 , 𝑝16) used as Turn off heating lamp. 
G. The (𝑡13 , 𝑝17 , 𝑡14 , 𝑝18) used as Turn on flush pump. 
H. The (𝑡15 , 𝑝20 , 𝑡16 , 𝑝21) used as Turn off flush pump. 
I. The (𝑡17 , 𝑝22 , 𝑡18 , 𝑝23) used as Open chamber door. 
J. The (𝑡19 , 𝑝24 , 𝑡20 , 𝑝25) used as Unload wafer. 
 
 
 
 
Chapter Four Application of Petri Nets
 
 
91 
The Functions of analysis the model in figure (4.10) and result is explained 
in appendix (B). Where parameters using in analysis are: 
 Dm: the input matrix as (D−), Dp : the output matrix as (D
+), m0: initial 
marking, 𝐷 : incidence matrix, 𝑝: represent place invariant, and 𝑇 : represent 
transition invariant. Reachability tree as nodes is explained in appendix (B). 
 Figure (4.13) is explaining Marking of the model in figure (4.12). This 
model is represents closed loop system. 
 
 
Figure (4.13) Marking of closed loop control in the figure (4.12). 
 
 
 
 
Chapter Four Application of Petri Nets
 
 
92 
4.4 Fault Diagnosis Application. 
Electric Control System is deployed widely in equipment and devices, 
such system has specific action for purpose of different engineering application. 
Recently with the combined technology of computer science, sensor, network 
and communication, electric control system overall performance is improved 
greatly, at the same time, the scale of the system is also becoming large, and 
system structure is tend to be more complex. Because the system is complicated 
and the number of electric component used in the system is huge, fault 
occurrence is inevitable, and the possible fault factor is complex and 
changeable, any fault in the system will result in dramatic economic loss and 
serious consequence. On the other hand, more concern is focused on the 
requirement for the electric control system safety improvement. When fault is 
avoided and reliability is improved, maintenance cost and service time will be 
reduced effectively. 
 Failure analysis and reliability for single electric component is 
investigated, while little research is carried out for the fault diagnosis and 
location from the view of the full electric control system. As the fundamental of 
the electric control system is to realize on/off function, process control, signal 
regulation and transform, logic control and protection, it is therefore in a 
dynamic and unstructured environment, hence a model-based diagnosis is very 
difficult to establish. 
4.4.1 Modeling of Fault Diagnosis. 
As for the Fault Diagnosis in Electric Control System, Neural Petri net 
model is deduced. Possible fault of electric components is treated as places, and 
corresponding fault relationship among electric components is treated as 
transition. In this way, fault diagnosis process in electric control system is 
therefore converted into relationship between places and transitions of Neural 
Chapter Four Application of Petri Nets
 
 
93 
Petri net, and after process is finished, true value for output places imply the 
condition of possible fault occurrence. Electric control system which is used for 
aerospace power supply is discussed, as shown in figure (4.14). The operation 
function for the system is divided into three separate sub systems, which are 
storage battery supply control system, external supply control system and 
generator supply control system respectively. Operation logic for each supply 
control system is as follows: [38] 
 For storage battery supply. In this case, storage battery contactor RBC 
and bus bar breaker BTB are switched on, and then bus bar REBUS, 
RGBUS, LGBUS, and LEBUS is activated. 
 For generator supply. In this case, breaker LEPC and REPC is 
disconnected respectively, and generator breaker LGB and RGB are 
switched on, and then bus bar RGBUS, REBUS, LGBUS and LEBUS is 
activated. 
 For external supply. In this case, external breaker LEPC and REPC are 
switched on, and then bus bar RGBUS, REBUS, LGBUS and LEBUS is 
activated. 
In the entire Electric Control System, possible fault condition for major 
electriccomponents of LGBUS, RGBUS,LEBUS, REBUS, LEPC, REPC, 
LGB, RGB, BTB and RBC are represented as places, the relationship between 
components are represented by transition, which is shown in figure (4.15). 
 
Chapter Four Application of Petri Nets
 
 
94 
 
Figure (4.14) Electric Control System for Power Supply. 
 
Figure (4.15) The NPN model for Fault Diagnosis of Electric Control. 
𝑤102 
𝑤14 
𝑤13 
𝑤12 
𝑤11 
𝑤101 
𝑤15 
𝑤103 
𝑤104 
𝑤105 
𝜃1 
𝜃5 
𝜃2 
𝜃3 
𝜃4 
𝑣11 
𝑣12 𝑣13 
𝑣51 
𝑣52 
𝑣53 
Chapter Four Application of Petri Nets
 
 
95 
4.4.2 Description of the Fault Diagnosis Model. 
Figure (4.15) shows two-layer network. One input transition (𝑡𝑖) is 
connected to each input place (𝑝𝑖) that represented an input (token) to the 
network. The input place-transition arc weights are fixed to 1. The thresholding 
transition 𝑇 that connected to hidden places will be established. The arc 
between hidden places and transition will have the weight with the value equal 
to 1. The weight 𝜃𝑖 in the figure (4.15) of the arc between 𝑃𝑖 − 𝑇𝑖will be fixed to 
1. The two trainable weight layers are constituted by 𝑤𝑖𝑗 and 𝑣𝑖𝑗 . The 
description of places and transitions are explained in tables (4.6), and (4.7). 
Table (4.6) Description of the places in the model of fault diagnosis. 
Place Description 
𝒑𝟏 The input place of LGBUS. 
𝒑𝟐 The input place of RGBUS. 
𝒑𝟑 The input place of LEBUS. 
𝒑𝟒 The input place of REBUS. 
𝒑𝟓 The input place of BTB. 
𝒑𝟔 The input place of RBC. 
𝒑𝟕 The input place of LGB. 
𝒑𝟖 The input place of RGB. 
𝒑𝟗 The input place of REPC. 
𝒑𝟏𝟎 The input place of LEPC. 
𝑷𝟏, 𝑷𝟐, 𝑷𝟑, 𝑷𝟒, 𝑷𝟓 Places of hidden layer. 
𝒑𝟏𝟏 The output place of storage battery supply. 
𝒑𝟏𝟐 The output place of generator supply. 
𝒑𝟏𝟑 The output place of external supply. 
 
Chapter Four Application of Petri Nets
 
 
96 
 Table (4.7) Description of the transition to the figure (4.15). 
Transition Description 
𝒕𝟏 Transition connects with place of LGBUS. 
𝒕𝟐 Transition connects with place of RGBUS. 
𝒕𝟑 Transition connects with place of LEBUS. 
𝒕𝟒 Transition connects with place of REBUS. 
𝒕𝟓 Transition connects with place of BTB. 
𝒕𝟔 Transition connects with place of RBC. 
𝒕𝟕 Transition connects with place of LGB. 
𝒕𝟖 Transition connects with place of RGB. 
𝒕𝟗 Transition connects with place of REPC. 
𝒕𝟏𝟎 Transition connects with place of LEPC. 
𝑻𝟏, 𝑻𝟐, 𝑻𝟑, 𝑻𝟒,𝑻𝟓 Transitions connect with places in the hidden layer. 
 
The set of 𝐾 input-output 𝑥𝑖 ,𝑦𝑖 , 𝑖 = 1,2,… . . , 𝐾 samples training NPN by 
using Backpropagation type rule. The inputs and outputs of figure (4.15) are: 
𝑥1 = (𝐿𝐺𝐵𝑈𝑆, 𝑅𝐺𝐵𝑈𝑆, 𝐿𝐸𝐵𝑈𝑆, 𝑅𝐸𝐵𝑈𝑆, 𝐵𝑇𝐵, 𝑅𝐵𝐶, 𝐿𝐺𝐵, 𝑅𝐺𝐵, 𝑅𝐸𝑃𝐶, 𝐿𝐸𝑃𝐶)
𝑇
= (0,0,0,0,0,0,1,1,1,1)𝑇 . 
𝑦1 = (storage battery supply, generator supply, external supply)
T
= (1,0,0)T . 
 𝑥2 = (𝐿𝐺𝐵𝑈𝑆, 𝑅𝐺𝐵𝑈𝑆, 𝐿𝐸𝐵𝑈𝑆, 𝑅𝐸𝐵𝑈𝑆, 𝐵𝑇𝐵, 𝑅𝐵𝐶, 𝐿𝐺𝐵, 𝑅𝐺𝐵, 𝑅𝐸𝑃𝐶, 𝐿𝐸𝑃𝐶)
𝑇
= (0,0,0,0,1,1,0,0,1,1)𝑇 . 
𝑦2 = (storage battery supply, generator supply, external supply)
T
= (0,1,0)T . 
 
Chapter Four Application of Petri Nets
 
 
97 
𝑥3 = (𝐿𝐺𝐵𝑈𝑆, 𝑅𝐺𝐵𝑈𝑆, 𝐿𝐸𝐵𝑈𝑆, 𝑅𝐸𝐵𝑈𝑆, 𝐵𝑇𝐵, 𝑅𝐵𝐶, 𝐿𝐺𝐵, 𝑅𝐺𝐵, 𝑅𝐸𝑃𝐶, 𝐿𝐸𝑃𝐶)
𝑇
= (0,0,0,0,1,1,1,1,0,0)𝑇 . 
𝑦3 = (storage battery supply, generator supply, external supply)
T
= (0,0,1)T . 
 After training, the weights of the model in the figure (4.12) are decrypted 
in the table (4.8). 
Table (4.8) Description of the weights in figure (4.12). 
Node Connection Weight Node Connection Weight 
1 
1 
1 
1 
1 
1 
1 
1 
1 
1 
2 
2 
2 
2 
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
1 
2 
3 
4 
0.04519 
-0.23124 
0.15183 
0.26706 
1.18091 
0.87157 
-0.09321 
0.22652 
-1.04460 
-0.85331 
-0.27454 
0.10156 
0.25835 
-0.19055 
2 
2 
2 
2 
2 
2 
3 
3 
3 
3 
3 
3 
3 
3 
3 
3 
5 
6 
7 
8 
9 
10 
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
0.33095 
0.23143 
-0.09773 
-0.04448 
-1.05115 
-0.63375 
0.20315 
-0.00687 
0.14750 
-0.20742 
0.20414 
0.27789 
-0.15094 
0.09661 
1.29033 
0.88962 
 
 
Chapter Four Application of Petri Nets
 
 
98 
Table (4.8) Continued. 
Node Connection Weight Node Connection Weight 
4 
4 
4 
4 
4 
4 
4 
4 
4 
4 
5 
5 
5 
5 
5 
5 
5 
5 
5 
5 
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
-0.26389 
-0.23008 
0.19106 
0.19560 
-0.59583 
-0.37235 
0.59905 
0.10005 
-0.52794 
-0.52704 
-0.32833 
0.11472 
0.05162 
-0.31863 
1.11590 
0.97207 
-1.05690 
-1.04717 
0.41031 
0.29832 
1 
1 
1 
1 
1 
1 
2 
2 
2 
2 
2 
2 
3 
3 
3 
3 
3 
3 
 
1 
2 
3 
4 
5 
6 
1 
2 
3 
4 
5 
6 
1 
2 
3 
4 
5 
6 
 
-1.41823 
-1.02427 
-0.00244 
0.14718 
-1.43289 
0.37186 
0.05541 
-0.66992 
-0.34887 
-1.11723 
1.54493 
-0.43956 
1.31963 
0.68154 
-1.39861 
0.51547 
-0.73126 
0.24226 
 
 
Qnet program has been used to train this model, and the result of training 
is explained in the appendix (C). Two layers are used in model of Fault 
diagnosis. Gaussian function is used as activation function in each layer. Root 
mean square error (RMS) versus iteration of training is explained in figure 
(4.16). 
Chapter Four Application of Petri Nets
 
 
99 
 
 
Figure (4.13) RMS versus iteration of training. 
 The inputs of Networks represent the states of (LGBUS, RGBUS, 
LEBUS, REBUS, BTB, RBC, LGB, RGB, REPC, and LEPC) (the information 
from control components when fault occurs). The faults occur, the value of 
input place is 1, in contrary the value is 0. The outputs of networks represent the 
state of electric control system. If the value is 1, it means that there is a fault on 
the electric control corresponds with the output. If the value is 0, it means that 
electric control system is not faulted. 
 
 
 
 
Chapter Four Application of Petri Nets
 
 
100 
4.4.3 Neural Petri Net versus Other Petri Net Models. 
In [42], fuzzy Petri net reasoning for fault diagnosis of electric control 
system has been used. Based on fuzzy production rule, the improved fuzzy Petri 
net reasoning model has achieved by matrix parallel computation, and existing 
diagnosis knowledge are combined together to form a function matrix that is 
used to describe transfer of places and transitions in the fuzzy Petri net. Analytic 
hierarchy process (AHP) is employed to determine the initial certainty factor for 
intermediate places, which allows multiple objective factors to be considered in 
the fuzzy Petri net reasoning model. 
NPN is dealing with large and more complex systems, for example the 
time parameter, and the on-line security analysis. NPN Diagnosis only takes a 
few seconds to complete. Therefore, the result of fault diagnosis can be used for 
online control. In [42] parallel computers and complex of design are required 
while in NPN easy implementation in sequential computing can be used with 
less number of parameters. 
 
 
 
 
 
 
 
 
 
 
Chapter Five 
Conclusions and 
Future Work 
Chapter Five Conclusions and Future Work
 
 
101 
5.1 Conclusions. 
1. In the application of Traffic lights and Intersection model, advantages of 
the design are: 
i. The net is liveness, bounded structural, and Reversibility and 
Home state in the behavior properties. 
ii. The model working in real time, and insert the time delay of each 
lane accordingto cycle time in the intersection. 
iii. The bounded place ( 𝑝54 ) (capacity of place is one) prevent 
occurring error because occur more than one of state emergency in 
the same time. 
iv. This model contains two intervals (the working interval and 
sleeping interval), each interval is working lonely with different 
tasks. Each interval liveness, bounded, and reversibility behavior 
properties; and in the model there is a group of places working as a 
control to transform between intervals. 
v. This model contains conditions of safety in organization of traffic 
in intersection according to rules in Traffic Engineering. 
vi. Using timed transition that contains internal timer which the 
transition is enabled, the timer is decremented at constant speed 
until reaches the value zero, and the next do not accumulator the 
delay when tokens are travel between places, transition, and arcs. 
vii. This model is strongly connected and not affected by numbers of 
conflicts (57) in the system. 
viii. The model is dead-lock free in the sleeping interval by using place 
(𝑝54) to sum tokens of state emergency that occur in this interval. 
2. The model of intersection contains disadvantages: 
i. Modeling of system is huge because the number of places, 
transition, and arcs. The analysis of it causing error occurring. 
Chapter Five Conclusions and Future Work
 
 
102 
ii. The time associated with timed transitions is constant parameters. 
iii. Complex of control the Traffic lights and controlling it in two 
intervals (working, sleeping), and synchronization between them. 
3. The new ideas in the model of Traffic lights and Intersection are as 
following: 
i. Using timed transition Petri nets in modeling with small number of 
transition associated with delay time. 
ii. Adding the counter to count the interval of working in intersection, 
and control of working it and synchronization with another interval 
called sleeping that represent the interval of Traffic ending of 
work. 
iii. During the sleeping interval; the traffic Yellow light is turning as 
flash. 
iv. Used in the design of model pretimed system (type of signal 
controller). 
v. Adding the emergency states to the modeling. 
vi. Adding transition associated with (2 units) time delay using as to 
repeat organization in intersection to prevent occurring of 
accidents. 
4. In the literature survey of Traffic model by using Petri net, introducing a 
macroscopic model for traffic systems based on a continuous / hybrid 
Petri nets as in [13]. Another paper using model to flow of driver, and 
modeling to the Traffic signal by using Timed place Petri net and timed 
arcs, and concurrent the work of Traffic system without control 
conditions. While in this thesis modeling of intersection is introduced 
which controll by condition in real time by using timed transition and 
untimed transition. 
 
 
Chapter Five Conclusions and Future Work
 
 
103 
5. Advantages of Rapid Thermal Process are: 
i. Design supervision model (manual). 
ii. The model enforces bounded property, liveness, and safety 
constraint by restricting the commands available to human 
operators. 
iii. Plant and specifications of the system Composed by Petri net 
modeling. 
iv. Controllable tasks (A-J) for the system that represented by formed 
plant model. 
v. According to the feedback status of the located system, the 
designed supervisory guarantees that all requested commands 
satisfy the desired specifications. 
6. Disadvantage of the model is operated in sequential relation in Petri net. 
7. The new idea in the modeling of supervisor is separate the transitions and 
places to make the model are controllability. 
8. Advantages of Fault Diagnosis Electric Control System are: 
1. The NPN has a practical importance. 
2. The memory requirement is also reduced and the computations for 
NPN are greatly simplified. 
3. Backpropagation type training algorithms may be employed of 
networks. 
4. The model uses less number of parameters, so it reduces the overall 
computational complexity of the model. 
5. Fault diagnosis can be used for online control, for diagnosis only takes 
a few seconds to complete. 
6. It is easy to realize computation model for large and complex system 
that has many component need to diagnosis. 
 
 
Chapter Five Conclusions and Future Work
 
 
104 
9. Disadvantage of the model is choice number node in hidden layer and 
training of the net. 
10. The new ideas using in the model of Fault Diagnosis Electric Control 
System are: 
1. Gaussian function as the activation functions for each layer. 
2. The weights of the model are real values. 
5.2 Future Work. 
 We suggest to us Petri net in the felly fields: 
1. Using the Petri net in transformers in process in the field of Digital Signal 
Processing (as modeling to Wavelate transform, Orthogonal 
transformation, etc.). 
2. Design parallel computers by using stochastic Petri net model. 
3. Using coloured Petri net with Artificial intelligent as Neural Network. 
Because the CPN is combination of Petri nets and programming 
language, and as using with fuzzy where the result reduce the 
computation time and complexity. The resulted new model is coloured 
neural Petri net, and/or fuzzy coloured neural Petri net. 
4. Using coloured Petri net with time to consist colour timed Petri net for 
design of Intersection and traffic signals. 
5. Using continuous Petri net to design controllers between intersections in 
Network, input of designing three variables are density, speed, and flow 
to minimize the total delay of the vehicles in the system. The goal 
introducing hybrid Petri nets connects between discrete Petri net of 
intersection (as in figure (4.6)) and controlling of flow cars in road 
network by continuous Petri net. 
6. Using stochastic Petri net controller between Traffic signals in 
intersection depended on the number of vehicles in each lane. 
Chapter Five Conclusions and Future Work
 
 
105 
7. Using in the model of intersection fuzzy Petri net to reduce the delay 
timing of standing cars in each lane of Intersection and design concurrent 
system of network intersection. 
8. Using detectors in the lane and using the values from these detectors in 
equations to compute the density of each lane and evaluation the needed 
time for cycle timing in Intersection and reduce the time delay. 
9. Includes the extension of specifications to timing constraints in RTP (by 
using supervisory timed Petri net as in [9]). 
10. Using Petri net to fault diagnosis in the system of Rapid Thermal 
Processing control, and the multiple operator access. 
11. Using timed Petri net to design the model of RTP, and controlling with 
timing to reduction cycle time because the shorter product life cycles, 
decreasing technology adoption cycles, and increasing time-to-market 
pressure requires decreased development and production cycle times. 
12. Using Fuzzy Neural Petri Net for the application of electric control 
system fault diagnosis. 
 
 
 
References 
 
 
106 
 
 [1]. B. Hrúz, and M.C. Zhou, "Modeling and Control of Discrete-event 
Dynamic Systems with Petri Nets and Other Tool."; Springer-Verlag London 
Limited 2007. 
[2]. T. MURATA, "Petri nets: properties, analysis and application."; 
proceedings of the IEEE; Vol. 77, No. (4), April (1989), pp. 541-580. 
[3]. R. Zurwski, and M. Zhoy, "Petri nets and Industrial Applications: A 
Tutorial."; IEEE Transaction on Industrial Electronics. Vol. 41, No. (6) 
December (1994), pp. 567-583. 
[4]. Jin-Shyon lee, and Pou-Lo Hsu, "Applications of Petri nets to Human in the 
loop control for Discrete Automation Systems"; Manufacturing the Future, 
Concepts– Technologies – Visions, ISBN 3-86611-198-3, July (2006), pp. 167-
194. 
[5]. L. Gomes, A. Costa, J. P. Barros, R. Pais, T. Rodrigues, and R. Ferreira, 
"Petri Net based Building Automation and Monitoring System"; Copyright in 
IEEE, (2007), pp. 57-62. 
[6]. S. Laciňák, "Petri Nets Applied for Modelling of Network Control System"; 
Technical University Košice, Letná 9/A,04001 , ( 2005). 
[7]. P. E. Miyagi, and L.A.M. Riascos, "Modeling and analysis of fault-tolerant 
systems for machining operations based on Petri nets"; Escola Politecnica, 
University of Sao Paulo, Av. Prof. Mello Moraes, 2231 CEP 05508-030 Sao 
Paulo, Brazil, (2005), pp. 397-408. 
[8]. O. S. Youness, W. S. El-Kilani, and W. F. Abd El-Wahed, "A behavior and 
delay equivalent petri net model for performance evaluation of communication 
REFERENCES 
 
 
107 
protocols"; Faculty of Computers and Information, Menoufia University, Al-
Menoufia Egypt, (2008), pp. 2210-2230. 
[9]. A. Aybar, and A. Iftar, "Supervisory Controller Design for Timed Petri 
Nets"; Proceedings of IEEE/SMC international Conference on System of 
Systems Engineering, Los Angeles, CA, USA, April (2006), pp. 59-65. 
[10]. N. Chamas, L. Annebeg, and E. Yaprak, "Timed Neural Petri Nets"; 
Copyright IEEE, CH 3381,pp. 926-929, (1993). 
[11]. G. Jiroveanu, and R. K. Boel, "A distributed approach for fault detection 
and diagnosis based on Time Petri Nets"; SYSTeMS Research Group, Ghent 
University, Mathematics and Computers in Simulation , Vol. 70, (2006), pp. 
287–313. 
[12]. 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), March (2000), pp. 462-476. 
[13]. J. J. ulvez, and R. Boel, "Modelling and Controlling Traffic Behaviour 
with Continuous Petri Nets"; Supported by D.G.A. ref B106/2001 and a 
European Community Marie Curie Fellowship, CTS, contract number: HPMT-
CT-(2001)-00278. 
 
[14]. H. A. Lafta, "Supect identification using Fuzzy Petri nets"; PhD thesis, 
University of Technology, Computer Science, (2005). 
[15]. K. M. Hangos, R. Lakner, and M. Gerzson, "Intelligent Control Systems"; 
Kluwer Academic Publishers, (2004). 
[16]. A. Karatkevich, "Dynamic Analysis of Petri Net-Based Discrete Systems"; 
Springer-Verlag Berlin Heidelberg (2007). 
 
108 
[17]. C. G. Cassandras, and S. Lafortune, "Introduction to Discrete Event 
Systems", Springer Science+Business Media, LLC, (2008). 
[18]. A. Bobbio, "System Modeling with Petri Nets"; System Reliability 
Assessment, Kluwer p.c., pp. 102-143, (1990). 
 
[19]. X. Li, "Discrete Event System Modeling and Simulation"; Secci´on de 
Computacion, Departamento de Ingenier´ia El´ectrica Av.IPN 2508, A.P.14-
740, M´exico D.F., 07360, (2000), pp.1-37. 
[20]. Hsu, and C. Yen, "Introduction to Petri net Theory"; Dept. of Electrical 
Engineering, National Taiwan University, This work was supported in part by 
NSC Grant 94-2213-E-002-087, Taiwan, (2002). 
[21]. Lu, and Ning, "Power System Modeling using Petri nets"; A thesis 
submitted to the Graduate, Doctor of Philosophy, Troy university in New York 
(2002). 
[22]. W. M. Zuberek "Timed Petri Nets and Preliminary Performance 
Evaluation", Institute of Computer Science, Technical University of Warsaw, 
Copyright IEEE, (1980). 
[23]. G. Balbo, "An Introduction to Generalized Stochastic Petri Nets"; Master 
Course, Univ. di Torino, (2000). 
[24]. A. Meoen, "Introduction to Petri Net-Part Three"; Master Course, Univ. 
of Aarhus, (2003). 
 [25]. T. D. Tesi, "Timed and Stochastic Model Checking of Petri Nets", Univ. 
`A degli Studi Di Torino, Dipartimento di Informatica, C.so Svizzera, 185 - 
10149 Torino (Italia), CICLO XIX, (2007). 
[26]. A. M. K. CHENG, "Real-Time Systems Scheduling, Analysis, and 
Verification"; John Wiley & Sons, Inc., Hoboken, New Jersey, (2002). 
 
109 
[27]. E. L. Mellado, "Analysis of Discrete Event Systems by Simulation of Timed 
Petri Net Models"; Mathematics and Computers in Simulation, Vol. 61, (2002) 
pp. 53–59. 
[28]. P. J. Haas, "Stochastic Petri Nets, Modeling, Stability, Simulation"; 
Springer-Verlag New York, (2002). 
[29]. M. V. Iordache, and P. J. Antsaklis, "Supervisory Control of Concurrent 
Systems A Petri Net Structural Approach"; Birkh¨auser Boston, (2006). 
[30]. E. Villani, Paulo E. , Miyagi, and R. Vletie, "Modeling and analysis of 
Hybrid Supervisory Systems"; Springer-Verlag London Limited, (2007). 
[31]. S. I. Ahson, "Petri Net Models Of Fuzzy Neural Networks"; IEEE 
Transaction on Systems, MAN. And CYBERNETICS, Vol. 25, No. 6, pp 926-
932, (1995). 
[32]. M. Wiering, J. V. Veenen, J. Vreeken, and A. Koopman, "Intelligent 
Traffic Light Control"; Intelligent Systems Group, Institute of Information and 
Computing Sciences, Utrecht University, (2004). 
[33]. "High Capacity Manual 2000", Federal High Way Administration 
(FHWA). 
[34]. L. Lin, T. Nan, M. Xiangyang, and S. Fubing, "Implementation of Traffic 
Lights Control Based on Petri Nets"; Copyright in IEEE, (2003), pp. 1087-
1090. 
[35]. B. Lojk, "Early History of Rapid Thermal Processing"; ATMEL 
Corporation, (1989). 
 
 
110 
[36]. E. Dassau, B. Grosman, and D. R. Lewin, "Modeling and Temperature 
Control of Rapid Thermal Processing"; PSE Research Group, Dept. of 
Chemical Engineering, Technion I. I. T., 2005. 
[37]. Fair, R. B. "Rapid Thermal processing"; Science and Technology, 
NewYork: Academic, (1993). 
[38]. Y. Haiwen, Y. Haibin, and L. Xingshan. "Fuzzy Petri Nets Reasoning for 
Application of Electric Control System Fault Diagnosis"; Automation Science 
and Electrical Engineering, Beihang University, Copyright IEEE, (2006). 
 
 
 
 
 
 
 
 
 
 
Appendices 
 
 
1A- 
APPENDIX (A) 
FUNCTIONS OF TIMED TRANSITION PETRI NET. 
1. Function in analysis timed transition system in MATLAB: 
function [W,W1,A,M0,TimeT,P]=analysis2TPN(filename) 
fid = fopen(filename,'r'); 
F = fread(fid); 
s = setstr(F'); 
%********** find parameters ********** 
place=findstr(s,'NB_PLACE'); 
pla=getnum(s,place); 
transition=findstr(s,'NB_TRANS'); 
tra=getnum(s,transition); 
arc=findstr(s,'NB_ARC'); 
ar=getnum(s,arc); 
%********** find marking ********** 
xpl=findstr(s,'[P'); 
mark=findstr(s,'MARKING'); 
if ((size(xpl,2)~=size(mark,2))|(size(xpl,2)~=pla)) 
 sprintf('Places red incorrectly') 
end 
for k=1:pla 
 mar(k)=getnum(s,mark(k)); 
end 
M0=mar'; 
%********** find Time ********** 
xtta=findstr(s,'[T'); 
tim=findstr(s,'DESCRIPTION'); 
if ((size(xtta,2)+pla)~=size(tim,2)) 
 sprintf('Time red incorrectly 1') 
 
2A- 
end 
if (size(xtta,2)~=tra) 
 sprintf('Time red incorrectly 2') 
end 
for k=1:tra 
 [tti(k)]=getpnt(s,tim(k+pla)); 
end 
TimeT=tti'; 
disp('Number of transitions='); 
tra 
disp('Number of places='); 
pla 
disp('Number of arcs='); 
ar 
%********** find interconnections ********** 
xar=findstr(s,'[A'); 
p2t=findstr(s,'PLACE2TRANS'); 
sou=findstr(s,'SOURCE'); 
des=findstr(s,'DEST'); 
val=findstr(s,'VALUE'); 
W=zeros(pla,tra); 
W1=zeros(pla,tra); 
if ((size(xar,2)~=ar)|(size(p2t,2)~=ar)|(size(sou,2)~=ar)|(size(des,2)~=ar)|(size(val,2)~=ar)) 
 sprintf('Arcs red incorrectly') 
end 
for k=1:ar 
 p2(k)=getnum(s,p2t(k)); 
 so(k)=getnum(s,sou(k))+1; 
 de(k)=getnum(s,des(k))+1; 
 
3A- 
 va(k)=getnum(s,val(k)); 
 if p2(k)==1 
 W(so(k),de(k))=va(k); 
 else 
 W1(de(k),so(k))=va(k); 
 end 
 A=W-W1; 
end 
fclose(fid); 
%********************************** 
%phase 1 - initialize P 
[n,m]=size(A); 
P = eye(size(A,1)); 
CC=A; 
Csav=A; 
for j=1:m 
 POZ=find(CC(:,j)>0); 
 NEG=find(CC(:,j)<0); 
 for po=1:size(POZ,1) 
 ii=POZ(po); 
 for ne=1:size(NEG,1) 
 jj=NEG(ne); 
 al=abs(CC(ii,j))/gcd(CC(ii,j),CC(jj,j)); 
 be=abs(CC(jj,j))/gcd(CC(ii,j),CC(jj,j)); 
 CC=[CC;al*CC(jj,:)+be*CC(ii,:)];P=[P;al*P(jj,:)+be*P(ii,:)]; 
 end 
 end 
NZE=flipud(sort([POZ;NEG])); %sort in descending order 
 
4A- 
 for nze=1:size(NZE,1) 
 ii=NZE(nze); 
 CC=CC([1:(ii-1),(ii+1):size(CC,1)],:); % delete row ii 
 P=P([1:(ii-1),(ii+1):size(P,1)],:); % delete row ii 
 end 
 DEL=[]; 
 for ii=1:size(P,1) 
 if CC(ii,:)==zeros(1,m) %look just for completed invariants - this should have the same 
efect as usual condition for P-invariant P(ii,:)'*Csave=0 
 arr=find(P(ii,:)~=0); 
 q=size(arr,2); 
 if (q~=rank(Csav(arr,:))+1) 
 DEL=[DEL,ii]; 
 end 
 end 
 end 
 %delete non-minimal invariants 
 DEL=fliplr(sort(DEL)); 
 for del=1:size(DEL,2) 
 ii=DEL(del); 
% sprintf('non-minimal support invariant deleted') 
% P(ii,:) 
 CC=CC([1:(ii-1),(ii+1):size(CC,1)],:); % delete row ii 
 P=P([1:(ii-1),(ii+1):size(P,1)],:); % delete row ii 
 end 
end 
CC; 
f=1:pla; 
s=1:tra; 
figure (1) 
 
5A- 
plot(f,M0,'--rs','LineWidth',2,... 
 'MarkerEdgeColor','k',... 
 'MarkerFaceColor','g',... 
 'MarkerSize',10); 
 axis([0 55 0 1]) 
 xlabel('Place') 
 ylabel('Initial Marking'); 
 figure (2) 
 plot(s,TimeT,'--rs','LineWidth',2,... 
 'MarkerEdgeColor','k',... 
 'MarkerFaceColor','g',... 
 'MarkerSize',10); 
 %axis([0 60 0 10000]) 
 xlabel('Transition') 
 ylabel('Time'); 
2. Others function using: 
function [n] = getnum(str,i) 
%gets a number form a string containing '=' 
%skip over the text 
while strcmp(str(i),'=')==0 
 i=i+1; 
end 
i=i+1; 
j=i; %number start position 
while abs(str(i))~=13 
 i=i+1; 
end 
n=str2num(str(j:i)); 
if isempty(n) 
 
6A- 
 n=0; 
end 
function [n,m] = getpnt(str,i) 
% gets a number ans transition type from a string containing '=' 
% function [n,m] = getpnt(str,i) 
%skip over the text 
m=0; 
while strcmp(str(i),'=')==0 
 i=i+1; 
end 
i=i+1; 
if ((str(i) == 'S') | (str(i) == 's')) 
 m=2; 
 i=i+1; 
end 
if ((str(i) == 'T') | (str(i) == 't')) 
 m=1; 
 i=i+1; 
end 
j=i; %number start position 
while abs(str(i))~=13 
 i=i+1; 
end 
n=str2num(str(j:i)); 
if isempty(n) 
 n=0; 
end 
 
 
 
7A- 
3. The result of analysis: 
[W,W1,A,M0,TimeT,P]=analysis2TPN('proj.rdp') 
Number of transitions= 
tra = 
 58 
Number of places= 
pla = 
 54 
Number of arcs= 
ar = 
 216 
W = 
 Columns 1 through 14 
 1 0 0 0 0 0 0 0 0 0 0 0 0 0 
 0 1 0 0 1 0 0 0 0 0 0 0 0 0 
 0 0 1 0 0 0 0 0 0 0 0 0 0 0 
 0 0 0 0 0 1 0 0 0 0 0 0 0 0 
 0 0 0 0 1 0 0 0 0 0 0 0 0 0 
 0 0 0 0 0 0 1 0 0 0 0 0 0 0 
 0 0 0 0 0 0 0 1 0 0 1 0 0 0 
 0 0 0 0 0 0 0 0 1 0 0 0 0 0 
 0 0 0 0 0 0 0 0 0 0 0 1 0 0 
 0 0 0 0 0 0 0 0 0 0 1 0 0 0 
 0 0 0 0 0 0 0 0 0 0 0 0 1 0 
 0 0 0 0 0 0 0 0 0 0 0 0 0 1 
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
 0 0 0 0 0 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through 42 
 0 0 0 0 0 0 0 0 0 0 1 0 0 0 
 0 0 0 0 0 0 0 0 0 01 0 0 0 
 
27A- 
 0 0 0 0 0 0 0 0 0 0 1 0 0 0 
 0 0 0 0 0 0 0 0 0 0 1 0 0 0 
 0 0 0 0 0 0 0 0 0 0 1 0 0 0 
 0 0 0 0 0 0 0 0 0 0 1 0 0 0 
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
 Columns 43 through 54 
 0 0 0 0 0 0 0 1 0 0 0 1 
 0 1 0 0 0 1 0 1 0 0 0 0 
 0 1 0 0 0 0 1 0 0 0 0 0 
 0 1 0 0 0 0 1 0 0 0 0 0 
 0 1 0 0 0 0 1 0 0 0 0 0 
 0 1 0 0 0 0 1 0 0 0 0 0 
 0 0 0 0 1 0 1 0 0 1 1 0 
 0 0 0 0 1 0 1 0 0 1 1 0 
 0 0 0 0 1 0 1 0 0 1 1 0 
 0 0 0 0 1 0 1 0 0 1 1 0 
 
 
 
 
 
 
1B- 
APPENDIX (B) 
FUNCTIONS FOR SUPERVISION PETRI NET 
1. Function in analysis supervisor Petri nets in MATLAB: 
function [Dm,Dp,m0,D,p,T]=analysis2PN(filename) 
fid = fopen(filename,'r'); 
F = fread(fid); 
s = setstr(F'); 
%********** find parameters ********** 
place=findstr(s,'NB_PLACE'); 
pla=getnum(s,place); 
transition=findstr(s,'NB_TRANS'); 
tra=getnum(s,transition); 
arc=findstr(s,'NB_ARC'); 
ar=getnum(s,arc); 
%********** find marking ********** 
xpl=findstr(s,'[P'); 
mark=findstr(s,'MARKING'); 
if ((size(xpl,2)~=size(mark,2))|(size(xpl,2)~=pla)) 
 sprintf('Places red incorrectly') 
end 
for k=1:pla 
 mar(k)=getnum(s,mark(k)); 
end 
m0=mar'; 
disp('Number of transitions='); 
tra 
disp('number of places='); 
pla 
disp('Number of arcs='); 
 
2B- 
ar 
%********** find interconnections ********** 
xar=findstr(s,'[A'); 
p2t=findstr(s,'PLACE2TRANS'); 
sou=findstr(s,'SOURCE'); 
des=findstr(s,'DEST'); 
val=findstr(s,'VALUE'); 
Dm=zeros(pla,tra); 
Dp=zeros(pla,tra); 
if ((size(xar,2)~=ar)|(size(p2t,2)~=ar)|(size(sou,2)~=ar)|(size(des,2)~=ar)|(size(val,2)~=ar)) 
 sprintf('Arcs red incorrectly') 
end 
for k=1:ar 
 p2(k)=getnum(s,p2t(k)); 
 so(k)=getnum(s,sou(k))+1; 
 de(k)=getnum(s,des(k))+1; 
 va(k)=getnum(s,val(k)); 
 if p2(k)==1 
 Dp(so(k),de(k))=va(k); 
 else 
 Dm(de(k),so(k))=va(k); 
 end 
 D=Dm-Dp; 
end 
fclose(fid); 
%********************************** 
pn=getspn(Dm,Dp,[],[],m0); 
%*********************** 
pncomgraph(pn); 
 
3B- 
%********************************* 
p=invart(D); 
T=invart(D'); 
figure (1) 
plot(f,m0,'--rs','LineWidth',2,... 
 'MarkerEdgeColor','k',... 
 'MarkerFaceColor','g',... 
 'MarkerSize',10); 
 xlabel('Place') 
 ylabel('Initial Marking'); 
2. Others function using: 
function [str] = disgraph(graph) 
a = []; 
for i = 1:length(graph) 
 if length(graph{1}{1}) < 7 
 a = [a, sprintf('\nNODE %d\t %s',i, fvpr(graph{i}{1}'))]; 
 else 
 a = [a, sprintf('\nNODE %d\t ',i)]; 
 for j = 1:length(graph{1}{1}) 
 if graph{i}{1}(j) 
 a = [a, sprintf('p%d: %d; ', j, graph{i}{1}(j))]; 
 end 
 end 
 end 
 a = [a, sprintf('\n IN:')]; 
 for j = 1:length(graph{i}{2}) 
 a = [a, sprintf(' %d, t%d;', graph{i}{2}{j}.n, graph{i}{2}{j}.t)]; 
 end 
 a = [a, sprintf('\n OUT:')]; 
 
4B- 
 for j = 1:length(graph{i}{3}) 
 a = [a, sprintf(' %d, t%d;', graph{i}{3}{j}.n, graph{i}{3}{j}.t)]; 
 end 
end 
a = [a, sprintf('\n')]; 
if nargout < 1 
 disp(a); 
else 
 str = a; 
end 
function [str] = fvpr(x, sw) 
% FVPR - Transforms a vector in a string 
% [str] = fvpr(x) 
% Use the format below to print finite sets 
% [str] = fvpr(x,2) 
% Written by Marian V. Iordache, miordach@nd.edu 
if nargin == 1 
 sw = 1; 
end 
[m,p] = size(x); 
n = length(x); 
if sw == 1, op = '['; cl = ']'; 
elseif sw == 2, op = '{'; cl = '}'; end 
if n > 1 | sw == 2 
 u = [op]; 
else 
 u = []; 
end 
for i = 1:n 
 
5B- 
 z = sprintf('%g', x(i)); 
 u = [u, z]; 
 if i < n 
 u = [u, ', ']; 
 end 
end 
if n > 1 | sw == 2 
 u = [u, cl]; 
end 
if m > 1 
 str = [u, '''']; 
else 
 str = u; 
end 
function [o] = getpn(Dm,Dp,Tuc,Tuo,m0) 
if nargin == 1, [Dm, Dp] = d2dd(Dm); end 
if nargin < 1, Dm = []; Dp = []; end 
if nargin < 3, Tuc = []; end 
if nargin < 4, Tuo = []; end 
if nargin < 5, m0 = []; end 
o = struct('m0',m0,'Dm',Dm,'Dp',Dp,'Tuc',[],'Tuo',[]); 
o.Tuc = Tuc; 
o.Tuo = Tuo; 
function p = invart(D) 
%INVART(D) returns a matrix whose columns give the minimal support place 
% invariants of a petri net incidence matrix A, i.e., it returns the basis 
% for the solutions to x'A = 0, the null space of A'. 
 [n,m] = size(D); 
BC = [D eye(n)]; % BC is two matrices, B and p, p = identity at start 
 
6B- 
cc = m+1:m+n; % Columns of the p portion of the matrix. 
for j = 1:m, 
 Ip = find(BC(:,j) > 0); 
 Im = find(BC(:,j) < 0); 
 if (length(Ip) > 0) & (length(Im) > 0), 
 I = find(BC(:,j) == 0); 
 k = length(BC(:,j)); 
 for a = 1:length(Ip), % Add linear combinations 
 for b = 1:length(Im), 
 x = BC(Ip(a),j)/BC(Im(b),j); 
 BC = [BC; BC(Ip(a),:) - x*BC(Im(b),:)]; 
 k = k + 1; 
 I = [I; k]; 
 end 
 end 
 BC = BC(I,:); % Delete rows used above. 
 if isempty(BC), 
 break 
 end 
 p = BC(:,cc); 
 BC(:,cc) = p/max(max(p)); % Normalize 
 f = 2/min(p(find(p > 0))); % Scaling factor 
 k = length(BC(:,1)); % Identify and delete rows of p whose 
 a = 1; % support is not minimal with respect 
 while a <= k, % to the other rows of p. 
 for b = 1:k, 
 if a ~= b, 
 if (f*BC(a,cc) >= BC(b,cc)) 
 BC = [BC(1:a-1,:); BC(a+1:k,:)]; 
 
7B- 
 k = k - 1; 
 a = a - 1; 
 break; 
 end 
 end 
 end 
 a = a + 1; 
 end 
 if isempty(BC), 
 break 
 end 
 end 
end 
if isempty(BC) 
 p = []; 
else 
 I = []; 
 x = ~(BC(:,cc)*D); 
 for a = 1:length(BC(:,1)), 
 if x(a,:), 
 I = [I; a]; 
 end 
 end 
 BC = BC(I,:); 
 if isempty(BC) 
 p = []; 
 else 
 p = BC(:,cc)'; 
 p = p/min(p(find(p > 0))); 
 
8B- 
 end 
end 
function [v] = ispn(pnobj) 
% ISPN - Checks whether an object is a PN object 
% [v] = ispn(pnobj) 
% returns 1 if the object is PN, else 0. 
% See GETPN. 
flag = 0; 
if strcmp(class(pnobj),'struct') 
 z = fieldnames(pnobj); 
 y = fieldnames(getpn); 
 if length(y) == length(z) 
 x = 1; 
 for i = 1:length(y) 
 if ~strcmp(y{i},z{i}), x = 0; break; end 
 end 
 flag = x; 
 end 
end 
if flag 
 [m1, n1] = size(pnobj.Dm); 
 [m2, n2] = size(pnobj.Dp); 
 flag = (m1 == m2) & (n1 == n2) & (isempty(pnobj.m0) | (m1 == length(pnobj.m0))); 
end 
if flag, flag = strcmp(class(pnobj.Tuc), class(pnobj.Tuo)); end 
if flag 
 if strcmp(class(pnobj.Tuc),'cell') 
 flag = (length(pnobj.Tuc) == length(pnobj.Tuo)); 
 end 
 
9B- 
end 
v = flag; 
function [Graph, varargout] = pncomgraph(pnobj,opt, varargin) 
if ~ispn(pnobj), error('First argument is not a PN object. Use GETPN!'); 
end 
Dm = pnobj.Dm; Dp = pnobj.Dp; m0 = pnobj.m0(:); 
[m,n] = size(Dm); 
D = Dp - Dm; 
if nargin < 2, opt = []; endif isempty(opt) 
 is_reach = 0; 
 is_term = 0; 
else 
 is_reach = opt(1); 
 if length(opt) > 1 
 is_term = opt(2); 
 else 
 is_term = 0; 
 end 
end 
no = nargout - 1; 
nfx = length(varargin); 
fun = {}; addarg = {}; fl = 0; j = 0; 
% Separating functions from their additional arguments 
for i = 1:nfx 
 ctmp = class(varargin{i}); 
 % the additional arguments are assumed not of class char 
 if strcmp(ctmp,'char') | strcmp(ctmp,'function_handle') 
 j = j + 1; k = 1; 
 
10B- 
 fun{j} = varargin{i}; 
 addarg{j} = {}; 
 elseif ~j 
 error('Invalid call syntax: type "help pncgraph" for syntax information'); 
 else 
 addarg{j}{k} = varargin{i}; k = k + 1; 
 end 
end 
nf = j; 
if nf < no 
 error('The number of output arguments does not match the number of input arguments'); 
end 
argfo = ones(nf,1); % the number of outputs of each fi 
argfi = ones(nf,1); % the number of inputs of each fi 
for i = 1:nf 
 fnm = fun{i}; 
 if ~strcmp(class(fnm),'char') 
 fnm = func2str(fnm); 
 end 
 argfo(i) = nargout(fnm); 
 argfi(i) = nargin(fnm); 
end 
for i = 1:no 
 varargout{i} = {}; 
end 
Graph = {{m0, {}, {}}}; 
node_num = 1; 
waitlist = 1; mready = zeros(1,min(nf,no)); 
initial = 1; 
 
11B- 
while ~isempty(waitlist) 
 %disgraph(Graph); % two debug lines 
 %disp('========================================'); 
 i = waitlist(1); waitlist = waitlist(2:length(waitlist)); 
 omrk = Graph{i}{1}; % the current marking 
 for j = 1:min(nf,no) % evaluate the argument functions 
 if argfo(j) % if the argument function has an output 
 if argfi(j) > 1 
 ev = feval(fun{j},omrk,pnobj,addarg{j}{:}); 
 else 
 ev = feval(fun{j},omrk,addarg{j}{:}); 
 end 
 evl = length(ev); % for the case when fun{j} doesn't return a scalar 
 if initial % initialization operations performed only once 
 if evl > 1 
 for k = 1:evl % initialize varargout{j} 
 varargout{j}{k} = {}; 
 end 
 xready{j}{1} = zeros(1,evl); 
 end 
 end 
 if evl == 1 
 if ev 
 varargout{j} = [varargout{j}, {struct('m',omrk,'s',ev)}]; 
 mready(j) = 1; 
 end 
 else % considers the case when fun{j} does not return a scalar 
 for k = 1:evl 
 if ev(k) 
 
12B- 
 varargout{j}{k} = [varargout{j}{k}, {struct('m',omrk,'s',ev(k))}]; 
 end 
 end 
 xready{j}{1} = xready{j}{1} | ev'; 
 if xready{j}{1} 
 mready(j) = 1; 
 end 
 end 
 end 
 end 
 initial = 0; 
 if is_term 
 if mready, return; end 
 end 
 for j = 1:n 
 if omrk >= Dm(:,j) % i.e. if t_j is enabled 
 eqflag = 0; infflag = 0; 
 mrk = omrk + D(:,j); % marking reached by firing t_j 
 zout = node_num:-1:1;% DO NOT change this line without changing line XX! 
 if ~is_reach % operations below not needed for reachability graph 
 % check whether the new marking is larger than prev. markings 
 vout = pnpred(Graph,i); % compute the predecessor nodes 
 y = zeros(length(mrk),1); yout = []; 
 for k = vout 
 z = mrk - Graph{k}{1}; 
 if isfinite(z), yout = [yout, k]; end 
 z(find(isnan(z))) = 0; % correct the result of Inf - Inf 
 if z >= 0, y = y + z; infflag = 1; end 
 if ~z, eqflag = 1; break; end 
 
13B- 
 end 
 if infflag % update marking by adding Inf elements 
 y(find(y)) = Inf; 
 mrk = mrk + y; 
 end 
 % operation below insures that we do not repeat comparisons in test below 
 zout(node_num+1-yout) = []; % line XX 
 end 
 if ~eqflag % test whether the node already exists 
 for k = zout 
 if mrk == Graph{k}{1} 
 eqflag = 1; 
 break 
 end 
 end 
 end 
 if eqflag % update nodes 
 Graph{i}{3}{length(Graph{i}{3})+1} = struct('n',k,'t',j); 
 Graph{k}{2}{length(Graph{k}{2})+1} = struct('n',i,'t',j); 
 else % add new node 
 node_num = node_num + 1; 
 waitlist = [node_num, waitlist]; 
 Graph{node_num} = {mrk, {struct('n',i,'t',j)}, {}}; 
 Graph{i}{3}{length(Graph{i}{3})+1} = struct('n',node_num,'t',j); 
 end 
 end 
 end 
end 
if nargout == 0 
 
14B- 
 disgraph(Graph); 
end 
function [vout] = pnpred(Graph,xi,sc) 
% PNPRED - Predecessor/successor nodes in a coverability graph 
% [vout] = pnpred(Graph,i) 
% sets vout to the list of nodes in the coverability graph Graph 
% which precede the node i. Note that vout is an integer vector and 
% i is an integer. For the data format of Graph, refer to PNCGRAPH. 
% To compute the successor nodes, use the format 
% [vout] = pnpred(Graph,i,3) 
nnode = length(Graph); vout = []; 
if xi > nnode | xi < 1, return; end 
if nargin < 3, 
 sc = 2; 
end 
ind = zeros(1,nnode); 
waitlist = xi; 
while ~isempty(waitlist) 
 cnode = waitlist(1); waitlist = waitlist(2:length(waitlist)); 
 ind(cnode) = 1; 
 for i = 1:length(Graph{cnode}{sc}) 
 j = Graph{cnode}{sc}{i}.n; 
 if ~ind(j) 
 waitlist = [j, waitlist]; 
 end 
 end 
end 
vout = find(ind); 
 
 
15B- 
3. The result of using this function to analysis the model of RTP. 
[Dm,Dp,m0,D,p,T]=analysis2PN('rtp.rdp') 
Number of transitions= 
tra = 
 20 
number of places= 
pla = 
 26 
Number of arcs= 
ar = 
 49 
 
NODE 1 p1: 1; p7: 1; p8: 1; p14: 1; p19: 1; 
 IN: 
 OUT: 
 
Dm = 
 Columns 1 through 14 
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
 1 0 0 0 0 0 0 0 0 0 0 0 0 0 
 0 1 0 0 0 0 0 0 0 0 0 0 0 0 
 0 0 1 0 0 0 0 0 0 0 0 0 0 0 
 0 0 0 1 0 0 0 0 0 0 0 0 0 0 
 0 0 0 0 1 0 0 0 0 0 0 0 0 0 
 0 0 0 0 0 0 0 1 0 0 0 0 0 0 
 0 0 0 0 0 0 0 1 0 0 0 0 0 0 
 0 0 0 0 0 1 0 0 0 0 0 0 0 0 
 0 0 0 0 0 0 1 0 0 0 0 0 0 0 
 0 0 0 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0 
 0 0 0 0 0 0 
 0 0 0 0 0 0 
 0 0 0 0 0 0 
 0 0 0 0 0 0 
 0 0 00 0 0 
 0 0 0 0 0 0 
 0 0 0 0 0 0 
 0 0 0 0 0 0 
 0 0 0 0 0 0 
 0 0 0 0 0 0 
 1 0 0 0 0 0 
 0 -1 0 0 0 0 
 -1 1 0 0 0 0 
 0 -1 1 0 0 0 
 0 0 -1 1 0 0 
 0 0 0 -1 1 0 
 0 0 0 0 -1 1 
 0 0 0 0 0 -1 
 
19B- 
 0 0 0 0 0 -1 
p = 
 0 0 0 0 1 1 
 0 0 0 0 1 1 
 0 0 0 0 1 1 
 0 0 0 0 1 1 
 0 0 0 0 1 1 
 1 1 0 0 1 1 
 1 0 0 0 0 0 
 0 1 0 0 0 0 
 1 1 0 0 1 1 
 1 1 0 0 1 1 
 0 0 0 0 1 1 
 0 0 1 0 1 1 
 0 0 1 0 1 1 
 0 0 1 0 0 0 
 0 0 1 0 1 1 
 0 0 0 0 1 1 
 0 0 0 1 1 1 
 0 0 0 1 1 1 
 0 0 0 1 0 0 
 0 0 0 1 1 1 
 0 0 0 0 1 1 
 0 0 0 0 1 1 
 0 0 0 0 1 1 
 0 0 0 0 1 1 
 0 0 0 0 1 0 
 0 0 0 0 0 1 
T = 
 [ ] 
 
 
 
1C- 
APPENDIX (C) 
RESULTS TRAINING OF NEURAL PETRI NET. 
1. Block diagram of Neural Network. 
 
 
 
2. Figures of comparison of target and output value. 
 
 
2C- 
 
 
 
 
 
 
 
 
 
3C- 
3. Comparison between target and output values: 
Targets and Network Outputs 
 Network Name: Electric Control System. 
 Iterations: 10000 
 
 1 => Node 1 target,output= 1.00000, 1.00000 
 1 => Node 2 target,output= 0.00000, 0.00000 
 1 => Node 3 target,output= 0.00000, 0.00000 
 2 => Node 1 target,output= 0.00000, 0.00000 
 2 => Node 2 target,output= 1.00000, 1.00000 
 2 => Node 3 target,output= 0.00000, 0.00000 
 3 => Node 1 target,output= 0.00000, 0.00000 
 3 => Node 2 target,output= 0.00000, 0.00000 
 3 => Node 3 target,output= 1.00000, 1.00000 
 
َيخؼبمُم انؼمُم انحبني مغ حطبيِق شبكبث بخزي في انىمذجت وانخحهيِم 
 بخزي شبكت: يؼىي وىقشْجقذ شبكبث بخزيثالثت أوىاِع . وانسيطزِة
. ػصبيت بخزي انمشزفت، شبكت بخزي ال، شبكتانمؤقىحت
 رْثيإخجانخي مخخهفِت حقىِل ثالثت األوىاِع، أداِء حقيقنج
 انخقبطِغمغ انمزور إشبرِة سيطزُة األوَل انخطبيَق إّن. نهخطبيِق
 . بخزي انمؤقىحت االوخقبلشبكتببسخخذاو 
 نهؼمهيِت ةانمشزَفشبكت بخزي اسخؼمبلهى انثبوَي انخطبيَق إّن
 .انمىصم شبِهجهبس في انسزيؼِت انحزاريِت
 انسيطزِة وظبِو ػيَب حشخيُصهى نهخطبيِق انثبنَث انحقَم إّن
 .ػصبيتال بخزي شبكِت بئسخؼمبل انكهزببئِي
 شبكِتمه وىع ُكّم وسيئبُث حسىبث انثالثت انخطبيقبُث ُحىّضُح
 .انمخخهفِت انمسخقبهيِت نهِذراسبِث كذنيم ُحسَخؼمَم َأْن وُيْمِكُه بخزي
 الملخص

Mais conteúdos dessa disciplina