Sie sind auf Seite 1von 80

THE IMPACT OF MOBILITY ON THE PERFORMANCE OF

ZIGBEE MOBILE NETWORK

NORHAMIZAN BIN A.HAMID


52208111095

Report Submitted in Fulfillment of the Requirements


For the Bachelor of Engineering Technology (Hons) in Networking System
Malaysian Institute of Information Technology,
Universiti Kuala Lumpur

JANUARY 2014

i|Page

DECLARATION PAGE

I declare that this report is my original work and all references have been cited adequately as
required by the University.

Date: 16/May/2014

Signature:
Full Name: Norhamizan Bin A.Hamid
ID No.: 52208111095

ii | P a g e

APPROVAL PAGE

We have supervised and examined this report and verify that it meets the program and
Universitys requirements for the Bachelor of Engineering Technology (Hons) in Networking
System.

Date:

Signature:
Supervisors Name: Dr.Megat Farez Azril Zuhairi

iii | P a g e

COPYRIGHT PAGE

Declaration of Copyright and Affirmation of Fair Use of Unpublished


Research Work as stated below:

Copyright @ 16/05/2014 by Norhamizan Bin A.Hamid (52208111095)


All rights reserved for The Impact of Mobility on The Performance of ZigBee Network

No part of this unpublished research may be reproduced, stored in a retrieval system, or


transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or
otherwise without the prior written permission of the copyright holder except as provided
below:
i.

Any material contained in or derived from this unpublished research may only be used
by others in their writing with due acknowledgement.

ii.

MIIT UniKL or its library will have the right to make and transmit copies(print or
electronic) for institutional and academic purposes.

iii.

The MIIT UniKLs library will have the right to make, store in a retrieval system and
supply copies of this unpublished research if requested by other universities and
research libraries.

iv | P a g e

DEDICATION

I would like to dedicate this thesis to my parent, my sibling whom have supported me
throughout the four years in the university and to whom I am forever grateful. My friends that
have give full support to accomplish the work I have done. The work I have done on this
project is dedicated to them. Thank you for the support, love, faith and trust. I am truly blessed
as a family. I also want to dedicate this report to our entire lecturer for about 4 years lecture.
Thank you for the guide and support that you have showed me.

v|Page

ACKNOWLEDGEMENT

First and foremost, I thank Allah S.W.T for endowing me with health, patience,
and knowledge to complete this work.
I acknowledge, with deep gratitude and appreciation, the inspiration, encouragement,
valuable time and guidance given to me by Dr.Megat Farez Azril Zuhairi, who served as
my project supervisor and read my numerous revisions and helped make some sense of
the confusion. Thereafter, to my assessors, Husna BintiOsman, and Dr.Megat
NorulAzmi Megat Mohammad Noor, who offered guidance and support.
Next, my appreciations go to our family for always giving me love and support. Without
their attention, it would be difficult for me to get through all the circumstances in
completing this Final Year Project.

This project would not have been possible without the support from numerous friends
and all other relatives, for their emotional and moral support throughout my academic
career and also for their love, patience, encouragement and prayers.

vi | P a g e

TABLE OF CONTENTS

TITLE PAGE ...................................................................................................................................... i


DECLARATION PAGE ......................................................................................................................ii
APPROVAL PAGE ........................................................................................................................... iii
COPYRIGHT PAGE .......................................................................................................................... iv
DEDICATION ....................................................................................................................................v
ACKNOWLEDGEMENT .................................................................................................................... vi
LIST OF TABLES .......................................................................................................................... x
LIST OF FIGURES ....................................................................................................................... xi
LIST OF ABBREVIATION ........................................................................................................ xiii
ABSTRACT.................................................................................................................................. xv
ABSTRAK ................................................................................................................................... xvi
CHAPTER I : INTRODUCTION .................................................................................................. 1
1.0 Introduction .......................................................................................................................... 1
1.1 Project Background .............................................................................................................. 2
1.2 Project Objectives ................................................................................................................ 2
1.3 Project Scope ....................................................................................................................... 2
1.5 Project Expected Outcome ................................................................................................... 3
1.6 Project Limitation ................................................................................................................ 3
CHAPTER II: LITERATURE REVIEW ...................................................................................... 5
2.1 Introduction .......................................................................................................................... 5
2. 2 Introduction of ZigBee ........................................................................................................ 5
2.2.1 ZigBee device types ...................................................................................................... 5
2.2.2 ZigBee network characteristic ..................................................................................... 6
vii | P a g e

2.2.3 ZigBee network topology............................................................................................. 7


2.3 Mobile Ad Hoc Network (MANET) .................................................................................. 12
2.3.1 Characteristics of routing protocol .............................................................................. 13
2.3.1.1 Proactive Routing Protocol .................................................................................. 13
2.3.1.2 Reactive Routing Protocol ................................................................................... 14
2.3.2 Mobility Pattern .......................................................................................................... 16
2.3.2.1 Random Waypoint Model .................................................................................... 17
2.3.2.2 Manhattan Grid Model ......................................................................................... 18
2.3.2.3 Gauss-Markov Models ......................................................................................... 19
2.3.2.4 Freeway Model .................................................................................................... 19
2.3.3 Standard for MANET.................................................................................................. 19
2.4 Comparison between previous project ............................................................................... 22
CHAPTER III: RESEARCH METHODOLOGY ....................................................................... 24
3.1 Introduction ........................................................................................................................ 24
3.2 Project Methodology .......................................................................................................... 24
3.2.1 Planning phase ............................................................................................................ 25
3.2.2 Research phase ............................................................................................................ 25
3.2.3 Implementation phase ................................................................................................. 25
3.2.4 Analysis phase ............................................................................................................ 26
3.2.5 Result phase ................................................................................................................ 26
3.2.6 Documentation phase .................................................................................................. 26
3.3 Hardware Requirement ...................................................................................................... 27
3.3.1 SKXBEE ..................................................................................................................... 27
3.3.2 XBee-S2 ...................................................................................................................... 28
3.3.3 XBee Shield ................................................................................................................ 29
3.3.4 Arduino ....................................................................................................................... 30
3.4 Software Requirement ....................................................................................................... 32
3.4.1 X-CTU ........................................................................................................................ 32
3.4.2 Arduino IDE................................................................................................................ 33
3.5 Project Gantt Chart ............................................................................................................ 34
viii | P a g e

3.6 Work Breakdown Structure ............................................................................................... 34


3.7 Final Year Budget and Costing .......................................................................................... 35
CHAPTER IV: IMPLEMENTATITION OF ZIGBEE AD HOC NETWORK .......................... 37
4.1 Introduction ........................................................................................................................ 37
4.2 Hardware Implementation ................................................................................................. 39
4.3 Network Diagram............................................................................................................... 51
CHAPTER V : TESTING AND RESULT .................................................................................. 52
5.1 Introduction ........................................................................................................................ 52
5.2 Metrics ............................................................................................................................... 52
5.2.1 Average End-to-End Delay ......................................................................................... 52
5.2.2 Packet Delivery Ratio ................................................................................................. 53
5.2.3 Throughput .................................................................................................................. 53
5.3 ZigBee range experiment ................................................................................................... 54
5.4 Testing connection between sender and receiver ............................................................... 55
5.5 Result .................................................................................... Error! Bookmark not defined.
CHAPTER VI: CONCLUSION AND SUGGESTIONS ............................................................ 63
6.1 INTRODUCTION ............................................................................................................. 63
6.2 CONCLUSION .................................................................................................................. 63
6.3 SUGGESTIONS ................................................................................................................ 64
REFERENCES
APPENDIX A: ............................................................................................................................ A1
APPENDIX B: ....................................................................................................................... B1-B6
APPENDIX C: ....................................................................................................................... C1-C3
APPENDIX D: ............................................................................................................................ D1
APPENDIX E: ..................................................................................................................... E1-E57

ix | P a g e

LIST OF TABLES
page on
Table 2.1 : Zigbee, Bluetooth, and Wi-Fi Characteristics

Table 2.2 : MANET Routing Protocol table

