A Study On Sink Mobility In Partitioned Wireless Sensor Network

A Study On Sink Mobility In Partitioned Wireless Sensor Network A Thesis submitted to the Faculty of Engineering & Technology, Jadavpur University in ...
2 downloads 1 Views 2MB Size
A Study On Sink Mobility In Partitioned Wireless Sensor Network A Thesis submitted to the Faculty of Engineering & Technology, Jadavpur University in the partial fulfillment of the requirements for the degree of Master of Technology in

Distributed & Mobile Computing Submitted By

JAYITA BARMAN Class Roll No. 001130501005 Examination Roll No. M4DMC13-04 University Registration No. 117335 of 2011-12 Under the guidance of

Prof. Nandini Mukherjee (Director, School of Mobile Computing & Communication, Professor, Department of Computer Science & Engineering, Jadavpur University)

School of Mobile Computing and Communication Faculty of Engineering and Technology Jadavpur University Kolkata- 700032 May 2013 i

Declaration of Originality and Compliance of Academic Ethics I hereby declare that this thesis contains literature survey and original research work by the undersigned candidate, as part of her Master of Technology in Distributed & Mobile Computing studies. All information in this document have been obtained and presented in accordance with academic rules and ethical conduct. I also declare that, as required by these rules and conduct, I have fully cited and referenced all material and results that are not original to this work.

Name

:

JAYITA BARMAN

Class Roll No.

:

001130501005

Examination Roll No.

:

M4DMC13-04

University Registration No.

:

117335 of 2011-12

Thesis Title

:

A Study On Sink Mobility In Partitioned Wireless Sensor Network

Signature

:

Date

:

ii

SCHOOL OF MOBILE COMPUTING & COMMUNICATION Faculty of Engineering & Technology Jadavpur University To Whom It May Concern This is to certify that Jayita Barman, Registration No. 117335 of 2011-12, Class Roll No. 001130501005, Examination Roll No. M4DMC13-04, a student of School of Mobile Computing and Communication, Jadavpur University, under Faculty of Engineering and Technology, has done a thesis under our supervision titled “A Study On Sink Mobility In Partitioned Wireless Sensor Network”. The thesis is approved for submission towards partial fulfillment of the requirements for the degree of Master of Technology in Distributed and Mobile Computing under Faculty of Engineering and Technology, Jadavpur University for the session 2012-2013.

_______________________

Dr. Nandini Mukherjee Thesis Supervisor, Director of School of Mobile Computing & Communication, Jadavpur University. Professor, Department of Computer Science & Engineering, Jadavpur University.

COUNTERSIGNED

_______________________

Prof. Nandini Mukherjee Director of School of Mobile Computing & Communication, Jadavpur University, Kolkata-700032

iii

CERTIFICATE OF APPROVAL The thesis at instance is hereby approved as a creditable study of an engineering subjects carried out and presented in a manner satisfactory to warrant its acceptance as a prerequisite to the degree for which it has been submitted. It is understood that by this approval the undersigned do not necessarily endorse or approve any statement made, opinion expressed or conclusion drawn therein, but approve this thesis only for the purpose for which it is submitted.

_______________________________ (Signature of the Examiner) Date:

________________________________ (Signature of the Examiner) Date:

iv

Acknowledgements First of all, I would like to express my heartfelt gratitude to my respected guide, Prof. Nandini Mukherjee, Department of Computer Science and Engineering, Jadavpur University, for giving me the guidance, encouragement, counsel throughout my research and painstakingly reading my reports. Without her invaluable advice and assistance it would not have been possible for me to complete this thesis. Her wide knowledge and logical way of thinking have been of great value for me. As a guide she has a great influence on me, both as a person and as a professional. Special thanks to Zeenat Rehena, Asst. Prof., Department of Computer Science and Engineering, Aliah University, for her inestimable counsel in the development of this thesis. She has also been abundantly helpful and has assisted me in numerous ways, including summarizing the contents of documents. Without her support it would not have been possible for me to do the thesis dedicatedly. She also encouraged me so many times when I got nervous during my research. I also came to know from her how much we need to be dedicated and keep patience to do a research work. I would like to convey my regards and thanks to all the members of DST-FIST lab for providing us the wonderful environment for study and perform our research work in a world class facilities in the laboratory. Last of all I thank to God for making me able to complete this work.

Date:

______________________ Jayita Barman Exam. Roll No. M4DMC13-04 Roll No. 001130501005 Registration No. 117335 of 2011-2012

School of Mobile Computing and Communication Faculty of Engineering and Technology Jadavpur University, Kolkata – 700 032

v

Contents Certificate.....................................................................................................................iv Acknowledgement.........................................................................................................v List of Figures...............................................................................................................ix List of Acronyms..........................................................................................................xi 1.

INTRODUCTION 1.1 Background...........................................................................................2 1.2 Motivation.............................................................................................4 1.3 Objective...............................................................................................5 1.4 Outline of Thesis...................................................................................5

2.

SINK PLACEMENT STRATEGIES 2.1 Introduction.......................................................................................... 8 2.2 Multiple Sink Placement Strategies ...................................................10 2.2.1 Random Sink Placement (RSP) Strategy......................................10 2.2.2 Geographic Sink Placement (GSP) Strategy.................................11 2.2.3 Sink Placement in Candidate Location with Minimum Hop (CLMH) ...............................................................12 2.2.4 Sink Placement in Centroid of the Nodes in a Partition (CNP)...........................................................................13 2.2.5 Intelligent Sink Placement Strategy (ISP).....................................14 2.2.6 Genetic Algorithm Sink Placement Strategy (GASP)...................16 2.2.7 Self Organized Sink Placement Strategy.......................................16

3.

MOBILITY IN WSN 3.1 Need of Mobility in WSN......................................................................19 3.2 Node Mobility........................................................................................20

vi

3.2.1 Mobility Model..............................................................................21

3.3 Sink Mobility.........................................................................................22 3.3.1 Sink Node Movement....................................................................23 3.3.2 Data Packets Routing.....................................................................23 3.3.3 Data gathering................................................................................23 3.4 Event Mobility........................................................................................24

4.

IMPLEMENTATION OF SINK PLACEMENT ALGORITHM USING TINYOS

4.1 TinyOS Overview...................................................................................27 4.2 Case Study: TinyOS and NesC...............................................................28 4.3 Motivation of Using TinyOS for simulaton............................................29 4.4 TinyOS Programming Structure..............................................................30 4.5 Implementation of CNP in TinyOS.........................................................30 4.5.1 CNP Algorithm...............................................................................30 4.5.2 Code Segment of Implementation of CNP Algorithm....................35 4.5.3 Snapshot of simulation of CNP algorithm.......................................37

5.

IMPLEMENTATION OF SINK MOBILITY

5.1 Motivation..............................................................................................39 5.2 Sink Mobility Algorithm to Enhance Network Stability and Coverage............................................................................40 5.3 Implementation in MATLAB.................................................................42 5.3.1 MATLAB Overview......................................................................42 5.3.2 MATLAB System..........................................................................43 5.3.3 Motivation of Using MATLAB.....................................................44 5.3.4 Used MATLAB Functions.............................................................45

vii

5.4 MATLAB Code Segments......................................................................47 5.5 Simulation Environment and Results......................................................49 5.6 Advantage of the Proposed Sink Mobility Algorithm.............................51

6.

CONCLUSION

6.1 Conclusion..............................................................................................53 6.2 Limitations..............................................................................................54 6.3 Future Work............................................................................................54

viii

List of Figures 1.1

Wireless Sensor Network Model .................................................................3

2.1

