You are on page 1of 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/4204110

Petri net-based modeling and simulation of a hybrid manufacturing system

Conference Paper · October 2005


DOI: 10.1109/ICET.2005.1558912 · Source: IEEE Xplore

CITATIONS READS

2 58

3 authors, including:

Abolfazl Jalilvand
University of Zanjan
119 PUBLICATIONS   723 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Phd thesis View project

MSc thesis View project

All content following this page was uploaded by Abolfazl Jalilvand on 02 June 2016.

The user has requested enhancement of the downloaded file.


IEEE --- 2005 International Conference on Emerging Technologies
September 17-18, Islamabad

Petri Net-Based Modeling and Simulation of a


Hybrid Manufacturing System

Abolfazl Jalilvand Sohrab Khanmohammadi Fereidoon Shabaninia


Department of Electrical Faculty of Electrical and Faculty of Electrical and
Engineering Computer Engineering Electronics Engineering
Islamic Azad University (Abhar Branch) University of Tabriz University of Shiraz
Abhar, Iran Tabriz, Iran Shiraz, Iran
jalilvanda@yahoo.com khan@tabrizu.ac.ir shabani@shirazu.ac.ir

Abstract relays that can be naturally modeled as hybrid


systems. These hybrid models appear in many
Dynamic systems with a mix of continuous and areas. Typical examples are manufacturing
discrete components called hybrid systems frequently systems, transportation systems, flight control,
arise in engineering applications. By modeling these air traffic control, communication networks,
different components using differential equations and missile guidance, process control, robotics, path
discrete events, it is possible to represent a wide
planning, traffic control and so on [4-9]. The
range of phenomena present in physical and
technological systems. Since many of these
application of hybrid modeling and control can
applications are safety critical, it is important to use be an interesting approach to improve plant
reliable methods to simulate hybrid systems. In this performance, efficiency, safety and reliability.
paper we deal with modeling and simulation of In general, a hybrid system can be in one of
hybrid systems using an extended form of timed Petri several modes of operation, whereby in each
net. The proposed method is used for modeling of a mode the behavior of the system can be
robotic manufacturing system. The simulation results described by a system of difference or
are obtained by a modified Petri net toolbox. differential equations, and the system switches
from one mode to another due to the occurrence
Keywords: Hybrid systems, Modeling, Petri of events (Fig. 1).
nets, Simulation, Manufacturing systems.

x& 2 = f 2 ( x2 , u , t )
1. Introduction
y = g 2 ( x2 , u, t )
Hybrid systems have emerged as a technique
for modeling and analyzing a class of
autonomous control systems containing both x&1 = f1 ( x1 , u , t ) x&3 = f 3 ( x3 , u , t )
continuous-state and discrete event dynamics [1- y = g1 ( x1 , u , t ) y = g 3 ( x3 , u , t )
3]. When the continuous and discrete dynamics
coexist and interact with each other, it is
important to develop models that accurately
describe the dynamic behavior of such hybrid
systems. Many times it is not only desirable but
x& N = f N ( x N , u , t ) xx4.& == ff4 ((xx4 ,,uu,,tt))
also natural to use hybrid models to describe the 4 4 4
y = g 4 ( x4 , u, t )
dynamic behavior of systems. Many physical y = g N ( x N , u, t ) y = g 4 ( x4 , u, t )
systems are hybrid in the sense that they have
barriers or limitations. Inside the limitations they ...
are modeled with differential equations. A Figure 1: A schematic representation of a hybrid
natural way to model these systems is to use a system with N modes.
mixture of differential equations and The mode transitions may be caused by an
inequalities. Other systems have switches and external control signal, by an internal control

0-7803-9247-7/05/$20.00 ©2005 IEEE 382


IEEE --- 2005 International Conference on Emerging Technologies
September 17-18, Islamabad

