i INDOOR PERFORMANCE OF WIRELESS SENSOR NETWORK HASRI BIN HAMDAN A thesis submitted in partial Fulfillment of the requirement for the award of the Degree of Master of Electrical Communication Engineering Faculty of Electrical and Electronic Engineering Universiti Tun Hussein Onn Malaysia JULY 2012
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
i
INDOOR PERFORMANCE OF WIRELESS SENSOR NETWORK
HASRI BIN HAMDAN
A thesis submitted in partial
Fulfillment of the requirement for the award of the
Degree of Master of Electrical Communication Engineering
Faculty of Electrical and Electronic Engineering
Universiti Tun Hussein Onn Malaysia
JULY 2012
v
ABSTRACT
Wireless sensor networks have the potential to become significant subsystems of
engineering applications where every each node functions as transmitter, receiver,
router and data sink. It is necessary to understand the dynamic behaviour of these
systems in simulation environments. It is critical to develop simulation platforms that
are useful which can be used to explore both networking and wireless sensor
networks issues. A discrete-event simulation is a trusted platform for modeling and
simulating a variety of systems. This project emphasize on using new simulator for
wireless sensor networks that is based on the discrete event simulation framework
called Objective Modular Network Test bed in C++ version 4.1 (OMNeT++4.1)
Simulator. This simulator is used to test the performance of sensor nodes within the
networking in wireless communication networks based on indoor scenario. The test
performances are focussed on aspects such as the time delay and packet utilization of
the particular approach. The analysis approach is done through simulation software
by the following metrics: packet frames delivery, packet loss and time delay
experience within the system.
vi
ABSTRAK
Rangkaian pengesan tanpa wayar mempunyai potensi untuk menjadi subsistem
penting dalam aplikasi kejuruteraan di mana setiap nod boleh berfungsi sebagai
pemancar, penerima, router dan sink data. Ia adalah perlu untuk memahami tingkah
laku dinamik sistem-sistem ini dalam persekitaran suatu simulasi. Ia adalah sangat
penting dalam membangunkan sebuah platform simulasi yang berguna untuk
digunakan dalam meneroka isu-isu rangkaian dan rangkaian pengesan tanpa wayar.
Penyelakuan diskret-acara adalah satu platform yang dipercayai untuk pemodelan
dan simulasi pelbagai sistem. Projek ini menekankan penggunaan simulator baru ini
bagi suatu rangkaian pengesan tanpa wayar berdasarkan rangka kerja simulasi
peristiwa diskret yang dipanggil Simulator Ujian Objektif Rangkaian Modular Katil
dalam C + + versi 4.1 (OMNeT + 4,1). Simulator ini digunakan untuk menguji
prestasi nod pengesan dalam sesuatu rangkaian komunikasi tanpa wayar berdasarkan
senario yang tertutup. Penilaian prestasi ujian tertumpu kepada aspek-aspek seperti
penangguhan masa dan penghantaran paket berdasarkan pendekatan tertentu.
Pendekatan analisis dilakukan melalui perisian simulasi melalui metrik berikut:
penghantaran rangka paket, kehilangan paket dan penangguhan masa berlandaskan
dalam sistem.
vii
CONTENTS
TITLE i
DECLARATION ii
ACKNOWLEDGEMENT iv
ABSTRACT v
CONTENTS vii
LIST OF TABLES x
LIST OF FIGURES xi
LIST OF SYMBOLS AND ABBREAVIATIONS xiv
LIST OF APPENDICES xv
CHAPTER 1 INTRODUCTION
1.1 Background and History 1
1.2 Problem Statement 3
1.3 Objectives Of Project 4
1.4 Scope Of Project 4
1.5 Thesis Layout 4
CHAPTER 2 LITERATURE REVIEW
2.1 Introduction 6
2.2 Related Works 6
2.3 Wireless Sensor Network 8
2.4 Objective Modular Network Test-bed In C++ (OMNeT++) 9
2.4.1 Background And History 9
2.4.2 What Is OMNeT++ 10
2.4.3 Applications Of OMNeT++ 10
2.4.4 Modeling Concepts 11
2.4.4.1 Hierarchical Modules 11
2.4.4.2 Module Types 12
2.4.5 Components Of OMNeT++ 13
viii
2.4.6 Simulations With OMNeT++ 13
2.4.7 Running Simulation And Analyzing Results 16
2.4.8 The NED Language 16
2.4.9 Components Of A NED Description 17
2.4.10 User Interfaces 17
2.4.11 The Configuration File: omnetpp.ini 18
2.4.11.1 File Syntax 18
2.5 IEEE 802.15.4 18
2.5.1 Technical Overview 19
2.5.2 Description Of IEEE 802.15.4 Model In OMNeT++ 22
2.5.3 Path Loss Indoor Propagation Model 23
2.6 Summary 25
CHAPTER 3 METHODOLOGY
3.1 Introduction 26
3.2 Process Flowchart 26
3.3 Wiseroute Routing 30
3.4 Starting OMNeT++ Version 4.1 30
3.5 The Workbench 31
3.6 Opening A Workspace 32
3.7 The Simulation Perspective 33
3.8 Configuring OMNeT++ 4.1 Preferences 33
3.9 Creating Project In OMNeT++ 4.1 34
3.10 Editing NED Files 36
3.11 Editing INI Files 38
3.12 The Omnetpp.ini File 38
3.13 The Convergecast.anf File 42
3.14 Scalars Tools 43
3.15 Summary 46
CHAPTER 4 ANALYSIS AND DISCUSSION
4.1 Introduction 47
4.2 Simulation Results For Frames Delivery Performance 48
4.2.1 Frames Transmitted And Received Based On TX
Power Of 0.1mW 48
ix
4.2.2 Frames Transmitted And Received Based On TX
Power Of 1mW 53
4.2.3 Discussions On Transmitted And Received Frames 59
4.2.4 Frames Received With And Without Interference
Based On TX Power Of 0.1mW 59
4.2.5 Frames Received With And Without Interference
Based On TX Power Of 1mW 65
4.2.6 Discussions On Received Frames With And Without
Interference 70
4.3 Received Packets 71
4.4 Latency 72
4.5 Number Of Hops For Received Packet 73
4.6 Summary 74
CHAPTER 5 CONCLUSIONS AND RECOMMENDATIONS
5.1 Introduction 75
5.2 Conclusions 76
5.3 Future Works 76
REFERENCES 78
APPENDIX 81
x
LIST OF TABLES
TABLES TITLE PAGE
3.1 Parameters Used In The Simulation Process 39
3.2 Path Loss Exponents For Different Environment 39
3.3 Parameters Used In Convergecast Routing 42
4.1 Number Of Frames Transmitted Over Distances For WSN
Routing Protocols (TxPower = 0.1mW) 49
4.2 Number Of Frames Received Over Distances For WSN
Routing Protocols (TxPower = 0.1mW) 50
4.3 Number Of Frames Transmitted Over Distances For WSN
Routing Protocols (TxPower = 1mW) 54
4.4 Number Of Frames Received Over Distances For WSN
Routing Protocols (TxPower = 1mW) 55
4.5 Number Of Frames Received Without Interference Over
Distances For WSN Routing Protocols (TxPower = 0.1mW) 60
4.6 Number Of Frames Received With Interference Over
Distances For WSN Routing Protocols (TxPower = 0.1mW) 61
4.7 Number Of Frames Received Without Interference Over
Distances For WSN Routing Protocols (TxPower = 1mW) 66
4.8 Number Of Frames Received Without Interference Over
Distances For WSN Routing Protocols (TxPower = 1mW) 67
xi
LIST OF FIGURES
FIGURE TITLE PAGE
1.1 A Wireless Sensor Network 2
2.1 Simple And Compound Modules 11
2.2 Graphical NED Editor 14
2.3 NED Source Editor 15
2.4 Graphical Runtime Environment 15
2.5 A Zigbee Protocol Stack 21
2.6 The Structure And Components Of IEEE 802.15.4 Model 23
3.1 The Flowchart Of The Project Process Development 27
3.2 Flowchart Of Wiseroute Routing Algorithm 29
3.3 Window Command Script Box For OMNeT++ 4.1 30
3.4 OMNeT++ 4.1 Simulator Box 31
3.5 Interface Window Box For The Workbench 32
3.6 Window Box For Selecting A Workspace 33
3.7 Configuring OMNeT++ Preferences 34
3.8 Selecting Workspace Directory For Creating Project
In OMNeT++ 4.1 35
3.9 Selecting WSNRouting.ned File 35
3.10 WSN Routing Modules 36
3.11 Source Of The Design For .NED File In C++ Languages 37
3.12 OMNeT++/Tkenv – WSN Routing Box 40
3.13 WSN Routing Box Simulation Module 41
3.14 Three Combo Box – Selection Convergecast Running ID 44
3.15 Three Combo Box – Selection Module Filter 44
3.16 Three Combo Box – Selection Statistic Name Filter 45
xii
4.1 Number Of Frames Sent And Received Based On
Nodes (ID #1) 51
4.2 Number Of Frames Sent And Received Based On
Nodes (ID #10) 51
4.3 Number Of Frames Sent And Received Based On
Nodes (ID #20) 52
4.4 Number Of Frames Sent And Received Based On
Nodes (ID #30) 52
4.5 Number Of Frames Sent And Received Based On
Nodes (ID #40) 53
4.6 Number Of Frames Sent And Received Based On
Nodes (ID #5) 56
4.7 Number Of Frames Sent And Received Based On
Nodes (ID #15) 57
4.8 Number Of Frames Sent And Received Based On
Nodes (ID #25) 57
4.9 Number Of Frames Sent And Received Based On
Nodes (ID #35) 58
4.10 Number Of Frames Sent And Received Based On
Nodes (ID #45) 58
4.11 Number Of Frames Retrieved With And Without Interference
Based On Nodes (ID#1) 62
4.12 Number Of Frames Retrieved With And Without Interference
Based On Nodes (ID#10) 63
4.13 Number Of Frames Retrieved With And Without Interference
Based On Nodes (ID#20) 63
4.14 Number Of Frames Retrieved With And Without Interference
Based On Nodes (ID#30) 64
4.15 Number Of Frames Retrieved With And Without Interference
Based On Nodes (ID#40) 64
4.16 Number Of Frames Retrieved With And Without Interference
Based On Nodes (ID#5) 68
xiii
4.17 Number Of Frames Retrieved With And Without Interference
Based On Nodes (ID#15) 68
4.18 Number Of Frames Retrieved With And Without Interference
Based On Nodes (ID#25) 69
4.19 Number Of Frames Retrieved With And Without Interference
Based On Nodes (ID#35) 69
4.20 Number Of Frames Retrieved With And Without Interference
Based On Nodes (ID#45) 70
4.21 Received Packets Between Nodes Upon Distances 72
4.22 Mean Latency For Received Packets 73
4.23 Mean Number Of Hops For Received Packet 74
xiv
LIST OF SYMBOLS AND ABBREVIATIONS
WSN - Wireless Sensor Network
IEEE - Institute of Electrical and Electronic Engineers
OMNeT++ - Objective Modular Network Test-bed in C++
RSSI - Received Signal Strength Indication
CPU - Central Processing Unit
OPNET - Optimized Network Engineering Tools
TCP/IP - Transmission Control Protocol/Internet Protocol
GUI - Graphical User Interface
NED - Network Description
MiXiM - Mix Simulator
MANET - Mobile Ad Hoc Network
PAN - Personal Area Network
WPAN - Wireless Personal Area Network
LR – WPAN - Low Rate Wireless Personal Area Network
ZDO - Zigbee Device Object
CAP - Contention Access Period
CFP - Contention Free Period
CSMA – CA - Carrier Sense Multiple Access – Collision Avoidance
MAC - Medium Access Control
FFD - Full Function Device
RFD - Reeduce Function Ddevice
LOS - Line Of Sight
OSI - Open System Interconnection
PL - Path Loss
α - Path Loss Exponent
PRX - Received Power
d - Length or Distance Path
h - Antenna Height
xvi
LIST OF APPENDICES
APPENDIX TITLE PAGE
A WSN Routing (omnetpp.ini) Source Code 81
B Convergecast (omnetpp.ini) Source Code 83
C Wiseroute (wiseroute.cc) Source Code 84
CHAPTER 1
INTRODUCTION
1.1 Background and History
The Wireless Sensor Network (WSN) is built of "nodes" where from a few to several
hundreds or even thousands, where each node is connected to one or several sensors.
Each such sensor network node has typically several parts: a radio transceiver with an
internal antenna or connection to an external antenna, a microcontroller, an electronic
circuit for interfacing with the sensors and an energy source, usually a battery or an
embedded form of energy harvesting. A sensor node might vary in size from that of a
shoebox down to the size of a grain of dust. The cost of sensor nodes is similarly
variable, ranging from a few to hundreds of dollars, depending on the complexity of the
individual sensor nodes. Size and cost constraints on sensor nodes result in corresponding
constraints on resources such as energy, memory, computational speed and
communications bandwidth. The topology of the WSNs can vary from a simple star
network to an advanced multi-hop wireless mesh network. The propagation technique
between the hops of the network can be routing or flooding.
In general, wireless sensor networks have made a lot of progress recently and
have been widely discussed in many applications. According to J.Kenyeres et al (2010) it
is expected that this technology will play an important role in improving the quality of
the living environment through the creation of so called sensing environments. However,
there is a gap in knowledge about WSN to help at least not to broaden this gap, but it is
important that some scientific and educational research should be done in this area and
that young generation should gain opportunity to study this technology.
PLo is the path loss at the reference distance d0. Unit: Decibel (dB) d is the length of the path. do is the reference distance, usually 1 km (or 1 mile). α is the path loss exponent. Xg is a normal (or Gaussian) random variable with zero mean, reflecting the attenuation (in decibel) caused by flat fading.
When an electromagnetic wave propagates through space; there is the reduction in
power density or attenuation of the wave, namely path loss, which is a major component
in the channel modelling. According to Jing Lu et al. (2010), the simplest channel is the
free space line of sight channel with no objects between the receiver and the transmitter
or around the path between them. In this simple case, the transmitted signal attenuates
since the energy is spread spherically around the transmitting antenna. For this line of
sight (LOS) channel, the received power is given by:
PL (d) dB = PL (do) + 10α log (d/do) σ (2.2)
Some of the waves will reflect and reach the transmitter due to the presence of the
ground. These reflected waves sometime have a phase shift of 180° and so may reduce
the net received power. So, a simple two-ray approximation for path loss can be shown as
below:
Pr = Pt (GrGthr2ht
2/d4) (2.3)
Respectively, from the given formula, where hr and ht are the antenna heights of
the transmitter and receiver. Note that there are three major differences from the previous
formula. First, the antenna heights have effect. Second, the wavelength is absent and third
the exponent on the distance is 4. In general, a common formula for path loss is:
Pr = Pt Po (do/d)α (2.4)
Where Po is the power at a distance do and α is the path loss exponent.
Theoretically, the power falls off in proportion to the square of the distance. In
practice, the power falls off more quickly, typically 3rd or 4th power of distance. The