+ All Categories
Home > Documents > Design of a dynamic distributed CPS application for...

Design of a dynamic distributed CPS application for...

Date post: 20-May-2020
Category:
Upload: others
View: 2 times
Download: 0 times
Share this document with a friend
113
Design of a dynamic distributed CPS application for unmanned ground vehicles ERIK BERGDAHL ANDERS ÅSTRÖM KTH ROYAL INSTITUTE OF TECHNOLOGY SCHOOL OF INDUSTRIAL ENGINEERING AND MANAGEMENT DEGREE PROJECT IN MECHATRONICS SECOND CYCLE, 30 CREDITS STOCKHOLM, SWEDEN 2016
Transcript
Page 1: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

IN DEGREE PROJECT MECHANICAL ENGINEERING,SECOND CYCLE, 30 CREDITS

, STOCKHOLM SWEDEN 2016

Design of a dynamic distributed CPS application for unmanned ground vehicles

ERIK BERGDAHL

ANDERS ÅSTRÖM

KTH ROYAL INSTITUTE OF TECHNOLOGYSCHOOL OF INDUSTRIAL ENGINEERING AND MANAGEMENT

MECHATRONICSDEGREE PROJECT IN MECHATRONICSSECOND CYCLE, 30 CREDITS

STOCKHOLM, SWEDEN 2016

Page 2: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground
Page 3: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

Utveckling av en dynamisktdistribuerad CPS applikation forobemannade markfordon

Design of a dynamic distributedCPS application for unmannedground vehicles

Erik BergdahlAnders Astrom

Examensarbete inomMekatronik,Advancerad niva, 30 hpHandledare pa KTH: De-Jiu ChenExaminator: Martin TorngrenTRITA-MMK 2016:170 MDA 570

KTH Skolan for Industriell Teknik ochManagement100 44 Stockholm, Sverige

Page 4: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground
Page 5: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

Abstract

New challenges and opportunities arise as a result of an increasing demand of connectingdevices in the context of the Internet of Things. Synergy effects can be achieved by con-necting local devices through both wireless local networks and global infrastructures.

These thoughts were applied in a military use case where the challenge was identified toreduce the risk of human lives in combat by letting an Unmanned Ground Vehicle (UGV)take over the highest risks during fire control. This thesis covers the design and evaluationof a system that enhances the aiming control performance of a UGV by allocating imageprocessing tasks to an adaptive local wireless distributed computation network.Background research was conducted through a state of the art survey, literature study andthrough structured interviews. The system was developed both as a simulation model inTrueTime, and a physical proof of concept demonstrator.

A hypothesis was developed that involves a categorization of two classes of QoS argumentsincluding sample rate and end-to-end delay. These two classes were used as a basis foranalyzing the control performance of the UGV in terms of accuracy and precision, andfor analyzing the individual impact of the technical parameters of the system. Based onthe initial hypothesis, the analysis concludes a potential theoretical speed-up in terms ofsample rate of approximately 6 times when implementing wireless distributed computingover Wi-Fi compared, to when the processing tasks are completely managed by the UGV.However, the analysis confirms that the resulting control performance of the UGV is a cleartrade-off between the dynamic distribution of computation and communication overheads.

Keywords: Distributed computing, wireless distributed computing, computer vision, mobilead hoc network, parallel processing

Page 6: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground
Page 7: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

Sammanfattning

Nya utmaningar och mojligheter kan identifieras till foljd av en okande efterfragan avatt koppla ihop enheter i sammanhanget Internet of Things. Synergieffekter kan uppnasgenom att koppla ihop lokala enheter bade tradlost och genom global infrastruktur.

Dessa tankar applicerades pa ett militart scenario dar en utmaning identifierades att re-ducera risken for manskliga liv i strid genom att lata en obemannad markfarkost overtade hogsta riskerna under eldledning. Detta examensarbete har som mal att utvarderaett system som forbattrar reglerprestandan hos en obemannad markfarkost genom att al-lokera bildbehandlingsuppgifter till ett adaptivt tradlost distribuerat berakningsnatverk.Forskningen genomfordes genom en state of the art undersokning, litteraturstudie, ochstrukturerade intervjuer. Systemet utvecklades bade i form av en simuleringsmodell iTrueTime, samt som en fysisk konceptvalidering.

En hypotes togs fram som innebar en kategorisering av tva klasser for quality of service,samplingshastighet och end-to-end fordrojning. Dessa tva klasser anvandes som grund foranalysen av reglerprestandan i termer av noggranhet och precision, samt for att analyserade inviduella effekterna av de olika tekniska parametrarna i systemet. Baserat pa deninitiala hypotesen ar slutsatsen av analysen att en potentiell teoretisk prestandaokning itermer av samplingshastighet pa 6 ganger uppnas vid implementering av ett tradlost dis-tribueringsnatverk av berakningskraft over Wi-Fi jamfort med nar processeringen hanterasenbart av fordonet. Vidare visar aven analysen att den resulterande reglerprestandan aren tydlig avvagning mellan den dynamiska distributionen av berakningsuppgifter och over-head vid kommunikation.

Nyckelord: Distribuerade berakningar, tradlost distribuerade berakningar, datorseende,mobila ad hoc-natverk, parallelprocessering

Page 8: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground
Page 9: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

Acknowledgements

We would initially like to thank Cybercom Group AB for the opportunity to conductour research under comfortable conditions in their facilities in Kista and our Cybercomsupervisors Karl Lunden and Fredrik Edlund in particular for their advice and supportduring the thesis project.

Furthermore we would like to thank the individuals that took their time to provide uswith valuable information within the military field of fire control.

We would also like to thank our KTH supervisor De-Jiu Chen for his enthusiasm, energyand valuable insights during our meetings. A big thank you goes to Svante Karlsson atLaser Components Nordic AB for providing us with a well functioning small industriallaser pointer for demonstration and evaluation purposes.

We would finally like to thank our friends and our families for their invaluable supportduring our complete education process and in this project.

Erik Bergdahl & Anders AstromStockholmJune 2016

Page 10: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground
Page 11: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

Table I: Work distribution, see Table of Contents for chapter contents

Chapter Main Responsibility Authorship

1 Erik Anders, Erik

2.1 Erik Erik

2.2 Anders Anders

2.3 Anders Anders

3.1 Erik Erik

3.2 Erik Erik

3.3 Anders Anders

3.4 Anders Anders

4 Anders, Erik

5 Anders, Erik

6 Anders Anders

7.1 Anders Anders

7.2 Erik Erik

7.3 Erik Erik

7.4 Anders, Erik

8 Anders, Erik

9 Anders, Erik

Page 12: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground
Page 13: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

Glossary

IoT Internet of Things

RFID Radio-Frequency Identification

UGV Unmanned Ground Vehicle

UAV Unmanned Aerial Vehicle

CPU Central Processing Unit

Scrum Agile project management method

OSI Open System Interconnect

PDU Protocol Data Unit

QoS Quality of Service

WI-Fi Wireless local area network based on the IEEE 802.11 Protocol

MAC Media Access control layer

TCP Transmission Control Protocol

IN Interconnection Network

SIMD Single-instruction-stream multiple-data-stream

MIMD Multiple-instruction-stream multiple-data-stream)

RPi Raspberry Pi

Page 14: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

MPI Message Passing Interface

SaaS Software as a Service

PaaS Platform as Service

IaaS Infrastructure as service

WDC Wireless Distributed Computing

WSN Wireless Sensor Network

NCS Networked control systems

M2M Machine to Machine communication

MANET Mobile ad-hoc Network

ETX Expected transmission count

WMN Wireless Mesh Network

SRS Swarm Robotic Systems

GPS Global Positioning System

PSO Particle Swarm Optimization

VSN Visual Sensor Networks

VR Virtual Reality

DC-Motor Direct Current motor

OpenCV Open Source Computer Vision

GPU Graphics Processing Unit

PC Personal Computer

Page 15: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

WLAN Wireless Local Area Network

E2E End-to-end delay

FPS Frame per second

Iperf Tool for measuring bandwidth

IBVS Image Based Visual Servo

Page 16: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground
Page 17: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

Contents

Abstract

Sammanfattning

Acknowledgement

Glossary

List of Figures

List of Tables

1 Introduction 1

1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.2 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.3 Problem Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.4 Hypothesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.5 Delimitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.6 Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.6.1 Literature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1.6.2 Interviews . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1.7 Ethics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1.8 Report Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2 State of the Art 9

2.1 Case-study Anti-Surface Warfare . . . . . . . . . . . . . . . . . . . . . . . . 9

2.1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.1.2 Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.2 Mobile M2M Communication . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2.2.1 Internet of Things . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2.2.2 Low infrastructure Networks . . . . . . . . . . . . . . . . . . . . . . 12

2.2.3 Application Context . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

2.3 Wireless Distributed Computing . . . . . . . . . . . . . . . . . . . . . . . . 16

Page 18: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

2.3.1 WDC system model . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

2.3.2 WDC Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

3 Theoretical Framework 21

3.1 Communication and Networks . . . . . . . . . . . . . . . . . . . . . . . . . . 21

3.1.1 Network Topologies . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

3.1.2 Network Protocol Framework . . . . . . . . . . . . . . . . . . . . . . 23

3.1.3 Network Performance Metrics . . . . . . . . . . . . . . . . . . . . . . 24

3.2 Parallel Computation and Processing . . . . . . . . . . . . . . . . . . . . . . 27

3.2.1 Performance theory . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

3.2.2 Distributed Computing . . . . . . . . . . . . . . . . . . . . . . . . . 29

3.2.3 Clusters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

3.2.4 Cloud computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

3.3 Object Detection in Image Processing . . . . . . . . . . . . . . . . . . . . . 35

3.3.1 Viola-Jones algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 35

3.4 Visual Servo Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

4 Design and Implementation 37

4.1 Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

4.2 System Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

4.2.1 Military system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

4.2.2 System requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

4.2.3 System constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

4.2.4 Unmanned Ground Vehicle . . . . . . . . . . . . . . . . . . . . . . . 40

4.2.5 Hardware Choices . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

4.2.6 Software Choices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

4.2.7 Simulation software choice . . . . . . . . . . . . . . . . . . . . . . . . 43

4.3 System Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

4.3.1 Overall system design . . . . . . . . . . . . . . . . . . . . . . . . . . 44

4.3.2 Parallel distribution process . . . . . . . . . . . . . . . . . . . . . . . 45

4.3.3 Node design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

4.3.4 Slave node management . . . . . . . . . . . . . . . . . . . . . . . . . 48

4.3.5 Motor actuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

4.3.6 Simulation model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

5 Analysis 55

5.1 System parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

5.1.1 Data size and clock rate . . . . . . . . . . . . . . . . . . . . . . . . . 56

5.1.2 Bandwidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

5.2 Node Utilization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

5.2.1 Distance between nodes . . . . . . . . . . . . . . . . . . . . . . . . . 59

Page 19: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

5.2.2 Resilience and Redundancy . . . . . . . . . . . . . . . . . . . . . . . 61

6 Results 656.1 Sample rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

6.1.1 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656.1.2 Demonstrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

6.2 End-to-end delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 666.3 Accuracy and precision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686.4 Fulfilment of Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

7 Discussion 717.1 Hypothesis revisited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

7.1.1 Performance evaluation . . . . . . . . . . . . . . . . . . . . . . . . . 727.2 Context evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

7.2.1 Ethical evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737.2.2 Economical evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . 737.2.3 Sustainability evaluation . . . . . . . . . . . . . . . . . . . . . . . . . 74

7.3 Method evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

8 Conclusion 75

9 Future Work 779.1 System protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 779.2 Incremental system development and testing . . . . . . . . . . . . . . . . . . 789.3 Image partitioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789.4 Node diversity generalization . . . . . . . . . . . . . . . . . . . . . . . . . . 78

Bibliography 81

Appendix A Interviews I

Page 20: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

List of Figures

1.1 Project Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.1 Mesh network topology where all nodes can connect to another . . . . . . . 14

2.2 WDC network system communication graph. Tasks are allocated in a taskgraph to nodes in a communication graph [17]. . . . . . . . . . . . . . . . . 18

3.1 The seven layers of the OSI model. . . . . . . . . . . . . . . . . . . . . . . . 23

3.2 Amdahl’s law . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

3.3 Shared memory system where two processors share and access the samememory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

3.4 Distributed memory architecture in a parallel computer [36] . . . . . . . . . 30

3.5 Different examples of static network topologies in parallel computers . . . . 32

3.6 The crossbars switch is a dynamic network topology consisting of multipleswitches in a matrix configuration with multiple inputs and output linesthat form a crossed pattern. A connection is established as the switches ateach intersection along the line are closed [36]. . . . . . . . . . . . . . . . . 32

3.7 Beowulf cluster consisting of 32 RPi’s [41] . . . . . . . . . . . . . . . . . . . 33

3.8 Typical visual servo control system [49]. . . . . . . . . . . . . . . . . . . . . 36

4.1 Idle nodes in the network analyze sensor data from the vehicle locally beforereturning the processed data back to the vehicle. All other forms of externalcommunication is avoided in order to prevent the vehicle from giving awayits position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

4.2 Overall system design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

4.3 Flowchart of the proposed distribution algorithm. . . . . . . . . . . . . . . . 45

4.4 The foreground process of the master node. . . . . . . . . . . . . . . . . . . 46

4.5 Child handling software design. . . . . . . . . . . . . . . . . . . . . . . . . . 48

4.6 Motor actuation software design. . . . . . . . . . . . . . . . . . . . . . . . . 51

4.7 Coordinate system of a frame. . . . . . . . . . . . . . . . . . . . . . . . . . . 52

4.8 Setup consisting of a TrueTime Wireless Network kernel and a networkwith 18 network nodes. The darker block is the master node that distributesprocessing tasks to the n slaves nodes (a maximum of 17 in this configuration). 54

Page 21: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

5.1 The bandwidth along with the data size, affects the transmission time andadds to the total overhead. The frame transmission runs in parallel with thesequential task execution and does not add to the sequential execution timeas long as the frame transmission is shorter than the sequential execution. . 58

5.2 Simulation of system network traffic with four connected slave nodes. . . . . 585.3 Simulation of system network traffic with eight connected slave nodes. . . . 595.4 Simulation of system network traffic with 23 connected slave nodes. . . . . . 605.5 The drop in network bandwidth of the demonstrator system as a function

of distance between two nodes. . . . . . . . . . . . . . . . . . . . . . . . . . 605.6 Simulation of network traffic in surroundings with a high degree of obstacles. 615.7 Simulation of system network traffic with losses of nodes. . . . . . . . . . . 625.8 Performance of system versus loss of nodes. . . . . . . . . . . . . . . . . . . 62

6.1 Simulated system performance in terms of sample rate in relation to numberof nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

6.2 The resulting achieved frame rate of the demonstrator system (with a max-imum of four available slave nodes due to the budget constraints presentedin section 4.2.2) is compared to the simulated frame rate of the system inrelation to number of slave nodes. . . . . . . . . . . . . . . . . . . . . . . . . 67

Page 22: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

List of Tables

I Work distribution, see Table of Contents for chapter contents . . . . . . . .

I Raspberry Pi 3 Model B and BeagleBone Black characteristics ([51],[52]) . . 42II Example of a set of network nodes with different individual parameters. . . 48III Categorization of a set of nodes depending on their individual parameters. . 49IV Look-up table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

I Table depicting the identified system parameters affecting the system con-trol performance either through the end-to-end delay or sample rate. . . . . 56

II The approximate increase in time delay resulting from doubling the framedimensions (n∗m pixels). As illustrated, the sequential execution time andtotal overhead increase in a linear fashion while the parallel execution timeincreases exponentially. The time delays were obtained by measuring theexecution times of the different segments of the program. . . . . . . . . . . 57

I The measured frame rate relative to number of slave nodes. . . . . . . . . . 66II The three measured components of the end-to-end delay. . . . . . . . . . . . 67III Fulfillment of requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

Page 23: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

Introduction

This report is the result of a KTH Master Thesis Project in Mechatronics conductedby Erik Bergdahl and Anders Astrom during spring 2016. The thesis work was carriedout at Cybercom Groups office in Kista outside of Stockholm. This chapter will initiallydescribe the background, purpose and problem description of the project before coveringlimitations, method and ethics.

1.1 Background

As the number of smart and connected devices increase, new possibilities and challengesarise. The term Internet of Things, or IoT, has in a couple of years gone from a rela-tively unknown phenomenon to a word on everyone’s lips. Many companies now look intothe possibilities of designing products that can communicate with other devices and/orbe controlled by other computers. This will change the way we live and interact withmachines [1]. Most of these connected devices are equipped with small embedded micro-controllers/processors that have strictly limited specifications due to cost constraints. IoThas more to give in terms of possibilities for an architecture of loosely coupled, decentral-ized networks of smart objects that can provide added value to its stakeholders [2].

The authors of [1] define a number of challenges and opportunities within IoT. Amongother things they name the challenge of providing analyzed, accurate and on-time infor-mation based on raw sensor data. Important parameters are power and bandwidth forcommunication with servers etc., but also how to manage computation both horizontallyamong the devices in the network and vertically with clouds [1]. They also mention thebig inertia of development since most projects related to the matter are optimized to aspecific application along with slow development of standards and technical solutions [1].[3] states that IoT represents the future of communication and computation.Examples of areas of interest for smart systems and networks are applications for militarycommand, control and targeting systems, health care, surveillance, managing inventory,monitoring product quality and monitoring disaster areas [4]. Furthermore, examples ofapplication devices for smart/connected systems range from simple RFID tags mounted