Demonstration of Hotspot Problem [11].......................................................9

2.2

Geographic Sink placement..........................................................................11

2.3

CLMH sink placement [10]..........................................................................13

2.4

CNP Sink Placement.....................................................................................14

2.5

Multi circle intersection region.....................................................................15

2.6

(a) Grouping for 50-node network with 3-sink and......................................17 (b) Fixed candidate locations at circumradius of a regular octagon [13].......17

3.1

Mobile sink moves through a sensor network as information is being retrieved on its behalf [13]...............................................................24

3.2

Example of Frisbee model [13].....................................................................25

4.1

Timer component in TinyOS [13].................................................................28

4.2

Cnpc.h header file..........................................................................................31

4.3

CNP Message structure..................................................................................31

4.4

Interfaces used to implement CNP algorithm................................................32

4.5

Packet interface of TinyOS............................................................................32

4.6

AMSend.nc Interface of TinyOS....................................................................33

4.7

Code segment of AMSend.SendDone event..................................................33

4.8

Receive.nc Interface of TinyOS.....................................................................34

4.9

SplitControl.nc Interface of TinyOS..............................................................34

4.10

Code segment of event startdone( ) and command start( ).............................35

4.11

Code segment to find initial sink location......................................................35

4.12

Code segment used to find final sink location...............................................36

4.13

Simulation of CNP.........................................................................................37

ix

5.1

Sink mobility algorithm................................................................................41

5.2

Code segment of plot function used in implementation...............................46

5.3

WSN with random node deployment and sink location...............................46

5.4

Code segment used to generate random coordinates....................................47

5.5

Random Deployment of sensor nodes..........................................................47

5.6

Code segment to create the Buffer.............................................................. .48

5.7

Sink movement path..................................................................................... 48

5.8

Energy Consumption for Static Sink and Mobile Sink Network...................50

5.9

Neighbor Nodes die for Static Sink and Mobile Sink Network....................50

x

List of Acronyms WSN: Wireless Sensor Network MSWSN: Mobile Sink Wireless Sensor Network RSP: Random Sink Placement Strategy GSP: Geographic Sink Placement Strategy CLMH: Candidate Location with Minimum Hop CNP: Centroid of the Nodes in a Partition ISP: Intelligent Sink Placement Strategy GASP: Genetic Algorithm Sink Placement Strategy NNMD: Next Node with Minimum Distance

xi

CHAPTER - 1 INTRODUCTION

Key Topics  Background  Motivation  Objective  Outline of the Thesis

1

INTRODUCTION

1.1 Background Wireless Sensor Networks are rapidly growing area of research and commercial development. Meanwhile it draws attention of many researchers because of the enormous scope of its applications in numerous areas. A Wireless Sensor Network (WSN) consists of large number of spatially distributed autonomous sensors to monitor physical environment conditions, such as temperature, sound, humidity, pressure, light etc. and pass their data often called raw data through the network to Base Station which is often called Sink. The sink forms the gateway between the WSN and end-user application. The actual implementation of a wireless sensor network is widely used in many areas, especially in military applications, biological and health applications, environmental applications and some commercial applications. In such applications WSN can perform sensing activities in multiple environmental conditions, including the following: 

Temperature



Humidity



Pressure



Light



Vehicular movement



Noise level



Presence or absence of certain kind of objects



Stress

Sensor nodes have limited processing power, storage space and limited communication bandwidth. Hence in network data management and information processing such as data aggregation and routing techniques need to be developed. Lifetime is the key characteristics to evaluate performance of a sensor network are determined by residual

2

energy of the system. Energy efficiency can be introduced WSN by any of the following methods: 

Energy conservation mechanism



Power consumption mechanism



Energy harvesting mechanism



Energy efficient routing mechanism

In Fig. 1.1 the sensor network model consisting of large numbers of sensor nodes deployed over a large geographic area (sensing field). After detecting an event sensor nodes transfer their data to sink node through multi-hop communication paradigm. In this case both the sink node and sensor nodes are static.

Fig. 1.1 Wireless Sensor Network Model

3

1.2 Motivation Wireless sensor networks are battery operated. The sensor nodes of Wireless Sensor Network have limited source of energy when it is deployed in real time environment. The entire network rely on this energy to detect an event, collect information from environment, data aggregation and communicate with base station or sink to deliver the collected information. The main challenges are how to maximize the network lifetime using minimum energy resource. Research has shown that nodes near the sink deplete their battery power faster than the nodes apart due to heavy overhead of messages from nodes that are far away from sink node. Sensors nearby sink are shared by more sensors to sink paths therefore consume more energy. The result is the nodes nearby sink nodes deplete their energy faster than the other nodes which leads to premature disconnection of the networks and sink got isolated from the network, while all other nodes are fully operational along with the sink. This problem is known as hotspot problem, leads to a premature disconnection of the network. In recent approaches, to reduce energy consumption, researchers focus on shifting the burden from the sensors to the sink node. In contrast to a traditional WSN model where the sink nodes remain stationary somewhere in the network and passively receive data from the sensor nodes and in Mobile Sink WSN (MSWSN) the sink node is mobile and traverse the network field actively to look for the sensors which are sending data and move closer to them. The idea behind this sink mobility is to shift the burden of data processing and energy consumption from the sensors to the sink node in order to extend the network lifetime as sink nodes are generally much more fertile in computational power and energy supply. Transmission range is an important parameter to determine energy consumption in data communication, active movements of sink nodes closer to active sensors result in reduced transmission distances, and fewer intermediate nodes to relay data. Therefore, the energy consumption tends to be more evenly distributed in the network and the “Hotspot” problem is alleviated. And the performance of network can be improved in terms of lifetime better coverage and quick response time.

4

In this thesis sink mobility in partitioned networked is proposed to solve the Hotspot problem encountered in the static sink network. Therefore, an adaptive sink mobility path algorithm is proposed and it helps to reduce energy conservation and prolongs network life time.

1.3 Objective This thesis survey existing multiple sink data dissemination protocol and delay bounded sink mobility problem in WSN and propose a sink mobility algorithm to enhance network lifetime and alleviate the Hotspot situation. According to this algorithm sink gives maximum coverage to every node in the sensory field. Sink is one-hop neighbor of every sensor node in the network and the sink moves average amount of distance to cover every node and visits each node after a certain interval of time.

1.4 Outline of the Thesis The rest of the thesis is organized as follows.

CHAPTER 2:

This chapter gives a comparative study of different existing sink

placement strategies. The need for optimal sink placement and its advantages are also discussed here.

CHAPTER 3: In this chapter an idea of necessity of mobility in WSN is explained. A survey of different types of mobility that occurs in WSN and existing mobility strategies are briefly discussed here.

CHAPTER 4: It talks about TinyOS simulation environment. Implementation of Sink placement algorithm in TinyOS is described in this chapter also.

5

CHAPTER 5: Proposed sink mobility algorithm in a partitioned network is illustrated in this chapter. It also explained small talks about MATLAB simulation environment and implementation of the proposed algorithm.

CHAPTER 6:

Finally, Chapter 6 draws the conclusion of the thesis and discusses the

limitations and scopes of future work of the thesis.

6

CHAPTER – 2 Sink Placement Strategies

Key Topics  Introduction  Multiple Sink Placement Strategies

7