signal (if the controller is already included in the dynamical law until a discrete transition occurs.
system under consideration), or by the dynamics Discrete transitions are instantaneous state
of the system itself, i.e. when a certain boundary changes that separate continuous state evolutions
in the state space is crossed. The latter is [14]. Due to combination of discrete and
expressed by guard [1]. continuous behavior, hybrid systems are
In one formulation of hybrid systems the inherently difficult to analyze formally.
continuous state plant is supervised by a discrete Numerical simulation therefore plays an
event controller [10-12]. Such a hybrid system important role in the analysis of such systems.
consists of three main components: a plant, a The simulation of hybrid systems alternates
discrete event controller and an interface. The between solving differential equations
continuous process to be controlled, together numerically and making discrete transitions.
with any continuous controller, is identified as In this paper we use a special version of
plant and is often described in terms of timed Petri nets as a tool for the mathematical
differential/difference equations. In an effort to description and simulation of the behaviour of
import more intelligence and decision making hybrid systems. To simulate the Petri net model
capabilities to the system, it may be desired for a of the hybrid system a modified Petri net toolbox
rule based discrete event controller to determine is used.
the control and performance objectives of real
time plant. The interface makes it possible for 2. Hybrid Dynamical Systems
these different processes to communicate with
each other. As it is illustrated in Fig. 2 it consists As it was mentioned previously, a class of
of two main parts: the event generator and the hybrid dynamical system, commonly found in
actuator. The event generator receives the the literature, considers the tree layer structure
discrete time measurement signal of hybrid plant depicted in Fig. 2. Here we deal with this hybrid
and issues appropriate events when the state control system with more details. The
enters a new region of the state space. The continuous system plant is a three-tuple
actuator determines the control input which is S = ( X ,U , f ) , consisting of the state set, input
applied to the hybrid system. set and state transition function respectively. The
Discrete Event continuous system plant equations are [15]:
Controller x& (t ) = f ( x(t ), u (t )) (1)
~
r ( n) ~
x ( n) Where x ∈ X ⊂ ℜn and u ∈U ⊂ ℜ m .
Interface f : X × U → ℜ n is assumed to be lipschitz
actuator generator continuous. For simplicity we assume that the
continuous state x(t ) can be measured.
r (t ) x(t ) The interface equations are:
(Σ / S ) : u (t ) = γ ( r (k )) (2)
Plant
( S / Σ) : z (k ) = α( x(t ), u (t )) (3)
Figure 2: A hybrid control system. Where r ∈ ℜ , u ∈ U ⊂ ℜ and x ∈ X ⊂ ℜ n .
p m

Modeling and simulation are becoming more Function α : X × U → Z is a mapping in S / Σ


important since engineers need to analyze and function γ : R → U is a mapping in Σ / S .
increasingly complex systems composed of The discrete event controller is a five-tuple
components from different domains. A hybrid (Q, Z , R, δ, φ) , consisting of the finite state set,
model, like all models, should be sufficiently input set, output set, state transition function and
complex to capture the rich behavior of the output function, respectively. The discrete event
systems. However, it should also be easy enough controller is described by the equation:
to be analyzed, and formulated in such a way ⎧q (k + 1) = δ(q (k ), z (k ))
that simulation is possible. The most used ⎨ (4)
approaches to model hybrid systems are hybrid ⎩ r (k ) = ϕ(q (k ), z (k ))
automata and Petri nets [13]. Where q(k ) ∈ Q is the state after the k th event,
The execution of a hybrid system can be z ∈ Z , r ∈ R , δ : Q × Z → Q , ϕ : Q × Z → R and
defined by a sequence of steps: in each step, the k∈Ν.
system state evolves continuously according to a

383
IEEE --- 2005 International Conference on Emerging Technologies
September 17-18, Islamabad

As it is seen from the description of hybrid In graphical representation of a Petri net,


