A Hybrid Sink Repositioning Technique for Data Gathering in Wireless Sensor Networks

Wireless sensor network (WSN) is a wireless network that consists of spatially distributed autonomous devices using sensors to cooperatively investigate physical or environmental conditions. WSN has a hundreds or thousands of nodes that can communicate with each other and pass data from one node to another. Energy can be supplied to sensor nodes by batteries only and they are configured in a harsh environment in which the batteries cannot be charged or recharged simply. Sensor nodes can be randomly installed and they autonomously organize themselves into a communication network. The main constraint in wireless sensor networks is limited energy supply at the sensor nodes so it is important to deploy the sink at a position with respect to the specific area which is the area of interest; which would result in minimization of energy consumption. Sink repositioning is very important in modern day wireless sensor network since repositioning the sink at regular interval of time can balance the traffic load thereby decreasing the failure rate of the real time packets. More attention needs to be given on the Sink repositioning methods in order to increase the efficiency of the network. Existing work on sink repo - sitioning techniques in wireless sensor networks consider only static and mobile sink. Not much importance is given to the hybrid sink deployment techniques. Multiple sink deployment and sink mobility can be considered to perform sink repositioning. Precise information of the area being monitored is needed to offer an ideal solution by the sink deployment method but this method is not a realistic often. To reallocate

Wireless sensor network (WSN) is a wireless network that consists of spatially distributed autonomous devices using sensors to cooperatively investigate physical or environmental conditions. WSN has a hundreds or thousands of nodes that can communicate with each other and pass data from one node to another. Energy can be supplied to sensor nodes by batteries only and they are configured in a harsh environment in which the batteries cannot be charged or recharged simply. Sensor nodes can be randomly installed and they autonomously organize themselves into a communication network. The main constraint in wireless sensor networks is limited energy supply at the sensor nodes so it is important to deploy the sink at a position with respect to the specific area which is the area of interest; which would result in minimization of energy consumption. Sink repositioning is very important in modern day wireless sensor network since repositioning the sink at regular interval of time can balance the traffic load thereby decreasing the failure rate of the real time packets. More attention needs to be given on the Sink repositioning methods in order to increase the efficiency of the network. Existing work on sink repositioning techniques in wireless sensor networks consider only static and mobile sink. Not much importance is given to the hybrid sink deployment techniques. Multiple sink deployment and sink mobility can be considered to perform sink repositioning. Precise information of the area being monitored is needed to offer an ideal solution by the sink deployment method but this method is not a realistic often. To reallocate the sink, its odd pattern of energy must be considered. In this chapter a hybrid sink repositioning technique is developed for wireless sensor network where static and mobile sinks are used to gather the data from the sensor nodes. The nodes with low residual energy and high data generation rate are categorized as urgent and the nodes with high residual energy and low data generation rate are categorized as non-urgent. Static sink located within the center of the network collects the data from the urgent nodes. A relay is selected for each urgent sensor based on their residual energy. The urgent sensor sends their data to the static sink through these relay. Mobile sink collects the data from the non-urgent sensors. The performance of the proposed technique is compared with mobile base station placement scheme mainly based on the performance according to the metrics such as average end-to-end delay, drop, average packet delivery ratio and average energy consumption.

Wireless sensor network
A wireless sensor network (WSN) is a discrete network comprising of numerous wireless nodes referred to as sensors, which are deployed in order to perform the designated specific tasks like monitoring the surroundings and measuring the physical parameters such as temperature, pressure, humidity, etc. Since the location of an individual sensor cannot be preplanned or predetermined, these networks must have the potential to self-organize themselves. A wider geographic area can be covered by efficiently networking a large number of sensors thereby resulting in precise, dependable and robust networks. Wireless sensor networks are responsible to gauge, record, process and transfer the information to the destination node within the network zone using the assigned communication routes. Each sensor deployed in the network performs the functions like sensing the environment, processing the sensed data and communicating with the neighboring sensors. The sensor nodes have limited sensing range, processing power and energy levels.
The performance and efficiency of any wireless sensor network depends on the computational power, battery lifetime, data storage and communication bandwidth which in turn are directly dependent on the available energy levels. A major hurdle in the operation of sensors is the unavailability of an adequate energy. Normally the sensors depend upon their battery for power which in many cases cannot be replaced or recharged. Hence while designing any protocol for such networks, the conservation of the available energy of the sensor must be considered as an important factor. Thus, extending the lifetime of the sensor networks is a major area which is receiving a significant amount of interest from the research communities.