Page 24: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

2 | Chapter 1. Introduction

on the surface of a product [5] to Unmanned Ground Vehicles, or UGV’s, and UnmannedAerial Vehicles, or UAV’s.Due to the high price of computational power of micro-controllers a variety of cloud ser-vices have been introduced to the market, primarily within storage and computation ap-plications. These cloud services require both large and costly server halls and Internetconnection in order to work properly. This can be achieved with wired connections, how-ever, recent research has been advocating a wireless approach to be necessary in futureapplications [6]. Questions arise how to efficiently distribute and receive information whenenormous amounts of devices are connected to the Internet. The prediction of 24 billionconnected devices in 2020 [7] imply challenges not only in generating the necessary stor-age and computational resources but also by providing the necessary bandwidth therefore.On the other hand, an opportunity arises to utilize the higher density of products ableto communicate with each other in a local context, thus decreasing the demand for cloudcomputing and bandwidth.

This thesis project aims to investigate the possibilities of distributing heavy computa-tion tasks in dynamic networks consisting of low cost device. Thus, more complex taskscan be solved without Internet connection or high performance CPUs. In the context ofmilitary applications within IoT, additional demands apply for the system design. Hencethe information security and risk for third party detection is of great importance. Conse-quently, when opposed to an enemy, cloud computing is undesirable in terms of informationsecurity. Thus for units dependant on stealthy operations, maintaining a low signal profileas long as possible is of vital importance. Soldiers with the mission to fire-control theimpact of heavy weapons such as missiles and mortars are especially vulnerable to enemycountermeasures. Normally these units operate covert and independently which sets highrequirements on the soldier and his/her gear. The standard weight that a Swedish firecontrol soldier has to carry exceeds 50 kg during some missions.

Smart, light devices and unmanned vehicles can contribute in both reducing the riskfor casualties but also to enhance endurance and performance of soldiers in battle. Theysave human lives by reducing human exposure in dangerous situations. Additionally, prop-erly designed machines can provide higher accuracy, i.e. in targeting and following movingthreats which are critical during fire-control missions.

1.2 Purpose

A sole non connected device is limited to its own processor, memory and storage. Byutilizing the processing capabilities provided by idle nearby units, increasing performancein running computationally complex tasks, reducing battery consumption, weight and cost

Page 25: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

3 | Chapter 1. Introduction

is a possibility. It is desirable to limit expensive, heavy and energy consuming processorsin small mobile military vehicles as well as avoiding external communication and compu-tation to minimize the risk of revealing the vehicle’s position.

The goal of the project is to:

1. Develop and design a proof of concept that involves replacing soldiers performingcurrent fire-control operations with a UGV that can track and aim at targets withcomputer vision.

2. Research how the control performance of the laser actuation performed by the vehicleis affected by allocating the image processing task locally to nearby devices withprocessing capabilities using wireless distributed computing, WDC.

3. Find and research which are the set of important technical parameters affectingthe control performance when wireless distribution of image processing tasks is per-formed.

The resulting control performance will be analyzed in terms of accuracy and precisionwhen following a moving target with computer vision.

1.3 Problem Description

The thesis will research the following questions:

• RQ1: How is the aiming control performance of an unmanned military vehicle usingcomputer vision affected by wireless distribution of the processing tasks to nearbydevices?

Sub research questions:

• SRQ1: Which are the key technical parameters affecting the aiming control perfor-mance of such a system?

• SRQ2: How does the variation of key technical parameters affect the aiming controlperformance of the system?

The research questions will be studied from a theoretical perspective followed by simula-tions and a physical proof-of-concept implementation. The implementation will be builtusing existing affordable hardware subsequent to the resulting theoretical study.

Page 26: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

4 | Chapter 1. Introduction

1.4 Hypothesis

As the background study was conducted, a hypothesis was developed linking back to theproposed research questions in Section 1.3. The hypothesis involves a categorization oftwo classes for quality of service metrics during the analysis of the control performanceand is presented below.

1. Sample rate: The sample rate is the frame rate achieved by the visual sensor duringobject detection.

2. End-to-end delay: The end-to-end delay will in this thesis be referred to as thetime delay between the sampling of sensor data, i.e. the capturing of an image frame,to the point of actuating the laser.

The impact of each key technical parameter will thus be mapped to the two classes inorder to analyze their impact on the control performance.

1.5 Delimitations

This thesis will investigate the possibilities of applying wireless distributed computing inmobile wireless networks in a military context. Since these research fields cover a greatspan of knowledge, a clear scope and delimitation’s are defined.

The theoretical research will focus on:

• Communication and networks

– Communications network characteristics

• Parallel computation and processing

– Performance theory

– Distributed computing

Moreover, a state of the art research will be conducted which mainly focus on:

• Fire-control

• Mobile M2M communication

• Internet of Things

• Wireless distributed computing

Page 27: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

5 | Chapter 1. Introduction

The control performance will be studied from a computational perspective rather thanfrom a control theoretical approach. Computer vision is the chosen method used to ac-quire and provide sensor data to the system. However, the theoretical research will onlybriefly touch upon this topic. Already existing solutions and libraries will be implementedrather than developed from scratch.

The scope of this thesis will only briefly cover:

• Object detection in image processing

• Control theory

The following aspects falls out of the scope of this project:

• Security

• Encryption

• Hardware and software robustness corresponding to an actual deployment scenario.

Further, the intended network aims to be designed and researched under the limitationthat it will be homogeneous and centralized. Hence, all slave nodes will consist of the samehardware, posses equal processing capabilities and function as processing resources ratherthan sensors.

1.6 Method

The purpose of this study is to explore whether the utilization of nearby idle deviceswith processing capabilities can enhance the aiming control performance of a militaryunmanned vehicle using computer vision. The aim is to conduct a pre-study resulting inthe design and evaluation of such a system.

The overall objective is to obtain a frame-of-reference via a qualitative literature studyon the topics identified together with semi-structured interviews with academic expertsand military personnel. The initial phase is supposed to result in a scoped case where theconcept identified in the study should be experimentally evaluated with simulations and aphysical demonstrator. The implementation method will be experimental and conductediteratively where quantitative data collected from test-cases will be analyzed and con-cluded for further expansion of the system. The overall project methodology is depictedin Figure 1.1.

Page 28: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

6 | Chapter 1. Introduction

Figure 1.1: Project Methodology

1.6.1 Literature

During the literature search the aim is to obtain information that is as contemporary aspossible. The main resources used in the literature search are Scopus and IEEE Xplorewhere Books, articles, conference proceedings etc. are analyzed in order to obtain adiversity of information. Moreover, the aim is to study peer-reviewed literature to thefurthest possible extent.

1.6.2 Interviews

Two semi-structured interviews were conducted whose protocols are found in AppendixA. The first interview was conducted with Carlo Fishione, professor at KTH to receiveinput on the possibilities and limitations regarding WDC. Carlo specializes in networkoptimization and parallel computation with applications to wireless sensor networks, net-worked control systems, and wireless networks. The second was conducted together withmilitary personnel at the 1st Marine Regiment in Berga south of Stockholm with twosoldiers who are experts in fire-control. The second interview was conducted to get a clearpicture of the challenges the Swedish military face today in the context of fire-control.

1.7 Ethics

Dealing with resource sharing and wireless communication, there are some ethical as-pects to be considered. It is therefore necessary to investigate certain principles duringresearch and the design of the system. Ethical principles such as privacy, confidentialityand anonymity are probable to be impacted by the proposed system.

Regarding the military application of the research, harm to participants is a majorconcern both during development and deployment. A thorough ethical analysis is neededin order to evaluate the impact of this technology on a potential battlefield.

Page 29: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

7 | Chapter 1. Introduction

Potential negative aspects are:

• Enhanced military technology has the potential of being used with the wrong inten-tion thus causing more damage than originally intended

• The risk that military technology ends up in the wrong hands

• Considering that the implementation is a military implementation, security issuesand malfunctions have the potential of harming people or causing economical damage

Potential positive aspects are:

• The system could have a positive impact from a sustainability perspective, by uti-lizing the computational resources of idle nearby devices thus reducing the need foradditional processing hardware

• The concept of a platform overtaking exposure to enemy fire reduces the risk forinjuries and casualties among the own soldiers

• Aiming improvements related to machines enhances accuracy leading to a reducedrisk for collateral damage

• Overall research on local resource pooling that can aid the enhancement of compu-tational power and smart systems in third world countries or areas lacking Internetconnection

There are many interesting and important ethical aspects to be considered. All in all, thetechnology could assist in minimizing collateral damage to civilians by better precision ofaiming, thus constituting a possibility for non-lethal weapon use if used with caution. Thepotentially improved aiming enables a rethinking in both doctrine and armament due tobetter precision. For example the precision of aiming might enable a surface to surfacemissile to disarm a navy vessel instead of destroying it. By the certainty to hit where itis supposed to, the explosive load could be reduced.

Additionally, by allocating the platform away from own troops, enemy counter-firewould affect the platform more and the troops less. Thus it is deemed that the aim ofthe research is to reduce the collateral damage of existing weapon systems rather thandeveloping new ones, thus maintaining the requirements of ethical researching.

1.8 Report Outline

The outline of the thesis is organized as follows:

1. Introduction: Covering the background, purpose, problem description, hypothesis,delimitation’s, method and ethics of the thesis

Page 30: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

8 | Chapter 1. Introduction

2. State of the Art: Covering the application context and use-cases of the technology

3. Theoretical Framework: Covering the theoretical background in communicationand networks, parallel computation and processing, and image processing

4. Design and Implementation: Covering the design and implementation processof the simulation model and demonstrator

5. Analysis: Covering the analysis of the designed demonstrator and simulationmodel in line with the stated research.

6. Results: Covering the results of the measurements conducted on the simulationmodel and demonstrator

7. Discussion: Covering the analysis of the results

8. Conclusion: Covering the overall conclusions drawn from the research

9. Future Work Covering the identified subjects for further research

Page 31: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

State of the Art

2.1 Case-study Anti-Surface Warfare

Two structured interviews were conducted with military personnel at the 1st Marine Reg-iment in Berga, Sweden on May 16th 2016. The first interview was conducted with afire-control squadron leader serving in 203 Amfskyttekomp. The second interview wasconducted with an indirect fire development officer. The aim of the interviews was toobtain a clear picture of how soldiers operate in the field and to get first hand informationon the challenges they encounter performing their duty. The result of the interview is pre-sented in this section. The questions of the structured interviews are found in AppendixA.

2.1.1 Background

A fire-control group is constituted of a number of soldiers with the main task to control thefiring from a mortar or missile team. A secondary task is reconnaissance where the groupoperates more as a ranger squad with the main purpose to collect intelligence. The groupis always operating independently from other forces and cannot count on help or logisticsfrom the rest of the battalion during operations. The group therefore needs to bring allequipment needed to fulfill its mission. Depending on mission the weight carried of eachindividual soldier can range up to 52 kg excluding rifle and uniform. The group uses theCombat Boat 90 for advancing over water, otherwise depending on muscle strength fortransportation.

The group primarily uses a Swedish version of AGM-114 Hellfire missiles to defendagainst incoming enemy vessels. By observing incoming vessels and calculating theirspeed and direction by hand, the group extracts information that is signaled over radio tothe weapon station at another location. When firing is appropriate, an operator from thefire-control group aims a laser on the target as the missile is launched from the weaponstation. The missile finds the reflected laser beam guiding it onto the target.

Page 32: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

10 | Chapter 2. State of the Art

There are generally three types of communication scenarios in military applicationswhere wired communication is traditionally used. However, as the wireless technology hasmoved forward an increasing amount of communication have been transitioned to wirelesssolutions. The advantage of wired communication is that it is hard to jam and eavesdropfrom a distant location. The drawback however lies in its lack of mobility. Wirelesscommunication has the inverse problem, it is well suited for mobility but is simultaneouslymore vulnerable to eavesdropping, triangulation and jamming. These problems can beavoided by using directed communication links. These solutions radiate less signals totheir surroundings than normal wireless communication.

2.1.2 Challenges

A group operating in the Swedish archipelago is faced with numerous frictions except forthe obvious threat of the enemy. The weather is an important factor due to its infliction onboth personnel and gear. Batteries powering radio and laser are sensitive to cold, loosingeffect as the temperature drops. The targeting equipment used today is old fashioned, i.e.large and heavy. However it is very robust and handles most situations, i.e. mist, rain etc.

Detection

The highest risk of getting detected occurs during infiltration into the location from wherethe targeting is supposed to be carried out, and during the actual targeting. The time inbetween infiltration and fire missions can range from hours up to days, sometimes weeks.During targeting, an operator aims a laser at the enemy vessel. Modern warships howeverhave sophisticated sensors that are able to detect the direction from where the ship istargeted from. It is of uttermost importance for the vessel to protect itself from themissile, but a high priority is also to eliminate the eyes of the laser, e.g. the fire controlgroup. The risk of enemy countermeasures is almost certain within just moments fromthe time the laser is activated.

High tech vs Old school

An interesting topic that was raised by the second interviewee was the trade-off betweenthe contribution of high-tech solutions versus the risk of their malfunction due to enemyjamming. Consequently, the whole organisation might collapse if it is relying on technologyto a high degree. The higher degree of enemy technology is inverse proportional to thetechnology that can be relied upon in the own organisation. Due to this logic, modernsoldiers need to have a knowledge base in doing things old school when faced with anenemy having technology superiority.

Page 33: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

11 | Chapter 2. State of the Art

Fire vs protection

An optimal situation for the fire-control group would have been to be able to control wa-ter without being detected. The group can be covert for long periods, minimizing theirexposure to enemy sensors. However, the moment an enemy vessel has been detected thegroup will have to increase their exposure in order to enable the chance to stop it. Atactical decision based on the trade-off between damage done and risk for own casualtiesis taken whether it is profitable for the group to take up the battle or not.

To summarize the conclusions from the interviews conducted at Berga:

1. High risk for personnel: The risks for human lives during contemporary opera-tions are extremely high.

2. Demanding Service: The service conducted by the soldiers is filled with frictionssuch as heavy gear and hard weather.

3. Complex environments: The Swedish archipelago is constituted by water andislands which induces constraints in mobility.

4. No total control of Unmanned Vehicles: The soldiers cannot totally rely upontechnology due to risk of jamming and risk of faults.

Page 34: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

12 | Chapter 2. State of the Art

2.2 Mobile M2M Communication

This part will cover the state of the art in Machine to Machine communication, or M2M.It will begin by introducing the background and definition of The Internet of Things as aconcept and explore its underlying research trends and future development plan in order tocover a contextual understanding of the theory enabling our thesis project. Subsequentlya general overview of networks appropriate for mobile M2M technology and an applicationcontext will be presented.

2.2.1 Internet of Things

IoT is a relatively new paradigm which have gained increased attention over the lastyears. In a historic perspective, the development of communication networks have aimedto connect everyone at any time regardless of location. The aim of IoT however is toconnect everything, ranging from simple everyday objects to sophisticated products andsystems. The term has been relatively ambiguous and has therefore been both used andmisused in a wide variety of applications and concepts[8].There are no general or absolute definition of the term, semantically IoT means:

”a world-wide network of interconnected objects uniquely addressable, basedon standard communication protocols” [8], p. 2788

Three distinct categorizations have been identified within the field; ”Internet”, ”Things”and ”Semantic” orientation which approaches the paradigm differently. As the Internetapproach mainly focuses on connectivity and addressing of objects, Things oriented re-searchers focus on smart items and semantic researchers focus on how to organize, interpretand use the generated data. The IoT paradigm however can be interpreted as the synergyof all three approaches combined [8]. The fundamental idea of the paradigm is to enablethese ”things” to sense and interact with the physical world but also being able to shareits information to others. A vision is thus to generate a smart environment which enablesobjects, systems and people to cooperate. The amount of connected devices have alreadyexceeded the amount of people in the world and is estimated to exceed 24 billion in 2020[9].

2.2.2 Low infrastructure Networks

Due to the operational environment and settings presented in section 2.1 a communicationnetwork which is supposed to aid a fire-control group in battle needs to enable mobility andflexibility among its nodes. Moreover this network cannot rely upon a static infrastructuresince the battalion cannot guarantee radio coverage in the main combat network. Mobilead hoc networks and wireless mesh networks are network types that are designed for thesekind of requirements and are introduced below.

Page 35: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

13 | Chapter 2. State of the Art

Mobile Ad Hoc Networks

Ad hoc networks are ”.. a collection of nodes forming a temporary network without theaid of additional infrastructure and no centralized control.” [10] pp 351. The individualnodes of the network can either be static or mobile (the case with mobile nodes is coveredthoroughly in the next section). The individual nodes of the network are normally mobilein the sense that they have a battery as power source. However any device that can sendand transmit information wirelessly can constitute a node. A difference to other networktypes is the individual nodes ability to both be able to act as an end system and a router[10].

