directed diffusion protocol in wireless sensor …

46
DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR NETWORK USING NS2 FATIN NUR ATIKAH BINTI ZAINALABIDIN BACHELOR OF COMPUTER SCIENCE (COMPUTER NETWORK SECURITY) WITH HONOURS UNIVERSITI SULTAN ZAINAL ABIDIN 2021

Upload: others

Post on 07-Nov-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

DIRECTED DIFFUSION PROTOCOL IN

WIRELESS SENSOR NETWORK USING NS2

FATIN NUR ATIKAH BINTI ZAINALABIDIN

BACHELOR OF COMPUTER SCIENCE

(COMPUTER NETWORK SECURITY)

WITH HONOURS

UNIVERSITI SULTAN ZAINAL ABIDIN

2021

Page 2: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR NETWORK

USING NS2

FATIN NUR ATIKAH BINTI ZAINALABIDIN

BACHELOR OF COMPUTER SCIENCE

(COMPUTER NETWORK SECURITY) WITH HONOURS

UNIVERSITI SULTAN ZAINAL ABIDIN

2021

Page 3: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

i

CONFIRMATION

This Directed Diffusion protocol in Wireless Sensor Network using NS2 project

report was prepared and submitted by Fatin Nur Atikah Binti Zainalabidin (Matric

Number BTBL18050284) and has been found satisfactory in terms of scope, quality,

and presentation as partial fulfillment of the requirement for the Bachelor of Computer

Science (Computer Network Security) with honors in University Sultan Zainal Abidin.

Signature: …………………………

Name: Dr. Nor Aida Binti Mahiddin

Date: ………………………………

Page 4: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

ii

DECLARATION

I hereby declare that this report is produced based on my original work with the

aid and of obtaining information from the sources. The work is a result of my

investigation. I would also declare that report has been previously or concurrently

submitted for any other degree at University Sultan Zainal Abidin (UniSZA) or other

institutions.

Signature: ……………………………..

Name: FATIN NUR ATIKAH BINTI ZAINALABIDIN

Date: …………………………

Page 5: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

iii

DEDICATION

The praised is for Him, the Lord of the entire world, in the name of Allah, the

Most Gracious and The Most Merciful. May His grace be on Muhammad S.A.W his

beloved Prophet and his whole family. I served Him as a big Alhamdullilah to give me

enough fitness, time, and maturity to plan and finish this report.

I want to thank those who gave me the chance to finish this report. I would like

to thank you very much. A special thank you for encouragement, ideas, support,

critique, and advice from beginning to end for my supervisor Dr. Nor Aida Binti

Mahiddin, who helped me to finish this final year report. I would like to like to express

my appreciation to my panels of honor, Dr. Aznida Hayati binti Zakaria @ Mohamad

and Dr. Danial Bin Zakaria for their thoughtful questions and comments regarding my

research.

Last but not least, anytime I feel like giving up, I am happy to thank my parents

and my friends for giving my entire life moral support and motivation. Besides, I am

thankful for the attention, advice, and consultation of all the lecturers from the Faculty

of Informatics and Computing. To all panel involved in the review and offering helpful

feedback and opinions. I thank you so much for your guidance.

May Allah S.W.T blessed all the effort for finished this final year project.

Page 6: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

iv

ABSTRACT

Thousands of small nodes with sensing, computer, and wireless capacities are

included in the Wireless Sensor Network (WSNs). Many protocols have been developed

especially for WSNs, routing, power control. Where energy consumption is an

important challenge in architecture. Since the network of wireless sensors is device-

specific, the emphasis has also been put on routing protocols that could differ according

to the application and the network architecture. A classification of the various methods

pursued is provided by the study of different routing protocols for sensor networks. The

three key types under consideration are data-centered, hierarchical, and locational. The

general purpose of each routing system and algorithm is to enhance the performance

and prolong the lifespan of the sensor network. Many current WSN routing protocols

believe the benevolent wireless network and node in the network is compatible with

routing practices. Most of the protocols are suitable for modifying topology

dynamically. However, when wrongdoing nodes are involved in the network, the

problems are not resolved. Box drop is a misconduct that is sometimes experienced. In

Page 7: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

v

WSN, most computers are virtually minimized by computational and battery capacity,

whereas package forwarding uses many such tools. The architecture of WSN protocols

must take into account the network node intensity and resource limitations, the time

delays in wireless channel quality, and the possibility of packet loss and delay. To meet

these design requirements, a range of WSN design strategies have been proposed. Short

for Tool Command Language, the programming language is entirely compliant with C,

and Tcl libraries are completely interoperable with C programs. Network Simulator is

a discrete event network simultaneous device, where a scheduler maintains the

synchronization of events and can model multiple types of networks (an object-oriented

extension of Tcl). The compiled hierarchy of C++ programming makes the simulation