Structure of wireless sensor network
A basic sensor network consists of a large amount of sensor nodes. Each sensor is made up of small individual microcontroller fitted with sensors in which communication such as radios is used. The components of a sensor node are a sensing unit, a processing unit, a transceiver and a power unit. Generally, the sensor networks can form either a mesh topology or a star topology. Nodes can propagate by routing or flooding. In WSN, each node is assigned a number as its unique address for the purpose of communication. Functionally sensor nodes can be classified into two types. First, the nodes that deal within the network with other nodes and second, the ones which interface with the outside environment which are called as the gateway nodes or the sink nodes. The general structure of the wireless sensor network is shown in Figure 1. Figure 1, the number of sensors is deployed in the geographical extent of the entire network and they will perform their task of sensing, processing, relaying and doing communication. All the information or the data that is sensed by the sensors will be forwarded to the sink node through multi hop relaying from where it will be provided to the end users.

Types of wireless sensor networks
Wireless sensor network typically has little or no infrastructure. There are two types of WSNs, namely structured model and an unstructured model. Structured model is deployed in a preplanned manner and it is used only for the network with fewer nodes. It has lower network maintenance and cost. Uncovered regions are not present in this model. Unstructured model is densely deployed in the network. The nodes that are deployed randomly have uncovered regions and are left unattended to perform the task. Maintenance is difficult here.

Characteristics of wireless sensor network
Some of the salient characteristics of the wireless sensor networks are described below: • Dense sensor node deployment: typically, the sensor nodes are configured closely in WSN as compared to a Mobile Adhoc Network.
• Battery based energy source: energy can be supplied to the sensor nodes by batteries only and they are usually configured for harsh environment in which the batteries cannot be charged or recharged easily. • Energy, computation and storage limitations: sensor nodes have limited energy, computation, and storage capabilities. Hence, the energy conservation measures are required in order to improve the efficiency and the life of the network.
• Self-configurable: generally, the sensor nodes can be randomly installed and they are capable of establishing a communication network by organizing themselves appropriately.
• Unreliable sensor nodes and data redundancy: sensor nodes are prone to physical damages or outages owing to their deployment in harsh or hostile conditions. The sensor nodes that are deployed close to each other play a similar role, in order to accomplish a common sensing task in a given area of concern. This results in building up of redundancy in events of failure.
• Application specific: depending upon the application, the design considerations of wireless sensor network will vary and may need customization.
• Frequent topology change: in most of the sensor network applications, the sensed data may pass through the various sensor nodes between source and the sink, thereby showing a many-to-one traffic pattern. The sensor node failure, damage, energy depletion, etc. may force the network topology to change continuously [1].

Major applications of wireless sensor networks
There are various applications of WSN that require constant monitoring and particular event detecting based on the requirement and features of the system. The applications can be divided into three categories [2] as mentioned in Table 1.
The importance of WSN is briefly described below for certain major applications as follows: • Environmental and agricultural applications WSNs are useful for the purpose of area monitoring, monitoring water levels as well as the rainfall. It is also used for forest fire & flood monitoring. Agricultural applications include sensing of chemicals, soil condition, irrigation planning, etc.

• Military applications
WSN's various characteristics are extremely useful in the area of enemy movement tracking, enemy intelligence information collection and transmission, surveillance, etc.

• Medical operations
Sensor networks play a critical role in monitoring the physiological readings of patient like blood pressure or pulse, etc. It plays an extremely significant role in post calamity medical relief operations such as earthquakes and floods.

• Heavy industrial monitoring
WSNs help in industrial applications by enabling to track material movement, warehousing, inventory planning and refurbishing, in spite of the harsh field conditions, consequently saving huge costs that are involved in such type of businesses.

Sink repositioning
In WSN, sinks are bounded with abundant resources and the sensors that generate data are termed as sources. The sources can transmit data to a single or multiple sinks for the purpose of analysis and processing.
In wireless sensor networks, sink repositioning is preferred almost by all applications that involve real time communication. It helps to evenly distribute the traffic and hence minimize the packet loss or the data loss. To carry out sink repositioning, multiple sink deployment and sink mobility can be adopted. Precise information of the area being monitored is needed to offer an ideal solution by repositioning the sink.