system, the discrete event controller views the places are represented by circles and transitions
remaining of system as a discrete event system. are shown by hollow bars. The relationship
These events take place when the system passes between places and transitions is represented by
from one mode to another one. Recognition of directed arcs. For example The Petri net of Fig. 3
current operating mode of the system is based on depicts the firing of a transition.
the information, obtained form the system.
Identification of mode depends on the current
2 t 2 t
measured state values of system. In many hybrid H H
systems the events occur when the states or
control variables crosses a threshold value. H 2O H 2O
Ofcourse the direction of crossing is usually O a O b
significant to determine the events. In this paper
Figure3: Transition (firing): (a) Marking before firing
we use timed Petri net for modeling of hybrid (b): Marking after firing.
systems. The places denote the possible occurred
events in system and each transition represents In un-timed Petri net one can prohibit
the dynamic of hybrid system and determines the controlled transition from firing but cannot force
case when a mode can be switched to its later the firing of a transition at a particular time. In a
corresponding mode when a new event occurs. timed Petri net controlled transitions are forced
to fire, by considering the time dependent firing
3. Petri Nets functions. In timed Petri nets, each transition has
its specific time which determines the
transition's holding time. When a transition is
Petri nets are a graphical and mathematical
fired during its holding time the network's
modeling tool applicable to many systems. They
marking is not changed and as soon as its
offer formal graphical description possibilities
holding time elapsed the marking of network
for modeling of systems consisting of concurrent
will be changed based on the mentioned firing
processes. Petri nets have been used extensively
rules [16].
as a tool for modeling, analysis and synthesis for
To use timed Petri net for modeling hybrid
discrete event systems. A Petri Net (PN) is a 5-
tuple, PN = (P,T , F,W , M0 ) where [16]:
system the discrete events which occurred in
system can be demonstrated by places where the
P = {p1 p2 K pm} is a finite set of places. occurring of each event is shown by putting a
T = {t1 t2 K tn} is a finite set of transitions. token in corresponding place. Furthermore each
F ⊆ (P × T ) U (T × P) is a set of arcs (flow continues dynamic of the system is modeled by a
relations). transition its firing depicts which dynamic of the
W : F → {1 2 3 K} is a weight function. system is appeared. In the Petri net we assign to
M0 : P → {0 1 2 K} is the initial marking .
each transition the conditions which determine
the firing of transition will be terminated and
P I T = Φ and P U T ≠ Φ . cause the next event (events) to be occurred. A
The dynamic behavior of a system is modeled transition is enabled and it may fire when all its
by changing the state or marking in Petri nets input places (places that are the source to the
according to the following (firing) rules: transition) contain at least a token. When a
1- A transition t is said to be enabled if each transition fires its time starts to increase based
input place p of t is marked with at least on the corresponding dynamic until the specific
w( p, t ) tokens, where w( p, t ) is the weight of the constraints are occurred. In such a case firing of
arc from p to t . transition will be terminated and its output
transitions will be marked by a token. In deed
2- An enabled transition may or may not fire
we can consider such a transition as a timer
depending on whether or not the event
which its timing starts with its firing and finishes
actually takes place (firing conditions are ok).
when the corresponding constraints occurred. In
3- Firing of an enabled transition t removes
other word this timer describes the continuous
w( p, t ) tokens from each input place p to t
dynamics of the hybrid system at each
and adds w(t, p) tokens to each output place p operational mode where the hybrid system
of t , where w( p, t ) and w(t, p) are the weights switches modes based on constraints on the
of the arcs from p to t or t to p respectively. continuous states. In next section we use this

384
IEEE --- 2005 International Conference on Emerging Technologies
September 17-18, Islamabad

class of Petri net for modeling and simulation of ⎧ v3 : b < x < d


a Robotic Manufacturing system as a hybrid x& = ⎨ : going to left
⎩λ4 (−x + u) : a < x < b
system.
Where the time signal u represents the desired
position of the mobile base.
4. The Robotic Manufacturing For discretizing the continuous plant, it is
System required to partition its state space, where each
partition represents one operating mode of the
Consider the mobile manipulator performing system. To do this, we have some threshold
a task in a manufacturing plant. Figure 4 depicts values: x=a, x=b, x=c and x=d. Based on these
the system. threshold values we can distinguish five
operating regions for the system as follows:
m1 : x < a
m2 : a < x < b
m3 : b < x < c (6)
m4 : c < x < d
a b c d
m5 : d < x
Figure 4: Mobile manipulator.
According to these operating modes we can
define events of the system where each event
The mobile manipulator has to pick and occurs based on a possible transition of system
move an object from the conveyor belt in from one mode to another. The discrete event
position a to position d . It releases the object in model of the system is depicted in Fig. 5, where
position d and returns to position a, and repeats m1, m2, m3, m4 and m5 are operating modes and
this task. When the mobile base goes right, from q1, q2, q3, q4, and null, show the possible
a to c the discrete event controller selects the occurring events. In this Figure the event and the
controller k1 which considers the mass of the corresponding applicable controller (due to the
object and drives the mobile base with constant event) is shown on each arc, separated by “/”.
velocity v1 but from c to d the controller k2 is null null q2 / k 2 q3 / k3
selected in order to mobile base approaches d m1 m2 m3 m4 m5
with decreasing velocity v2 (t ) and stops when it
q1 / k1 q4 / k 4 null null
reaches to point d. On the other hand, if the
mobile manipulator goes left, from d to b the Figure 5: The discrete event model for the robotic
discrete event controller selects controller k3 manufacturing system.
which drives the mobile base faster with a Note that the null symbol reflects the fact that
constant velocity v3 > v1 and from b to a, another nothing actually happens in the system at this
controller k4 is selected in order that the mobile transition. When the discrete event controller
receives a null symbol it remains in the same
base approaches a with decreasing velocity v4 (t ) state and reissues the current controller symbol.
and finally stops at point a, to pick another job. Now according to the obtained discrete event
In this work, we neglect the dynamics of the system model we can construct the Petri net
manipulator, assuming that the time of picking model of the system. Figure 6 depicts this Petri
and releasing the object is very short. model. In this model the places: p1 , p2 , p3 , and
The mobile manipulator plus low-level servo
p4 depict the discrete events: q1 , q2 , q3 , and q4
controller as a unified continuous-state system is
represented by an abstract model which captures respectively. Transition t1 represents the
the main features of the original system. The operation mode of the system when the robot
position of mobile base is considered as x and its moves in the interval a < x < c and the statement
evolution is described by a set of first order x > c shown beside it depicts the condition when
differential equations. Regarding this equations the firing of this transition finishes. Transition t 2
it is seen that this system is indeed, a piecewise depicts the operation mode of the system when
linear hybrid system. the robot moves in the interval c < x < d and the
⎧ v1 : a < x < c statement x > d written beside it shows the
x& = ⎨ : going to right (5)
⎩λ2 (−x + u) : c < x < d condition when the firing of this transition
finishes. Transition t3 represents the operation

