Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL....

286
Copyright: 2012 by Florin Sandu BLAGA MODELLING AND SIMULATION OF METHATRONICS SYSTEMS First Edition Course book of Series of Advanced Mechatronics Systems edited by Florin Sandu BLAGA Debrecen (HU) 2012.

Transcript of Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL....

Page 1: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Copyright: 2012 by Florin Sandu BLAGA

MODELLING AND SIMULATION OF METHATRONICS SYSTEMS

First Edition

Course book of Series of

Advanced Mechatronics Systems

edited by Florin Sandu BLAGA

Debrecen (HU)

2012.

Page 2: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Copyright: 2012 by Florin Sandu BLAGA

First edition: MODELLING AND SIMULATION OF METHATRONICS SYSTEMS, Florin Sandu BLAGA, 2012.

Although great care has been taken to provide accurate and current information, neither the author(s) nor the publisher, nor anyone else associated with this publication, shall be liable for any loss, damage, or liability directly or indirectly caused or alleged to be caused by this book. The material contained herein is not intended to provide specific advice or recommendations for any specific situation.

Trademark notice: Product or corporate names may be trademarks or registered trademarks and are used only for identification and explanation without intent to infringe.

HU ISSN 2063-2657

HU ISBN 978-963-473-516-8

Copyright© 2012, Florin Sandu BLAGA

Reviewers:

Technical-scientific: Zsolt Tiba Ph.D, Géza HUSI Ph.D, University of

Debrecen Language: www.etraduceri.com Publisher: Dr. habil Edit Szűcs PhD, dean of Faculty of Engineering, University of Debrecen, Debrecen, Hungary

Publisher’s Note

The publisher has gone to great lengths to ensure the quality of this reprint but points out that some imperfections in the original may be apparent.

Page 3: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Copyright: 2012 by Florin Sandu BLAGA

www.hungary-romania-cbc.eu www.huro-cbc.eu

The content of this book does not necessarily represent the official position of the European Union.

Page 4: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Copyright: 2012 by Florin Sandu BLAGA

Advanced Mechatronics Systems

A Series of course book and laboratory handbook Debrecen (HU)

Editors

GÉZA HUSI, Ph.D.

Associate Professor

Head of Electrical Engineering and Mechatronics Department

University of Debrecen, Faculty of Engineering

Debrecen, Hungary

RADU-CATALIN TARCA Ph.D.,

Professor Head of Mechatronics Department

University of Oradea, Managerial and Technological Faculty Oradea, Romania

Page 5: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Copyright: 2012 by Florin Sandu BLAGA

Series Introduction

Worldwide interest in Mechatronics and its associated activities continue to grow day by day. The multidisciplinary field of mechatronics brings together mechanical engineering, electrical and electronic engineering, control engineering, and computer science in a synergistic manner. In the latest period, major developments were noticed in this field showing that the mechatronics has advanced rapidly and gained maturity, through the development of an increasing number of degree programs, extensive research activities, product and system developments, and an increasingly broad range of industrial applications. Many textbooks have been developed in the field of Mechatronics and this series of books also lines up with the current trends. The appearance of this series of books was made possible as a result of HURO MECHA 0901/179/2.3.1 project implementation, funded by European Regional Development Fund. These books fully address both the theoretical and practical aspects of the multidisciplinary field of mechatronics and fit the needs in knowledge for students enrolled to MSc program in the field of mechatronics, implemented at both Oradea and Debrecen Universities. The purpose of these courses in mechatronics is to provide a focused interdisciplinary experience for graduate students in the field of mechanics, electrical and computer sciences. Knowledge will be provided in the fields of Advanced Mechatronics, Materials and Machine Parts for Mechatronics, Electrical Actuators, CAD for Mechatronics, Modeling and Simulation of Mechatronics Systems, PLC Programming, Mechatronics Control Systems, Robot and CNC Programming, Mechanical Design of a Mechatronic System, Management of Complex Production Systems, Software Reliability Engineering, Product Lifecycle Management, Finite Element Analysis, Diagnosis and Maintenance of Mechatronics Systems. This series presents books that draw on expertise from both the academic world and the application domains, and will be useful not only as academically recommended course texts but also as handbooks for practitioners in many application domains.

GÉZA HUSI, RADU-CĂTĂLIN ŢARCĂ, editors

Page 6: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Copyright: 2012 by Florin Sandu BLAGA

Advanced Mechatronics Systems A Series of course book and laboratory handbook

Debrecen (HU)

Editors: GÉZA HUSI, RADU-CATALIN TARCA,

1. Radu Cătălin ȚARCĂ: ADVANCED MECHATRONICS - course book 2. Radu Cătălin ȚARCĂ: ADVANCED MECHATRONICS - laboratory handbook 3. Ioan Constantin ȚARCĂ: MATERIALS AND MACHINE PARTS FOR MECHATRONICS -

course book 4. Ioan Constantin ȚARCĂ: MATERIALS AND MACHINE PARTS FOR MECHATRONICS -

laboratory handbook

5. János TÓTH: ELECTRICAL ACTUATORS - course book 6. János TÓTH: ELECTRICAL ACTUATORS - laboratory handbook 7. Mircea Teodor POP: CAD FOR MECHATRONICS - course book

8. Mircea Teodor POP: CAD FOR MECHATRONICS - laboratory handbook 9. Florin Sandu BLAGA - MODELING AND SIMULATION OF MECHATRONICS SYSTEMS -

course book

10. Florin Sandu BLAGA - MODELING AND SIMULATION OF MECHATRONICS SYSTEMS - laboratory handbook

11. Géza HUSI, Péter SZEMES, István BARTHA: PLC PROGRAMMING - course book 12. Géza HUSI, Péter SZEMES, István BARTHA: PLC PROGRAMMING - laboratory

handbook

13. Géza HUSI: MECHATRONICS CONTROL SYSTEMS – course book 14. Géza HUSI: MECHATRONICS CONTROL SYSTEMS – laboratory handbook 15. Tiberiu VESSELENYI: ROBOT AND CNC PROGRAMMING– course book

16. Tiberiu VESSELENYI: ROBOT AND CNC PROGRAMMING– laboratory handbook 17. Edit SZÛCS: MANAGEMENT OF COMPLEX PRODUCTION SYSTEMS - course book 18. Zsolt TIBA: MECHANICAL DESIGN OF A MECHATRONICS SYSTEM – laboratory

handbook 19. Florin VLĂDICESCU POPENȚIU: SOFTWARE RELIABILITY ENGINEERING- course

book

20. Alexandru Viorel PELE: PRODUCT LIFECYCLE MANAGEMENT- course book 21. Alexandru Viorel PELE: PRODUCT LIFECYCLE MANAGEMENT– laboratory handbook 22. Flavius ARDELEAN: FINITE ELEMENT ANALYSIS – course book

23. Flavius ARDELEAN: FINITE ELEMENT ANALYSIS - laboratory handbook 24. Sorin Marcel PATER: DIAGNOSIS AND MAINTENANCE OF MECHATRONICS SYSTEMS

– course book

25. Sorin Marcel PATER: DIAGNOSIS AND MAINTENANCE OF MECHATRONICS SYSTEMS- laboratory handbook

Additional Volumes under Preparation

Page 7: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Copyright: 2012 by Florin Sandu BLAGA

MODELLING AND SIMULATION OF METHATRONICS

SYSTEMS

First Edition

Florin Sandu BLAGA

Industrial Engineering Department

University of Oradea, Managerial and Technological Faculty

Oradea, Romania.

Debrecen 2012.

Page 8: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems
Page 9: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

9

CONTENTS

1. SYSTEM. MODEL. MODELLING. SIMULATION ......................... 13

1.1. Notions about systems ....................................................................... 13

1.2. Modeling and simulation................................................ 17

1.2.1. The term of „model” ....................................... 17

1.2.2. The classification of models ........................ 19

1.2.3. The concept of modeling .............................. 24

2. MODELING AND SIMULATION OF

SYSTEMS WITH PETRI NETS .......................................................... 29

2.1. Petri nets. Terms. Representations ............................................. 29

2.1.1. Places, transitions, arcs ..................................................... 29

2.1.2. The marking ........................................................................... 31

2.1.3. The firing of a transition ................................................... 33

2.2. Independent and dependent Petri nets ..................................... 34

2.3. Abbreviations and extensions of Petri nets ............................. 36

2.3.1. Generalized Petri nets ........................................................ 37

2.3.2. Capacity Petri Nets .............................................................. 39

2.4. Dependent Petri nets (non-autonomous) ................................. 41

Page 10: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

10

2.4.1. Timed Petri nets ................................................................... 41

2.4.1.1. Position-timed Petri nets ................................... 42

2.4.1.2. Transition-timed Petri nets .............................. 47

2.4.2. Synchronized Petri Nets.................................................... 56

2.5. Particular Petri Nets .......................................................................... 64

2.6. Colored Petri Nets .............................................................................. 73

2.6.1. Introduction of terms ......................................................... 73

2.6.2. The term of function ........................................................... 75

2.6.3. Defining colored Petri nets .............................................. 77

2.6.4. Applications ........................................................................... 79

2.6.5. Predefined functions .......................................................... 85

2.7. Continuous Petri nets and hybrid Petri nets ........................... 99

2.8. Stochastic Petri nets (SPN) ............................................................. 109

2.8.1. Introduction ........................................................................... 109

2.8.2. Definitions. Specific terms ............................................... 112

2.8.3. The study of SPN .................................................................. 113

2.8.4. The definition of the models. Applications ................ 122

2.8.5. The representation of queue with SPN ....................... 129

3. THE MODELING OF THE QUEUES

NETWORK SYSTEMS ............................................................................. 132

3.1. Queues and queueing networks. General facts ....................... 132

3.2. Waiting Queue types ........................................................................ 136

3.2.1. Elements of expectations theory .................................. 136

3.2.2. Elementary queue M/M/1 ............................................... 140

3.2.3. Elementary queue M/M/1/K .......................................... 147

Page 11: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

11

3.2.4. M/M/m Queue ...................................................................... 148

3.2.5. Assimilation of the flexible manufacturing

systems (FMS) module waiting queues (system).. . 155

3.3. Modeling with quequeing networks ........................................... 158

3.3.1. Classification of quequeing networks ......................... 158

3.3.2. Open queueing network ................................................... 160

3.3.3. Jackson's Theorem .............................................................. 163

3.3.4. Closed queueings networks ............................................. 178

3.3.5. Analysis method of solving the average

values to the mean values of the closed

queueing networks ............................................................ 183

3.3.6. Analysis of closed waiting

queues using the convolution algorithm .................... 189

4. MODELLING WITH FUZZY SETS .................................................. 192

4.1. General notions ................................................................................... 192

4.2. Membership functions ...................................................................... 193

4.3. Operations with fuzzy sets .............................................................. 198

4.4. Linguistic type fuzzy logic ............................................................... 199

4.5. Control algorithm based on fuzzy sets ....................................... 206

4.6. The control of the industrial robots ............................................ 209

4.6. The manufacturing scheduling in flexible manufacturing

systems using a fuzzy sets .............................................................. 216

4.6.1. The stages of the process .................................................. 216

4.6.2. The scheduling procedure based on

Page 12: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

12

fuzzy sets with simple scheduling rules .................... 228

4.6.2.1. The principle of the procedure .......................... 228

4.6.2.2. Applying the procedure in the

case of a flexible manufacturing system ......... 232

5. THE SIMULATION OF THE VIRTUAL

PROTOTYPE MOVEMENT ................................................................. 259

5. 1. Basic notions ................................................................................... 259

5.2. Solvers used for analyzing the movement ............................. 261

5. 3. Accessing the Motion Simulation and the main

commands used in the simulation of virtual

prototype motion ........................................................................ 262

5.4. Solutions and types of analysis ..................................................... 264

5.5. Kinematic elements ........................................................................... 265

5.6. Kinematic couplings .......................................................................... 265

5.6.1. Definitions and degrees of freedom .............................. 267

5.6.2. Kinematic joints types.......................................................... 269

5.6.3 Creating kinematic joint ..................................................... 275

5.4. Motion Drivers ................................................................................. 277

5.5. Animation .............................................................................................. 279

BIBLIOGRAPHY ......................................................................................... 281

Page 13: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

13

1. SYSTEM. MODEL. MODELLING. SIMULATION

1.1. Notions about systems

The concept of system and the categories used by the general

theory of systems offer methods and new ways for the study of reality,

capable of responding to requirements regarding the analysis, modeling

and the synthesis of objects and heterogeneous groups orientated

towards a purpose.

The term “system” derives from the Greek word “to systema”

which means “a whole formed of links”. The specific meaning is given

by the means of forming of the whole; the links indicate the existence of

the chaining relation as a means of structure. Hence, besides the

aggregate of elements, the term of system also includes the aggregate of

relations between these so as the system seems like “an organized

whole” [1, 6, 11, 27, 36].

Therefore, the system can be defined as an aggregate of

components (elements) which, in the boundaries of certain space and

time conditions, interact and functions, ensuring the achievement of a

result.

Page 14: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

14

In [36] a classification of systems in terms of three criteria is

presented:

a) Derivation;

b) Nature of the components;

c) Hierarchy of action systems.

These criteria lead to the identification of the types of systems

presented in figure 1.1.

Technical systems are found within the action systems. An

elementary action system implies the presence of the human agent and

a technical system, however simple.

Within the actions systems, the most important are the

engineering systems.

The technical systems, once integrated in an elementary action

system, allow the implementation of some of the most different

functions required by the socio-economic life.

The technological systems allow the implementation of some

transformation functions specific to the manufacturing or marketing

type of activities.

The manufacturing systems include as basic component human

operators, which gives them o functionality and a complexity greater

than that of the technological and technical systems which they embed.

Systems engineering has as subject the optimum design and

implementation, if possible, in their cycle of life, of action systems

comprised of people and technical or technological systems (cars,

machines, equipment, items, energy).

Page 15: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

15

Fig. 1.1. A classification of systems, [36]

In most cases, the human agent is part of an engineering system,

or works and interacts with it (Fig. 1.2).

Fig. 1.2. The human agent within an engineering system

Page 16: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

16

The human agent supports the purpose effects of the technical

system.

Moreover, disruptive effects can appear under the shape of an

unwanted input size or of secondary effects. All these effects must be

taken in consideration.

A S system is in relation with environment S or its “entourage”, in

which it evolves. Together with it, it forms the Universal Aggregate, UA

(Fig.1.3).

Fig. 1.3. The system and the universal aggregate

Any system represents an integrated whole of its components and,

at the same time, any system is a subsystem of a more inclusive system.

The hierarchy of systems is infinite.

Hierarchy is a basic category in the general theory of systems,

contributing to the understanding of the structural and functional

constitution of them.

The meaning of the term “hierarchy” in terms of the word “system” can

be explained in two aspects:

• The word “system” can be replaced with the word “subsystem”,

any system being a component of a larger system;

Page 17: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

17

• The parts of the system are as well inclusive systems for other

subsystems and the relations established between them.

The two aspects define the hierarchy of systems. Inside a

hierarchy, each system has a certain place (Fig.1.4), defined by the

affiliation systems.

( R ) R

R ( R )

S S

S S

+

1

1 (1.1)

Fig. 1.4. Hierarhization of systems

1.2. Modeling and simulation

1.2.1. The term of „model”

The term model comes from the Latin modulus, its diminutive

modus, which has the meaning of measurement [38].

In ancient times, the term was used by architects to mark the

arbitrary unit which served to determine the relations, proportions

between the different parts of a construction [38].

Page 18: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

18

In its current sense in the scientific-technical field, the model is a

material system or a materialized system through mathematic equations

with the help of which can be studied indirectly the properties of

another system, more complex, named the source system. The model is

defined by a limited and orientated analogy with the source system.

Fig. 1.5. The insightful correspondence between the model and the

system

In another sense, the model is a representation of essential aspects

of an existing or virtual system.

The requirement of the construction of the model is determined

by the need of study, construction or leading a system (real or virtual),

in terms of the lack of execution of these activities towards the given

system, from economic, ecologic, complexity, availability, etc. motifs.

The system which is the subject of the research is the source of

necessary information for the modeling and it is also named source

system.

The model must comply with certain essential terms:

a) it must be a simplified representation of the source

system

Page 19: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

19

b) it must highlight the distinctive features of the source

system, which distinguishes the source system from other

systems:

c) it must take those features which are adequate to the

purpose of the research.

Using models in the study of systems has the following advantages

regarding models:

• higher availability towards the study than that of source systems:

• lower costs for implementation and testing;

• the implementation and testing period is reduced;

• the changes in the structure of the model are more easy to implement;

• the changes in behavior are more easy to isolate, to understand and

communicate;

• it allows experimentation;

• it can offer information about systems which are not yet implemented,

or cannot be implemented from a technological view.

1.2.2. The classification of models

Hereinafter, the exclusive model will be analyzed through its

capacities to reflect the source system.

The functional-behavioral base of the source system is, ultimately,

the subject of research. For its understanding, the process of modeling

is initiated. Generally, by underlining this base, the geometric-space

configuration structure of the source system is also implicitly

highlighted. Many times, the geometric-space configurations form

Page 20: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

20

stability structures for supporting the functional components, but there

are also cases in which they are not functionally relevant, still being

elements of the source system. The complete implementation of these

geometric-space structures is accomplished through the specific

proceeding and techniques of geometric modeling.

The geometric model completes a subset of models, attached to the one

which highlights the functional-behavioral base.

The classification criteria of the models have in mind the

functional-behavioral base this last base [38].

I. In terms of their materiality, models can be abstract (theoretical,

mathematic) or material (physical, replicas).

I.1. Abstract models can be distinguished in terms of the ways of

approach and the level of knowledge about the source system:

a) in terms of their pattern of presentation, they can be:

a.1) classic, of mathematic relations:

• mathematical- analytical, to which are taken in

consideration knowledge about the properties of the source

system both in terms of quality and quantity.

• To build models you must begin, as usual, from physical

laws which can materialize in mathematic relations;

• mathematical- analogical, which use a hypothetical analogy

with a system of known physical laws. In this case, the

model is based on a unit of hypotheses from which its

behavioral effects can be concluded;

a.2) connected information input and output aggregates;

Page 21: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

21

a.3) descriptive, related in some extent by a behavior forecast

intended for explaining the behavior of the source system (it answer

the question how is it? or how will it be?).

Fig. 1.5. Complex hierarchical classification of models, [38]

Page 22: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

22

b) in terms of the configuration of the source system which is the subject

of the study:

b.1) models to which the complex, internal structure of the

modeled system are observed. In this case, the model is named

conceptual model; it stabilizes the connections with legitimate features

between the specific variables of the source system;

b.2) models to which only behavior is concerned, in the sense of

knowing the proper inputs and outputs of the source system (system

which is considered black box). These models are named informational

models, in their design only information is taken in consideration, under

concrete assets of some input/output variables, (leading operations of

the source system can be performed based on them, the model serving

this purpose).

b.3) hybrid models, in which case both aspects are taken in

consideration: structural and informational.

In practice, the hybrid models are preferred, in which an adequate

balance between the informational and conceptual aspect is carried out.

I.2. Material models (physical, concrete, substantial, replicas)

allow solving some problems by ways of experiment, issues which

cannot be resolved by analytical, mathematical way, because of not

knowing the adequate calculation procedure or because of their high

degree of complexity, resulting in more laborious and expensive

activities.

In terms of the nature of these models, there are:

Page 23: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

23

b) similar models, with the same nature as the source system,

which differs from the last one by the number, the value of

size or features. They are based on the similitude theory,

being frequently used in engineering (the construction of

buildings/roads/bridges, the construction of cars,

hydromechanics/pneumotechnics); in specific fields, such as

hydraulics or aerodynamics. These models usually bear the

name of layouts.

c) analogous models, based on different phenomena from the

ones in the source system, but whereupon the mathematical

relations which describe the behavior of the model have the

same shape as the ones which govern the source system.

II. In terms of the structure capacity of the model in elementary

models, there can be:

II.1.Synthetic models, whereupon are presented the relevant

properties in a semi-unitary model;

II.2. Structured (modular) models, these consisting of one or

more elementary models.

The general modeling theory offers numerous ways and

techniques through which are developed the specific activities which

lead to knowing a source system through an adequate model. There are

certain distinctiveness in terms of the type of the system as well as the

field in which it belongs, as well as in terms of the way in which the

proper modeling is accomplished.

Page 24: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

24

The hierarchical classification of the models must have in mind

the relevant aspects offered by the base of model type as well as the base

of system type [38] (Fig. 1.6). The superior part of the graph underlines

the types of models from the base of model type perspective, and the

inferior part refers to the base of system type of the models.

The description and presentation ways of the models

Because the models are handled like systems, the presentation

and graphic ways will be applied specific to systems, functional layouts,

block layouts, fluency graphs, principle layouts etc.

1.2.3. The concept of modeling

In a restricted sense, modeling represents the activity of the

proper elaboration of a source system model; the activities developed

in this purpose are materialized also through:

• identification techniques and procedures;

• simulation techniques;

• complementary techniques and procedures.

The stages that are implied in the modeling process are, in

general, the following:

a) the construction of the model through:

• the preliminary analysis of the source system so as to

underline the relevant parameters and the functional links

between them;

• establishing a structure of the model;

Page 25: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

25

• establishing the definitive assets of the parameters of the

model.

b) model analysis, through simulation;

c) comparing the results of the analysis with the behavior

information of the source system in equivalent circumstances;

d) comparing the model, in the sense of connecting the behavior

to that of the source system.

In a broader sense, modeling represents the study method based

on using models, method which researchers from all technical fields

(not only) use.

Modern trends in tackling the modeling theory

The modeling theory is formed of five basic elements, elements

interconnected through the so-called specific modeling relations (Fig.

1.7) [38].

This structure naturally integrates the electronic computer,

without which no modeling processes can be imagined.

The basic elements of the modeling theory are defined with the

help of concepts from the systems theory and consist of:

a) Real system (the equivalent of the source system from the

previous chapters), which represents the source of noticeable

information, which are, in most cases, pairs of input/output

information.

b) Base-model, which represents the image or mental model

through which the investigator of the models perceives the real

system. It is a system capable of offering, firstly hypothetical, the

Page 26: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

26

whole behavior of it. The high complexity of the real system

determines a complexity similar to that of the base-model.

c) The experimental background represents the set of limited

circumstances in which field the real system will be observed and

understood with the purpose of executing the modeling. It is in

fact a limited set of the behavior sizes from output:

d) The concentrated model is the most closest concept to the one of

the proper model. It represents the system capable of reproducing

the behavior at output of the real system through the limits

imposed by the experimental background. It is in fact an explicit

simplifying and a partial execution of the basic model. Its

structure is completely known by the investigator.

e) The computer is the means which helps generate the behavior of

the concentrated model. It is not mandatory that it should be

digital (numeric), and for the simple models, it can be avoided

through manual solving of the equation of the model by obtaining

some explicit analytical solutions. For more complex models,

sometimes, the computer might need generating an individual

trajectory, step by step it is associated more often with the

concept of simulation, being customary led by a digital computer.

Page 27: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

27

Fig. 1.7. The structural approach of the modeling theory

Modeling relations

The modeling relations established between the modeling

elements, as follows:

A. Validation. It aims to establish the degree in which the model

overlaps from the behavior (functional) point of view over the

real system (the source system)

B. Simplifying consists of the relations between the basic model

and its associated concentrated models. The objective of

simplifying is executing the most efficient concentrated model

within the experimental background for which it was defined.

Page 28: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

28

Simplifying can be done in different ways and implies:

• releasing the relatively insignificant variables and structures

associated with them;

• replacing the variables and determinist structures with

random variables and their generative functions;

• structuring a set of descriptive variables;

• aggregating the variables and descriptive structures in general

functional blocks.

C. Simulation consists of the relations between the model and the

computer. The objective of the simulation is to ensure that the

calculation way thoroughly reproduces the behavior induced

by the model. The behavior of the concentrated model must

offer the possibility of distinguishing between the basic model

and the one resulted from the computerized extensions or its

solutions, in the same way as the behavior of the real system

can be distinguished from the validity of its models. In the

same degree in which, for modeling, a valid model must be

executed, it is also necessary the execution of a correct

simulation. The simulation process with the concentrated

model can be a check. Many of the techniques used in

validating the models are as well used for checking the

simulations.

Page 29: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

29

2. MODELING AND SIMULATION OF SYSTEMS WITH

PETRI NETS

2.1. Petri nets. Terms. Representations

2.1.1. Places, transitions, arcs

A Petri net (PN) is a graphic model belonging to the oriented

graphs type [18], which uses two categories of pivotal points:

• Places – which model the conditions which are implied for the

execution of a certain event (represented by circles);

• Transitions – which model the events which develop if certain

conditions are fulfilled (represented by horizontal lines or by

rectangles).

Notations:

• places are noted with Pi , i ,I= 1 ;

• transitions are noted with Tj , J,1j = ;

• the set of places of a PN is noted with P;

• the set of transitions of a PN is noted with T.

Page 30: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

30

The places and transitions are connected through arcs. The arcs

are oriented, connecting a place with a transition, or a transition with a

place.

In figure 2.1 is represented a PN having as components 7 places, 6

transitions and 15 oriented arcs.

For the example from figure 2.1 the set of places is P = { P1, P2, P3,

P4, P5, P6, P7 } and the set of transitions is T = { T1, T2, T3, T4, T5, T6 }.

Regarding figure 2.1, it is stated that place P3 is an upstream or an

input for transition T3 (the arc is oriented from P3 to T3). Place P5 is a

downstream or an output for transition T3. A transition without input

place is a source transition (generator). A transition without output

place is a recessed transition (annihilator).

P1

T1

T2

P2

P3 P4

T3 T4

P5 P6

T5

P7

T6

P1

T1

T2

P2

P3 P4

T3 T4

P5 P6

T5

P7

T6

(a) (b)

Fig. 2.1. The Petri net: a) unmarked; b) marked [18]

Page 31: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

31

2.1.2. The marking

Another category used in the study of PN is the marking. Each

place contains a whole number (positive or null) of symbols (points)

which are called markings or tokens [18]. In figure 2.1.a a marked PN is

represented, and in figure 2.1.b an unmarked PN is represented.

To each place, function of existence/ inexistence of the marking

(of the symbol in general), can be associated a marking. The marking of

a place Pi is noted with M(Pi) or mi. The proper markings of the places of

the net from figure 2.1.b. are: m2 = m4 = m5 = m7 = 0, m1 = m3 = 1, m6 = 2.

The marking of the net is noted with M. For a PN with n places,

this is defined by vector M = (m1, m2, ..., mi, ..., mI). The marking of the

net from figure 2.1.b. is M = (1, 0, 1, 0, 0, 2, 0).

Note:

If n,1i},1,0{mi =∈ , PN is part of the binary Petri nets category [16].

The marking defines, at a certain point, the state of the system

modeled with the help of the PN. To illustrate this assertion, a cell of

flexible manufacturing is taken in consideration as the one represented

in figure 2.2. The cell consists of a working machine (WM) served by an

industrial robot (IR).

Fig. 2.2. Flexible manufacturing cell

IR

Page 32: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

32

The Petri net model for the respective system is the one from

figure 2.3.

Fig. 2.3. The model with the PN of the manufacturing cell

The presence of markings in places P1 (WM is free) and P2 (IA has

the object of work), figure 2.3.a, it means that the conditions for WM to

be loaded are created. After the event modeled by transition T1 takes

place (the loading instruction of the work object on WM has been

executed) the state of the system is the one described in figure 2.3.b:

places P1 and P2 are unmarked, and places P3 (WM is not loaded) and P4

(IA is free) each contain a marking.

The evolution of the state of the system complies with an

evolution of the marking.

Page 33: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

33

2.1.3. The firing of a transition

According to transitions, a transition is enabled (it may fire) only

when each place from upstream contains at least a marking. In this

case, it is stated that the transition is enable or validated.

A source transition is always validated.

In figure 2.4 - section I, are represented the firing of transitions: T1

(Fig. 2.4.a) T2 (Fig. 2.4.b), T3 (Fig. 2.4.c) and the non-executable

transition (Fig. 2.4. d).

P1 P2

P4P3

T1

P5 P6

P8P7

T2

P9 P10

P12P11

T3

P13 P14

P16P15

T4

P1 P2

P4P3

T1

P5 P6

P8P7

T2

P9 P10

P12P11

T3

( a ) ( b ) ( c ) ( d )

( I )

( II )

Ex. T1 Ex. T2 Ex. T3

Fig. 2.4. The firing of a transition [18]

The firing of a Tj transition implies two stages:

1. A marking from each from the upstream place is extracted (input

place);

Page 34: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

34

2. A marking from each from the downstream place is deposited

(output place).

The upstream and the downstream places are considered

respective to transition Tj.

The firing of transitions T1, T2 and T3 leads to the achieving of the

markings from figure 2.4 - section II.

Note:

The observations made up to this point are valid for the binary PN.

2.2. Independent and dependent Petri nets

In figure 2.5 the model with PN is presented which describes the

season cycle. To each season is appointed a place. The PN marking from

the figure corresponds to the spring season, T1 being the only validated

transition (it may fire). The following marking will correspond to the

summer season, but there is no indication about the moment in which

the transition will be fire. This PN describes the quality aspect of the

season cycle.

Fig. 2.5. The independent Petri net , [18]

Page 35: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

35

When a PN describes the performance of a system, without

specifying its evolution conditions, it is stated that this is an

independent PN [18].

In figure 2.6 is represented a PN which models the state cycles of

an engine. This is turned off, then turned on, then turned off etc. In the

proper state of the marking from figure 2.6, the engine is turned off and

the only validated transition (it may fire) is T1. The firing of transition

T1 is conditioned by producing the external event: “the running

instruction”. In this case, the system is modeled with the help of a

dependent PN.

A dependent PN describes the performance of a system when its

evolution is conditioned by external or timed events.

Fig. 2.6. Dependent PN

Page 36: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

36

2.3. Abbreviations and extensions of Petri nets

The types of PN which are to be presented do not correspond

exactly to the performance rules defined previously.

The abbreviations correspond to some simplified representations,

effective for simplifying the writing of the models, to these can be

always associated an ordinary PN (place – transition PN).

The extensions are representations to which auxiliary rules of

performance have been added, which improve the initial model, which

allows the approach of a larger number of applications.

All ordinary PN properties will be maintained, with a few

regulations, for abbreviations. Also, the ordinary PN properties are not

fully held for all extensions.

In the abbreviations category there are the following types of PN:

• generalized PN;

• capacity PN;

• colored PN.

The extensions category includes:

• dependent PN (non-autonomous).

• timed PN;

• synchronized PN;

• continuous PN;

• stochastic PN.

Page 37: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

37

2.3.1. Generalized Petri nets

A generalized PN is a PN in which to arcs are associated natural

numbers which bear the name of weight [18]. In figure 2.7 a generalized

PN in certain performance moments is represented.

According to the generalized PN from Figure 2.7 the fact that arc

P1

3T1 has weight 3 and arc T1

2 P4 has weight 2. All the arcs

whose weight is not explicit have weight 1.

In general, if a Pi p

Tj arc has a p weight, this means that

transition Tj will not be validated until place Pi will contain less than p

markings. After the firing of transition Pj, the p markings will not be

found anymore in place Pi.

P1 P2

P4P3

T1

3

2

P1 P2

P4P3

T1

3

2

P1 P2

P4P3

T1

3

2

P1 P2

P4P3

T1

3

2

Ex. T1

Fig. 2.7. Generalized Petri net

If a Tj p

Pi arc has a p weight, the firing of transition Tj

implies the addition of p markings to place Pi.

Page 38: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

38

Property:

All generalized PN can be transformed into ordinary PN (place –

transition PN).

The means of transformation is presented in figure 2.8. In figure

2.8. a. a generalized PN is presented, the weight of arc T1

2P1 being

2.

The marking of the generalized net is M1 = (0, 1, 1). The only

validated (it may fire) transition is T1. After the firing of transition T1

the M2 = (2, 0, 0) marking is achieved.

In figure 2.8.b an ordinary PN is displayed, equivalent to a

generalized PN from figure 2.8.a, in which the firing of the sequence T1’,

T1” is replaced with the firing of transition T1.

T1

2

P1

P2 P3

T2

T' 1

P1

P2 P3

T2

P0P'0

T''1

Fig. 2.8. The transformation of a generalized PN into an ordinary PN [18]

(a) (b)

Page 39: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

39

In the PN case from figure 2.8.b, the only firing transition is T1’,

after its firing there will be a single marking in P1 and a marking in P0’,

the other places remaining void. The only validated transition is then

T1”, after its firing there will be two markings in P1 and one marking in

P0. For places P1, P2 and P3 the same markings will be achieved as in the

case of the ordinary PN from figure 2.8.a.

The places P0 and P0’ have been added to ensure the firing of

transitions T1’ and T1”. Place P0 – input and output place for T2 –

opposes the execution of transition T2 and the execution of transition

T1’ and, the latter, the execution of transition T1”.

2.3.2. Capacity Petri Nets

A capacity PN is a PN in which to places are associated natural

numbers named capacities [18].

The firing of an input transition in a Pi place, when its capacity is

Cap (Pi), is not possible if this execution leads to a number of markings,

in Pi, which exceeds Cap (Pi).

In figure 2.9.a a PN whose P2 place has the capacity 2 is

represented. Transition T1 is validated and its firing leads to the

marking from figure 2.9.b. In this figure, transitions T1 and T2 are not

validated. The firing of transition T1 leads to the marking from figure

2.9.c. In this stage T1 cannot be fire, even if in P1 there is a marking,

because place P2 has reached its maximum capacity.

Property:

Page 40: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

40

All capacity PN can be transformed into ordinary PN.

The transformation is simple, being illustrated in figures 2.9. d, e,

f. A complementary place to P2 has been added, this is place P2’, whose

marking is complementary to the capacity of place P2.

I.E.:

M (P2’) = Cap (P2) - M (P2) (2.1)

Fig. 2.9. Capacity PN [18]

Page 41: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

41

Therefore if: M (P2) = Cap (P2), then M (P2’) = 0 and the T1

transition is not validated.

In the general case, to a Pi place whose capacity Cap (Pi) is finite, a

Pi’ place can be associated to it whose marking is complementary to this

capacity. All input transitions of place Pi are output transitions of places

Pi’ and vice versa.

2.4. Dependent Petri nets (non-autonomous)

Dependent (non-autonomous) Petri nets can be synchronized

and/or timed.

In case of a timed PN, to each transition is associated an event, the

transition execution occurring if the respective transition is validated

and if the associated event has taken place.

Timed PN allow the modeling of a system whose performance

depends on time.

The dependent PN category is important practically speaking.

2.4.1. Timed Petri nets

A timed Petri net allows the description of a system whose

performance depends on time. This PN category is used for evaluating

the performances of a system. Timed PN offer the possibility of

performing a quantity analysis; in this way the manufacturing tasks, the

average size of the supplies, series manufacturing catenation etc. can be

calculated. In this way, a series of parameters can be taken in

Page 42: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

42

consideration, such as: the period in which a working machine executes

an operation over a work object, the period of transport of a work

object or the waiting period of a work object in a stock in front of the

working machine, the performance period, the timeframe in which the

working machine is broken etc.

There are two possibilities to model a temporization:

• temporizations associated to places –P-timed PN;

• temporizations associated to transitions –T-timed PN.

2.4.1.1. Position-timed Petri nets

In case of this type of net, to each Pi is associated a temporization

di which can be, probably, null. In the general case, di is variable. In the

following, di will be considered constant.

Definition [18]:

A P-timed Petri net is a doublet of type <R, Tempo>,

where:

• R is a marked PN;

• Tempo is an application on the aggregate P of places in the

aggregate of positive or null rational numbers, so as:

Tempo (Pi)= di (2.2)

where di is the temporization associated with place Pi.

The performance principle

If a marking is deposited in a Pi place, this marking will remain in

Page 43: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

43

the Pi place during di, the marking being unavailable at this time. After

di has elapsed, the marking becomes available.

The availability/ unavailability of a marking is described in figure

2.10.

Fig. 2.10. P-timed Petri nets. The performance principle [18]

In the initial moment, the M0 marking consists of the available

Unavailable

marking

Available

marking

Unavailable marking in P1

( T1 is not validated)

Available marking in

Firing T1

Firing T2

Available marking in P1

( T1 is validated)

Page 44: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

44

markings. During t, the M marking is the sum of two types of markings:

• Ma – the available marking;

• Mu - the unavailable marking.

Therefore:

M= Ma + Mu (2.3)

A transition is validated for the M marking, if it is validated for the

Ma marking.

If a marking is deposited in a Pi place, following a transition

executed during t, then this marking is unavailable during (t, t+ di).

The evolution of a P-timed Petri net is presented in figure 2.11.

In version (a) the evolution of the net in general is presented,

when x, y > 0, where x and y are the periods of time which are included

between the moment when transitions T2, and T1, become firing

(validated) and the moment when the markings become unavailable in

places P1, and P2. In this situation, the net performs with its own speed.

In version b the case in which x = y = 0 is presented, which

corresponds with a performance at maximum speed of the net.

P1

P2

T1

( a )

d2=3

d1=2P1

P2

T1

T2

d2=3

d1=2P1

P2

T1

T2

d2=3

d1=2P1

P2

T1

T2

d2=3

d1=2P1

P2

T1

T2

d2=3

d1=2

xt0 ≤≤ 3xtx +<< y3xt3x ++≤≤+2y3xty3x +++<<++

⋯≤≤+++ t2y3x

T2

0t = 3t0 << 3t = 5t3 << 5t =( b )

Fig. 2.11. The evolution of a P-timed Petri net

Page 45: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

45

The markings graph, proper to a maximum speed performance, is:

0

1 T1/ 0

1

0 T2/ 3

T1/ 2

0

1

M0 M1 M2

Application

In the following, an example of manufacturing system modeled

with the help of a T-timed PN will be approached. The manufacturing

system consists of the working machines WM1 and WM2. The working

machines are served on two pallets, each carrying a piece. The pieces

gradually pass to machines WM1 and WM2 (Fig. 2.12). In the

loading/unloading point (L/UP) the semi-products are loaded on blades

and the processed pieces are carried off the blades.

Fig. 2.12. Manufacturing system with two working machines

Machine WM1 can process, at a certain moment, one piece and the

working period is D1 = 2 [time units].

Machine WM2 can process simultaneously two pieces and the

working period is D2 = 3 [time units].

The modeling of the system with the help of a P-timed PN will

have to take in consideration the following aspects:

Page 46: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

46

• Under the conditions that the WM2 machine processes

simultaneously two pieces, it results that in ST2 there will never

be pieces, so it is not necessary that a place must be associated

to stock ST2;

• Places will be defined for:

P1 – the pieces from ST1;

P2 – the piece from WM1;

P2’ – place which indicates that machine WM1 has a limited

capacity of processing, it can be filled with one piece:

M (P2) + M(P’2) = 1

P3 – the pieces on machine WM2.

• Temporizations d2 = D1 = 2 and d3 = D2 = 3 are associated to places

P2, and P3. The other places have temporizations equaled with zero.

The model of the system is presented in figure 2.13

P1

P2

T1

d2=2

T2

P3

P'2

d3=3

T3

Fig. 2.13. Model with P-timed PN

Page 47: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

47

The markings graph associated with the P-timed Petri net model

is:

0

0

)0(2

0

)2(1

)0(1

)3(1

)2(1

0

)3,1(2

0

0

)3(1

)2(1

0T1/ 0 T2T1/ 2 T2/ 2 T3T1/ 1

M0 M1 M2 M3 M4

[T2T3] T1/ 2

For the initial marking M0, T1 is executable once. Marking M1 is

achieved. After two time units, later, T2 is executed and also T1 becomes

validated. Marking M2 is achieved. After another two time units, T2

becomes again executable. M3 is achieved.

After a time unit, the first marking arrives in P1, T1 it is

immediately executed, M4 is achieved. After two time units, later, T2 and

T3 become simultaneously validated. They are fire in a random order,

then T1 is immediately executable.

The period of the cycle: M1 → M3 → M4 → M2, is of five time units.

2.4.1.2. Transition-timed Petri nets

Definition [18]:

A T-timed Petri net is a doublet of type <R, Tempo>,

where:

• R is a marked Petri net;

• Tempo is an application of the aggregate of T transitions in the

aggregate of rational or null numbers, defined by the relation:

Tempo (Tj) = dj (2.4)

Page 48: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

48

where dj is the temporization associated with transition Tj.

In case of T-timed PN, a marking may be one of the following

stages:

• reserved for the firing of transition Tj;

• non-reserved.

These hypotheses of a marking are illustrated in figure 2.14.

Reserved

marking

Non-reserved

marking

Non-reserved marking in P1

(T1 is validated)

Reserved marking in P1

(for firing T2 )

Non-reserved marking in P2

Firing T1

(end)

Firing T2

(biginning)

Firing T2

(end)

Page 49: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

49

Fig. 2.14. T-timed PN. Reserved markings. Non-reserved markings [18]

After transition T1 has been fire, a marking was deposited in place

P1. From that moment on, transition T2 is validated, its execution

starting any time. Once the execution of transition T2 has started, the

necessary marking of its execution is reserved. After time d2 has passed,

the temporization associated with transition T2, the marking is

withdrawn from place P1 and is deposited in place P2.

At any moment t, marking M, of the net, is:

M = Mr + Mnr (2.5)

where Mr is the reserved marking and Mnr is the non-reserved marking. A

transition is validated for marking M, if it is validated for marking Mnr.

Note.

If t is the moment in which the execution of transition Tj şi t + dj, is

decided, the moment in which the transition is actually accomplished, is

considered:

• t –the beginning of the transition;

• t+ dj - the end of the transition.

For T-timed PN, two ways of performance can be defined:

1. Performance at high speed – once a transition is validated; the

necessary markings for its execution are reserved.

2. Performance at its own speed – a marking deposited in a place

becomes reserved for the firing of a transition in downstream, after a

period of time which is different from zero (see the marking deposited

Page 50: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

50

in place P1 - figure 2.14).

Performance at high speed of a T-timed PN, is presented in figure 2.15.

At the initial moment (t = 0), transitions T1 and T2 are validated and

their firing can begin.

P1

P2

T1

d2=3

d1=2

P1

P2

T1

T2 d2=3

d1=2

P1

P2

T1

T2

d2=3

d1=2P1

P2

T1

T2

d2=3

d1=2P1

P2

T1

T2

d2=3

d1=2

T2

0t = 2t0 << 2t = 3t2 << 3t =Fig. 2.15. The high speed performance of a T-timed PN

For marking M1 = (1, 1), the markings from places P1 and P2

become reserved.

After two time units, transition T1 is executed and a marking is

deposited in place P2, being immediately reserved for the execution of

transition T2. For 2 < t < 3 – two markings are reserved for the

execution of transition T2.

The markings graph is the following:

1

1 T1/ 2

2

0 T2/ 1

1

1

M0 M1 M2

[ T1 T2 ] / 2

If the initial marking is M0’ = (2, 0), the performance would be the

d2=3 d2=3 d2=3

d1=2 d1=2 d1=2

Page 51: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

51

one described by the following marking graph:

0

2

2

0[ T1 T1 ] / 2

[ T2 T2 ] / 3M'0 M'1

If in a P-timed PN is possible whether the timing of the input

markings in places or those of output, for T-timed PN only the markings

which leave the place are taken in consideration, because the time in

which the marking is found in this place depends on the output

transition.

Note:

According to the way in which the two types of timed Petri nets

and their specific evolution mechanisms have been defined, it

immediately results in the dual character of the two: a timed net at the

transition level can be equivalent to one of the timed places and vice

versa.

Fig. 2.16. The transformation of a P-timed PN into a T-timed PN

d1P1

T1 T2

T3 T4

T1 T2

T3 T4

P1’

P1”

d1’= d1 T1

0 0

0 0

Page 52: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

52

The timed place P1 (Fig.2.16) can be replaced with two places P1’ and

P1”, which do not have any temporization associated. Between the two

places, a timed transition T1’ is interposed. The input transitions in

place P1’ are the same as the input transitions in place P1, and the

output transitions from place P1” are the output transitions from P1. The

temporization associated with the recently added transition has the

same value as the one associated to the place which is to be replaced:

d1’ = d1. The initial marking of place P1” is identical with the initial

marking of place P1 (M0(P1”) = M0(P1)), and place P1’ has the initial

marking null (M0(P1’) = 0).

A timed transition can be replaced by two untimed transitions

between which a timed place is interposed (Fig. 2.17). The timed

transition T1 is replaced by a subnet which consists of two transitions

T1’, T1” and a place P1’. These changes are done so as the input places in

transition T1 could be input places in the recently introduced transition

T1’, and the output places from transition T1 to be also output places for

transition T1”. The temporization associated with the recently added

place has the same value with the one associated with transition T1: d1’

= d1. The initial Petri Net marking of the places remains unchanged, and

the recently added marking place is null.

Page 53: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

53

d1 d7

P1 P2

P3 P4

P1 P2

P7

P3 P4

T1 1

T2

T3

Fig. 2.17. The transformation of a T-timed PN into a P-timed PN

Application

The manufacturing system from figure 2.18 consists of a working

machine (WM) and a stock ST, placed in front of the working machine.

Two pieces p1 and p2 are alternately processed in the system. These

pieces pass within the system through some blades. In the

loading/unloading point (L/UP), the semi-products are loaded onto the

blades and the processed pieces are removed from the blades.

Fig. 2.18. Manufacturing system with a working machine

Stock ST WM

PI / D

p1, p2

P1’

d1’= d1

T1’

T1”

Page 54: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

54

The model of the system described with an autonomous (non-timed)

PN is the one from figure 2.19.

Fig. 2.19. Model with autonomous PN

Two sub-models are highlighted, each of them describing the

processing of a type of piece. The initial marking of a PN from figure

2.19, reflects the initial state of the manufacturing system:

- in the stock placed in front of the working machine are both

types of pieces (M(P1)=M(P5)=1);

- the working machine is available for the processing of one piece

of type p1 (M(P3)=1).

Taking in consideration the processing cycles for each type of

piece, meaning 2,5 minutes for piece p1 and 3 minutes for piece p2, and

including them into the model, a timed PN is achieved. The

Processing piece p1 Processing piece p2

Page 55: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

55

temporizations will be associated to transitions T3, respectively T4. The

model achieved this way, with a T-timed PN, is the one from figure 2.20.

Fig. 2.20. Model with T-timed PN. The results of the simulation

Using the temporizations allows the evaluation of the

performance of the modeled manufacturing system. Therefore, the

loading degree of the working machine can be highlighted with pieces

of type p1 and with pieces of type p2.

In figure 2.21. the P-timed Petri net version of the respective

model of the manufacturing system is presented. Thus, the recently

introduced places (timed places), P7 and P8, will model the fact that the

working machine is loaded with pieces of type p1, respectively with the

type p2 piece. The transformation from T-timed PN in T-timed PN has

Page 56: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

56

also implied the “division” of transition T3 in T3’ and T3”, as well as the

division of transition T4 in T4’ and T4”.

The introduction of temporization at the level of elements of a

Petri Net has lead to the increasing of its modeling power and at the

catching of some quantity properties of the modeled system.

Fig. 2.21. Model with a P-timed PN

2.4.2. Synchronized Petri Nets

In an independent PN, it is known that a transition is executable if

it is validated, but it is not known when it will be executed.

Processing piece p1 Processing piece p2

Page 57: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

57

In a synchronized PN, to each transition an event is associated and

its execution will be performed if the following conditions are fulfilled:

• if the transition is validated;

• when the event associated with the transition has occurred.

The event which is associated to a transition can be an external event,

corresponding to a change in the state of the external environment.

Moreover, an internal event can be called a change of internal state, a

change of marking.

Definition [18]:

A synchronized Petri net (SPN) is a triplet of type <R, E, Sync >,

where:

• R is a marked PN;

• E is an aggregate of external events, E = { E1, E2, ...};

• Sync is an application of the aggregate of transitions T from N in E ∪

{e}, where the event which always happens (neutral element) is

placed.

Hypothesis: Two external events cannot be produced at the same

time.

The synchronized Petri nets from figure 2.22 are presented as

example.

Page 58: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

58

Fig. 2.22. The execution principle of a synchronized transition

In figure 2.22.a the external event E3 is associated to transition T1.

It is also stated that transition T1 is receptive towards the E3 event.

Transition T1 becomes executable once the E3 event has occurred (see

Page 59: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

59

the proper time-logs). At the same time, T1 is validated because place P1

contains a marking.

In figure 2.22.b. transition T2 is receptive to the E1 event.

Moreover, transition T2 is validated; it becomes executable in the

moment when event E1 has occurred. On the other hand, transition T3 is

not executable, although it is synchronized with E1, because it is not

validated at the moment when event E1 is produced.

Transition T4 from figure 2.22.c is receptive towards the E2 event.

This is fire in the moment when event E2 is produced although place P6

contains two markings, transition T4 is fire once, under the conditions

in which moment E2 is produced once. It can be conceived that this net

models an automatic distributor: place P6 models “the supply” for

distribution and the external event E2 corresponds to a payment to a

customer.

In figure 2.23.a. a PN with the initial marking M0 = (1, 0) is

presented. The aggregate of external events which conditions the

performance of the net is E = {E1, E2}. Figure 2.23.b presents the

evolution of the markings for a sequence of events which is type: Z = E2

E1 E1 E2 E1. For the initial marking T1 it is the only validated transition.

This transition is receptive to event E1. In the sequence of Z events, the

first event which is produced is E2. This fact does not determine the

evolution of the net, because transition T2, to which event E2 is

associated, is not validated.

Page 60: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

60

Fig. 2.23. Synchronized PN [18]

At the moment when event E1 is produced, transition T1 is also

fire. The set of possible evolutions being represented by the markings

graph:

← →

1

0

0

12

2

11

E/T

E/T

There are situations in which one and the same event is associated

to multiple transitions. Such a case is presented in figure 2.24.a. For the

initial marking, transition T1 is validated, this being receptive towards

the E3 event. When event E3 is produced, transition T1 is fire. Transition

Page 61: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

61

T2 becomes thus validated, transition which is also receptive to event

E3, being executed when this is produced.

Fig. 2.24. Synchronized PN with the same event associated to two

transitions

The evolution of the net markings according to the producing of

event E3 and the firing of transitions T1 and T2 is presented in figure

2.24.b.

The markings graph associated to the net in figure 2.24.a is:

← →

1

0

0

13

2

31

E/T

E/T

There are situations where the model reclaims an event which

always takes place (“zero” event, e). This kind of synchronized Petri net

is presented in figure 2.25. Transition T1 is validated being also

Page 62: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

62

receptive to event E3. When this event is produced, the transition is

executed, which leads to marking (0, 1). For this making, transition T2

becomes validated. As this is receptive to the e event, it is executed

immediately, returning thus to marking (1, 0).

Fig. 2.24. Synchronized PN with zero event

For transition T1 to be fire again, event E3 must be produced.

The markings graph is the following:

0

1 321 E/TT

For the synchronized PN from figure 2.25 the issue of determining

the stable markings is in discussion. Following marking (1, 0, 0, 0), the

occurrence of E1 event determines the execution of transition T1, then

Page 63: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

63

transition T2, is immediately executed, to which the zero event e is

associated.

T1

1E

P1 P2

T2

T5

T4T3 e

P3

2E

P4

1E2E

Fig. 2.25. Synchronized Petri Net

The stable marking: (0, 0, 1, 0) is achieved. Transition T5 being

validated at the moment when event E2 is produced, it is executed so as

the stable marking (0, 0, 0, 1) is achieved. The three markings are stable

markings which can be achieved through the firing of different

transitions according to the moment when the events associated to

them are produced. Therefore, the markings graph associated to the net

from figure 2.25 is:

1

0

0

0

0

1

0

0

0

0

0

12

51

21 E/TE/TT

23 E/T

14 E/T

Page 64: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

64

2.5. Particular Petri Nets

State graphs

An unmarked Petri net is a state graph if and only if all transitions

have one input and output place.

In figure 2.26. two examples of marked state graphs are presented

(2.26.a, 2.26.b) and also a structure which is not a state graph (2.26.c).

P3

T2

P1

T1

P2

P4 P5

T3

T4T5

T6

(a) (b)

P6 P7

T7

P8

(c)

Fig. 2.26. a, b – State graphs; c – PN which is not a state graph

Event Graphs

A Petri net is an events graph if and only if each place has one

input transition and one output transition. An events graph is also

called transitions graph.

An events graph is, therefore, the dual of a state graph.

In figure 2.27.a an events graph type of structure is presented. The

structures from figure 2.23.b and 2.23.c are not events graphs.

Page 65: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

65

P2

T4 T5

P3

T7T6

P1

T1

T2

T3

T8

(a) (b) (c)

Fig. 2.27. a – Events graph; b, c – PN which are not events graphs

Petri Net without conflict

A Petri net without conflict is a net in which all the places have one

output transition.

In figure 2.28 two structures of type PN without conflict are

presented. Places P1 and P2 (Fig. 2.28.a) have the same output transition

T1. The structure without conflict from figure 2.28.b describes a

parallelism or competitiveness situation.

P4

T4

P3

T3

T2

P1 P2

T1

(a) (b)

Fig. 2.28. Petri Nets without conflict

A conflict (structural conflict) implies that a place P1 must have at

least two output transitions T1, T2. It will be noted that this conflict with

the doublet formed from place P1 and the set of transitions: < P1, {T1,

T2,…} >.

Page 66: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

66

Free Choice Petri Net

In this category of Petri nets, two groups are distinguished [18]:

• Free choice PN;

• Extended free choice PN.

A free choice PN is a PN in which for all the conflicts <P1, {T1, T2,

...}> none of the transitions T1, T2, ... has another input place other than

P1 (Fig. 2.29.a).

An extended free choice PN is the PN in which all the transitions

“involved” in a conflict with the same set of input places. That is, if T3

has as input places P3 and P4, then T4 also has as input places P3 and P4

(Fig. 2.29.b).

P3

T2

P1

T1

P5

T4

P4

T3 T5 T6

P6

(a) (b) (c)

Fig. 2.29. Petri Nets with conflict

The structure from figure 2.29.c is an asymmetrical choice .

Simple Petri Net

A simple PN is a PN in which each transition can be related only to

a conflict. In other words, if there is a transition and two conflicts, that

is < P1, {T1, T2, ...} > and < P2, {T1, T2, ...} >, then PN is not simple.

Notes:

Page 67: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

67

1. It can be stated that the aggregate of simple PN includes the

aggregate of free choice PN, which includes the aggregate of PN

without conflict, which includes events graphs.

2. The aggregate of state graphs (of places) is included in the

aggregate of free choice PN.

3. In a state graph there can be conflicts, but not synchronizations.

4. In an events graph there can be synchronizations, but not

conflicts.

Pure Petri Nets

A pure Petri net is a PN in which there are not transitions which

have as input place a place which, at the same time, is also output place

for the respective transition [18].

Note:

All impure PN can be transformed into pure PN. This kind of

transformation is presented in figure 2.30.

(a)

P1 P'0 P0

T'1

T"1

⇔P1 T1

(b)

Fig. 2.30. The transformation of an impure PN (a) into a pure PN (b).

FIFO Petri Nets ( First - In, First - Out )

In a FIFO PN (first in, first out), the markings are distinguished in

Page 68: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

68

such a way that different messages can be modeled. The execution rules

are modified so as to model the FIFO mechanism. Each place of the net

represents a FIFO set and the place marking represents the content of

this set. Formally, this marking is a word constructed with an A finite

alphabet.

In figure 2.31.a. a FIFO PN is presented. The alphabet of the net is

A={ δγβα ,,, }. The markings which correspond to the two places of the

net are: M(P1) = βα a and M(P2) = γ δ c, where a and c are called words.

Transition T1 is validated (executable), because the loading of the input

arc in T1 is βα . This is at the same time the prefix of marking M(P1). The

firing of marking T1 consists of the retreat of prefix βα from the

beginning of the input place’s marking P1 and the addition of α (loading

of the output arc from T1), as suffix, to the output place’s marking P2.

Fig. 2.31. FIFO Petri Nets

Figure 2.31. b. represents the FIFO net after the firing of transition

Firing T1

Page 69: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

69

T1 which lead to the marking M’(P1) = a and M’(P2) = γ δ cα .

The simulation of FIFO mechanisms, using Petri nets, is very

natural. These types of models are used in the sequence process

analysis which communicates through FIFO channels.

Property:

In general, a FIFO net cannot be transformed into an ordinary

Petri net.

Petri Nets with priority

PN with priority are used when choosing a transition is imposed,

from more which are validated, in order to be executed. A Petri net with

priority implies the existence of two elements:

• a Petri net;

• an ordering relation of the net’s transitions.

Considering that the PN is presented in figure 2.32., this becomes

a PN with priority if the fact that transition T1 is a priority in terms of

transition T2 (p1 > p2) is also indicated. This means that if a marking is

acquired (achieved) so as the two transitions are simultaneously

validated, transitions T1 is first executed.

P1

T2T1p1 p2

Fig. 2.32. Petri Net with priority

Page 70: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

70

Property:

A PN with property cannot be transformed into an ordinary PN.

Petri Nets with inhibitor arcs

An inhibitor arc is an oriented arc which leaves from a Pi place in

order to reach a Tj transition. Its extremity is marked by a circle, as in

figure 2.33 – arc P2T1.

The inhibitor arc between Pi and Tj signifies the fact that Tj is not

validated (be may fire) if place Pi contains a marking. The firing consists

of the retreat of a marking from each input place in Tj, with the

exception of place Pi, and the deposition of a marking in each output

place of Tj transition.

In figure 2.33.a transition T1 is not validated because in place P1

there is no marking. Also, in the situation presented in figure 2.33.b, the

transition is invalidated because in place P2 there is a marking.

Fig. 2.33. Petri Net with inhibitor arcs

Page 71: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

71

The Petri net from figure 2.33.c is defined by the fact that transition T1

is validated (executable). The marking resulted after the firing of

transition T1 is the one from figure 2.33.d.

In order to illustrate the way in which Petri nets with inhibitor

arcs perform, a public service is considered in which customers are

allowed to enter and are to be served through an access door. Before

the serving of the customers starts, the entry door is closed. As the

customers are served, they leave through another door. The entry door

is only opened when all the customers who entered have been served

and have left.

The model of the system described is presented in figure 2.34. The

number of markings from place P2 represents the number of customers

who have entered, but have not left. Place P1 models the “entry door is

open” state. Place P3 models the “entry door is closed” state. Through

the firing of transitions T3 and T4 it is passed from one state to another.

Transition T1 models the entering of a customer. The firing of

these transitions determines the deposition of a marking in place P2,

while place P1 does not change its marking. Place P1 is an input place as

well as output place for transition T1. Under these conditions, through

the firing of transition T1, the marking of place P1, practically does not

change.

Page 72: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

72

Fig. 2.34. Model of Petri net with inhibitor arc

The firing of transition T3 models the beginning of the serving of

the customers and the closing of the entry door. This door will be able

to be opened only when all the customers who have entered have been

served and have left, that is place P2 will not contain a marking. The

restriction imposed through the inhibitor arc P2 T4, which does not

allow the execution of transition T4 only if there is no marking in place

P2.

The net from figure 2.30 cannot be equivalent with an ordinary

Petri net, because the number of customers who can enter is limited.

In general, a Petri net with inhibitor arcs cannot be transformed

into an ordinary Petri net. This thing is possible only if the Petri net

with inhibitor arcs is restricted.

Page 73: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

73

2.6. Colored Petri Nets

Colored Petri nets are used for modeling systems in which

interfere issues related to: parallelism, resources allocation (splitting),

synchronization [18]. This issues explicitly define the flexible

manufacturing systems.

In general, in a Petri net, the information is „carried” by the places.

The presence of a marking (token) in a place can model, for example, a

free, available machine tool. The absence of the marking means the fact

that the machine tool is engaged.

More markings in a place can represent a stock of identical parts.

If the diversity, the richness of the information associated with a place

from PN is expected, a method must be adopted with the help of which

markings found in the same place can be distinguished. This kind of

method is conferred by Colored Petri Nets (CPN).

2.6.1. Introduction of terms

In order to present the specific terms of colored Petri nets, two

systems are taken in consideration, as the ones from figure 2.35. In each

system a cart can move to the left or to the right. The carts are of

different colors.

Fig. 2.35. Systems modeled with PN

Page 74: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

74

In figure 2.36 each system represented in figure 2.35 has been

modeled using the PN.

Fig. 2.36. Models with PN of carts systems

For each system, places P1b, P1

r model the „moving to the left”

state and places P2b, P2

r model the „moving to the right” state.

Place P1, “moving to the left “, can be also described so as to model

the performance of both systems. This facility is conferred by colored

Petri nets, figure 2.37.

Fig. 2.37. Colored PN

Page 75: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

75

A color (identifier, symbol) has been associated to each marking:

b – for the blue cart;

r – for the red cart.

2.6.2. The term of function

Definition [18]:

The function transposes the relation which exists between the

color for which a transition is executed and the color which is

withdrawn from the input place (places) in the transition, respectively

the color which is deposited in the output place (places) from the

transition. The function is attached to the arc which connects the

transition and the input and output places.

The identical function (If) is attached to all arcs which do not

describe a transformation of colors. The execution of a transition in

terms of a certain color corresponds to the withdrawal of a marking of

the same color from the input place and the deposition of a marking, of

the same color, in the output place.

In figure 2.38 a CPN is described as well as the means of evolution

of the markings in terms of the firing of different transitions according

to certain colors.

There is also the possibility of defining complex functions.

Starting from the initial example, the two systems – the carts of

different colors – it will be displayed that, using the so-called complex

colors (composed in this case from two simple colors), for example P1,

Page 76: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

76

both the colors of the two carts as well as their direction of moving can

be described within the same place.

Fig. 2.38. The firing of the transitions of a CPN in terms of different colors

Example.

The complex color (coupling) < l, r >, associated with place P1, will

indicate the moving towards left of the red cart.

Under these conditions, a CPN equivalent with the one from figure

2.37 is the one represented in figure 2.39.

Fig. 2.39. CPN with complex colors

Page 77: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

77

Therefore to place P1 and transition T1 the aggregate of colors has

been associated:

C = {<l, r >, <l, b >, <r, r >, <r, b >} (2.6)

In the case previously presented, function f models the changing

of the direction of moving, that is:

• transforms information s and d (the direction);

• preserves information s and d (the colors).

2.6.3. Defining colored Petri nets

Definition

A colored Petri net (CPN) is a sextet of type [18]:

RPC = < P, T, Pre, Post, M0, C > (2.7)

where:

• P is the aggregate of places;

• T is the aggregate of transitions;

• Pre, Post are functions which establish the correspondence

between each color of the transition and the colors of the input

and output places in/from the transition (they are the furnaces of

the input/output arcs within/from a transition);

• M0 is the initial marking;

• C = { C1 , C2 , ... } is the aggregate of colors.

Page 78: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

78

In figure 2.40 the means of performance of a transition is

presented in terms of the color with which the transition is fire.

Pre and Post functions proper to the CPN from figure 2.40 behave

like this:

• at the execution of transition T1 in terms of the color <b>:

Pre (P1, T1 / <b>) = f (<b>) = <v> (2.8)

Post (P2, T1 / <b>) = g (<b>) = <b> (2.9)

Fig. 2.40. The performance of a CPN – the firing of a transition in terms of

a certain color

• At the execution of transition T1 in terms of the color <v>:

Pre (P1, T1 / <v>) = f (<v>) = <b> + <v> (2.10)

Post (P2, T1 / <v>) = g (<v>) = <o> + <b> (2.11)

Judging by relations (2.8) and (2.9) it can be stated that the

execution of transition T1, in terms of the color <b>, consists of the

<b>

Page 79: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

79

withdrawal of a color marking <v> from place P1 and in the deposition

of a color marking <b> in place P2.

2.6.4. Applications

Flexible manufacturing system model (FMS) with two working

machines

A FMS is taken in consideration like the one from figure 2.41. This

FMS processes two types of parts p1 and p2, onto two working

machines: machine 1 and machine 2. The parts are transported through

blades: n1 for p1 and n2 for p2. The blades are reintroduced in the

system at the end of the processing of one part.

Fig. 2.41. Flexible manufacturing system

The ordering within the system consists of the alternative

processing of the two types of parts in the succession: p1, p2, p1, p2, p1,

and so forth. The loading/unloading of blades is implied to be

performed promptly (it has an insignificant period of time).

The colored Petri net which models the system in figure 2.42.

Colors C1 and C2 are associated to the blades on which the parts are

found. That is, C1 for the type 1 blade – corresponds to part p1 - and C2

for the type 2 pallets which corresponds to part p2. The aggregate of

Page 80: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

80

colors {C1, C2} is associated to all places and transitions.

Notes used for }2,1{i∈ :

• STi, places which model the stock in front of machine i;

• MFi, places which model the fact that machine i is free;

• MEi, places which model the fact that machine i is engaged;

• T1, transition which models the loading of machine 1;

• T2, transition which models the unloading of machine 1;

• T3, transition which models the loading of machine 2;

• T4, transition which models the unloading of machine 2.

Fig. 2.42. Model with CPN of FMS

Page 81: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

81

Places ST1, ME1, ST2 and ME2 model the physical states of the

system.

Places ME1 and ME2 describe the fact that machine 1 and machine

2 are unique resources, each of them, in terms of part 1, respectively

part 2, these being split in more parts.

In the model presented in figure 2.42. the succession function is

encountered, defined like this:

Succ (C1) = C2 (2.12)

Succ (C2) = C1 (2.13)

this determining the ordering of the two types of parts in the system in

the succession: p1, p2, p1, p2 , and so forth.

The initial marking has two components:

Mo (ST1) = n1C1 + n2C2 (2.14)

meaning that in the input stock of machine ME1 there are no n1 parts

and n2 parts p2. As well as:

Mo (ME1) = Mo (ME2)=C1 (2.15)

The meaning of relation (2.15) is the one in which on each of the

two machines, the first part which will be loaded will be a type p1 part.

Model of a FMS with three workings machines

A manufacturing system is taken in consideration (fig. 2.43)

consisting of three working machines WM1, WM2 and WM3. Each

machine corresponds to an input stock, respectively: ST1, ST2 and ST3.

Within the system two types of parts p1 and p2 are processed. Parts p1

Page 82: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

82

are first processed on WM1 and then on WM2. Parts p2 are processed on

WM1 and on WM3.

Under these conditions machine WM1 is a splitting resource, this

thing implying an ordering of the processing on this machine which to

allow the alternative passing of the two types of parts: p1, p2, p1, p2, and

so forth.

Fig. 2.43. Manufacturing system consisting of three machines

The parts are passed in the system through pallets. The

loading/unloading of blades with/of semi-products/blades is done in

the loading/unloading point L/UP. N blades are available for the type p1

parts and n blades for the type p2 parts. These pallets are found at the

initial moment in the input stock of the WM1 machine.

The model of colored Petri net of the described system is

presented in figure 2.44.

The two types of parts are associated with the colors: C1 for parts

p1 and C2 for parts p2. On working machine 1 both types of parts are

Page 83: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

83

processed. Consequently, the two colors C1 and C2 will be associated to

the model components which refer to working machine 1.

• Place P1 models stock ST1;

• Transition T1 models the loading of working machine 1 with a

type p1 part or with a type p2 part;

Fig. 2.44. Model with the CPN of the manufacturing system with three

working machines

• Place P2 models the fact that working machine 1 is engaged;

Page 84: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

84

• Transition T2 models the unloading of working machine 1 of type

p1 part processed and its transfer into the stock of machine 2;

• Place P’2 models the fact that working machine 2 is free;

• On machine 2 only type p1 parts are processed. Color C1 is to be

found associated with those components of the model which refer

• to working machine 2:

• Place P3 models stock ST2;

• Transition T3 models the loading of working machine 2 with a

type p1 part;

• Place P4 models the fact that working machine 2 is engaged;

• Transition T4 models the unloading of working machine 2 of type

p1 processed part;

• Place P’4 models the fact that working machine 2 is free.

• Similarly, the model components can also be described which

refer to machine 3, having in mind that this machine processes only

type p2 parts:

• Transition T5 models the unloading of working machine 1 of type

p2 processed part and its transfer into the stock of machine 3;

• Place P5 models stock ST3;

• Transition T6 models the loading of working machine 3 with a

type p2 part;

• Place P6 models the fact that working machine 3 is engaged;

• Transition T7 models the unloading of working machine 3 of type

p2 processed part;

• Place P’6 models the fact that working machine 3 is free.

Page 85: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

85

• The initial state of the system is described through the initial

marking of the net:

• In stock ST1 are found n blades with type p1 parts and n blades

with type p2 parts (in place P1 are n colors C1 and n colors C2);

• The first part which is to be processed on working machine 1 is a

type p1 part (in place P’2 there is a C1 color);

• Working machine 2 is free for a type p1 part (in place P’4 there is a

C1 color);

• Working machine 3 is free for a type p2 part (in place P’6 there is a

C2 color).

In order to model the alternative ordering of the two types of

parts on working machine 1, to arcs T2 → P’2 and T5 → P’2 have been

associated the successor function, as it is also defined for the previous

case.

2.6.5. Predefined functions

Using simple colors is not always the most adequate choice. In the

FMS case with a more complex structure, the model becomes itself very

complex. Therefore, using complex colors and predefined functions is

recommended. (Table. 2.1) [18].

Table 2.1. Predefined function

FUNCTION DEFINITION NOTES

ANY

COLOR

Id Id (<ci>) = <ci> Identification

Dec Dec(<ci>)=< > Decoloration

Page 86: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

86

FUNCTION DEFINITION NOTES

SIMPLE

COLOR

Succ Succ(<ci>) = ci+1 Successor (increment)

Prec Prec(<ci>) = <ci-1> Predecessor

(decrement)

COMPLEX

COLOR

Succ1 Succ1`(<ci,cj>) = <ci+1,cj> Incrementing a

component Succ2 Succ2`(<ci , cj>) = <ci,cj+1>

Proj1 Proj1(<ci , cj>) = <cj> Removing a component

Proj2 Proj2(<ci , cj>) = <ci>

Modeling a manufacturing system with CPN

The manufacturing system from figure 2.41 is taken in

consideration. The model of the Colored Petri Nets system using

complex color and predefined functions is the one presented in figure

2.45. In this model the notes used have the following meanings:

• Place P1 (ST) models the stock in front of each machine;

• Place P2 (ME) models an engaged machine;

• Place P3 (MF) models a free machine;

• Transition T1 models the loading of a machine;

• Transition T2 models the unloading of a machine.

In the construction of the model the basic color <ci ,mj > is used

which defines the fact that part pi (i = {1,2}) is processed on machine mj

(j = {1,2}). A marking of color <ci ,mj > in place P1 (ST) signifies the

existence of a type pi part in the input stock of machine j. A marking of

the same color in place P3 (ME) signifies the fact that machine j is

available and is about to process a type pi part.

Page 87: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

87

Function Succ1, indicated for a machine, gives the processing

instruction of the products on this machine, that is : p1, p2, p1, p2,…, and

so forth. This function is applied to the first component of the doublet

<ci, mj>:

Succ1`(<ci , cj>)=<ci+1,cj > (2.16)

Fig. 2.45. Manufacturing system model with CPN and complex colors

Function Succ2 corresponds to the manufacturing series of pi

parts. This function gives the instruction in which a pi part is processed

on the two machines. In this case, the increment is done on the second

component of the doublet:

Succ2`(<ci , cj>)=<ci,cj+1> (2.17)

Page 88: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

88

The initial marking has the following definition:

• M0 (ST) = n1 <c1, m1> + n2 <c2, m1> ;

In the input stock in front of machine 1 are waiting n1 parts p1 and

n2 parts p2.

• M0 (MF) = <c1, m1> + <c1, m2> ;

Machines 1 and 2 are available and are about to process a p1 part.

Starting from the initial marking (which models the initial state of

the manufacturing system) we learn that the only validated transition is

T1. This can be fire in terms of the complex color <c1,m1>. This means

loading machine M1 with a type p1 part. The net marking will be the one

from figure 2.46.

Fig. 2.46. CPN Marking after the firing of transition T1

(loading machine MF1 with a type p1 part)

Page 89: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

89

Modeling a transport system of conveyor type with CPN

A transport system of conveyor type is taken in consideration, as

the one from figure 2.47.

Fig. 2.47. Linear conveyor

The lineal conveyor presented in figure 2.47 can simultaneously

transport q types of working objects (parts): o1, o2, …, oq. The maximum

number of objects that can be simultaneously transported is n (n = 8);

this being the number of settlements on the conveyor.

In the actual situation presented in figure 2.47 there is an object

o2 in settlement no. 2 and an object o1 in settlement no. 4, an object o4 in

settlement no. 6 and an object o1 in settlement no. 7.

The model which describes the system is the one from figure 2.48.

The meanings of the notes used are the followings:

• Place Pg models the empty settlements;

• Place Pp models the full settlements;

• Transition T1 models the entering of an object on settlement 1;

• Transition T2 model the exit of an object from settlement 8;

• Transition T3 models the transfer of an object from a settlement to

another.

• The aggregates of simple colors are:

• The aggregate of objects: O = {<oj >, 1≤ j ≤ q}

Page 90: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

90

Fig. 2.48. The CPN initial marking which models the initial state of the

conveyor

• The aggregate of settlements: R = {<ri>, 1≤ i ≤ n}

• The aggregate of colors A, associated with transition T3 is: A = O

x {r1,r2,…,rn-1}.

A color marking <oj , ri > in place Pp has the meaning that in

settlement I is a j object.

In the model interferes the multiplex function: Proj1·Succ2:

• Function Succ2 which “manages” the objects in the system;

• Function Proj1 which “manages” the settlements.

Using the multiplex functions allows the decreasing of the number

of functions, although preserving their meaning.

<o2,r2> <o1,r4> <o4,r6> <o1,r7>

Page 91: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

91

For the case taken in consideration, starting from the initial

marking transition T1 is executable in terms of the color <oj, r1>. At the

execution of transition T1 a marking <r1> is withdrawn from place Pg

and a marking <oj, r1> is deposited in place Pp.

Starting from the initial marking (Fig. 2.48) and having in mind

the CPN definition, the means of performance of the net can be

described:

• The entering of a type o3 object on settlement 1 (the execution of

transition T1 in terms of the multiplex color <o3, r1>):

Pre(Pg ,T1/ <o3, r1>) = Proj1(<o3, r1>) = <r1> (2.18)

Post(Pp,T1/ <o3, r1>) = Id(<o3, r1>) = <o3, r1> (2.19)

The marking resulted from the execution of transition T1 in terms

of the multiplex color <o3, r1> is the one from figure 2.49.

Fig. 2.49. The CPN marking resulted from the firing of transition T1

<o2,r2> <o1,r4> <o4,r6> <o1,r7> <o3,r1>

Page 92: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

92

As the state of the system through the CPN initial marking is

described, transition T2 cannot be executed. Practically, no object can be

removed from the system because settlement 8 is empty.

• The transfer of object o2 from settlement 2 to settlement 3 is

modeled by transition T3 which is executed in terms of the color <o2,

r2>. Therefore:

Pre(Pp ,T3/ <o2, r2>) = Id(<o2, r2>) = <o2, r2> (2.20)

Post(Pp ,T3/ <o2, r2>) = Succ2(<o2, r2>) = <o2,r3> (2.21)

Pre(Pg ,T3/ <o2, r2>) =Proj1 Succ2 (<o2, r2>) = <r3> (2.22)

Post(Pg ,T3/ <o2, r2>) = Proj1(<o2, r2>) = < r2> (2.23)

The marking resulted is the one from figure 2.50.

Fig. 2.50. The CPN marking resulted from the firing of transition T3

Modeling a complex manufacturing system with colored Petri nets

<r2>

<o2,r3> <o1,r4> <o4,r6> <o1,r7> <o3,r1>

Page 93: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

93

A flexible manufacturing system is taken in consideration

consisting of three working machines served by a lineal conveyor (Fig.

2.51).

Three different types of parts are processed in the system, each

type on a different machine. It is implied that the type 1 parts are

processed on machine WM1, type 2 parts are processed on machine

WM2 and the type 3 ones on the machine WM3.

The hypothesis that the parts arrive in the system in a random

order is done, in undefined parts of time. Under these conditions, the

model will be constructed with an independent colored Petri net –

without having in mind the time parameter.

Fig. 2.51. Manufacturing system with three working machines served by

a conveyor

In order to build a discrete model of conveyor the division of the

conveyor in equal sections (settlements) is imposed as in figure 2.51. 12

sections (settlements) are taken in consideration, whose total length

corresponds with the length of the conveyor. The 12 settlements can be

assimilated with 12 blades of the same length.

The actual situation which is to be analyzed is the one in which a

blade enters in the system which transports a type 2 part. This is

Page 94: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

94

transported through the conveyor to settlement (section) 7, this is the

settlement on which the working machine WM2 is loaded. The part

together with the blade will be loaded on the WM2 machine, if this is

free. The releasing of machine WM2 consists of the unloading of the

blade on which is situated the part processed by the machine and its

deposition on settlement 8.

To each machine corresponds two sections: an input section and

an output section. The input sections for WM1, WM2, WM3 are

settlements, respectively, 3, 7 and 10. Moreover, the output sections

proper to the three types of machines are respectively: 4, 8 and 11.

The model with colored Petri net (Fig. 2.52) will consist of two

sub-models:

A sub-model which will describe the transport system (the

conveyor);

• A sub-model which will describe the state in which the three

machines are at a given moment.

• Two basic colors are necessary for the construction of the

model:

• The colors <oj>, associated at the same time to the parts

processed in the system and to the machines on which the

processing is done. The aggregate of these colors will be noted

with:

O = { <o1>, <o2>, <o3> } (2.24)

• Colors <ri> which will model the settlements of the conveyor

are

R = {<r1>, <r2>,…,<r12>} (2.25)

Page 95: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

95

Fig. 2.52. Model with CPN of the EMS from figure 6.1

Page 96: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

96

The couple (complex color) <oj, ri> identifies a part type j and the

place in which it is found. The aggregate of colors associated with

transitions T4 and T5 is:

B = { <o1, r3>, <o2, r7>, <o3, r10> } (2.26)

and this ensures the correspondence between each type of part and the

machine on which these are processed.

The aggregate of colors associated with transition T3 is:

A = O x {<r1>, <r2>,…,<r11>} – B (2.27)

meaning the aggregate of B colors which is not found in aggregate A,

modeling the condition that a blade is not to “pass” the machine

ordained for the processing of the part it contains.

The meanings of the model components are the following:

• P1 – models the free settlements;

• P2 - models the engaged settlements;

• P3 – models the fact that a machine is engaged;

• P4 - models the fact that a machine is free;

• T1 – model the entry of a part in the system;

• T2 - model the exit of a part from the system;

• T3 – models the transfer of a part (blade) from one settlement

into another;

• T4 – models the loading of a machine;

• T5 - models the unloading of a machine.

Page 97: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

97

In order to illustrate the means of performance of a model the

case in which the issue of processing a type 2 part will be taken in

consideration. The introduction of this kind of part in the system is

modeled through the firing of transition T1 in terms of color <o2, r1>,

under the condition that settlement 1 of the conveyor is free. The firing

of transition T1 can be described like this:

Pre (P1, T1/ <o2, r1>) = Proj1 (<o2, r1>) = <r1> (2.28)

Post (P2, T1/ <o2, r1>) = Id (<o2, r1>) = <o2, r1> (2.29)

The modeling of the moving of the blade with the help of the

conveyor is done through successive firing of transition T3.

Pre(P2 ,T3/ <o2, r1>) = Id(<o2, r1>) = <o2,r1> (2.30)

Post(P2 ,T3/ <o2, r1>) = Succ2(<o2, r1>) = <o2,r2> (2.31)

Pre(P1 ,T3/ <o2, r1>) =Proj1 Succ2 (<o2, r1>) = <r2> (2.32)

Post(Pg ,T3/ <o2, r1>) = Proj1(<o2, r1>) = < r1> (2.33)

Consequently, place P2 will consist of a color marking <o2, r7>.

From settlement 7, the WM2 machine will be loaded with a type 2 part

with the purpose of processing if this, the machine, is free. On the terms

Page 98: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

98

that WM2 is free, it is modeled through the presence of a marking <o2>

in place P4. The firing of transition T4 can be described like this:

Pre (P4, T4/ <o2, r7>) = Proj2 (<o2, r7>) = <o2> (2.34)

Post (P3, T4/ <o2, r7>) = Id (<o2, r7>) = <o2, r7> (2.35)

The unloading of machine WM2 of the part which was processed

will be done if the proper output settlement is free, meaning that in

settlement 8 there is no blade. The modeling of the unloading of

machine WM2 is done through the firing of transition T5 in terms of the

color <o2, r7>, that is:

• WM2 machine is released:

Pre (P3, T5/ <o2, r7>) = Id (<o2, r7>) = <o2, r7> (2.36)

Pre (P1, T5/ <o2, r7>) = Proj1 Succ2 (<o2, r7>) = <r8>

• Settlement 8 is loaded with a type 2 part:

Post (P4, T5/ <o2, r7>) = Proj2 (<o2, r7>) = <o2> (2.37)

Post (P2, T5/ <o2, r7>) = Succ2 (<o2, r7>) = <o2, r8> (2.38)

• Settlement 7 becomes free:

Post (P1, T5/ <o2, r7>) = Proj1 (<o2, r7>) = <r7> (2.39)

Through the successive firing of transition T3 the transfer of the

processed part from one settlement to another is modeled, and through

the firing of transition T2 the removal of the part from the system is

modeled.

Page 99: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

99

2.7. Continuous Petri nets and hybrid Petri nets

In a Petri net, the marking of a place can correspond to the state of

a machine, for example, a machine is available or not. This marking is

compared with the Boolean variable. A marking can also be associated

with a whole number, for example, the number of pieces in the input

stock of a machine. In this second case, the number of markings can be a

large number. This can lead to a number of available markings so large

that it consists of a boundary when using the Petri nets. The

manufacturing systems have been modeled taking in consideration the

number of pieces a real number, this approximation is, in general, very

satisfying.

The Petri net continues, it is a model in which the number of

markings from the places are real numbers. In the continuous Petri nets

case, the execution process of the transitions is a continuous one,

defined by its own speed. The marking of a place changes in evanescent

quantity, in terms of the execution speed of the validated transitions. In

this way, the modeling power of the net is more increased than the one

proper to the discrete version.

Hybrid Petri nets have a discrete component and a continuous

component.

The study of these types of nets is explained in [18].

Continuous Petri nets are well adapted to model a permanent

performance. However, in a manufacturing system, a machine can break

down and its proper maximum speed becomes null. This situation can

be modeled through a hybrid Petri net which contains places and

Page 100: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

100

continuous transitions (C - places and C - transitions) and places and

discrete transitions (D - places and D - transitions).

Fig. 2.53. The knots of a hybrid Petri net

To distinguish the discrete places from the continuous ones and

the discrete transitions from the continuous ones, the representation

from figure 2.53 is used.

In the hybrid Petri nets case, the continuous component is a

continuous Petri net with constant speeds (CCPN). But this is not a

restriction, because a continuous Petri net with variable speeds could

also be considered in a hybrid Petri net. Although the second model is

less interesting in the practical applications.

In the structure of a model with hybrid Petri nets two sub-models

are therefore encountered:

• The sub-model with discrete Petri net, which contains discrete

places and discrete transitions:

• Sub-model with continuous Petri net, consisting of continuous

places and transitions.

These are interconnected through arcs, which can connect

discrete knots to continuous knots. A fact which is important and comes

as a support to the statement from above is that, in certain situations,

Page 101: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

101

one of the two parts can influence the behavior of the other without

causing changes in the marking. In other situations, the execution of a

discrete transition can change both the continuous marking as well as

the discrete one.

An intuitive presentation of the hybrid Petri nets will be made by

taking in consideration a few examples.

Example 1

In figure 2.54. is presented a manufacturing system in which the

working machine WM undertakes the semi-products from an input

stock, and the processed pieces are deposited in an output stock.

The working machine can be found in two states: the “running

machine” state and the “stopped machine” state.

Fig. 2.54. Manufacturing system with one working machine

In figure 2.55 is presented the model with the hybrid Petri net for

the described system. In this model, the state of the discrete part

influences the behavior of the continuous part.

The discrete component has the role of modeling the passing from

the “running machine” state to the “stopped machine” state. The

structure of the discrete sub-model implies the following knots:

• Discrete place P1 models the “running machine” state;

Page 102: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

102

• Discrete place P2 models the “stopped machine” state;

• Discrete transition T1 models the passing from the “running

machine” state to the “stopped machine” state;

• Discrete transition T2 models the passing from the “running

machine” state to the “stopped machine” state;

• Discrete place P3 models a running instruction of the working

machine.

Fig. 2.55. The influence of the discrete part over the continuous part [18]

The discrete component has the role of modeling the proper

processing operation.

• Continuous place P4 models the input stock;

• Continuous place P5 models the output stock;

• Continuous transition T3 models the processing of a piece on to

the working machine WM.

Discrete

component (of

instruction)

Continuous

component (the

proper system)

m4

m5

Page 103: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

103

The continuous firing of transition T3 corresponds to a continuous

processing with V3 speed when place P1 is not empty. This thing is

possible when the machine is operational (place P1 has a marking).

When there is no marking in P1, transition T1 is no longer

validated, it is not fired any more. If P1 is marked, the execution of a V3dt

quantity of T3 corresponds with the removal of a quantity of V3dt

markings from P1 and the addition of the same amount to P1. The

markings P1 therefore remain constant with value 1.

The markings of the places P4 and P5 can be associated with an

amount of water in two tanks and place P1 can model an open bathtub.

Example 2

A second example (Fig. 2.56) highlights the mutual influence of

the two components of a hybrid Petri net.

Fig. 2.56. The mutual influence of the two components [18]

Discrete component

(of instruction)

Continuous component

(the proper system)

m3

m4

w1

w1

Page 104: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

104

The state of the continuous part influences the evolution of the

discrete part. If P1 is marked, then T1 will be validated when m4 ≥ w1.

The marking of place P4 is not changed through the firing of T1, because

of the weights of the arcs P4→T1 şi T1 →P4 are the same (that is w1).

Example 3

A system consisting of two tanks T1 and T2 interconnected with

each other is taken in consideration (Fig. 2.57).

Fig. 2.57. System consisting of two interconnected tanks with pump and

valve

The real system performs under the influence of external events,

these being actually the instructions which are given to some of its

components (pump, connection valve between tanks, level transducers

etc.). This thing offers the system a duality in terms of its evolutions:

there are components whose states can be modeled continuously and

there are components whose performance can be described through

discrete parameters.

Page 105: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

105

Therefore, the system will be modeled with a hybrid Petri net (Fig.

2.58). The continuous component models the two interconnected tanks,

more precisely, the way in which the level of liquid varies in these

tanks. The discrete component models the instruction sub-system,

more precisely; it describes the “performance” or “stopped” state of the

pump, respectively the “open” or “closed” state of the valve. This hybrid

structure offers a larger flexibility to the model.

In the initial state, in which the level of the liquid from tank T1 is

h1, and in tank T2 it is h2, tank T is open, and the pump is not running.

After a period of time equal to the temporization d3 associated with

transition T3, tank T is closed and the pump starts running. It performs

a d4 period of time, which corresponds to the temporization associated

with transition T2. The evolution of the system is cyclical, between the

“open” – “closed” states of tank T, respectively “stopped” – “running”,

for the pump, (Fig. 2.58).

The simulation highlights the way in which the performance

parameters vary and the states of the system components using the

diagrams associated to the places of the model.

The initial conditions in which the simulation took place were the

following:

• The initial level of the liquid from tank T1 was h1 = 120 cm (1200

mm);

• The initial level of the liquid from tank T2 was h2 = 60 cm (600

mm);

• The overflow with which the liquid passes from tank T1 in tank T2,

is Q2 = 3 l/s;

Page 106: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

106

• The overflow with which the pump fills the tank T is Q1 = 2 l/s;

• In the initial moment, valve V is open (there is marking in P3: m3 =

1);

Fig. 2.58. Model with hybrid Petri net of the system consisting of two

interconnected tanks

Page 107: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

107

The hybrid Petri nets imply different connections and

transformations among the components bearing discrete nature and

the components with continuous nature. In the following, a few cases of

this kind will be described.

In figure 2.59 the transformation of continuous markings in

discrete markings and vice versa will be described through the discrete

transitions. This represents a third example.

Fig. 2.59. The transformation of continuous markings into discrete

markings

In figure 2.59.a, transition T1 is not validated, only in figure 2.59.b,

T1 it is validated because m1 = 100 (the weight of arc P1→T1). The

execution of transition T1 consists of the withdrawal of 100 markings

(real number) from place P1 and the deposition of a marking (whole

number) in P2 (Fig. 2.59.c). This can model the manufacturing of a stock

of 100 parts or the filling of a bottle (1 liter) when 100 centiliters are

available.

The transformation of discrete markings into continuous

markings is described in figure 2.60.

Page 108: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

108

Fig. 2.60. The transformation of discrete markings into continuous

markings

The firing of a discrete transition is presented in figure 2.61. The

input places of the discrete transition T1 can be continuous (P3) or/and

discrete (P1). Moreover, the output places can be continuous (P4) or

discrete (P2), without any restriction. In figure 2.61.a, transition T1 is

validated when m3 ≥ 3.1 and m1≥1. The firing of T1 determines the

withdrawal of 3.1 markings from place P3 and of the marking from

place P1. On the other hand, a marking is added (real number) to place

P4 and 2 markings to place P2, according to the weights associated to the

arcs.

Fig. 2.61. The firing of a discrete transition

Page 109: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

109

The firing of a continuous transition is presented in figures 2.62.a

and 2.62.b. For figure 2.62.a transition T2 is validated. It is implied that

an amount of 0,1 is executed. The marking from figure 2.62.b. is

achieved. It is noticed that an amount of 0,1 marking is withdrawn from

place P6, and in place P7 0.3 marking is deposited (according to the

weight of arc T2→P7).

Fig. 2.62. The execution of a continuous transition

Because of the existence of an arc P5→T2 and of an arc T2→P5 ,

from/in place P5 a marking is withdrawn/deposited.

2.8. Stochastic Petri nets (SPN)

2.8.1. Introduction

In a timed Petri net, to each place (P-timed PN), or to each

transition (T-timed PN) is associated an exact period. These types of

nets are used in the construction of the models of flexible

Page 110: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

110

manufacturing systems (FMS) in which the period of operations is exact

(constant). It is the case of a FMS in which the working period of a

machine which performs a certain operation is constant.

On the other hand, during the manufacturing process, phenomena

can appear whose period of time cannot be measured thoroughly. It is

the case of the performing period between two consecutive

breakdowns of a working machine. This period can be modeled through

a random variable. In this context the opportunity of using Stochastic

Petri Nets (SPN) is encountered.

The most used hypothesis is the one in which the temporizations

are distributed according to an exponential law.

The marking M(t) of a SPN is a homogenous Makovian process,

under these conditions to each SPN a homogenous Markov chain can be

associated. Therefore, the SPN analysis involves the specific PN

analyzing methods and the ones proper to the waiting sets. The results

reflected through the invariants of the markings and the invariants of

the executions are easily assimilated to the Stochastic Petri Nets.

Marking conservation and execution rate concepts are introduced [28].

The conservation of the medium marking and the average

frequency of firing of transitions in a permanent regime are mostly

interesting.

The method of analysis consists of:

• the construction of markings graphs;

• assigning to each arc a proper execution rate.

The random behavior of SPN is identical to that of a Markov

homogenous and determined chain. Putting in practice the solution

Page 111: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

111

methods of a Markov chain, the probability of the states in permanent

regime is calculated. Then, the performance indicators can be

inferential, such as the average number of markings in each place in

permanent regime, or the average execution frequencies of markings of

execution of the net’s transitions.

When more transitions are validated the transition which will be

chosen to be executed must be defined. There are two models (criteria)

of choosing a transition which is to be executed:

1. the comparative model – the transition with the lowest

associated time is executed;

2. the preset model – to each transition is associated a loading

(w). This criteria is available under the condition that the time

units associated to the transitions are even.

Example:

In figure 2.63 two transitions are presented which have attached

the same function which describes the execution period. The selection

of the transition which is to be fired is performed starting from the

loading associated to each transition. In this situation the probabilities

of execution of both transitions are determined:

T1 T2)5x()x(f1 −δ= )5x()x(f2 −δ=

P2

P1 P3

P4

1w 2w

Page 112: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

112

Fig. 2.63. Determining the probability of execution based on loading

The probability of firing of transition T1:

1T1

1 2

wP

w w=

+ (2.40)

The probability of execution of transition T2:

2T2

1 2

wP

w w=

+ (2.41)

2.8.2. Definitions. Specific terms

A SPN is defined, a net consisting of the following elements [30]:

RPS=<P,T,C,M0,λ> (2.42)

where:

- the aggregate of places: P = {P1,P2,…,Pn};

- the aggregate of transitions: T = {T1,T2,…,Tm};

- C- incidence matrix:

C Post Pr e= − (2.43)

- M0- initial marking;

- λ - an application on the aggregate of transitions in the aggregate

of execution rates of the transitions:

Page 113: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

113

1 2 m: T { , , ..., }λ λ λ λ→ (2.44)

In order to analyze a SPN two complementary approximations are

performed:

1. The conservation property of a SPN is taken in consideration,

inferential from the calculation of the invariants of the markings’ places

and the firing of transitions, thus achieving the conservation relations of

the markings and of the execution rates.

2. The graph of available markings of a PN is designed and to each

ark is attributed an execution arc which depends on the rate associated

to the transition and on the place marking encountered upstream by

this transitions.

The execution rates of the transitions have an exponential

distribution of type:

xf ( x ) e λλ −= (2.45)

2.8.3. The study of SPN

In the SPN case, for a marking M, to a transition Tj can be

associated an execution rate λj(M). If transition Tj has an execution rate

λj and if this transition is validated q, then:

j j( M ) qλ λ= ⋅ (2.46)

The period of execution Dj in M state (the period of time between

the moment in which the transition is validated and the moment in

which it will be executed) has a distribution function of type:

Page 114: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

114

( M )tjjH (t ) 1 e

λ= − (2.47)

and a distribution density:

( M )tjj jh e

λλ −= (2.48)

Let it be T(M) the aggregate of validated transitions through

marking M. If Tk∈T(M), then the conditioned probability of firing of this

transition, starting from marking M, is:

kk j

kj

( M )Pr(T / M ) , T T( M )

( M )

λλ

= ∈∑

(2.49)

The period of remaining in state M follows an exponential law of

parameter:

j j

j

( M ) ( M ) , T T( M )λ λ= ∈∑ (2.50)

The average remaining time in marking M is:

med

1T

( M )λ= (2.51)

Conservation properties

The conservation of the average marking in stationary regime

The conservation property of the average marking in stationary

regime is expressed through the relation:

Page 115: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

115

T * TX M X M(0 )= (2.52)

where:

• TX - the invariant associated to the autonomous PN proper to SPN;

• M* - average marking vector in stationary regime;

• M(0) – initial marking

The conservation of the flow in stationary regime

The conservation property of the average marking in stationary

regime is expressed through the relation:

C F* 0⋅ = (2.53)

where:

• C: incidence matrix;

• F* - the average frequency vector of the transitions in stationary

regime.

The formula of Little for SPN

The formula of Little proper to the waiting sets can be adapted to

a SPN. Under these conditions, the average remaining time of a marking

in place Pi is:

ii *

i

M * ( P )D* ( P )

Post F=

⋅ (2.54)

Markov processes

Page 116: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

116

The generator of the Markov process associated with a SPN is a

square matrix of LxL size, where L is the finite number of states proper

to the Markov chain.

This matrix is defined in this manner:

ij ij

ij ik

a ,daca i j ;A

a ,daca i j , k i ;

λλ= <= = − = ∀ ≠ ∑

(2.55)

A lineal vector Pr* of L size is taken in consideration, in which

component k represents the probability in which the SPN is to be found

in marking Mk. This component is noted with kPr * . Having matrix A

through solving the homogenous lineal system:

Pr* A 0= (2.56)

under the condition:

L*k

k 1

Pr 1=

=∑ (2.57)

the probability of states in stationary regime are achieved.

Staring from Pr* three important parameters can be determined:

• The average frequency of firing for each transition Tj:

* *j j kf ( k ) Prλ= ⋅∑ (2.58)

Transition Tj is executable starting from marking Mk.

• The average marking of each place Pi in permanent regime is:

Page 117: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

117

L* *

i k i k

k 1

M ( P ) M ( P ) Pr=

=∑ (2.59)

• The average remaining period of a marking in each of the SPN

places, in permanent regime – the relation (2.54).

Example

The stochastic Petri net from figure 2.64 is taken in

consideration. The issue of determining the properties of the net is

discussed.

T1 1λ

T2 2λ

T3

T4

P1

P2 P3P44λ

Fig. 2.64. Stochastic Petri net

The markings graph associated to the net is the one from figure 2.65.

Page 118: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

118

[ ]0002

[ ]0111

[ ]0202 [ ]1011

[ ]1210

[ ]2200

T2 T1

T3T4

T4

T3 T1

T2

T2

T1 T3

T4

M0

M3

M1

M2

M4

M5

Fig. 2.65. The markings graph

Associating each net marking with a state of the modeled system

and taking in consideration the execution rates of the transitions as

being the rates of the passing from a state to another, to the stochastic

Petri net can be associated a Markov chain (Fig. 2.66).

S5

S4

S3S2

S1

S0

12λ 2λ

1λ4λ

3λ1λ3λ

Fig. 2.66. The Markov chain associated to a stochastic Petri net

Page 119: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

119

The proper matrix of the Markov chain is, as it was defined by the

relation:

A =

0 1 2 3 4 5

0 1 1

1 2 1 2 3 1 3

2 2 1 3 3

3 4 1 4 1

4 4 2 2 3 4 3

5 4 4

S S S S S S

S 2 2 0 0 0 0

S ( ) 0 0

S 0 ( ) 0 0

S 0 0 ( ) 0

S 0 0 ( )

S 0 0 0 0

λ λλ λ λ λ λ λ

λ λ λ λλ λ λ λ

λ λ λ λ λ λλ λ

−− + +

− +− +

− + +−

For the example in figure 2.64 the firing frequencies of the four

transitions are taken in consideration 1 2 3 4 1λ λ λ λ= = = = . Matrix A

becomes in this case:

2 2 0 0 0 0

1 3 1 1 0 0

0 1 2 0 1 0A

0 1 0 2 1 0

0 0 1 1 3 1

0 0 0 0 1 1

− − −

= − −

Relation (2.56), for the example taken in consideration, becomes:

[ ]0 1 2 3 4 5

2 2 0 0 0 0

1 3 1 1 0 0

0 1 2 0 1 0Pr * Pr * Pr * Pr * Pr * Pr * 0

0 1 0 2 1 0

0 0 1 1 3 1

0 0 0 0 1 1

− − −

⋅ = − −

The condition must be also checked:

0 1 2 3 4 5Pr * Pr * Pr * Pr * Pr * Pr * 1+ + + + + =

Page 120: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

120

Solving the equations system the following probabilities result for

each of the six possible states (markings):

0

1Pr *

11=

1 2 3 4 5

2Pr * Pr * Pr * Pr * Pr *

11= = = = =

The average execution frequencies for each transition are determined

with the relation.

• The average execution frequency of transition T1:

1 0 1 1 1 3 1

1 2 2 6f * Pr * 2 Pr * Pr * 2 1 1 1

11 11 11 11λ λ λ= ⋅ + ⋅ + ⋅ = ⋅ ⋅ + ⋅ + ⋅ =

• The average execution frequency of transition T2:

2 1 2 2 2 4 2

6f * Pr * Pr * Pr *

11λ λ λ= ⋅ + ⋅ + ⋅ =

• The average execution frequency of transition T3:

3 1 3 2 3 4 3

6f * Pr * Pr * Pr *

11λ λ λ= ⋅ + ⋅ + ⋅ =

• The average execution frequency of transition T4:

4 3 4 4 4 5 4

6f * Pr * Pr * Pr *

11λ λ λ= ⋅ + ⋅ + ⋅ =

The average markings (the average number of the markings) of the

net places are determined with the relation (2.59).

• Place P1:

Page 121: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

121

1 0 1 3

1 2 2 6M * ( P ) 2 Pr * 1 Pr * 1 Pr * 2 1 1

11 11 11 11= ⋅ + ⋅ + ⋅ = ⋅ + ⋅ + ⋅ =

• Place P2:

2 1 2 4

6M * ( P ) 1 Pr * 2 Pr * 1 Pr *

11= ⋅ + ⋅ + ⋅ =

• Place P3:

3 1 2 3 4 5

16M * ( P ) 1 Pr * 2 Pr * 1 Pr * 2 Pr * 2 Pr *

11= ⋅ + ⋅ + ⋅ + ⋅ + ⋅ =

• Place P4:

4 3 4 5

8M * ( P ) 1 Pr * 1 Pr * 2 Pr *

11= ⋅ + ⋅ + ⋅ =

For determining the average remaining time of the markings in the

net places the relation (2.54) is put in application. The Post matrix

associated with the relation is:

0 1 0 0

1 0 0 1Post

1 0 0 0

0 0 1 0

=

• The average remaining time of the markings in place P1:

1 11

1 2

M * ( P ) M * ( P ) 6 11D* ( P ) 1

Post F * f * 6 11= = = =

Page 122: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

122

• The average remaining time of the markings in place P2:

2 22

2 1 4

M * ( P ) M * ( P ) 6 11 1D* ( P ) 0 ,5

Post F * f * f * 6 11 6 11 2= = = = =

⋅ + +

• The average remaining time of the markings in place P3:

3 33

3 1

M * ( P ) M * ( P ) 16 11 8D* ( P )

Post F * f * 6 11 3= = = =

• The average remaining time of the markings in place P4:

4 44

4 3

M * ( P ) M * ( P ) 8 11 4D* ( P )

Post F * f * 6 11 3= = = =

2.8.4. The definition of the models. Applications

In order to show the way in which models can be defined with the

help of SPN, some examples will be taken in consideration:

Application 1

In figure 2.67 a manufacturing system is presented which consists

of two working machines (WM1 and WM2). The semi-products which

are to be processed are found in the input stock ST1 and the processed

pieces will be stored in ST2. Each of the working machines can be

operational or can be broken.

Page 123: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

123

Fig. 2.68. Manufacturing system with input stock, output stock

The model with stochastic Petri net of the system described is the

one from figure 2.68.

In this model the meaning of the net knots (places and transitions) is

the following:

• P1 models stock ST1;

• P2 models stock ST2;

• T1 models the processing of a piece onto one of the working

machines;

• P3 models the “running” state of the working machines;

• T2 models the passing in the “broken” state of the working

machines;

• P4 models the broken state of the working machines;

• T2 models the passing in the “running” (repairing) state of the

working machines.

Page 124: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

124

Fig. 2.69. Model with SPN of the manufacturing

system from figure 2.68

It is implied that the processing time if a machine is a random

variable, distributed after an exponential law, its average value being

1ν . Starting from this average time, 1ν , an execution rate can be

defined:

1

1

1λν

= (2.60)

associated to firing T1. This rate signifies the fact that there is a

probability of execution 1dtλ of transition T1 between moment t and

moment t+dt, knowing that T1 is validated in moment t and that the

marking allows one firing of the transition (there is one marking in P3).

Each working machine can break down at a certain point. The

period of time of proper performance between two successive

breakdowns is of random period. The rate of breakdowns of a working

machine is 2λ .

Page 125: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

125

The marking from figure 2.69 signifies the fact that the model

catches the moment when there is an operational working machine and

a broken working machine.

A working machine is fixed in a period of time of variable length,

the rate of the fixing period is 3λ .

Application 2

A manufacturing system as the one from figure 2.70 is taken in

consideration. The system consists of two working machines WM1 and

WM2, to each machine being associated a plug stock ST1, respectively

ST2. The parts are transported through the system on four pallets. The

capacity of stock ST2 is of three pallets.

Fig. 2.70. Manufacturing system

The service rate in terms of the working machine is WM1 is 1 1λ =

and in terms of the working machine WM2 is 2 2λ = .

The stochastic Petri net which models the system is the one from

figure 2.71. The meanings of the model components are the following:

• P1 models stock ST1;

• T1 models the processing of a part on to working machine WM1;

• P2 models stock ST2;

Page 126: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

126

P1

P3P2

T2

T11λ

Fig. 2.71. Model with SPN of the manufacturing system

• P2 models stock ST2;

• P3 models the limitation of stock ST2 capacity to maximum three

palets;

• T2 models the processing of a piece onto working machine WM 2.

The markings graph which can be “achieved” is:

3

0

4

2

1

3

1

2

2

0

3

1

2T

1T

2T

1T

2T

1T

The Markov chain associated with the SPN is:

3

0

4

2

1

3

1

2

2

0

3

1

13λ

22λ

12λ

23λ1λ

Page 127: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

127

In this case matrix A is:

1 1

2 1 2 1

2 1 2 1

2 2

3 3 0 0

( 2 ) 2 0A

0 2 ( 2 )

0 0 3 3

λ λλ λ λ λ

λ λ λ λλ λ

− − + = − + −

Replacing the values for 1λ and 2λ , matrix A becomes:

3 3 0 0

2 4 2 0A

0 4 5 1

0 0 6 6

− − = − −

The probabilities of the system’s states are determined from the

matrix equation:

[ ]1 2 3 4

3 3 0 0

2 4 2 0Pr * Pr * Pr * Pr 0

0 4 5 1

0 0 6 6

− − ⋅ = − −

Respecting the condition:

1 2 3 4Pr * Pr * Pr * Pr * 1+ + + =

The solution of the system is:

1 2 3 4

8 12 6 1Pr * ; Pr * ; Pr * ; Pr *

27 27 27 27= = = =

The interpretation of the solution is the following:

• The probability that in stock ST1 four pallets are found is

1Pr * 8 27= ;

Page 128: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

128

• The probability that in stock ST1 three pallets are found and in

stock ST2 one pallet is 2Pr * 12 27= ;

• The probability that in stock ST1 two pallets are found and in stock

ST2 two pallet is 3Pr * 6 27= ;

• The probability that in stock ST1 one pallet is found and in stock

ST2 three pallets is 4Pr * 1 27= .

The average frequencies of firing of transitions T1 and T2 are:

1 1 1 2 1 3 1

8 12 6f * Pr * 3 Pr * 2 Pr * 3 1 2 1 1 2

27 27 27λ λ λ= ⋅ + ⋅ + ⋅ = ⋅ ⋅ + ⋅ ⋅ + ⋅ =

2 2 2 3 2 4 2

12 6 1f * Pr * Pr * 2 Pr * 3 2 2 2 3 2 2

27 27 27λ λ λ= ⋅ + ⋅ + ⋅ = ⋅ + ⋅ ⋅ + ⋅ ⋅ =

The fact that:

1 2f * f * 2= =

is checked

The average markings of places P1, P2 and P3 are:

1 1 2 3 4

8 12 6 1M * ( P ) 4 Pr * 3 Pr * 2 Pr * 1 Pr * 4 3 2 1 3

27 27 27 27= + + + ⋅ = + + + =

2 2 3 4

12 6 1M * ( P ) 1 Pr * 2 Pr * 3 Pr * 1 2 3 1

27 27 27= ⋅ + ⋅ + ⋅ = ⋅ + ⋅ + ⋅ =

3 1 2 3

8 12 6M * ( P ) 3 Pr * 2 Pr * 1 Pr * 3 2 1 2

27 27 27= ⋅ + ⋅ + ⋅ = ⋅ + ⋅ + ⋅ =

In order to determine the average remaining time units of the

markings in places P1, P2 and P3 the Post matrix is defined:

Page 129: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

129

0 1

Post 1 0

0 1

=

Thus, the average time units are:

1 11

1 2

M * ( P ) M * ( P ) 3D* ( P )

Post F * f * 2= = =

2 22

2 1

M * ( P ) M * ( P ) 1D* ( P )

Post F * f * 2= = =

3 33

3 2

M * ( P ) M * ( P )D* ( P ) 1

Post F * f *= = =

2.8.5. The representation of queue with SPN

The waiting sets can be represented with the stochastic Petri nets.

This possibility is due to the fact that both modeling methods basically

describe the same type of process: stochastic process (random,

probabilistic).

There are certain limitations in the transformation of a waiting set

in SPN, limitations determined by the means of construction of the

models with Petri nets.

Thus, the elementary queue M/M/1 can be defined by an input

rate λ and a service rate µ . The representation in the form of a SPN of

this type of set is the one from figure 2.72.

Page 130: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

130

Fig. 2.72. The representation in form of a SPN of the M/M/1 set

This type of waiting set cannot be studied with the help of a SPN

because this is not restricted.

Taking in consideration the case of a waiting set whose waiting

room has limited capacity, for example: M/M/1/2 (the capacity of the

waiting room is 2), this can be represented with the help of a restricted

SPN (Fig. 2.97).

Fig. 2.97. Modeling with a SPN of the M/M/1/2 waiting set

In the featured model in figure 2.97, transition T1 models the

arrivals in the waiting set. The arrival rate is λ . Transition T2 models

the service (the processing), the service rate being µ .

Page 131: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

131

Place P1 models the limitation of the capacity of the waiting room

to 2. Place P2 models the existence of a client which is to enter the

waiting room (stock) under the conditions that its capacity allows this

thing. Place P3 models the waiting room (stock), and place P4 models

the server (the working machine).

The markings graph associated to the SPN from figure 2.97 is:

1

0

1

2

1

1

1

1

1

2

1

0

2T

1T

2T

1T

The Markov chain proper to the SPN from figure 2.97 is:

1

0

1

2

1

1

1

1

1

2

1

0λ λ

µ µ

M1 M2 M3

Therefore, the passing from the waiting sets to the stochastic Petri

nets has been done, its study allowing the evaluation of the

performances of the waiting sets.

Page 132: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

132

3. THE MODELING OF THE QUEUES NETWORK SYSTEMS

3.1. Queues and queueing networks. General facts

The phenomenon of "waiting" appears in those systems that

make traffic problems. Such systems are encountered in various areas:

vehicle traffic in a customs service, serving some customers, airports

traffic (landing and takeoff of the aircrafts), computer networks, the

flow of materials (parts) in a flexible manufacturing system.

In Figure 3.1 are presented several ways of schematic

representation of a queue.

Fig. 3.1. The queue, modes of representation

Page 133: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

133

In the three types of representation are highlighted the basic

elements of a queue system:

1 - Input queue;

2 - The waiting room or queue itself;

3 – The server;

4 - The output stream.

Another way of representing a range of waiting time is the one

using diagrams. Such a diagram is shown in Figure 3.2.

Fig. 3.2. Time diagram

The notations used are:

• Cn - customer n;

• Wn - waiting time of customer n;

• Sn – service times according to the customer n;

Page 134: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

134

• Tn – the time when the customer arrives in the system Cn;

• nτ - Cn customer’s arrival in the system;

• An+1 - The time between the arrival of the customer Cn in the

system ant the time of arriving in the system of customer Cn+1.

It is evident the relation:

nnn SWT += (3.1)

The analysis of the behavior of a waiting queue can be made if

there are known if the following parameters:

• Customer arrival rate (average number of inputs per unit time) -

denoted by λ ;

• Service rate (average number of customers served per unit time) -

denoted by µ ;

• The dimension of the "waiting room" (the maximum number of

customers that can be found at some point in the queue itself in front of

the server);

• Service Attributes. They refer to the "discipline" of the queue, more

precisely the way in which customers are selected from the waiting

queue to be served when a server is freed.

Most common selection rule is FIFO type (First In, First Out) -

"first come, first served". There are also met other categories: LIFO

(Last In, First Out) - "last come, first served" default priority rules that

allow selection of the range of waiting customers.

Based on these data are evaluated, in general, the following

performance parameters:

• Average number of customers in the system - denoted by N;

Page 135: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

135

• The average time of remaining of a customer in the system - denoted

by T.

For this purpose, there is used Little's formula [37]:

N T λ= (3.2)

From (3.2):

NT

λ= (3.3)

The queue networks consist of more waiting rows interconnected

between each other. Such a network is shown in Figure 3.3.

r12

r13

Sirul 2

Sirul 3

Sirul 1

Fig. 3.3. A queueing network

Queue 1 is branched into two branches: the queue 2 and queue

3. In these circumstances, is inserted a characteristic parameter for the

waiting row networks, namely the probability of distribution between

the two branches. For the case shown in Figure 3.3 is fulfilled the

condition:

r r+ =12 13 1 (3.4)

Page 136: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

136

The sum of probability distribution between the two branches must be

equal to 1.

3.2. Waiting Queue types

3.2.1. Elements of expectations theory

To study the waiting queues’ elementary theory, it appeals to

specific notions of waiting threads [25], more precisely the process of

"birth and death".

It involves a study of changes occurring in a population of

individuals. Thus starting from a population of k individuals is

considered the birth rate kλ (birth rate) and death rate kµ (mortality

rate).

It is put the problem of determining the probability that the

population have k individuals given at the k-1 or k, or k+1 individual.

(Fig.3.4).

t1k ∆µ +

t1k ∆λ +

t)(1 kk ∆µ+λ−

k+1

k-1

k k

tt ∆+t

Fig. 3.4. The evolution of the individuals from time t at time t + Δt

Page 137: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

137

The probability that at time t + Δt, the population have k

individuals is given by (equation):

k k k k k k k kP (t t ) P (t )[ ( ) t ] P (t ) t P (t ) tλ µ λ µ− − + ++ ∆ = − + ∆ + ∆ + ∆

1 1 1 11 (3.5)

From (3.5) follows:

k kk k k k k k k

P (t t ) P (t )P (t )[ ( )] P (t ) P (t )

tλ µ λ µ− − + +

+ ∆ − = − + + +∆ 1 1 1 1

Considering 0t →∆ the differential equation is obtained:

k k k k k k k kP (t ) P (t )[ ( )] P (t ) P (t )λ µ λ µ− − + += − + + +

1 1 1 1ɺ (3.6)

For the particular case k = 0, equation (3.6) becomes:

P (t ) P (t )( ) P (t )λ µ= − +0 0 0 1 1ɺ (3.7)

In the conditions when k = 0,1,2, ..., we can write a matrix equation of

the form:

P(t ) P(t ) λ= ⋅ɺ (3.8)

Matrix λ is the following:

( )

( )

( )

λ λµ λ µ λ

λ µ λ µ λµ λ µ λ

− − − = − − − −

0 0

1 1 1 1

2 2 2 2

3 3 3 3

0 0 0 0

0 0 0

0 0 0

0 0 0

⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮

(3.9)

The transformation system diagram is shown in Figure 3.5.

Page 138: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

138

0 1 2 3 k. . . . . .

0λ 1λ 2λ 1k−λ3λ kλ

1µ 2µ 3µ 4µ kµ 1k+µ

Fig. 3.5. Diagram of transformations

In steady state (t → ∞ ) the global balance equation is:

k k k k k k kP ( ) P Pλ µ λ µ− − + ++ = +

1 1 1 1 (3.10)

Local equations are:

k k k k

k k k k

P P

P P

λ µλ µ

− −

+ +

==

1 1

1 1

(3.11)

Considering equation (3.10) for cases:

• for k=0, it follows:

PP P P

λλ µµ

= ⇒ = 0 00 0 1 1 1

1

• for k=1, it follows:

P ( ) P P

P ( ) PP P

λ µ λ µλ µ λ λ λ

µ µ µ

+ = + ⇒

+ −= =

1 1 1 0 0 2 2

1 1 1 0 0 0 12 0

2 1 2

• for any k:

kk i

k

ik i

P P Pλ λ λ λµ µ µ µ

−−

= +

= = ∏1

0 1 10 0

01 2 1

⋯ (3.12)

Relation (3.12) expresses the probability that in the system can be

found k individuals.

As the condition for normalization is respected, so sum of the

probabilities has the property of:

Page 139: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

139

k

k 0

P 1∞

==∑ (3.13)

or

k

k

P P∞

=+ =∑0

1

1 (3.14)

In (3.14) is replaced the expression of Pk and it is get:

k 1i

0 0

k 1 i 0 i 1

P P 1λ

µ

−∞

= = +

+ =∑∏

From where:

0 k 1i

k 1 i 0 i 1

1P

µ

−∞

= = +

=+∑∏

(3.15)

From (3.15) results the condition that needs to be satisfied for the

system to be convergent:

i

i 1

µ +

< (3.16)

If it is not respected the condition (3.16), the system increases

indefinitely.

The general notation for the waiting queues is:

where:

• a – characterizes the arrivals in the queue (input stream);

• b - describes the characteristics of the service;

Page 140: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

140

• c - number of identical stations (servers) that work in parallel in

the system;

• d - The waiting capacity of the queue (maximum number of

customers who are waiting to find the queue itself and the

server);

• e - Maximum number of customers served.

In the fields a and b can be found following options:

• M - for a Poisson type distribution of arrivals in the system,

respectively for a distribution of exponential type service time;

• D - for deterministic or constant values of the two features:

arrivals and service;

• G – a general distribution.

If the fields d and e are not certain specified values, then they are

implicitly infinite.

3.2.2. Elementary queue M/M/1

In the case of this elementary queue is assumed that the

distribution function which describes arrivals is Poisson type system,

and the function that describes the service is exponential type. Another

feature is that the service is performed on a single server. The queue’s

capacity and number of customers are infinite.

Assumptions for this type of queue:

• Switching from one state to another of the queue (from a number of

customers to another) is the process of "birth and death";

• Arrival rate and service rate does not depend on the number of

customers, so k

λ λ→ and k

µ µ→ .

Page 141: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

141

The graphical representation of the queue type, namely the

transformations through which passes the system, is shown in Figure

(3. 6).

0 1 2 3 k. . . . . .

λ

µ

λλ λ λλ

µµµµ µ

Fig. 3.6. State diagram for queue M/M/1

For the M/M/1 case queue, the equation (3.15) becomes:

0 k

k 1

1P

1λµ

=

= +

Performing the calculations in the queue, results the probability that

there will be no customers:

0P 1

λµ

= −

If it is noted with λρµ

= , the rate of utilization or traffic intensity, the

probability that the queue is empty is:

0P 1 ρ= − (3.17)

From (3.17) results that the probability that the server is busy is ρ .

The probability that in the queue can be found k customers is obtained

by substituting (3.17) in (3.12). It follows:

k

kP ( 1 )ρ ρ= − (3.18)

It is therefore a geometric distribution of the form as in Figure 3.7.

Page 142: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

142

Fig. 3.7. Pk probability distribution

The average number of customers (customers phase) of the

queue is determined by the relation:

k

k 0

N k P∞

==∑ (3.19)

Substituting (3.18) in (3.19), we obtain:

k

k 0

N (1 ) kρ ρ∞

== − ∑ (3.20)

where:

k k

2k 0 k 0

1k

1 (1 )

ρρ ρ ρ ρρ ρ ρ ρ

∞ ∞

= =

∂ ∂= = = ∂ ∂ − − ∑ ∑

In these conditions the average number of customers in the system

(queue itself and server) is:

N1

ρρ

=−

(3.21)

Page 143: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

143

Relation (3.21) can be written as:

2

N1

ρρρ

= +−

where the first term indicates the average number of customers from

the server, and the second designates the average number of customers

waiting in the queue itself (waiting room). It is marked with Nsa, so:

2

saN

1

ρρ

=−

(3.22)

The medium waiting time (average time a customer spends in

the system) is determined by Little's formula (3.3), resulting in:

1 1T

1µ ρ=

− (3.23)

If it is represented the average waiting time’s variation

depending on the intensity of traffic ρ , it is resulting the graph from

Figure 3.8.

Fig. 3.8. Variation of the medium time expectation with ρ

Page 144: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

144

As much as the traffic intensity is higher, the average waiting time

is greater. At the limit, when 1ρ → , thenT → ∞ .

The medium waiting time in the series itself is resulting from the

medium waiting time in the system, the relation (3.19), without taking

into account the average length of service. That is:

sa

1 1 1 1T T

1 ( 1 )

ρµ µ ρ µ µ ρ

= − = − =− −

(3.24)

The probability that the system has at least j customers is given by:

j

k

k j

P P∞

=

=∑ (3.25)

Substituting in (3.25) the expression of the probability Pk (3.18)

follows:

j jP ρ= (3.26)

Application

It is considered a production system comprising a working

machine and a warehouse (stock) in which are waiting the semi-

fabricants to be processed on the machine (Fig. 3.9.). The arrivals in

stock of the semi-fabricants follow a Poisson process. Rate of arrivals

is 5 ,1 semi parts / hλ = − . The processing time is described by a function

of probability of negative exponential type. The average value is 10

Page 145: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

145

minutes for a piece. The operation of the manufacturing operation can

be equated with a series of elementary waiting of type M/M/1.

Fig. 3.9. Manufacturing system likened to a queue of type M/M/1

It is put the problem of determining the following functional

parameters of the system:

a) Average number of parts in the system;