and execution times more efficient. The OTcl script is written for the particular

topology, protocols, and specifications of the users of network models. OTcl can also

set the type of output by the simulator. NS2 is an event-driven, Linux-based network

emulator that can be deployed.

Page 8: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

vi

ABSTRAK

..

Beribu-ribu nod kecil dengan sensor komputer, dan kapasiti tanpa wayar

dimasukkan ke dalam Rangkaian Sensor Tanpa Wayar (WSNs). Pelbagai protokol telah

dibangunkan terutamanya untuk WSN, penghalaan, kawalan kuasa. Di mana

penggunaan tenaga adalah cabaran penting dalam seni bina. Oleh kerana rangkaian

sensor tanpa wayar adalah khusus peranti, penekanan juga telah dimasukkan ke dalam

protokol penghalaan yang boleh berbeza mengikut aplikasi dan seni bina

rangkaian.Klasifikasi pelbagai kaedah yang dikejar disediakan oleh kajian protokol

penghalaan yang berbeza untuk rangkaian sensor. Tiga jenis utama yang sedang

dipertimbangkan adalah berpusat data, hierarki, dan lokasi.Tujuan umum setiap sistem

penghalaan dan algoritma adalah untuk meningkatkan prestasi dan memanjangkan

jangka hayat rangkaian sensor.Banyak protokol penghalaan WSN semasa percaya

rangkaian tanpa wayar yang berfaedah dan nod dalam rangkaian serasi dengan amalan

penghalaan. Kebanyakan protokol sesuai untuk mengubah suai topologi secara

dinamik.Walau bagaimanapun, apabila nod salah terlibat dalam rangkaian, masalah

tidak diselesaikan. “Box drop” adalah salah laku yang kadang-kadang dialami. Dalam

Page 9: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

vii

WSN, kebanyakan komputer hampir diminimumkan oleh kapasiti pengiraan dan bateri,

manakala pengemukaan pakej menggunakan banyak alat tersebut. Seni bina protokol

WSN mesti mengambil kira keamatan nod rangkaian dan batasan sumber, kelewatan

masa dalam kualiti saluran tanpa wayar, dan kemungkinan kehilangan paket dan

kelewatan. Untuk memenuhi keperluan reka bentuk ini, pelbagai strategi reka bentuk

WSN telah dicadangkan.Pendek untuk Bahasa Perintah Alat, bahasa pengaturcaraan

sepenuhnya mematuhi C, dan perpustakaan Tcl benar-benar saling berkaitan dengan

program C. NS adalah rangkaian acara yang jelas peranti serentak, di mana penjadual

mengekalkan penyegerakan peristiwa dan boleh memodelkan pelbagai jenis rangkaian

(sambungan berorientasikan objek Tcl).Hierarki yang disusun pengaturcaraan C

menjadikan simulasi dan pelaksanaan kali lebih cekap.Skrip OTcl ditulis untuk

topologi, protokol, dan spesifikasi pengguna model rangkaian tertentu.OTcl juga boleh

menetapkan jenis output oleh simulator. NS2 adalah emulator rangkaian berasaskan

Linux yang boleh dikerahkan.

Page 10: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

viii

TABLE OF CONTENTS

PAGE

CONFIRMATION .................................................................................................................... i

DECLARATION .......................................................................................................................ii

DEDICATION .......................................................................................................................... iii

ABSTRACT .............................................................................................................................. iv

ABSTRAK ................................................................................................................................ vi

TABLE OF CONTENTS....................................................................................................... viii

LIST OF TABLES .................................................................................................................... x

LIST OF FIGURES ................................................................................................................. xi

LIST OF ABBREVIATION ................................................................................................... xii

LIST OF APPENDENCIES .................................................................................................. xiii

CHAPTER 1 ............................................................................................................................. 1

INTRODUCTION .................................................................................................................... 1

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

1.2 Problem Statement ................................................................................................... 3

1.3 Objectives .................................................................................................................. 3

1.4 Scopes ........................................................................................................................ 3

1.5 Limitation of Work .................................................................................................. 4

1.6 Summary ................................................................................................................... 4

CHAPTER 2 ............................................................................................................................. 5

LITERATURE REVIEW........................................................................................................ 5

2.1 Introduction .............................................................................................................. 5

2.2 Performance parameters ......................................................................................... 5

2.2.1 Energy Consumption ....................................................................................... 5

2.2.2 Delay .................................................................................................................. 6

2.2.3 Throughput ....................................................................................................... 6

2.3 Data Centric ............................................................................................................. 7

2.4 Directed Diffusion .................................................................................................... 7

2.5 NS2 ............................................................................................................................ 8

2.6 Comparison routing protocols ................................................................................ 9

2.7 Comparison of few existing routing protocols ..................................................... 11

2.8 Comparison of network simulator ........................................................................ 16