16

Table 2.3: Summary of different wireless network

20

Table 2.4: Comparisons of Bluetooth Version

21

Table 3.1 : Hardware costing

36

Table 3.2 : Software costing

36

Table 5.1 : ZigBee range

54

Table 5.2 : Full Result

63

x|Page

LIST OF FIGURES
page on
Figure 2.1: Star Topology

Figure 2.2: Tree Topology

Figure 2.3: Cluster Tree Topology

Figure 2.4: Mesh Topology

10

Figure 2.5: ZigBee protocol stack

10

Figure 2.6 :Classification of Mobility Model

17

Figure 2.7: Random Waypoint Mobility

18

Figure 2.8 : Manhattan Mobility Model

18

Figure 2.9 : Freeway Model

19

Figure 3.1 : Project Methodology

24

Figure 3.2 : SKXBEE

27

Figure 3.3 : XBee-S2

28

Figure 3.4 : XBee Shield

29

Figure 3.5 : Arduino Uno

30

Figure 3.6 : X-CTU interface

32

Figure 3.7 : Arduino IDE interface

33

Figure 3.8 : Final Year Project Work Breakdown Structure

35

Figure 4.1 : Flowchart for Zigbee Mobile Network using Random

38

Waypoint Mobility Model


Figure 4.2 : XBee plug in into SKXBEE

39

Figure 4.3 : X-CTU interface

39

Figure 4.4 : X-CTU establish communication

40

Figure 4.5 : Modem(XBee) configuration and information

41

Figure 4.6 : Setup XBee PAN ID

42

Figure 4.7 : Configuration for Sender Node

43

xi | P a g e

Figure 4.8 : Configuration for Relay Node

44

Figure 4.9 : Configuration for Receiver Node

44

Figure 4.10 : Plug in XBee into XBee Shield

45

Figure 4.11 : Integration Between XBee, XBee Shield and Arduino

45

Uno
Figure 4.12 : Arduino IDE folder

46

Figure 4.13 : Arduino Uno power up using USB Cable

47

Figure 4.14 : Arduino IDE interface

47

Figure 4.15 : Arduino IDE selection Board

48

Figure 4.16 : Arduino IDE selection Port

49

Figure 4.17 : Uploading Source Code into Arduino Uno

50

Figure 4.18 : Network Diagram

51

Figure 5.1 : Two Arduino Uno interface

55

Figure 5.2 : Packet from Sender to Receiver via XBee

56

Figure 5.3 : Real Time Stamp using Window 7

57

Figure 5.4 : Real Time Stamp using Ubuntu

57

Figure 5.5 : Random Waypoint Pattern

58

Figure 5.6 : Total Packet Graph

59

Figure 5.7 : Packet Delivery Ratio Graph

60

Figure 5.6 : Average End-to-End Delay Graph

61

Figure 5.6 : Throughput Graph

61

xii | P a g e

LIST OF ABBREVIATION

Name

Abbreviation

Ad Hoc on-demand Distance Vector Routing

AODV

Carrier Sense Multiple Accesses with Collision Avoidance

CSMA/CA

Destination Sequence Distance Vector

DSDV

Direct Sequence Spread Spectrum

DSSS

Dynamic Source Routing

DSR

Fisheye State Routing

FSR

Frequency Hoping Spread Spectrum

FHSS

Graphical User Interface

GUI

Hybrid Ad hoc Routing Protocol

HARP

Identification

ID

In Circuit Serial Programming

ICSP

Industrial, Scientific and Medical

ISM

Institute of Electrical and Electronics Engineers

IEEE

Integrated Development Environment

IDE

Intelligent Vehicular Ad Hoc Network

In VANET

Light-Emitting Diode

LED

Mobile Ad Hoc Network

MANET

Personal Area Network

PAN

Radio Frequency

RF

Task Group N

TGn

Temporally Ordered Routing Algorithm

TORA

Transistortransistor logic

TTL

Universal Asynchronous Receiver/Transmitter

UART

Universal Serial Bus

USB

xiii | P a g e

Vehicular Ad hoc Network

VANET

Wireless Personal Area Network

WPAN

Wireless Routing Protocol

WRP

Work Breakdown Structure

WBS

Zigbee Coordinator

ZC

ZigBee device object

ZDO

Zigbee End Device

ZED

Zigbee Router

ZR

Zone Routing Protocol

ZRP

Zone-based Hierarchical Link State

ZHLS

xiv | P a g e

ABSTRACT

This study is conducted to investigate the impact of mobility on the performance of


ZigBee mobile network. Zigbee Mobile Network rapidly used in many industries. It is
because the network technologies have features such as low power operation, sensor
capability, and small form factor mobility. The data collected from a single sensor node
is forwarded from one to the other until it reaches the location of the data collection
center. This project focuses on a study about Zigbee mobile network and mobility's
pattern which is Random Waypoint mobility models and to construct a simple wireless
ad hoc network topology to investigate the performance. The project objective is to set
up a simple wireless network using the current available Zigbee wireless devices.
Subsequently, the devices are evaluated in network environment, which include mobility
patterns

xv | P a g e

ABSTRAK

Kajian ini dijalankan untuk mengkaji kesan mobiliti kepada prestasi rangkaian mudah
alih ZigBee. Rangkaian ZigBee bergerak pesat digunakan dalam banyak industri. Ini
adalah kerana teknologi rangkaian ZigBee mempunyai ciri-ciri seperti operasi yang
menggunakan kuasa rendah , keupayaan sensor, dan faktor bentuk kecil mobiliti. Data
yang dikumpul dari nod sensor tunggal yang dihantar dari satu kepada yang lain
sehingga ia sampai ke lokasi pusat pengumpulan data. Projek ini memberi tumpuan
kepada satu kajian mengenai rangkaian mudah alih ZigBee dan corak pergerakan ini
yang merupakan mobiliti model Random Waypoint dan membina rangkaian topologi ad
hoc tanpa wayar mudah untuk menyiasat prestasi. Objektif projek ini adalah untuk
menubuhkan satu rangkaian wayarles mudah menggunakan yang ada alat-alat tanpa
wayar ZigBee. Selepas itu, peranti dinilai dalam persekitaran rangkaian, termasuk
corak mobiliti

xvi | P a g e

CHAPTER I: INTRODUCTION

1.0 Introduction

Zigbee Mobile Network is typically used in many industries. It is because the network
technologies have features such as low power operation, sensor capability, and small
form factor mobility. The data collected from a single sensor node is forwarded from
one to the other until it reaches the location of the data collection center. Typically,
Zigbee allows bi-directional communication to connect and communicate. Each node
has common parts, which include a radio transceiver with internal antenna or connection
to an external antenna and a microcontroller. Many industries have employed the
technology to automate process with minimum human intervention. Nevertheless, not
the entire node has mobility capability in their system. Simulation of mobility pattern is
a technique used to evaluate the performance of Zigbee network. It provides an
improvement in the mobile ad hoc environment and network performance. The purpose
of this project is to employ mobility pattern into the Zigbee network and then compare
the performance. The mobility pattern behavior of a node movement can be described
using both analytical and simulation models .In this project, the actual mobility pattern is
employed. For the mobility pattern, Random Waypoint Model is used in this project.
The mobility pattern can help the investigation of the network performance, which later
can be used to alleviate the weakness.

1|Page

1.1 Project Background

This project focuses on a study about Zigbee mobile network and mobility's pattern
which is Random Waypoint mobility models and to construct a simple wireless ad
hoc network topology to investigate the performance.
The objective of this project is to study the Zigbee mobile network using by the
mobility patterns. The performance will be measured by using real-life node wireless
sensor in different network topology. Each mobility pattern use different individual
movement and the node's location. The wireless node employs protocol such as Ad
Hoc on-demand Distance Vector Routing (AODV).
The experiment is conducted in a real-life testbed to evaluate the performance
network with the mobility pattern. The network node hardware that can be used is XBee Series 2 (support Zigbee Protocol) and Arduino Uno as the microcontroller.
The outcome of the result is compared to see the attributes of mobility pattern.