b) Average number of pieces in stock of the work machine;

c) The average time that a part spends in the system;

d) The average time waiting in stock;

e) How many pieces can be loaded on the working machine

without having to wait?

f) What is the probability that the system to find at least 4 parts?

Solution

a) To determine the average number of parts in the system is used

equation (3.21). In this relationship intervenes the traffic’s intensity. To

calculate the volume of traffic should be measured rate service. If the

average processing time is 10 minutes, that, on average, the system

processed 6 pieces / hour. So: ora/piese6=µ .

Stoc ST ML

λ µ

Page 146: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

146

Thus:

5 ,10 ,85

6

λρµ

= = =

The average number of parts in the system is:

0 ,85N 5 ,67 parts

1 1 0 ,85

ρρ

= = =− −

b) The average number of pieces in stock of the driven machine is

determined by the relation (3.22):

ρρ

= = =− −sa

,N , parts

,

2 20 854 82

1 1 0 85

c) The average time that a part spends in the system is determined by

equation (3.23):

1 1 1 1T 1,11h

1 6 1 0 ,85µ ρ= = =

− −

d) The average time waiting in storage is determined by equation

(3.24):

sa

0 ,85T 0 ,94 h ( 56' 40")

(1 ) 6 ( 1 0 ,85 )

ρµ ρ

= = =− ⋅ −

e) To determine the probability that some parts to be loaded directly on