SINK PLACEMENT STRATEGIES 2.1 Introduction WSN comprises a collection of autonomous sensing nodes, each of them equipped with some amount of computing ability and memory, a wireless transceiver, power source, and physical sensor. Sensor nodes collect information aggregate the raw data to remove redundancy and send it to the base station or sink node. Sink has normally higher capacity as well as computation ability and memory than sensor nodes. In traditional WSN single sink node is placed in the entire network which has several drawbacks such as: For large scale networks single sink model is not scalable since message transfer delay as well as energy consumption of the sensor nodes become prohibitive, as most of the nodes are far away from the sink and data sent by those nodes have to traverse multiple hops to reach the sink node. Therefore the response time from the sink node is longer. Another most important disadvantage of single sink node is, the sensor nodes those are closer to sink node not only collect data within their sensing range but also forward data packets for nodes which are far away from the sink. This leads to unbalanced power consumption among sensor nodes and the nodes nearby sink depletes energy faster and die before other nodes in the network and connectivity within the network may be lost. This problem is often called as Hotspot problem. Figure 2.1 describes the Hotspot Problem occurs in static sink network.

8

Fig.2.1 Demonstration of Hotspot Problem [11]

As sensor nodes are often deployed in not easily accessible or hostile environment so it is often costly or impossible to replace the batteries and therefore WSN sensor nodes need to run autonomously on a limited energy resource as energy is the most critical resource in the life of a wireless sensor node and its usage must be optimized to maximize the network lifetime. Besides using power adjustable transmitter circuitry, usage of multi-hop communication links should be considered to save energy. Moreover, in large-scale networks with large numbers of sensor nodes multiple sinks should be deployed, not only to increase the manageability of the network but also to reduce energy dissipation at each node. Large scale Wireless Sensor Network with multiple sink gives better response time as sinks are deployed at dense area and sometimes more than one path from source node to sink exists in the network, thus multi-hop path becomes shorter and energy consumption is saved as a result network lifetime increased. In this chapter we describe some sink placement strategies.

9

2.2 Multiple Sink Placement Strategies 

Random Sink Placement Strategy



Geographic Sink Placement Strategy



Sink Placement in Candidate Location with Minimum Hop



Sink Placement in Centroid of the Nodes in a Partition



Intelligent Sink Placement Strategy



Genetic Algorithm Sink Placement Strategy



Self Organized Sink Placement Strategy

2.2.1 Random Sink Placement (RSP) Strategy Random Sink Placement Strategy is not an actual sink placement strategy rather than it proposed for comparing other sink placement strategies [12]. It is not suggested for real time environment. In RSP sink node is placed arbitrarily so that it gives completely random result, hence it gives a lower bound to compare other sink placement strategies. There are mainly two types of Random Sink Placement strategy 

Purely Random: Where sensor nodes do not have their location information

so the candidate location can‟t b determined and the sink node is placed arbitrarily anywhere in the network. So this is pure random sink placement strategy. 

Monte-Carlo Method: Where sensor nodes have location information and

after calculating the candidate location the sink is placed arbitrarily in the candidate location.

10

2.2.2 Geographic Sink Placement (GSP) Strategy Geographical Sink Placement is suggested for uniformly distributed sensor nodes where location information about the sensor nodes is unknown [12] [10]. Sink placement is dependent on the radius of the field and total number of sink nodes to be deployed. The center of gravity of a sector of with angle α always lies in the middle radial line (α/2) of the sector. CGSC = F(α) × R

(1)

F(α) = (4/3 sin(α/2))/ α

(2)

Where, α is in radians,

0< α< π/2

Equation1 computes the center of gravity of a sector. The degree depends on the number of sinks to be deployed in the sensory field. Equation3 computes the degree of sector. Degree = 2π/number of sinks

(3)

Example: single sink WSNs places the sink at the center of the circle. For two sinks placement, sinks are placed at the center of gravity of the semi-circles. In fact, the center of gravity is approximately between 0 and 2/3 of the radius on the middle radial line of each sector (0 to 360 degree). GSP cannot guarantee the optimal solution but it gives good solutions fast. Fig 2.2 demonstrates the sink placement scenario in GSP.

Fig 2.2 Geographic Sink placement

11

2.2.3 Sink Placement in Candidate Location with Minimum Hop (CLMH) CLMH [10] finds the area with densely deployed nodes where the area is organized in grid. The sink nodes are initially placed at the centroids of each grid cell. But these locations may be refined; often the area closer to the boundaries of two or more grid cells may have maximum number of sensor nodes deployed. Therefore, in order to cover maximum number of sensor nodes that are in range of the sink node, the sink sometimes positioned in the dense region, that is spread over two or more grid cells. In order to find such a location, the grid cells should be considered together. To find the dense area, at first the number of 1-hop neighbor nodes of the initial sink position is counted. Then the centroid of these 1-hop sensor nodes is calculated. This centroid position is called NEXT_LOC and this location is considered to be the probable next location for the sink. Next, number of 1-hop neighbor nodes of NEXT_LOC is counted. If the number of neighbor nodes of NEXT_LOC is greater than that of the sink at previous location then the centroid of the neighbor nodes of the current NEXT_LOC position is calculated and termed as the new NEXT_LOC. This process continues until there is no increase in neighbor nodes. If the number of neighbor nodes of NEXT_LOC is same or less than the number of neighbor nodes of the sink, then the sink remains at the same position, otherwise the sink is placed at the position where neighbor nodes of NEXT_LOC is found to be higher. Once the candidate locations for each grid cell are determined, final location of the sink is selected amongst these candidate locations. Some candidate locations may be on the boundaries of one or more grid cells or may actually be shifted to another grid cell while finding the dense region. The reason for choosing the candidate location with minimum hop distance from farthest node is that this candidate location gives the minimum distance to all other nodes in that partition. This is because while redefining the sink‟s position it moves sink towards dense region of the partition. Figure 2.3 describes the CLMH algorithm.

12

.

Fig. 2.3 CLMH sink placement [10]

2.2.4 Sink Placement in Centroid of the Nodes in a Partition (CNP) CLMH uses a grid cell structure of the network. But In CNP [10] placement strategy no grid cell structure is considered. According to this algorithm the sink is initially placed at the centroid of all sensor nodes in a partition. Next the number of 1-hop neighbors of the sink node is counted. Then a new location of the sink is found by calculating the centroid of 1-hop neighbors. Again the number of 1-hop neighbors of the new sink location is counted. If the number of 1-hop neighbors of the new location is

13

greater than the number of 1-hop neighbors of the old location, then new location becomes the sink location. Again the previous steps are repeated until the number of 1-hop neighbors of the new location is found to be less than the number of 1-hop neighbors of the old location and the old location is taken as the final location of the sink. Fig 2.4 describes the sink placement scenario.

Fig. 2.4 CNP Sink Placement

2.2.5 Intelligent Sink Placement Strategy (ISP) ISP [12], [10] is an exact way to find the exact optimal solution from candidate location where the sink node is placed. In this scenario the sensor nodes have their location information. Determining candidate locations is an important task here. Candidate location is the intersection regions of sensor nodes' transmission ranges. Nodes are connected if they are within each other's transmission range. ISP finds all the candidate locations and then enumerates all combinations of candidate locations 14

depending on the number of sinks. Then the sink is placed at candidate location that will be achieved by sampling all possible candidate locations. In this way, ISP places the sinks at the optimal combination of candidate locations in order to minimize the maximum the worst-case delay. Candidate location is determined by the following algorithm:

Fig. 2.5 Multi circle intersection region

15