1.2 Project Objectives

1. To setup a simple wireless sensor network based on current wireless sensor


network technology.
2. To empirically investigate the performance of Zigbee mobile network using
mobility model Random Waypoint Mobility model.

1.3 Project Scope

The project focuses on setting up a simple wireless network using the current
available Zigbee wireless devices. Subsequently, the devices are evaluated in
network environment, which include mobility patterns. Initially experiments are
conducted empirically with using chain topology and later under various network
topologies. Based on the results, the data is analyzed and later a suitable application
for the Zigbee network nodes is proposed.
2|Page

1.4 Project Problem Statement

The applications of ad hoc network are limited and many lack the ability to be
mobile. As such, the performance of Zigbee devices may be affected. In this project,
the mobility attributes of Zigbee is investigated.

1.5 Project Expected Outcome

The project expected outcome is to employ mobility pattern into Zigbee network. It
can be implemented into many industries such as agriculture, military, and medical.
It will help the features of mobility to their current networking system. With this
method, it may increases the performance of the network and the work or method of
collecting data will improve.

1.6 Project Limitation

1. Difficulties to reproduce accurate mobility movement for each mobility model

3|Page

CHAPTER II: LITERATURE REVIEW

2.1 Introduction

This chapter reports the literature review of the project to be developed, which is
Wireless Mobile Ad hoc Network. It discusses about ZigBee network and mobility
pattern of wireless node.
2. 2 Introduction of ZigBee

ZigBee is known as Institute of Electrical and Electronics Engineers (IEEE)


802.15.4 Low-Rate Wireless Personal Area Network (WPAN). It is designed for
low-cost, low-power applications that require relatively low data throughput which is
down to an average of less than 1bps. It is also differentiated from IEEE 802.15.1TM
(Bluetooth TM) in several respects; it does not support voice, as Bluetooth does.
Application of ZigBee technology is well suited to a wide range of energy
management and efficiency, building automation, industrial, medical, home
automation applications. Essentially, applications that require interoperability and/or
the radio frequency (RF) performance characteristics of the IEEE 802.15.4 standard
would benefit from a ZigBee solution.
ZigBee is a set of speciation built around the IEEE 802.15.4 wireless protocol.
ZigBee is designed to provide highly efficient connectivity between small packet
devices. ZigBee is a specification for a suite of high level communication protocols
using small, low-power digital radios based on an IEEE 802 standard for personal
area network. ZigBee device is used in mesh network form to transmit data in longer
distance, passing data through intermediate devices to reach more distance.
ZigBee has 16 separate channels, which means that up to 16 networks can be
presented in a single location without interfering with each other. ZigBee was
founded by a consortium called ZigBee Alliance which is consisting of more than

5|Page

270 companies including Freescale, Ember, Mitsubishi, Philips, Honeywell and


Texas Instruments.
2.2.1 ZigBee device types

1. ZigBee Coordinator (ZC).


The coordinator forms the root of the network tree and might bridge to other
networks, there is exactly one ZigBee coordinator in each network. It is able to store
information about the network. The characteristic of coordinator are shown by the
following points.
Selects a channel and PAN ID (both 64-bit and 16-bit) to start the network
Can allow routers and end devices to join the network
Can assist in routing data
Cannot sleep--should be mains powered
Can buffer RF data packets for sleeping end device children.

2. ZigBee Router (ZR).


A router can act as an intermediate router, passing on data from other device.
Characteristic of router are show below.
Must join a ZigBee PAN before it can transmit, receive, or route data
After joining, can allow routers and end devices to join the network
After joining, can assist in routing data
Cannot sleep--should be mains powered.
Can buffer RF data packets for sleeping end device children.

3. ZigBee End Device (ZED)


It have just enough functionality to talk to the parent node. A ZED requires the least
amount of memory and therefore can be less expensive to manufacture than a ZR or
ZC. Characteristic of end device are
Must join a ZigBee PAN before it can transmit or receive data
Cannot allow devices to join the network
5|Page

Must always transmit and receive RF data through its parent. Cannot route
data.
Can enter low power modes to conserve power and can be battery-powered.
2.2.2 ZigBee network characteristic

There are several standard currently exist for wireless networking, including
Bluetooth, Wi-Fi, and Wimax. ZigBee is a new standard for wireless sensor and
control network. Besides features of lower power consumption, high density of nodes
per network and low costs, there are some features are enabled by the following
characteristics.
Regional operation in the 915 MHz (Americas) and 868 MHz (Europe).
Frequency agile solution operating over 16 channels in the 2.4 GHz
frequency.
ZigBee uses small packet compared with Wi-Fi and Bluetooth.
Easy to implement.
Low data rate. Maximum data rate for a ZigBee device is 250 Kbps.
Utilizes the industry standard AES-128 security scheme.
Fully hand-shake acknowledged protocol for transfer reliability.
Allocation of guaranteed time slots.
Allocated 16 bit short or 64 bit extended addresses.

Table 2.1 summarizes the characteristic of the technologies previously stated.

6|Page

Table 2.1: ZigBee, Bluetooth, and Wi-Fi Characteristics


Wi-Fi IEEE 802.11 Bluetooth

Application

Wireless LAN

IEEE ZigBee

802.15.1

802.15.4

Cable replacement

Control

IEEE

and

monitor
Frequency bands

2.4 GHz

2.4 GHz

2.4 GHz
868 MHz
915 MHz

Battery life (days)

0.1 5

17

100 700

Nodes per network

30

65,000

Bandwidth

2 100 mbps

1 mbps

20 250 kbps

Range (meters)

1 100

1 10

1 75 and more

Topology

Tree

Tree

Star, tree, cluster


tree and mesh

Standard current

2 * 10 3 amps

200 * 10 -6 amps

3 * 10 6 amps

Memory

100 kb

100 kb

32 60 kb

2.2.3 ZigBee network topology

ZigBee uses the IEEE 802.15.4 2003 specification for its physical layer and MAC
layer. It offers star, tree, cluster tree and mesh topologies; however ZigBee only
supports star, tree and mesh topologies.

7|Page

1. Peer-to-peer topology

In peer-to-peer topology, there is also one PAN coordinator. In contrast to star


topology, any device can communicate with any other device as long as they are in
range of one another. A peer-to-peer network can be ad hoc, self organizing and selfhealing. Application such as industrial control and monitoring, wireless sensor
networks, assets and inventory tracking would benefit from such a topology. It also
allows multiple hops to route messages from any other device to any other device in
the same network. It can provide reliability by multipath routing.
2. Star topology

Star topology consists of a coordinator and several end devices (nodes). In this
topology, the end device will only communicate with coordinator. Any packet
exchange with end device must go through the coordinator. The disadvantage of this
topology is the operation of the network depends on the coordinator of the network
because all packets between the devices must go through the coordinator. In this
case, the coordinator may become bottlenecked.
There is also no alternative path from source to destination. The advantage of this
topology is that it is simple and packets go through at most two hops to reach their
destination. Figure 2.1 shows the example of star topology

Figure 2.1: Star Topology

8|Page

3. Tree topology.

In this topology, the network consists of a central node (root tree), which is a
coordinator, several routers, and end devices. The function of the router is to extend
the network coverage. The end nodes that are connected to the coordinator or the
routers are called children. Only routers and the coordinator can have children. Each
end device is only able to communicate with its parent. The coordinator and routers
can have children and, therefore, are the only devices that can be parents. An end
device cannot have children and, therefore, may not be a parent. A special case of
tree topology is called a cluster tree topology. Figure 2.2 shows the example of tree
topology

Figure 2.2: Tree Topology


The disadvantages of tree topology are:
If one of the parents becomes disabled, the children of the disable parent cannot
communicate with other devices in the network. Even if two nodes are
geographically close to each other, they cannot communicate directly.
4. Cluster Tree Topology.

A cluster tree topology is a special case of tree topology in which a parent with its
children is called a cluster. Each cluster is identified by a cluster ID. ZigBee does not
support cluster tree topology, but IEEE 802.15.4 does support it. Figure 2.3 shows
the example of cluster tree topology