the working machine, it utilizes the relation (3.17):

Page 147: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

147

0P 1 1 0 ,85 0 ,15ρ= − = − =

So, 15% of them are loaded directly on the working machine.

Also, 85% have to wait.

f) it is used equation (3.26), while the j = 4:

4 4 4P 0 ,85 0 ,52ρ= = =

So, 52% of the time, in the system are at least 4 pieces.

3.2.3. Elementary queue M/M/1/K

The characteristic of the elementary queue M/M/1/K, that

differentiates it from M/M/1 queue is given by its capacity’s limitation.

The maximum capacity of the queue (queue itself and the server) is K.

The probability that in the system are k customers (balance

equation) is given by:

k

k 0P P ; k 0 , ...,Kρ= = (3.27)

From the normalization condition:

K

k

k 0

P 1=

=∑ (3.28)

From (3.27) and (3.28) results the probability that the system is empty

Page 148: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

148

0 K 1

1P

1

ρρ +

−=−

(3.29)

In these circumstances the probability that in the system are at a

time k customers is:

K,...,1,0k;1

1P k

1Kk =ρρ−

ρ−= + (3.30)

The probability of state K, Pk, is the probability that the arrival of a

new customer, the system is full.

When K = 1, in case of one server, then:

k

kP ; k {0 ,1}

1

ρρ

= ∈+

(3.31)

3.2.4. M / M / m Queue

This system type is characterized by m identical servers, parallel,

serving customers who are waiting in a line in which the arrivals are

Poisson type (Fig.3.10). The time of serving has an exponential

distribution.

. . .

λ

µ

µ

µ

Fig. 3.10. Queue type M / M / m

Page 149: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

149

The state diagram of this type of sequence is seen in Figure 3.11.

0 1 2

λ

µ

λλ λ λλ

µ3µ2

. . .

m-2 m-1 m m+1

. . .

λ λ