Page 11: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

ix

2.9 Summary ................................................................................................................. 18

CHAPTER 3 ........................................................................................................................... 19

METHODOLOGY ................................................................................................................ 19

3.1 Introduction ............................................................................................................ 19

3.2 Research of Methodology ...................................................................................... 19

3.3 Framework ............................................................................................................. 21

3.4 Flowchart ................................................................................................................ 23

3.5 Proof of concept ...................................................................................................... 25

3.5.1 (Installation of Ubuntu in Virtual Box) ........................................................ 25

3.5.2 (Installation of NS2) ....................................................................................... 26

3.5.3 (Installation of NAM-Network Animator) ................................................... 27

3.6 Hardware and software requirement ................................................................... 28

3.7 Summary ................................................................................................................. 29

Page 12: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

x

LIST OF TABLES Table 2.6.1: Routing Protocols Comparison .............................................................................. 9

Table 2.7.1: Comparison of Few Existing Routing Protocols ................................................. 11

Table 2.8.1: Network Simulator Comparison .......................................................................... 16

Table 3.6.1: List of hardware used ........................................................................................... 28

Table 3.6.2: List of software used ............................................................................................ 28

Page 13: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

xi

LIST OF FIGURES Figure 2.5.1 Basic Architecture of NS-2 Simulator [1] ............................................................. 8

Figure 3.2.1: Research Methodology ....................................................................................... 20

Figure 3.3.1: Framework of Directed Diffusion Protocol ........................................................ 22

Figure 3.4.1: Data Model (Flow diagram of Sequenced DD routing Scheme) ........................ 24

Figure 3.5.1: Ubuntu has been install ...................................................................................... 25

Figure 3.5.2: Ubuntu has been create in Virtual Box ............................................................... 25

Figure 3.5.3: NS2 has been install in Ubuntu .......................................................................... 26

Figure 3.5.4: NAM that has install ........................................................................................... 27

Figure 3.5.5: File NAM has been shown ................................................................................. 27

Page 14: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

xii

LIST OF ABBREVIATION

WSN Wireless Sensor Network

DD Directed Diffusion

NS2 Network Simulator 2

SPIN Sensor Protocols for Information via Negotiation

GBR Gradient-based Routing Protocol

AODV Ad-hoc On-demand Distance Vector

NAM Network Animator

AWK Programming language

TCP Transmission Control Protocol

UDP User Datagram Protocol

FDP Foundry Discovery Protocol

OTcl Object Tcl

OMNeT Objective Modular Network Testbed

OPNET Optimized Network Engineering Tool

MATLAB Matrix Laboratory

P_SN Priority Sensor Node

Page 15: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

xiii

LIST OF APPENDENCIES

APPENDIX TITLE PAGE

Page 16: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

1

CHAPTER 1

INTRODUCTION

1.1 Background

During this golden age of technology, the Internet has become an integral part

of life and people rely heavily on the internet for their everyday activities. The

Internet is a vast network of networks. A network is several computers and other

devices, which can transfer data from one device to another and retrieve data. An

active field of study is a wireless sensor network with several conferences and

meetings scheduled annually. Wireless Sense Networks (WSN) is a group of

hundreds or thousands of micro sensor nodes that can be sensed, connect wireless,

and execute device and processing tasks[1].

Directed diffusion is substantially different from communications in the IP style,

where nodes are identified by their endpoints and connectivity between nodes is

focused on end-to-end network services. When the network is guided, nodes are

app-aware, as we allow application-specific code to run in the network and promote

the diffusion of messages in processing[5].

Page 17: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

2

In the manner that data is transmitted from the source sensors to the sink, data-

centric protocols vary from conventional address centre protocols. Each source

sensor with the necessary data in address-centered protocols responds by sending

its data to the sink irrespective of all other sensors. However, when the source

sensors transmit their data to the data center protocols.

Sink, intermediate sensors can aggregate data from multiple spring sensors into

a particular way and send aggregated data to the sink. Due to the decreased energy

transfer needed to transfer data from the sources to the sink, this method will save

electricity. Data-centric routing is used in Wireless Sensor Networks to monitor data

redundancy. This is because the sensor nodes do not have an independently defined

global identifier; thus, data is passed with considerable redundancy to each node.

Using Directed Diffusion is a task-specific to the sensor network. Until

implementation, the network's activities are also known[3].

Page 18: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

3

1.2 Problem Statement

However, they do not address the problems when misbehavior nodes are present

in the network. A commonly observed misbehavior is packet dropping. Practically,

in a WSN, most devices have limited computing and battery power while packet

forwarding consumes a lot of such resources. The design of routing protocols for

WSN’s must consider the power and resource limitation of the network nodes, the

time-varying quality of wireless channels, and the possibility of packet loss and

delay.