2.2.6 Genetic Algorithm Sink Placement Strategy (GASP) The GASP is based on the genetic algorithm (GA). Initially it computes the candidate location set as in ISP. Though there is difference in the enumeration process. The GASP chooses sink combinations based on the GA mechanism. There are various genetic algorithms such as selecting parents to recombine to form a new individual, the recombination methods, the mutation methods and so on. Depending on the number of sinks, each individual is oriented from the left upper corner of the network field. Next, a fitness function, the maximum worst-case delay, is calculated. In each generation, a new solution is created by recombining two selected parents according to the selection methods. Next, the best individual is kept in each generation in order to get the best solution at last. The cross-over and mutation methods are used to create new individuals and the whole procedure is repeated until the maximum number of generations is reached. These methods are considered to increase performance according to the building block hypothesis. GASP cannot guarantee to give optimal solution. Depending on the number of nodes, candidate locations increase dramatically and therefore the number of generations should be adjusted. The possible combinations depend on the number of sinks and candidate locations. Therefore the number of generations will be varied with respect to the possible combinations. In general, GASP gives a good solution with a very few percentage of all possible combinations.

2.2.7 Self Organized Sink Placement Strategy In SOSP algorithm [13], the size of the field, the transmission ranges and the number of nodes for both sensor nodes and sinks are known. After a random node deployment, grouping of sensor nodes are done, which is illustrated in Fig.2.6 (a) and 2.6 (b). According to this algorithm the sink initially placed at each center of gravity of the sector of a circle (CGSC). Then create 1-hop neighbors set for the sink nodes by transmitting a broadcast message and the nodes that reply to the message are collected as 1-hop

16

neighbor set. Then 1-hop neighbor‟s distances from the set of sink nodes thus locations by using trilateration with TOA and 3 anchor points are determined. Then the nodes are grouped up to n-hop distance. Next in Sink Location Selection Phase for each group k sinks represent k groups. Then fixed candidate locations according to the 1-hop neighbors‟ locations set is determined and a mobile sink traverses into each candidate location and calculates the maximum worst-case delay. Select the best sink, i.e., the one which minimizes the maximum worst-case delay. Next in Operation Phase, after selecting the best sink from each group, allow nodes to connect to the nearest (i.e., the shortest hop distance) sink and then calculate the maximum worst-case delay.

Fig. 2.6 (a) Grouping for 50-node network with 3-sink and (b) fixed candidate locations at circumradius of a regular octagon.[13]

17

CHAPTER – 3 Mobility in Wireless sensor network

Key Topics  Need of Mobility in WSN  Node Mobility  Sink Mobility  Event Mobility

18

Mobility in wireless sensor network

3.1 Need of Mobility in WSN Sometimes, in a sparse WSN sensor nodes are far enough from each other. It is also true in WSN that energy consumption during communication is proportional to square root of distance between the sensor nodes. So, more energy is consumed when nodes are far away from the sink node. Multi-hop data propagation also consumes significant amounts of energy especially in the area near sink where the sensor nodes need to relay data from other nodes that are far away from sink node. Due to this uneven energy consumption, nodes near sink node deplete faster and die very soon. This is sometimes called the Hotspot problem. When a sensor node runs out of energy it will no longer provide sensing and data processing. Thus, it can lead to a huge loss in the network due to the routing path re-allocation and failure of sensing and reporting events in the environment. Hence energy conservation has been receiving increased attention in WSN research works. The concept of mobile sink has been recently introduced for WSNs in order to improve the overall performance of WSNs as it shifts the burden of energy consumption from the sensor nodes to sink nodes, which are typically considered to have unconstrained energy supply and larger computational power. In Mobile Sink Wireless Sensor Network sensor nodes are statically deployed in the sensory field to sense the environment and the sink node traverse the network actively to look for the sensors which are ready to send data and move closer to them. There may be one or more mobile sinks in a sensor network. Mobile sink traverse randomly or predefined way to collect the sensor data. It may collect with one hop or multi-hop fashion. The general idea for this sink mobility approach is to shift the burden of data processing and energy consumption from the sensors to the sink in order to extend the network lifetime as sink nodes are generally much more fertile in computational power and energy supply. Since distance is the important parameter in determining energy consumption in data communication, active movements of sink nodes closer to the 19

sensors result in reduced transmission distances, and fewer intermediate nodes to relay data. Therefore, the energy consumption tends to be more evenly distributed in the network and the “Hotspot” problem is alleviated so that the performance of network can be improved in terms of lifetime and quality of service. Mobility allows better load balance energy consumption among the node in sparse WSN, enhance sensing coverage and network lifetime elongation. Implementing mobility better routes for packet delivery from sensor node to sink can be found as well as data reliability can be enhanced if sensor nodes move closer to the events. Mobile WSNs need (i) advanced topology management capabilities, i.e. the ability to specify simultaneously the speed and direction of each individual node; (ii) the ability to track and localize nodes; (iii) a reliable source of energy to avoid unnecessary pauses or abrupt stops; (iv) speed of the mobile device etc. However, despite the advantages that mobility offers to sensor networks, there is one critical constraint that cannot be avoided. Sensors are severely energy constrained and available energy has to be shared for sensing, data processing, transmission, etc. Since mobility also consumes energy, it is very likely that there is a limit on the overall movement distance capability of the sensors. And delay is an important factor to be considered. Mobility can only be implemented on delay tolerant applications. There are three types of mobility in WSN. I.

Node Mobility

II.

Sink Mobility

III.

Event Mobility

3.2 Node Mobility The wireless sensor nodes can be mobile. The need for this type of mobility is highly application dependent. In the face of node mobility the network has to recognize itself frequently enough to be able to function correctly.

20

Coverage of wireless sensor networks (WSNs) is an important quality of service (QoS) metric. At initial deployment of the sensor nodes often the desired coverage is not attainable, but node mobility can be used to improve the coverage by relocating sensor nodes. Coverage improvement based on node mobility depends on many parameters including number of deployed nodes (static and mobile), proportion of mobile nodes, permissible distance the mobile nodes can move and the total distance nodes moved to attain certain coverage.

3.2.1 Mobility Model There are many different mobility models. Here two mobility models are described [2]. 

First model is a probabilistic mobility model.



Second one is simple random mobility model.

 Probabilistic Model: This model consists of a variety of completely different mobility models which are described in following. 

Working: In this case we use Random Walk model with small V min and Vmax values and small covered distances dchange value in which the velocity's magnitude and direction change.



Walking Here, we use of Gauss-Markov model. The probabilistic nature and the consideration of older velocity values of this model tend to produce more natural movements like the ones a person does while walking.

21



Bicycle Just like "Walking" model with the exception that the parameters are set in such a way that we have larger velocity values and more often velocity's magnitude and direction change.



Car In [3] City Selection Mobility Model is introduced, a mobility model that simulates a city environment, which completely suits our needs.

 Random Mobility Model: In this mobility model maximum and minimum speed a node can achieve [V min; Vmax] and the time intervals Tmob in which the changes on velocity's direction and magnitude occur.

3.3 Sink Mobility Sink mobility can be a special case of node mobility. Using sink mobility instead of a static sink, for collecting the data overall network performance increases [4] [5]. The Mobile Sinks traverse through the sensor field according to a controlled arbitrary mobility model in order to maintain a fully-connected network topology and collect data within their coverage. There are 3 major parts involved in implementing Sink Mobility to Wireless Sensor Networks to improve the performance of network:  Sink node movement,  Data packets routing and  Data gathering.

22