µ− )2m( µ− )1m( µm µm µm

Fig. 3.11. Queue of type M / M / m. State diagram

Beyond the state m, the diagram is identical to that of a queue

M/M/1, whose server has the ability µm .

Specific balance equations of this system are:

k 1 k

k 1 k

P k P ; k m

P m P ; k m

λ µλ µ

= ≤= >

(3.32)

From equations (3.32) are resulting likelihood expressions as in

the system to find k customers in the two cases:

k

k 0

m k

k 0

(m )P P ; k m

k!

mP P ; k m

m!

ρ

ρ

= ≤

= > (3.33)

For this type of queue is defined the traffic intensity in the entire series,

as being:

Page 150: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

150

aλµ

= (3.34)

Moreover, the traffic intensity on the server:

a

m m

λρµ

= = (3.35)

The probability of state 0 (the probability that in the system is 0

customers) results from the condition of normalizationk

k 0

P 1∞

==∑ , so

that:

1k mm 1

0

k 0

(m ) ( m )P

k ! m! (1 )

ρ ρρ

−−

=

= + − ∑ (3.36)

Notation:

1km 1

k 0

m

( m )u

k !

(m )v

m! (1 )

ρ

ρρ

−−

=

=

=−

∑ (3.37)

The probability that for an incoming customer all servers are busy and

it stays in standby in the waiting queue, is as follows:

m k m

0 0q k

k m k m

P m P (m ) vP C(m,a ) P

m! m!(1 ) u v

ρ ρρ

∞ ∞

= =

= = = = =− +∑ ∑ (3.38)

The average number of customers who are waiting in the actual

sequence is:

Page 151: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

151

k

sa q q

k 0

N P k( 1 ) P1

ρρ ρρ

== − =

−∑ (3.39)

Average number of customers in the system:

sa qN m N m P

1

ρρ ρρ

= + = +−

(3.40)

Applying Little's formula, we obtain the average time a customer

spends waiting in the queue itself:

sasa q

N 1T P

mλ µ λ= =

− (3.41)

The average time a customer spends in the system (waiting and

service) is:

sa q

N 1 1 1T T P

mλ µ µ µ λ= = + = +

− (3.42)

Application

A printer is attached to a computer network (Local Area Network

- LAN). The Job arrivals which have to be printed have a Poisson rate

distribution, the rate of arrivals being λ . The Service time (time of

printing) respects an exponential distribution. The average print time

is µ .

Page 152: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

152

Given the increasing number of requests for the printing of

documents, the question is to improve printing service. For this

purpose there are several possible solutions. They will be examined

further in terms of performance of the waiting queues by which they

can be shaped. The Parameter that will be compared for the three

variants is the median waiting time of a job until its completion.

1. Replacement of the printer with another two times faster, service

rate µ2 (Fig.3.12).

µ2

µλ=ρ 2/

λ

Fig. 3.12. A two times faster printer

This solution can be modeled with a series of M/M/1 waiting

queues, the traffic intensity being:

2

λρµ

=

The average time that a job spends in the system is:

1

1 1 1T

2 1 2µ λ ρ µ= =

− −

2. A second solution is similar to the introduction of a printer and

sharing existing users into two groups, each group assigned to find

a printer. Rate of arrivals to each printer is: 2/λ (Fig.3.13).

Page 153: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

153

µ

µλ=ρ 2/

2/λ

µ

µλ=ρ 2/

2/λ

Fig. 3.13. Two printers

In this case there are two separate M/M/1 queues, each with

parameters: input rate / 2λ and service rate µ . This determines the

intensity of the traffic:

/ 2

2

λ λρµ µ

= =

respectively the average time that a job spends in the system:

2

1 1 1T

/ 2 1µ λ ρ µ= =

− −

The Loading on the server is the same as in the first case. What

distinguishes this variant of the first one, is that everything happens

twice as slow: both inputs and service.

3. In this variant are considered two printers of the same type, and

similar performance (same rate of service). To be served the jobs

are waiting in front of the two printers, in one common series. The

model is a series M/M/2 (Fig.3.14), with the parameters λ and µ .

Page 154: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

154

µλ=ρ 2/

λ

µ

µ

Fig. 3.14. Two printers, a single row

In this case the traffic intensity is as in variants I and II. The

average time that a job spends in the system is:

3 q

1; 1

1 1T P

2 1 1; 1

1 2

ρµ

µ µ λ ρρ µ

<<= + ≈ − ≈ −

Conclusions

The first solution, a two times faster printer is the best solution

allowing decreasing the time that a job spends in the system by 50%.

At a higher load, the average time that a job spends in the system

is the same in cases 1 and 3. In both cases the medium waiting time

itself has the largest share. Two less efficient printers are "fueling" of

the same number of pending download jobs in the queue with the same

efficiency as a faster printer.

If each printer has a corresponding number of own pending

queues, it may arise situations where a printer will not work while in

front of the other can appear jobs that are waiting to be loaded. This

leads to a decrease in overall system performance, in addition to the

Page 155: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

155

fact that the average servicing time is two times higher in the second

case.

3.2.5. Assimilation of the flexible manufacturing

systems (FMS) module waiting queues (system)

In the case of a FMS, the targets that will be processed parts do

not uniformly enter the system, it is not known exactly "what" targets

and "how" will they enter the system each time. Also, since the parts are

in the system, they go through different technological routes, loading

different processing stations. There is the possibility that in certain

times some stations does not work, and at other times, in the same

stations can form queues (tails) of waiting.

The actual operation of a FMS (dynamic behavior) involves

random system inputs; random inputs give rise to changes in filling the

processing stations and the appearance of waiting queues.

A series of commercial standby arrangements of space and / or

design of the equipment in which will be stored the targets which will

be processed. This implies a FMS design to consider the location spaces

(rooms) to hold.

Figure 3.15 presents a method of processing within a SFF, which is

assimilated to a queue.

The significant elements are:

• input into the system flow

This is usually representing the mode of rule of the targets’ input

in the system. This rule can be expressed by varying the time interval

Page 156: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

156

between two successive entries or by varying the number of inputs per

unit time (ex: one hour).

It is considered that staging systems are random inputs, so the

interval between two successive entries or the number of inputs per

unit of time are random variables. A random variable is associated with

a density probability (probability function).

Fig. 3.15. FMS likened to queue system

The most studied systems are those that hold the density

probability for the input stream and it is of Poisson type [1]:

x

f ( x ) e ; x 0 ,1,2 ,...x !

λλ −= = (3.43)

where:

x - Number of inputs per unit time (random variable);

λ - Average number of inputs per unit time.

• The waiting queue

Page 157: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

157

The landmarks entering the system and which find as being busy

the processing station, sit at the "queue" - the waiting queue itself - that

will be issued as to enter into the processing.

A key feature is the queue length, which can be considered infinite

[1] (for small parts) or limited to a predetermined size (N).

The discipline of the row is another feature of it. This is

determined by the rule of priority which has been preset to determine

the sequence of processing parts of the queue.

• Workstations (servers)

These are those that satisfy the service requested by the customer

(the work piece).

In case of FMS the workstations are the machine tools and the

service they provide is the processing of the targets.

In connection with the workstations, the most important problem

[1] is the change in service time (processing). When processing time is a

random variable, it is associated with a density probability (probability

function). In many cases, the density probability function of service

time (processing) is a negative exponential function of the form:

tf (t ) e µµ −= (3.44)

where:

t - Serving Time (random variable);

µ - Average number of parts processed in a unit time (ex: in one

hour).

Another feature is the traffic intensity in the system ρ λ µ= .

• The outflow of the system is important for FMS, because most times,

is, in turn, an input to the system queue.

Page 158: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

158

3.3. Modeling with quequeing networks

The quequeing networks are composed of queues interconnected

between each other. In their case, the customers move from one queue

to another to be served by different servers in the network.

In practice, such networks can be found in manufacturing

systems, communication networks, computer networks, etc.

3.3.1. Classification of quequeing networks

In terms of relationship with the environment, the quequeing

networks fall into three categories:

a) Open networks - characterized by the fact that there is the possibility

of communication with the external environment (Fig. 3.16.a);

b) Closed networks - no possibility of communication with the external

environment (Fig. 3.16.b);

2

1

3

4

1

2

3

4

(a) (b)

Fig. 3.16. Open queueing networks (a) and closed queueing networks (b)

Page 159: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

159

c) Mixed networks - they are made up by the open components (related

to the external environment) and closed components (not directly

related to the external environment) (Fig. 3.17).

Fig. 3.17. Mixed networks of waiting queues

In the case of open queueing network, queue there can be found

networks with feedback loop. These are specific situations where a

customer "visits" a series of waiting, or more, of the network several

times. In Figure 3.18.a the loop corresponds to the entire network and

in Figure 3.18.b, the loop of queue corresponds to the open network

(immediate feedback).

(a)

(b)

1 2

1 2

Fig. 3.18. Open network with feedback

Page 160: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

160

If in the case of an open network, the open queue from it are connected

one after another (in series), this is an open network in tandem

(Fig.3.19).

1 2 n. . .

Fig. 3.19. Open network in tandem

In the case of a network whose components are connected in

series and the outflow of the last queue is an input queue for the first

series; this is a cyclic closed network (Fig. 3.20).

1 2 n. . .

Fig. 3.20. Cyclic closed network

3.3.2. Open queueing network

An open queueing network is characterized by the fact that it is

connected to the outside through a network input node and an output

node of the network.

The study of waiting open queues networks has the following

properties:

Page 161: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

161

Property 1

If the arrivals to input node 0 (Fig. 3.21) are described by a

Poisson percentile of rate 0λ , the arrivals to the ranks of network

components will be all of Poisson type. In other words, splitting a

Poisson process leads to processes that are also Poisson type.

If it is one of the points that are assigned to arrivals from 0, the

rate depends on the rate of arrivals and arrivals in the 0 and the

probability of distribution from 0 to it.

Rate in arrivals in i = 0 0irλ ⋅ .

Fig. 3.21. Dividing a Poisson process

The distribution probability has the property:

n

0i

i 1

r 1=

=∑ (3.45)

Property 2

At equilibrium, the rate of arrivals at a rate equal to the output

queue is equal with the queue (Fig. 3.22).

Page 162: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

162

1

2

3

1λ 1λ

)r1(

r

131

1212

−λ=⋅λ=λ

)r1(

r

121

1313

−λ=⋅λ=λ

r12

r13

Fig. 3.22. Rate of arrivals is equal to the output rate

Property 3

The combination of some independent Poisson processes result in

the resultant process which is also a Poisson type. If the rate of arrivals

(outputs) to (from) 1 is 1λ the rate of arrivals (outputs) in (of) 2 is

2λ the rate of arrivals in I is equal to the sum 1 2λ λ+ (Fig. 3.23).

Fig. 3.23. Combining Poisson type processes

Page 163: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

163

3.3.3. Jackson's Theorem

Jackson's theorem applies to open networks with waiting queues.

The n component rows will become nodes of the network.

The Theorem’s statement has the following assumptions:

• Each node i ( i {1,2 , ...,n}∈ ) is a series with infinite capacity;

• The Discipline of type queue is FIFO type (First In First Out - first

come first served);

• Network arrivals 0( )λ and arrivals in each queue i( )λ have a

Poisson distribution;

• Service rate i( )µ , for each queue, has an exponential

distribution;

• In each node (queue) the serving time of a client is independent

of other nodes (queues) serving time, belonging to the network;

• After leaving the queue i, the client will enter the second row j

with probability rij, and will likely leave the network with

probability riI..

Considering the state vector (the number of customers) to each

queue: 1 2 i nK ( k ,k , ...,k , ...,k )= , is put the probability assessing question.

For a queue of the network, the probability that it contains ki

clients is:

kii i iP( k ) (1 ) ; i { 1,2 , ...,n}ρ ρ= − ∈ (3.46)

where the traffic flow and associated queue is:

ii

i

; i {1,2, ...,n}λρµ

= ∈

Page 164: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

164

For the entire network:

n nki

i i i

i 1 i 1

P( K ) P( k ) ( 1 )ρ ρ= =

= = −∏ ∏ (3.47)

In the case of the open network of waiting queues in Figure 3.24, the

equilibrium equation is defined for each queue i , i { 1,2 , ...,n}∀ ∈ :

n

i 0 0i j ji

j 1

r rλ λ λ=

= +∑ (3.48)

I

1

n

i

ri1

r1i

r0n

rni rin

riI

r0n

r01

r1I

rnI

0λ 0

Fig. 3.24. Open queueing Network

The Network performance indicators are:

• Average number of customers in the queue I (node) of the network:

ii

i

N ; i {1,2, ...,n}1

ρρ

= ∈⋅

(3.49)

• Average number of clients in the network:

Page 165: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

165

ni

i 1 i

N1

ρρ=

=−∑ (3.50)

• The average time a customer spends in the queue (node) i:

ii

i i i i i

N 1 1 1T ; i { 1,2 , ...,n}

1λ ρ µ µ λ= = = ∈

− − (3.51)

• The average waiting time in the i waiting queue itself:

isa ii

i i i

1 1T T ; i {1,2 , ...,n}

1

ρµ ρ µ

= − = ∈−

(3.52)

• The average time of service in the network:

0

NT

λ= (3.53)

Example 1

It is considered the open network of Figure 3.25 that comprises a

single queue. It is put the problem of determining the rate of arrivals 1λ

in a row according to the rate of arrivals λ in the network and the

probability of distribution r.

λ 1λ1µ

r

1-r

Fig. 3.25. Open network with feedback

Balance equation for this case is:

1 1rλ λ λ= + (3.54)

Page 166: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

166

Expressing the number of rate arrivals in equation (3.54) follows:

11 r

λλ =−

(3.55)

Example 2

It is considered the open queueing network of Figure 3.26. The

network consists of two queues. The Server corresponding to queue 1

has a sequence rate 1µ and the server according to queue 2 has service

rate 2µ .

λ 1λ1µ

r

1-r

2µ 12 rλ=λ

1)r1( λ−1

2

Fig. 3.26. Open network consisting of two queues

It is considered the problem of determining the functional

parameters of the network according to the rate of arrivals in the

network λ , service rate 1µ , respectively 2µ .

The Balance equations corresponding to the queues rows of the

network are:

1 2

2 1r

λ λ λλ λ

= + = ⋅

(3.56)

Page 167: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

167

From equations (3.56) results the expressions of the queue arrivals

rates in the queue 1 or 2:

1

2

1 r

r

1 r

λλ

λλ

= −⋅ =−

(3.57)

The Traffic intensities in the queue 1 or 2 are:

1 1 1

2 2 2

ρ λ µρ λ µ

= =

(3.58)

The probability that the queue 1 is k1 customers waiting and waiting

queue 2 is k2 customers is given by:

k k1 21 2 1 1 2 2P( K ) P( k ,k ) (1 ) ( 1 )ρ ρ ρ ρ= = − ⋅ ⋅ − ⋅ (3.59)

The average number of customers in a queue 1 is:

11

1

N1

ρρ

=−

(3.60)

The average number of customers in queue 2 is:

22

2

N1

ρρ

=−

(3.61)

Average number of clients in the network is:

1 21 2

1 2

N N N1 1

ρ ρρ ρ

= + = +− −

(3.62)

Page 168: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

168

The average time a customer spends in the system is:

1 2 1 1 2 2

1 2 1 1 2 2

NT

(1 ) (1 ) ( 1 ) ( 1 )

ρ ρ λ µ λ µλ λ ρ λ ρ λ λ µ λ λ µ

= = + = +− − − −

(3.63)

Relation (3.63) can be also written:

1 2

1 2

1 2

1 2

T

1 1

λ λµ λ µ λ

λ λλ λµ λ µ λ

= +− −

(3.64)

Note:

11

1 1

22

2 2

1 1S

1 r

r 1S

1 r

λµ λ µλ

µ λ µ

= = ⋅ − = = ⋅−

(3.65)

With these notations the medium time that a customer spends in the

system is:

1 2

1 2

S ST

1 S 1 Sλ λ= +

− −

(3.66)

This corresponds to an open network in tandem, consisting of two

queues, the server of first queue has 1/S1 service rate and the server of

queue 2 has service rate 1/S2 (Fig. 3.27).

Page 169: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

169

λ 1 21S/1 2S/1

Fig. 3.27. Tandem Network

Example 3

It is considered an open network which is embodied in a flexible

manufacturing cell composed of:

• Processing Station (Work Machine - ML);

• A checkpoint (Machine Control - MC).

The pieces that go in the cell are processed after they are checked ML

MC.

After the first control, the parts are recycled (corrected) on the

working machine ML with probability p1, otherwise they leave the cell.

After the first maintenance, the parts are checked again to MC. Out

of the second control, the parts could be addressed again with

probability p2 on the ML machine, and otherwise they leave the cell.

After the second repair the parts will be delivered without being

controlled.

There are also known the following:

• The rate of manufacturing cell entry is:

λ = 10 part / hour

• The medium maintenance on ML and MC:

L C

1 12,5 min

µ µ= = (1 part to 2.5 min)

• Probabilities:

Page 170: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

170

p1 = 0.7;

p2 =3

7.

In these circumstances, is required:

1. Block diagram to represent the manufacturing cell;

2. To determine the probability of distribution according to p1 and

p2.

3. To determine rates of arrivals from ML MC, respectively λL and λC;

4. To determine the rate used ML and MC;

5. To determine the average number of parts of pending at ML and

MC;

6. To determine the average time that a part spends of the

manufacturing cell.

1. The flexible manufacturing cell’s model

The manufacturing cell’s model is presented in Figure 3.28

Fig. 3.28. The flexible manufacturing cell

ML

MC

10

2

Lλ Lµ

CµCλ

3r13

r13

r21

r23

Celula de fabricatie flexibilaFlexible manufacturing cell

Page 171: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

171

2. Branching probabilities

There are three possible routes a part can pass through inside the

cell:

A) 0 1 2 3→ → →

The probability to pass through this route is:

1 11 pα = − (3.67)

B) 0 1 2 1 2 3→ → → → →

The probability to pass through this route is:

2 1 2p ( 1 p )α = − (3.68)

C) 0 1 2 1 2 1 3→ → → → → →

The probability to pass through this route is:

3 1 2p pα = (3.69)

The probabilities of distribution from 1 to 2 and from 1 to 3 are r12 and

r13, having the property

r12 + r13 = 1 (3.70)

The likely number of passes of a part by 1 (probable number of

treatments of the part on the ML) is given by:

Page 172: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

172

1 2 31 2 3α α α× + × + × (3.71)

The likely number of direct transition from 1-2:

1 2 31 2 2α α α× + × + × (3.72)

The likely number of direct transitions from 1-3:

31 α× (3.73)

In these circumstances the distribution probabilities r12 and r13 will be

determined by the following relations:

1 2 312

1 2 3

1 2 2r

1 2 3

α α αα α α

× + × + ×=× + × + ×

(3.74)

and

313

1 2 3

r1 2 3

αα α α

=× + × + ×

(3.75)

Substituting in (3.74) and (3.75) the α1, α2, α3 of (3.67) (3.68) and (3.69)

are obtained the distribution probabilities based on known

probabilities:

112

1 1 2

1 pr

1 p p p

+=+ +

(3.76)

and

1 213

1 1 2

p pr

1 p p p=

+ + (3.77)

Substituting the values of p1 and p2 are obtained:

Page 173: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

173

12

1 0 ,7r 0 ,85

31 0 ,7 0 ,7

7

+= =+ + ⋅

and 13

30 ,7

7r 0 ,153

1 0 ,7 0 ,77

⋅= =

+ + ⋅

The probabilities of distribution from 2 to 1 and from 2 to 3 are r21 and

r23, with the property:

r23 + r23 = 1 (3.78)

The likely number of passes of the part through 2 (probably number of

control operations MC) is given by:

1 2 31 2 2α α α× + × + × (3.79)

The likely number of direct transitions from 2-1:

1 32α α+ × (3.80)

The likely number of direct transitions from 2-3:

1 2α α+ (3.81)

The distribution probabilities will be determined by the following

relations:

1 223

1 2 3

r1 2 2

α αα α α

+=× + × + ×

(3.82)

2 321

1 2 3

2r

1 2 2

α αα α α

+ ×=× + × + ×

(3.83)

Page 174: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

174

Substituting in (3.82) and (3.83) the α1, α2, α3 of (3.67) (3.68) and (3.69)

to obtain probability distribution based on known probabilities:

1 223

1

1 p pr

1 p

−=+

(3.84)

and

1 221

1

p (1 p )r

1 p

+=+

(3.85)

Substituting the values of p1 and p2 are obtained:

23

31 0 ,7

0 ,77r1 0 ,7 1,7

− ⋅= =

+ and 21

30 ,7 1

17r

1,7 1,7

+ = =

3. There will be determined the arrival rate to the working

machine λL and the arrival rate to the control machine λC. To this

purpose, it is considered the equation of equilibrium:

L C 21rλ λ λ= + (3.86)

Also:

C L 12rλ λ= (3.87)

Substituting (3.87) in (3.88) follows:

L L 12 21r rλ λ λ= + (3.88)

From (3.88) it can be determined the rate of arrivals to the working

machine:

Page 175: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

175

L

12 21

1

1 r rλ λ=

− (3.89)

Substituting in (3.89) the known quantities is obtained:

λL = 20 parts / hour

Similarly is determined the rate of arrivals to the machine control:

λC = 17 parts / hour

4. Rate of utilization or traffic intensity is determined by the

relation:

λρµ

= (3.90)

For the working machine:

LL

L

λρµ

=

(3.91)

That is: L

200 ,833

24ρ = =

For the control machine:

CC

C

λρµ

= (3.92)

That is: L

170 ,708

24ρ = =

5. The average number of parts which are waiting

5.1. The average number of pieces which are waiting at the

working machine

5.1.a. The average number of pieces being in the waiting system

corresponding to the working machine is determined by the relation:

Page 176: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

176

LL k

k 0 L

N kP1

ρρ

== =

−∑ (3.93)

Replacing ρL ‘s value, it is obtained:

L

56N 5 parts51

6

= =−

5.1.b. The average number of parts in the waiting queue itself

being in front of the driven machine is determined by the relation:

2L

L ,sa k

k 1 L

N ( k 1)P1

ρρ

== − =

−∑ (3.94)

Replacing ρL ‘s value is obtained:

( )2

L ,sa

56

N 4 ,16 parts51

6

= =−

5.2. The average number of pieces waiting in the control machine

5.2.a. The average number of parts waiting in the appropriate

system control machine is determined by the relation (3.93) in which is

replaced ρC with ρL, resulting in:

C

1724N 2,42 parts

17124

= =−

5.2.b. The average number of parts waiting in the queue itself

being in front of the control machine is determined by the relation

(3.94) in which ρC is replaced with ρL, resulting in:

Page 177: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

177

( ) 2

C ,sa

1724

N 1,72 parts171

24

= =−

6. The average time that a part spends in the system is determined

based on Little's formula:

N T [ parts ]λ= ⋅ (3.95)

where:

• N - the average number of parts in the system (cell);

• λ - the rate of inputs into the system;

• T - the average time remaining in the system for a parts.

From (3.95) is expressed the medium time as being:

NT [ h]

λ= (3.96)

The average number of pieces of the whole system is determined by the

relation:

L cN N N [ parts ]= + (3.97)

Substituting the values of NL and NC is obtained:

N 5 2,42 7 ,42 parts= + =

Substituting in (3.97):

7 ,42T 0 ,742 hours 45 min

10= = ≅

A parts remains in the system, on average, for 45 minutes.

Page 178: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

178

3.3.4. Closed queueings networks

A closed queueing networks is characterized by the fact that there

is no "relationship" with the outside. There are points of entry / clients’

exit / from the network. The number of clients in the network remains

constant, K. the connections occur only between the queues of the

network components (Fig. 3.29).

1

n

i

ri1

r1i

rni rin

Fig. 3.29. Closed queueing networks

Each i queue (node) of the network is characterized by a FIFO

discipline type, the rate of service iµ , with an exponential distribution.

A customer who leaves queue 1 will enter in queue j with the

probability rij.

In these conditions, the equilibrium equation for each component

of the network number is:

Page 179: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

179

n

i j ji

j 1

r ; i {1,2 , ...,n}λ λ=

= ∀ ∈∑

(3.98)

The n equations (3.98) are not independent. An equation is

linearly dependent on the other, and the solution is uniquely

determined

Let it be:

iˆ{ | i 1, ...,n}λ = (3.99)

a particular solution of the system formed by equations (3.98). The

general solution is:

i iˆ{ ( K ) ( K ) | i 1, ...,n}λ α λ= ⋅ = (3.100)

The constant ( K )α and the solution i{ ( K ) | i 1, ...,n}λ = are based on

the number of clients who are in the closed queueing network K.

The rate of utilization (traffic intensity) corresponding to the queue i:

ii

i

; i 1, ....nλρµ

= = (3.101)

It is defined the relative rate of use (relative intensity of traffic) to the

corresponding queue i:

ii

i

ˆˆ ; i 1, ....n

λρµ

= = (3.102)

where iµ is the service appropriate to queue i rate server.

From relations (3.101) and (3.102) results:

Page 180: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

180

i iˆ ; i { 1,2 , ...,n}ρ α ρ= ⋅ ∈

The balance equation for a closed network of waiting queues, in terms

of probabilities is:

n nkii i

i 1i 1

n

ii 1

1ˆ ; cand k K

G( K ,n)P( K )

0 ; cand k K

ρ==

=

=

= ≠

∑∏

∑ (3.103)

In (3.103), G(K, n) is the normalization constant and is expressed as:

nkii

K : k i 1ii

ˆG( K ,n) ρ=

=∑∑ ∏ (3.104)

Example

It is considered closed queueing network in Figure 3.30. The

network is composed of two rows M/M/1. The number K customers are

served. Server queue 1 has the rate of services 1µ , the server of queue 2

has service rate 2µ . It is put the problem of determining the

normalization constant G expression (K, 2).

The Balance equations are:

2 1 12 2 22

1 2 21 1 11

r r

r r

λ λ λλ λ λ

= ⋅ + = ⋅ +

(3.105)

Page 181: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

181

1

2

1

2

)ˆ( 11 λλ

12r

1211 r1r −=

21r

2122 r1r −=

)ˆ( 11 λλ

)ˆ( 22 λλ )ˆ( 22 λλ

Fig. 3.30. Closed network with two queues

Considering the range 1 of reference network, there can be

adopted 1λ̂ α= . The constant values can be chosen arbitrarily. A

convenient value is 1α µ= . In these conditions, the rate of arrivals in

queue 1 is 1 1λ̂ µ= . The relative intensity of the corresponding traffic of

queue 1 is:

1

1

ˆˆ 1

λρµ

= =

Using the first equation of system (3.105) to determine the rate of

arrivals in the queue 2, 2λ̂ , depending on the rate of arrivals in a queue

1, 1 1λ̂ µ= , follows:

12 12 122 1 1 1

22 21 21

r r rˆ ˆ ˆ1 r r r

λ λ λ µ= ⋅ = ⋅ = ⋅−

(3.106)

Page 182: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

182

The relative intensity of the traffic, corresponding to queue 2 is:

2 12 12

2 21 2

ˆ rˆ

r

λ µρµ µ

= = ⋅ (3.107)

Applying the calculation procedure described for closed networks

with waiting queues (equation 3.103), taking into account the relative

intensity values, the probability that the queue 1 to be k1 clients and in

queue 2 to be k2 clients, the (k1 + k2 = K) is:

k k k1 2 21 2 1 2 2

1 1ˆ ˆ ˆP( K ) P( k ,k )

G( K ,2 ) G( K ,2 )ρ ρ ρ= = ⋅ ⋅ = ⋅ (3.108)

Applying the relation (3.104) can be determined the normalization

constant:

K 12k k k k 2i 1 2 2i 1 2 2

k k K k k K k k Ki 1 21 2 1 2 1 2

ˆ1ˆ ˆ ˆ ˆG( K ,2 ) 1

ˆ1

ρρ ρ ρ ρρ

+

+ = + = + ==

−= = ⋅ = =−∑ ∑ ∑∏

(3.109)

For the case considered above, the probability that in a queue to find all

customers is:

K2

ˆ G( K 1,2 )P(queue 1occupied ) 1 P(0 ,K ) 1

G( K ,2 ) G( K ,2 )

ρ −= − = − = (3.110)

Page 183: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

183

The probability that queue 2 is occupied:

2

1 G( K 1, 2 )ˆP(queue 2 ocupied ) 1 P( K ,0 ) 1

G( K ,2 ) G( K ,2 )ρ −= − = − = ⋅ (3.111)

3.3.5. Analysis method of solving the average values

to the mean values of the closed queueing networks

Considering a closed queueing networks with n servers and K

clients, the averages value analysis method aims to determine the

average values for:

• The number of customers in the queue i, Ti[K], i {1,2 , ...,n}∈ ;

• The average time a customer spends in the queue i, Ti[K],

i {1,2 , ...,n}∈ ;

• Rate entry iλ in the queue i, }n,...,2,1{i ∈ .

The analysis is based on arrival theorem (Theorem average value)

- Leiser and Lavenberg): "A customer who arrives in queue sees an

average number of customers’ one unit less than an observer outside

network."

The calculation is recursive, being implemented step by step the

number of clients on the network. In brackets is indicated the total

number of clients on the network.

The average time a customer spends in the series i is:

*i i

i i

timpul timpul dede deservire al clientilor

deservire aflati in fata

1 1T [ K ] N [ K ]

µ µ= + ⋅

�����

(3.112)

Page 184: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

184

where *iN [ K ] is the average number of customers for a client entering

the queue i.

Applying the theorem of arrival:

*i iN [ K ] N [ K 1]= −

(3.113)

Under these conditions equation (3.112) becomes:

(i i

i

1T [ K ] 1 N [ K 1])

µ= ⋅ + −

(3.114)

The average number of clients in the queue i is determined by formula:

i ii n

j j

j 1

ˆ T [ K ]N [ K ] K

ˆ T [ K ]

λ

λ=

⋅= ⋅⋅∑

(3.115)

Note:

Actual rate of arrivals in the series i is i iˆλ αλ= .

Applying Little's formula follows the actual rate of arrivals in the

series i:

i ii n

ij j

j 1

ˆN [ K ][ K ] K

T [ K ] ˆ T [ K ]

λλλ

=

= = ⋅⋅∑

(3.116)

The recurrence algorithm specific to the method of analysis

involves the following steps:

Step 1:

Page 185: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

185

Initially it is considered that the average number of customers in

all queues of the network is 0:

iN [0 ] 0 ; i { 1,2 , ...,n}= ∈ (3.117)

Step 2:

For each i queue i {1,2 , ...,n}∈ is determined the average waiting

time, the average number of customers and the rate of arrivals:

(i i

i

i ii n

j j

j 1

ii

i

1T [ k ] 1 N [ k 1])

ˆ T [ k ]N [ k ] k

ˆ T [ k ]

N [ k ][ k ]

T [ k ]

µ

λ

λ

λ

=

= ⋅ + −

⋅ = ⋅ ⋅=

∑ (3.118)

Formulas (3.118) applies for k = 1,2, ..., K.

Note:

The rates of arrivals iλ̂ are system solutions consisting of balance

equations i j jijrλ λ= ⋅∑ .

Example 1:

There is considered a cyclical network from Figure 3.31.

Page 186: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

186

1 2 n. . .µ µ µλ λ λ

Fig. 3.31. Close cyclic queueing Network

The service ratio is the same for all queues in the network:

1 2 nµ µ µ µ= = = =⋯ The solution of the system consisting of the

equations of equilibrium is: 1 2 nˆ ˆ ˆ 1λ λ λ= = = =⋯ .

Step 1:

Initially it is considered the average number of customers

N[0 ] 0=

Step 2:

It is determined the characteristic parameter (median waiting

time, average number of customers and the rate of arrivals) of the

queueing network for k = 1,2, ..., K. They are the same for each series in

the network:

Page 187: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

187

1 n 1 1T [ 1] T [ 2 ]

n

1 2k 1: N[ 1] ; k 2 : N[ 2 ] ;

n n

1 2[ 1] [ 2 ]

n n 1

n 2 1 n K 1 1T [ 3 ] T [ K ]

n n

3 Kk 3 : N[ 3 ] k K : N[ K ]

n n

3 K[ 3 ] [ K ]

n 2 n K 1

µ µ

λ µ λ µ

µ µ

λ µ λ µ

+ = = ⋅ = = = = = ⋅ = ⋅ +

+ + − = ⋅ = ⋅ = = = = = ⋅ = ⋅ + + −

Remarks:

1) When K << M, then, K

[ K ]M

λ µ≈ ⋅ so the average cycle is M

µ, in

the conditions when there are K customers in the network.

2) If K >> M, then [ K ]λ µ≈ , all queues of the network are full.

Customers leave the server before the interval 1

µ corresponding to a

queue

Example 2:

It is considered a closed network from Figure 3.32, which consists

of two queues. The probability of distribution by queue 1 is 01r 2 / 3= ,

and the probability distribution to queue 2 is 02r 1/ 3= . Rate of arrivals

in queue 1 is 1λ and in queue 2the rate of arrivals is 2λ . The Service

ratio is the same for each series, so µ .

Page 188: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

188

Fig. 3.32. Closed queueing network

Determine the functional parameters of the queues in the K = 3

network, using the analysis method of average values.

A solution of the system consisting of balance equations is:

1 2ˆ ˆλ 2, λ 1= = .

Step 1:

Initially it is considered 1 2N [0 ] N [0 ] 0= = .

Step 2:

It is determined the characteristic parameter (medium waiting

time, average number of customers and the rate of arrivals) of the

queueing network for k = 1, 2, 3. They have index 1 for the series 1 and

index 2 for queue 2.

Page 189: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

189

1 2

1 2

1 2

1 2

1 2

1

1 1T [1] T [ 1]

2 / 2 1/ 1K 1 N [ 1] 1 N [ 1] 1

2 / 1/ 3 2 / 1/ 3

2 1[ 1] [ 1]

3 3

2 1 5 1 1 1 4 1T [ 2 ] ( 1 ) T [ 2 ] ( 1 )

3 3 3 3

2 5 / 3 10 1 4 / 3K 2 N [ 2 ] 2 N [ 2 ] 2

2 5 / 3 1 4 / 3 7 2 5

6[ 2 ]

7

µ µµ µ

µ µ µ µ

λ µ λ µ

µ µ µ µ

λ µ

= = = = ⋅ = = ⋅ = + +

= =

= + = = + =

⋅ ⋅= = ⋅ = = ⋅ ⋅ + ⋅ ⋅

=

2

4

/ 3 1 4 / 3 7

3[ 2 ]

7λ µ

= + ⋅

=

1 2

1 2

1 2

10 1 17 1 4 1 11 1T [ 3 ] ( 1 ) T [ 2 ] ( 1 )

7 7 7 7