1.3 Objectives

i. To study about Directed Diffusion Protocol.

ii. To simulate Directed Diffusion Protocol in NS2 simulation tools.

iii. To analyze the performance of the Directed Diffusion protocol.

1.4 Scopes

i. To implement the Directed Diffusion routing protocol using the NS2 simulation tool.

ii. To evaluate the performance of Directed Diffusion protocols in WSN.

Page 19: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

4

1.5 Limitation of Work

There is some limitation of work to do this project, among them are the overall

bandwidth of the networks is rather wasteful. While only one destination is possible

for a post, it must be sent to any host. This raises the network's full load. Messages

can also repeat themselves in the network and add to the burden on the network

bandwidth and ignore duplicate messages while raising the processing complexity.

Driven diffusion uses an energy-saving naming method for the details[4].

Then, continuous data supply ‘e.g. environmental monitoring’ or event-driven

systems cannot be used. The storage of data caching inside the sensor node is

limited. Data aggregation will also be influenced.

1.6 Summary

This chapter discusses a few topics, such as background, problem statement,

purpose, and job limits, in the initiation of the project. The goal of this project was

to solve the environmental crisis. It, therefore, adds to the organization of

successful project documents.

Page 20: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

5

CHAPTER 2

LITERATURE REVIEW

2.1 Introduction

This chapter provides an overview of what is Directed Diffusion protocol. The

next section discusses the importance of Directed Diffusion Protocol In Wireless Sensor

Network, previous research, a routing protocols comparison, comparison of new

existing routing protocols, and lastly is network simulator comparison.

2.2 Performance parameters

2.2.1 Energy Consumption

For every WSN, this is a key design element. To extend the network's lifespan,

electricity consumption can be reduced. In reality, "power conservation" is a distinction

between WSN architecture and the construction of other wireless network types. QoS

parameters such as 'delay, efficiency, justice,' may be viewed as key design criteria. On

this basis, research efforts seek to establish power-conscious protocols and sensor

network algorithms. In every point of the creation of the WSN power-consciousness

Page 21: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

6

should be integrated. In reality, a consciousness of power imposes limitations on the

size and sophistication of the platform of a sensor node. In reality, a consciousness of

power imposes limitations on the size and importance of the platform of a sensor node.

The sensor node hardware should be configured to be power-efficient in this case[5].

2.2.2 Delay

A packet transmission through intermediate networks can take a long time to

wait. It is possible to calculate this as round trip times insecure protocols when a receiver

knows that and batch of data is supplied. Due to an issue of congestion, some time in

the network can take place. This increases the delay and limits the reliability of data

transfer. Delay factor impacts network efficiency directly[6].

2.2.3 Throughput

The success is how much work a loop has done. The difficulty of designing a

data-gathering network 10 to optimize network capacities lies in the emergence of

sensor nodes with improved connectivity and sensing capability. Channel sharing leads

to congestion issues with higher data transfer. When simultaneous broadcasts are

carried out, the influence of interference becomes increasingly necessary to improve the

capability of the wireless network. In these cases, it is impossible to reach high

performance and low time[7].

Page 22: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

7

2.3 Data Centric

The data centric protocol is a source node that queries an attribute for the

phenomenon rather than an individual sensor node. The interest dissemination is

achieved by assigning tasks to the sensor node and expressing queries relative to

specific attributes. Different strategies can be used to communicate interests to the

sensor nodes, including broadcasting and attributes-based multicasting[8].

2.4 Directed Diffusion

Directed Diffusion is a scalable and robust communication paradigm for

sensor networks. Directed Diffusion classification as Flat or Data-Centric. Data

delivered by DD is Demand-Driven, and the communication data is named by

attributing the value pairs[9].

Page 23: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

8

2.5 NS2

NS-2 is the network open-source emulator that operates on various UNIX (or

Linux), Windows, and Mac platforms. NS-2 is commonly used in the simulation over

wired and wireless networks with diverse network elements and protocols such as

routing, TCP, UDP, FTP as well as traffic sources like CBR. NS2 offers a key way for

the specification and simulation of certain network protocols. The NS-2 has earned

considerable admiration in the fields of networking research in the area of versatility

and modularity. NS-2 is NS2.35 the current update[1].

NS-2 is based entirely on the programming of Object-Oriented (OO), so is also

known as Object-oriented Discrete Event Simulator. There are two languages: C++ and

Object-oriented Command Language Tool (OTcl).

The key role of OTcl scripts is the initialization of the simulator, the setup of

network topology, the development of network scenarios, and the show of simulatory

performance. The Tcl is used to link C++ and OTcl together. NS-2 consists of 3,00,000

codes and is free of charge and used worldwide in research institutions [1].

Figure 2.5.1 Basic Architecture of NS-2 Simulator [1]

Page 24: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

9

