clustering in wireless sensor network using k-means · pdf fileclustering in wireless sensor...
TRANSCRIPT
Clustering in Wireless Sensor Networkusing K-MEANS and MAP REDUCE
Algorithm
Dissertation
submitted in partial fulfillment of the requirements
for the degree of
Master of Technology
by
Jyoti R. Patole
Roll No: 121022017
under the guidance of
Dr. Jibi Abraham
Department of Computer Engineering and Information Technology
College of Engineering, Pune
Pune - 411005.
2012
Dedicated to
my mother
Smt. Laxmibai R. Patole
and
my father
Shri. Ramdas R. Patole
DEPARTMENT OF COMPUTER ENGINEERING AND
INFORMATION TECHNOLOGY,
COLLEGE OF ENGINEERING, PUNE
CERTIFICATE
This is to certify that the dissertation titled
Clustering in Wireless Sensor Network usingK-MEANS and MAP REDUCE Algorithm
has been successfully completed
By
Jyoti R. Patole
(121022017)
and is approved for the degree of
Master of Technology.
Dr. Jibi Abraham, Dr. Jibi Abraham,
Guide, Head,
Department of Computer Engineering Department of Computer Engineering
and Information Technology, and Information Technology,
College of Engineering, Pune, College of Engineering, Pune,
Shivaji Nagar, Pune-411005. Shivaji Nagar, Pune-411005.
Date :
Abstract
A wireless sensor network (WSN) consists of a large number of small sensors with
limited energy. Prolonged network lifetime, scalability, node mobility and load
balancing are important requirements for many WSN applications. Clustering the
sensor nodes is an effective technique to achieve these goals. The different clus-
tering algorithms also differ in their objectives. We have proposed a new method
to achieve these goals and the proposed method depends on MAP-REDUCE pro-
gramming model and K-MEANS clustering algorithm. So, new clustering algo-
rithm has been proposed to cluster the sensor nodes of a network. It uses MAP
REDUCE and K MEANS algorithm for clustering. Network is divided into number
of clusters, which we have taken as 5% of the total number of nodes of a network.
Nodes are assigned to the cluster having minimum distance to the cluster head
having maximum energy. The distance is calculated using Euclidean Distance
Formula. We have also calculated the intra cluster and inter cluster distance for
the cluster. We also found the end to end delay of packet transmission,energy
consumption for the transmission.
Initial simulations are performed to check how much we can lower the energy
consumption by placing the cluster heads over the grid. We have considered two
ways with which cluster heads can be placed over the grid, either place them
randomly or keep some distance among them. For this results are found and
checked. These results show that placing the cluster heads using some minimal
distance performs well than placing them randomly.
iv
Acknowledgments
The satisfaction that accompanies the successful completion of task would be in-
complete without mentioning the people who make it possible. I am grateful to
number of individuals whose professional guidance along with the encouragement
have made it very pleasant endeavour to undertake this project. I express my
sincere gratitude towards my guide Dr. Jibi Abraham for her constant help,
encouragement and inspiration throughout the project work. Without her invalu-
able guidance, this work would never have been a successful one. Also her true
criticism towards technical issues provided us to concentrate on transparency of
our work. I would also like to thank Prof.V. K. Pachghare, Dr. J.V. Aghav for
their valuable suggestions and helpful discussions. Last, but not the least, I would
like to thank all my classmates, my family and those who helped us directly or
indirectly in many ways in completion of this project work.
Jyoti R. Patole
College of Engineering, Pune
June, 2012
v
Contents
Abstract iv
Acknowledgments v
List of Figures viii
1 Introduction 1
1.1 Wireless Sensor Network . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 Home Control . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.2 Medical Monitoring . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Clustering in wireless sensor network . . . . . . . . . . . . . . . . . 3
1.3 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.5 Thesis Objective and Scope . . . . . . . . . . . . . . . . . . . . . . 5
1.6 Thesis Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2 Literature Survey 7
2.1 LEACH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 MAP REDUCE PROGRAMMING MODEL . . . . . . . . . . . . . 9
2.3 NS2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3.1 Main NS2 Simulation Steps . . . . . . . . . . . . . . . . . . 10
2.3.2 Packet Tracing . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3.3 Main Parameters used in wireless networks simulation . . . . 12
3 System Design 15
3.1 BACKGROUND . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.1.1 MAP-REDUCE Programming Model . . . . . . . . . . . . . 15
3.1.2 K-MEANS Algorithm . . . . . . . . . . . . . . . . . . . . . 16
3.2 OUR PROPOSED SYSTEM . . . . . . . . . . . . . . . . . . . . . . 17
3.2.1 ALGORITHM ASSUMPTIONS . . . . . . . . . . . . . . . . 17
3.2.2 CLUSTER SETUP PHASE . . . . . . . . . . . . . . . . . . 18
3.3 Channel Propagation Model . . . . . . . . . . . . . . . . . . . . . . 20
3.4 Radio Energy Dissipation . . . . . . . . . . . . . . . . . . . . . . . 20
4 Implementation and Simulation 22
4.1 Simulation Set up . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.2 Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5 Future Scope and Conclusion 25
Bibliography 26
vii
List of Figures
1.1 Typical Sensor Network Arrangement . . . . . . . . . . . . . . . . . 2
1.2 Home Control Application . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Clustered Sensor Network . . . . . . . . . . . . . . . . . . . . . . . 4
2.1 Flow Chart for Set UP Phase . . . . . . . . . . . . . . . . . . . . . 8
2.2 Basic Architecture of NS 2 . . . . . . . . . . . . . . . . . . . . . . . 10
2.3 Format of each line in a trace file. . . . . . . . . . . . . . . . . . . . 11
2.4 NAM Tool Description. . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.5 XGraph running comparing three trace files in a graph. . . . . . . . 13
3.1 Map Reduce Illustration. . . . . . . . . . . . . . . . . . . . . . . . . 16
3.2 Original K-MEANS Algorithm. . . . . . . . . . . . . . . . . . . . . 17
3.3 Radio Energy Dissipation Model [26] . . . . . . . . . . . . . . . . . 21
4.1 End To End Delay. . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2 ENERGY REQUIRED. . . . . . . . . . . . . . . . . . . . . . . . . 24
Chapter 1
Introduction
1.1 Wireless Sensor Network
Wireless sensor network [18] is a popular area for research now days, due to vast po-
tential usage of sensor networks in different areas. A sensor network is a comprised
of sensing, processing, communication ability which helps to observe, instrument,
react to events and phenomena in a specified environment [22] [2]. This kind of
network enables to connect the physical world to environment. By networking
tiny sensor nodes, it becomes easy to obtain the data about physical phenomena
which was very much difficult with conventional ways. Wireless sensor network
typically consist of tens to thousands of nodes. These nodes collect, process and
cooperatively pass this collected information to a central location. WSNs have
unique characteristics such as low duty cycle, power constraints and limited bat-
tery life, redundant data acquisition, heterogeneity of sensor nodes, mobility of
nodes, and dynamic network topology, etc [22]. Figure 1.1 [22] depicts a typi-
cal WSN arrangement. Application of WSNs exists in variety of fields including
environmental applications, medical monitoring, home security, surveillance, mil-
itary applications, air traffic control, industrial and manufacturing automation,
process control, inventory management, distributed robotics, etc [1][22]. Consider
the following application for better understanding.
1.1.1 Home Control
Home control [22] is the best example to illustrate the application of wireless sensor
network. It provides control as well as safety to home, as follows (see figure 1.2)
[22]:
Sensing capability provides the detailed data about electric, gas, water
1
Chapter 1. Introduction
Figure 1.1: Typical Sensor Network Arrangement
Figure 1.2: Home Control Application
usage.
Sensing capability provides the flexible management of temperature, cool-ing, heating as well as lighting anywhere in the home with single remote
control.
Sensing capability provides automatic notification upon detection of someunusual events in the home.
Sensing capability enables easy way to install, upgrade and networking of
2
1.2 Clustering in wireless sensor network
home control system without running any cable.
1.1.2