Types of sink repositioning
Sink repositioning can be performed in the following ways.
Multiple sink deployment: in a given geographic area, multiple sinks can be deployed. By deploying multiple sinks in the network, the average number of hops through which the information has to pass through is decreased, since the data will always be sent to the nearest sink. Also by deploying multiple sinks, the load is evenly distributed among all the sinks [3].
Sink mobility: it is extremely advantageous in case of WSNs, if the sinks can move within the network boundaries with an acceptable delay. The mobile sink collects the data from the sensor nodes and also transmits it further. Although this approach results in comparatively higher time lag or latency, it helps in conserving the energy and hence increasing the life span [4].
Deploying multiple mobile sinks: multiple mobile sinks can be deployed in order to collect the data from the sensors in the given network without causing delay and buffer overflow problem. Here the mobile sink will relocate at regular intervals before the sensor's buffer overflows thereby avoiding the buffer overflow problem.
Initially, the research work in the field of wireless sensor networks mainly discussed the issues related to an uneven energy consumption which was leading to the energy hole problem in a sensor network. Generally, all the sensors generate data at a constant bit rate and transmit the data to the static sink through multihop transmission. Therefore the sensors which are closer to sink will die of energy soon, thereby creating an energy hole around the sink. The researchers have proposed an analytical modeling for the energy hole problem and using their model they have discussed the effectiveness of various techniques employed for justifying this problem.

Problem statement
During the regular network operation, relocating the sink is very challenging. During the sink's movement, the fundamental issues are when the sink should move, where the sink should move and how the data traffic would be handled when the sink is on the move. In a multi-hop network, finding an optimal location for the sink is very difficult. The difficulty mainly arises due to the following two factors. First, the sink can be moved to an infinite possible position. Secondly, a new multi-hop network topology needs to be established for every solution considered during the search for an optimal location [5].
Since employing the sink requires the precise knowledge of the monitored area, they are not always reasonable, even though the sink deployment can provide optimal solution. When accurate position of sensor is available and when nodes have motion capabilities, controlled deployment or online deployment is possible. The developing graph may have different properties during the online deployment. The basic issue in the sensor deployment is controlling the dynamic graph of mobile sensor networks [6]. The energy-unbalanced problem is another big challenge in sink deployment. Here the sensors that are closer to the sink are likely to consume their energy much faster than the other nodes [7] . When a network consists of multiple clusters, the relocation problem is significantly compounded. The sink cannot choose to move randomly around its cluster to enhance the intra-cluster network operation without considering the potential impact on inter sink connectivity that could impose on its capability to maintain communication with the sink nodes of other clusters [8]. Using the odd pattern of energy depletion, first the relocation of the sink has to be initiated even if it is considered as the most efficient network operation for a given traffic distribution at that time.
The sink must make sure that no data is lost, when it is moving [9]. Using mobile sinks for data gathering has the drawback of buffer overflow problem. In other words, the sink has to visit each sensor node before its buffer overflows and this will depend on the speed of the mobile sink. However, it is very difficult to set the optimum speed for the mobile sink, since each sensor node has different buffer sizes and information generation rate. Apart from this problem, the residual energy of the sensors must also be considered, since sensors with low residual energy may deplete their energy before the mobile sink visits them.

Research issues addressed
In order to deal with the various issues in case of the wireless sensor network, the main objectives of the research is to design and implement a hybrid sink repositioning technique (HSRT) for data gathering in wireless sensor networks. The main focus has been on devising a technique which draws the benefits of both multiple sinks and sink repositioning, in order to improve the energy efficiency and various other performance metrics of the network. The design aspects of HSRT have been aimed at overcoming the energy hole problem and buffer overflow problem by taking into consideration the residual energy of the sensors that are deployed in the network.