2.6 Comparison routing protocols

Table 2.6.1: Routing Protocols Comparison

Routing

Protocols

Classification Data delivery

model

Data

Aggregation

Multipath Advantages Drawbacks

Directed

Diffusion (DD)

Flat / Data

Centric

Demand-Driven Yes Yes Allows on-demand data

queries while SPIN

allows only interesting

nodes to query.

Unlike SPIN, there is

no need to maintain

global network

topology

Matching data to

queries might

require some extra

overhead at the

sensor nodes.

Sensor

Protocols for

Information via

Flat / Data-

Centric

Event-Driven Yes Yes Topological changes

are localized, each

Data advertisement

mechanism cannot

Page 25: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

10

Negotiation

(SPIN)

node needs to know its

single-hop neighbors.

Reduces energy

consumption compared

to flooding.

guarantee the

delivery of data

Gradient-Based

Routing (GBR)

Flat Hybrid Yes Yes Nodes in GBR deliver

the message in a point

to point manner and do

not use the broadcast

nature of the wireless

network

The nodes in GBR

which are near the

sink will be

overused and will

die before others.

The failure of these

nodes leads to the

failure of the entire

network.

Page 26: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

11

2.7 Comparison of few existing routing protocols

Table 2.7.1: Comparison of Few Existing Routing Protocols

TITLE Classical and

swarm

intelligence

based routing

protocols for

wireless sensor

networks: A

survey and

comparison

(2012)

Load balancing

mechanism for

data-centric

routing in

wireless sensor

networks (2014)

Performance

Comparison of

Reactive and

Proactive

Routing

Protocols in

Wireless Sensor

Network (2014)

Performance

Analysis of

Routing

Protocols for

Target

Tracking in

Wireless Sensor

Networks

(2016)

Revisiting

Directed

Diffusion In

The Era Of

IoT-WSNs:

Power Control

For Adaptation

to High Density

(2017)

Event-Driven

Routing

Protocols For

Wireless Sensor

Networks (2018)

NODE 30 13 20 & 40 50,100,500 100 10,25,50,75,100

& 150

Page 27: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

12

TRANSMISSION

RANGE

(METER)

- 108 - 100 - 400 50 250

SIMULATION

TIME (SEC)

100 100 150 300 500 500

AREA

(SQUARE

METER)

- 1000 x 500 2000 X 2000 1000 x 1000 - 220 x 220

Name of

Simulator

NS2 NS2 NS2 NS2 Not Stated NS2

Page 28: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

13

According to (Adamu et al, 2012), The development of Wireless Sensor

Network (WSN) protocols to meet the extreme hardware and resource limitations is a

key problem with high-efficiency routing. This article gives a detailed analysis and

WSN routing protocols contrast. Comparison. The first portion of the paper explores

state-of-the-art WSN protocol routing from conventional protocols of routing to swarm

intelligence. According to the machine sophistication, network structure, energy

efficiency, and road construction, the routing protocols are graded. A comparison of a

variety of classic and swarm-based protocols is given in the second part of the paper.

Currently, it is very difficult for protocol designers to equate routing protocols in WSN.

To perform comparisons, algorithms are always time-consuming to re-create and

simulate in published articles. The problem is that certain criteria for simulation and

output assessments could not be suggested. We see a need for standard simulation and

efficiency assessments in the testing community[2].

According to (Fouzi et al, 2014), One of the most difficult in recent years has

been route protocols in wireless sensor networks. The goal of several works to route

data to less energy consumption and to increase the network life was to propose an

effective and sufficient routing protocol. This paper discusses a new version of the

Guided Diffusion comparison routing protocol. The version, which we call DDLB, is

intended to improve the DD algorithm by the implementation of a load balance

mechanism so that the energy of the sensors is balanced and the network life is

increased. Results of the simulation inside the simulator network 2 (NS2)[8].

According to (Akshita et al, 2014), Wireless Sensor Network (WSN) is an

organized and autonomous community of spatially-distributed sensor nodes. They are

wirelessly linked. Due to wireless network capacity constraints, wireless sensor routing

is somewhat distinct from the conventional wireless network. UDP is used for

Page 29: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

14

communicating to solve those shortcomings that jeopardize connectivity efficiency. In

this analysis, three routing protocols from different categories were evaluated for their

results. In various wireless sensor networking scenarios (varying number of nodes and

network type) we evaluated the efficiency of AODV, Guided Diffusion, and SPIN

routing protocols with TCP instead of the UDP for establishing communication.

Network Simulator (NS-2) is used to test the performance of protocols in various

situations. Animator Network and scripts for AWK. Packet distribution ratio,

throughput, delay-to-end, residual energy, and normalized routing fee are the output

matrices. When reliability is given priority, we have tried mainly to answer the actions

of various protocols by modifying their working environments[3].