3.3.1 Sink Node Movement The general idea for this sink mobility approach is to shift the burden of data processing and energy consumption from the sensors to the sink in order to extend the network lifetime as sink nodes are generally much more fertile in computational power and energy supply. However, how to traverse the whole network area is also an important issue as failure to visit some areas will potentially lead to data loss. Moreover, it is also necessary to use the energy in an efficient manner when moving the sink node. In this thesis a sink node movement algorithm is proposed to give better sink movement with maximum coverage in the network. In the proposed approach the sink node has location information about all the sensor nodes in the network. Other than the proposed algorithm there are so many existing sink mobility approaches, some of them are [6] i) Random Walk and Passive Data Collection ii) Partial Random Walk with Limited Multi-hop data Propagation iii) Biased Random Walk with Passive Data Collection iv) Deterministic Walk with Multi-hop data Propagation

3.3.2 Data Packets Routing As mentioned in the previous sections, energy efficiency is a crucial topic in designing WSNs. Researches shown that large amount of energy consumed during data transmission from sensor-to-sensor and sensor-to-sink. Therefore an efficient transmission path will improve the energy utilization in the system and save more energy. In [4] multi-chain Power-Efficient Gathering in Sensor Information Systems (PEGASIS) using sink mobility maximizes the network lifetime.

3.3.3 Data gathering One important issue in implementing mobile sink nodes in Wireless Sensor Networks is how the sink gathers data from static sensor nodes while sink node is

23

moving. As the sink is moving the location of the sink changes, therefore sensor nodes can only send the data packages to the sink when sink is in their range. Therefore traditional data gathering and routing schemes are not suitable in this case. In [7] authors present an analytical model to understand the key performance metrics such as data transfer, latency to the destination, and power. Figure 3.1 describes the data gathering scenario.

Fig. 3.1 Mobile sink moves through a sensor network as information is being retrieved on its behalf [13].

3.4 Event Mobility In applications like event detection and in particular in tracking applications, the cause of the events or the objects to be tracked can be mobile (these events extend or shrink). In such scenarios, it is (usually) important that the observed event is covered by a sufficient number of sensors at all time. Hence, sensors will wake up around the object, engaged in higher activity to observe the present object, and then go back to sleep. As the event source moves through the network, it is accompanied by an area of activity within the network this has been called the Frisbee model. Figure 3.2 shows the Frisbee model.

24

Fig. 3.2 Example of Frisbee model [13]

25

CHAPTER – 4 IMPLEMENTATION OF SINK PLACEMENT ALGORITHM USING TINYOS

Key Topics  TinyOs Overview  Case Study: TinyOS and NesC  Motivation of Using TinyOS for simulation  TinyOS Programming Structure  Implementation of Centroid of the Nodes in a Partition (CNP) in TinyOS

26

Implementation Of sink placement algorithm using tinyos

4.1 TinyOS Overview TinyOS is free and open source software with component based operating system specifically designed to support resource-constrained sensing devices. The TinyOS operating system design emphasizes modularity and compactness. To enforce the modularity, TinyOS applications are written in a custom “C”-based programming language called NesC. NesC programming language requires functionality to be encapsulated in components with well-defined interfaces. A TinyOS application consists of a collection of these NesC components connected, or wired together. Some components are specific to the target platform, other components are generic to the TinyOS operating system, and still other components are specific to the application being built. Fundamentally, it is a work scheduler and a collection of drivers for microcontrollers and other ICs commonly used in wireless embedded platforms and each individual sensor is running TinyOS system software individually. When a TinyOS application is built for a particular platform, the build system knows how to wire the application-specific and TinyOS generic components to the hardware-specific components for that platform. The modularity of TinyOS helps to build very compact applications. As sensors have limited processing and memory resources, and usually perform well-defined functions, it is desirable that only the parts of the operating system necessary for the specific sensor application be present. The design of TinyOS allows unused TinyOS components, such as unused sensor components, to be omitted from the target application object code [8].

27

4.2 Case Study: TinyOS and NesC TinyOS [13] supports modularity and event-based programming by the concept of components. A component contains semantically related functionality, for example handling a radio interface or computing routes. Such a component comprises the required state information in a frame, the program code for normal tasks, and handlers for events and commands. Both events and commands are exchanged between different components. Components are arranged hierarchically. Low-level components are close to the hardware and high-level components build up the actual application. Events originate in the hardware and pass upward from low-level to high-level components. Commands, on the other hand, are passed from high-level to low-level components. Fig. 4.1 shows a timer component that provides a more abstract version of a simple hardware time. It understands three commands (“init”, “start”, and “stop”) and can handle one event (“fire”) from another component, for example, a wrapper component around a hardware timer. It issues “setRate” commands to this component and can emit a “fired” event itself.

Fig. 4.1 Timer component in TinyOS [13]

28

In event-based paradigm, both command and event are supposed to perform triggering duties to make a conclusion. In particular, commands do not block or wait for an indeterminate amount of time; they simply send a request upon which some task of the hierarchically lower component has to act and an event handler only leaves information in its component‟s frame and arranges for a task to be executed later; it can also send further commands to other components or directly report an event. The actual computational work is done in the tasks. In TinyOS, interrupt can occur by handlers at run time. But TinyOS message is twofold advantage: there is no need for stack management and tasks are atomic with respect to each other. Therefore being triggered by handlers at run time, tasks are seemingly concurrent to each other. In TinyOS multiple events that are ready to execute at same time are scheduled by power aware First in First out Scheduler.

4.3 Motivation of Using TinyOS TinyOS is open source model with free online document that saves the simulation cost. TinyOs simulator TOSSIM has a GUI, TinyViz, which is very convenience for the user to interact with electronic devices because it provides images instead of text commands. In addition, TOSSIM is a very simple but powerful simulator for WSN [9]. Each node can be evaluated under perfect transmission conditions, and using this simulator can capture the hidden terminal problems. As a specific network emulator, TOSSIM can support thousands of nodes simulation. This is a very good feature, because it can more accurately simulate the real world situation. Besides network, TOSSIM can simulate radio models and code executions. This simulator may be provided more precise simulation result at component levels because of compiling directly to native codes. TinyOS has several important features that influenced nesC‟s design: a component-based architecture, a simple event-based concurrency model, and split-phase operations.

29

4.4 TinyOS Programming Structure For programming any application we have to write the configuration file and module file with .nc extension. The interface being used to communicate between the file or performs the necessary wiring. The header file produces information about the set of data structures written depending upon the application requirement. In the make file the path to be set for the file which uses the application to be simulated or build.

(i) The header files defines, the set of data structures used/involved, say the message structure or defining , the payload area etc. It can also enumerate constants as needed.

(ii) The configuration file does the necessary linking and wiring of the components to the interfaces.

4.5 Implementation of Centroid of the Nodes in a Partition (CNP) in TinyOS In this section, implementation of CNP algorithm which is mentioned earlier in Chapter 2 is discussed. It is a sink placement algorithm for partitioned network [10]. In the following sections the algorithm is briefly described and detail implementation procedures are explained.

4.5.1 CNP Algorithm: According to this algorithm [10] the sink node has location information of all the nodes in a partition. The sink is initially placed at the centroid of all sensor nodes in a partition. Next the number of 1-hop neighbors of the sink node is counted. Then a new location of the sink is found by calculating the centroid of 1-hop neighbors. Again the

30

number of 1-hop neighbors of the new sink location is counted. If the number of 1-hop neighbors of the new location is greater than the number of 1-hop neighbors of the old location, then new location becomes the sink location. Again the previous steps are repeated until the number of 1-hop neighbors of the new location is found to be less than the number of 1-hop neighbors of the old location and the old location is taken as the final location of the sink.

The above mentioned algorithm is implemented in TinyOS. It uses the following data structures and interfaces.

 Data structure The following code segment in Fig. 4.2 is used to define the message structure of Fig. 4.3 in the CNP implementation. CnpC.h a header file, it defines the data structures used in the application program.