385
IEEE --- 2005 International Conference on Emerging Technologies
September 17-18, Islamabad

mode of the system when the robot moves in the


interval b < x < d and the statement x < b shown 6

t1(--) & t2(-)


beside it depicts the condition when the firing of 4

this transition finishes. Transition t 4 represents 2


the operation mode of the system when the robot
moves in the interval a < x < b and the statement 0
0 5 10 15
time
20 25 30 35

x < a shown beside it depicts the condition when


6
the firing of this transition finishes. The

t3(--) & t4(-)


occurrence of each event depends on the current 4

mode of the system (the transition which fires) 2


and properly crossing the threshold value that
defines that event. 0
0 5 10 15 20 25 30 35
time
x>d
t2 Figure 7: The simulated dynamic behavior for
P2 x& = λ 2 ( − x + u ) P3 transitions in Petri model.
Figure 8 shows the variations of the time of
each transition when it fires. Again we assume
x>c that the time of each transition is zero in the time
t1 x& = v1 x& = v2 t3 intervals that it doesn’t fire. We can consider
x<b each transition as a timer which starts when fires
and stops when encounters to the predefined
constraints. After stopping, its time reset to zero.
P1 x& = λ 3 ( − x + u ) P4 3

t4
x<a
t1(--) & t2(-)

Figure 6: The Petri net model of the robotic 1


manufacturing system.
0
0 5 10 15 20 25 30 35
time

5. Simulation Results 1.5


t3(--) & t4(-)

1
For simulation purpose we consider the
robotic manufacturing system with following 0.5

characteristics:
0
a = 0m , b = 1m , c = 5m , d = 6m , v1 = 2.5(m / s) , 0 5 10 15
time
20 25 30 35

λ2 = 2.5(s−1) , v3 = −5(m / s) , λ4 = 5(s−1) and Figure 8: Variations of the time of transitions.


⎧6 : c < x < d In Fig. 9 state of each transition during the
u=⎨ .
⎩0 : b < x < a simulation of Petri model is shown.
For simulating the obtained Petri net model (Fig. 1

6), we use a modified Petri net toolbox [17]. The


t1

simulation of the system is done for 180 sec -1


0 5 10 15 20 25 30 35
whereas the chosen step-time for solving the 1

dynamic equations and simulating the Petri


t2

model is 0.05 second. -1


0 5 10 15 20 25 30 35
Figure 7 shows the simulation results which 1

represent the dynamic behavior of transitions: t1 ,


t3

-1
t 2 , t3 and t 4 based on their corresponding 0 5 10 15 20 25 30 35
1
dynamics. We have assumed that the state of 0
t4

each transition is zero in time intervals that it -1


0 5 10 15 20 25 30 35
doesn’t fire. Combining the dynamic behavior of time

all transitions we can obtain the complete Figure 9: The states of transitions.
behaviour of the hybrid system.
In this figure we define the following values for
describing the state of the transition.

386
IEEE --- 2005 International Conference on Emerging Technologies
September 17-18, Islamabad