According to (Sanjay et al,2016), Broad-scale convergence of the Wireless

Sensor Networks (WSNs) into the large topology of thousands of sensor nodes. Nodes

are very small, low cost, low battery weight, simple storage, process control. Nodes are

very large. Sensor nodes can track physical or ambient environments with a sensor. This

paper studies and tests output with the proposed hierarchical tracking method, based on

a hierarchical binary tree structure for the position and target tracking using. The details

detected are saved multiple sensor branches (e.g. nodes, parent nodes, and grandparent

nodes) used to boost fault tolerance using a full binary tree structure. The number of

messages in the network is reduced significantly. NS2 compares the performance of the

proposed system and certain actual routing systems[23].

Page 30: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

15

According to (Lyes et al, 2017), Wireless Sensor Networks are recognized in

the field of the Internet of Things as a vital and supporting infrastructure (IoT). Their

incorporation with IoT, in contrast with traditional WSN implementations, poses new

architecture problems. This document addresses the challenge of high node density and

its effect on the design of routing protocols for IoT-WSNs. We are proposing a

mechanism for powerfully knowledgeable topology management, based on the

prominent Diffusion routing. Besides, to measure an energy consumption metric for the

option of energy efficiency, we gain from the power consciousness function of the

topology check mechanism route. In terms of energy efficiency, data reporting delays,

and implementation performance rates the simulation findings indicate an increase by

the proposed protocol[17].

According to (Sherif et al, 2018), This paper presents a contrasted analysis of

the two most important event-driven routing protocols, DD, and the information sensor

protocol through the negotiation method, used in wireless sensor networks (SPIN). This

protocol is evaluated using various mobility models to define the main features to be

addressed during a wireless sensor network routing architecture and evaluation[24].

Page 31: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

16

2.8 Comparison of network simulator

Table 2.8.1: Network Simulator Comparison

Name of

Simulator

Ns-2 NS-3 OMNeT MATLAB OPNET

Simulator

Type:

(Discrete-

Event/

Trace-

Driven)

Discrete-

Event

Discrete-

Event

Discrete-

Event

Discrete-

Event

Discrete-

Events

Programmin

g Language

C++ &

OTCL

C++ C++ C/ JAVA C/C++

License

Type: Open

Source or

Commercial

Open

Source

Open

Source

Open

Source,

Commercial Commercial

Document

Available

(Yes / No)

Yes Yes Yes Yes Yes

Platforms Windows,

Linux

Windows,

Linux, Mac

OS

Windows,

Unix-

based,

Mac OS

Windows,

Mac OS,

Linux

Hawlett-

Packard,

Solaris

Page 32: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

17

Advantage Has the

advantage

of a large

number of

available

models

Includes

an energy

model and

it allows

user to

easily

generate

traffic and

movement

patterns

Has high

modularity

than its

ancestor

NS2.

Much

flexible

than NS2

Providing

reliable

network

service.

Accessing

informatio

n from the

network is

as easy.

Complete

with huge

library

predefined

function.

Contains tool

that allows a

programmer

to

interactively

design a GUI.

The fast

discrete

event

simulation

engine

Integrated

GUI based

debugging

and analysis

Limitation Discrete-

Event

Discrete-

Event

Discrete-

Event

Discrete-

Event

Discrete-

Events

Page 33: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

18

2.9 Summary

This chapter contains a summary of the current system concept. The analysis of

the literature helps to assess whether or not the technology was previously studied.

The different methods and strategies used tend to enhance future project analysis.

In this literature review, the study is conducted to prevent the same concept

generation.

Page 34: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

19

CHAPTER 3

METHODOLOGY

3.1 Introduction

The chapter discusses the methodology of simulations used in this NS2-enabled

project. It also examines the project framework and flowchart to visualize the idea to

better understand the project. This chapter includes the framework structure and flow

chart to better understand the visualization during the project execution. The best

method is chaotic enough to prevent the project from ending on the right schedule or to

prevent the developer from being instructed to complete the creation of the project.

3.2 Research of Methodology

In the research of methodology, the planning and scheduling of the project are

crucial for the development of the project. Based on the figure below, there are a few

phases of the methodology mentioned. The first phase is related to identifying the

problems regarding the field of research. For this project, the problems of WSNs are

identified in this phase. The problem statement is identified based on the related

Page 35: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

20

research paper for a better understanding of WSNs and the problems that occurred on

WSN. The second phase is designing and developing. The main purpose of the

following phase is to find a suitable method to be implemented in the project. Directed

Diffusion is an energy-efficient data dissemination scheme to extending the lifetime of

the Wireless Sensor Network. In the following phase, the simulation that will be used

in this project is discussed. The simulation tool used for this project will be used for this

project is Network Simulator 2 (NS2). Besides, the last phase is evaluating the

performance. The performance metrics of this project need to be evaluated and