Fig. 4.2 Cnpc.h header file

Fig.4.3 CNP Message structure

31

 Interfaces The following interfaces of Fig. 4.4 are used to implement the CNP algorithm. Each event of the following interfaces is implemented in the code. Here some of the interfaces used in implementation are described shortly.

Fig 4.4 Interfaces used to implement CNP algorithm

 Interface: tos.interfaces.Packet.nc This interface is used to access basic message data type. Protocols may use additional packet interfaces for their protocol specific data/metadata. Packet interface has the following commands that are mentioned in Fig. 4.5;

Fig. 4.5 Packet interface of TinyOS

32

 Interface: tos.interfaces.AMSend This interface is similar to the Send interface. It provides the basic Active Message sending interface. The key difference between AMSend interface and Send interface is that AMSend takes a destination AM address in its send command. Fig. 4.6 describes the AMSend interface.

Fig. 4.6 AMSend.nc Interface of TinyOS

Event sendDone() is used to implement the algorithm. Here is the code segment followed by short description of the event. Fig 4.7 describes the code segment.

Fig. 4.7 Code segment of AMSend.SendDone event

 Interface: tos.interfaces.Receive Receive interface is used to receive the packets. Fig. 4.8 is the Receive interface.

33

Fig. 4.8 Receive.nc Interface of TinyOS

 Interface: tos.interfaces.SplitControl This is the split-phase counterpart to the StdContol interface. It is used for switching between the on and off power states of the component providing it. For each start () or stop () command, if the command returns SUCCESS, then a corresponding startDone () or stopDone () event must be signalled. Fig. 4.9 describes the SplitControl interface of TinyOS.

Fig. 4.9 SplitControl.nc Interface of TinyOS

The following code segment is used to implement the events and commands of the interface SplitControl. Fig. 4.10 is the code segment which is used to implement the CNP algorithm.

34

Fig. 4.10 Code segment of event startdone( ) and command start( )

4.5.2 Code Segment of implementation of CNP algorithm At first the initial sink location is found using the following code segment given in Fig. 4.11.

Fig. 4.11 Code segment to find initial sink location

After calculating the initial sink location based on one-hop neighbors of the sink location the final sink location is calculated. Fig. 4.12 is the code segment used to calculate the final sink node location according to CNP algorithm.

35

Fig. 4.12 Code segment used to find final sink location

36

4.5.3 Snapshot of simulation of CNP algorithm Fig. 4.13 is the simulation of CNP algorithm. The simulation is carried out for small size network. As the CNP is for multiple sink partitioned network sink placement algorithms, the following result is considered for only one sub-network.

Fig.4.13 Simulation of CNP

After placing the sink in the proper location of sub-network, sink mobility algorithm is implemented in the next chapter.

37

CHAPTER – 5 Implementation of Sink mobility

Key Topics  Motivation  Sink Mobility Algorithm to Enhance Network Stability and Coverage  Implementation in MATLAB  MATLAB Code Segments  Simulation Environment  Advantage of the Proposed Sink Mobility Algorithm

38

Implementation of sink mobility

5.1 Motivation The sensor nodes of WSN have limited source of energy when it is deployed in real time environment. The entire network rely on this energy to detect an event, collect information from environment, data aggregation and communicate with base station or sink to deliver the collected information. The main challenge is to maximize the network lifetime using minimum energy resource. Research has shown that nodes near the sink deplete their battery power faster than the nodes apart due to heavy overhead of messages from nodes that are far away from sink node. Sensors nearby sink are shared by more sensors to sink paths therefore consume more energy and the nodes nearby sink nodes discharge energy faster than the other nodes which leads to premature disconnection of the networks and sink got isolated from the network, while all other nodes are fully operational along with the sink. This problem is known as hotspot problem, leads to a premature disconnection of the network. In recent approaches, to reduce energy consumption, the burden of energy consumption due to communication is shifted from the sensors to the sink node. In contrast to a traditional WSN model where the sink nodes remain stationary somewhere in the network and passively receive data from the sensor nodes and in Mobile Sink WSN (MSWSN) the sink node is mobile and traverse the network field actively to look for the sensors which are sending data and move closer to them. Transmission range is an important parameter to determine energy consumption in data communication, active movements of sink nodes closer to active sensors result in reduced transmission distances, and fewer intermediate nodes to relay data. Therefore, the energy consumption tends to be more evenly distributed in the network and the “Hotspot” problem is alleviated. And the performance of network can be improved in terms of lifetime better coverage and quick response time. 39

In the next section a sink mobility algorithm is proposed. And it is implemented in the partitioned network. The position of the sink obtained from the CNP (discussed in previous chapter) is taken as the initial position of the sink. Then using the proposed algorithm next subsequent positions are calculated.

5.2 Sink Mobility Algorithm ASSUMPTIONS: 1. N = {(n1,n2,…number of nodes)} ni={Xi,Yi}; i={1,2,3,……number of nodes}; Xi = X coordinate of node i; Yi = Y coordinate of node i; NfϵN : the coordinates of the farthest nodes that are not 1-hop neighbor of sink node according to CNP [10] 2. Dsn = Distance between sink and other nodes; Dfsn ϵ Dsn : Dfsn is distance between sink & the farthest nodes which are not 1-hop neighbor of sink node according to CNP algorithm 3. P = {p1,p2,..pn} : position of sink nodes 4. B = {Dfsn, Nf,i} Is a buffer which contains Dfsn and Nf and the id of the nodes. 5. N_ Xi = X coordinate of the nodes in buffer 6. N_ Yi= Y coordinate of the nodes in buffer

40

Fig. 5.1 Sink mobility algorithm

According to CNP algorithm [10] sink node has location information. Applying partition algorithm according to [10] it is assumed that each partition have a single sink node and it has all location information of a particular partition on which it belongs. Now the sink node is placed at the centroid of all sensor nodes, which is found by dividing the sum of all X and Y coordinates to number of nodes in a partition. Then the number of one-hop neighbor of the sink is calculated.

Then the new sink location is determined by

calculating the centroid of the 1-hop neighbor nodes and the location is NEXT_LOC. Again the number of 1-hop neighbors from NEXT_LOC is calculated. If the number of 1-hop neighbors of the NEXT_LOC is greater than old location then new NEXT_LOC is the centroid of the 1-hop neighbors of old NEXT_LOC. If the number of 1-hop neighbors is smaller or equal to the old location then the old location is the position where the sink is actually placed. The location which is calculated using CNP is the initial sink location according to the proposed algorithm in this thesis.

41

Next the nodes that are not one-hop neighbors of the initial sink location are stored in a Buffer. The Buffer contains the location information of the nodes which are not 1-hop neighbors of the sink at initial sink location. The Buffer is sorted in descending order according to the distance of the nodes from initial sink node. Next choose the farthest node from the Buffer and move the sink node towards the node so that the farthest node comes within the range of the sink node. After moving to new location again the one-hop neighbors are calculated, if the one hop neighbor is in Buffer then remove the node from the Buffer. And the sink is again moved toward next farthest node and the previous steps are repeated until the Buffer is empty. If the Buffer is empty move the sink to its initial location according to CNP algorithm.

5.3 Implementation in MATLAB The above mentioned algorithm is implemented in MATLAB and simulation is done.

5.3.1 MATLAB Overview MATLAB (matrix laboratory) is a numerical computing environment and fourthgeneration programming language developed by Math Works. Initially MATLAB is intended for numerical computing but later on optional toolbox uses the MuPAD symbolic engine allowing access to symbolic computing capabilities and additional package Simulink adds graphical multi-domain simulation and Model-Based Design for dynamic and embedded systems. Typical uses of MATLAB high-performance language for technical computing include 