Mobile Ad Hoc Networks, or MANETs, have inherited the properties of ad hoc net-works. Among the characteristics are their dynamic topology and variable capacity links[11]. [12] describe MANETs distributed properties where individual nodes are permittedto choose the next hop of the route of a packet based on a predefined set of requirements.Moreover, [12] identify MANETS as ideal for Military communication applications dueto their self configuring nature and adaptability to create network paths without centralmanagement. These abilities enable great mobility within the network. The authors how-ever, also identify drawbacks with MANETS such as variable end-to-end delays and packetlosses primarily due to the complex dynamics of the network topology.

There are arguments against MANETs real-time capabilities. [12] believe that thereare no guarantees for real-time performance in MANETS due to their network dynam-ics and lack of bandwidth rendering in interference. The unreliability of the real-timefunctionality is mainly rendered from layer 1 and 2. Instead the authors propose safetycritical military systems to operate in inelastic soft real-time requirements which permitsa certain amount of E2E delay, intermittent loss and jitter as long as they do not exceedcertain boundaries. Moreover, queueing and contention delays are the biggest contributorsto the overall E2E delay. Therefore, [12] define various metrics that are commonly used inMANETs, i.e. minimum hop count, routing impact on delay, delay, expected transmissioncount, medium time metric and worst case execution time.

Wireless Mesh Networks

A Wireless Mesh Network, or WMN, has many similarities with ad hoc networks andMANETs. A WMN consists of mesh routers and clients. All nodes can both host andforward packets. The similarities to ad hoc networks lie within the primary characteristicsof WMNs dynamic self- organization, configuring and healing capabilities [13].

Moreover, all nodes can relay to one another as long as they are in range. The topologyof node connection is depicted in Figure 2.1 below:

Page 36: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

14 | Chapter 2. State of the Art

Figure 2.1: Mesh network topology where all nodes can connect to another

In the case where the sender and receiver are out of range from each other, the rest ofthe network establishes a link between them forwarding the message until it has arrivedat the right address. This leads to a mesh routers advantage over a normal Wi-fi routeras its capability to achieve the same coverage of the network but with lower power. Thedisadvantage on the other hand lies within the bandwidth decreasing rapidly through anincreased number of nodes in the network [13].

WMN architecture can be categorized in infrastructure or backbone WMNs, clientWMNs or as a hybrid between the two. The earlier category consists of one or multiplemesh routers setting up a backbone infrastructure for the mesh clients to operate within.The latter lets the mesh clients arrange their own P2P communication. Critical designfactors of WMNs are radio techniques, scalability, mesh connectivity, compatibility andinteroperability, security and ease of use among others [13].

2.2.3 Application Context

There is a wide variety of applications connected to the IoT concept. Consequently thispart of the thesis is supposed to increase the knowledge on related work and put it incontext.

Swarm Robotic Systems

A tendency in recent research has been to introduce swarms of smart devices or robotsthat cooperate or collaborate in solving various tasks. The main characterization of theobjects within the field of Swarm Robotic Systems, or SRS, is that they are of reducedsize, have limited access to energy and are highly cost constrained [14].

Page 37: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

15 | Chapter 2. State of the Art

One of the major challenges within SRS is the localization problem. Due to the robotscost constraints, mounting GPS devices might not be a possible solution. Therefore, avariety of solutions have been researched. A normal approach is to measure the positionrelative to a reference node with known position, which is called an anchor. The differenttypes of approaches to the localization problem can be divided into two categories, rangebased and range free. Among the range free approaches are using RFID tags, averageposition of reference nodes within one hop range and image processing. Range basedlocalization on the other hand uses ad hoc positioning, the Euclidian method and n-hopmultiliteration as means of positioning unknown nodes [14].

Sensor Fusion

Due to the lack of high-performance electronics typically used in nodes in the IoT context,sensor fusion technologies are needed. Thus better performance of the entire system canbe achieved disregarding the relatively low memory and computational capacity of eachnode. Already established RFID-tag networks have as an example enhanced the overviewof supply chains. Another benefit of the sensor fusion approach is its potential to generatea more comprehensive picture over larger areas than single sensors. Among the sensordata that are of interest in this context are node signal processing, wireless sensor networklocalization, anti-collision and information aggregation [15]. Following the argumentationof [15], the sensor fusion approach is basically an optimization problem. By implementingan improved Particle Swarm Optimization, or PSO, they believe that they could generatebetter results than a traditional optimal solution approach. The results also concludes thatPSO is a promising technology for implementation in high speed real-time applications indynamic environments.

Wireless Sensor Networks

Wireless sensor networks are constituted by multiple individual nodes that each have itsown power source, sensor, processor and communication module. The characteristics ofWSNs are that they are distributed and ad hoc with the purpose to increase the awarenessof certain parameters over an area depending on the application [16]. Originally WSNshave been affiliated with systems of sensors that collect one dimensional data such as airpressure or temperature. However, with the improvements of the digital camera over thelast decade richer sensor data has been made available. This new richer sensor data implieshigher demands and new challenges within transmission and processing. These challengeslie mainly within energy, bandwidth and computational requirements in order to obtainin-time analysis of the system [16].

WSNs based on visual sensor data are called Visual Sensor Networks, or VSNs. Ex-amples of applications within VSNs are remote and distributed video based surveillance,assisted living but also Virtual Reality, or VR. The biggest difference between WSNs and

Page 38: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

16 | Chapter 2. State of the Art

VSNs are the amount of information that needs to be transferred and analyzed. Differentutilization of individual nodes needs to be addressed depending on the situation, statusand the goal of the network. For example if the main goal of the network is to obtain cam-era coverage over an area, decisions regarding which nodes should be active at a given timeneed to be addressed. Moreover, secondary objectives as network lifetime, connectivitybetween devices and data gathering need to be optimized[16].

2.3 Wireless Distributed Computing

Multiple collaborative radio nodes operating together form a wireless distributed com-puting (WDC) network. The objective with WDC is to increase performance, operatingefficiency and abilities over a single node while reducing per-node and network resourcerequirements. The goal is also to enable complex applications such as image processingin a network of small form factor radio nodes where such applications are not otherwisepossible [17].

The authors in [18] state that the WDC research is driven by limitations in mobileportable computing devices regarding the ability to execute complex mobile applicationsthat are mainly attributed to their resource (energy and computational) constraints. Fur-thermore, workload diversity is achievable by task allocation to various nodes in the net-work where heavily loaded nodes offload their workload to nodes with lighter loads basedon conditions such as channel conditions and resource availability in the individual nodes.

Further, [17] states that driving factors and current trends in WDC are the applicationsin modern radio systems such as WSNs, tactical radios and commercial smart phones thatrequire networks that are robust and efficient, and can support resource intensive com-putation services. Additionally, future wireless standards are stated to be expected toadopt ad hoc networking approaches for complex computation. Such applications involvecomplex computation and communication tasks imposing stringent quality of service con-straints such as power consumption, latency and range but also resource (communication,computation and power) requirements.

Since local processing is dependant on a high resource requirement per node and thequality of service guarantee from individual fault prone radio nodes is none, WDC has thepotential to enable [17]:

• Decreased power and energy consumption for each node and for the network as awhole

• Efficient allocation of computational resources to meet requirements by sharing thecomputational workload among collaborating nodes

Page 39: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

17 | Chapter 2. State of the Art

• Meet computational latency requirements of complex computational tasks be utiliz-ing and leveraging the network resources

• Fault tolerance in the execution of information services

• Lower resources per node obtained by simplified small form factor node design

• Applications employing location based processing

The research related to WDC poses a set of unique challenges over traditional dis-tributed computing. A research question that is fundamental in WDC is the trade-offbetween distributed and local processing with regard to the specific operational goals suchas the minimization of power, energy and time, and the maximization of reliability inprocessing computational tasks of a specific application. Regarding the practical imple-mentation of collaborative applications in WDC networks, several issues are critical suchas robust communication between nodes, synchronization, WDC networks control andmanagement, resource allocation, security and computational accuracy. Communicationscheduling and the heterogeneity in the operating environment make resource allocationin WDC a challenge. Though the mobility of a WDC system can implicate several im-provements such as information diversity and geographic flexibility, factors such as channelcharacteristics and the availability of collaborating nodes can contribute to the negativeeffects of mobility on WDC performance [17][18].

2.3.1 WDC system model

[17] A WDC environment consists of a number Nnodes wirelessly connected nodes withtheir individual computational capabilities. Each WDC comprises of computational, com-munication and power subsystems where the communication subsystem connects the com-putational subsystems on collaborating nodes through wireless links. The communicationsubsystem serves the distributed computing process in disseminating the computationalworkload and enables message passing in between computational tasks allocated to thedifferent nodes. [17] presents a WDC network system model depicted in Figure 2.2 con-sisting of graphs where the workload allocation is viewed as a problem of mapping anapplication’s tasks in the task graph to the network’s communication graph in order tooptimize the operational objectives.

Page 40: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

18 | Chapter 2. State of the Art

Figure 2.2: WDC network system communication graph. Tasks are allocated in a taskgraph to nodes in a communication graph [17].

A WDC application is here divided into NFB dependant computational tasks, alsocalled software components. These tasks and the communication between them are rep-resented by a task graph denoted Gcp = (F,E) in Figure 2.2 where the set of tasks aredenoted F = (F1, F2, ..., Fm) and the term E represents the set of directed edges. A prece-dence constraint states that a task can only execute when its predecessor task has finishedexecuting. The precedence constraint is represented by an edge (i, j) ∈ E in the depictedtask graph and states that Fj can only begin processing once Fi is finished. Thereby,the edges between the vertices represent the dependencies (and precedence constraints)between the respective tasks and communication between the tasks. The edge metricbik represents the interaction between tasks Fi and Fk and indicates the amount of datapassed between the tasks in bits.

The communication graph depicted in Figure 2.2 displays a fully connected networkof WDC nodes and their respective links. The nodes are denoted N = (N1, N2, ..., Np)and p is the total amount of nodes Nnodes. L is the set of wireless links (graph edges)connecting the nodes. In a network, each node and link is abstracted by its capacity,resource availability and link quality. With message passing, the nodes communicatewith each other over one of the available communication channels that each have thebandwidth B. Each edge also has a label indicating parameters such as distance betweennodes, channel variance, path loss and transmission rate [17].

Page 41: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

19 | Chapter 2. State of the Art

2.3.2 WDC Algorithm

In [17] a task allocation and scheduling algorithm is presented set to optimize energyconsumption and makespan. The makespan of a schedule indicates the completion timeof the last task in the task graph (i.e. the maximum among the completion times ofall tasks in the graph). For the particular algorithm, a resource is considered the bestresource for a given task when it can execute that task most efficiently. This requiresthe usage of priorities to tasks which is based on their estimated level. The estimatedlevel (priority) indicates the order certain tasks have been assigned in the task graph anddirectly influences the allocation of tasks to nodes and their activity scheduling. The resultis that high priority tasks are allocated to the ”best” resources.

Firstly, the estimated level of each task in the task graph is computed. A resource is theconsidered the ”best” for a given task if it can most efficiently enable the execution of thattask. Due to the access constraint, limited availability of resources, and the serial fashionin which tasks are allocated and scheduled to a specific resource, a question will ariseconcerning the order tasks will be assigned the ”best available” resources. This specificissue is handled by assigning priorities to the tasks based on their individual estimatedlevel. The estimated level works as an indication of the order in which tasks are assignedin the task graph. This way, the estimated level directly affects the allocation of tasks tonodes and the scheduling of the respective activities by allowing high priority tasks to beallocated to the ”best” resources. Consequently, low priority tasks have to wait until theirbest resources become available again.

Page 42: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

20 | Chapter 2. State of the Art

Page 43: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

Theoretical Framework

This chapter will investigate the theoretical framework in order to enable a critical discus-sion on the results presented in chapter 6. Primarily, this chapter aims to provide to thetheoretical background of the core research fields being computer networks, distributedcomputation and processing, and image processing. The scope is based upon the researchquestions formulated in section 1.3.

3.1 Communication and Networks

A computer network consists of a number linked computers acting as nodes. Nodes canindividually send, receive or route information. The way these nodes are linked togetherand handle information transmission characterizes different kind of network topologies.There are numerous ways of interconnecting nodes in a computer network.

The transmission medium could either be a physical link such as a wire or wirelesswhere signals travel through the air, water or vacuum via infra-red or radio waves. Thisthesis is focused on wireless networks in particular due to the requirement of mobilityamong the nodes. The main differences between wired and wireless network connectionsdo not only lie in the more dynamic nature of the latter but also in the unpredictableenvironment, medium and limited resources that are connected to wireless technologies.Interferences, obstacles and the mobility of network nodes result in an ever changing andunpredictable variation of signal strength within the network. This naturally inflicts onthe quality of the links binding the nodes together in terms of reliability. Data corruptionsuch as packet loss needs to be handled by the network protocol and inflicts both directdelays in terms of resending packets but also indirect delays in terms of built-in over-head of error handling. Moreover, in cases where mobility is critical for the network, newconstraints appears. Network nodes then need to be battery powered leading to powerconsumption constraints. The power consumption and portability constraints are conse-quently often followed by limited memory and processing capacity of individual nodes.Security measures also have to be addressed since unknown devices in range otherwise canretrieve information from the network by eavesdropping[19].

Page 44: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

22 | Chapter 3. Theoretical Framework

Since security concerns falls out of the scope of the thesis, this matter will only bebriefly mentioned. This chapter aims consequently to obtain the theoretical framework ofthe factors mentioned above.

3.1.1 Network Topologies

The way nodes are interconnected, either wired or wireless, is called the topology of thenetwork. The aim when designing the network is to generate communication paths fornodes to communicate over. For nodes that do not have a direct link to the node that itneeds to communicate with a protocol is needed in order to route the information. In thefollowing sections, a short description of the most common network topologies is given inorder to obtain an overview of their differences, advantages and drawbacks. Thereafter ashort presentation of routing methods is given.

Star

A network using a star topology contains a central node which operates as a hub. Allother nodes are connected to this hub which directs the communication between individualnodes. This topology’s advantage is the few hops the information needs to travel withinthe network in order to be received at the right address. The disadvantages are the highreliability on the central hub node. If the hub is disconnected, the whole network goesdown thus making it impossible for individual nodes to communicate with another [20].

Mesh

A mesh network topology is characterized by the interconnection among nodes. All nodesare connected with all other nodes which enables direct communication between individualnodes without interaction from other nodes. Another advantage with this topology is thenetwork’s overall redundancy to faulty nodes. However, a high cost in wired applicationsis a disadvantage [20].

The discussion of topologies can be expanded when introducing communication infrastruc-ture as a factor. There are networks that are completely dependant on a communicationinfrastructure. In this category, nodes can only communicate by using the built-in infras-tructure of the network. As a counterpart, there are networks that do not require anycommunication infrastructure. These networks are called ad hoc from the Latin expressionof something that is created when necessary. There are also combinations of the two, i.egrid networks where the network uses communication infrastructure to connect a wirelessnetwork to the Internet [19].

Page 45: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

23 | Chapter 3. Theoretical Framework

3.1.2 Network Protocol Framework

Open System Interconnect, or OSI, is a seven layer network model that has become unifiedreference model of network protocol design [21]. Figure 3.1 depicts the seven layers andtheir respective placement below:

Figure 3.1: The seven layers of the OSI model.

The OSI model in Figure 3.1 uses a peer-layer strategy where each layer handles datadifferently from the other layers. The information sent from a layer is meant to be receivedby the corresponding layer of the receiving device. The other layers are ignoring thatinformation. The data handling of a layer is conducted by a Protocol Data Unit, or PDU.While the host of the network operates within all seven layers of the framework, each nodeis normally constrained to the bottom three layers [22].

OSI Layers

The Physical Layer is the lowest level of the OSI model and its PDU a single bit. Themain objective of the physical layer is to provide the connection and transmission betweenthe data link layers of the sending and receiving devices. Most protocols use voltage, lightor electromagnetic signals over varying mediums in order to communicate. Activation anddeactivation of a physical connection, PDU transmission, sequencing and physical layermanagement are the main functions of the physical layer [22].

The second layer of the OSI model is the data link layer which has an increased numberof complex functions than the other layers. The PDU of this layer is a frame consisting

Page 46: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

24 | Chapter 3. Theoretical Framework

of approximately a hundred to up to a couple of thousand bytes. Control information isadded both as header and trailer and this layer supports both connection-oriented andconnectionless communication. Among the common functions of the connectionless andconnection-oriented data link layer are; error detection, relaying and control of data-circuitinterconnection [22].

The third layer of the OSI model is called the Network Layer. Its PDU is a packetconsisting of control information and user data. The main objective of the network layerlies within the routing of data and control of the sub-net. Among the functions of thenetwork layer are routing and relaying, network connection, segmentation and blocking,error detection but also network-address-to-data-link-address mapping. The most crucialfacilities of the network layer are network addressing, quality of service parameters, expe-dited PDU transfer and error notification. The parameters connected to quality of serviceare delay, jitter, service availability, reliability and network establishment delay [22].

The fourth layer of the OSI model is called the transport layer. This layer’s respon-sibility is to guarantee the transportation of information from sending to the receivingnode when a route has been created by the network layer. In order to achieve this, thetransport layer uses error control, flow control and sequence checking in order to obtain areliable end-to-end transport of the given data [23].

The fifth layer of the OSI-model is called the session layer and is responsible for estab-lishing and terminating connections between nodes of the network.

The sixth layer of the OSI-Model is called the presentation Layer. This layer is re-sponsible for the conversion of data into presentable information. This conversion can takeplace in the form of decryption, compression, translation or other tasks demanded by thereceiving device. [23].