1 : Firing of the transition finishes. [3] J. A. Stiver and P. J. Antsaklis. An invariant based
0 : The transition fires. approach to design of hybrid control systems. Int.
Journal of Robust and Nonlinear Control, Feb.
-1 : The transition doesn’t fire.
2000.
It can be seen in Figure 9 that the state “1” [4] C. J. Tomlin. Hybrid control of air traffic
appears just in an instant when an event takes management systems. PhD Thesis, Department of
place in the hybrid system. Electrical Engineering and Computer Sciences,
Figure 10 shows the marking of places. Note University of California at Berkeley, 1998.
that in our Petri net toolbox when the transition [5] E. Frazzoli. Robust hybrid control for autonomous
fires the token from each input place is removed vehicle motion planning. PhD Thesis, Department
of Aeronautics and Astronautic, MIT, 2001.
but putting a token in output place postpones [6] R. Fierro, Frank L. Lewis and Andy Lowe. Hybrid
until the firing of the transition finishes. control for a class of under actuated mechanical
systems. IEEE Trans. On Systems, Man and
1
Cybernetics, 29(6):646-654, Nov. 1999.
p1

0.5
[7] M. Egerstedt and X. Hu. A hybrid control approach
0
0 5 10 15 20 25 30 35 to action coordination of mobile robots.
1 Automatica, (38): 125-130, 2002.
p2

0.5 [8] A. Tornis and M. P. Spathoulos. Supervisory target


0
0 5 10 15 20 25 30 35
control for hybrid systems. Int. Journal of Control,
1 76(11): 1142-1158, 2003.
[9] A. Chutinan. Hybrid system verification using
p3

0.5

0
discrete model approximation. PhD Thesis,
0 5 10 15 20 25 30 35
Carnegie Mellon University, USA, 1999.
1
[10] X. D. Koutsoukos, P. J. Antsaklis, J. A. Stiver and
p4

0.5
M. D. Lemmon. Supervisory control of hybrid
0
0 5 10 15
time
20 25 30 35 systems. Proc. of IEEE, 88(7): 1026-1049, 2000.
[11] X. D. Koutsoukos and P. J. Antsaklis. Design of
Figure 10: The marking of each place in simulated hybrid system regulators. Proc. Of 38th IEEE
Petri model. Conference on Decision and Control, Phoenix, Dec.
1999, pp. 3990-3995.
[12] X. D. Koutsoukos and P. J. Antsaklis. Hybrid
6. Conclusions control of a robotic manufacturing system. Proc. Of
7th IEEE Mediterranean Conference on Control and
In this paper the modeling and simulation of automation, Haifa, Israel, June 1999, pp. 144-159.
hybrid systems with a mix of continuous states [13] A. Gambier and E. Badreddin. Application of
and discrete dynamics is investigated. For the hybrid modeling and control techniques to
desalination plants. Elsevier, Desalination, (152):
modeling purpose, an extended form of timed 175–184, 2002.
Petri net was introduced. For simulating the Petri [14] L. Chaimowicz, M. F. M. Campos, and V. Kumar.
model of hybrid systems a Petri net toolbox was Hybrid Systems Modeling of Cooperative Robots.
used with some modifications. The proposed Proceedings of the 2003 IEEE International
method is used for modeling of a robotic Conference on Robotics and Automation, Taipei,
manufacturing system where the simulation Taiwan, September 2003, pp. 4086-4091.
[15] A. Jalilvand and S. Khanmohammadi. Integrating of
results are obtained by the modified Petri net Event Detection and Mode Recognition in Hybrid
toolbox. Systems by Fuzzy Petri Net. Proc. of IEEE
Conference on Robotics, Automation and
7. References Mechatronics (RAM2004), December 1-3, 2004,
Singapore, pp. 265-270.
[16] Tado Murata. Petri nets: properties, analysis and
[1] R. K. Boel, B. De Schutter, G. Nijsse, J. M. application. Proc. of IEEE, 77(4): 541-580, April
Schumacher and J. H. van Schupoen. Approaches to 1989.
modeling, analysis and control of hybrid systems. [17] G. Ribichini, and P. Messina. Un toolbox per la
Journal A, 40(4): 16-27, Dec. 1999. progettazione la simulazione el' Analisi di Rti di
[2] W. P. M. H. Heemels, B. De Schutter and A. Petri Temporizzate. Universita Degli Studi Pisa,
Bemporard. On the equivalence of classes of hybrid Facolta di Ingegneria, 7 Marzo 2002.
dynamical systems. Proc. Of the 40th IEEE
Conference on Decision and Control, Orlando,
Florida, USA, Dec. 2001.

387

View publication stats

You might also like