Math and computation



Algorithm development



Data acquisition



Modeling, simulation, and prototyping



Data analysis, exploration, and visualization



Scientific and engineering graphics 42



Application development, including graphical user interface building

MATLAB allows one to perform numerical calculations, and visualize the results without the need for complicated and time consuming programming. MATLAB allows its users to accurately solve problems, produce graphics easily.

5.3.2 MATLAB System The MATLAB system consists of five main parts.

I.

MATLAB language  MATLAB language is a high-level matrix language.  It has control structures, functions, data structures, I/O and OOP features.  Allows rapid creation of throw-away programs.  Allows creating large and complex application programs.  MATLAB API allows to author C and FORTRAN programs to interact with MATLAB.

II.

MATLAB working environment  MATLAB working environment has various tools to work with MATLAB.  It has facilities to manage variables.  MATLAB supports export and import data across applications.  Certain tools are available to develop and manage MATLAB files.  Debugging and profiling of MATLAB applications are more flexible with MATLAB.

43

III.

MATLAB mathematical function library  MATLAB mathematical functions include computational algorithms.  The elementary computational functions are sum, sine, etc.  Matrix functions are available including matrix inversion.  Special functions like Bessel are available.



MATLAB includes transformation functions, namely Fourier Transformation Functions.

IV.

MATLAB Graphics handler  MATLAB has extensive facilities for displaying vectors and matrices as graphs, as well as annotating and printing these graphs.  It includes high-level functions for two-dimensional and three-dimensional data visualization, image processing, animation, and presentation graphics.  Includes low-level functions that fully customize the appearance of graphics as well as build complete graphical user interfaces for MATLAB applications.

V.

MATLAB Application Program Interface  Programs written in C and FORTRAN can interact with MATLAB by using external interfaces library

5.3.3 Motivation of Using MATLAB

Built in function library of MATLAB enables easy implement of different types of algorithms for WSN. Various WSN protocols can be implemented with very low effort in MATLAB as example topology control, routing, network partitioning and sink placement algorithms can be viewed lively using MATLAB. The graphical functions of MATLAB

44

help to visualize how the protocol actually runs in WSN. Random deployment and visualization of nodes can be done in MATLAB. Built in mathematical functions such as array, matrices, computational geometry, polynomials, linear algebra, numerical methods etc. are very useful for implementing algorithms discussed in this thesis. Use of these functions makes the implementation of graph partitioning, sink placement, sink mobility easy. And the mobility is shown through animation which adds an extra flavor. Furthermore MATLAB allows user to write their own functions and scripts using the built in functions and data types and data structures. Therefore MATLAB is chosen to implement the Sink Mobility algorithm.

5.3.4 MATLAB Functions Several graphical and mathematical MATLAB functions are used to implement the algorithms of this thesis. Some of them are discussed below:

 Graphical Functions 

figure

„figure‟ creates figure graphics objects. Figure objects are the individual windows on the screen in which the MATLAB software displays graphical output. „figure‟ creates a new figure object using default property values. This automatically becomes the current figure and raises it above all other figures on the screen until a new figure is either created or called. figure (h) makes h the current figure, makes it visible and raises it above all other figures on the screen. If h is not the handle to an existing figure, but is an integer, figure(h) creates a figure and assigns it the handle h. figure(h) where h is not the handle to a figure, and is not an integer, is an error. 

hold

The hold function controls whether MATLAB clears the current graph when you make subsequent calls to plotting functions (the default), or adds a new graph to the current graph.

45

hold on

retains the current graph and adds another graph to it. MATLAB adjusts the

axes limits, tick marks, and tick labels as necessary to display the full range of the added graph. hold off resets hold state to the default behavior, in which MATLAB clears the existing graph and resets axes properties to their defaults before drawing new plots. In this thesis hold function is used to hold the graph. 

plot

plot(x, y): If x and y are real number, plot(x,y) produce a point on the figure with coordinate x and y. It is possible to specify color, line styles, and markers when data are plotted using the plot command. In this thesis plot function is used for showing random node deployment and sink location graphically. Fig. 5.2 is the code segment of plot function.

Fig. 5.2 Code segment of plot function used in implementation

Here length(xy) gives an integer value. In this thesis xy(i,1) contains the X- coordinates and xy(i,2) contains the Y-coordinates of the sensor node. Fig. 5.3 is the output of the plot function which shows the random deployed node and the sink node location.

Fig. 5.3 WSN with random node deployment and sink location

46

 Mathematical function  rand rand: generates uniformly distributed pseudo random numbers. This function has various forms. In this thesis rand (1, n) is used to generate random node coordinates, where n is the number of nodes. X and Y both are an array that contains n numbers of random numbers. Fig 5.4 is the code segment that generates random numbers.

Fig. 5.4 Code segment used to generate random coordinates

5.4 MATLAB Code Segments In this thesis random deployments are done in MATLAB by generating the x and y coordinate of a node randomly. Fig. 5.5 shows the code segment to deploy 100 nodes randomly in 200 m*200 m area.

Fig. 5.5 Random Deployment of sensor nodes

47

Creating Buffer is an important part of this algorithm which is proposed in this thesis, where the Buffer contains the node id, coordinates and distances from sink node which is not one-hop neighbor of the sink node. Here the code segment is given in Fig. 5.6 to calculate the buffer from the topology.

Fig. 5.6 Code segment to create the Buffer

After creating the Buffer sink nodes calculates their next positions, and sink nodes move to the next position. Fig. 5.7 shows the output of the implementation of the algorithm.

Fig.5.7 Sink movement path

48

5.5 Simulation Environment In this section performance of the proposed sink mobility algorithm has been evaluated in MATLAB environment. Here 100 nodes are randomly deployed in a 200m X 200m square area assuming all nodes have same capabilities. The network is assumed to be partitioned into four sub-networks [16]. The communication range of the sensor nodes are assumed 45m and initially each node has same level of energy i.e. 0.5 joule. To calculate the transmission energy First Order Radio Model [18] is considered here. Here we compared our proposed mobile sink wireless sensor networks environment with the static sink wireless sensor networks environment where sink placement is done using CNP [10]. In both environment NNMD [17] routing protocol is used to measure the different performance metrics. 

Performance Metrics

The following metrics are used. I.

Avg. energy Consumption: It is the avg. energy is needed to transmit a packet from source to sink.

II.

Number of Round Neighbor Node Die: It is calculated as the number of rounds is needed for the neighbor of sink node to die. This metric can also demonstrate the lifetime for the networks.

The above mentioned metrics are shown in figures below. Figure 5.8 shows avg. energy consumption for a packet to reach to sink. It obvious from the figure that mobile sink network needs less energy as avg. distances from source to sink is reduced here. Another metric is shown in Figure 5.9. It is also cleared from the figure that neighbor nodes of sink is died after a long time (in terms of Round) in case of mobile sink network. Since sink mobiles throughout the whole region of the network, loads are distributed among the sensor nodes. Also as mentioned earlier, avg. distances are minimized here. So energy consumption is minimized. Thus network lifetime is increased in mobile sink network

49

than static sink network. Finally, we may conclude that hotspot problem, mentioned in previous chapter, also solved using mobile sink network. 

Simulation Results

Fig.5.8 Energy Consumption for Static Sink and Mobile Sink Network

Fig.5.9 Neighbor Nodes die for Static Sink and Mobile Sink Network

50