9|Page

Figure 2.3: Cluster Tree Topology

5. Mesh Topology.
Mesh topology, also referred to as a peer-to-peer network, consists of one
coordinator, several routers, and end devices. Figure 2.4 shows the example of mesh
topology
The following are the characteristics of a mesh topology:
1. A mesh topology is a multihop network; packets pass through multiple hops
to reach their destination.
2. The range of a network can be increased by adding more devices to the
network.
3. It can eliminate dead zones.
4. A mesh topology is self-healing, meaning during transmission, if a path fails,
the node will find an alternate path to the destination.
5. Devices can be close to each other so that they use less power.
6. Adding or removing a device is easy.
7. Any source device can communicate with any destination device in the
network.
8. Compared with star topology, mesh topology requires greater overhead.
9. Mesh routing uses a more complex routing protocol than a star topology.

10 | P a g e

Figure 2.4: Mesh Topology


ZigBee builds upon the physical layer and medium access control defined in IEEE
standard 802.15.4 (2003 version) for low-rate WPAN shown in Figure 2.5. The
specification goes on to complete the standard by adding four main components:
network layer, application layer, ZigBee device objects (ZDOs) and manufacturerdefined application objects which allow for customization and favor total integration.

Figure 2.5: ZigBee protocol stack

11 | P a g e

Besides adding two high-level network layers to the underlying structure, the most
significant improvement is the introduction of ZDOs. These are responsible for a
number of tasks, which include keeping of device roles, management of requests to
join a network, device discovery and security. Because ZigBee nodes can go from
sleep to active mode in 30ms or less, the latency can be low and devices can be
responsive, particularly compared to Bluetooth wake-up delays, which are typically
around three seconds. Additionally, ZigBee nodes can sleep most of the time,
average power consumption can be low, resulting in long battery life.
ZigBee is a low-cost, thus allowing the technology to be widely deployed in wireless
control and monitoring applications. It operates in the industrial, scientific and
medical (ISM) radio bands. Data transmission rates vary from 20 to 900
kilobits/second.

2.3 Mobile Ad Hoc Network (MANET)

The rapid development of computer and wireless communication causes mobile


computing to be the field of interest for research. MANET is a wireless connectivity
where nodes construed by actions of the network that has dynamic shape and limited
bandwidth. It generally signifies a solution that has been custom -designed for a
specific problem, it is non-generalized, and cannot be adapted to other purpose. In
general, MANET is a collection of wireless node communication with each other in
the absence of any infrastructure. The WSN nodes are low cost and MANET has
attracted a lot of attention from academic and industry in recent years.
There are three types MANET which are Vehicular Ad hoc Network (VANETs),
Intelligent Vehicular Ad Hoc Network (In VANET) and Internet Based Mobile Ad
hoc Network (iMANET). The application of MANET can be ranged from small,
static network that is limited by power source to large-scale, mobile, highly dynamic
network. Magnus Frodigh, Per Johansson and Peter Larsson [1] describe Mobile ad
hoc networks have been the focus of many recent research and development efforts.
So far, ad hoc packet-radio networks have mainly been considered for military
applications, where a decentralized network configuration is an operative advantage
or even a necessity ".
12 | P a g e

2.3.1 Characteristics of routing protocol

There a many ways to classify MANET protocol based on how routing information
is acquired and maintained by mobile nodes. Using this method, MANET routing
protocol can be divided into proactive routing, reactive routing and hybrid routing.
2.3.1.1 Proactive Routing Protocol

Proactive Routing also called "table driven" routing protocol. Nodes in MANET are
capable to continuously evaluate routes to all reachable nodes and attempt to
maintain consistent, up-to-date routing information so that source node can get
routing path immediately if needed.
Typical Proactive Routing Protocol
i.

The Wireless Routing Protocol (WRP)

WRP is a proactive unicast routing protocol for MANET. It is used to improve


Bellman-Ford Distance Vector. To establish dynamic features of MANET, some
mechanisms are introduced to ensure the reliable exchange of update message and
reduce route loops.
Each mobile node maintains a distance table, routing table, a link-cost table and MSL
(Message Retransmission List). An entry in the routing table contains the distance to
a destination node, the predecessor and the successor along the paths to destination
and a tag for identification
ii.

The Destination Sequence Distance Vector (DSDV) Routing Protocol

DSDV is a proactive unicast routing protocol for MANET. It has the same concept
with AODV except their mechanisms to improve routing performance in MANET
are quite different.
An entry stores the next hop towards destination, the cost metric for routing path to
destination sequence number that created by the destination.

13 | P a g e

iii.

The Fisheye State Routing (FSR)

FSR is proactive unicast routing protocol based Link State routing with the effect of
reduced overhead to maintain network topology information. FSR can maintain the
accurate distance and path quality information about the neighbor node and progress
to reduce details when the distance increases.
2.3.1.2 Reactive Routing Protocol

Reactive Routing or also known as "on-demand" routing protocol. With this routing
protocol, routing path is searched only when needed. The discovery procedure
terminates when either route has found or no route are available after examination for
all route permutations.
i.

The Dynamic Source Routing (DSR) protocol

DSR is Reactive unicast routing protocol that utilizes source routing. In DSR each
node uses caching technology to maintain route information that the node has learnt.
There are two major phases in DSR, the route discovery and the route maintenance.
When the source node sends packet, it first consults with the route cache. Later if the
required route is available, the source node includes the routing information inside
the data packet before transmission.
ii.

The Ad Hoc On-demand Distance Vector Routing (AODV) protocol

AODV is reactive unicast routing protocol for MANET. It only maintains the routing
information about active path. Routing information is usually maintained in routing
tables at nodes. Every node keeps next-hop routing table, which contain destination
to which currently that have a route.
iii.

The Temporally Ordered Routing Algorithm (TORA)

TORA is Reactive routing algorithm based on concept of link reversal. It improves


the partial link reversal method by detecting partitions and stopping non-productive
link reversals. It also can be used for highly dynamic MANET.

14 | P a g e

2.3.1.3 Hybrid Route Protocol

Hybrid Routing Protocol is proposed to combine the merits of both proactive and
reactive routing protocols and to overcome the weakness. Hybrid routing protocol for
MANET typically exploit hierarchical network architectures.
i.

The Zone Routing Protocol (ZRP)

ZRP is a hybrid routing protocol for MANET. The purpose of this protocol is to
reduce the control overhead of proactive routing approaches and decrease the latency
caused by route search operations in reactive routing approaches.
ii.

The Hybrid Ad hoc Routing Protocol (HARP)

HARP is a hybrid routing scheme that exploits two level zones based hierarchical
network structure. Different routing approaches are utilized in two level, intra-zone
routing and inter-zone routing.
iii.

The Zone-based Hierarchical Link State routing (ZHLS)

ZHLS is a hybrid routing protocol. Mobile nodes are assumed to know the physical
location with assistance from location system such as a GPS. The network is divided
into non-overlapping zones based on geographical information. It uses hierarchical
address scheme that contains zone ID and node ID. Node determines its zone ID
according to its location and the pre-defined zone map well known to all nodes in the
network.
Table 2.2 summaries the MANET routing protocol table

15 | P a g e

Table 2.2: MANET Routing Protocol table

2.3.2 Mobility Pattern

Mobility pattern of nodes can be described by mobility models. The mobility models
are designed to describe movement pattern of mobile users and how their location,
velocity and acceleration changes over time. After the nodes are initially placed, the
mobility model dictates how the nodes move within the network. Mobility Model is
usually used for simulation purpose when new communication or navigation
techniques are investigated. It characterizes user movement patterns. After nodes
have been distributed, the mobility model dictates the movement of the nodes within
the network. Because the mobility of the nodes impact directly the performance of
the protocol, the results obtained with unrealistic movement model will not correctly
give definitive of the true performance of the protocol. Emre Atsan and znur
zkasap [2] describe "A better understanding of the behavior of mobility models and
using the appropriate ones give us a chance to achieve realistic conclusion from
simulations, which improves the validity of the result ".
16 | P a g e

