Flexible Manufacturing System Simulation Using Petri Nets
Flexible Manufacturing System Simulation Using Petri Nets
Flexible Manufacturing System Simulation Using Petri Nets
Graphic and executable technique to specify and analize dynamic & concurrent discrete event systems.
2.1.2 Formal
Petri Nets analysis is a mathematical technique well defined. Many static and
dynamic properties of a PN (and therefore for a system represented by a PN)
can be mathematically proved.
Source: Manufacturing the Future, Concepts - Technologies - Visions , ISBN 3-86611-198-3, pp. 908, ARS/plV, Germany, July 2006, Edited by: Kordic, V.; Lazinica, A. & Merdan, M.
153
154
2.1.3 Graphics
A PN can be executed and then the dynamics of the system can be observed.
2.1.5 Concurrency
A system that can change its current state based in both its current state and
the transition conditions between states.
2.2 Structure of a Petri Net
2.2.1 Formal Definition
A Petri Net has a set of Places, a set of Transitions, an Input Function and an
Output Function.
The structure of a Petri Net is the array (L, T, E, S, m0) where:
-
A Petri Net is an oriented graph that contains two types of nodes: Places and
Transitions which are connected by oriented arcs that connect Places with
Transitions connectivity between nodes of the same kind is not allowed. In
the graphic representation, Places are shown as circles, Transitions are shown
155
as bars and the arcs are shown as arrows. Places represent conditions and
Transitions represent events. A Transition has certain number of places either
as inputs or outputs which are pre and post conditions. See figure 1.
2.2.3 Marking a Petri Net
The marking of a Petri Net is a positive integer i for every place Li. A mark is
represented as a dot within the circle for a given place. These marks move between the places which provide the dynamic feature of the Petri Net.
A Petri Net is considered marked when at least one place has a mark.One
place can have N marks, where N is a positive integer. If N = 0 then the place
has no marks. A marker M is a function M : L N that can be expressed by:
m1
m
M= 2
M
mN
(1)
Figure 1. Graphic representation of a PN showing the Input & Outputs places as well
as the Transition.
2.2.4 Interpretation of a Petri Net
Marks are the resources. Resources can be physical entites or no physical such
as messages or information.
Places are the locations where the resources are stored.
Transitions are actions that transfer the resources to generate new resources.
156
The weight of each arrow (a number on each arrow) is the minimum number
of resources needed in a place in order to get the action indicated by the transition.
2.2.5 Triggering a Transition in a Petri Net
L1
L1
t1
=>
L2
L1
L2
L1
t1
t1
L2
L3
L2
L1
t1
L3
L3
L3
L4
(b)
L2
=>
L4
t1
=>
L4
(a)
L1
L2
L1
L1
t1
L4
t1
L2
=>
L3
(c)
Figure 2. Different triggering cases for some Petri Nets.
t1
L2
(d)
L3
157
Li-1
Li
Li+1
Lk
t1
Lj
t2
Lm
158
t1
t1
t2
159
L4
L1
L2
L3
L5
160
l1
1
E =
0
l2
0
1
0
l3
t
0 1
t
0 2
t
1 3
(2)
0 1
t3
l
1 1
l
0 2
l
0 3
(3)
A=SE
(4)
k +1 = k + AV k
(5)
161
where:
represents the marking vector before the evolution of the net.
k
k +1
Vk
evolution step
of the net.
t5
L1
L2
L1
t4
L2
t4
t1
L3
t1
L3
L4
t3
t2
a)
L4
t3
t2
b)
5. Application Examples.
162
There are three places (l1, l2 & l3): Idle, Moving from A to B & Moving from B to
A. There are three transitions (t1, t2 & t3): Switch M, wagon detected by sensor
A & wagon detetcted by sensor B. When M is press, the wagon moves from A
to B, once reaches this point goes back to A. Sequence can only starts when
wagon is in Idle again.
Figure 11 shows the Petri Net for this system.
163
0 0
t3
l
0 1
l
0 2
l
1 3
t1 t 2
0 0
S =
1 0
0 1
t3
l
1 1
l
0 2
l
0 3
A=SE
1
A=1
Where
0
1
1
1
V0 = 0
0
1
0 = 0
0
1
0
(6)
(7)
k +1 = k + AV k then:
1 1 1 1 0
1 1 0
1 = 0 + AV 0 : 1 = 0 + 1 1 0 0 = 0 + 0 = 1
1 1 0 0 0 0
0 0
1 0 0 0 0
0 1 0
1 = 0 + AV 0 : 1 = 1 + 1 1 0 1 = 1 + 1 = 0
0 0
1 1 0 0 0 1
1 0 0 1 1
0 1 0
1 = 0 + AV 0 : 1 = 0 + 1 1 0 0 = 0 + 0 = 0
1 0
1 1 1 1 1 0
(8)
(9)
(10)
6. Simulation Software
In order to simulate the Petri Nets, a software kit was developed. Although
there are some simulators available, we took the decision to develop our own
as the main goal and to have a software system able to be interfaced with the
real world. The software was developed in Lab Windows CVI, having a
Graphic User Interface which allows the user to create easily the net that
represents the system that is needed to simulate. Figure 12 shows the tipycal
interface of the system.
164
The operator inputs the data related with the PN structure, the information is
then interpreted by the simulator which shows the development of the PN. On
figure 13, the Petri Net shown on figure 11 was introduced to the simulator.
Figures 14, 15 & 16 shows the status of the Petri Net when transitions t1, t2 & t3 are
triggered.
165
Figure 14. Petri Net for the Wagon Control system after t1 is triggered
Figure 15. Petri Net for the Wagon Control system after t2 is triggered
Figure 16. Petri Net for the Wagon Control system after t3 is triggered
Inside the simulator each circle represents a Place where the wagon is moving
to the right, to the left, or simply is on the idle state waiting for the button M to
be pushed (transition t1) to start a sequence.
166
It is worth to say that this simulator can easily be used as a Control System just
by adding an Acquisition Board for sampling the actual signals which in turn
can activate the transitions. The purpose with this was to develop a non expensive control system which can be used by very small companies that do not
have the capital to buy very expensive equipment. In comparison with a PLC
controller the cost involved when implementing this approach is very low and
also offers an intuitive way of developing the control system.
7. Benefits of a Petri Net.
Petri Nets have the following benefits:
a) They have a graphic representation which allows a simply and secure
way to observe how the system is working.
b) They have semantics well defined that specify the net.
c) They can be used to represent several types of systems.
d) They have an explicit description for states and actions.
e) They provide interactive simulations where the results are shown directly on the graphic diagram of the net.
In future research this system can be used on the control of production lines
where series of events (discrete events) need to be controlled, such as a robot
feeding a conveyor, a conveyor moving cans or packages into storage areas,
etc.
8. References
Mireles, C. et al. (2004), Flexible Manufacturing System Simulation using Petri
Nets
http://www.lurpa.ens-cachan.fr/grafcet/generalites/presentation_uk.html
ISBN 3-86611-198-3
manufacturing systems. This interdisciplinary and comprehensive volume, consisting of 30 chapters, covers a
survey of trends in distributed manufacturing, modern manufacturing equipment, product design process,
rapid prototyping, quality assurance, from technological and organisational point of view and aspects of supply
chain management.
How to reference
In order to correctly reference this scholarly work, feel free to copy and paste the following:
Carlos Mireles, Alfonso Noriega and Gerardo Leyva (2006). Flexible Manufacturing System Simulation Using
Petri Nets, Manufacturing the Future, Vedran Kordic, Aleksandar Lazinica and Munir Merdan (Ed.), ISBN: 386611-198-3, InTech, Available from:
http://www.intechopen.com/books/manufacturing_the_future/flexible_manufacturing_system_simulation_using
_petri_nets
InTech Europe
InTech China