analyzed. The performance metrics that will be evaluated are packet delivery ratio,

average delay, and average throughput.

Figure 3.2.1: Research Methodology

Page 36: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

21

3.3 Framework

From this process model, the first phase is WSN, we need to understand how the

WSN is work, for the second is Directed Diffusion Routing Protocol is a typical data

centric protocol for WSN. Directed Diffusion finds routes from multiple consolidations

of redundant data which is aggregation. Directed Diffusion is a typical query-based

routing, it consists of three-phase which is, first is interest propagation which is the sink

periodically broadcast an interest message to each of its neighbors. Every node

maintains an interest cache. The second phase for Directed Diffusion is Initial gradient

setup which is the process of sending data back from the source, to find the best route.

The last phase in Directed Diffusion is data delivery along the selected path is after

finding the best route there will be data transmission from source to sink with the route

that has been determined. Then the next phase is the routing selection scheme this phase

will run the Algorithm of Directed Diffusion. The last phase for this framework is the

performance metric, which will make the comparison of the Directed Diffusion routing

protocol with Sensor Protocol for Information via Negotiation or SPIN. Packet delivery

ratio, time taken to deliver the packet. Then End to End delay, the average delay

measures the average one-way latency observed between transmitting an event and

receiving it at each sink. And lastly, is comparison performance metric from energy

consumption the number of nodes that have been transmitting and receiving duplicate

data or packet can be eliminated over this gradient path.

Page 37: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

22

Figure 3.3.1: Framework of Directed Diffusion Protocol

Page 38: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

23

3.4 Flowchart

Most routing protocols of the sensor network prefer to follow a certain direction

between source nodes and sink nodes, and it is difficult to modify the preferred route

before certain sensor nodes on the communication path either lose their energy or get

out of control. So if controlled events occur again and again, the energy consumption

of path sensor nodes tends to climb above the energy consumption of all other sensor

nodes. For the flow diagram of sequenced Directed Diffusion routing protocol is first,

start then node interest or exploratory data will go to next flow will copy the sensor

node in a message header or new sensor node. After that, will be the condition will

happen, is the new sensor node important than the priority sensor node? To calculate

the priority is, total sink minus by total source then divided by the total deadline. To

know the total source is the time exploratory data packet was sent from the sink and for

the total deadline is the deadline of the data flow must be in units of times. Then will

know if the new sensor node is important than the priority sensor node. If no, then it

will be going to the received interest. But if yes, the new sensor node is important it will

continue the next phase is the new sensor node will be the priority sensor node then the

node will Flooding the message to neighbor nodes and then the nodes will loops to stars

if the process did not perform well. For this Directed Diffusion Protocol, I will change

the number of nodes, based on the literature review on the previous article, on 2017 and

2018, the node value that I will compare is between 10 to 150. Then I will compare the

with the SPIN.

Page 39: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

24

Figure 3.4.1: Data Model (Flow diagram of Sequenced DD routing Scheme)

Page 40: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

25

3.5 Proof of concept

3.5.1 (Installation of Ubuntu in Virtual Box)

Figure 3.5.1: Ubuntu has been install

Figure 3.5.2: Ubuntu has been create in Virtual Box

Page 41: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

26

3.5.2 (Installation of NS2)

Figure 3.5.3: NS2 has been install in Ubuntu

Page 42: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

27

3.5.3 (Installation of NAM-Network Animator)

Figure 3.5.5: File NAM has been shown

Figure 3.5.4: NAM that has install

Page 43: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

28

3.6 Hardware and software requirement

The success of this project is assured by hardware and software. Hardware and

software, therefore, have their part and work during any move. The detail on

hardware and software are shown below.

Table 3.6.1: List of hardware used

Hardware Description

Laptop Processor : Intel(R) Celeron(R) N4020

CPU @ 1.10GHz

RAM: 4 GB

Operating System: Ubuntu 16.04

Table 3.6.2: List of software used

Software Description

Ubuntu 16.04 Mainly used and server operating system

Windows 10 The used report documents operating

system

NS2 Simulation for network validated

simulation

NAM An animation tool that is used to display

trace data from network simulations. It

supports topology structure, packet

animation and different methods for data

inspection.

Page 44: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

29

Microsoft Office 2016 Documentation and slides presentation

platform

Google Chrome, Mozilla Firefox, and

Microsoft Edge

Browser for system execution and

research and related project studies

3.7 Summary

The approach of this project is described in this chapter. In the background and

description, the purpose of the whole system was shown in project diffusion on the

data model. Consequently, the project specifications are perfectly described and

minimal mistakes can be created.

Page 45: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

30

[1] A.G.Gokula Kumar, R. N. (2014). Data Centric Based Routing Protocols for Wireless

Sensor Networks: A Survey. International Journal of Scientific and Research