There are two types of mobility model:


1. Entity/Individual mobility model :All node movement is independent of other node example such as Random
Waypoint, Random Direction and Random Walk
2. Group Mobility Model :A mobile node move dependent of one to another like Reference Point Group
Mobility Model, Column, Nomadic, Pursue and Exponential Correlated. The
pathways, Manhattan, obstacle are classified as geographical restricted model. Figure
2.6 show the classification of mobility model.

Figure 2.6: Classification of Mobility Model


2.3.2.1 Random Waypoint Model

It is widely used mobility model that emulates the mobile users in real time. The
nodes are placed at random location in the network. All the movement of the node is
independent with another node in the network. The nodes have a uniformly
distributed speed between [minSpeed, maxSpeed]. After arriving at the destination,
again waits for the same period of time before moving to new place.S.Balaji Gupya,
T.Navnrrth, S.Sundar and C.M.Vidhyapathi [3] describe " the movement of the
mobile node in Random Waypoint Mobility is similar to the Random Walk Mobility
if the pause time is set to zero and [minspeed, maxspeed] = [speedmin, speedmax]
".Figure 2.7 shows the random waypoint pattern
17 | P a g e

Figure 2.7: Random Waypoint Mobility

2.3.2.2 Manhattan Grid Model

Manhattan Model uses a grid road topology. The purpose of this topology is for the
movements in urban area, where the streets in organized manner and the mobile
nodes are allowed to move only horizontal or vertical direction. It also usually used
to emulate the movement pattern of mobile node on streets defined by maps. It is
also a model that is very similar to the Freeway Model. This model can be used in
Mobile Ad hoc Network (MANET) and Vehicular Ad hoc Network (VANET).
Figure 2.8 shows the Manhattan mobility pattern.

Figure 2.8: Manhattan Mobility Model

18 | P a g e

2.3.2.3 Gauss-Markov Models

In Gauss-Markov Models, each mobile node is commenced with speed and direction.
In fixed intervals of time, movement occurs to updating the speed and direction of
each node.
2.3.2.4 Freeway Model

The Freeway Model emulates the motion of mobile node on Freeway. It can be
implemented in exchanging traffic status or tracking vehicle on a Freeway. The
model makes several uses of the maps. There are several freeways on the maps and
each freeway has lanes in both directions. Every mobile node is limited to the lane on
the freeway. The velocity of mobile node is temporally dependent on previous
velocity. Figure 2.9 shows the freeway mobility pattern.

Figure 2.9: Freeway Model

2.3.3 Standard for MANET

MANET has two standards that are IEEE 802.11 standards and Bluetooth standard.
1. IEEE 802.11 Standards
IEEE 802.11 group protocol currently being develop for long-range communication
at much higher data rates and distance. The introduction of 802.11n as
implementation by Task Group N (TGn) stimulated lot of research in area of the
19 | P a g e

802.22 family of protocol. Many of the standards have been developed by IEEE
802.11 task force to improve communication in wireless network. It has different
characteristic in term of speed, throughput and compatibility of chipsets among
different vendors. The IEEE 802.11b is designed by the IEEE to have higher data
rates when operational and the frequency band of the operation is 2.4GHz. Other task
group or organization continues to improve the other standards such as IEEE 802.11
c, d, e, g, f and n.
IEEE 802.11 has become standard specifies MAC and physical layer for Wireless
LANs. The physical layer use different technologies like Frequency Hoping Spread
Spectrum (FHSS) and Direct Sequence Spread Spectrum (DSSS). MAC protocol
distributed coordinated function that has a carrier sense multiple accesses with
collision avoidance (CSMA/CA). Table 2.3 shows different wireless network.
Table 2.3: Summary of different wireless network

20 | P a g e

2. Bluetooth Standard
Bluetooth is a project that been develop by Special Interest Group SIG). Ajay Jangra,
Nitin Goel, Priyanka, Komal Kumar Bhatia [4] describe" Bluetooth was originally
started as a project by the Ericsson Company and later formalized by the
Bluetooth Special Interest Group (SIG), includes Sony Ericssion, IBM, Intel,
Toshiba and Nokia ".
Bluetooth is the de-facto standard for low-cost, short-range radio links between
mobile PCs, mobile phone and other portable devices. It has built-in short-range
radio transmitter. The data rate for Bluetooth is 1Mbps with 2.4GHz bandwidth.
Table 2.4 shows the standard for Bluetooth.
Table 2.4: Comparisons of Bluetooth Version

21 | P a g e

2.4 Comparison between previous project

Currently there are only a handful of real life simulation but the parameter of the
experiment are followed by using network simulation software.Current researcher are
using network simulation software to run simulation to study the impact of mobililty
mobile pattern on the ZigBee mobile network performance. The previus network
simulation parameter and procedure are follow to conduct the real life experiment.
Past Related

A DETAILED

Performance

Performance

A Simulation Study on

Project

STUDY OF

Analysis of Reactive

Analysis of MANET

the Impact of Mobility

MOBILITY

Routing Protocols

Routing Protocols

Models on the

MODELS IN

for City Scenario

over Different

Network Connectivity,

WIRELESS

Mobility Model in

Mobility Models

Hop Count and Lifetime

SENSOR

MANETs

Characteristics
Scope

of Routes for Ad hoc

NETWORK

Networks

Wireless sensor

Performance mobility

Performance

The high-level

networks (WSN) is

models on routing

comparison based on

contribution of this paper

emerging technology protocols in mobile ad

existing routing

is a simulation-based

finds variety of

protocols

analysis of the network

hoc networks.

applications in

connectivity, hop count

military, movement

and lifetime of the

tracking, industries

routes determined for ad

and medical fields.

hoc networks.

Mobility

Random Waypoint,

Random Waypoint,

Random Waypoint,

Random Waypoint model,

Model

Random direction,

Manhattan and City

Manhattan Grid,

Gauss-Markov model,

Random Walk,

Scenario model

Gauss-Markov,

City Section model and

Reference

(combination of

Reference Point

the Manhattan model.

Point Group

Random Waypoint

Group and

Mobility model,

Model and Manhattan

Heterogeneous

Column, Nomadic,

Model)

Mobility Models

22 | P a g e

Pursue, Exponential
Correated,
Manhattan
Routing
Protocol

DSR and DSDV

AODV and DSDV

DSDV, AODV and

AODV ,DSDV and DSR

DSR

23 | P a g e

CHAPTER III: RESEARCH METHODOLOGY

3.1 Introduction

This chapter discusses methodology used in the project. The method is followed to
achieve the objectives of the project. To run this project, the methodology for this
project is based on project approach.
The methodology involves six phases which are planning, research, implementation,
analysis, result and documentation.
3.2 Project Methodology

It begins with data and information gathering process which are related to the project
and objectives. The process of searching data involves finding information from
Internet, journal, article and previous project that have similarity with the project.
The project model methodology is used as a guideline in the project.

Figure 3.1: Project Methodology


24

The phases are dividing into 6 phase, which is Planning, Research, Implement, Analysis,
Result and Documentation.
3.2.1 Planning phase

In the planning phase, a problem is identified. To study the impact of mobility pattern on
the performance of ZigBee mobile network .There are not many of real life mobility
pattern research are being done Then, the solution is formulated by creating objectives
that can achieve the target. The planning to simulate mobility pattern using ZigBee
mobile network are being done. With the availability of the objectives, the project can
run smoothly and have direction for the project. In addition, the scopes of the project
need to be develop to make it easy to determine the scope of the project that need to be
reviewed. Then, propose an appropriate topic related to the scope, objectives and
problems that need to be solved.
3.2.2 Research phase

In research phase, it is very important to further the research to get better understanding
of the project that need to be done. In this phase, comprehensive studies need to be done
by reviewing previous projects, read research journals and understand the original
concept of the project. Also to study what MANET hardware is suitable for this project.
The hardware must meet the criteria of the project. After that, reviewed the methodology
to be applied in the project.
3.2.3 Implementation phase