The seventh and highest layer of the OSI-Model is called the application layer. Thislayer is responsible for guiding applications requesting the different layers of the OSI-Model. It handles file transfers and database access among others [23].

3.1.3 Network Performance Metrics

There are a number of different metrics that can be used depending on the prioritizationof qualities in a network. A few of these metrics are presented below.

Quality of Service

Quality of service, or QoS, goes under the definition: ”the group of guarantee parameterswhich define the behavior of a network under certain conditions” [[24], p. 91]. The termQoS is used in order to measure the performance of the system in terms of predeterminedmetrics. Normally, a trade-off takes place between QoS and power consumption constraintsof the system since they are intimately connected in battery powered devices. The most

Page 47: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

25 | Chapter 3. Theoretical Framework

common metrics are different measurements of throughput and end-to-end delays.[25]Other metrics especially interesting in ad hoc networks are average end-to-end delays,jitter, packet delivery ratio and average throughput [26].

Package Delay

[27] discusses the need for an understanding of queuing theory in order to optimize overallperformance in tactical networks. Moreover, [27] defines four different kinds of delaysrelated to packet transmission namely: Processing, queuing, transmission and propagationdelay. Processing delay is defined as the time from arrival of a packet at a layer until itis assigned in an outgoing queue. Queueing delay is defined as the time taken from thepoint where a packet is placed in the queue until it is transmitted. Transmission delay isdefined as the time frame between the transmission of the first and last bit of a packet.Propagation delay is defined as the time between the transmission of the last bit and thereception of the last bit of the packet at the receiver end [27].

Congestion

Network congestion is connected to performance in terms of introducing packet loss anddelays due to blockage of network channels. This problem however is intimately connectedto the bandwidth of the system but is not the only parameter. The CPU speed of thetransmitting router is another parameter along with the size of memory buffer handlingqueues of packets ready to be transmitted. Problems related to packet loss are correlatedwith queue drop outs due to both memory shortage and timeout constraints of packets. Byaiming to control the flow of the transmissions it is possible to maximize the efficiency oftransmissions. The overall aim of these control algorithms are to maximize the utilizationof the network, avoid needless congestion and to provide equal service to all connectedusers [28].

Resilience

Network resilience is the metric related to a systems sensitivity to changes. It is measuredas the systems ability to maintain a certain level of service when faced with challengesthat intrude on its operational settings. These challenges range from node dropouts tocoordinated attacks. The main properties of resilience are reliability, safety, integrity,performance, maintainability, confidentiality and availability [29].

Power consumption

Battery powered devices are common in wireless networks, especially in wireless sensornetworks and wireless ad hoc networks. Hence, power consumption is introduced as animportant factor both on individual nodes and the overall system.

Page 48: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

26 | Chapter 3. Theoretical Framework

Depending on the application, a device drains different amounts of energy. A batterypowered device however cannot utilize its full potential at all times. Therefore it conservesenergy when possible, iterating over different operating modes which are called powerstates. When a device is idle it drains the least amount of energy, thus operating inthe lowest power state. When the device enters an active mode its power consumptionconsequently increases [30].The energy consumed by carrying out a fixed amount of traffic is given by

Etotal = PproductiveTproductive + PtailTtail (3.1)

where E denotes consumed energy, P output power and T the elapsed time [30]. As earliermentioned, there are challenges introduced when trying to optimize network performancewhile simultaneously addressing the constraints related to power consumption. Froma network perspective, metrics used to measure energy efficiency are network based onthe lifetime of alive nodes, coverage, connectivity or until failure to maintain a set ofapplication requirements. The main losses from the network perspective on node leveloccur during collision of data, node overhearing, control packet overhead, idle listeningand interference [31].

Signal strength

The electromagnetic signal strength is important in networks. However the signal strengthdeteriorates with increased distance from its source and absorption of energy in materialspassed. Signal strength can be locally increased or decreased due to superposition of waves.Signal strength within a network is intimately connected to network performance. Theprobability of packet losses during transmission is increased with a lower signal strength.Depending of the severity, this introduces error handling from the protocol, i.e. Wi-Fi MAC retransmissions and TCP retransmission. Moreover, the relative movement ofnodes within a network implies energy consumption when nodes are on the border ofconnectivity with another. The connection procedure also drains energy in situationswhen of re-association and hand-offs occur. [30]

Page 49: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

27 | Chapter 3. Theoretical Framework

3.2 Parallel Computation and Processing

This section will tackle the dynamics in parallel computing and processing to get a deeperunderstanding of the possibilities and limitations regarding the subject.

3.2.1 Performance theory

Commonly, software is written and developed in order to be computed serially meaningthat the program is written to be executed as a serial stream of instructions. Parallelcomputing however is simultaneous processing using multiple processing elements. In thiscase, the problem is divided into several parts where each individual processing elementexecutes its part of the software.

Amdahl’s and Gustafson’s law

However, few parallel computing algorithms are able to achieve a fair fraction of its peakperformance [32]. Optimally, the gain in speed resulting from an added number of process-ing units would be linear. According to Amdahl’s Law represented graphically in Figure3.2 below, the speedup is close to linear for a small number of processors and flattens fora higher number. The reason being the sequential component of the computation and theoverhead of coordination between the processors such as synchronization.

0 2 4 6 8 10 12 14 16

Number of processors, (2n)

0

2

4

6

8

10

12

14

16

18

20

Sp

eed

up

Amdahl´s Law

95% Parallel Portion

90% Parallel Portion

75% Parallel Portion

50% Parallel Portion

Figure 3.2: Amdahl’s law

Page 50: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

28 | Chapter 3. Theoretical Framework

The law states that the overall speedup using n number of processors in parallel isgiven by

SAmdahl (p , n) =1

1− p + pn

(3.2)

where p is the fraction of the whole computation task executed in parallel. Amdahl’slaw assumes a fixed sized problem, independent of the number of processors. Thereforethe computing requirements remain the same given the increased processing capabilities.[33][34] state that following Amdahl’s law, Gustafson’s law gives a different approach tothe theoretical speed in latency but assumes a fixed execution time rather than a fixedworkload. For Gustafson’s law the potential overall speedup is given by

SGustafson (p , n) = 1− p + pn (3.3)

Gustafson states that as computation capabilities grow and computers become morepowerful, the problem size grows and subsequently the workload for a potential parallelpart of the problem. The reason being that programmers tend to define the size of theproblem according to the available amount of processing power. According to Gustafson’slaw, the speedup increases in a linear fashion when adding additional processors. Accord-ing to the law, an application will solve bigger problems in the same amount of time ratherthan solving the same problem in less time. This assumes that the serial portion of theprogram stays constant which also applies to Amdahl’s law.

[34] states that both laws give accurate representations depending on the situation.However Gustafson’s law tends to follow the historical trend considering the fact thatprograms solve larger and more complex problems.

Isoefficiency

Isoefficiency is a performance evaluation metric for analyzing parallel algorithm-architecturecombinations [35]. The best algorithm for solving a given problem is the fastest algorithmon a sequential computer while the performance of a parallel algorithm for a specific prob-lem provides limited information. Parameters such as problem size, number of processors,processor speed, speed of communication channels, type of interconnection network androuting techniques affect the overall performance of the parallel algorithm. An algorithmmay perform well in one instance for a given problem but may perform poorly if one ofthese parameters are altered. Scalability is a measure of a parallel systems capability todeliver a linearly increasing speedup with respect to the number of processors used [35].A parallel systems ability to efficiently utilize an increasing amount of processing nodes isreflected by the the scalability.

Page 51: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

29 | Chapter 3. Theoretical Framework

The isoefficiency function relates the problem size to the number of processors requiredto maintain the efficiency at a fixed value [35]. The scalability of a parallel system isdetermined with respect to number of processors, processor speed, and the communica-tion bandwidth of the interconnection network. [35] defines a parallel system as theconstitution of a parallel architecture and a parallel algorithm. The execution time of analgorithm on a single processor is denoted T1 (the sequential execution time). Thecorresponding execution time of the parallel algorithm (parallel execution time) on p iden-tical processors is denoted Tp. The total overhead (denoted To) is the sum of time spentby all processors in the system doing work not executed by the sequential algorithm. Sincethe total execution time on all processors is pTp, the parallel execution time Tp is therefore

Tp =T1 + T0

p(3.4)

The speedup S resulting from a parallel system is defined as

S =T1

Tp=

pT1

T1 + T0(3.5)

and is the ratio between the sequential and the parallel execution time. The resultingefficiency E is defined as the ratio between the speedup obtained from the parallel systemto the number of processors

E =S

p=

T1

T1 + T0(3.6)

3.2.2 Distributed Computing

In parallel computing the main memory can be either shared or distributed [36]. Inthe shared memory case all processing elements share the same memory in one specificaddress space. A processor may have its local memory as well as its own register, bufferand cache. A simple parallel computing system using shared memory is depicted in Figure3.3 where the two processors share the same memory via two ports. A memory controlleris passed requests via the two ports through an arbitrary unit within the memory module.If a request is received, the module is set in a busy mode and all incoming requests willresult in a wait signal sent by the memory module through the memory controller to therequesting processor. If the memory is not busy, the arbitration unit will pass the requestto the controller and the request will be fulfilled.

Page 52: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

30 | Chapter 3. Theoretical Framework

Figure 3.3: Shared memory system where two processors share and access the samememory

Using a shared memory system there are a few issues that need to be taken in toconsideration. Parameters such as synchronization, access control, protection and securityare included [36].

Distributed memory

In a distributed memory system (also referred to as a message passing system), eachprocessor possesses its own local memory [36]. Together, a processor and a memorymodule form a processing element [37]. A distributed memory system differs from a sharedmemory system in the sense that there is no global memory. Therefore, data is transferredbetween different local memory in an interconnection network (IN) using message passingperformed via send and receive operations (see Figure 3.4). Simultaneous communicationand data processing is handled by the underlying operating system. A processing nodetypically stores messages in buffers while communication and processing can occur.

Figure 3.4: Distributed memory architecture in a parallel computer [36]

Page 53: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

31 | Chapter 3. Theoretical Framework

The interconnection between processing nodes in a message passage system can be donein multiple ways [36] ranging between geographically dispersed networks to architecturespecific interconnections. Important factors upon designing interconnection networks inrelation to a given application are the link bandwidth defined as bits/s and network latencydefined as the time required to complete a message transmission.

Interconnection networks

Fast and reliable communication between processing nodes is established by the IN [37].The mode of operation in an IN is classified as either synchronous or asynchronous. Insynchronous mode, all system components operate in a lock-step manner using a globalclock. In the asynchronous mode, handshaking signals are instead used to coordinate theoperation of the system. [36] states that synchronous systems tend to be slower comparedto asynchronous systems though synchronous systems on the other hand are both race andhazard-free. However [38] states that there are specific cases where a synchronous systemshave superior performance compared to an asynchronous. A specific case is stated wherea certain problem is solved in time s by a synchronous system whereas the correspondingtime for an asynchronous time is (s− 1)[logbn] where n represents the number of ports inthe system and b is a constant that reflects the communication bound in the model.

Further, parallel computers are divided into SIMD (single-instruction-stream multiple-data-stream) and MIMD (multiple-instruction-stream multiple-data-stream) machines. InSIMD parallel computers, all processors operate synchronously and execute the same in-struction stream provided and distributed by a single control unit. In MIMD machines thenetwork has to support asynchronous data transfer since all processors operate on theirown instruction stream.

The control strategy in an IN can be classified as either centralized or decentralized.Centralized systems are controlled by a single control unit controlling all processors andcomponents in the system. The reliability and functionality of the central unit can itselfbecome a bottleneck in such a system. In a decentralized system on the other hand, thecontrol functionality is distributed among different components.

An IN can also be classified according to the switching mechanism and technique. Itis either a circuit switching or packet switching network. In circuit switching, the com-munication between source and destination is started when a complete path has beenestablished and remains until the end of the communication period. In packet switching,the communication is established by messages divided in to suitably sized blocks (pack-ets) [39]. [36] states that packet switching uses the network resources in a more efficientmanner than circuit switching even though it usually suffers from variable packet delay.

Page 54: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

32 | Chapter 3. Theoretical Framework

The mapping function between processors and memories to other processors and memo-ries is called the interconnection network topology. Message passing IN topologies can beclassified as either static or dynamic. A fixed network is formed in static networks by es-tablishing direct fixed connections between processing elements while in dynamic networksthe connections are formed dynamically. In Figure 3.5 a set of different static topologiesare depicted where the messages are routed along established links.

Figure 3.5: Different examples of static network topologies in parallel computers

An example of a dynamic network is depicted in Figure 3.6 where the connection is estab-lished between a pair of nodes on the fly as a message is routed along the different links.For a message, the number of hops from source to destination is equal to the number ofpoint-to-point links the message has to traverse. The overall performance of the intercon-nection network is thereby greatly dependant on the number of hops the message has totraverse in the network [36].

Figure 3.6: The crossbars switch is a dynamic network topology consisting of multipleswitches in a matrix configuration with multiple inputs and output lines that form acrossed pattern. A connection is established as the switches at each intersection along theline are closed [36].

Page 55: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

33 | Chapter 3. Theoretical Framework

3.2.3 Clusters

A collection of parallel or distributed computers which are interconnected among them-selves using high-speed networks is called a Cluster [40]. Examples of interconnectionnetworks can be gigabit Ethernet, SCI, Myrinet and Infiniband. User requests are dis-tributed among all the standalone nodes forming the cluster functioning as a single virtualmachine. High availability, load-balancing and computation are some of the main usagesfor Clusters. Trends such as availability of low-cost microprocessors, software for high-performance distributed computing and high speed networks resulted in the emerge ofcomputer clusters. High availability is one of the key components in clusters since theymaintain redundant nodes whom provide service when system components fail [40].

Beowulf cluster

A computer cluster consisting of identical (typically) networked commodity computerhardware based systems in a small local area network is called a Beowulf cluster [40]. Thesystems runs parallel processing software enabling all nodes to share data and computation.A Beowulf cluster consisting of RPi’s is depicted in Figure 3.7 where 32 nodes performparallel processing.

Figure 3.7: Beowulf cluster consisting of 32 RPi’s [41]

A Beowulf cluster is a computer cluster of what are normally identical, commodity-grade computers networked into a small local area network with libraries and programs in-stalled which allow processing to be shared among them. The result is a high-performance

Page 56: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

34 | Chapter 3. Theoretical Framework

parallel computing cluster from inexpensive personal computer hardware.

Challenges in the Cluster Computing

[40] states the following research challenges in cluster computing:

• Middleware: Creating a software environment providing an image that the systemis a single unit rather than a collection of independent computers

• Program: All applications running on the cluster have to be explicitly written toincorporate the communication between nodes and the division of tasks

• Elasticity: The resulting variance in real-time response time when the number ofrequests change dramatically

• Scalability: Meeting the additional requirements that come with increasing theamount of nodes in the system while still maintaining the system performance

MPI

MPI (Message Passing Interface) is the primary programming standard used to enable par-allel programs and node communication in distributed systems [42][43]. Essentially, MPI isa core of library routines that can be called from a set of different computer programminglanguages (C, Fortran, C++, Python and Java) to enable parallel programs distributedsystems. Socket connections and TCP/IP are typically used for MPI implementations[44].

MPI is meant to provide synchronization, communication functionality and virtualtopology between processors. The processes are usually referred to as processors since anMPI programs typically assign single processes to each CPU. An agent normally startsan MPI program with a call to mpirun or mpiexec and the process assignment is thenexecuted in runtime.

3.2.4 Cloud computing

The term cloud computing refers to the applications delivered over the Internet as servicesas well as the actual hardware and system software residing the in data centers providingthose services [45][40].[46] defines a cloud as a form of distributed and parallel systemconsisting of a number of interconnected and virtualized computers that together areprovisioned and presented as one or several unified computing resources based on service-level agreement. Ubiquitous, convenient and on-demand network access to a shared pool ofcomputing resources such as networks, servers, storage, applications and services is enabledby cloud computing. Three types of services are provided by cloud computing, Softwareas a Service (SaaS), Platform as Service (PaaS) and Infrastructure as service

Page 57: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

35 | Chapter 3. Theoretical Framework

(IaaS) [40]. SaaS is a service that provides users with software hosted by the serviceprovider rather than buying the corresponding hardware and software. PaaS provides anenvironment for designing and testing online custom applications. Examples of such serviceproviders are Google’s App Engine and Microsoft Azure. IaaS is the cloud computingservice that provides users with processing power, storage, network and other computingresources. Examples of IaaS providers include AWS, Eucalyptus and Open Stack.

[40] states that the challenges in cloud computing include dynamic scalability (con-cerning scheduling delays), multi-tenancy, querying and access, standardization, reliabilityand fault-tolerance, security and privacy, and power consumption issues.

3.3 Object Detection in Image Processing

3.3.1 Viola-Jones algorithm

The Viola-Jones algorithm is a an object detection framework designed to provide real-time competitive object detection rates [47][48]. Primarly, the object detection was firstintended for face detection but can be trained to detect variety of different object classes.

The algorithm consists of four different stages:

1. Selection of Haar Feature

2. Creation of an Internal Image

3. AdaBoost Training

4. Cascading Classifiers