2 17 / 7 34 1 11/ 7 11K 3 N [ 3 ] 3 N [ 2 ] 3

2 17 / 7 1 11/ 7 15 2 17 / 7 1 11/ 7 15

14 7[ 3 ] [ 3 ]

15 15

µ µ µ µ

λ µ λ µ

= + = = + =

⋅ ⋅ = = ⋅ = = ⋅ = ⋅ + ⋅ ⋅ + ⋅

= =

3.3.6. Analysis of closed waiting queues using the

convolution algorithm

This method calculates the performance parameters of a closed

network consisting of n queues, in which K customers are served.

The method is an algorithm for calculating the normalization

constant G (K, n). The determination of the normalization constant is

important because it comes at a probability distribution network status

closed expression.

Page 190: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

190

Basically it determines a matrix whose elements are values of

normalization constant corresponding to a number of customers that

range from 0 to K and a number of queues that varies from 1 to n. it will

be noted the matrix element g (k, i ), k 0 ,K= and i 1,n= .

The algorithm involves the following steps:

Step 1:

The baseline shall be adopted:

k

1

1

g(0 ,i ) 1

ˆ for : i 1, ...,n ; k 1, ...,Kg( k ,1)

λµ

= = =

=

(3.119)

Step 2:

Determine the normalization constant values with the

relationship:

i

i

ˆg( k ,i ) g( k ,i 1) g( k 1,i )

λµ

= − + ⋅ −

(3.120)

Step 2 is repeated until it determines g (K, n) = G (K, n).

Note:

In the calculations are involved:

•The solution of the system equations of balance 1 2 i nˆ ˆ ˆ ˆ, , ..., , ...,λ λ λ λ ;

• Service rates corresponding to the servers of the queues from

the network: 1 2 i n, , ..., , ...,µ µ µ µ .

Page 191: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

191

Knowing the normalization constant determines the network‘s

performance parameters:

• The rate of arrivals in each queue i:

i i

G( K 1,n)ˆ ; i 1, ...,nG( K ,n)

λ λ −= ⋅ = (3.121)

• Average number of customers and from queue i:

kK

ii

k 1 i

ˆ G( K k ,n)N ; i 1, ...,n

G( K ,n)

λµ=

−= ⋅ =

(3.122)

• Applying Little's formula can be determined also the average

time a customer spends in queue 1:

ii

i

NT ; i 1, ...,n

λ= = (3.124)

The complexity and variety of technical systems, in general, and

particularly the manufacturing ones, complains for suitable means and

methods for modeling and simulation. Petri networks and queueing

networks are instruments, which can be used with good results in

modeling and simulation procedures. The two methods are

complementary, being an interference area, that of the stochastic Petri

networks.

The Petri nets and queueing networks, by modeling and

simulation, provide optimal solutions to the problems of exploitation

and management of technical systems.

Page 192: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

192

4. MODELLING WITH FUZZY SETS

4.1. General notions

The Fuzzy Logic concept was introduced for the first time by Lotfi

A. Zadeh at the University of California, Berkeley, in 1965 [44]. At that

time, of the affirmation of the numerical computers based on the exact

logic 0, 1, such a concept seemed unlikely. Zadeh, by this fuzzy logic,

imposed another way to deal with the problem in which the sizes that

determine the evolution of a system have no clearly defined boundaries,

0 or 1, black or white, which may be associated with certain "gray"

areas of uncertainty. In fact, the fuzzy logic gives a new interpretation of

“multiple-valued logic”. For example, the ternary systems (with three

logical values 0, 1/2, 1) have been studied in many works of switching

algebra, but Zadeh introduced the concept of fuzzy set, "vague" for the

cases when the 1/2 boundary value is an uncertain feature.

Today, the term "fuzzy" is used with an adjective value in

Romanian language. The fuzzy sets and fuzzy concepts generally arose

from the need to express quantitatively the "vague", the "inaccurate".

Although there are many branches of mathematics older than the fuzzy

set theory, which deal with the study of such random processes: the

probability theory, the mathematical statistics, the information theory

Page 193: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

193

and others, can not be made substitutions between them and the fuzzy

set theory.

Starting from the classical conception of the set and the element of

a set, it can be argued that the concept of fuzzy set is an approach from a

different angle of the concept of set, more precisely, between an

element belonging to a set and the non-membership series there are a

series of transitional situations, of continuous nature, characterized by

the so-called degrees of membership.

The membership function. Let X be a random set. It is called fuzzy

sets (in X) the result of an application

[ ]F : X 0 ,1→ . (4.1)

The fuzzy set F is characterized by the membership function:

F : X [0 ,1]µ → (4.2)

Values 0 and 1 are the lowest and respectively the highest degree

of membership to F of an element x∈ X. It can be noted that any fuzzy

set is included in the union of the set {0, 1} with the set of rational

numbers, Q.

4.2. Membership functions

For the fuzzy description of certain phenomena and processes, the

mF (x) applications may admit different analytical expressions. Some of

them are devoted in applications because of some facilities related to

calculability and the ease of implementation related

hardware/software. In figures 4.1 ÷ 4.5 is presented the graphical

Page 194: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

194

aspect of the membership functions, considered as being typical, which

allowed clear results in the tested applications. For example, we will

assume that the functions are defined on the interval

[ ]a,b and ( )c a b 2= + .

The triangular membership function

The analytical expression of this membership function (Fig. 4.1.) is

identical with the equation of the straight line which goes through

coordinate points ( )a,0 and ( )c ,1 , for [ ]x a,c∈ and with the equation of

the straight line which is passing through the coordinate points,

and ( )c ,1 and ( )b,0 for ( ]c ,b . So:

( ) ( x a ) /( c a ), a x cm x

1 ( x c ) /( b c ), c x b

− − ≤ ≤= − − − < ≤

(4.3)

If ( )c a b 2= + , the relation can be completely written as:

( ) x cm x 1 2

b a

−= −

−. (4.4)

Fig. 4.1. The triangular membership function

The trapezoidal membership function

µ( )x

Page 195: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

195

The analytical expression of the membership function is

obtained easily, by observing that the trapezius in figure 4.2.a results

from the intersection of a triangle as the one in figure 4.1, having the

height th 1> , and the right of the equation ( )m x 1= . Thus:

( ) t

x cx min 1,h 1 2

b aµ

−= − −

, cu th 1> (4.5)

The trapezoidal membership functions can be also defined by the

adoption of a certain report of the trapezoid bases, ( )h A / B 1= < ,

resulting:

( ) x c1m x min 1, 1 2

1 b aη −

= − − − , cu 1η > (4.6)

Fig. 4.2 Trapezoidal membership functions

A particular case of the membership function is the „Singleton”, equated

with a form derived from the Dirac impulse, having a default width, and

with an overall representation in figure 4.3.

µ( )x

Page 196: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

196

Fig. 4.3. Singleton membership functions

The “bell” type membership function

The analytical expression of "Gauss’ bell" function type,

characterized by the dispersion b aσ = − , the amplitude A 1= and

centered on the right of the equation x c= is:

( )( )( )

2x c

22 b a

m x e

−−

−= (4.7)

Fig. 4.4 The “Gauss’ bell” type membership function

The "saturation" type membership functions

These are defined as functions of ramp type functions to the right

( )xµ

( )xµ

Page 197: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

197

(Fig. 4.5.a) or to the left (Fig. 4.5.b), coupled with the extreme portion of

saturation.

The analytical expression of these membership functions is made

at certain intervals, as it follows:

( )

0 , x a

x am x , a x b

b a

1, x b

< −= ≤ ≤ −

>

(4.8)

( )

1, x a

x am x , a x b

b a

0 , x b

< −= − ≤ ≤ −

>

(4.9)

(a)

(b)

Fig. 4.5 “Saturation” type membership functions

( )xµ

( )xµ

Page 198: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

198

The linear dependence on the interval [ ]a,b may be replaced by

any other type of function (polynomial, exponential, etc.), ensuring the

passage (with continuous derivative) from the values 0 and/or 1 to the

close values.

4.3. Operations with fuzzy sets

The operations of the classical theory of sets can be found in the

case of fuzzy sets, in the terms of the membership function:

• the empty set X∅ ⊆ is characterized by:

( )m x 0; x X∅ = ∈ ; (4.10)

• the total X set by:

( )Fm x 1, x X= ∈ (4.11)

• two fuzzy sets are equal if their membership functions are equal,

so:

M NM N m m ;= ⇔ = (4.12)

• the fuzzy M set is contained in fuzzy set N (punctual order relation

between functions), so:

M NM N m m⊆ ⇔ ≤ (4.13)

• Between the fuzzy sets M and N are defined the operations:

- reunion:

M N∪ , with ( ) ( ) ( )M N M Nm x m x m x∪ = ∨ , x X∈ (4.14)

- intersection:

M N∩ , with ( ) ( ) ( )xmxmxm NMNM ∧=∪ , x X∈ (4.15)

Page 199: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

199

- complementary:

MC , with ( ) ( )CMm x m x= , x X∈ . (4.16)

Remarks

Taking into consideration the punctual order relation between the

membership functions, the three previous operations become:

( ) ( ) ( )( )M N M Nm x max m x , m x∪ = (4.17)

( ) ( ) ( )( )M N M Nm x min m x , m x∩ = (4.18)

( ) ( )CM Mm x 1 m x= − (4.19)

• the algebraic product of the fuzzy sets M and N, noted with M N• ,

is characterized by membership function

M N M Nm m m⋅ = • (4.20)

• the algebraic sum of the fuzzy sets M and N , noted with M N+ , is

characterized by the membership function

M N M N M Nm m m m m+ = + − • (4.21)

Observation

The operations , • + are associative, commutative, but they are

not distributive.

4.4. Linguistic type fuzzy logic

The fuzzy logic is a generalization of the classical logic (“boolen”

logic), replacing its discreet character expressed by the digits 0 and 1

with a continuous one. The basis of fuzzy logic are is so-called

Page 200: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

200

polyvalent logic, introduced and studied by J. Lukasiewicz, after some

research related on the study of the possibilities. Since the year 1940,

Gr. C. Moisil introduced the n-valent Lukasiewicz algebras as algebraic

models for logics with multiple values.

Assuming that V1, V2, ..., Vn are logical variables, in the fuzzy logic

they are taking values in the interval [0,1].

Definition.

Any Vi variable is a fuzzy formula.

If P , Q , ... are formulas in the fuzzy logic, the logical values (of

truth) of the compounds P Q, P Q , P∨ ∧ are assessed as it follows:

( ) ( ) ( )( )A P Q max A P , A Q∨ = (4.22)

( ) ( ) ( )( )A P Q min A P , A Q∧ = (4.23)

( ) ( )A P 1 A P= − (4.24)

( ) ( ) ( )( )A P Q min 1 A P A Q , 1→ = − + (4.25)

Remarks:

It is obvious that this way of seeing things is the same as that of

the bivalent logic, where ( ) { }A P 0 , 1∈ , whatever the sentence P would

be.

The fuzzy logic is a type of continuous logic, because logical

variables take values of truth in the interval [0, 1]. This fact attracts the

existence of some particular elements regarding the linguistic variables:

the relationship of fuzzy implication and the fuzzy inference notion.

Page 201: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

201

Another type of continuous logic was proposed by H.

Reichenbach and is defined as follows:

( ) ( ) ( ) ( ) ( )A P Q A P A Q A P A Q∨ = + − ⋅ (4.26)

( ) ( ) ( )A P Q A P A Q∧ = ⋅ (4.27)

( ) ( )A P 1 A P= − (4.28)

( ) ( ) ( ) ( )A P Q 1 A P A P A Q→ = − + ⋅ . (4.29)

Linguistic variables

The Fuzzy variables are fuzzy sizes associated with the

deterministic ones. The equivalent of the scaling value in deterministic

sense is for a fuzzy variable the linguistic degree (label, attribute)

associated with it. Thus, as for the boolean logic, to the deterministic

value "1" is associated the attribute TRUE, and to „0” the label FALSE, in

the fuzzy logic, for the deterministic variable real positive number, the

associated linguistic variable may be, for example, the height for men .

This may have the linguistic degrees SMALL HEIGHT, MEDIUM HEIGHT,

BIG HEIGHT. The domain of values of the corresponding deterministic

size is called universe of discourse.

To each attribute of a linguistic variable is associated a

membership function, whose value (in deterministic sense) indicates

the confidence level with which a deterministic value can be associated

with the attribute of the linguistic variable. For example, considering for

the linguistic variable "height" three linguistic degrees: SMALL HEIGHT,

MEDIUM HEIGHT, BIG HEIGHT, they can be associated with typical

membership functions as those shown in Figure 4.6. It is noted that the

Page 202: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

202

membership function for the linguistic degree is the SMALL HEIGHT is

of saturation type, indicating that between 1.2 and 1.7 m the heights are

considered small, with different levels of trust situated between 0 and

1, as the deterministic value is closer to 1.2, the degree of its

membership to that label is higher.

Fig. 4.6. The membership functions of the linguistic degrees SMALL

HEIGHT, MEDIUM HEIGHT, BIG HEIGHT

Similarly, for the MEDIUM HEIGHT language level is considered

the maximum level of membership to this category, corresponding to

the value of 1,7 m. The lower or higher values lead to the lowering of

the relative confidence level to the MEDIUM HEIGHT attribute. The BIG

HEIGHT linguistic degree is applied to the values of heights greater than

1.7 m, with confidence levels becoming higher and higher, as the value

increases up to 1.85 m, and for any value over this, the distance is

considered as being LARGE, with maximum confidence level (equal to

1).

Page 203: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

203

For the membership functions in Figure 4.6, it can be said, for

example, that a height of 1,6 m is LOW with the level of confidence (the

value of the membership function) MICA(1,6 ) 0 ,38µ = , is MEDIUM with

the level of trust MEDIE (1,6 ) 0 ,62µ = and LARGE with a confidence level

zero. The number of attributes of a linguistic variable and their

membership functions depend on the nature of the application.

Implications in fuzzy logic

In fuzzy logic, the implication is an operation of composing fuzzy

formulas (variables), in the sense of correlation of two categories of

events, called premises, respectively consequences. The fuzzy

implication is similar, but not fully consistent with the composition of

functions from the deterministic case and is about assessing the

linguistic degrees of a fuzzy subset Q, which is logical or functional

consequence of a P fuzzy subset. The result of a fuzzy implication is also

a fuzzy subset denoted by:

Q' P Q≡ → (4.30)

which has the same linguistic degree as Q, but its membership

functions, that expresses the degree of truth:

( ) ( )A Q' A P Q= → (4.31)

results from some algebraic calculations performed on the

corresponding membership function values that make the implication

fuzzy linguistic degrees. Therefore, considering the fuzzy formulas:

Page 204: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

204

P:x is LARGE,

(4.32)

Q:y este LOW,

where x and y, represent the deterministic variable belonging to the

universe of discourse of the subset P, respectively Q, and express the

fuzzy implication:

Q' P Q≡ → ⇔ IF x is LARGE, THEN y is LOW

Considering ( )Pm x , respectively ( )Qm y , the membership

functions which characterize the fuzzy sets P and Q, is questioned the

problem of determining the membership function:

( ) ( )Q P Qm x , y m x , y→= (4.31)

The most frequently used definitions of the fuzzy implication are:

a) The implication in Mamdani sense:

( ) ( ) ( )P Q P Qm x , y MIN m x , m y→ = (4.32)

b) The Boolean implication:

( ) ( ) ( ) ( ) ( )PP Q P Q Qm x , y MAX 1 m x , m y MAX m x , m y→ = − = (4.33)

c) The Zadeh I implication:

PREMISE CONSEQUENCE

Page 205: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

205

( ) ( ) ( )P Q P Qm x , y MIN 1, 1 m x m y→ = − + (4.34)

d) The Zadeh II implication:

( ) ( ) ( ) ( ){ }P Q P Q Pm x , y MIN MAX m x , m y , 1 m x→ = − (4.35)

e) The Larsen implication:

( ) ( ) ( )P Q P Qm x , y m x m y→ = × . (4.36)

Operators in fuzzy logic

Combining several fuzzy variables, in accordance with a certain

logic, leads to fuzzy expressions with several terms, connected by basic

logic operations (AND, OR, NOT).

As already noted, the fuzzy membership degrees can be combined

with the help of fuzzy composition operators, proposed by Zadeh:

Am AND ( )B A Bm min m , m= (4.37)

Am OR ( )B A Bm max m , m= (4.38)

NOT A Am 1 m= − . (4.39)

The development of practical applications in fuzzy system domain

led to finding other operators, similar to those used in combining

probabilities:

- “product” operator:

Am AND B A Bm m m= • (4.40)

Page 206: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

206

- “sum” operator:

Am OR B A B B Bm m m m m= + − • (4.41)

Ron Yager proposes, as well, a pair of operators, having the

following form:

Am AND ( ) ( )( )1

B A Bm 1 min 1, 1 m 1 mω ω ω

= − − + −

(4.42)

Am OR ( )1

B A Bm min 1, m mω ω ω = +

(4.43)

In which 0 ω< < ∞ .

Usually, in applications is adopted 2ω = , obtaining the pair of

operators of Yager-2 type:

Am AND ( ) ( )( )12 2 2

B A Bm 1 min 1, 1 m 1 m

= − − + −

(4.44)

Am OR ( )12 2 2

B A Bm min 1, m m = +

(4.45)

4.5. Control algorithm based on fuzzy sets

The fuzzy approach in automatic control in general, is going

through a context-sensitive methodology and it starts with the model.

Unlike arithmomorphic models, where the physical phenomenon is

"adjusted" by various assumptions to be within a finite system of

theorems, the fuzzy model allows extending the fund of knowledge to

the complexity of the process. In the first case is made a simplification of

Page 207: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

207

the model, leading to an increase in the so-called un-patterned part of

the phenomenon, while the second situation allows "the covering" of

the process with a context-adaptive model, with theoretically good

fidelity.

The steps of the synthesis method of the automaton (controller)

can be structured as it follows:

• identifying the functional relations on a given structure of a

control system;

• establishing the variables (parameters) of work;

• The completion of the structure with elements required by the

fuzzy model.

Therefore, we will go through the steps proposed, on the basis of a

detailed functional analysis of the approached control system. The

block diagram reprsents in detail the informational picture of the

process, becoming readable to the basic variables level. Thus can be

identified the functional relations and the functional blocks specific to

the fuzzy control. The fuzzy modeling is characterized by a specific

algorithm of treating the information, which is the basis of fuzzy type

synthesis.

Although until now the approach to fuzzy control processes is

not fully based as a theory on its own, many applications will be an

alternative to classical automation problems or unusual practical

solutions in various fields.

Most of the works in the field take the following typical steps of

the fuzzy modeling algorithm [39]:

Page 208: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

208

1) Description of heuristic basis of the problem;

2) Choice of input variables - output;

3) Establishment of the fuzzy sets and of the linguistic values associated

with them;

4) Preparing the bases of the rules for fuzzy interferences;

5) Establishing the fusion processes, making the logical inferences and

the de-fusion of the outputs;

6) Adoption of de-fusion mechanisms;

7) Description of the adaptation mechanisms and learning schemes;

8) In final shape, the fuzzy systems can be implemented as wired

(hardware) in structures dedicated or programmable for general use.

In Figure 4.7 is presented the manner of work of a control system

based on fuzzy concepts.

Fig. 4.7. Fuzzy control system [39]

By developing a heuristic algorithm seeks a more complete and

accurate description of the process. It is obvious that the volume of

information whoch has to be provided is directly proportional to the

PROCESS (OBJECT)

CONTROLLED

Output

BASIS OF

KNOWLEDGE

Fuzzy rules

Fuzzy sets

Input

Defuzzyfication

Perturbations

Fuzzyfication

Fuzzy

inferences

Page 209: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

209

complexity of the problem. Any attempt to formalize the process

described, implicitly leads to neglection of some issues, thus removing

the model of reality. It therefore appears natural to start the process

description in linguistic terms, as being the primary form, the highly

flexible and with high degree of completeness in shaping events. By

operations of structuring the linguistic description and the application

of first order predicate logic, the language models are the basis of IA

systems.

The fuzzy systems are essentially numerical models that exploit

the knowledge structured in the form of logical assertions (with value

of rule). So, the first phase admits in first phase a “rough” linguistic

description, which then passes through certain logical filters, under the

form of reasoning or judgment, resulting a package with greater

knowledge of the structure, which concentrates almost all information

about the process. Initially, the role of a judge is played by a human

expert (or group of specialists) and only they shall decide on matters

that can be minimized or omitted in the description of the problem.

At this stage, the linguistic description can be exhaustive, but is

essential for the transition to other phases of the algorithm for the

synthesis of fuzzy system. Heuristic picture of the whole matter will be

completed during preparation of fuzzy rule bases and the adoption of

mechanisms of adaptive functioning.

4.6. The control of the industrial robots

A special feature of the robot’s operation is its moving in direct

Page 210: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

210

contact with the surface of the working objects. This type of movement

occurs in assembly operations, in a series of technological processing

operations, welding, etc.(Fig. 4.8).

Fig. 4.8. Industrial robot used in processing operations

In these situations, the control of trajectory by the positions’

evaluation method is not practical and, most times, introduces errors

due to imprecision in the exact determination of the equations of the

contact surface. For this reason, the trajectory control is achieved by

measuring the force of pressure on the working object’s surface using

some force/moment sensors.

The implementation of the control system based on fuzzy sets of

contact force parameter, involves the following steps:

A. Defining the input size in the automatic controller. The input

values are:

Page 211: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

211

1. The error of the force/ moment parameter:

FT W ee FT FT= − (4.46)

where:

FTw- the reference valui of the force/moment parameter;

FTe- the effective value of the force/moment parameter.

2. The variation of the input size value: FTe∆ .

B. Defining the linguistic terms associated to each input size.

The linguistic terms associated to linguistic input variable Error of

force parameter/ moment are:

{ }FT eFTe : TL NB ,NM ,NS ,Z ,PS ,PM ,PB= (4.47)

where: NB-Negative Big, Negative Medium, Negative Small, Zero,

Positive Small, Positive Medium, Positive Big.

The linguistic terms associated to the linguistic variables the error

variation of force parameter/ moments are:

{ }FT eFTe : TL NB ,NM ,NS ,Z ,PS ,PM ,PB∆∆ = (4.48)

where: NB-Negative Big, Negative Medium, Negative Small, Zero,

Positive Small, Positive Medium, Positive Big.

C. Establishing the membership functions associated with each

linguistic term corresponding to the input quantities:

In the case of variables associated to input sizes quantities the

error of force parameter/moment and the error variation of force

Page 212: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

212

parameter/ moment of the linguistic terms, Negative Medium (NM),

Negative Small (NS), Zero (Z), Positive Small (PS), Positive Medium (PM) ,

correspond to triangularl type membership functions. To the linguistic

terms Negative Big (NB) and Positive Big (PB) are associated trapezoidal

type membership functions (Fig. 4.9).

Fig. 4.9. Input variables. Membership functions

D. Defining the output size of the decisional process. The output

size is the Movement of the robot’s arm. The linguistic variable

associated to the output quantity is the Displacement.

The linguistic terms associated to the output size are:

{ }DEPLADEPLA : TL NB ,NM ,NS ,Z ,PS ,PM ,PB= (4.49)

Page 213: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

213

where: NB-Negative Big, Negative Medium, Negative Small, Zero,

Positive Small, Positive Medium, Positive Big.

E. Establishing the membership functions associated with each

linguistic term corresponding to the output size

In the case of the variable associated to the output size Movement,

to the linguistic terms, Negative Medium (NM), Negative Small (NS), Zero

(Z), Positive Small (PS), Positive Medium (PM), are corresponding

triangularl type membership functions. To the linguistic terms Negative

Big (NB) and Positive Big (PB) are associated trapezoidal type

membership functions (Fig. 4.10).

Fig. 4.10. The output variable. Membership functions

F. Establishing the method of connection of diverse values of the

membership functions

The multitude of linguistic variables and linguistic terms, to which

were associated membership functions, "vaguely" characterize the

strong values of the input quantities, and of the output quantities

Page 214: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

214

respectively. The connection is made by the MIN-MAX method,

resulting in 49 rules of inference having the form of those from (4.50).

1. If (eFT is NB) and (DELTAeFT is NB) then (DEPLA is NB)

2. If (eFT is NB) and (DELTAeFT is NM) then (DEPLA is NB)

.....................................................................................................................

24. If (eFT is Z) and (DELTAeFT is NS) then (DEPLA is Z)

25. If (eFT is Z) and (DELTAeFT is Z) then (DEPLA is Z) (4.50)

…................................................................................................................

48. If (eFT is PB) and (DELTAeFT is PM) then (DEPLA is PB)

49. If (eFT is PB) and (DELTAeFT is PB) then (DEPLA is PB)

The decisional system implemented in the Fuzzy Logic Toolbox

from Matlab® is presented in figure 4.11.

Fig. 4.11. The decisional system implemented in Fuzzy Logic Toolbox

The dependence of the output variable from the input variables

can be highlighted by the surface representation of variation (Fig. 4.12)

Page 215: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

215

Fig.4.12. The variation surface of the final effector’s movement in report

with the error and the variation of error

An example of the fuzzy system's functioning for two strong

values of the input sizes is shown in figure 4.13, where the interference

rules are put in evidence.

Fig. 4.13. Inference rules

Thus, for the error of force parameter/moment eFT=0,5 and for the

the error variation of force parameter/ moment

∆eFT=0,1, the movement is 5,14 mm.

Page 216: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

216

4.6. The manufacturing scheduling in flexible manufacturing

systems using a fuzzy sets

4.6.1. The stages of the process

An overview of stages to be taken to conduct the decision-making

process based on fuzzy sets is presented in figure 4.14 [13].

Establishing the objectives of the scheduling process

The objectives of scheduling process are economic.

Establish priority rules in relation to which the scheduling

will be made

The set of priority rules is:

{ }1 2 r RRP RP ,RP ,...,RP , ...,RP= (4.51)

The particularities of the scheduling based on fuzzy sets are:

• Can be discussed at a time, several priority rules. These rules will

define them as inputs into the decisional system.

• The inputs into the decisional system reflects the state of the

production system at the time the order is presented for processing

parts, in fact characterize each part requiring processing on a

particular machine in the system. For the case of a decisional

system based on input fuzzy sets is called the evaluation criteria

[39].

Page 217: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

217

Fig. 4.14. The stages of the decisional process [13]

Page 218: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

218

The definition of the domain of values for each priority rule

(evaluation criterion)

To each simple priority rule is assigned a range of variation, in

which you can find specific values of each part covered by the

decisional process. These areas of values will be:

inf sup1 1 1 1

inf supr r r r

inf supR R R R

RP : D [ L ,L ]

RP : D [ L ,L ]

RP : D [ L ,L ]

=

=

=

(4.52)

where, inf supr rL ,L are the superior and respectively the inferior limit of

the domain of values associated to the priority rule rRP ,r 1,R= .

The definition of the linguistic variable for each priority rule

(evaluation criterion)

The parts that require processing on a particular machine will be

treated as possible choices.

To each priority rule (evaluation criteria) is associated with a

linguistic variable. For simplicity, linguistic variable will have the same

name as the rule of priority. Thus: the rule of priority will become

linguistic variable: rRP ,r 1,R= .

Page 219: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

219

Establishing the linguistic degrees associated with each

linguistic variable

For each linguistic variable are defined linguistic degrees or

linguistic terms. They will serve to characterize the "vaguely" firm

information. The sets of the linguistic terms associated with each

linguistic variable will have the following shape:

{ }

{ }

{ }

RP RP RP RP1 1 11 12 1K

RP RP RP RPr r r 1 r 2 r k

RP RP RP RPR R R1 R 2 Rk

RP : GL GL ,GL ,...,GL

RP : GL GL ,GL ,...,GL

RP : GL GL ,GL ,...,GL

=

=

=

(4.53)

For a linguistic variable RPj the set of linguistic degrees to which it

can be associated is of form:

{ }RPrGL Fm,m,Md ,M ,FM= (4.54)

So:

• Fm – very low;

• m – low;

• Md – medium;

• M – great;

• FM – very great.

Set membership functions associated with each level

language. Input values

Page 220: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

220

Several types of membership functions were presented in chapter

4.2.

Each linguistic degree, corresponding to a linguistic variable and is

associated membership function:

{ }

{ }

{ }

RP RP RP RP RP1 1 1 11 12 1K

RP RP RP RP RPr r r r1 r 2 r K

RP RP RP RP RPR R R R1 R 2 RK

RP GL FA fa , fa , ..., fa

RP GL FA fa , fa , ..., fa

RP GL FA fa , fa , ..., fa

→ → =

→ → =

→ → =

(4.55)

Definition of the outputs of the decisional process

The outputs of the decision-making are the priority processing

will be associated with each parts i i 1,n= , under the queue for each

machine j, j 1,m= in the system. The priority will be determined by

fuzzy sets techniques. The vectors of the processing priorities are:

{ }

{ }

{ }

1 j m1 1 1 1

1 j mi i i i

1 j mn n n n

PRIORI PRIORI , ...,PRIORI , ...,PRIORI

PRIORI PRIORI , ...,PRIORI , ...,PRIORI

PRIORI PRIORI , ...,PRIORI , ...,PRIORI

=

=

=

(4.56)

In relations (4.56) jiPRIORI ;i 1,n ; j 1,m= = , meaning the priority of

part i in report to machine j.

Page 221: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

221

Establishing the value domain of the outputs

The value domains of the outputs are the following:

PRIORIi : out 1iD [0 ,1]; i 1,n= = ; (4.57)

Defining the linguistic variable for the outputs

To the each output: priority processing part j on machine i, is

associated with a linguistic variable. For simplicity, linguistic variable

will have the same name as the output size. Thus the output size:

jiPRIORI , i 1,n ; j 1,m= = , will become the linguistic variable priority

processing of part i on machine j: ijPRIORI , i 1,n ; j 1,m= = .

Defining linguistic degrees associated with each linguistic

variable. Outputs

For each linguistic variable associated to outputs are defined

language degrees or linguistic terms. They characterize "vaguely" the

information resulting from the inference procedures. The sets of

degrees of the linguistic variables associated with each priority type

language processing part j on machine i will be in the form:

j j j jPRIORI PRIORI PRIORI PRIORIj i i i i

i 1 2 kPRIORI GL GL ,GL , ,GL → =

… (4.58)

For a linguistic variable: jiPRIORI , i 1,n ; j 1,m= = , the set of the

linguistic degrees to which it can be associated is of form:

{ }j

PRIORI ilGL PFm,Pm,PMd ,PM ,PFM ; i 1,n ; j 1,m ;l 1,k= = = = (4.59)

Page 222: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

222

So:

• PFm – very low priority;

• Pm – low priority;

• PMd – medium priority;

• PM – great priority;

• FPM – very great priority.

Establishing membership functions associated with each

linguistic degree. Outputs

The language for each linguistic degree variables describing the

output is associated a membership function. The linguistic variable for

the appropriate language levels jiPRIORI , i 1,n ; j 1,m= = , the set of

membership functions will be:

j jPRIORI PRIORIj i i

i

j jj jPRIORI PRIORIPRIORI PRIORI i ii i

1 2 l k

PRIORI GL FA

fa , fa , , fa , ..., fa

i 1,n ; j 1,m ;l 1,k

→ → =

=

= = =

… (4.60)

Establishment of the method to connect the various values of

the membership functions. Inference engine

The multitude of linguistic variables and linguistic degrees, which

were associated the membership functions, characterize "vaguely" the

firm values of the magnitudes of input sizes, and output sizes

respectively.

Page 223: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

223

The inference engine consists of a set of rules of the form:

IF (premise) THEN (conclusion) (4.61)

Premise – is a constant property resulting from the connection,

by specific procedures related to the fuzzy sets theory, various degrees

of linguistic variables associated with appropriate language input

quantities. In the case of authorizing proceedings to be described, it was

used the connector AND [39].

Conclusion – is the affirmed property and the property will be

expressed by linguistic variables associated with language degrees