5.6 Advantage of the Proposed Sink Mobility Algorithm:  The proposed algorithm uses Centroid of Nodes in a Partition algorithm [10] to decide initial location of the sink. As on [10] the CNP algorithm places the sink at optimal position where the sink node has highest number of one-hop neighbors. Therefore using CNP algorithm the size of the Buffer is minimized.  As the Buffer contains minimum number of nodes therefore sink has to move minimum number of times to cover the whole area.  As sink traverse near each node after a certain interval of time, each node is one-hop neighbor of the sink node after a certain time, which decreases the use of the nodes that are nearer to sink node when the sink was static. So the node lifetime increases as well as the network lifetime increases.  The algorithm gives total coverage in the network if there is no physical obstacle in the sink path or the nodes in the network are not dead.

51

CHAPTER – 6 Conclusion

Key Topics  Summary  Limitations  Future Work

52

Conclusion

6.1 Conclusion This thesis has presented an algorithm for MSWSN which implements sink mobility in network partition and gives requirements like energy efficiency, better coverage of nodes by the sink node while collecting data directly from the sensor nodes. There are several static methods available for collecting data form sensor nodes. In mobile sink based approaches, sink traverse the network as mentioned in the proposed algorithm and collects data from single hop sensors. Sinks have enough energy, memory and computational power. We exploited this approach and proposed a new mechanism for minimum sink movement for better network coverage and enhance network stability. The contributions of the thesis are as follows: The thesis presents an overview of WSN. Application areas of WSN, different challenges and issues related to WSN are presented here. WSN is a modern technology and it has a very exciting application areas ranging from disaster management to healthcare and vehicle tracking. WSN consist of a large number of low power low cost tiny sensor nodes. These sensor nodes randomly deployed in a region and they collect information and send them to the sink using multi hop path. In spite of large application areas there are some design challenges and issues that affect the performance of WSN. Energy constraint, limited hardware capabilities, fault tolerance, scalability, quality of service are some of such issues. Especially for time critical application quick data delivery is also an important issue. Depending upon the study of these challenges and issues this thesis focuses on three key issues: energy efficiency and network coverage. Here a large scale WSN is partitioned by applying graph partitioning method. Then for each partition sink node is deployed. The advantage of this approach is it provides energy

53

efficiency; increase in network lifetime, as multiple sink gives better network manageability than single sink. Sink placement has an important role in WSN. In this thesis seven algorithms are discussed for efficient sink placement in each partition of a WSN. As static sink has some drawbacks such as hotspot problem, the advantages of implementing mobility in WSN is surveyed. Then a mobility algorithm is proposed. The performance analysis is compared with existing to static sink algorithm. These algorithms are not tested in real environment. Therefore these results cannot be claimed as accurate.

6.2 Limitations The proposed algorithm has a delay constraint which is a limitation of every mobility algorithm. This delay is the amount of time that is needed by the sink between two consecutive visits of same node. And this algorithm can‟t be used with an application which does not support delay. So the delay should be minimized. In this algorithm we do not restrict communication in one-hop, whenever the sink is not in a range if sensor nodes have sensed any event it can forward it using multi-hop message propagation. But here the path discovery from source to sink node is an extra overhead.

6.3 Future Work The thesis can be extended to introduce some new concepts to solve different challenges and issues of WSN. One future scope of this thesis is to introduce scheduling with the proposed algorithm. If sleep scheduling is introduced then it may help to further achieve energy

54

efficiency, increase network lifetime. Then introduce an appropriate routing algorithm that will give better performance for transmission of data packet to reach sink when it is not in range of sensor nodes. There is a scope to compare this proposed sink mobile algorithm with other existing sink mobile algorithms as a future work of this thesis.

55

BIBLIOGRAPHY 1.

V. Kumar, S. Jain and S. Tiwari, “Energy Efficient Clustering Algorithms in Wireless Sensor Networks: A Survey”, in IJCSI International Journal of Computer Science Issues, Vol. 8, Issue 5, No 2, September 2011.

2.

D. Efstathiou, I. Kotsogiannis, S. Nikoletseas, “Energy Balanced Data Propagation in Wireless Sensor Networks with Diverse Node Mobility” in MobiWac‟11, Miami, Florida, USA, October 31–November 4, 2011,.

3.

T. Camp, J. Boleng, and V. Davies, “A survey of mobility models for ad hoc network research”, in Proceedings of Wireless Communications and Mobile Computing, 2002.

4.

M. R. Jafri, N. Javaid, A. Javaid, Z. A. Khan, “Maximizing the Lifetime of Multi-chain PEGASIS using Sink Mobility” in Journal of Networks, Vol. 5, No. 6, June 2010.

5.

W. Liang, J. Luo, and X. Xu, “Prolonging Network Lifetime via a Controlled Mobile Sink in Wireless Sensor Networks” in IEEE Global Telecommunications Conference (2010).

6.

I. Chatzigiannakis, A. Kinalis and S. Nikoletseas, “Sink mobility protocols for data collection in wireless sensor networks”, in 9th International Symposium on Modeling, Analysis and Simulation of Wireless and Mobile Systems, (2006), 52 – 59.

7.

S. Jain, R.C Shah, W. Bunette, G. Borriello, and S. Roy, “Exploiting Mobility for Energy Efficient Data Collection in Sensor Networks”, in Mobile Networks and Applications, (2006), 327-339.

8.

D. Sumorok, D. Starobinski, A. Trachtenberg, “Simulation of TinyOS Wireless Sensor Networks Using OPNET”, Boston University.

9.

S. K. Mitra, A. Chakraborty, S. Mondal, M. K. Naskar, “Simulation of Wireless Sensor Networks UsingTinyOS”, A case Study, Jan 1, 2010.

56

10.

D. Das, Z. Rehena, S. Roy, N. Mukherjee, “Multiple-Sink Placement Strategies in Wireless Sensor Networks”, in Communication Systems and Networks(COMSNETS) 2013 Fifth International Conference on 7-10 Jan. 2013.

11.

GUO, JINGXING, “Sink Mobility Schemes in Wireless Sensor Networks for Network Lifetime Extension”, in Electronic Theses and Dissertations, Paper 103 (2012).

12.

W. Y. Poe and J. B. Schmitt, “Minimizing the Maximum Delay in Wireless Sensor Networks by Intelligent Sink Placement”, in Technical Report No. 362/07.

13.

H. Karl, “Protocols and Architecture for Wireless Sensor Network”, Wiley publication.

14.

W. Y. Poe, J. B. Schmitt, “Self-Organized Sink Placement in Large-Scale Wireless Sensor Networks”, Supported by G. Daimler, U. Karl Benz- Stiftung under grant number 02-13/06, 2009

15.

D. Puthal, “Secure Data Collection and Critical Data Transmission Technique in Mobile Sink Wireless Sensor Networks”, Mtech Thesis, NIT Rourkela, 2012.

16.

Z. Rehena, S. Roy, N. Mukherjee, “ Topology Partitioning in Wireless Sensor Networks using Multiple Sinks”, in the 14th International Conference on Computer and Information Technology (ICCIT 2011), IEEE, Dhaka, Bangladesh, December 22-24, 2011.

17.

Z. Rehena, S. Roy, N. Mukherjee, “Efficient Data Forwarding Techniques in Wireless Sensor Networks”, in the 3rd IEEE International Advance Computing Conference (IACC 2013), Ghaziabad, India, February 22-23, 2013.

18.

W.R. Heinzelman, A. Chandrakasan, H. Balakrishnan, “Energy-Efficient Communication Protocol for Wireless Micro Sensor Networks”, in Procs. of the 33rd Hawaii International Conference on System Sciences, Hawaii, 2000.

57

Suggest Documents