pn and spn - theory, modeling and applications
TRANSCRIPT
![Page 1: PN and SPN - Theory, Modeling and Applications](https://reader030.vdocuments.us/reader030/viewer/2022021116/577cd88d1a28ab9e78a17197/html5/thumbnails/1.jpg)
7/29/2019 PN and SPN - Theory, Modeling and Applications
http://slidepdf.com/reader/full/pn-and-spn-theory-modeling-and-applications 1/15
Petri nets (PN) and Stochastic Petri
nets (SPN): Theory, Modeling and
Applications
Kamlesh Joshi
Advisor: Dr. Sahra Sedigh
CpE 417 – Network Performance Analysis and Modeling
Semester Project
![Page 2: PN and SPN - Theory, Modeling and Applications](https://reader030.vdocuments.us/reader030/viewer/2022021116/577cd88d1a28ab9e78a17197/html5/thumbnails/2.jpg)
7/29/2019 PN and SPN - Theory, Modeling and Applications
http://slidepdf.com/reader/full/pn-and-spn-theory-modeling-and-applications 2/15
• Petri nets
Contents
• Introduction
•
Modeling with PN and SPN• Formal definition
• Example system and applications
• Conclusion
![Page 3: PN and SPN - Theory, Modeling and Applications](https://reader030.vdocuments.us/reader030/viewer/2022021116/577cd88d1a28ab9e78a17197/html5/thumbnails/3.jpg)
7/29/2019 PN and SPN - Theory, Modeling and Applications
http://slidepdf.com/reader/full/pn-and-spn-theory-modeling-and-applications 3/15
• Introduction
• Petri nets are formal graph models that are well
suited for representing the flow of the information
and controls in the system
• PN have been used for the study of the qualitativeproperties of systems exhibiting concurrency and
synchronization characteristics
• Two types of nodes: Circles (Places) and Bars
(Transitions)
• These nodes are connected by “directed arcs”
![Page 4: PN and SPN - Theory, Modeling and Applications](https://reader030.vdocuments.us/reader030/viewer/2022021116/577cd88d1a28ab9e78a17197/html5/thumbnails/4.jpg)
7/29/2019 PN and SPN - Theory, Modeling and Applications
http://slidepdf.com/reader/full/pn-and-spn-theory-modeling-and-applications 4/15
• Introduction (Contd.)
Fig 1. Simple representation
of PN
• In addition to the static properties, a PN has dynamic properties that result from itsexecution
• The execution of a PN is controlled by “Markers” (Tokens – a black dot, resides in the
places)
• A PN with tokens is called a marked PN
• The distribution of tokens in a marked Petri net defines the state of the system, called
“Markings”
Fig 2. A marked PNFig 3. The marking resulting
from firing transition t2 in Fig
2.
![Page 5: PN and SPN - Theory, Modeling and Applications](https://reader030.vdocuments.us/reader030/viewer/2022021116/577cd88d1a28ab9e78a17197/html5/thumbnails/5.jpg)
7/29/2019 PN and SPN - Theory, Modeling and Applications
http://slidepdf.com/reader/full/pn-and-spn-theory-modeling-and-applications 5/15
• Modeling with PN
• Petri nets are also a modeling tool, devised for use in the modeling of the class of
discrete –event systems with concurrent or parallel events
• Places are used to represent conditions and Transitions to represent events
Conditions of interest:
1. The processor is idle
2. A job is on the input list
3. A job is being processed
4. A job is on the output list
Events of interest
1. A new job enters the system2. Job processing is started
3. Job processing is completed
4. A job leaves the system Fig 4. PN model for example
of a Computer system
![Page 6: PN and SPN - Theory, Modeling and Applications](https://reader030.vdocuments.us/reader030/viewer/2022021116/577cd88d1a28ab9e78a17197/html5/thumbnails/6.jpg)
7/29/2019 PN and SPN - Theory, Modeling and Applications
http://slidepdf.com/reader/full/pn-and-spn-theory-modeling-and-applications 6/15
• Modeling with PN (Contd.)
•Properties of PN useful in modeling
1. Concurrency or Parallelism
2. Asynchronous nature – No inherent measure of time or the flow of time in PN
3. Nondeterminism – increases complexity in analysis
4. The firing of a transition is considered to be instantaneous – to reduce the
complexity of the model5. Uninterpreted models
6. Ability to model a system hierarchically
Fig 5. Hierarchical modeling in PN
replacing places or transitions by
subnets
• Extended PN
1. PN that allows multiple arcs are called as Generalized PN2. Zero testing/Inhibitor arcs
Fig 6. PN model of a chemical
reaction
![Page 7: PN and SPN - Theory, Modeling and Applications](https://reader030.vdocuments.us/reader030/viewer/2022021116/577cd88d1a28ab9e78a17197/html5/thumbnails/7.jpg)
7/29/2019 PN and SPN - Theory, Modeling and Applications
http://slidepdf.com/reader/full/pn-and-spn-theory-modeling-and-applications 7/15
• Formal definition and structure of PN
C = (P, T, I, O) M = (P, T, I, O, μ)1. P: set of Places;
2. T: set of Transitions;
3. The input function I, for each transition t j, the set of input places for the transition
I(t j). The output function O defines, for each transition t j, the set of output places for
the transition O(t j)
4. The vector μ = (μ1, μ2, μ3, μ4,..., μn)
Fig 7. A marked PN
• The Reachability set of a Petri
net1. The reachability set of a marked Petri net is
the set of all states into which the PN can enterby any possible execution
2. From a marking μ, if we can fire some
enabled transition resulting in marking μ’, then
we say that μ’ is reachable from μ
3. Define the reachability set R(M) for a
marked PN as the set of all markings which canbe reached from μ
Example:
P = {p1, p2, p3, p4, p5}, T = {t1,t2,t3,t4}
I(t1) = {p1}, I(t2) = {p2, p3, p5}, . . .
O(t1) = {p2, p3, p5}, O(t2) = {p5}, . . .
μ = (1, 0, 1, 0, 2)
![Page 8: PN and SPN - Theory, Modeling and Applications](https://reader030.vdocuments.us/reader030/viewer/2022021116/577cd88d1a28ab9e78a17197/html5/thumbnails/8.jpg)
7/29/2019 PN and SPN - Theory, Modeling and Applications
http://slidepdf.com/reader/full/pn-and-spn-theory-modeling-and-applications 8/15
• Stochastic Petri nets (SPN)
Contents• Introduction
• Prerequisites
1. Stochastic processes
2. Continuous - time Markov chain (CTMC)
• Formal definition
• Applications
1. Example system 12. Example system 2
![Page 9: PN and SPN - Theory, Modeling and Applications](https://reader030.vdocuments.us/reader030/viewer/2022021116/577cd88d1a28ab9e78a17197/html5/thumbnails/9.jpg)
7/29/2019 PN and SPN - Theory, Modeling and Applications
http://slidepdf.com/reader/full/pn-and-spn-theory-modeling-and-applications 9/15
• Introduction•
The use of PN modeling for quantitative analysisof systems requires temporal specifications andcertain characteristics as follows:
1. The transition firing is atomic; i.e. tokens are
removed from input places and put on outputplaces in a single indivisible operation
2. The specification of the firing delay is of probabilistic in nature; hence either pdf or CDF
of the delay associated with a transition needs tobe specified
![Page 10: PN and SPN - Theory, Modeling and Applications](https://reader030.vdocuments.us/reader030/viewer/2022021116/577cd88d1a28ab9e78a17197/html5/thumbnails/10.jpg)
7/29/2019 PN and SPN - Theory, Modeling and Applications
http://slidepdf.com/reader/full/pn-and-spn-theory-modeling-and-applications 10/15
• Prerequisites
• Stochastic Processes and Markov chain
1. A stochastic process {X(t),t ϵT} is a family of random variable
defined over the same probability space, taking values in the
state space S, and indexed by parameter t, which assumes
values in the set T
2. A Markov process is a stochastic process that satisfies the
Markovian property
3. Markov processes with discrete state space are called Markov
chains
4. Earlier proposals to introduce SPN models were aimed at an
aspect to obtain an equivalence between SPN and CTMC models
![Page 11: PN and SPN - Theory, Modeling and Applications](https://reader030.vdocuments.us/reader030/viewer/2022021116/577cd88d1a28ab9e78a17197/html5/thumbnails/11.jpg)
7/29/2019 PN and SPN - Theory, Modeling and Applications
http://slidepdf.com/reader/full/pn-and-spn-theory-modeling-and-applications 11/15
• Formal Definition
•An SPN is a six tuple
where
(P, T, I, O, M0) is the earlier definition of PN model
And is an array of firing rates associated withtransitions
Again the firing is assumed to be instantaneous
• The parameter of the pdf associated with transition ti isthe firing rate associated with ti i.e. λi
![Page 12: PN and SPN - Theory, Modeling and Applications](https://reader030.vdocuments.us/reader030/viewer/2022021116/577cd88d1a28ab9e78a17197/html5/thumbnails/12.jpg)
7/29/2019 PN and SPN - Theory, Modeling and Applications
http://slidepdf.com/reader/full/pn-and-spn-theory-modeling-and-applications 12/15
• Applications• Example System 1
The CTMC is said to ergodic if an equilibrium or steadystate pdf exists and is independent of initial state
4. Denoting by,
is the probability that the CTMC is in state i at time tand is the pmf at time t
Fig 8. State transition
diagram for light bulbexample
Fig 9. SPN Model for example system 1
![Page 13: PN and SPN - Theory, Modeling and Applications](https://reader030.vdocuments.us/reader030/viewer/2022021116/577cd88d1a28ab9e78a17197/html5/thumbnails/13.jpg)
7/29/2019 PN and SPN - Theory, Modeling and Applications
http://slidepdf.com/reader/full/pn-and-spn-theory-modeling-and-applications 13/15
• Applications (Contd.)• Example system 2
Modeling of a two station single buffer polling system• The place P1represents the condition that
station 1 is idle, and P2 represents the
condition that station 2 is idle.
• The place P5 represents the condition that
the server is serving at station 1, and the
place P6 represents the condition that the
server is serving at station 2.
• The place P3, represents the condition that
station 1 has generated a message, and P4
represents the condition that station 2
has generated a message.• Finally, the place P8, represents the
condition that the server is polling station 2,
and the place P7, represents the condition
that the server is polling station 1
Fig 10. SPN Model for example system 2
![Page 14: PN and SPN - Theory, Modeling and Applications](https://reader030.vdocuments.us/reader030/viewer/2022021116/577cd88d1a28ab9e78a17197/html5/thumbnails/14.jpg)
7/29/2019 PN and SPN - Theory, Modeling and Applications
http://slidepdf.com/reader/full/pn-and-spn-theory-modeling-and-applications 14/15
• Applications (Contd. )• Corresponding CTMC Model
Where,The time until station i generates a
message is assumed to be
exponentially distributed with mean
1/ λi .
The service time at station i isassumed to be exponentially
distributed with mean
1/ μi.
The polling time of station i is
assumed to be exponentially
distributed with mean
1 /ϒi.
i= 1 , 2.
When station 1 (station 2) generates a
message, the timed transition t1 (t2)
fires.
Fig 11. Corresponding CTMC Model
for example system 2
![Page 15: PN and SPN - Theory, Modeling and Applications](https://reader030.vdocuments.us/reader030/viewer/2022021116/577cd88d1a28ab9e78a17197/html5/thumbnails/15.jpg)
7/29/2019 PN and SPN - Theory, Modeling and Applications
http://slidepdf.com/reader/full/pn-and-spn-theory-modeling-and-applications 15/15
• Conclusion
• A comprehensive study of concepts of modeling PN and SPN is explained along withthe applications
• The steady state solution of the SPN model is
obtained by same equations for ergodic CTMCmodel
• The complexity while modeling CTMC
considerably reduces with the modelingtechniques using SPN as an alternative