corresponding to the output value.

The RP set is considered, equation (4.51), the linguistic variables

corresponding to the input quantities, with R elements. Also to each

linguistic variable: rRP , r 1,R= , is associated with k language degrees,

equation (4.53).

Let it be jiPRIORI , i 1,n ; j 1,m= = the associated linguistic

variable of the output, which means priority processing of part i on the

machine j. This corresponds to k degrees of linguistic variables,

equation (4.58).

Considering the foregoing rule base (inference engine), it will be

of the form:

Page 224: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

224

jPRIORI i1RIN : IF (RP1 =

RP11GL AND ... AND RPR =

RP1RGL ) THEN

jiPRIORI =(

jPRIORI i

1GL )

OR

... ... ...

jPRIORI iinRIN : IF (RP1 =

RPl1GL AND ... AND RPR =

RPlRGL ) THENI (4.62)

( jiPRIORI =

jPRIORI i

lGL )

OR

... ... ...

jPRIORI iINRIN : IF (RP1 =

RPk1GL AND ... AND RPR =

RPkRGL ) THEN

( jiPRIORI =

jPRIORI i

kGL )

If in the general case are R input linguistic variables, each variable

being associated with k degrees of language, they can be combined in kR

inference rules (rule base and inference engine). So, IN = kR,

respectively 1,IN

From equation (4.62) shows that the inference rules themselves

are connected by fuzzy operator OR. The mode of aggregation of input

variables (OR operator), these rules of inference (AND operator),

corresponding to the composition of fuzzy relations MIN-MAX [39]

In the procedure of fuzzyfication, at a time, the input quantities

are firm values. For these values are estimated membership functions

corresponding to input quantities associated with linguistic degrees. In

Page 225: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

225

fact this is the actual procedure of fuzzyfication. It is assumed that the

firm values of the input quantities are:

0 0 0 0 01 2 r RRP { RP ,RP , ,RP , ,RP }= … … (4.63)

Assessing the priority processing of part i on the machine j can be done

using the base of rules (4.62), which can be customized to firm values,

from (4.63) as it follows:

j jPRIORI PRIORI0 ji i1 1 i

jPRIORIRP 0 RP 0 ji

11 1 1R R 1 i

j jPRIORI PRIORI0 ji iin in i

jPRIORIRP 0 RP 0 ji

l1 1 lR R l i

jPRIORI iIN

RIN fa ( PRIORI )

MIN( fa ( RP ), , fa ( RP ), fa ( PRIORI ))

RIN fa ( PRIORI )

MIN( fa ( RP ), , fa ( RP ), fa ( PRIORI ))

RIN

= =

=

= =

=

=

jPRIORI0 jiIN i

jPRIORIRP 0 RP 0 ji

k1 1 kR R k i

fa ( PRIORI )

MIN( fa ( RP ), , fa ( RP ), fa ( PRIORI ))

== …

(4.64)

The membership function resulting from the connection MAX-MIN

is a vague size and has a expression:

jPRIORI0 jirez i

j j jPRIORI PRIORI PRIORI0 j 0 j 0 ji i i1 i 2 i IN i

fa ( PRIORI )

MAX( fa ( PRIORI ), fa ( PRIORI ), , fa ( PRIORI ))

=

= …

(4.65)

Page 226: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

226

If a small number of inputs (2, 3) the base of rules can be

represented in a table form (decision table or inference panel). Thus if

one considers the input quantities RP1 and RP2, the fuzzy inference

may be those in table 4.1. It is marked the rule:

IF RP1=m AND RP2=Md THEN jiPRIORI =PMd

Table 4.1. Inference panel

jiPRIORI

RP1

Fm m Md M FM

RP2

Fm Pfm Pfm Pm Pm PMd

m Pfm Pm PMd PMd PMd

Md Pm PMd PMd PM PM

M Pm PMd PM PM PFM

FM PMd PM PM PFM PFM

In practical applications, at a certain time, only certain inference

rules are active, so the input quantities have firm values which, if are

fuzzyficated, can be described using fewer degrees than the assigned

language for linguistic input variable in question.

Establishing the method to defuzzyfication

The result of fuzzy inference (vague) is a fuzzy information

(vague) as a function of belonging "result". When determining priority

Page 227: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

227

processing of part i on machine j this will be:

jPRIORI0 jirez ifa ( PRIORI ) ; i 1,n ; j 1,m= =

By defuzzyfication we mean the operation for obtaining a firm

value ("crisp") of the output quantity, based on membership function

"result" of fuzzy inference [39]. Thus the first category of output sizes:

jPRIORI DEFUZIFICARE0 j 0 j 0 j out 1irez i i i ifa ( PRIORI ) PRIORI ; PRIORI D ;

i 1,n ; j 1,m

→ ∈

= = (4.66)

From the many existing defuzzyfication methods [39], it will be

used the method of center of gravity, the most popular method applied.

The principle of the method is to determine the firm size of the

output value taking into account – in a weighted manner - all influences

resulting from activation of inference rules by strong values of the input

quantities at a time.

The relation underlying the center of gravity method is as follows:

jPRIORIj 0 j ji

out 1 i rez i iD0 j ii j

PRIORI0 j jiout1 rez i iDi

PRIORI fa ( PRIORI ) dPRIORI

PRIORI

fa ( PRIORI ) dPRIORI

=∫

∫ (4.67)

The firm values of the output sizes resulting from the procedure of

defuzzyfication will form the information that stands on the basis of

scheduling actual parts in the system.

Page 228: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

228

4.6.2. The scheduling procedure based on fuzzy sets

with simple scheduling rules

4.6.2.1. The principle of the procedure

This scheduling procedure variant is characterized by the fact that

the input sizes into the decisional system based on sets are the firm

values of certain technological parameters which make the object of

some simple rules of priority. These simple rules of priority refer to

parts and their processing operations on the machines which constitute

the system.

Generally, in a flexible manufacturing system, there can be

processed at a time n types of parts. The system comprises m number of

machines. The operations appropriate to the technological routes

related to the parts can be executed on different machines of the

system, the machines being able to perform various processing

technology functions [43]. Therefore a part can play through several

versions of tracks to be processed. Each technological route,

corresponding to a track, will involve some machines of the system’s

composition, with their technological characteristics relative to the

work part.

The objective of the procedure

The objective of the procedure is to determine, ultimately, the

various routes’ technological priorities that each of the n parts can

browse in the system and the scheduling of the system production from

the resulting hierarchy [13].

Page 229: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

229

Presenting the principle of the procedure

The procedure for determining the priority of processing is

synthetically described in figure 4.14.

The stages of the procedure are:

i. Establishment of economic efficiency criteria fixed as objective of the

scheduling;

Fig. 4.14 Scheduling procedure [13]

RPRR rRP1

IMPLEMENTATION

EVALUATION

YES

NO

4

1

2

3

5

6

8

7

EFICIENCY

CRITERIA

SIMPLE PRIORITY

RULES

PARTS PARAMETERS

DECISION

PROCEDURE BASED

ON FUZZY SETS

GANTT GRAPH

EFFICIENCY INDICATORS

DETERMINATION

Page 230: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

230

ii. Selecting simple priority rules which will become input sizes in the

decisional process based on fuzzy sets;

iii. Identification of input information in the decisional process, for each

type of part;

iv. The decisional procedure based on fuzzy sets supposes going

through four phases (fig. 4.15):

iv.1. The procedure for calculating the firm value of the input sizes

vi.2. The implementation and operation of the fuzzy decision system,

with the completion phase described in paragraph 4.6.1;

vi.3. The procedure for calculating the priorities of different

technological routes that the parts can go through the system;

vi.4. Subsequent calculations to determine the priority of processing the

work part on the machine j. Determining the priorities of the

technological paths that each part can go through the system.

Comparison among the priority of the routes and their ordering.

v. Setting the order of processing the parts and establishing the

machinery of the system that will make the processing (proper

authorization) - Gantt chart;

vi. Calculation of economic efficiency indicators;

vii. Development of some iteration for the improvement of indicators of

economic efficiency and other operating parameters of the flexible

manufacturing system;

viii. Implementation of scheduling procedure results in the actual

manufacture.

Page 231: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

231

Fig. 4.15 The IV-th stage. The scheduling procedure based on fuzzy sets [13]

INPUT 2INPUT 1

FUZZYFICATION

FUZZY

INPUTS

INFERENCE

RULES

FUZZY

OUTPUT

DEFUZZYFICATION

4

4. 1

4. 2

1 2 3

RULES BASE

IF...AND...THEN...

INPUT R

THE PROCEDURE FOR

CALCULATING

THE FIRM VALUE OF THE

4. 3

PRIORITY HIERARCHY

4. 4

GANTT GRAPH5

FIRM

INPUTS

FUZZYFICATION

PRIORITY OF PROCESSING

THE PART i ON THE MACHINE j

FIRM

OUTPUT

Page 232: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

232

The "target" of the author’s concerns was the development of

algorithms - later transposed into program modules - to give

consistency to stage IV, Scheduling procedure based on fuzzy sets. It

should be noted that in addition to the actual implementation of the

fuzzy system, the procedure requires some calculations by which to

achieve the strong values of the input quantities in fuzzy system and

subsequent calculations of fuzzy data processing, in order to compare

the achieved priorities. The calculating algorithms depend on simple

priority rules that are used.

Exemplifying the operation of authorizing the proposed

procedure will be considering a case study, relative to the flexible

manufacturing system described in the next paragraph.

4.6.2.2. Applying the procedure in the case of a

flexible manufacturing system

The structural and functional characteristics adopted for the

system under study (general case) are [13]:

• The system comprises the m machines, which can perform various

processing operations;

Page 233: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Fig

. 4.1

6. F

lex

ible

ma

nu

fac

turi

ng

sy

ste

m [

13

]

PI

M1

M2

M3

PD

ST

4

TrC

1

TrC

2

M4

ST

2S

T1

ST

3

SIM

PL

E

PR

IOR

ITY

RU

LE

S S

CH

ED

UL

ING

PR

OC

ED

UR

E B

AS

ED

ON

FU

ZZ

Y S

ET

S

EF

ICIE

NC

Y

CR

ITE

RIA

RP

RR

Pr

RP

1

AG

V

AG

V

PA

RT

S

PA

RA

ME

TE

RS

Modelling and simulation of mechatronic systems

233

Page 234: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

234

• Each machines has a warehouse (stock) parts’ buffer: dST ;d 1,D= ;

• The system can be processed in types of parts: iP ;i 1,n= ;

• Each part can be worked on several versions of the system

engineering itinerary. This means that there are several machines

that can run at one time, the operations required for each sequence

(step) of processing the parts;

• The parts are brought in the system with a conveyor type transfer

device;

• The parts are loaded on the robot-car type transfer devices (AGV-

Automated Guided Vehicle) in the loading point PI;

• The download of the parts occurs at the point of discharge PD,

after they are discharged through the transfer conveyor type.

• These being the general characteristics, it is considered a flexible

manufacturing system with a block diagram as the one in figure 3.5.

The system considered is a particular case of that described above.

The system’s features are:

• Four working machines: M1, M2, M3 and M4 (m = 4);

• Each tool has a storage buffer: ST1, ST2, ST3 and ST4;

• The entry of the parts to the system is made using a transfer

device type conveyor TrC1;

• The parts to be processed are focused and fixed on pallets in the

loading point PI;

• The spreading of the blades and hence of the parts in the system is

made using robot-cars;

Page 235: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

235

• The processed parts are unloaded at the point of discharge PD;

• The evacuation of parts of the system is made through the transfer

conveyor type TrC2.

The question is to determine, using the procedure described in

section 3.2, the priorities of processing the parts in the system, in the

machines in its composition. After determining the priorities, we pass

to the proper scheduling of parts in the processing system.

i. – Efficiency criteria

The prioritization process will seek to minimize the time that the

parts spend in the system.

ii. - Simple priority rules used in decision-making system

based on fuzzy sets

The priority rules used for illustrating the operation of the

decision system are part of simple priority rules. These are:

RP1: Select the part with the lowest total processing time;

RP2: Select the part with the lowest ratio of the running time of

immediate operation (below) and total processing-SDT (Smallest value

Obtained by Dividing the processing time of the imminent operation by

the total processing time);

RP3: Select the part with the lowest product of the immediate

execution of the operation (below) and total working-SMT (Smallest

value Obtained by Multiplying the processing time of the imminent

operation by the total processing time).

Page 236: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

236

Working hypothesis

It is adopted the following assumptions:

• It is considered that in the system will be processed a total of

three parts (n = 3);

• For each part through are possible to go through four

technological routes;

• Each technology route involves processing operations on two of

the machines of the system.

iii - The technological parameters of the parts

The technological parameters of the parts will stand on the basis

of to calculate the firm values of the input quantities corresponding to

simple priority rules adopted.

For the case of flexible manufacturing system considered, the

simple priority rules require knowledge of operating time

corresponding to part i and the machine j:

Operative timeij = basis timeij + auxiliary timeij [min]; i 1,n ; j 1,m= = (4.68)

Operative times will be elements of matrices, one for each part,

whose lines will designate the machines in the system, and the columns

will be the operations to be performed on the part. The input data are

summarized in incidence technology matrices. The general form of this

type of matrix for the part i is as follows:

Page 237: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

237

1 o O

i i i 1

i

i i i j

i i i m

OperationOp Op OpMachine

mit ( 1,1) mit ( 1,o) mit ( 1,O ) M

MIT ;i 1,nmit ( j ,1) mit ( j ,o) mit ( j ,O ) M

mit ( m,1) mit ( m,o) mit ( m,O ) M

= =

… …

⋯ ⋯

⋮ ⋯ ⋮ ⋯ ⋮ ⋮

⋯ ⋯

⋮ ⋯ ⋮ ⋯ ⋮ ⋮

⋯ ⋯

(4.69)

Where:

oi ij

i

mit ( j ,o) TP ;if the part i is process in g to machine j at operation o;

mit ( j ,o) 0 ;if the part i is not process in g to machine j at operation o;

i 1,n; j 1,m ; o 1,O

=

=

= = =

(4.70)

For the particular case considered the technological incidence

matrices have the form:

i i

i ii

i i

i i

mit (1,1) mit ( 1,2 )

mit ( 2,1) mit ( 2 ,2 )MIT ; i {1,2 ,3 }

mit ( 3 ,1) mit ( 3,2 )

mit ( 4 ,2 ) mit ( 4 ,2 )

= ∈ (4.71)

The technological impact matrices corresponding to the three

parts are the following:

1 2 3

30 0 10 0 0 25

0 27 15 0 40 0PART 1: MIT ; PART 2 : MIT ;PART 3 : MIT

25 0 0 20 35 0

0 30 0 25 0 17

= = = (4.72)

Page 238: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

238

Given the technological incidence matrices of the three types of

parts, there can be identified the variants of technological route for each

type:

→ → →→ → →→ → →→ → →

Op1 Op2 Op1 Op2 Op1 Op2

M1 M2 M1 M3 M2 M1

PART 1: ; PART 2 : ; PART 3 :M1 M4 M1 M4 M2 M4

M3 M2 M2 M3 M3 M1

M3 M4 M2 M4 M3 M4

It is found out the existence of a number of four possible routes

for each of the three parts. In these circumstances it is necessary to

determine the priorities of the technological routes to determine the

order of processing the parts, namely the allocation of machines to

process various parts.

iv- Scheduling procedure based on fuzzy sets

iv.1- The procedure for calculating the firm value of the input

quantities

Quantities that are object to simple rules of priority will become

input sizes into decision-making system based on fuzzy sets. To be

“fuzzyficated”, first you need strong values of these calculated

quantities.

The procedure for determining the firm values of the input

quantities involves their calculation for each item and for each

technology route that could be covered by it.

The algorithm calculation steps are:

Page 239: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

239

iv.1.1-Identify all pairs of elements of the matrix of technological

impact having the property:

i imit ( j1,1) 0 mit ( j2 ,2 ) 0 ; i 1,3 ; j1 1,4 ; j2 1,4≠ ∧ ≠ = = = (4.73)

So it is identified the technological itinerary variants that a part i can

track through the system.

iv.1.2- It is memorized (retained) the pairs of machines matching

to the relation (4.73):

PimOp1( k ) j1; k 1,4 ; j1 {1,2,3,4 } ; j2 { 1,2 ,3 ,4 }

PimOp2 ( k ) j2

== ∈ ∈ =

(4.74)

Where:

PimOp1 - vector of machines that can process part i to the

operation 1;

PimOp2 - vector of machines that can process part i to the

operation 2.

iv.1.3 – It is determined the total processing time for each part

and for each technological route, when it is met the condition (4.73):

i i iTT ( k ) mit ( j1,1) mit ( j2 ,2 )

for i {1,2,3 } ; k 1,4 ; j1 {1,2 ,3 ,4 } ; j2 {1,2,3,4 }

= +

∈ = ∈ ∈ (4.75)

iv.1.4 - It is determined, for each part i, the ratio of the running

time of immediate operation (following) and total processing-SDT

Page 240: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

240

(Smallest value obtained by Dividing the processing time of the imminent

operation by the total processing time):

a) first operation:

i1 i1 iSDT (k) MIT (j1,1)/ TT (k) ; i {1,2,3} , j1 {1,2 } ,k 1,4;= ∈ ∈ = (4.76)

where:

i – the index of the part;

j1 – the index of the machine on which the first operation is

made;

k – the index of the technological route.

b) the second operation:

i2 i2 iSDT (k) MIT (j2,2)/ TT (k) ; i {1,2,3} , j2 { 1,2 } ,k 1,4;= ∈ ∈ = (4.77)

where:

j2 – the index of the machine running the second operation. The

other indexes have the same meaning as in relation (4.76).

iv.1.5- It is determined, for each piece i, the product of immediate

execution time of operation (following) and total-SMT processing time

(Smallest value obtained by Multiplying the processing time of the

imminent operation by the Total processing time):

a) the first operation:

i1 i1 iSMT (k) MIT (j1,1) TT (k) ; i {1,2,3} , j1 {1,2 } ,k 1,4;= × ∈ ∈ = (4.78)

Page 241: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

241

b) the second operation:

i2 i2 iSMT (k) MIT (j2,2) TT (k) ; i {1,2,3} , j2 { 1,2 } ,k 1,4;= × ∈ ∈ = (4.79)

iv.1.6- Generating the matrices of the firm values of the input sizes

For evaluation and priority processing on a part of machinery

which meets one of the four different technological route, the firm

values of the input quantities, as calculated from (iv.1.3, iv.1.4 and

iv.1.5) will be transposed into an appropriate decision-making system

based on fuzzy sets. Thus for each part i and each operation o there is

generated an array of strong values of the input quantities. This matrix

is:

i io io

i io ioi o

i io io

i io io

TT SDT ( 1) SMT (1)

TT SDT ( 2 ) SMT ( 2 )PO ;i {1,2,3 } ; o { 1,2 }

TT SDT ( 3 ) SMT ( 3 )

TT SDT ( 4 ) SMT ( 4 )

= =∈ ∈

(4.80)

For the case considered are generated six matrices. Each line of

such a matrix is the "triple" of the input sizes into the assessment

procedure and the effective operation of the priority of part i to

operation o.

In tables 4.2, 4.3 and 4.4 are centralized matrices of the firm

values of the input quantities for each item, values obtained by running

the program prio_itinerary [13].

Page 242: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

242

Table 4.2. The firm values of the inputs for PART 1

P A R T 1

Technological

route

OPERATION 1 OPERATION 2

TT SDT11 SMT11 TT SDT12 SMT12

2M1M → 57 0.5263 1710 57 0.4737 1539

4M1M → 60 0.5000 1800 60 0.500 1800

2M3M → 52 0.4808 1300 52 0.5192 1404

4M3M → 55 0.4545 1375 55 0.5455 1650

Table 4.3. The firm values of the inputs for PART 2

P A R T 2

Technological

route

OPERATION 1 OPERATION 2

TT SDT21 SMT21 TT SDT22 SMT22

3M1M → 30 0.3333 300 30 0.6667 600

4M1M → 35 0.2857 350 35 0.7143 875

3M2M → 35 0.4286 525 35 0.5714 700

4M2M → 40 0.3750 600 40 0.6250 1000

Table 4.4. The firm values of the inputs for PART 3

P A R T 3

Technological

route

OPERATION 1 OPERATION 2

TT SDT31 SMT31 TT SDT32 SMT32

1M2M → 65 0.6154 2600 65 0.3846 1625

4M2M → 57 0.7018 2280 57 0.2982 969

1M3M → 60 0.5833 2100 60 0.4167 1500

4M3M → 52 0.6731 1820 52 0.3269 884

Page 243: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

243

iv.2- The implementation and operation of fuzzy decisional system

is going through the phases described in section 4.6.1. The

particularity of the specific case being studied is that the immediate

outputs of fuzzy decision-making system designate the priority of

part i to operation 1 or operation 2. By the vectors of relations

(4.74) were retained the possible routes of each system parts and

machines that can run first or second operation for each route.

The decision-making system based on fuzzy sets is implemented

in Matlab ® - Toolbox fuzzy logic. In figure 4.17 is presented the

PP2.fis editor of the decision-making system for the case

considered.

Fig. 4.17. The decisional system implemented in Toolbox fuzzy logic-

Matlab® [13]

Page 244: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

244

There are highlighted:

• Entries: TT, SDT and STM;

• Exit: PRIORI;

• Aggregation method: MAX-MIN;

• de-fuzzyfying method: center of gravity.

There will be ongoing the phases described in paragraph 4.6.1.

iv.2.1. The simple priority rules become input sizes in the

decision-making process

RP1: Total processing time for part i: iTT ; i 1,n= ;

RP2: The report between the execution time of the immediate

operation (following) and the total time of processing (SDT):

ioSDT ( j ) ; i { 1,2 ,3 } ; o { 1,2 } ; j {1,2,3,4 }∈ ∈ ∈ ;

RP3: The product of the immediate execution of the operation

(following) and total processing time (SMT):

ioSMT ( j ) ; i {1,2 ,3 } ; o {1,2 } ; j {1,2,3,4 }∈ ∈ ∈ .

The calculation of the firm values of these quantities of entry was

established by the algorithm described in iv.1.

iv.2.2. The definition of the domain of values for each priority rule

(evaluation criterion). Each input quantity is associated with a range of

variation, in which specific values can be found subject to decision-

making parts. These areas of values can be (fig. 4.18):

1 1

2 2

23 3

RP TT : D [ 20 ;70 ] [min]

RP SDT : D [0.1;0.75 ]

RP SMT : D [0 ; 2500 ] [min ]

= == =

= =

(4.81)

Page 245: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

245

iv.2.3. Definition of linguistic variable associated with each priority

rules (evaluation criterion). To each priority rule (evaluation criteria) is

associated a linguistic variable. For simplicity linguistic variable will

have the same name as the rule of priority. Thus:

The input size iTT ; i 1,n= , becomes the input linguistic

variable iTT ; i 1,n= ;

Fig. 4.18. The characteristic parameters of input linguistic variables

• The input size ioSDT ( j ) ; i { 1,2 ,3 } ; o { 1,2 } ; j {1,2,3,4 }∈ ∈ ∈

becomes the input linguistic variable

ioSDT ( j ) ; i { 1,2 ,3 } ; o { 1,2 } ; j {1,2,3,4 }∈ ∈ ∈ ;

Page 246: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

246

• The input size ioSMT ( j ) ; i {1,2 ,3 } ; o {1,2 } ; j { 1,2,3,4 }∈ ∈ ∈

becomes the input linguistic

variable ioSMT ( j ) ; i {1,2 ,3 } ; o {1,2 } ; j {1,2,3,4 }∈ ∈ ∈ .

The three linguistic variables are presented in Figure 4.18.

iv.2.4 - Establishing linguistic degrees associated with each

linguistic variable. For input linguistic variables are associated the

linguistic levels (fig. 4.18):

• Fm – very low;

• m – low;

• Md – medium;

• M – great;

• FM – very great.

iv.2.5. Establishing the membership functions associated with

each linguistic degree, inputs. For very low linguistic degree (Fm) and

very great (FM) type membership functions are trapezoidal, and for low

linguistic degree (m), medium (Md) and high (M), the membership

functions are of triangular type (fig. 4.18).

iv.2.6. Defining output of the decision process. For the decision

level that establish the order of processing parts, the outputs will be

processing priority associated with each part i, i 1,n= , which is in the

range of waiting in front of each machine j, j 1,m= in the system.

iv.2.7. Determination of the values of the output quantity. The

domain of values of the output size PRIORIi:

Page 247: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

247

out 1iD [0 ,1]; i 1,n= = (4.82)

iv.2.8. Definition of linguistic variable corresponding to the output

value. Output size: jiPRIORI , i 1,n ; j 1,m= = ,will become the linguistic

variant priority of processing the part i on the machine j:

ijPRIORI , i 1,n ; j 1,m= = .

The parameters characteristic to the linguistic variable PRIORI are

presented in Figure 4.19.

Fig. 4.19. The characteristics of the output linguistic variable

iv.2.9. Set the linguistic degrees associated to the output linguistic

variable. For output linguistic variable linguistic degrees are:

• PFm – very low priority;

• Pm – low priority;

• PMd – medium priority;

• PM – great priority;

• FPM – very great priority.

Page 248: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

248

iv.2.10. Establishing membership functions associated with each

linguistic degree of linguistic output. To each linguistic degree

corresponds an appropriate language linguistic variable, describing the

output which is associated to the membership function. For very low

priority linguistic degree (PFm) and very great priority (PFM) the

membership function types are trapezoidal, and for the linguistic degree

low priority (Pm), medium priority (PMd) and high (PM) the

membership functions are of triangular type (fig. 4.19).

iv.2.11. The method of connecting the various values of

membership functions. The inference engine. Multitude of linguistic

variables and linguistic degrees, which were associated membership

functions, characterize "vaguely" the strong values of the input

quantities, and the output quantities respectively. The connection is

made by MIN-MAX method, resulting in 125 ultimately shape the rules

of inference of (4.83).

1. If (TT is Fm) and (SDT is Fm) and (SMT is Fm) then (PRIORI is PFM)

2. If (TT is Fm) and (SDT is Fm) and (SMT is m) then (PRIORI is PFM)

63. If (TT is Md) and (SDT is Md) and (SMT is Md) then (PRIORI

is PMd)

124. If (TT is FM) and (SDT is FM) and (SMT is M) then (PRIORI is PFm)

125. If (TT is FM) and (SDT is FM) and (SMT is FM) then (PRIORI is PFm)

(4.83)

Aside from the editing rules of inference, the inference engine up,

you may view how these rules are reflected by the membership

functions associated with each linguistic degree (fig. 4.20). This

character can sense exactly "vague" the information they work with

fuzzy systems. Also there is the possibility of variation in surface

Page 249: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

249

representation of the output quantity depending on two inputs. For

example, in figure 4.21, is presented the variation surface of the output

size PRIORI on the basis of SDT and TT input quantities.

iv.2.12. Establishing the defuzzyfication method. For

defuzzyfication is used the method of centroyd. The defuzzyfication

selection method is made in the fuzzy graphics editor window (fig.

4.17).

PP2.fis file characteristics: size of input, output value, areas of

values, language degrees, membership functions, connection method,

rules of inference, defuzzyficare method are presented in Annex I.2.

Fig. 4.20. Inference rules [13]

Page 250: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

250

Fig. 4.21. The variation surface of the output size PRIORI depending on

the input sizes TT and SDT

After going through two stages of the procedure for determining

the priority of processing were obtained two sets of results:

1. Pairs of queue

PimOp1( k ) j1; k 1,4 ; j1 {1,2,3,4 } ; j2 { 1,2 ,3 ,4 }

PimOp2 ( k ) j2

== ∈ ∈ =

These are possible technological routes of each piece in the system.

Systematically these data are summarized in table 4.5.

Page 251: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

251

Table 4.5. The possible technological routes in the system

PART OPERATION STRING

Te

ch

no

log

ica

l

rou

te I

(ma

ch

ine

)

Te

ch

no

log

ica

l

rou

te I

I

(ma

ch

ine

)

Te

ch

no

log

ica

l

rou

te I

II

(ma

ch

ine

)

Te

ch

no

log

ica

l

rou

te I

V

(ma

ch

ine

)

PART 1 Operation 1 P1mOp1 M1 M1 M3 M3

Operation 2 P1mOp2 M2 M4 M2 M4

PART 2 Operation 1 P2mOp1 M1 M1 M2 M2

Operation 2 P2mOp2 M3 M4 M3 M4

PART 3 Operation 1 P3mOp1 M2 M2 M3 M3

Operation 2 P3mOp2 M1 M4 M1 M4

2. Processing priorities of parts on each machine that corresponds to

technological operations in each itinerary. This information is

presented in tables 4.6, 4.7 and 4.8.

Table 4.6. The priorities of the technological routes for PART 1

P A R T 1

PR

IOR

IP1

OP

1 (

Th

e

pr

ior

itie

s st

rin

g o

f P

AR

T

1 a

t o

pe

rati

on

1)

Op

era

tio

n

Ma

ch

ine

PR

IOR

IP1

OP

2 (

Th

e

pr

ior

itie

s st

rin

g o

f P

AR

T

1 a

t o

pe

rati

on

2)

Op

era

tio

n

Ma

ch

ine

Te

ch

no

log

ica

l

rou

te

0.3454 1 M1 0.4101 2 M2 2M1M →

0.3269 1 M1 0.3269 2 M4 4M1M →

0.3269 1 M3 0.3625 2 M2 2M3M →

0.4439 1 M3 0.3278 2 M4 4M3M →

Page 252: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

252

Table 4.7. The priorities of the technological routes for PART 2

P A R T 2 P

RIO

RIP

2O

P1

(T

he

pr

ior

itie

s st

rin

g o

f P

AR

T

2 a

t o

pe

rati

on

1)

Op

era

tio

n

Ma

ch

ine

PR

IOR

IP2

OP

2 (

Th

e

pr

ior

itie

s st

rin

g o

f P

AR

T

2 a

t o

pe

rati

on

2)

Op

era

tio

n

Ma

ch

ine

Te

ch

no

log

ica

l

rou

te

0.7912 1 M1 0.6206 2 M3 3M1M →

0.7576 1 M1 0.5647 2 M4 4M1M →

0.6803 1 M2 0.6893 2 M3 3M2M →

0.6200 1 M2 0.6045 2 M4 4M2M →

Table 4.8 The priorities of the technological routes for PART 3

P A R T 3

PR

IOR

IP3

OP

1 (

Th

e

pr

ior

itie

s st

rin

g o

f P

AR

T

3 a

t o

pe

rati

on

1)

Op

era

tio

n

Ma

ch

ine

PR

IOR

IP3

OP

2 (

Th

e

pr

ior

itie

s st

rin

g o

f P

AR

T

3 a

t o

pe

rati

on

2)

Op

era

tio

n

Ma

ch

ine

Te

ch

no

log

ica

l

rou

te

0.1970 1 M2 0.3610 2 M1 1M2M →

0.1940 1 M2 0.5159 2 M4 4M2M →

0.2427 1 M3 0.4251 2 M1 1M3M →

0.3150 1 M3 0.6125 2 M4 4M3M →

iv.3. The procedure for calculating the priorities of different

technological routes that can pick the system parts. This procedure

involves generating, for each piece of an array called Priority Matrix

Page 253: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

253

having the size m1 m2× . Where m1 is the number of machines in the

system that can run the first operation and m2 is the number of

machines in the system that can run the second operation. For the case

being studied: m1 = 4 and m2 = 4. For part 1:

Op.2M1 M2 M3 M4

Op.1

prio1( 1,1) prio1( 1,2 ) prio1( 1,3 ) prio1( 1,4 ) M1PRIOP1

prio1( 2 ,1) prio1( 2,2 ) prio1( 2,3 ) prio1( 2,4 ) M2

prio1( 3,1) prio1( 3 ,2 ) prio1( 3,3 ) prio1( 3,4 ) M3