Structure overview of hybrid sink repositioning technique (HSRT)
In the hybrid sink repositioning technique (HSRT), the sensors are randomly deployed within the geographic extent of the entire network. A single static sink and multiple mobile sinks are deployed in the network. The static sink is deployed at the center of the network. In case of sensors, the overflow of information occurs due to the limited storage capacity. The overflow time of each sensor is computed based upon their storage size and the data generation rate.
All the sensors are then allotted a particular group based on their overflow time and location. After this one mobile sink is assigned to each group. Depending upon the data generation rate and residual energy of the sensors, the sensors are classified into two different categories namely urgent and non-urgent sensors. The static sink performs the function of collecting the data from the urgent sensors. A strategy has been devised in order to select and form the set of relay sensors, in such a manner that every individual urgent sensor has at least single relay sensor that is closest to the static sink. The urgent sensors transmits their information through the relay sensors to the final destination which is the static sink. In order to collect the data from the non-urgent sensors, a mobile sink deployment algorithm has been developed which will periodically collect the data from these sensors.

Sensor node classification
To explain the concept, a wireless sensor network with "i" number of sensors is considered. The sensor node classification has been done into two groups as urgent sensors and nonurgent sensors based on their residual energy and the data generation rate.
As shown in Figure 2, E ri is the residual energy of the sensors, DG ri is the data generation rate of the sensors, E rt is the minimum threshold value of the residual energy and DG rt is the maximum threshold value of the data generation rate. The sensors are classified as urgent and non-urgent sensors depending on the following two criteria.
If, E ri < E rt and DG ri > DG rt then the sensor is treated as urgent sensor.
Else if, E ri > E rt and DG ri < DG rt then the sensor is treated as non-urgent sensor.
Thus a sensor having low residual energy and high data generation rate is categorized as urgent sensor and the sensor having high residual energy and low data generation rate is categorized as non-urgent sensors.

Positioning relay sensors near the static sink
For effective network operation and optimum performance, a two layer network is considered in a sensing field as shown in Figure 3 wherein the relays and the static sink form the upper layer whereas the urgent sensors form the bottom layer.  In the given sensing field, the sensors are densely deployed whereas the relays are sparsely deployed. Data gathering is done by the joint co-operation of both sensors and the relays. A relay sensor is connected to the static sink in the upper layer of the network otherwise it is unconnected. Initially the set of the urgent sensors and the relays is not known as shown in Figure 4.
The main concern is to make use of the relay sensors having high residual amount of energy, in order to forward the information that is sensed by the urgent sensors to the static sink. A set of primary relays which are nearest connected relays to the urgent sensors S is determined. Let this set of relay sensors be denoted by M (SR ne ).The urgent sensors directs their data to M (SR ne ) and then M (SR ne ) relays this sensory data to the static sink N. In each interval the set of the relay sensors keeps on changing.

Now a set H(m i ) is created such that,
where H(m i ) is the set of all the urgent sensors attended by m i . Each m i will cover a set of all the relay sensors M(SR ne ) for all the urgent sensors S n in different groups as depicted in

Mobile sink deployment algorithm
A mobile sink deployment algorithm is developed in order to collect the data periodically from the non-urgent sensors. The main objective of this algorithm is to ensure that when the mobile sink is on the move it must travel minimum distance and at the same time perform maximum data collection.
All the mobile sinks, will first of all, identify those non-urgent sensors which are directly transmitting their information to them and at the same time the distance between these sensors and the mobile sink is less than the particular threshold value of the transmission distance. This is done because each mobile sink has its own capability of till what distance it can move while relocating. So a threshold value of the transmission distance for the mobile sink is selected. A set C J is created where C J denotes the set of the id's of those non-urgent sensors which are sending their information directly to the mobile sinks.
Once the set C J is created, the mobile sink will wait for a particular duration during which each non-urgent sensor from C J will transmit minimum one data packet to the mobile sink.
The header of the data packet holds the ids of those sensors which are transmitting their information through these non-urgent sensors. As soon as the mobile sink receives the data packet from the non-urgent sensors from the set C J , it records the ids of such sensors which are sending their data through these non-urgent sensors. Finally the mobile sink is able to identify the number of such sensors which are transmitting their own information through K, where, K ∈ C J .
In order to reduce the mean distance between the non-urgent sensors and the mobile sink, the position of the distant sensors needs to be estimated. For this a set Z k is created such that, Where Z k is the set of the number of those distant sensors that transmit their information through the non-urgent sensors to the mobile sink and at the same time, the distance between them and the non-urgent sensors is minimum. Here route IK is the set of id's of the sensors on the route from sensor I to the non-urgent sensor k.
Once the mobile sink has identified that there are Z k sensors communicating through nonurgent sensors k, the next task is to find the optimal position for the mobile sink. For this, the resultant route vector is used. The resultant route vector for sink j is approximated as, where, RV j is the Resultant route vector; U k (j) is the unit vector from mobile sink j to the nonurgent sensor k; and Z k is the set of number of distant sensors communicating through k.  If the magnitude of the resultant route vector is less than a particular threshold value, then the mobile sink rests at its current position. On the other hand, if the resultant route vector is greater than a particular threshold value, then the mobile sink will reposition itself to a new location P J + RV j . St max , where, P J is the current position of the mobile sink and St is the maximum probable value of the stride that can be achieved by the mobile sink.
The process is repeated and the iteration continues, if the mobile sinks are moving for collecting the data from the non-urgent sensors. If all the mobile sinks have come to a standstill, then the mobile sink deployment algorithm terminates.