Publications, 1-5.

[2] Adamu, L.-M. P. (2012). Classical and swarm intelligence based routing protocols for

wireless sensor. Journal of Network and Computer Applications, 1508-1536.

[3] Akshita Sharma, P. L. (2014). Performance Comparison of Reactive and Proactive

Routing Protocols in Wireless Sensor Network. IEEE .

[4] Anand Nayyar et al. (2015). A Comprehensive Review of Simulation Tools for

Wireless Sensor Networks (WSNs). Journal of Wireless Networking and

Communications 2015, 19-47.

[5] Anna Sfairopoulou, C. C. (2011). Evaluating the LWT-MAC Performance in Query-

Driven WSNs Using Data-Centric Routing. Springer-Verlag Berlin Heidelberg, 156-167.

[6] Chalermek Intanagonwiwat, R. G. (n.d.). Directed Diffusion: A Scalable and Robust

Communication Paradigm for Sensor Networks .

[7] Dr.R.KalaiMagal&Mrs.M.Revathy. (2014). A SURVEY ON WIRELESS SENSOR

NETWORK PROTOCOLS . IJISET - International Journal of Innovative Science,

Engineering & Technology, 549-562.

[8] Fouzi Semchedine, L. B.-M. (2014). Load balancing mechanism for data-centric

routing in wireless sensor networks. Computers and Electrical Engineering, 1-12.

[9] Harsh Sundani, H. L. (2011). Wireless Sensor Network Simulators A Survey and

Comparisons. International Journal Of Computer Networks (IJCN), 249-265.

[10] Hassan Echoukairi, K. B. (2016). A Survey on Flat Routing Protocols in Wireless Sensor

Networks. 311-324.

[11] Hassan, N. S. (2017). Routing Protocols for Wireless Sensor Networks (WSNs).

Wireless Sensor Networks - Insights and Innovations, 22-37.

[12] Jamal N. Al-Karaki, A. E. (2005). Routing Techniques In Wireless Sensor Networks: A

Survey. IEEE Wireless Communications, 1-37.

[13] Jian Wan, J. W. (2008). An Efficient Gradient Mechanism of Directed Diffusion in

Wireless Sensor Network . International Conference on Computational Intelligence

and Security, 427-431.

[14] Jie XU*, F. N. (2009). THE ANALYSIS AND RESEARCH OF WSN’S ENERGYEFFICIENT

ROUTING PROTOCOLS . 2056-2059.

[15] Junguo ZHANG, W. L. (2009). The NS2-based Simulation and Research on Wireless

Sensor Network Route Protocol .

[16] K.Sakthidasan@Sankaran, N. a. (2020). Data-Centric Routing in WSN for Energy

Conversation using Directed Diffusion. International Conference on Communication

and Signal Processing, 1414-1417.

Page 46: DIRECTED DIFFUSION PROTOCOL IN WIRELESS SENSOR …

31

[17] Lyes Khelladi, N. B. (n.d.). Revisiting Directed Diffusion In The Era Of IoT-WSNs :

Power Control For Adaptation to High Density. IEEE.

[18] MING-CAI ZHENG, X.-C. Z. (2013). RESEARCH ON DIRECTED DIFFUSION ROUTING

PROTOCOL IN WIRELESS SENSOR NETWORKS. IEEE , 53-57.

[19] Nicholas S. Samaras, F. S. (2016). On Direct Diffusion Routing for Wireless Sensor

Networks. Advances in Wireless and Optical Communications (RTUWO), 89-94.

[20] Raj Kumar Mondal, D. S. (2014). DATA-CENTRIC ROUTING PROTOCOLS IN WIRELESS

SENSOR NETWORKS: A SURVEY. An international journal of advanced computer

technology,, 593-598.

[21] RAJA, D. L. (2018). STUDY OF VARIOUS NETWORK SIMULATORS. International

Research Journal of Engineering and Technology (IRJET), 1192-1201.

[22] Ridha Azizi. (2016). Consumption of Energy and Routing Protocols in Wireless Sensor

Network. Network Protocols and Algorithm, 76-87.

[23] Sanjay Pahuja, T. S. (2016). Performance Analysis of Routing Protocols for Target

Tracking in Wireless Sensor Networks. I.J. Modern Education and Computer Science,

40-48.

[24] Sherif Moussa, G. A.-M. (2018). Event Driven Routing Protocols For Wireless Sensor

Networks. International Journal of Applied Engineering Research, 2055-2060.

[25] Umesh Rawa, M. S. (2012). Directed Diffusion: Features, Current

Developments,Issues and Analysis. International Journal of Computer Applications,

0975 – 8887.

[26] Vaishali Jain, N. A. (2014). Simulation Analysis of Directed Diffusion and SPIN,Routing

Protocol in Wireless Sensor Network . IEEE.