prio1( 4 ,1) prio1( 4 ,2 ) prio1( 4 ,3 ) prio1( 4 ,4 ) M4

= (4.84)

The elements of the matrix are defined as:

prio1( i , j ) PRIORIP1OP1( i ) PRIORIP1OP2( j ); if operation 1 to proces sin g

at machine i and operation 2

proces sin g at machine j ;

prio1( i , j ) 0 ; in other situations;

= × =

Priority matrices are defined correspondingly for parts 2 and 3.

After calculations of the prio_itinerary module, the priority matrix

corresponding to the first piece is the one from table 4.9.

Table 4.9. The priority matrix of part 1

P A R T 1

Operation 2

Operation 1 M1 M2 M3 M4

M1 0 0.1416 0 0.1068

M2 0 0 0 0

M3 0 0.1453 0 0.1455

M4 0 0 0 0

Page 254: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

254

Similarly are determined the priority matrices corresponding to

parts 2 and 3. These matrices are presented in table 4.10 and in table

4.11 respectively.

Table 4.10. The priority matrix of part 2

P A R T 2

Operation 2

Operation 1 M1 M2 M3 M4

M1 0 0 0.4910 0.4278

M2 0 0 0.4690 0.3748

M3 0 0 0 0

M4 0 0 0 0

Table 4.11. The priority matrix of part 3

P A R T 3

Operation 2

Operation 1 M1 M2 M3 M4

M1 0 0 0 0

M2 0.0711 0 0 0.1001

M3 0.1032 0 0 0.1929

M4 0 0 0 0

iv.4-. Determination of priority technological route for each

part i and ultimately establishing the priority of the processing of parts

in the system.

Page 255: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

255

iv.4.1. For each part i the maximum priority route is determined

based on the priority matrix. Thus:

• For part 1:

max Pr io1 max{ prio1( i , j ) | i 1,4 ; j 1,4 }= = = (4.85)

• For part 2:

max Pr io2 max{ prio2( i , j ) | i 1,4 ; j 1,4 }= = = (4.86)

• For part 3:

max Pr io3 max{ prio3( i , j ) | i 1,4 ; j 1,4 }= = = (4.87)

After completing this step to obtain the corresponding values of

priority of the technological routes for each piece and also is retained

the proper technological route that is associated with this priority. The

data obtained from running the program prio_itinerary are summarized

in table 4.12.

Table 4.12. The maximum priority routes

PART I }3,2,1{i ∈

Maximum Priority

maxPrioi }3,2,1{i ∈

The maximum

priority route for

the part i }3,2,1{i ∈

PART 1 0.1455 M3 → M4

PART 2 0.4910 M1 → M3

PART 3 0.1929 M3 → M4

iv.4.2. Is determined the part whose priority is highest, this is

the first piece that will be scheduled for processing in the system:

iMAX1 max{max Pr io | i { 1,2,3 }}= ∈ (4.88)

Page 256: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

256

Similarly the second part is established and will be scheduled for

processing in the system. These results in a first draft of authorization

processing are considered in the flexible manufacturing system (table

4.13).

Table 4.13. The order of processing –variant I

PART I }3,2,1{i ∈

Maximum Priority

maxPrioi }3,2,1{i ∈

The maximum

priority route for

the part i }3,2,1{i ∈

PIESA 2 MAX1 = 0.4910 M1 → M3

PIESA 3 MAX2 = 0.1929 M3 → M4

PIESA 1 0.1455 M3 → M4

v. Tracing the Gantt chart

Considering the results of authorization procedure, summarized

in table 4.13, it is traced the Gantt chart (fig. 4.22). It describes the

allocation, in time, of the machine in the system for processing the three

types of parts.

Fig. 4.22. Gantt chart - variant 1 [13]

Machine

Time

Page 257: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

257

vi. Efficiency indicator calculation

For the case considered will be determined the following

efficiency indicators:

• Delays in the system over time parts delivery;

• Utilization of machines;

• The manufacturing cycle.

The values of these indicators are presented in table 4.14.

Table 4.14 Efficiency indicators. Variant 1

PART i

}3,2,1{i ∈

Tardiness

T [min]

Ma

nu

fac

tur

ing

cy

cle

F [

min

]

Degree of loading [%]

M1 M2 M3 M4

PART 1 50 110

9.09 0 72,72 42,72 PART 2 0 52

PART 3 0 55

vii. Evaluation of scheduling results requires adjustment to the

conduct of manufacturing. This involves using other types of

technological routes.

Choosing a new technological route options will be using data from

tables 4.9, 4.10, 4.11.

By iterations thus it can be reached the Gantt chart version of

figure 4.23.

Page 258: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

258

Fig. 4.23 Gantt chart -variant 2 [13]

For the case of authorization, the performance indicators are

presented in Table 4.15.

Table 4.15 Efficiency indicators. Variant 2

PART i

}3,2,1{i ∈

Tardiness

T [min]

Ma

nu

fac

tur

ing

cy

cle

F [

min

]

Degree of loading [%]

M1 M2 M3 M4

PART 1 0 57

78,94 100 35,07 29,82 PART 2 0 35

PART 3 0 57

It is obvious that in the second option of authorizing the

performance indicators are superior to the former one.

Machine

Time

Page 259: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

259

5. THE SIMULATION OF THE VIRTUAL PROTOTYPE

MOVEMENT

5. 1. Basic notions

The virtual prototype simulation movement is a design tool used in

the animation and motion analysis of cinematic and dynamic models, to

determine the critical positions, forces, velocities and accelerations.

The virtual prototype simulation of motion is a CAE application

software (Computer Aided Engineering) used to model and analyze the

performance of moving parts in a mechanism located in the virtual

environment. The simulation of the movement is directed towards

solving problems from the rigid body mechanics (eg: static and

dynamics). The motion simulation reproduces a master set (original)

previously modeled and sets it in motion by some means of simulations,

without altering the whole master (original). Once the optimal motion

simulation, the master assembly can be updated to reflect the new

optimal design.

The movement simulation of a virtual prototype behavior may

provide a mechanism before its actual implementation. These

predictions are based on advanced math and physics and engineering

principles. Although these mathematical, physical and engineering

principles which are currently applied in the software, results should

Page 260: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

260

always be assessed to the puncture of engineering: if the result is

expected and if it is feasible.

The motion simulation can analyze the mechanism by examining

the interference, distances traveled, speeds, accelerations, movement

and reactive forces, torsion moments, etc. The motion simulation

analysis results will generally indicate the need for design changes in

track geometry (elongation / shortening the levers’ elements, cams’

shape modification, adjustment multiplier reports, etc.), or the material

of the piece (easier, harder, etc.). The design modifications can then be

applied to a given set of simulation, duplicated and reanalyzed. Once the

optimal motion simulation is determined, the design changes can be

incorporated into all masters.

It is considered a mechanism as a collection of kinematic elements

related by kinematic joints and other constraints to make a move. The

simulation of motion can be created by the following steps [34]:

- Step 1: Create kinematic elements

Kinematic elements are solid bodies or assemblies of rigid bodies

without relative movement between them. They are defined to

represent the moving parts in the mechanism.

- Step 2: Creating joints and kinematic constraints.

Kinematic joints constrain movement of cinematic elements. In

some cases, you can create other elements of coercion, such as springs,

dampers, bearings (bushings) or contacts.

- Step 3: Defining actuators (motion driver)

Actuators trigger the mechanism, which attaches to some

kinematic joints.

Page 261: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

261

Fig. 5. 1 Example of kinematic mechanism

A mechanism triggers in two ways:

- articulation: a form of movement based on moving, in which the

step size is specified with the total number of steps required for the

total displacement of the mechanism.

-animation: a form of movement based on the duration in which

the mechanism moves for a certain period of time and analyzed by a

number of times in that period.

5.2. Solvers used for analyzing the movement

The Motion Simulation module incorporates two dynamic solvers

Page 262: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

262

for the analysis of mechanisms: MSC Adams /Solver and FunctionBay

RecurDyn. Tests have shown similar results generated from the use of

the two solvers for most types of mechanisms. Use RecurDyn solver,

can be used solver MSC Adams /Solver steps but it is possible that the

activities and results are slightly different. The typical process of

motion simulation analysis involves three steps:

- preprocessing - is the stage of creating the necessary elements

motion simulation: creating cinematic elements (links), kinematic

joints (joints) and actuators (motion drivers);

- processing - at this stage solver processes the input and

generates output data that are forwarded to Internal Motion

Simulation.

- Post-processing - at this stage Motion Simulation interpret the

output of the solver and converts them to animation, graphics and

reports. Optionally, the solver can generate files to be exported to

other software compatible with the current solver. Also, Motion

Simulation can import these files and can post-process them in order to

create charts, reports and animations.

5. 3. Accessing the Motion Simulation and the main

commands used in the simulation of virtual prototype motion

Motion Simulation application can be started by clicking the Start

button and choosing NX Motion Simulation (Fig. 5.2) (is good to have

already open all that we want to analyze). Immediately after access, NX

displays a series of toolbars and specific functions of this application. It

Page 263: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

263

may be noted to the left of the screen a new button that opens the

Motion Navigator, using it can create and edit motion elements that

make up solutions.

Fig. 5.2. Starting the Motion

Simulation application

Fig. 5.3. Motion Navigator Zone

In the first instance, in the Motion Navigator (Fig. 5.3)we have one

node that is called before the assembly opened. By running right click

on it we can create a new simulation by choosing New Simulation

(actually only). In the Environment window you can choose the type of

analysis required: cinematic (Kinematics) or dynamic (Dynamics).

Dynamic analysis is suitable assemblies have one or more degrees of

freedom. Kinematic analysis does not allow analysis of assemblies

unless they have zero degrees of freedom. On entering the Motion

Simulation, if the system has detected one or more assembly constraints

(Assembly Constraints), will convert these constraints into kinematic

joints (joints) for the type of coercion and elements of the coupling will

become cinematic elements (links). This conversion is done using

Page 264: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

264

Motion Joint Wizard window (Fig.5.4). If you want automatic creation of

these elements is pressed Cancel, otherwise click OK. In Motion

Navigator will create a new node, called motion_1 default. If the Motion

Joint Wizard window system we accepted proposals motion_1

subordinate node, we have corresponding nodes Links and kinematic

elements and kinematic joints.

Fig. 5.4. Motion Joint Wizard window

5.4. Solutions and types of analysis

In order to analyze the mechanism to create one or more solutions

that defines the conditions of analysis. A solution (Fig. 5.5)may contain

special settings to correct the default values defined in the mechanism.

Creating multiple solutions allow experimentation with alternative

settings to simulate movement. For each solution can be defined:

- Solver parameters - these settings define the correct parameters

Motion Preferences dialog current solution;

- Type of solution - Normal Run (animation), Articulation or

Spreadsheet Run;

- Types of analysis - Kinematics / Dynamics, Static Equilibrium and

Page 265: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

265

Control /Dynamics;

- Uploads - (Loads) forces and torques vector and scalar;

- Drivers of motion (Motion Drivers) - the motion kinematic

couplings;

- Gravitational constant - these values override gravitational

constants defined in the dialog Motion Preferences current solution.

The solutions offers a more efficient workflow, solving a solution

which produces a result set can then be analyzed separately.

Fig. 5.5. Solution command window

5.5. Kinematic elements

The kinematic element (Link) is generally a rigid body or a set of

rigid bodies without relative movement between them. When you

create a kinematic element, it will be specified the geometry that

defines the element by selecting direct graphics window active region

with Select Object. It has to be included in the kinematic element the

components that we want to move. In some cases, we define the

Page 266: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

266

cinematic elements even though they will not move (fixed).

Creating kinematic elements can be done with the command Link

which can be accessed by Motion toolbar button, with a right click on

the node running the simulation of Motion Navigator, and then choosing

New Link, or carried menu: Insert - Link. After clicking on the window

Select Object (highlighted in red), we already have an active region. We

can select any items you wish to include in cinematic element; they will

behave as a single solid body. The default is L001, L002, L003, etc.,

which can be changed in the Name area. If you want the kinematic

element to be fixed, Fix the tick box of the Link (Fig. 5.6).

Fig. 5.6 defining a kinematic element (Link)

Page 267: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

267

5.6. Kinematic couplings

5.6.1. Definitions and degrees of freedom

Creating cinematic couplings is the second step in creating a

mechanism. The kinematic joints are connecting the mechanism’s

elements, in addition to allow movement, they can and cinematic

elements constrain movement. Before creating joints, kinematic

elements are free to move unconstrained in space, with six degrees of

freedom: 3 translations (along the X, Y, Z axes) and three rotations

(around the axes X, Y, Z). The joints, as they are created, the movement

kinematic elements is constrained in one or more directions. The

concept related to the constraints of joints and degrees of freedom of a

mechanism is the number Gruebler.

The Gruebler number is the approximate total number of degrees

of freedom of a mechanism. Is displayed in the status line after creating

or editing a joint. This number decreases as create new joint. The

number Gruebler formula is given by:

Gruebler number = (number of kinematic elements * 6) - (sum of

degrees of freedom eliminated by loint or other constraints) -

(number of drivers to move)

Before creating joints and other constraints, the number is six

times the number Gruebler cinematic elements, and will decrease as the

couplings create and apply constraints.

A Gruebler number greater than zero indicates freedom of

movement within the mechanism of kinematic elements. This

Page 268: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

268

mechanism is called unconstrained and movement analysis will lead to

a solution of type Dynamic. A simple mechanism can be forced a ball

bouncing on a flat surface.

Gruebler number equal to zero indicates a mechanism that is

completely constrained, the kinematic elements can not move toward

each other, within the mechanism. A mechanism with zero degrees of

freedom was the main goal when the analysis was limited to type

Kinematic solutions. This solution applies only fully constrained

mechanisms. With the advent solvers type Dynamic, mechanisms need

to model with zero degrees of freedom has been eliminated.

A Gruebler number which s less than 0 represents an over-

constrained mechanism and can be a problem when we analyze this

mechanism. When processing an over-constrained mechanism, the

solver will eliminate redundant constraints to reach a number Gruebler

0, then generate a solution. The disadvantage is that we can not

question what constraints were redundant and eliminated.

Freedom degrees eliminated by kinematic joints

Kinematic object type The number of degrees of

freedom

Revolute 5 Slider 5 Cylinder 4

Screw 5 (usinf RecurDyn solver) 1 (using Adams solver)

Universal 4 Sphere 3 Planar 3 Cable 1 Gear 1 Rack and pinon 1 Point on curve 2

Page 269: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

269

Freedom degrees eliminated by kinematic joints

Kinematic object type The number of degrees of

freedom

Curve on curve 2 Point on surface 1 Constant Velocity 4 Fixed 6

5.6.2. Kinematic joints types

Revolute

A revolute type joint (rotation) (Fig. 5.7) allows only rotation

around the Z axis coordinate system accidentally. Can constrain two

kinematic elements so that they rotate around the Z axis of the branch,

or may be fixed allowing kinematic motion of a single element around a

fixed axis. Removes five degrees of freedom leaving only possible

rotation. This type of coupling can be associated with a driver motion

(Motion Driver).

Fig. 5.7. The Revolute kinematic joint

Fixed

A fixed joint element prevents movement kinematics. A fixed

coupling between two elements applied kinematic prevent relative

movement between them.

This type of joint can be applied explicitly by choosing the type of

Page 270: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

270

joint command window or can be created automatically when defining

cinematic element, if the tick box Fixed Link, or if the definition does

not specify the element of the kinematic joint base (Base).

Slider

The Slider type joint (translational) (Fig. 5.8) allows movement in

one direction of translation. Removes five degrees of freedom, leaving

only a translation available. Can be applied to a single kinematic

element (where it is attached), thus a translation relative to a fixed

component, or may be applied between two kinematic elements, in

which case you should select a shoe base (Base Link). In the latter case,

the translational motion takes place between the two kinematic

elements. And this type of joint can be associated with a driver to move,

making travel along the Z axis.

Fig.5. 8. The Slider kinematic joint

Universal

Such a kinematic joint is used to connect two axial rotation

kinematic elements, which have an angle (Fig. 5.9). The universal joints

create flexible couplings that allow two degrees of freedom of rotation,

eliminating four degrees of freedom. Orientation of a universal joint

element is separate of the kinematic drive and the base (Action and

Base). The guidance will be given by their rotation axes of cinematic

Page 271: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

271

elements. At the intersection of these two axes will be the origin of the

coupling.

Fig. 5.9. The Universal kinematic joint

Since the initial orientation of the axes Y and Z is altered by the

movement mechanism, no matter their original position. This type of

joint can not attach a driver to move.

Constant velocity (CV)

A Kinematic joint type Constant Velocity (speed constant) 9Fig.

5.10) is similar to a universal coupling, indicating that this coupling

provides a constant speed through the axis of rotation thereof. The CV

type couplings are common in the automotive or engineering.

CV joint allows two degrees of rotation around the Z axis of the

cinematic elements that make up the pair. Rotation around the Z axis of

the element kinematic base (Base Link) is equal to the rotation axis of

the element Z (Action Link). Z axes of the two kinematic elements must

be directed along them in opposite directions, leaving the center joint.

CV joint removes four degrees of freedom, can not attach a driver to

move and movement within it may be limited.

Page 272: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

272

Fig. 5.10 The Constant velocity kinematic joint

Spherical

Hitch ball (Spherical joint) (Fig. 5.11) allows a cinematic element

to rotate around the origin of the joint. This joint removes three degrees

of freedom (translations) allowing three rotations. A spherical joint

originates in the center of rotation and no guidance, it is necessary only

when creating the cinematic elements and origin specification.

Fig. 5.11. The Spherical kinematic joint

Cylindrical

A Cylindrical joint (Fig.5.12) connects two kinematic elements so

that allows two degrees of freedom between them: a rotation and

translation. The two kinematic elements are free to rotate and move

each other around and along the Z axis of the branch. Origin coupling

can be anywhere along the Z axis, however, a closer analysis of the

Page 273: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

273

forces, it is important that the origin is at the center joint.

Fig. 5.12 The Cylindrical kinematic joint

Planar

A Planar Joint (Fig. 5.13) establishes a constraint between two

elements coplanar kinematics or between an element and an arbitrary

plan. Allows three degrees of freedom, two translations and one

rotation. Using planar joints, kinematic elements are free to slide and

spin each other while remaining in planar contact. An example could be

formed in an ice cube that slides and rotates around its axis Z, on a flat

surface.

Such a joint removes three degrees of freedom, can not attach a driver

and her movement can be limited. Coupling of the Z axis must be

perpendicular to the plane of contact surface and the origin is at the

center of the contact surface for a closer analysis.

Fig. 5.13. The Planar kinematic joint

Page 274: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

274

Screw

Screw joint type (Fig. 5.14) / nut (Screw joint), depending on

solver used, removes five degrees of freedom (solver RecurDyn) or a

degree of freedom (Adams / Solver). Once we have agreed as the

beginning lesson, we will use it only during RecurDyn solver. Using

solver Adams, in addition Screw type joint will still have to use a

Cylindrical type that removes four degrees of freedom (1 + 4 = 5).

In the field Screw ratio we introduce the thread pitch, defined as

more cinematic element moves along the Z axis of the branch, every

turn, from basic cinematic element. A positive value of the parameter

Screw Ratio produces a shift in the axis Z while a negative value

produces a shift opposite direction Z.

Fig. 5.14. The Screw kinematic joint

In addition to conventional kinematic joints above there are

primitive kinematic joints. They allow precise control over the degrees

of freedom and are useful in situations where conventional joints could

create redundant constraints. The joints can not be defined as

primitive drivers of motion (Motion Drivers).

Page 275: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

275

5.6.3 Creating kinematic joint

To create a kinematic joint (Fig. 5.15) of the toolbar button is

pressed the Joint Motion and Motion running right click on the node

and then choosing New Joint or carried menu Insert - Joint.

Creating cinematic couplings run in three steps:

1. Select items that will constrain the kinematic joint. Selecting

any object that belongs kinematic element will be selected entirely. It is

better however to select an item from the kinematic element to be

involved in kinematic joint (eg. When a torque is ideal to select a

circular edge as next steps, specifying the origin and orientation will be

executed automatically the system).

2. Specifying the orientation and origin. If the orientation of the

joint is automatically defined in the previous step is not required, we

can correct this step by selecting a vector with Orientation Specify

active region. For example, if a torque orientation will be given by the

vector around which rotates kinematic joint. Basically, focus will then

determine the kinematic element will be free to move.

Page 276: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

276

Fig. 5.15. Defining a rotation kinematic joint [34]

The origin of joint must be on the axis of rotation and along the

vector orientation. To specify a new origin, having active the Origin

Specify region, gather the point from the graphics window with the

eventual help of Snap Point.

3. Select a based kinematic item (Base Link). Since the kinematic

joint establishes a relationship between two kinematic elements is

required to specify in this step and the other element that is

networking. Select Link With active region of the Base, select any

geometric element belonging elementulu basic kinematic will be

selected entirely.

Page 277: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

277

If cinematic elements are not in proper position (disassembled),

we can assemble the Snap Links ticking box, then selecting active

regions as in the first link.

With Limits area can limit the movement of a shoe by specifying

minimum and maximum values between which to perform the

movement.

Scale and Display Name fields allow you to change the size of the

graphic symbol and name that kinematic coupling.

5.4. Motion Drivers

A driver is a movement which is attached to a joint parameter

which controls the movement that is required in that shoe. It can be

applied only to Revolute, Slider or Cylindrical type joint. The motion

driver for a Cylindrical joint type is supported only by RecurDyn solver.

You can assign individual drivers solutions so that they exist only in

that solution. This driver is defined in the solution cancel the default

defined in joint that. One solution we have defined a single driver for

joint independently.

There are six types of drivers to move:

- Constant - uses a fixed value to set in motion a joint (movement

can be translational or rotational). Parameters such driver is moving

the initial (Initial Displacement), speed (Velocity) and acceleration

(Acceleration).

Page 278: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

278

Fig. 5.16. Defining the movement driver [34]

- Harmonic - generates a sinusoidal oscillating motion. This type

of driver parameters are amplitude (Amplitude), frequency (Frequency),

phase (Phase Angle) and Offset (Displacement).

- Function - allows defining a mathematical function that

describes a complex movement.

- Articulation - set in motion a kinematic joint for a specified

number of steps (field Number of Steps), each step representing a

specified size with Step Size field.

- Engine - allows assigning a joint an engine controlled by a Signal

Chart.

- None - we have not defined any driver to move, you can use this

option to remove a driver from a joint.

Page 279: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

279

5.5. Animation

The animation (Animation) (Fig. 5.17) is based on time and is used

to trigger a mechanism when using a driver to move, other than

articulation.

Fig. 5.17. The Animation window

You can access the following solutions to resolve a type Normal

Run, then press the toolbar button Motion Animation. The animation is

based on two parameters: Time (time that is considered the model) and

Steps (value indicating the number of intermediate points to be

analyzed and displayed mechanism).

Page 280: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems
Page 281: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

281

BIBLIOGRAPHY

[1] Abrudan, I, Sisteme flexibile de fabricaţie. Concepte de proiectare şi

management, Ed. DACIA, Cluj- Napoca, 1996

[2] Adan, I., Resing, J., Queueing Theory, Depatement of mathematics

and Computing Science, Eindhoven University of Technology,

February 14, 2001

[3] Alla, H., David, R., Continuous and hybrid Petri nets, Journal of

SystemsCircuits and Computers, 8(1):pp. 159–188, Feb 1998

[4] Balduzzi, F., Giua, A., Seatzu, C., Modelling manufacturing systems

with First-Order Hybrid Petri Nets, International Journal of

Production Research, Special Issue on Modeling, Specification and

Analysis of Manufacturing Systems, Vol. 39, No. 2, pp. 255-282,

January 2001

[5] Bause, F., Kritzinger, P., Stochastic Petri Nets – An Introduction to

the Theory (2nd edition). Bause and Kritzinger, Germany, 2002

[6] Beju, L.D., Bazele teoriei sistemelor, Ed. Univ. “Lucian Blaga” din

Sibiu, Sibiu, 2000

[7] Bitran, G. R., Sarkar, D., Targeting Problems in Manufacturing

Page 282: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

282

Queueing Networks - An Iterative Scheme and Convergence,

European Journal of Operational Research, Vol. 76, No. 3, pp. 501-

510, 1994

[8] Blaga, F., Tătaru, B., Using Stochastic Petri Nets For Evaluation Of

Manufacturing Systems Performances, 5TH INTERNATIONAL

CONFERENCE „MODERN TECHNOLOGIES IN MANUFACTURING”-

MteM 2001, 4-6 October 2001, pp.63-66, Cluj-Napoca, Romania,

2001

[9] Blaga, F., ş.a., About Fuzzy Colored Petri Nets in Modeling Flexible

Manufacturing Systems, The microCAD 2003, International

Scientific Conference, University of MISKOLC, 6-7 March 2003

,MISKOLC, HUNGARY, 2003

[10] Blaga, F., Barabas, T., Ţarcă, R. C., Modelarea cu reţele Petri a celulei

flexibile de fabricaţie CFF-2R-2002, Analele Univ. Oradea 2003,

Fascicola Inginerie Managerială şi Tehnologică, Secţiunea:

Tehnologii în Construcţia de Maşini, Oradea, 2003

[11] Blaga, F., Baban, M., Baban, C. F., Pele, A. V., The Use of Timed and

Generalized Petri Nets in Automatic Packaging Line Modeling, The

10th international conference-Mechanical Engineering 2006,

Slovak University of Technology in Bratislava, ISBN 80-227-2513-

7, pp. 721-724, Slovak Republic, 2006

[12] Blaga Florin, Modelarea şi simularea sistemelor tehnice. Reţele petri.

Reţele de şiruri de aşteptare, (Ediţia a II-a), Ed. Univ. din Oradea,

2009

[13] Blaga Florin, Modelarea, simularea şi implementarea funcţiei de

ordonanţare în sistemele de fabricaţie flexibilă, Ed. Univ. din

Oradea, 2007

Page 283: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

283

[14] Bojan, I., Sisteme flexibile de producţie. Optimizarea proiectării şi

managementul proceselor, Ed. DACIA, Cluj-Napoca, 1999

[15] Boyer, M., Translation from timed Petri nets with intervals, on

transitions to intervals on places (with urgency), LIAFA - Universite

Denis Diderot, Paris – France, 2002

[16] Călin, S., ş. a., Conducerea adaptivă şi flexibilă a proceselor

industriale, Ed. Tehnică, Bucureşti, 1988

[17] Champagnat, R., Valette, R., Hochon, J.-C., Pingaud, H., Modelling,

Simulation and Analysis of Batch Production Systems, Discrete

Event Dynamic Systems: Theory and Applications, Vol. 11,

Numbers 1/2, pp. 118-36, January/April, 2001

[18] David, R., Alla, H., Du Grafcet aux réseaux de Petri, Ed. Hermès,

Paris, 1992

[19] David, R., Modeling of Hybrid Systems Using Continuous and Hybrid

Petri Nets, Proc. of Conf. on Petri Nets and Performances

Evaluation (Saint Malo, France), pp. 47-58, June, 1997

[20] Drath, R., Visual Object Net ++ , www.systemtechnik.tu-

ilmenau.de/~drath/

[21] Gautam, N., OPERATIONS RESEARCH AND MANAGEMENT SCIENCE

HANDBOOK, Chapter 9- Queueing Theory, 2006,

http://ie.tamu.edu/people/faculty/Gautam/papers/queues_NG.p

df

[22] Jensen, K., Coloured Petri Nets. Basic Concepts, Analysis Methods

and Practical Use. Volume 2. EATCS Monographs on Theoretical

Computer Science, Springer-Verlag, 1995

[23] Jensen, K., Coloured Petri Nets. Basic Concepts, Analysis Methods

Page 284: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

284

and Practical Use, Volume 3, EATCS Monographs on Theoretical

Computer Science, Springer-Verlag, 1997

[24] Jucan, T., Ţiplea, F. L., Reţele Petri. Teorie şi practică. Editura

Academiei Române, Bucureşti, 1999

[25] Kaufman, A. Henry-Laborder, A., Metode şi modele ale cercetării

operaţionale, Ed. Ştiinţifică şi Enciclopedică, Bucureşti, 1975

[26] Kavusturucu, A. and Gupta, S. M., Expansion Method for the

Throughput Analysis of Open Finite Manufacturing/Queueing

Networks with N-Policy, Computers and Operations Research, Vol.

26, No. 13, pp. 1267-1292, 1999

[27] Kovacs, Fr., Rădulecu, C., Grigorescu, S., Sisteme de fabricaţie

flexibilă robotizate, vol. I si II, Centrul de multiplicare al I. P. Traian

Vuia, Timişoara, 1994

[28] Kovacs, Fr., Ţarcă, R.C, Blaga, F., Tripe, V.A., Sisteme de fabricaţie

flexibilă, Ed. Univ. Oradea, 1999

[29] Kovacs, Fr., ş.a., Fabrica viitorului, Ed. Multimedia Internaţional,

Arad, 1999

[30] Leţia ,T., Aştilean, A. M., Sisteme cu evenimente discrete - modelare,

analiză şi control, Ed. Albastră, Cluj- Napoca, 1998.

[31] Meng, G. and Heragu, S. S., Batch size modeling in a multi-item

discrete manufacturing system via an open queueing network, IIE

Transaction, 36, 743-753, 2004

[32] Muhammad El-Taha, Queueing Networks,Department of

Mathematics and Statistics,University of Southern Maine, Portland,

2007

Page 285: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

285

[33] Nguyen Hung T., Elbert A. Walker, First Course in Fuzzy Logic,

Third Edition, Chapman & Hall/CRC; 3 edition, 2005

[34] Oprea, E., Dumitrascu, A., Boricean, D., Simularea si analiza folosind

prototipul virtual, Ed. Qual Media, Cluj- Napoca, 2010

[35] Păstrăvaru, O., Sisteme cu evenimente discrete. Tehnici calitative

bazate pe formalismul reţelelor Petri, Ed. MATRIX. ROM, Bucureşti,

1997

[36] Popa., H., s.a., Inginerie Industriala, CM Universitatea Tehnica,

Timisoara, 1993

[37] Sanjay, K. Bose, Introduction to Queues and Queueing Theory,

http://www3.ntu.edu.sg/home/eskbose/qbook/qbook.html

[38] Savii, G., Milenco, L., Modelare şi simulare, Ed. Eurostampa,

Timişoara, 2000

[39]

Sofron, E., ş. a.,Sisteme de control fuzzy- Modelare şi proiectare

asistate de calculator, Ed. All, Bucureşti, 1998.

[40] Ţarcă, R. C., Blaga, F., ş.a., The 2002 Functional Modeling and

Simulation using Taylor Program, The microCAD 2003,

International Scientific Conference, University of MISKOLC, 6-7

March 2003, MISKOLC, HUNGARY, 2003

[41] Ţarcă, R. C., Blaga, F., Tarca, I., The Petri Nets Model for 2R FMS

Flexible Manufacturing Cell TMT 2007, 11TH INTERNATIONAL

RESEARCH/EXPERT CONFERENCE TRENDS IN THE

DEVELOPMENT OF MACHINERY AND ASSOCIATED TECHNOLOGY,

Hammamet, Tunisia, 5-9 septembrie, 2007

[42] Virtamo.,J., Queueing theory/ Queueing networs,

Page 286: Mechatronics Systems...Modelling and simulation of mechatronic systems 9 CONTENTS 1. SYSTEM. MODEL. MODELLING. SIMULATION......................... 13 1.1. Notions about systems

Modelling and simulation of mechatronic systems

286

www.netlab.hut.fi/opetus/s38143/luennot/

[43] Warnecke, H. J.,Produktionsbetrieb, Springer Verlag, Berlin,1995.

[44] Zadeh, L., A., Fuzzy Setd, Information and Control 8, 338-353

[45] Zhang, Y., ş.a., Generating Petri net driven graphical simulation tool

for automated systems, In proceedings of the American Nuclear

Association 2000 Annual Meeting, pp 140-147, 2000