System flowchart of hybrid sink repositioning technique (HSRT)
The overall system flowchart of the hybrid sink repositioning technique (HSRT) that is designed for the purpose of data gathering in case of wireless sensor networks is depicted in Figure 5.

Simulation model and parameters
The implementation and the simulation of the hybrid sink repositioning technique (HSRT) are done by using the Network Simulator ns 2.32. A bounded region of 1000 × 1000 m 2 is considered in which the sensors are deployed using a rectangle distribution. The power levels are assigned to the sensors in such a way that their communication and sensing range is 250 m. In the simulation, the maximum data that can be supported by the communication media is fixed to 2 Mbps. The traffic generator used is the constant bit rate. The medium access control layer protocol used for the wireless local area network is the distributed coordination function of IEEE 802.11. All the energy values have been selected based upon the energy model of ns2.32. Energy model represents the level of the energy in the sensors like the initial energy, idle energy and the usage of the energy for every packet it transmits and receives. The TCL script has been written for the HSRT. The NAM file is executed from the TCL script and it displays the network visualization of the HSRT. The NAM output which gives us the network visualization of HSRT is shown in Figure 6.
A single static sink as indicated by red color is deployed within the center of the network. The various sensors that are deployed in the network are assigned to a particular group. The multiple mobile sink as indicated by blue color are deployed in the network of the HSRT wherein each group is allotted one mobile sink, which will relocate itself inside the group that has been assigned to it, around every specific interval of time in order to collect the data from the non-urgent sensors. After running and executing the simulation, the mobile sink repositions itself to a new optimal location which is computed by the HSRT Algorithm, in order to collect the data from the non-urgent sensors of that particular group, as shown in Figure 7.
The number of sensors deployed in the network is increased and correspondingly the NAM output is observed before and after the sink repositioning by employing the HSRT, as shown in Figures 8 and 9 respectively.

Simulation results
The evaluation of the performance of the hybrid sink repositioning technique that is designed is done based on the four performance metrics of any wireless sensor network. These performance metrics are the average energy consumption, end to end delay, average packet drop and packet delivery ratio. All these parameters play a vital role in assessment of any designed technique, since the main focus is on data gathering application of the wireless sensor network.
The performance of HSRT is compared with the existing multiple mobile base station placement scheme (MBSP) [10] for doing the necessary evaluation.
The tracing and monitoring of the simulation is done by running the TCL script which gives the trace values. The analysis of these trace values that has resulted from the simulation is done by making use of the trace data analyzer which is the X-Graph. The X-Graph is called within the OTCL script. The X-Graph will visually display the information of the trace values produced from the simulation.
The effect of HSRT on the various mentioned performance metrics is seen first by varying the number of sensors in the network and then by varying the speed of the mobile sinks.

Simulation results obtained by varying the number of sensors and the speed of the mobile sinks
In order to analyze the scalability of the HSRT, the number of sensors is varied from 20 to 100. The trace values for both HSRT and MBSP are monitored. Figures 10-17 show the graphical representation of the simulation results obtained for various performance metrics by employing both HSRT and MBSP. Figure 10 shows the average energy consumption for both the techniques, when the number of sensors is increased. The energy consumption increases almost linearly for the two techniques, when the network size is increased. It is observed that the HSRT consumes less energy when compared to the existing MBSP, since the relays are selected based on their residual energy. Moreover a particular threshold value of the residual energy is set for the sensors and therefore before the sensors completely deplete their energy, the proposed HSRT technique comes into picture and proper strategy as described is implemented which results in the significant amount of the energy saving of the entire network.