The Haar Feature utilizes the fact that all human faces share a set of common prop-erties/regularities and matches these properties and regularities. Examples include eyeregion, nose bridge, and mouth properties.

An integral image representation allows the features used by the detector to be com-puted quickly by evaluating rectangular features in constant time.

AdaBoost is a learning algorithm which selects a small number of critical visual featuresand to train classifiers that use them.

The last stage is a method for combining classifiers in a ”cascade”, allowing back-ground regions of the image to be discarded quickly while spending more computation onpromising regions likely to contain objects of interest.

Important characteristics of the algorithm include robustness (a high detection rateis obtained), efficiency (feature selection is performed efficiently) and that the detector islocation and scale invariant [47][48].

Page 58: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

36 | Chapter 3. Theoretical Framework

3.4 Visual Servo Control

[49] states a key problem in Image Based Visual Servo (IBVS) systems as the issue toidentify and track objects in a series of images. In Figure 3.8, a typical visual servocontrol system is depicted. The author proposes a scale-invariant image feature detectorand descriptor, called the Scale-Invariant Feature Transform, as method to achieve robustobject tracking in terms of rotation, scaling and changes of illumination.

Firstly, a Scale-Invariant Feature Transform method generates the feature points ofan object template. A series of images are then acquired as the robot moves. Secondly,a feature matching method is applied to match features between the template and theseries of images. Lastly, based on the locations of matched feature points, the positionof the object is approximated in the images of camera views. This algorithm of objectidentification and tracking is applied in an IBVS system to provide the location of theobject in the feedback loop [49].

Figure 3.8: Typical visual servo control system [49].

Page 59: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

Design and Implementation

This chapter covers the technical work of the thesis resulting in the design and evaluation ofa physical demonstrator implementation and simulation environment model in accordancewith the objectives related to the research questions presented in section 1.3. In thefollowing sections, the method, system specification and system design are presented.

4.1 Method

Prior to any design decisions, a set of system requirements stated in section 4.2.2 werederived in accordance with the company and based on the research questions stated insection 1.3. The aim was to construct a framework for all future system design and to geta clear picture of the important functionality related to the system.

Discussions with the company and an initial background study resulted in the decisionto design a physical system implementation, and a simulation model. The main objectivewith the implementation is to develop a proof-of-concept where the important functional-ity and performance is analyzed.

In order to properly evaluate and to simplify (and extend) the testing of the systembehaviour and performance, and also the dependence of the key system parameters pre-sented in section 5.1, a simulation model was developed. The idea with the simulationmodel is to easily design tests and obtain test results that extend beyond the limitations ofthe physical implementation. The simulation model is mainly intended to provide a viewof the system scalability but is also crucial regarding the monitoring of the key systemparameters and their dependencies on the overall performance.

Page 60: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

38 | Chapter 4. Design and Implementation

The following methodology was applied during the technical work of the thesis:

• Physical Implementation

1. Retrieve knowledge from theoretical study and state of the art research basedon system requirements and research scope

2. Research hardware and software based on system requirements and researchscope

3. Perform experimental development and continuous system integration

4. Iterate and go back to the step 1 when additional knowledge and methods arerequired

5. Analyze system through performance testing and parameter analysis in accor-dance with the stated requirements in section 4.2.2 (see section 5)

• Simulation model

1. Derive knowledge from theoretical study and state of the art research based onsystem requirements and research scope

2. Research simulation software and tools

3. Perform experimental development of the simulation environment in accordancewith the physical implementation

4. Iterate and go back to the step 1 when additional knowledge and methods arerequired

5. Analyze system through performance testing and parameter analysis in accor-dance with the stated requirements in section 4.2.2 (see section 5)

4.2 System Specifications

4.2.1 Military system

The idea of the proposed system concept was a result of the interview in Appendix A andthrough discussions with the company. The system aims to utilize available computationalresources from nearby collaborative devices to wirelessly assist an unmanned military ve-hicle with heavy computer vision and image processing. An overview of the system isdepicted in Figure 4.1 below.

Page 61: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

39 | Chapter 4. Design and Implementation

Figure 4.1: Idle nodes in the network analyze sensor data from the vehicle locally beforereturning the processed data back to the vehicle. All other forms of external communica-tion is avoided in order to prevent the vehicle from giving away its position.

The unmanned vehicle (platform) attempts to aim and point with a laser at a movingobject using computer vision sensing. Consequently, the real-time aiming performance ofthe unmanned vehicle is analyzed. An adaptable MANET is established where the un-manned vehicle allocates image processing tasks to nearby military devices. The objectiveis to receive the processed data in a fast enough pace in order for the vehicle to achievethe best possible precision and aiming performance.

4.2.2 System requirements

To answer the research question: How is the aiming control performance of an unmannedmilitary vehicle using computer vision affected by wireless distribution of the processingtasks to nearby devices? presented in section 1.3, the following system requirements con-sisting of requirements and constraints were defined in accordance with the initial studyand discussion with the company:

1. The platform (master node) shall be able to detect devices in range of the radiosignals and establish a wireless network connection with at least 2 remote slavenodes.

Page 62: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

40 | Chapter 4. Design and Implementation

2. The platform shall be able to distribute image processing tasks to remote slavenodes.

3. The slave nodes shall be able to receive and process raw image data and consequentlyreturn the processed data (the objects position in the frame) to the platform.

4. The platform shall be able to actuate a laser pointer based on the informationreceived from the slave nodes.

5. The platform shall be mobile

6. The platform shall be able to adjust the number nodes to achieve the best possibleperformance with the available set of resources (slave nodes).

7. The platform shall be able to fix the laser at the target object at a distance of upto 5 meters.

8. The platform shall be able to fix the laser at the target object at a distance of 3meters moving up to 50 cm/s.

9. The system shall cost less than 10000 SEK.

The stated requirements were later used as the basis for system design decisions andchoices of hardware and software.

4.2.3 System constraints

A decision was made early on to make the system homogeneous in the sense that allinvolved processing units shall constitute of the same hardware and software. The reasonbeing was to decrease the complexity of the system in order to properly investigate thekey system parameters (section 1.3) given in section 5.

Additionally, the purpose of tracking a hostile object of interest and consequentlyactuating a laser pointer at the object is in the processing of data rather than the type ofobject. Since the type of object was deemed of little importance for the proof-of-conceptsystem, the decision was to use a human face as the object to track.

4.2.4 Unmanned Ground Vehicle

The designed platform is an unmanned ground vehicle and is the master node of theMANET. As for this physical proof-of-concept system, the Rover 5 Robot platform waschosen as the mobile platform. The Rover 5 is a tracked robot chassis developed by DaguElectronics. The platform includes four built in DC-motors, each with its own quadratureencoder. The Rover 5 has the following specifications [50]:

Page 63: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

41 | Chapter 4. Design and Implementation

• Motor rated voltage: 7.2V

• Motor stall current: 2.5A

• Output shaft stall torque: 0.98 Nm

• Gearbox ratio: 86.8:1

• Encoder resolution: 1000 state changes per 3 wheel rotations

• Speed: 1 km/h

• Cost: $ 60

The Rover 5 platform was chosen due to its simplicity, prototyping friendly envi-ronment, and off the shelf functionality. The cost was also a factor where most otheralternatives would have been more expensive.

4.2.5 Hardware Choices

The choice of a hardware platform to be used in a WDC system was based mainly on thefollowing four criteria:

• Wireless capabilities: The simplicity of wireless capabilities and the support ofad hoc functionality.

• CPU The processing capabilities concerning image processing.

• Price: The price in relation to the budget concerning the testing of the systemscalability.

• Community supported development platform: An extensive community withgood documentation and help from similar components of other projects.

A quick background study along with input from company representatives narrowed thechoice down to two popular development platforms, the Raspberry Pi 3 and the Beagle-Bone Black. The two platforms were evaluated based on the selection criteria presentedabove, see Table I below.

The two platforms did not differ much in the actual hardware specification and overallperformance. However, the Raspberry Pi 3 Model B was chosen due to its standalonecharacteristics (no external hardware required to enable wireless ad hoc functionality)making it even less expensive than the current 10 $ dollar difference. The more extensiveRaspberry Pi community as of now (the BeagleBone Black community is growing), was thefinal deciding factor. Due to the homogeneity of the system as described in section 4.2.3,the Raspberry Pi 3 Model B was chosen as the hardware platform for all processing units(master node and slave nodes). The slave nodes in this case, consist of a Raspberry Pi only.

Page 64: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

42 | Chapter 4. Design and Implementation

Table I: Raspberry Pi 3 Model B and BeagleBone Black characteristics ([51],[52])

Evaluation criteria Raspberry Pi 3 Model B BeagleBone Black

Wireless capabilities On board 802.11n, Bluetooth 4.1 Requires external adapterCPU 1.2GHz 4x ARM Cortex-A53 1GHz AM335x ARM Cortex-A8Price $ 35 $ 45Community Large Small

Visual sensor choice

For the visual sensor of the unmanned vehicle, the Raspberry camera module was selecteddue to its compatibility and easy setup with the Raspberry Pi. Other deciding factorswere:

• Size to performance ratio: The size had a major impact on the choice of thevisual sensor due to parameters such as weight and mobility. While small, thecamera module still supports high resolution video and capture (1080p30, 720p60and VGA90) and low light performance [53].

• Third-party libraries: The camera module can be accessed by numerous third-party libraries including the Picamera python library [53] that was utilized.

Motor controller choices

Two factors were important upon the choice of a motor controller; a user friendly develop-ment environment and hardware compatibility. The decision therefore fell on the ArduinoUno as the development board. The board is well documented and has an off the shelffunctionality. For experimental development, and as an overall connection functionality,the support for serial communication was desired.

Upon the choice of the Arduino as the motor controller, a Arduino compatible shield(Ludus Protoshield by SparkFun) was selected as an H-Bridge driver for the motors. Theshield was selected due to its prototyping area for quick integration with the Arduinoboard and connection with motors. The board is integrated with a TB6612FNG H-BridgeDriver and has two channels, each rated up to 1.2A per channel at 13V which is sufficientfor driving the Rover.

4.2.6 Software Choices

The choice of software for all the system components were heavily affected by knowledgewithin the company, overall system compatibility, previous documentation, and being suit-

Page 65: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

43 | Chapter 4. Design and Implementation

able for prototyping and experimental development.

Operating system

As stated previously, all previous work and documentation along with compatibility werethe deciding factor in choosing between available operating systems for the Raspberry Pi3. A quick market survey and and input from the company narrowed down the choice tothe Debian based Raspbian, and Ubuntu Mate. At this point the choice fell at Raspbianconsidering it is the official supported Raspberry Pi operating system where most previousRaspberry Pi related work has been done.

Software components

Initially, structural decisions were made for the software architecture. On a high level, em-phasis was placed on good compatibility between all software components and a languagewith good support for open source libraries and extensions.

The three important software components of the system are;

1. Parallel software

2. Image processing

3. Networking and Communications

Being that MPI is the primary programming standard for enabling parallel programsand node communication in distributed systems, it was decided to use MPI. MPI providesessential synchronization and communication possibilities between nodes.

In the process of choosing an image processing software platform, a quick backgroundstudy related to image processing software on the Raspberry Pi was conducted. As aresult, a Python based OpenCV library was selected due to its compatibility with thehardware and OS, along with the open source functionality.

With a language support for MPI as well, the choice fell on using a Python basedsoftware architecture. The choice was strengthened by the Python based MPI applica-tion mpi4py having supported features and functions with negligible overhead, and beingalmost as fast as complied Fortran, C or C++ codes [54].

4.2.7 Simulation software choice

In the choice of simulation software, focus went towards simulation of task scheduling,code execution timing, and wireless network communication. Along with past experi-ence, the choice fell on the Matlab/Simulink-based simulator for real-time control systemsTrueTime.

Page 66: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

44 | Chapter 4. Design and Implementation

4.3 System Design

The physical proof-of-concept system is meant to provide a deeper understanding andanswers to the research questions stated in section 1.3. The purpose of the designedsystem is to provide insight into the feasibility and possibilities of the proposed system inconjunction with the research questions.

4.3.1 Overall system design

The components of the designed system are:

• Platform: The platform (UGV) is the centralized master node in the network.The UGV constitutes of the Rover platform (see section 4.2.4), the processing unit(Raspberry Pi 3), visual sensor (Raspberry camera module), two servos mounted ona pan/tilt bracket, a laser pointer and the motor controller (Arduino with H-bridgeshield).

• Slave nodes: The n number slave nodes all constitute of a single processing unit(Raspberry Pi 3).

• PC: The PC is an external device in the network for monitoring system parameters,and the camera image (also displaying the processed data in the form of a rectangularframe around the tracked object).

The outline of the system can be seen in Figure 4.2 below:

Figure 4.2: Overall system design.

Page 67: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

45 | Chapter 4. Design and Implementation

4.3.2 Parallel distribution process

The parallel process refers to the distribution of processing tasks performed by the masternode in order to increase the performance of the laser actuation. The idea for the designof the distribution algorithm was based on the hypothesis that the performance of thelaser actuation was mainly dependent on the sample rate of the sensor, i.e. the achievedframe rate of the camera. Thus, the main objective of the distribution algorithm is, to thefurthest extent possible, achieve real-time face detection by achieving the highest possibleupdate rate of the processed data in the form of the tracked objects x and y pixel coordi-nates sent to the motor controller.