In implementation phase, it involves the development of hardware and software for the
project. In this phase, the development of hardware design was developed by just plug in
the XBee series 2, XBee Shield and Arduino Uno. By using XBee Shield, it make a lot
easier to integrate the XBee series 2 and Arduino Uno. For the software design, the
source code from the Arduino playground. Than the source code are edit for suitable
need of the project. After the adjust source code are done. Upload the source code into

25

Arduino Uno. After that, the process can be carried out in real life simulation base on
random waypoint pattern.

3.2.4 Analysis phase

In this phase, the mobility pattern and routing protocol need to be analyzed to get the
result. The parameters for the experiment simulation are following using the network
simulation software. This analysis can prove which mobility pattern and routing protocol
that is suitable for MANET.
3.2.5 Result phase

In this phase, all project objectives and scope must be achieved. The data from the test
can be collected. All the raw data than need to be calculate manually. After that, the data
will be compare than the result will be analysis to show the result
3.2.6 Documentation phase

In the documentation phase, data collection and analysis that has been done will be
documented. Besides that, the result can be use for further study.

26

3.3 Hardware Requirement


3.3.1 SKXBEE

Figure 3.2 : SKXBEE

Figure 3.2 shows the SKXBEE module. SKXBee has been designed for 5V TTL logic
interface, no extra voltage divider is necessary. With minimum interface, it is ready to be
connected to microcontroller for embedded XBee development. Furthermore, on board
USB to UART converter offer easy yet reliable communication to PC for functionality
test and as XBee dongle.

SKXBee can support both XBee and XBee PRO because they are interchangeable and
Pin-to-pin compatible with each other.

Features of SKXBEE are:


Support both XBee and XBee PRO modules
USB Plug and Play UART function
5V powered
5V UART interface, ready for microcontroller interface
Default baud rate of 9600bps
Long Range Data Integrity
Low power consumption

27

Compact yet easy and reliable platform


As serial port replacement (wireless)
Point-to-point, point-to-multipoint and peer-to-peer topologies supported
Dimension: 8cm x 4cm

3.3.2 XBee-S2

Figure 3.3 : XBee-S2

Figure 3.3 shows the XBEE S2 module. It is XBee RF ZB (ZigBee) module, but often
refers to XBee Series 2. Series 2 improves on the power output and data protocol. Series
2 modules allow user to create complex mesh networks based on the XBee ZB ZigBee
mesh firmware. These modules allow a very reliable and simple communication
between microcontrollers, computers, systems, really anything with a serial port! Point
to point and multi-point networks are supported. These XBee Series 2 modules have the
same pin out as XBee Series 1
Features:

3.3V @ 40mA

Same pin out as XBee Series 1.

250kbps Max data rate

Default UART interface: 9600, 8-N-1


28

2mW output (+3dBm)

400ft (120m) range

Built-in antenna

Fully FCC certified

6 10-bit ADC input pins

8 digital IO pins

128-bit encryption

Local or over-air configuration

AT or API command set

3.3.3 XBee Shield

Figure 3.4: XBee Shield


Figure 3.4 shows the XBee shield module. The XBee Shield is a compliant solution
designed to meet low-cost, low-power wireless sensor networks with special needs. The
module is easy to use, low power consumption, and the provision of critical data
between devices reliable transmission. As the innovative design, XBee can be in the
range 2-3 times beyond the standard ZigBee modules.

29

3.3.4 Arduino

An Arduino is an open-source microcontroller development board. It can use the


Arduino to read sensors and control things like motors and lights. This allows to upload
programs to this board which can then interact with things in the real world. With this,
you can make devices which respond and React to the world at large. Basically, if there
is something that is in any way controlled by electricity, the Arduino can interface with
it in some manner. And even if it is not controlled by electricity, it can probably still
use things which are (like motors and electromagnets), to interface with it. The
possibilities of the Arduino are almost limitless.

Figure 3.5: Arduino Uno


The Arduino board actually is a specially designed circuit board for programming and
prototyping with Atmel microcontrollers. The nice thing about the Arduino board is that
it is relatively cheap, plugs straight into a computer's USB port, and it is dead-simple to
setup and use.

30

Some of the key features of the Arduino Uno include:


1.

An open source design. The advantage of it being open source is that it has a large

community of people using and troubleshooting it. This makes it easy to find someone to
help debug your projects
2.

An easy USB interface. The chip on the board plugs straight into USB port and

registers on your computer as a virtual serial port. This allows to interface with it
as through it were a serial device. The benefit of this setup is that serial
communication is an extremely easy (and time-tested) protocol, and USB makes
connecting it to modern computers really convenient.
3.

Very convenient power management and built-in voltage regulation. It can connect

an external power source of up to 12v and it will regulate it to both 5v and 3.3v. It also
can be powered directly off of a USB port without any external power.
4.

A 16 MHz clock. This makes it not the speediest microcontroller around, but fast

enough for most applications.


5.

13 digital pins and 6 analog pins. These pins allow connecting external hardware to

your Arduino. These pins are key for extending the computing capability of the Arduino
into the real world. Simply plug devices and sensors into the sockets that correspond to
each of these pins and you are good to go.
6.

An ICSP connector for bypassing the USB port and interfacing the Arduino

directly as a serial device. This port is necessary to re-boatload chip if it corrupts and can
no longer talk to the computer.
7.

An on-board LED attached to digital pin 13 for fast an easy debugging of code.

8.

And last, but not least, a button to reset the program on the chip

31

3.4 Software Requirement


3.4.1 X-CTU

Figure 3.6: X-CTU interface


Figure 3.6 shows the X-CTU interface. X-CTU is a window based application. This
program was designed to interact with the firmware files found on some of RF products
and to provide a simple to use graphical user interface (GUI) to them.
32

3.4.2

Arduino IDE

Figure 3.7: Arduino IDE interface

Figure 3.7 shows the Arduino IDE interface. The Arduino development environment
contains a text editor for writing code, a message area, a text console, a toolbar with
buttons for common functions, and a series of menus. It connects to the Arduino
hardware to upload programs and communicate with them.
Software written using Arduino are called sketches. These sketches are written in the
text editor. Sketches are saved with the file extension .ino. It has features for
cutting/pasting and for searching/replacing text. The message area gives feedback while
33

saving and exporting and also displays errors. The console displays text output by the
Arduino environment including complete error messages and other information. The
bottom right hand corner of the window displays the current board and serial port. The
toolbar buttons allow verifying and uploading programs, creating, opening, and saving
sketches, and open the serial monitor.
3.5 Project Gantt chart

Gantt chart is a graphical illustration of schedule that helps people to coordinate, plan
and track their specific tasks in the project. Gantt chart is very useful tools for people to
plan and schedule their project. This tool allows people to estimate the length of the time
need to complete the project and determine the resource that need in the project. When
project is underway, Gantt chart can monitor the project progress. Gantt chart can be
referred in Appendix A.

3.6 Work Breakdown Structure

Work Breakdown Structure is a deliverable oriented decomposition of a project into


smaller components. WBS is also a model of work to be performed in a project
organized in a hierarchical structure. WBS is important tool that can help project
manager to overview the project.

34

Figure 3.8: Final Year Project Work Breakdown Structure

3.7 Final Year Budget and Costing

Figure 3.8 shows the final year project work breakdown structure.This section shows the
overal project cost estimation. This project is about developing a system; the budget of
this project depends closely to the tools used in developing it which is hardware and
software. The estimate budget is shown in Table 3.1 and 3.2. Table 3.1 is shows
estimated cost for hardware; Table 3.2 illustrates the estimated cost for software. Budget
and costing are essential to produce a project, product or services.

35

Estimate cost for hardware:


Table 3.1: Hardware costing
Items

Price (RM)

Unit

Total (RM)

Laptop(Dell Studio XPS 16)

RM

4700.00

Personal

Arduino Uno R3

RM

79.00

Loan from UniKL

SKXBEE Board

RM

72.00

Loan from UniKL

Battery 9 V

RM

9.90

RM