Wireless Sensor Networks -Insights and Innovations
In order to analyze the mobility of sinks, the speed of the mobile sinks is varied from 2 to 10 m/s. Figure 11 shows the average energy consumption of both HSRT and MBSP when the speed of the mobile sink is increased. The energy consumption increases linearly as observed from the simulation. Moreover HSRT consumes less energy than MBSP. A Hybrid Sink Repositioning Technique for Data Gathering in Wireless Sensor Networks http://dx.doi.org/10.5772/intechopen.70335 Figure 12 shows the average end-to-end delay in a scenario of varying number of sensors. When the network size is increased, it increases sink deployment time leading to the increased delay. From Figure 12, it is observed that HSRT minimizes the delay when compared with the existing MBSP scheme. In the proposed HSRT, the average number of hops that are involved in the transmission and reception of the data is minimized which also leads to the reduction of the overall end to end delay. Moreover the mobile sink is itself relocating at regular intervals to collect the data from the non-urgent sensors. Figure 13 shows the results of average end-to-end delay when the speed of mobile sinks is increased from 2 to 10 m/s. It is observed that the delay increases beyond 0.3 seconds when the speed is above 6 m/s. The proposed HSRT shows a significant amount of improvement in end to end delay as compared to MBSP due to the proper distribution of the traffic load between the sinks as well as the sensors. On the other hand, Figure 15 gives the results of packet drop for both the techniques when the speed of mobile sink is increased. When the mobile sink moves at higher speed, more buffer overflow will occur thereby resulting in more packet drops. This drawback is overcome in the proposed HSRT. Simulation results indicates that HSRT results in the reduction of the dropping of the data packets with the increasing speed of the mobile sinks. Figure 16 shows the corresponding packet delivery ratio by varying the number of sensors. The increase in the network size results in the slight degradation of the delivery ratio. It is observed that HSRT achieves higher packet delivery ratio when compared with the existing MBSP technique. In HSRT the traffic load is evenly distributed among the sinks as well as the sensors. The use of mobile sinks which are relocating at regular intervals also decreases the number of hops. This ensures the enhancement in the delivery of the packets with less drop in the packets. The reduction in the Average Drop of the proposed HSRT gives rise to the improvement of the packet delivery ratio. Figure 17 presents the packet delivery ratio when the speed of the mobile sink is increased. Higher the speed of the mobile sink larger will be the packet drops. Hence the delivery ratio decreases. But due to the optimum relocation of the sinks and data flow pattern, HSRT achieves higher delivery ratio than MBSP.

Research conclusion
The hybrid sink repositioning technique is less complex and the overheads involved in running the algorithm is less and hence the proposed HSRT technique can be easily implemented in any real time applications like for the purpose of surveillance, military application or any other scenario where efficient data gathering is the prime focus and where each and every event needs to be detected properly.
Moreover the major hurdles directly affecting the performance of wireless sensor networks, namely the energy hole problem and the buffer overflow problem are minimized by the proposed hybrid sink repositioning technique that has been designed and successfully implemented. Through simulation results, it has been observed that employing the HSRT Algorithm enhances the overall functioning of the entire wireless sensor network in terms of the performance metrics namely the average energy consumption, end to end delay, average drop and packet delivery ratio. The improvement in all these performance metrics extends the lifetime as well as the accuracy of the WSN. Moreover HSRT also reduces the complexity involved in repositioning the multiple mobile sinks by employing the mobile sink deployment algorithm at regular intervals efficiently.
The research work presented in this chapter mainly focused on the energy consumption in terms of balancing and saving in order to extend the lifetime of the WSNs. Basically all the mobile sinks should remain active all the time in order to perform the task of data collection efficiently. But, also there are chances that they will remain idle most of the time if the data collection is light. The process of data collection gets affected or comes to a standstill if the mobile sink fails due to some fault. So the future scope or work must aim towards development of some effective visiting schedule and trajectory for the mobile sinks. Moreover it should include techniques for reducing the power consumption of idle sink and recovery of the failed mobile sinks.