The initial idea was to build the algorithm upon segmentation of data, mimickingthe behaviour of a GPU. The Viola-Jones algorithm as presented in Section 3.3.1 usedin this implementation as the object detection algorithm (implemented in OpenCV ascvHaarDetectObjects() implies a set of issues. Segmentation becomes difficult since findingan object requires the entire object to be inside the specific search frame. Also, increasingthe amount of segmentation results in additional overhead.

Figure 4.3: Flowchart of the proposed distribution algorithm.

Based on the initial hypothsis that the performance of the laser actuation is mainlydependent on the sample rate of the sensor, and that the platform is mobile resulting ina constant image motion, lead to a different approach for the design of the distributionalgorithm. In the proposed algorithm, the master node distributes the image framesimmediately after capturing the frame to the current configuration of available slave nodesin the network, see Figure 4.3. When processed image data is received by the master node,the rank (identity) of the slave node from which the data was sent from is saved in order

Page 68: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

46 | Chapter 4. Design and Implementation

for the master node to immediately transmit a new image frame to be processed to thatsame slave. By doing so, the objective is to increase the frequency of which the streamof processed data returns back the the master node by adding more slave nodes to thenetwork.

4.3.3 Node design

Master node

The master node runs a main program with a foreground and background process. Thebackground process is spawned as a subprocess and constitutes of the child management,see section 4.3.4. A 30 second sleep timer indicates when a new network status check isto be initiated to optimize the current network configuration.

Figure 4.4: The foreground process of the master node.

The foreground process constitutes of the data distribution and communication as wellas the camera sensor handling, see Figure 4.4.

Slave node

A slave node is immediately assigned a rank when added to the ad hoc network. When theslave program is initiated, the program is set in a blocking receive state. Upon receptionof data, the received image frame is then decoded before the face detection algorithm is

Page 69: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

47 | Chapter 4. Design and Implementation

run. The resulting processed data is ultimately transmitted back to the master along withthe rank of the slave node. The messages are labeled using the MPI tag functionality inorder to distinguish between the sent messages.

PC to master node communication

In order to drive and send control signals to the Rover, a wireless communication linkbetween a PC (connected as a node in the local ad hoc network) and the Rover RaspberryPi is established using sockets. The Rover Raspberry Pi is established as the client socketwhile the PC in this case is the host and server socket.

The socket communication is a one way communication and only contains drivinginstructions to the Rover in the form of single characters. On the receiving side, the Roverreads from the socket with a certain frequency. In order for the communication to benon-blocking, the setblocking function is passed a zero indicating the non-blocking mode.If the receive function is called and no message is stored in the buffer, an error exceptionis raised. To monitor the captured frames with the resulting processed data, the imageframes with the processed data appended are ultimately distributed to the PC with MPI.

MPI communication methods

Two methods for communication are supported in the MPI for Python library, pickle-basedand direct array data communication of buffer provider objects [54], the latter being usedin this implementation due to its close to C-speed performance. Communication of buffer-provider objects require buffer arguments to function calls to be explicitly specified (sizeand data type).

Page 70: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

48 | Chapter 4. Design and Implementation

4.3.4 Slave node management

A system operating in a dynamic environment needs to address the challenge of handlingand utilizing the variation of available amount of slave nodes over time. The implemen-tation of an optimization algorithm is proposed in order to obtain control over a dynamicsystem that adapts to changes in the network. The algorithm is supposed to provide in-formation that aids the system to obtain an optimal setup based on the current situation.This is aimed to be achieved by introducing software constituting of a protocol for sensing,negotiating, and binding available devices to the parallel distribution process. The slavenode management software is constantly sensing its surroundings for devices that in orout of range of the master node. The basic operations of this program are depicted in thestate diagram below.

Figure 4.5: Child handling software design.

The main focus of the program depicted in Figure 4.5 is to handle the variation ofavailable nodes in the network thus updating its configuration in order to optimize theoverall performance. The first phase of the process searches for devices in range of themaster node with predefined node IDs. The sensed nodes are stored in a list along withtheir set of individual parameters depicted in Table II below.

Table II: Example of a set of network nodes with different individual parameters.

Node ID Signal strength (-dbm) Battery status (%)

1 50 782 3 503 110 304 - -

Page 71: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

49 | Chapter 4. Design and Implementation

Information regarding each nodes ID, signal strength and battery status is collected in thelist. This information is then used to divide the nodes into categories in terms of theirsuitability to contribute to the system as depicted in Table IIIa below.

Table III: Categorization of a set of nodes depending on their individual parameters.

(a) Evaluation

Node ID Signal strength (dbm) Battery status (%) Category

1 50 78 Good2 3 90 Intermediate3 110 10 Poor4 - - Unavailable

(b) Sorting into categories

Good Intermediate Poor Unavailable

1 2 3 4

Intermediate nodes have one parameter out of the accepted span in terms of batterystatus or signal strength making them more likely to drop out of the network than a nodecategorized as good. In terms of a saturated system, the algorithm therefore containsinformation to support decision making on contributing nodes. A poor node does not meetthe standards on any parameter but is still within the range of sensing. An unavailablenode is not sensed at all.

The categorization lists are compared to the lists obtained in the previous search foravailable nodes. If a change of the available nodes is not sensed, the program returnsto sleep mode before a timer initializes a new sensing session. However, if a change isdetected the system immediately transitions into a negotiation phase.

The purpose of the negotiation phase is to compare the updated information aboutthe nodes with the current setup in order to maximize the QoS of the system as a whole.The optimal configuration among the new available nodes is obtained by a look-up tabledepicted below (Table IV) which returns information regarding whether the new detectedset-up will have a better performance than the old set-up or not.

Page 72: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

50 | Chapter 4. Design and Implementation

Table IV: Look-up table

aaaaaaOld

New 1 2 3 4 5 6 7 8 9 >=10

1 False True True True True True True True True True2 False False True True True True True True True True3 False False False True True True True True True True4 False False False False True True True True True True5 False False False False False True True True True True6 False False False False False False True True True True7 False False False False False False False True True True8 False False False False False False False False False False9 False False False False False False False False False False

>=10 False False False False False False False False False FalseUse: 1 2 3 4 5 6 7 8 8 8

If the change to the new configuration would decrease or not affect the overall performanceof the system, the change is neglected and the program returns to sleep mode waiting for anew sensing session. Otherwise the program transitions into its third phase, the Bindingphase. The purpose of the binding phase is to add or remove individual slave nodesfrom the network of contribution slave nodes. Based on the result of the look-up table,a decision is taken regarding which individual nodes should contribute in order to avoidunnecessary saturation of the system. In the case of an unsaturated system, e.g. withseven or less Good nodes, the system is allowed to use Intermediate nodes in order toincrease the performance due to its lower drop-out probability.

Page 73: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

51 | Chapter 4. Design and Implementation

4.3.5 Motor actuation

The purpose of the motor actuation program is to control the four DC-motors and twoservo-motors in order to fix a target identified by the image recognition program in thecentre of the camera frame. Figure 4.6 below depicts a flowchart of the overall process ofthe program.

Figure 4.6: Motor actuation software design.

The top row of Figure 4.6 is known as the initialization phase. During this phase theprogram reads the variables required to initialize the motors safely and creates both phys-ical and virtual connections between the motors and the Arduino. Furthermore, a serialcommunication with the master node is initialized providing the sensor data. The rest ofthe program handles new sensor data from the master node. As the control parametershave been updated according to the new sensor values, the program then returns to asleep mode awaiting a new set of sensor values.

The program primarily consists of two functions which update the control of the servopositions of the pan and tilt servos. The functions take the coordinates of the top-leftcorner and the size of a square containing the target as input. The overall frame size isconstituted by the number of pixels in horizontal and vertical direction counted from thetop-left corner of the frame. The correlation between the frame and the coordinate of anidentified target is depicted in Figure 4.7 below.

Page 74: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

52 | Chapter 4. Design and Implementation

Figure 4.7: Coordinate system of a frame.

As can be seen in Figure 4.7, an identified target that is not completely centered inthe frame results in an error vector. The purpose of the control algorithm is consequentlyto minimize the vector by actuating the motors. The error vector is divided into twovectors containing the error in terms of x and y coordinates respectively. The values ofthe Xcoordinate, Xwidth and Xframesize are utilized as follows:

XError =Xcoordinate + Xwidth

2 − Xframesize

2

P1(4.1)

where P1 is a proportional control parameter. The Xerror is consequently the distancebetween the identified horizontal centre of the target and the horizontal centre of theframe as can be seen in Figure 4.7. A pan servo-motor is set to control the frame in thex-axis. Its mission is to minimize the Xerror thus updating the position of the motor to aimthe camera at the horizontal centre of the target object. The program takes Ycoordinate,Yheight, and Yframesize as inputs to calculate YError:

YError =Ycoordinate +

Yheight

2 − Yframesize

2

P2(4.2)

where P2 is another proportional control parameter. Yerror is used by the tilt servo motor

Page 75: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

53 | Chapter 4. Design and Implementation

to fixate the vertical centre of the face in the vertical centre of the frame. The programtakes Xerror and Yerror and adds or subtracts it from the current pan/tilt positions eachtime new sensor values are updated. A safety application is utilized in both functionswhere if the position of one servo is in the outer bounds of its range and the control signalrequire it to rotate further out of the physical limitations of the motor, it will maintainits positions at the outer bound limits. If this occurs, the UGV will reposition in order toenable the servos to continue target tracking.

4.3.6 Simulation model

The TrueTime simulator has been used to extend and further evaluate the behaviourof the system in accordance with the proposed research. The simulation environmentis developed in Simulink and is built upon the real-time TrueTime Kernel blocks and aTrueTime Wireless Network block. The applications are written in Matlab code (m-files)where the execution of specific tasks are specified by the developer [55].

The TrueTime Kernel block enables the developer to emulate the behaviour of a com-puter with a generic real-time kernel. Each slave node is simulated by a single TrueTimeKernel block with attached Matlab code. The TrueTime Wireless Network block is used tosimulate the dynamics of package transmission in a standard 802.11b/g WLAN affectingall message passing (data transmission) done over the network.

The parameters of importance defined directly as block parameters in the TrueTimeWireless Network block are number of nodes, data rate (bandwidth), minimum framesize, transmit power in dbm, and the pathloss exponent. Since the pathloss exponent isdependent on the distance to each node, the wireless kernel block takes x and y inputs tospecify the true location of the nodes.

The application model is defined using three different types of functions written as m-scripts:

1. Initialization functions: Initialization functions are attached to each kernel block.The type of scheduling system used, along with all data parameters, tasks, handlersand mailboxes (used for inter-task communication) are defined in the initializationfunctions. Each data parameter has to be constructed as structure object (struct) inorder to be passed and used properly in a different function. For each task created,deadlines and the corresponding task priority is defined.

2. Task functions: For each task defined in the initialization functions, a task functionis attached where each execution segment of the task is specified along with theexecution time for that segment. The execution time for each specific segment wasmeasured in the physical proof-of-concept system.

3. Message receive functions: The message receive functions handles data passedover the network and uses mailboxes to post the data to a specific task in need of

Page 76: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

54 | Chapter 4. Design and Implementation

the data. Here, jobs (a method to start running a specific task) are created uponreception of data.

A/D

D/A

Schedule

1: 1

Master RPi

A/D Schedule1: 2

Slave Node 1Master node schedule

Slave node 1 schedule

A/D Schedule1: 3

Slave Node 2

Slave node 2 schedule

1Out1

A/D Schedule1: 4

Slave Node 3

Slave node 3 schedule

A/D Schedule1: 5

Slave Node 4

Slave node 4 schedule

A/D Schedule1: 6

Slave Node 5

Slave node 5 schedule

A/D Schedule1: 7

Slave Node 6

Slave node 6 schedule

A/D Schedule1: 8

Slave Node 7

Slave node 7 schedule

A/D Schedule1: 9

Slave Node 8

Slave node 8 schedule

A/D Schedule1: 10

Slave Node 9

Slave node 9 schedule

A/D Schedule1: 11

Slave Node 10

Slave node 10 schedule

A/D Schedule1: 12

Slave Node 11

Slave node 11 schedule

A/D Schedule1: 13

Slave Node 12

Slave node 12 scheduleA/D Schedule1: 14

Slave Node 13

Slave node 13 schedule

A/D Schedule1: 15

Slave Node 14

Slave node 14 schedule

A/D Schedule1: 16

Slave Node 15

Slave node 15 schedule

A/D Schedule1: 17

Slave Node 16

Slave node 16 schedule

A/D Schedule1: 18

Slave Node 17

Slave node 17 schedule

0 x

ySchedule1

TrueTime Wireless Network

Network Schedule20

Figure 4.8: Setup consisting of a TrueTime Wireless Network kernel and a network with18 network nodes. The darker block is the master node that distributes processing tasksto the n slaves nodes (a maximum of 17 in this configuration).

Simulation setup

The setup adopted for simulating the behaviour of the system is depicted in Figure 4.8.The configuration in Figure 4.8 is represented by 18 network nodes including the masternode (in dark green). For the depicted configuration, the TrueTime Wireless Networkblock inputs the same distance constants for all slave nodes.

Page 77: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

Analysis

The analysis of a wireless distributed system and physical control dynamics imposes a largeset of parameters to be studied. This section will discuss how these key parameters affectthe control performance of the vehicle delay in conjunction with the proposed researchquestions given in section 1.3. The identified system parameters are also used as qualityof service metrics.

5.1 System parameters

The initial analysis lead to the categorization of two classes for quality of service metricsduring the analysis of the control performance, the end-to-end delay and sample rate. Theend-to-end delay is defined as the sum of the following execution delays:

1. Sequential execution time: The sequential execution time is in the system re-ferred to as the execution of tasks performed by the master node. It constitutes ofthe time to capture new image frames from the camera, encode the frame (compress)manage received data, perform serial communication with the motor controller andrun child management.

2. Parallel execution time: The parallel execution time is in the system referredto as the execution of tasks performed by each individual slave node. Due to thehomogeneity of the system, all slave nodes have the same parallel execution time.It constitutes of the time to decode the incoming image frames and the time to runthe image processing algorithm.

3. Total overhead: The definition of the total overhead as stated in section 3.2.1is the sum of time spent by all processors in the system doing work not executedby either the sequential or parallel algorithm. The major component of the totaloverhead is the network latency which is defined as the time required to complete amessage transmission. The choice of network protocol also affects the total overhead.

4. Motor delays: The motor delays refers to the hardware delay of the motor con-troller and is the time delay between the reception of sensor data to the actuation

Page 78: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

56 | Chapter 5. Analysis

of the servos.

The end-to-end delay affects the control performance as a measure of the relevancy ofsensor data. Item 1-3 presented above are the delays mainly being taken into considerationduring analysis of the end-to-end delay.

The sample rate constitutes of the achieved frame rate which is the rate of the incomingprocessed sensor data and ultimately also the rate of the sensor data passed to the motorcontroller. From a control performance perspective, the sample rate is directly related tothe accuracy aspect and is dependant on the execution delays 1-3.

Based on the background study and during the experimental development, the follow-ing composition of key system parameters in Table I have been identified.

Table I: Table depicting the identified system parameters affecting the system controlperformance either through the end-to-end delay or sample rate.

Parameter Description Unit of measurement

Data sizeSize of the captured imageframes

Bytes

Clock rate Processor speed Clock cycles per second (GHz)

BandwidthThe throughput i.e. the rateof successful message deliveryover the wireless network

Bits per second (bit/s)

Number ofslave nodes

The number of connectedslave nodes in the network

Amount (n)

Distance betweennodes

The physical distance betweenthe master node and slave nodes

Meters (m)

The manner in which each system parameter affects the control performance of the UGVwas studied by analyzing its impact on the sequential execution time, parallel executiontime, and total overhead and consequently its impact on the end-to-end delay and samplerate respectively.

5.1.1 Data size and clock rate

The data size was the parameter concluded to have the largest impact on the end-to-enddelay and sample rate by heavily affecting each task execution segment of the systemranging from frame capturing to image processing. The dependencies between data sizeand execution delays are given in Table II.

Page 79: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

57 | Chapter 5. Analysis

Table II: The approximate increase in time delay resulting from doubling the framedimensions (n∗m pixels). As illustrated, the sequential execution time and total overheadincrease in a linear fashion while the parallel execution time increases exponentially. Thetime delays were obtained by measuring the execution times of the different segments ofthe program.

Delay type 320x240 640x480 Time increase factor

Sequential execution time 35 ms 80 ms 2Parallel execution time 90 ms 400 ms 22

Total overhead 65 ms 125 ms 2

For future analysis, a fixed data size was specified in accordance with requirement 7.in section 4.2.2. The chosen image size was set to a resolution of 640x480 giving a rawdata size of 307200 bytes, being the minimum measured data size required to achieve atracking distance of 5 m.

The impact of the clock rate is directly related to the sequential and parallel executiontimes and consequently also the sample rate and end-to-end delay. For future analysiskept constant and given the value 1.2GHz which is the clock rate of the Raspberry Pi 3.

5.1.2 Bandwidth

The bandwidth is analyzed relative to the total overhead through the network latency. InFigure 5.1 below, the frame transmission time which is dependant on the bandwidth andthe size of the image frame can be seen in proportion to the sequential execution time.

In addition to the transmission time, a drop in bandwidth is also one of the main issuesin the context of distance between nodes, see Figure 5.5.

5.2 Node Utilization

Analysis of the variation of node quantity with the proposed distribution algorithm pre-sented in Figure 4.3 lead to the conclusion that the number of nodes only affect theoutcome of the achieved sample rate. The node utilization was researched by comparingthree different deployment scenarios.

As a comparison, a frame rate test was conducted where no data distribution wasutilized. Hence, the image processing was run on the vehicle itself. This resulted in aframe rate of approximately 2.1 FPS. An initial simulation was conducted to simulate thecorresponding network traffic in TrueTime, see Figure 5.2.

Page 80: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

58 | Chapter 5. Analysis

Figure 5.1: The bandwidth along with the data size, affects the transmission time andadds to the total overhead. The frame transmission runs in parallel with the sequentialtask execution and does not add to the sequential execution time as long as the frametransmission is shorter than the sequential execution.

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8

Time (s)

1

1.5

2

2.5

3

3.5

4

4.5

5

5.5

No

de ID

Network traffic

Master

Slave 1

Slave 2

Slave 3

Slave 4

Figure 5.2: Simulation of system network traffic with four connected slave nodes.

Page 81: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

59 | Chapter 5. Analysis

Figure 5.2 illustrates that the master node is not fully utilized with four connected slavenodes. At approximately 0.33 seconds, a pause in the network traffic occurs since all avail-able slave nodes are occupied still processing image data. The master node consequentlyis idle waiting since no additional slave nodes exist in the network. Then master node thenhas to await further processed data to arrive before a new distribution of data can occur.This particular setup (4 slave nodes) results in a simulated frame rate of approximately6.6 FPS.

When additional slave nodes are added to the network, the network activity of themaster node as well as the frame rate increase. The corresponding network traffic of eightslave nodes is depicted in Figure 5.3.

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Time (s)

1

2

3

4

5

6

7

8

9

10

No

de

ID

Network traffic

Figure 5.3: Simulation of system network traffic with eight connected slave nodes.

Figure 5.3 illustrates that no pauses occur in the network traffic of the master node.The resulting frame rate is approximately 12.4 FPS. The third deployment is simulatedby letting 23 slave nodes connect to the network. The resulting network traffic is depictedin the Figure 5.4.

As illustrated, the network traffic of the master node is not affected by the additionalcontributing slave nodes. The frame rate is still approximately 12.4, however, the utiliza-tion of each individual slave node has decreased.

5.2.1 Distance between nodes

One of the most crucial analyzed aspects of WDC compared to a non wireless system is theimpact caused by the distance in between nodes. To measure the real drop in bandwidth

Page 82: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

60 | Chapter 5. Analysis

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2

Time (s)

0

5

10

15

20

25

No

de

ID

Network traffic

Figure 5.4: Simulation of system network traffic with 23 connected slave nodes.

due to an increase in distance on the demonstrator, the tool iPerf [56] was used betweentwo Raspberry Pi’s. In Figure 5.5, the corresponding bandwidth relative to the distanceis depicted.

1 2 3 4 5 6 7 8 9 10

Distance (m)

0

5

10

15

20

25

30

Ba

nd

wid

th (

Mb

it/s

)

Demonstrator Bandwidth

Figure 5.5: The drop in network bandwidth of the demonstrator system as a functionof distance between two nodes.

Page 83: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

61 | Chapter 5. Analysis

As described in section 2.1, the environment is a factor that needs to be addressed indesigning a system for soldiers. Depending on the thickness of the obstacles surroundingthe devices, a certain increase in package-loss probability occurs. Therefore, measurementswere conducted in order to simulate an environment filled with obstacles such as trees andstones. The resulting network traffic is depicted in the Figure 5.6.

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Time (s)

1

1.5

2

2.5

3

3.5

4

4.5

5

5.5

No

de

ID

Network traffic

Figure 5.6: Simulation of network traffic in surroundings with a high degree of obstacles.

The package loss generates retransmissions that increases network latency and thus theend-to-end delay of the system as illustrated in Figure 5.6. Another implication is thepower consumption which also will increase due to the power consuming retransmissions.

5.2.2 Resilience and Redundancy

The adaptability of the system was simulated by letting a set of slave nodes end up out ofrange by increasing the their distance to the master node. The dropping of nodes resultsin a number of retransmissions before the system retakes control of the task distribution.A tendency of self-healing can thereafter be observed at approximately 6.5 seconds. Thisresults in an increased utilization of the remaining contributing nodes. The phenomenonis further illustrated in Figure 5.7:

Page 84: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

62 | Chapter 5. Analysis

Figure 5.7: Simulation of system network traffic with losses of nodes.

0 2 4 6 8 10 12 14 16 18 20

Time (s)

0

2

4

6

8

10

12

14

16

18

No

de

ID

0

2

4

6

8

10

12

14

Fra

me

rate

(F

PS

)

Network traffic and Performance

Figure 5.8: Performance of system versus loss of nodes.

Figure 5.8 simulates three phases of a deployment scenario where a number of nodes

Page 85: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

63 | Chapter 5. Analysis

drop out after five and eight seconds respectively. Moreover, not only the network trafficbut also the resulting frame rate of the system is depicted. In the initial phase, the systemis saturated i.e. the master node constitute the bottleneck of the system and thus thehighest possible increase of frame rate from adding additional slave nodes is achieved. Asthe first set of nodes drop out of the network, the systems starts to adapt to the newconfiguration of available slave nodes. As illustrated at this point, the utilization of eachslave node occurs more frequently but the system still manages to maintain the same framerate. However, as the second set of slave nodes drop out of the network, it can no longermaintain the optimal frame rate which is reflected by the activity of the master node.Figure 5.8 illustrates the three basic deployment scenarios of the system where the masternode initially is the limiting factor and thereafter optimally utilized and thus finally nolonger constituting the bottleneck of the system.

Page 86: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

64 | Chapter 5. Analysis

Page 87: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

Results

This chapter summarizes and presents the findings from the simulation model and theresulting proof-of-concept system. The sample rate and end-to-end delay are used as thetwo main categories of quality of service metrics regarding the aiming performance of theUGV.

6.1 Sample rate

6.1.1 Simulation

The simulation of the obtained frame rate in relation to number of nodes gives an indica-tion of the potential speedup and scalability as a result of implementing WDC using theproposed distribution algorithm presented in Figure 4.3. The resulting simulated samplerate (obtained frame rate) in relation to the amount of slave nodes is given in Figure 6.1.

Speedup

The potential speedup S is given by the increase in frame rate (as a result of implementingWDC) in relation to the frame rate obtained by a single device performing the imageprocessing single-handed is given by:

S =FramerateparallelFrameratesingle

=12.4

2.1= 5.9 (6.1)

Efficiency

The resulting efficiency (see section 3.2.1) defined as the ratio between the speedup S andthe corresponding number of processors p is given by:

E =S

p=

5.9

8= 74% (6.2)

Page 88: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

66 | Chapter 6. Results

0 5 10 15

Number of Slave Nodes

0

2

4

6

8

10

12

14

Fra

me r

ate

(F

PS

)

Simulation frame rate

Simulation

Figure 6.1: Simulated system performance in terms of sample rate in relation to numberof nodes

6.1.2 Demonstrator

The measured frame rates of the demonstrator system is given by Table I and is comparedto the simulated results in Figure 6.2

Table I: The measured frame rate relative to number of slave nodes.

Number of slave nodes System frame rate

1 1.562 3.023 5.724 7.31

6.2 End-to-end delay

For the proposed distribution algorithm, the end-to-end delay E2E is given by the sum ofthe sequential execution time Ts, parallel execution time Tp and the total overhead To.

Page 89: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

67 | Chapter 6. Results

0 5 10 15

Number of Slave Nodes

0

2

4

6

8

10

12

14

Fra

me

ra

te (

FP

S)

Simulation vs Demonstrator frame rate

Simulation

Demonstrator

Figure 6.2: The resulting achieved frame rate of the demonstrator system (with a maxi-mum of four available slave nodes due to the budget constraints presented in section 4.2.2)is compared to the simulated frame rate of the system in relation to number of slave nodes.

Table II: The three measured components of the end-to-end delay.

Task segments Sequential execution time (ms)

Capture and encode image frame 65Perform serial communication 5Handle received processed data 11Total: 81

Task segments Parallel execution time (ms)

Decode received image frame 75Process image frame 370Total: 445

Delay component Total overhead (ms)

Network latency (transmission (image frame)+ protocol delays)

125

Network latency (transmission (processedimage data information) + protocol delays)

25

Total: 150

Page 90: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

68 | Chapter 6. Results

Their respective time segments and delay components are given in Table II.

Hence, the resulting end-to-end delay is given by:

E2E = Ts + Tp + To = 676ms (6.3)

6.3 Accuracy and precision

The resulting control performance of the demonstrator when implementing WDC has thefollowing characteristics:

• Steady state: The steady state aiming accuracy at a stationary target has anerror of approximately 5%. This was a result of the object tracking having issuesproperly fixating at an object due to the relevancy of the sensor data. The largerthe end-to-end delay, the larger the steady state error.

• Following a moving target: With the achieved increase in sample rate, the abilityto follow the trajectory of a moving target was greatly increased. However, fixatingthe laser at the object is not possible due to the constant end-to-end delay.

6.4 Fulfilment of Requirements

Requirements

1. The platform (master node) shall be able to detect devices in range of the radiosignals (neighbour discovery) and establish a wireless network connection with atleast 2 remote slave nodes.

2. The platform shall be able to distribute image processing tasks to remote slavenodes.

3. The slave nodes shall be able to receive and process raw image data and consequentlyreturn the processed data (the objects position in the frame) to the platform.

4. The platform shall be able to actuate a laser pointer based on the informationreceived from the slave nodes.

5. The platform shall be mobile

6. The platform shall be able to adjust the number nodes to achieve the best possibleperformance with the available set of resources (slave nodes).

Page 91: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

69 | Chapter 6. Results

7. The platform shall be able to fix the laser at the target object at a distance of upto 5 meters.

8. The platform shall be able to fix the laser at the target object at a distance of 3meters moving up to 50 cm/s.

9. The system shall cost less than 10000 SEK.

Table III: Fulfillment of requirements.

Requirements Fulfilled Comment

1. A minimum of 4 have been verified.

2.

3.

4.

5.

6. With child management, see section.

7.This requirement was fulfilled by selectinga sufficiently large image frame size of 640x480.

8. No, end-to-end delay has yet to be reduced.

9.

Page 92: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

70 | Chapter 6. Results

Page 93: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

Discussion

This chapter will discuss the results and analysis and present an evaluation of the resultsin the application context.

7.1 Hypothesis revisited

The hypothesis that the control performance of the designed system can be analyzed asa problem consisting of the components sample rate and end-to-end delay turned out tobe an interesting classification for several reasons. The sample rate has a clear impacton the control performance when following a moving target. Depending on the real-time requirements on the systems ability to follow a moving target, an end-to-end delaywill make a good control performance impaired by reducing the relevancy of the sensorinformation. Thus, the control performance has to be regarded as a trade-off between thetwo during the design phase. This was the main cause why the designed system failed tofulfill requirement 8, see section 4.2.2.

Analysis of the key technical parameters presented in section 5.1 provides relevantinformation during the design phase as they are tightly coupled with both the samplerate and end-to-end delay. If related to the different time delays (sequential executiontime, parallel execution time and total overhead), one can easily determine many of thelimitations on the system in correlation with the control performance.

From a WDC perspective when designing a control system with computer vision, it isimportant to be aware of the additional delays that will be introduced mainly in termsof overhead delays. As stated in [17] and [18], a research question that is fundamental inWDC is the trade-off between distributed and local processing with regard to the specificoperational goals such the minimization of power, energy and time, and the maximizationof reliability in processing computational tasks of a specific application. For the designeddemonstrator, the total overhead constitutes approximately 22% of the entire end-to-enddelay. If required to increase either the sample rate or the end-to-end delay, a trade-offmost probably has to be done in order to get the desired performance in relation to avail-able resources and requirements. For example, it might not be profitable to extend anexisting system with WDC in order to enhance the control performance if the delays due

Page 94: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

72 | Chapter 7. Discussion

to the parallel execution time will result in an end-to-end delay that is too large. Anotherexample is if the total overhead introduced by WDC is larger than the parallel executiontime. In that case, the gain from executing in parallel will be small in relation to thedrawbacks in control performance.

The application context is also crucial during the design phase. If the slave nodeshave a tendency to move around a lot, both the distance between the nodes and the riskof dropping nodes will impact the system. If the distance parameter is not included inthe analysis, a proper view of the network latency and hence the total overhead is hardto achieve. A high variation of active nodes will also result in a high variety in controlperformance. Another example could be a harsh environment with many obstacles thatmight result in a higher drop rate of nodes and additional network latency.

Another aspect of WDC is the importance of good management of slave nodes inorder to fully utilize the available resources optimally and efficiently. Implementing childmanagement turned out to be difficult to execute efficiently in reality. This is concludedto be one of the key components in order to obtain good efficiency in terms of slave nodeutilization.

7.1.1 Performance evaluation

With the proposed distribution algorithm presented in section 4.3.2, the maximum sim-ulated speedup due to the parallelization of the system is approximately 5.9 times. Theresulting speedup can be compared to a theoretical speedup given by Amdahl’s law [32]which is approximately 5.6 (the law does not take the total overhead in to account). Sincethe law does not take the overhead in to account, the resulting speedup using the proposeddistribution algorithm can be deemed more than satisfactory disregarding the end-to-enddelay.

Though the designed proof-of-concept system was deemed to provide a good amountof information in the answering of the research questions, the different design choices canbe revisited in order to achieve even better system performance. For example, usuallyembedded development is not written in Python due to the lack in speed compared to Cfor instance. One might also revisit the choice of object detection algorithms. Perhaps, thiswould have given a different view on the performance and hence feasibility and applicabilityof the system.

7.2 Context evaluation

This thesis has investigated whether the concept Internet of Things and WDC could beapplied to a military context. The research has demonstrated that there are challenges inmilitary applications which can be at least partially solved by introducing these concepts.

Page 95: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

73 | Chapter 7. Discussion

As warfare increasingly depends on technical solutions to introduce advantages over op-ponents, the communication between different devices need to be addressed. Moreover,smart utilization of existing resources could also help increase the performance of mili-tary units. This section will address and discuss the proposed system from an ethical,economical and sustainable context.

7.2.1 Ethical evaluation

The ethical aspects of this thesis project is of course of great importance. The field ofmilitary research must always be grounded in a substantial and thorough ethical analy-sis. Therefore, such an analysis were made before the start of the research. The mainconclusion of that analysis can be found in section 1.7. The system that was developedas a pre-study and proof-of-concept aims to constitute an alternative solution for decisionmakers in order to reduce the risk for human lives. Of course, one could argue that thewhole industry of military technology and weapons development is per definition unethicalsince the overall goal of its existence is to enhance abilities in warfare which equal terriblelosses of human lives and property. However, under the assumption that there alreadyexists a weapon system that is approved and used in warfare, the performed research aimsto make it more ethical by replacing property in the line of fire instead of humans. More-over, the conducted research does not aim to develop a weapon but rather lowering theamount of people that needs to be put in risk.

7.2.2 Economical evaluation

The economical aspects of this thesis project are interesting from a philosophical perspec-tive. The question addressing if one can measure human lives in money is raised ratherquickly. The conclusion thereof would color the rest of the analysis conducted. Dependingon the cultural background and the individual beliefs of the analyst, different conclu-sions would be drawn under normal circumstances. By adding the context of warfare theproblem formulation complexity is increased even further.

This discussion will not address whether a world could exist without any wars assumingthat warfare will exist in the future. Therefore, two alternative conclusions can be drawn,either that a human life is invaluable or that it can be priced. Based on the assumptionthat a human life is invaluable, one could argue that wars will exist and that the conclusionmust be drawn that every possible effort must be made to reduce the risk for human lives.In that perspective, the system would be appropriate both ethically and economicallyregardless what the developments costs would be.

Based on the assumption that a human life can be priced, the analysis again becomesmore complex. In this case, a trade-off between variables come into play. This discussionwill not make a further analysis on a thorough economical framework for military invest-

Page 96: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

74 | Chapter 7. Discussion

ments since that falls out of the scope of this thesis. Given the fact that such an analysisis being conducted, the price of the system will be one of the parameters. Therefore, oneof the aims of our development have been to reduce the costs of the prototype, thus givingit a higher chance of being invested in.

7.2.3 Sustainability evaluation

Sustainability needs to be addressed as a natural parameter of every step during systemdevelopment. Due to the chosen application being military, it can be argued that metricsof sustainability, i.e. product life cycle analysis, cannot fully comprehend the complexityof the product. Special conditions apply to warfare that can not be compared to normalcircumstances. The sustainability of a product in terms of environmental effects duringdevelopment, production and recycling might be argued to have lesser impact than duringits deployment. Nevertheless, the design choices of the thesis have been aiming to besustainable, i.e. simulations were made instead of using to many Raspberry Pi’s.

This project has aimed to explore whether the utilization of nearby devices can improvethe performance of a UGV. However, at a broader perspective, the technology which thethesis has resulted in can be used in other contexts as well, for example in IoT. Bylocally utilizing a higher density of connected devices which has been predicted in thefuture, this technology could provide possible effects in terms of sustainability in thecontext of IoT. The increased amount of connected devices will put higher demands onboth throughput of future communication networks and cloud services. The proposedsystem of local adaptive wireless distributed computing networks could contribute to ahigher sustainability. By utilizing the local resource pool of processing power, the need forexternal cloud services and network traffic through built infrastructure would decrease.This way, a higher sustainability is achieved by a smarter utilization of resources ratherthan building infrastructure for unnecessary Internet traffic.

7.3 Method evaluation

The choice to simultaneously experimentally develop a physical proof-of-concept systemand a simulation model turned out to be successful for several reasons. The simulationmodel and demonstrator provided useful information along the design phase to each otherrespectively. Additionally, the simulation model provided a more theoretical view on theproblem which was an important aspect of the research. The physical proof-of-conceptsystem mainly functioned as a tool to verify the solutions, and to give a clear indicationon the actual control performance in a manner that the simulation model did not.

Page 97: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

Conclusion

The wireless aspect of distributed computing introduces new possibilities, but also putsadditional constraints and requirements on a system. The ability to adaptively add newresources to a local network depending on the local availability of resources introduces aninteresting dynamic aspect. As demonstrated by the results, just by having an availableset of resources nearby has the ability to boost the performance of a system many times.

In terms of the challenge of reducing risks for human lives during fire-control missions,the research is not extensive enough to demonstrate a UGV´s ability to take over riskymilitary operations, but demonstrates an improvement in real-time object detection interms of the laser aiming aspect of military fire-control. The realization of a full systemwould require a lot of further development and would have to seriously address the ethicalaspects which have been discussed in this thesis and has aimed to provide decision makerswith a more ethical solution. The proposed technology can in a broader perspective alsobe applied in an Internet of Things context. The idea of a local computational resourcepools of idle devices can add to a more sustainable utilization of in IoT since it couldreduce the demand of infrastructure.

When reflecting over the research questions, the results show a clear dependence be-tween sample rate and end-to-end delay in a mobile wireless distributed computing system.When designing such a system, clear specifications of the requirements are necessary todetermine the technical constraints in terms of sample rate and end-to-end delay in orderto achieve the desired control performance. The ability to reflect over the applicationscenario is key during the design phase considering the resulting impact of the technicalparameters on the system.

Page 98: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

76 | Chapter 8. Conclusion

Page 99: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

Future Work

The thesis project has aimed to conduct a pre-study and proof-of-concept for an adaptivewireless distributed computing network within the application context of military firecontrol. This chapter will suggest future research objectives that have been identifiedduring the finalization of the project. Primarily, four main topics for future developmentof the system have been identified. These topics are system protection in terms of resilienceto outer threats, overall system development in terms of incremental steps to a full scalesystem, image partitioning, and node diversity management in order to investigate whethera more generalized system can be developed that can utilize a greater variety of devices.

9.1 System protection

Military systems need to be robust and resilient to external threats. Due to the scope ofthis thesis, these parts of the system have been kept to an absolute minimum. In order tobring the suggested system to active service in the military, further work needs to coverthe following aspects of system protection:

1. Secure encryption

2. Robustness to jamming

3. Low profile high performance communication links

Secure data and robustness to the enemy’s capability to jam technical systems are ofcritical importance in this type of system. In terms of detection avoidance, future workneeds to address directed communication technologies or means of reducing the risk ofenemy eavesdropping and triangulation. By obtaining communication that is both hardto detect and hard to decrypt, the designers increase the survival probabilities of thesoldiers during combat missions.

Page 100: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

78 | Chapter 9. Future Work

9.2 Incremental system development and testing

The demonstrator has constituted a proof-of-concept in order to give initial feedback andchallenges. However, additional research needs to be conducted in order to obtain a systemready for deployment. A few of the most important areas that need to be addressed are:

1. Full scale physical system

2. Full scale UGV

3. Power consumption reduction

4. UAV based system

An obvious future work would be to verify the simulation results in a full scale physicalnetwork consisting of > 20 devices. A small scale industrial laser pointer was used tosimulate a military laser. Due to timing and cost constraints, a small low-cost UGV wasdesigned. Future work will address designing a full scale UGV based on the conclusionsmade from the testing of the pre-study UGV.

9.3 Image partitioning

The largest component and thus the main contributor to the end-to-end delay is theparallel execution time performed by each slave node. This particular time delay is heavilydependant on the size of each image frame i.e. the size of the data to be processed. Inorder to decrease this delay without diminishing the information in each image frame,smart algorithms have to be applied. Future work would include investigating intelligentalgorithms and methods such as machine learning and optical flow in order to predict wherea potential target is located in the image frame based on past information. This way, just aportion of the image frame is potentially required to be transmitted and processed, greatlyreducing transmission time and processing time. Several authors [57][58] have presentedmeans for these particular techniques.

9.4 Node diversity generalization

As simulations and real-world testing have confirmed, additional efforts need to addressthe commercialization of such system. A commercialization of this technology would notonly apply to military applications. In this context, further research would cover:

1. Heterogeneous devices

2. Local resource pooling

Page 101: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

79 | Chapter 9. Future Work

3. Decentralization

An interesting approach that can be researched further lies within the heterogeneity ofslave nodes. Technology that can connect to, and utilize the processing power of a widervariety of devices could result in local resource pooling of IoT-devices. By reducing theoverhead software needed to obtain a WDC network, focusing on handling the additionalprocessing cores as the masters own utilization can be achieved for larger diversity ofdevices.

Decentralizing the system will be a step towards a more dynamic system in appli-cations and environments that don’t have a clear master node in the same sense. Theapplication context could be an environment where multiple nearby devices would benefitfrom processing task allocations depending on which device require assistance at a specifictime.

Page 102: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

80 | Chapter 9. Future Work

Page 103: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

Bibliography

[1] Y. K. Chen. “Challenges and opportunities of internet of things”. In: Design Au-tomation Conference (ASP-DAC), 2012 17th Asia and South Pacific. Jan. 2012,pp. 383–388.

[2] G. Kortuem et al. “Smart objects as building blocks for the Internet of things”. In:Internet Computing, IEEE 14.1 (Jan. 2010), pp. 44–51.

[3] Miao Wu et al. “Research on the architecture of Internet of Things”. In: AdvancedComputer Theory and Engineering (ICACTE), 2010 3rd International Conferenceon. Vol. 5. Aug. 2010,

[4] I.F. Akyildiz et al. “A survey on sensor networks”. In: Communications Magazine,IEEE 40.8 (Aug. 2002), pp. 102–114.

[5] Thomas Skjødeberg Toftegaard. “Next Generation Wireless Infrastructure”. In: Wire-less Personal Communications 53.3 (2010), pp. 465–479.

[6] M. Aazam and Eui-Nam Huh. “Fog Computing and Smart Gateway Based Commu-nication for Cloud of Things”. In: Future Internet of Things and Cloud (FiCloud),2014 International Conference on. Aug. 2014, pp. 464–470.

[7] Flavio Bonomi et al. “Fog Computing and Its Role in the Internet of Things”. In:Proceedings of the First Edition of the MCC Workshop on Mobile Cloud Computing.MCC ’12. Helsinki, Finland: ACM, 2012, pp. 13–16.

[8] Luigi Atzori, Antonio Iera, and Giacomo Morabito. “The Internet of Things: Asurvey”. In: Computer Networks 54.15 (2010), pp. 2787–2805. issn: 1389-1286. doi:http://dx.doi.org/10.1016/j.comnet.2010.05.010. url: http://www.

sciencedirect.com/science/article/pii/S1389128610001568.

[9] Jayavardhana Gubbi et al. “Internet of Things (IoT): A vision, architectural ele-ments, and future directions”. In: Future Generation Computer Systems 29.7 (2013).Including Special sections: Cyber-enabled Distributed Computing for UbiquitousCloud and Network Services amp; Cloud Computing and Scientific Applications —Big Data, Scalable Analytics, and Beyond, pp. 1645–1660. issn: 0167-739X. doi:http://dx.doi.org/10.1016/j.future.2013.01.010. url: http://www.

sciencedirect.com/science/article/pii/S0167739X13000241.

Page 104: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

Bibliography

[10] P. C. Reddy. “New Routing Metrics for ADHOC Network Routing Protocols”. In:Journal of The Institution of Engineers (India): Series B 95.4 (2014), pp. 351–361.issn: 2250-2114. doi: 10.1007/s40031-014-0116-x. url: http://dx.doi.org/10.1007/s40031-014-0116-x.

[11] Ratish Agarwal, Roopam Gupta, and Mahesh Motwani. “Performance optimisationthrough EPT-WBC in mobile ad hoc networks”. In: International Journal of Elec-tronics 103.3 (2016), pp. 355–371.

[12] S. G. Pease, I. W. Phillips, and L. Guan. “Adaptive Intelligent Middleware Archi-tecture for Mobile Real-Time Communications”. In: IEEE Transactions on MobileComputing 15.3 (Mar. 2016), pp. 572–585. issn: 1536-1233.

[13] Ian F. Akyildiz and Xudong Wang. “Introduction”. In: Wireless Mesh Networks.John Wiley Sons, Ltd, 2009, pp. 1–15. isbn: 9780470059616. doi: 10 . 1002 /

9780470059616.ch1. url: http://dx.doi.org/10.1002/9780470059616.ch1.

[14] Alan Oliveira de Sa, Nadia Nedjah, and Luiza de Macedo Mourelle. “Distributedefficient localization in swarm robotics using Min–Max and Particle Swarm Opti-mization”. In: Expert Systems with Applications 50 (2016), pp. 55–65. issn: 0957-4174. doi: http://dx.doi.org/10.1016/j.eswa.2015.12.007. url: http://www.sciencedirect.com/science/article/pii/S095741741500809X.

[15] Wen-Tsai Sung and Ming-Han Tsai. “Data fusion of multi-sensor for {IOT} precisemeasurement based on improved {PSO} algorithms”. In: Computers Mathematicswith Applications 64.5 (2012). Advanced Technologies in Computer, Consumer andControl, pp. 1450–1461. issn: 0898-1221. doi: http://dx.doi.org/10.1016/j.camwa.2012.03.092. url: http://www.sciencedirect.com/science/article/pii/S0898122112002970.

[16] Y. Charfi, N. Wakamiya, and M. Murata. “Challenging issues in visual sensor net-works”. In: IEEE Wireless Communications 16.2 (2009). cited By 88, pp. 44–49.

[17] Dinesh Datla et al. “Wireless distributed computing: a survey of research challenges”.In: Communications Magazine, IEEE 50.1 (2012), pp. 144–152.

[18] Dinesh Datla et al. “Task allocation and scheduling in wireless distributed comput-ing networks”. In: Analog Integrated Circuits and Signal Processing 69.2-3 (2011),pp. 341–353.

[19] Mounir Frikha. “Introduction to Ad Hoc Networks”. In: Ad Hoc Networks. John Wi-ley Sons, Inc., 2013, pp. 1–22. isbn: 9781118557747. doi: 10.1002/9781118557747.ch1. url: http://dx.doi.org/10.1002/9781118557747.ch1.

[20] Santanu Santra and Pinaki Pratim Acharjya. “A Study And Analysis on ComputerNetwork Topology For Data Communication”. In: International Journal of EmergingTechnology and Advanced Engineering 3.1 (Jan. 2013), pp. 522–525.

Page 105: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

Bibliography

[21] Y. Li et al. “Research based on OSI model”. In: Communication Software and Net-works (ICCSN), 2011 IEEE 3rd International Conference on. May 2011, pp. 554–557. doi: 10.1109/ICCSN.2011.6014631.

[22] Mohammed M. Alani. “Guide to OSI and TCP/IP Models”. In: Cham: SpringerInternational Publishing, 2014. Chap. OSI Model, pp. 5–17. isbn: 978-3-319-05152-9. doi: 10.1007/978-3-319-05152-9_2. url: http://dx.doi.org/10.1007/978-3-319-05152-9_2.

[23] Gilbert Held. “Representative Standards Organizations: the OSI Reference Model”.In: Understanding Data Communications. John Wiley Sons, Ltd, 2001, pp. 159–181.isbn: 9780470841488. doi: 10.1002/0470841486.ch6. url: http://dx.doi.org/10.1002/0470841486.ch6.

[24] Mounir Frikha. “Quality of Service in MANETs”. In: Ad Hoc Networks. John WileySons, Inc., 2013, pp. 89–114. isbn: 9781118557747. doi: 10.1002/9781118557747.ch4. url: http://dx.doi.org/10.1002/9781118557747.ch4.

[25] X. Perez-Costa and D. Camps-Mur. “IEEE 802.11E QoS and power saving featuresoverview and analysis of combined performance [Accepted from Open Call]”. In:IEEE Wireless Communications 17.4 (Aug. 2010), pp. 88–96. issn: 1536-1284. doi:10.1109/MWC.2010.5547926.

[26] Ulf Korner et al. “A distributed MAC scheme to achieve QoS in ad hoc networks”. In:annals of telecommunications - annales des telecommunications 66.9 (2011), pp. 491–500. issn: 1958-9395. doi: 10.1007/s12243-010-0209-8. url: http://dx.doi.org/10.1007/s12243-010-0209-8.

[27] George F. Elmasry. “MAC and Network Layers in Tactical Networks”. In: TacticalWireless Communications and Networks. John Wiley Sons, Ltd, 2012, pp. 83–110.isbn: 9781118445983. doi: 10.1002/9781118445983.ch4. url: http://dx.doi.org/10.1002/9781118445983.ch4.

[28] Jengchung V. Chen et al. “Improving network congestion: A RED-based FuzzyPIDapproach”. In: Computer Standards Interfaces 34.5 (2012), pp. 426–438. issn: 0920-5489. doi: http://dx.doi.org/10.1016/j.csi.2012.02.002. url: http:

//www.sciencedirect.com/science/article/pii/S092054891200044X.

[29] Panagiotis Vlacheas et al. “Towards end-to-end network resilience”. In: InternationalJournal of Critical Infrastructure Protection 6.3–4 (2013), pp. 159–178. issn: 1874-5482. doi: http://dx.doi.org/10.1016/j.ijcip.2013.08.004. url: http://www.sciencedirect.com/science/article/pii/S1874548213000449.

[30] Ning Ding et al. “Characterizing and Modeling the Impact of Wireless Signal Strengthon Smartphone Battery Drain”. In: SIGMETRICS Perform. Eval. Rev. 41.1 (June2013), pp. 29–40. issn: 0163-5999. doi: 10.1145/2494232.2466586. url: http://doi.acm.org.focus.lib.kth.se/10.1145/2494232.2466586.

Page 106: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

Bibliography

[31] Oswald Jumira and Sherali Zeadally. “Energy Efficiency in Wireless Ad Hoc Net-works”. In: Energy Efficiency in Wireless Networks. John Wiley Sons, Inc., 2013,pp. 17–36. isbn: 9781118579954. doi: 10.1002/9781118579954.ch2. url: http://dx.doi.org/10.1002/9781118579954.ch2.

[32] Alaa Ismail Elnashar. “To parallelize or not to parallelize, speed up issue”. In: arXivpreprint arXiv:1103.5616 (2011).

[33] John L. Gustafson. “Reevaluating Amdahl’s Law”. In: Commun. ACM 31.5 (May1988), pp. 532–533. issn: 0001-0782. doi: 10 . 1145 / 42411 . 42415. url: http :

//doi.acm.org/10.1145/42411.42415.

[34] Michael D McCool, Arch D Robison, and James Reinders. Structured parallel pro-gramming: patterns for efficient computation. Elsevier, 2012.

[35] Ananth Y Grama, Anshul Gupta, and Vipin Kumar. “Isoefficiency: Measuring thescalability of parallel algorithms and architectures”. In: IEEE concurrency 3 (1993),pp. 12–21.

[36] H. El-Rewini and M. Abd-El-Barr. Advanced Computer Architecture and ParallelProcessing. Wiley Series on Parallel and Distributed Computing. Wiley, 2005. isbn:9780471478393. url: https://books.google.se/books?id=7JB-u6D5Q7kC.

[37] Michael Jurczyk, Howard Jay Siegel, and Craig Stunkel. “Interconnection Networksfor Parallel Computers”. In: Wiley Encyclopedia of Electrical and Electronics Engi-neering (1998).

[38] Eshrat Arjomandi, Michael J Fischer, and Nancy A Lynch. “Efficiency of syn-chronous versus asynchronous distributed systems”. In: Journal of the ACM (JACM)30.3 (1983), pp. 449–456.

[39] Martin Weik. Fiber optics standard dictionary. Springer Science & Business Media,2012, p. 718.

[40] N. Sadashiv and S. M. D. Kumar. “Cluster, grid and cloud computing: A detailedcomparison”. In: Computer Science Education (ICCSE), 2011 6th InternationalConference on. Aug. 2011, pp. 477–482. doi: 10.1109/ICCSE.2011.6028683.

[41] Joshua Kiepert. “Creating a raspberry pi-based beowulf cluster”. In: Boise State(2013).

[42] Kai Hwang, Jack Dongarra, and Geoffrey C Fox. Distributed and cloud computing:from parallel processing to the internet of things. Morgan Kaufmann, 2013.

[43] CSR Prabhu. Grid and Cluster Computing. PHI Learning Pvt. Ltd., 2008.

[44] Franco Milicchio and Wolfgang Alexander Gehrke. Distributed services with openafs:for enterprise and education. Springer Science & Business Media, 2007.

Page 107: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

Bibliography

[45] Armando Fox et al. “Above the clouds: A Berkeley view of cloud computing”. In:Dept. Electrical Eng. and Comput. Sciences, University of California, Berkeley, Rep.UCB/EECS 28.13 (2009), p. 2009.

[46] Rajkumar Buyya et al. “Cloud computing and emerging IT platforms: Vision, hype,and reality for delivering computing as the 5th utility”. In: Future Generation com-puter systems 25.6 (2009), pp. 599–616.

[47] Paul Viola and Michael Jones. “Rapid object detection using a boosted cascade ofsimple features”. In: Computer Vision and Pattern Recognition, 2001. CVPR 2001.Proceedings of the 2001 IEEE Computer Society Conference on. Vol. 1. IEEE. 2001,pp. I–511.

[48] Paul Viola and Michael J Jones. “Robust real-time face detection”. In: Internationaljournal of computer vision 57.2 (2004), pp. 137–154.

[49] H. Lang, Y. Wang, and W. d. S. Clarence. “Vision based object identification andtracking for mobile robot visual servo control”. In: Control and Automation (ICCA),2010 8th IEEE International Conference on. June 2010, pp. 92–96. doi: 10.1109/ICCA.2010.5524180.

[50] Rover 5 Robot platform. https://www.sparkfun.com/datasheets/Robotics/

Rover%205%20Introduction.pdf.

[51] Raspberry Pi 3 Model B Datasheet. https://www.inet.se/files/pdf/1974044_0.pdf.

[52] BeagleBone Black Datasheet. http://datasheet.octopart.com/BB-BBLK-000-Circuitco-Electronics-datasheet-27091994.pdf.

[53] Raspberry Pi camera module. https://www.raspberrypi.org/products/camera-module/.

[54] MPI for Python. http://pythonhosted.org/mpi4py/mpi4py.pdf.

[55] TrueTime reference manual. http://www.control.lth.se/media/Research/

Tools/TrueTime/report_2016-02-10.pdf.

[56] iPerf - The network bandwidth measurement tool. https://iperf.fr/.

[57] Abu Asaduzzaman, Angel Martinez, and Aras Sepehri. “A time-efficient image pro-cessing algorithm for multicore/manycore parallel computing”. In: SoutheastCon2015. IEEE. 2015, pp. 1–5.

[58] Shivashankar J Bhutekar and Arati K Manjaramkar. “Parallel face Detection andRecognition on GPU”. In: International Journal of Computer Science and Informa-tion Technologies 5.2 (2014).

Page 108: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

Bibliography

Page 109: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

Appendix - A Interviews

Page 110: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

1 Interview with Carlo Fischione

Questions:

1. How do you look at future research and trends regarding distributed, and wirelessdistributed computing?

2. What are the main challenges in current research in parallel and distributed compu-ting?

3. What is your view on the main benefits and drawbacks with wireless distributed com-puting?

4. Which parameters are important in a WDC-Network in terms of optimizing controlperformance?

1

Page 111: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

2 Interviews at 1st Marine Regiment, Berga

Interviewee 1: Sgt. Malik HusseinInterviewee 2: Cpt. Willian Axling

1. Vilka ar de storsta utmaningarna ni moter i falt?

2. Hur mycket vager en normal utrustning i falt?

3. Givet en verklig krigssituation, vilka risker bedomer du skulle vara destorsta?

4. Vid vilka specifika situation utsatter ni er for de storsta riskerna?

5. Hur gar eldledningstjansten till i allmanhet?

Translation

1. Which are the biggest challenges you encounter in the field?

2. How much does a normal equipment weigh during field operations?

3. Given a war situation, which risks would you assess as the biggest?

4. At which specific situation do you face the biggest risks?

5. In general, how do you perform the fire control duty?

2

Page 112: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground
Page 113: Design of a dynamic distributed CPS application for ...kth.diva-portal.org/smash/get/diva2:1071074/FULLTEXT01.pdfDesign of a dynamic distributed CPS application for unmanned ground

TRITA MMK 2016:170 MDA 570

www.kth.se


Recommended