9.90

Starter kit for Arduino Uno

RM

115.00

RM

115.00

XBee Series 2

RM

99.00

RM

297.00

XBee shield (without module)

RM

34.00

RM

102.00

Total

RM

232.90

Estimate cost for software:


Table 3.2: Software costing
Items

Price (RM)

Unit

Total (RM)

Arduino IDE

Freeware

Freeware

X-CTU

Freeware

Freeware

Total

RM

Free

36

CHAPTER IV: IMPLEMENTATITION OF ZIGBEE AD HOC NETWORK

4.1 Introduction

This chapter discusses the project implementation .It begins with hardware development
to software development. This is an essential stage to complete the research study of
Zigbee Mobile Network by using mobility pattern (Random Waypoint)
In this stage, the construction of hardware and experiment set up is done. Initially, the
project requirement are identified and studied in the pre-development phase.

The

development phase is divided into several stages, which include the implementation
of the hardware,

configuration of the hardware, coding the hardware, and finally

conduct experiment of Zigbee Mobile Network by using mobility model


pattern(Random Waypoint) . Figure 4.1 shows the experiment flow for Zigbee Mobile
Network study by using Zigbee standard. Typically, the Zigbee device has the default
Mobile Ad hoc (MANET) routing protocol which is Ad Hoc On-demand Distance
Vector Routing (AODV) protocol.
After commencing routing protocols, the sender node connects with the receiver node.
If the nodes are not connected, the XBee Series 2 and Arduino Uno R3 configuration
reconfigured. Upon connections set up between nodes, then the experiment for the
Mobility pattern movement is conducted.

37

Figure 4.1: Flowchart for Zigbee Mobile Network using


Random Waypoint Mobility Model

38

4.2 Hardware Implementation

The following illustrates the procedure of setting the XBee Series 2 for experiment.
1. Connect XBee Series 2 into the SKXBEE. After that, the usb cable from Laptop is
connected to SKXBEE to enable XBee to be configured. Figure 4.2 shows the XBee
connection.

Figure 4.2: XBee plug in into SKXBEE


2. Figure 4.3 shows the configuration of XBee Series 2 using X-CTU software

Figure 4.3: X-CTU interface


39

3. The Test/Query is activated to communicate with Modem(XBee). It will enable the


laptop to communicate with the XBee. Figure 4.4 shows that com4 establish the
communication between laptop and Modem(XBee)

Figure 4.4: X-CTU establish communication

40

4. Figure 4.5 shows the Modem Configuration tab. The read button is pressed and later it
shows the configuration and information about the Modem (XBee). The user is allowed
to configure the Modem (XBee) based on the network specification.

Figure 4.5: Modem (XBee) configuration and information

41

5. Figure 4.6 shows the interface to setup XBee PAN ID. Click the network icon to
configure the PAN ID. The ZigBee networks are called personal area networks or PANs.
Each network is defined with a unique PAN IDentifier (PAN ID). For the sender and
receiver node to communicate, the PAN ID must be identical. This identifier is common
among all devices of the same network. ZigBee devices are either preconfigured with a
PAN ID to join, or they can discover nearby networks and later choose a PAN ID to
associate. In this setup, the XBee PAN ID are configured using 7779 as the PAN ID.

Figure 4.6: Setup XBee PAN ID


42

6. Figure 4.7 shows the configuration for Sender Node. It can be done by setting Zigbee
Router AT. Then, the configuration is written into Modem (XBee) for sender node.

Figure 4.7 : Configuration for Sender Node

43

7. Figure 4.8 and Figure 4.9 show the configuration for Relay mode. The same step is
repeated to the sender node configuration to configure relay and receiver node. However
in function set, choose Zigbee Coordinator AT for relay and Zigbee End Device AT for
receiver.

Figure 4.8 : Configuration for Relay Node

Figure 4.9: Configuration for Receiver Node


44

8. Figure 4.10 shows the connection of XBee to XBee shield .After the configuration of
the Sender, Relay and Receiver XBee is completed. The XBee is connected to XBee
Shield platform. Using XBee Shield, it allows XBee to communicate with Arduino Uno.

Figure 4.10: Plug in XBee into XBee Shield


9. Figure 4.11 shows the integration between XBee, XBee Shield and Arduino Uno.
Then, plug in the XBee Shield with XBee into Arduino Uno. By using XBee Shield, it
allows the user to conveniently program the Arduino Uno without removing the XBee.
The users only need to switch the mode XBEE to USB and from RUN mode to PROG
mode.

Figure 4.11: Integration Between XBee, XBee Shield and Arduino Uno
45

4.2 Software Implementation


The software development is done via GUI system. The Arduino IDE is used to write
the compiled code into Arduino microcontroller. The GUI system is convenient to be
used because the USB port is commonly available and widely used on computer. This
Arduino IDE offers reliable, high speed programming and free windows interface
software.
The following illustrates the procedure of setting the Arduino for experiment.
1. The Arduino board and USB cable are prepared beforehand.
2. The Arduino environment from Arduino Website is downloaded. Later the file is
decompressing with the folder name preserved. Figure 4.12 illustrates the step.

Figure 4.12: Arduino IDE folder


3. The Arduino Microcontroller is connected. The Arduino Uno draw power from either
the USB connection to computer or Adapter 5V. It also can be powered on using Power
Bank by using USB cable. The green power LED should go on indicate the device has

46

sufficient power and able to be operated. Figure 4.13 show an Arduino Uno power up
using USB cable.

Figure 4.13: Arduino Uno power up using USB Cable


4. The Arduino Uno driver is installed with windows7. The Arduino microcontroller
remains connected until the driver installation is completed.
5. Figure 4.14 shows the Arduino IDE software.

Figure 4.14 : Arduino IDE interface

47

7. Figure 4.15 shows the Arduino IDE selection board. The entry in the tools > board
menu that corresponds to the Arduino board used is selected.

Figure 4.15: Arduino IDE selection Board

48

9. Figure 4.16 shows serial port selection. The serial device of the Arduino board from
tools serial port menu is selected.

Figure 4.16: Arduino IDE selection Port

49

10. Figure 4.17 shows the code and the corresponding process of uploading to the
board. To do this, button upload in the environment is pressed. After that, the rx and tx
leads on the board is flashing. When the upload is successful, the message done
uploading appears in the status bar. The source code into is uploaded sender and
receiver Arduino Uno. The source code can be referred at Appendix B and C. The
source code includes the Time Stamp code and Packet Size for Appendix B and Time
Stamp in Appendix C.

Figure 4.17: Uploading Source Code into Arduino Uno

50

4.3 Network Diagram

Network diagram in Figure 4.18 indicates the network design for the project. It contains
of the proportion of network devices in the PAN for Zigbee. The purposes of design the
network to show the process of data are sending from sender to receiver.

Figure 4.18: Network Diagram

51

CHAPTER V: TESTING AND RESULT

5.1 Introduction
This chapter discusses the impact of mobility on the performance of ZigBee mobile
network. After the software and hardware implementation development, all the modules
are integrated to each other. The system is then tested to ensure the system meet the
requirements and achieves all the objectives. The Average End-to-End Delay, Total
Packet and packet delivery ratio are the three measurement used to study the impact of
mobility on the Performance of ZigBee mobile network using random waypoint mobility
pattern.. The behavior of the node is also discussed to show its functionality and output.
5.2 Metrics
The metrics used to study the impact of mobility on the performance of ZigBee mobile
network by using random mobility model pattern. To evaluate the performance, the
metrics shown in the subsequent section are discussed
5.2.1 Average End-to-End Delay

Average End-to-End Delay is an average time delay from source node to destination
node. It counts all possible delays that can occur in the source mode and all intermediate
nodes, including queuing time, packet transmission and propagation, and retransmission
at the MAC layer. The queuing time can be caused by network congestion or
unavailability of valid routes. Average end-end delay computation is shown by equation
5.1:
Average End-to-End Delay = (Arrive time - Send time)

...5.1

Number of connection

52

5.2.2 Packet Delivery Ratio

