KTH – The Royal Institute of Technology - DiVA 789370/  · KTH – The Royal Institute

  • View

  • Download

Embed Size (px)

Text of KTH – The Royal Institute of Technology - DiVA 789370/  · KTH – The Royal Institute

  • KTH The Royal Institute of Technology ITM School of Industrial Engineering and Management

    I IP Department of Production Engineering


    Master Thesis in

    Production Engineering and Management

    Hugo R.D. Barreto

    Supervisor: Daniel T. Semere

    Stockholm, November 2014

  • Ah, poder exprimir-me todo como um motor se exprime!

    Ser completo como uma mquina!

    (Ah, to be able to express myself like an engine does!

    To be complete like a machine!)

    lvaro de Campos, in Ode Triunfal

  • I


    Companies nowadays must innovate to achieve or retain a competitive position in the market. In

    manufacturing companies the introduction of a new product often requires design of the manufacturing

    system itself, which greatly increases product development time. Manufacturing system development

    has been relying lately on simulation models, which decrease the need for hardware testing, but the

    engineering applications needed for development are isolated. Concurrent engineering has found

    applications in the interface between the product and its manufacturing system. However, little has

    been researched in the concurrent development of the several steps of manufacturing system. This

    report presents a communications method to connect two simulation models in parallel, in two

    different computers, in what can be called a distributed simulation. One of the models is the flow

    simulation modelled as a discrete event simulation (DES), while the other model represents the control

    systems modelled as finite state machines (FSM). Both models run in Matlab/Simulink. This concept

    allows two developers to work simultaneously in otherwise sequential development tasks, and get

    validation of their implementation while developing. The communication between the systems is

    achieved with the OPC protocol, an established technology in networked control systems (NCS).

    With a simple example model, the system is able to run in parallel, and the effectiveness of the parallel

    development was observed as the model was adjusted to its distributed format. The main difficulties

    found during implementation are related with the DCOM configuration necessary for the OPC

    technology and the setup of data exchange modes (synchronous/asynchronous). The distributed

    simulation requires real-time execution to run properly and reliably, which results in longer simulation

    times than single platform simulation. Finite State Machines were also successfully used to model

    control systems. This technique simplifies development and debugging due to its formal structure and

    visual interface.

    Overall, the results of this implementation offer good possibilities of further studies in the application of

    distributed simulation in concurrent development. This report also lays the path for more complex

    simulation using this concept, both in the models used and the number of computers connected in


    Keywords: Manufacturing system development, Virtual Commissioning, Concurrent Engineering, Control

    system, OPC, Discrete Event Simulation, Finite State Machine

  • II


    Fretag mste idag vara innovativa fr att uppn eller behlla en konkurrenskraftig position p

    marknaden. I tillverkande fretag krver nya produkter ofta design av tillverkningssystemet i sig, vilket i

    hg grad kar produktutvecklingstiden. Tillverkningssystemutveckling har p sistone frlitat sig p

    simuleringsmodeller, vilket minskar behovet av att testa hrdvaran. Dremot r de tekniska

    mjukvarorna som behvs fr utveckling isolerade. Concurrent engineering metoder har funnit

    applikationer vid koppling mellan produkten och produktionssystemet. Dremot har man forskat fr lite

    i samtidig utvecklingen i de olika stegen i tillverkningssystemet. Den hr rapporten presenterar en

    kommunikationsmetod fr att ansluta tv simuleringsmodeller parallellt i tv olika datorer, i vad som

    kan kallas en distribuerad simulering. Ena modellen r den fldessimuleringen vilken modelleras som en

    diskret-hndelsestyrd simulering (DES), medan den andra modellen r det kontrollsystemet som

    modelleras som Finit Tillstndsmaskin (FSM). Bda modeller krs i Matlab/Simulink. Det hr innebr att

    tv utvecklare kan arbeta samtidigt med utvecklingsuppgifterna i stllet fr att behva jobba i sekvens,

    och f validering samtidigt som utvecklingen sker. Kommunikationen mellan systemen uppns med den

    OPC specifikation, en etablerad teknik i ntverkskontrollsystem (NCS).

    Med en enkel exempel modell, krs systemet parallellt. Och effektiviteten observeras medan modellen

    anpassas till det distribuerade formatet. De strsta svrigheterna med implementering grundar sig i

    DCOM-konfiguration som r grundlggande fr OPC teknik och installationen av datautbyteslgen

    (synkron / asynkron). Den distribuerade simuleringen krver krning i realtid s det kan fungera korrekt

    och plitligt, vilket resulterar i lngre simuleringstider n en enkel plattform simulering. Finit

    Tillstndsmaskiner anvndes ocks med framgng fr att modellera kontrollsystem. Denna tekniken

    frenklar utveckling och problemlsning p grund av sina formell struktur och visuell grnssnitt.

    Resultatet av det hr projektet visar goda mjligheter till fortsatta studier i tillmpningen av distribuerad

    simulering i samtidig (concurrent) utveckling. Rapporten ger ocks goda frutsttningar fr komplexare

    simuleringar med detta koncept, bde i de modeller som anvndes och antalet datorer som kan

    anslutnas parallellt.

    Nyckelord: Tillverkningssystem utveckling, Virtual Commissioning, Concurrent Engineering,

    Styrningssystem, OPC, Diskret Hndelsestyrd Simulering, Finit Tillstndsmaskin

  • III


    To Daniel Tesfamariam Semere, who kindly accepted to supervise me in this project, which was

    unrelated to most of the previous subjects in the masters programme and allowed me to study a new

    and interesting field.

    To Johan Petersson, network manager at the department, for granting me the resources to implement

    this project, for teaching me the basics of computer networking, his kindness and his patience.

    To my teachers of the last two years, for the lectures, the labs, the discussions, the inspiration, the

    generosity and some very pleasant coffee breaks.

    To my dear classmates, with whom I learned so much and with whom I had so much fun. Special thanks

    to Andrea, Floriana, Johannes and Theo for putting up with me whenever I needed to complain about

    the project. Special thanks also to Ayanle Sheikhdahir and Amir Sharifat for their help with the abstract

    in Swedish.

    To my mother, my grandmother and my brother, who always remained close to me over the last two

    years, supporting and enduring my dreams. To the memory of my father, who would certainly be proud

    since the first day of this programme.

    To Lusa, for being always on my side, bringing out the best in me with all the love and encouragement I

    could ever hope for.

  • IV


    Abstract . . . . . . . . I

    Sammanfattning . . . . . . . II

    Acknowledgements . . . . . . III

    Contents . . . . . . . . IV

    Index of Figures . . . . . . . VI

    Index of Tables . . . . . . . VIII

    Acronyms and Abbreviations . . . . . IX

    Chapter 1 Introduction . . . . . . 1

    1.1. Aim . . . . . . . 3

    1.2. Task . . . . . . . 3

    1.3. Scope . . . . . . . 4

    Chapter 2 - Manufacturing System Development . . 5

    2.1. Overview . . . . . . 5

    2.2. Concurrent Engineering . . . . 5

    2.3. Virtual Commissioning . . . . 9

    2.4. Networked Control Systems . . . 11

    2.4.1. OPC Servers . . . . . 12

    Chapter 3 - Parallel and Distributed Simulation . . 16

    3.1. Overview . . . . . . 16

    3.2. Discrete Event Systems . . . . 19

    3.3. Finite State Machines . . . . 22

  • V

    Chapter 4 Methodology . . . . . . 26

    4.1. Communication realization. . . . 26

    4.2. Platform design . . . . . 27

    Chapter 5 Implementation . . . . . 30

    5.1. Communication realization. . . . 30

    5.2. Platform design . . . . . 35

    Chapter 6 Conclusion . . . . . . 44

    6.1. Discussion . . . . . . 44

    6.2. Future Work . . . . . . 47

    Chapter 7 - References . . . . . . 48

  • VI

    Index of Figures

    Figure 1: Framework of a virtual control system. . . . . 2

    Figure 2: Comparison of time savings in the application of concurrent

    engineering (CE) and sequential engineering . . . . . 7

    Figure 3: Typical CE network in a machine tool manufacturing company . 8

    Figure 4: Virtual Commissioning through the coupling of a control system

    with a running simulation and a 3D-visualization . . . . 11

    Figure 5: General architecture of a Networked Control System. . . 12

    Figure 6: Conventional communication architecture. . . . 13

    Figure 7: Communication architecture of OPC standard . . . 14

    Figure 8: Graphical DES models of a simple transfer line.

    a) Using ExtendSim; b) Using Matlab/Simulink . . . . 20

    Figure 9: Context of Discrete-Event Systems in major system classifications 21

    Figure 10: A simple example of a FSM: ventilation control system.

    The ventilation is turned on or off according to a temperature input,

    and outputs a status. .