The ratio of the number of data packets successfully delivered to all destination
nodes and the number of data packets generated by all source nodes. Packet delivery
ratio formula computation is shown by equation 5.2:
Packet Delivery Ratio = Number of packet receive

...5.2

Number of packet send

5.2.3 Throughput

The throughput is amount of data received by destination. It metric measure


how well the network can constantly provide data to the sink. Throughput
formula computation is shown by equation 5.3:
Throughput

= (received size / (stop time - start time)) * (8 / 1000)

...5.3

53

5.3 ZigBee range experiment


This section discusses the radio ability of ZigBee transmitter to connect with
ZigBee receiver. The 5.1 shows the result of ZigBee range
Table 5.1 ZigBee range
Range (Meter)

ZigBee Analysis

Meter 1 to meter 20

The ZigBee receive the data from sender


accurately

Meter 21 to meter 40

The ZigBee receive the data from sender


accurately

Meter 41 to meter 60

The ZigBee receive the data from sender


accurately

Meter 61 to meter 80

There was a delay between the sender and


receiver data

Meter 81 to 100

After 85 meter there was no data received


at the receiver.

54

5.4 Testing connection between sender and receiver

1. Figure 5.1 shows two Arduino Uno interface, which allow the Sender and Receiver
node to be monitored at the same time using one laptop.Com 5 represent Sender node
and Com 8 represent Receiver node

Figure 5.1 Two Arduino Uno interface

55

2. After that, the Serial Monitor icon to monitor packet sent and received is pressed.
Com 5 is the Sender node and Com 8 is the Receiver node. The packet that being sends
forms the sender to receiver is the "ABCDEF". Figure 5.2 shows the packet from sender
to receiver via XBee.

Figure 5.2 Packets from Sender to Receiver via XBee

56

3. To capture the packet lifetime, there are two method can be employed. If the user use
window 7 operating system, user have to use the epoch time, than type T (epoch time)!
On the other hand for Ubuntu operating system, use the command referred in Appendix
D in the terminal. Figure 5.3 and 5.4 shows the captured timestamp

Figure 5.3 Real Time Stamp using Window 7

Figure 5.4 Real Time Stamp using Ubuntu


57

5.3 Random Waypoint mobility pattern

Figure 5.5 Random Waypoint Pattern


From the ZigBee range experiment, it shows that a suitable network area size to
implement the experiment is by using the dimension of by 70mX30m. In Figure 5.5, it
shows a random waypoint pattern created randomly. The red line represents the receiver
node path from point A to F and the blue line represent sender path from point A to F.

The

represent the relay for sender and the receiver node. The experiment are

conducted by using the network area size of 70mX30m to produce result for the study.
The sender and receiver node are carried using motorcycle as the medium of transport to
create an simulation movement for Random Waypoint pattern, while the relay are set as
stationary.

58

5.5 Result
Based on experiment conducted, the measurement of Total Packet, Average End-to-End
Delay, Packet Delivery Ratio and Throughput are collected. Each calculation of the
performance metric can be referred in equation 5.1, 5.2 and 5.3.

Figure 5.6 Total Packet Graph


In Figure 5.6, packets are substantially lost at 5km/h. On the other hand, the node speeds
of 20km/h incur the lowest packet lost. The primary reason of packet lost at lower
velocity i.e. 5km/h, is may be due to slow convergence of route reconnection. For
instance, when nodes are moving at low speed and the sender and receiver separation
distance are high, the route establishment process is severely affected. As shown in
Figure 5.5, the sender and receiver are located at the two ends of the network area. As
such, when the sender attempt to establish connection, it constantly fails. on the
contrary, when the speed of node are increased, the nodes i.e. sender and receiver, may
frequently be in proximity. Therefore, route establishment is more rapid. However, route
breakage may also occur. Based on the experiment, it shown that at lower speed, route
connection may be affected in Random Waypoint Mobility Pattern. The ideal speed for
routing protocol i.e. AODV, to operate is within the velocity of 20km/h.

59

Figure 5.7 Packet Delivery Ratio Graph


Figure 5.7 shows the Packet Delivery Ratio. It is the ratio of the number of packet
delivered to the number of packet received by the destination node. In short, the greater
packet delivery ratio, the better performance for the network. In the experiment, the
velocities of 10km/h offer the highest packet delivery ratio for AODV. On the other
hand, at 15km/h, the packet delivery ratio is the lowest. In addition, the packet delivery
ratio result shows that at 15km/h, the performance is reduced to nearly haft. This may be
due to the effect of external noise. Note that the experiment is conducted in an open
space; however, external elements such as weather may affect the result.

Figure 5.8 Average End-to-End Delay Graph


60

Figure 5.8 shows the Average End-to-End Delay. It is the average time taken by a data
packet to arrive at in the destination. It also includes the delay caused by route discovery
process and the queue in data packet transmission. Only the packets that successfully
delivered to destination that counts. A lower value of average end to end delay is ideal
for application which requires low latency such as voice over IP phone

Figure 5.9 Throughput Graph


Figure 5.9 shows the throughput. It refers to how much data can be transferred from one
location to another in a given amount of time. It is typically used to measure the network
connection performance. Based on the experiment, the at 10km/h, the throughput is the
high set while at 15km/h the throughput is the lowest. It is observed that the result is
consistent with Figure 5.7. The throughput is closely related to the packet delivery ratio
and the nodes offer the lowest performance at 15km/h.

61

Table 5.2 shows the complete result from the experiment conducted. The raw data can be refer in Appendix D
Table 5.2 Full Result
Packet

Packet Delivery

Average

Total

Total

Total Byte Receive

Speed

Total Packet

Packet Lost

Receive

Ratio

Delay

Byte

Byte Lost

Throughput

179

62

117

0.654

7s

1074

372

702

0.024

10

180

53

127

0.706

3s

1080

318

762

0.032

15

119

60

59

0.496

4s

714

360

354

0.008

20

118

40

78

0.661

3s

708

240

468

0.021

25

181

60

121

0.667

5s

1080

360

729

0.024

62

CHAPTER VI: CONCLUSION AND SUGGESTIONS

6.1 INTRODUCTION

This chapter discusses about the project conclusion and recommendation. The
conclusion is a complete summary of the whole project, and it also known as
complete result of the project. From the project itself, a lot of challenges faced upon
finishing the research study of this project.
6.2 CONCLUSION

The project shows the capability of ZigBee technology and the impact of mobility on the
network performance. Although the project is completed it still need a lot of
improvement. Analysis and observation were conducted to test the impact of mobility on
the performance of ZigBee mobile network. To develop a reliable system in a real
environment requires significant effort. There are many elements of the technology
which has not been considered. Each can have influence on the performance of
MANET. Arduino IDE is the software used to interface the entire component to
microcontroller. In general, the system operated as expected even though there were
many difficulties encountered throughout the project. As such the objectives of the
project are successfully fulfilled.
The same movement models, size of network area and number of nodes were used and
the variable for the real life simulation parameter is the velocities of the node speed. By
using random waypoint as the mobility model pattern and ZigBee and Arduino Uno as
the network node, it is observed that the velocities of the node speed can affect the result
of the experiment as can be seen in the result in chapter 5. From the experiment, it is
shown that the packet varies lost if the velocities of the node speed are changed. One of

63

the factor that can affect the experiment result is the distance between sender and the
receiver at a certain point.

6.3 SUGGESTIONS
During the implementation of the hardware and software development, a few obstacles
were faced that could not be dealt with due to lack of knowledge and sufficient time. A
few suggestions and comments were also obtained during the FYP 2 presentation. The
following are a few suggestions and future recommendations that can be done

1. Increase the number of node


By increase the number of node, it maybe can help reduce the delay and the packet lost.

2. Intergrades GPS system


It can help to calculate the distance between sender and receiver while the node are
mobile.

3. Implement storage system/database


Currently, all the packets are capture manual. if the packet can be store into the database,
it will help to calculate packet more easier

4. Use different mobility model pattern


This experiment result are base on one mobility model pattern that in random waypoint.

64