A Novel Scheme to Minimize Hop Count for GAF in Wireless Sensor Networks : Two-Level GAF

In wireless sensor networks, geographic adaptive fidelity (GAF) is one of the most popular energy-aware routing protocols. It conserves energy by identifying equivalence between sensors from a routing perspective and then turning off unnecessary sensors, while maintaining the connectivity of the network. Nevertheless, the traditional GAF still cannot reach the optimum energy usage since it needsmore number of hops to transmit data packets to the sink. As a result, it also leads to higher packet delay. In this paper, we propose amodified version of GAF tominimize hop count for data routing, called two-level GAF (T-GAF). Furthermore, we use a generalized version ofGAF calledDiagonal-GAF (DGAF)where two diagonal adjacent grids can also directly communicate. It has an advantage of less overhead of coordinator election based on the residual energy of sensors. Analysis and simulation results show significant improvements of the proposedwork comparing to traditional GAF in the aspect of total hop count, energy consumption, total distance covered by the data packet before reaching the sink, and packet delay. As a result, compared to traditional GAF, it needs 40% to 47% less hop count and consumes 27% to 35% less energy to extend the network lifetime.


Introduction
In WSNs, sensors are specially designed to sense physical parameters of the phenomenon within the area of interest.Furthermore, these sensors are capable of simple local computation on sensed data and send only the required partially processed data to the base station called sink.These sensors have limited power, processing, storage, and communication capabilities.Hence, these networks require more effective and energy efficient schemes for data routing and processing.In recent years, various routing protocols have been proposed with higher energy efficiency in WSNs in order to minimize energy usage and prolong the network lifetime [1][2][3][4].The main goal of designing routing protocols is to achieve higher energy conservation for transmission of data packets to the sink in order to extend the network lifetime.Since energy consumption due to data forwarding from one sensor to another is directly proportional to the square of the transmission distance between the transmitter and the receiver [5], most routing protocols prefer multihop transmission rather than direct transmission.In multihop routing protocols, once a sensor has a data packet to be delivered to the sink, it checks whether the sink is in the transmission range or not.If it is, data packet can be delivered directly; otherwise it looks for the available options of neighboring sensors directly connected to it and selects any one of them as a relay and forwards the data packet to it.This process continues till data reaches the sink.The data packets received from neighbor sensors can also be aggregated to avoid redundant transmission.
In recent years, various location based routing protocols have been proposed for WSNs where energy consideration is taken as an important constraint to prolong the network lifetime [2][3][4].Location based routing protocols use the physical location information of sensors to route data in between them provided by GPS or some other localization systems equipped with sensors.Sensors can use their geographic positions (coordinate values) to determine the distance from other neighboring sensors that helps choose another sensor as a relay to forward the packet towards the sink [6][7][8][9][10].
In order to achieve higher energy conservation, most routing protocols use a subset of sensors deployed within the region.GAF is a location based multihop routing protocol 2

Active nodes Grids
Sleeping nodes r r Figure 1: Example of routing data using virtual grids in GAF.
based on virtual grids [11].It conserves energy by keeping unnecessary sensors in sleep state, while maintaining higher connectivity.GAF algorithm classifies sensors into equivalent groups based on their locations which are determined using GPS or some other localization systems equipped with sensors [6][7][8][9][10].Even with geographic knowledge of sensors, it is not feasible to determine equivalent sensors for transmission between sensors.Sensors that are equivalent for communication for some sensors may not be equivalent for others.To resolve this problem, GAF uses the concept of virtual grid, for which the entire region is divided into several small square grids, where any sensor of one grid can communicate with any sensor in the adjacent grid.Thus all sensors in each grid are equivalent for communicating with the adjacent grids.The size of the grid squares is chosen in such a way that any two farthest sensors in any adjacent grids can communicate with each other.For example, as illustrated in Figure 1, sensors forward packets to a sensor placed in the adjacent grid towards the sink.For each grid, only one sensor is active at a time and the rest of them are in sleep mode to extend the lifetime of the network.
There is a limitation with traditional GAF; that is, data can be forwarded only in two possible directions: horizontal and vertical.To avoid this limitation we also use a generalized version of GAF called Diagonal GAF (DGAF) where two diagonal grids can also directly communicate [12].In DGAF, size of the virtual grid depends on transmission range so that any two farthest sensors in any adjacent grids can communicate with each other.
As illustrated in Figure 2, n 0 and n 1 are two farthest sensors in two adjacent grids.The side of the square grids is  units and the transmission range is  units.In order to meet the definition of virtual grid, distance between any two sensors in adjacent grids must not be larger than transmission range .Thus for traditional GAF, Diagonal GAF (DGAF), (2)

Two-Level GAF (T-GAF)
2.1.Basic Idea.In both GAF and DGAF, a sensor of one grid can communicate with only sensors of adjacent grids (AGs).In both cases, there is a possibility when a sensor of one grid can directly communicate with some sensors of neighbors of adjacent grids, if the sensors of those grids are in the transmission range of the source sensor.In this work, we propose a novel scheme to minimize the hop count so that a sensor of one grid can directly forward the data packet to a sensor of neighbor of its adjacent grids (NAG), if they are in the transmission range.Hence, it also leads to less packet delay due to less number of participating sensors in data routing.We apply the above-mentioned scheme for both GAF and DGAF.As shown in Figure 3, black color grid, light-gray color grids, and dark-grey color grids represent the source grid, adjacent grids (AGs), and neighbors of adjacent grids (NAGs), respectively.T-GAF uses two-level sharing scheme of routing tables, where each grid updates its routing table including sensors of AGs and sensors of NAGs, if they are in the transmission range.The routing table is required to be updated after each rotation of coordinator sensor election.Once a sensor becomes the coordinator, it simply sends a broadcast message to all its neighbors specifying its own location and grid-id it belongs to.When a sensor receives this broadcast message, it updates its routing table making new entry if the sensor is in either its AG or its NAG. Figure 3 shows the total required entries in the routing tables for T-GAF and T-DGAF.In T-GAF, however, it needs at most 8 more entries (i.e., total 12) instead of 4. For average case it does not need more than 10 as total entries, since some of the sensors of NAGs will be beyond the transmission range of the source sensor.Similarly, in T-DGAF, however, it needs at most 16 more entries (i.e., total 24) instead of 8.For average case it does not need more than 16 as total entries, since some of the sensors of NAGs will be beyond the transmission range of the source sensor.For example, in two neighboring grids, G1 and G2, G1 as a source will have the sensors of all of its adjacent grids in the routing table with the sensors of the adjacent grids of G2, if they are in transmission range of G1.
Figures 4 and 5 show the comparison of the routing scheme of GAF versus T-GAF and DGAF versus T-DGAF, respectively.Solid lines represent the current communication link, while dotted lines represent the possible communication links if the sensors of NAGs will be considered for forwarding.
T-GAF is based on geographic routing with greedy forwarding scheme for transmission of data towards the sink [13].It always chooses a sensor as a relay that is closest to the sink and forwards the data to it.This process continues till the data reaches the sink.Hence, it always chooses the shortest path based on the local available information of the network.In order to achieve uniform load distribution, T-GAF divides the entire region into several square-shaped grids and performs coordinator rotation among sensors in each grid so that no sensor will be overloaded.The total active sensors participate in routing depending on the total virtual grids formed after virtual grid division.Hence, GAF works efficiently for any number of sensors deployed in the region.As discussed by Qi and Qiu [14], in order to achieve optimum energy usage in GAF, an efficient coordinator election scheme helps the average load distribution and the lifetime for the network.Coordinator election depends upon the best position of sensors (i.e., near the centre of the grid) and its energy distribution; it helps improve load distribution and efficient energy usage which extends the network lifetime.T-GAF has an advantage over [14] of less overhead in the coordinator election; it depends on the residual energy of sensors but not the position in the grid.It always elects a sensor as a coordinator with most residual energy.It performs as efficient as the configuration where sensors with most residual energy and located near the centre of the grid are elected as coordinators.Simulation result shows the comparison between the performance of T-GAF and the best case of the configuration proposed by Qi and Qiu [14].
According to [5], we use the following energy model to calculate the energy consumption of sensors due to transmission and reception of data, in which transmission ( Tx ) and reception ( Rx ) power of data of size  bits over a distance  are given by where  elec is the electronic energy and  amp is the transmitter amplifier.
Hence the total energy consumption for a relay sensor when it receives a data packet of size  bits and forwards it over a distance of  is given by  Total (, ) = (2 elec +  amp  2 ) . ( Packet delay is an important metric for multihop wireless networks.It is to be noted that packet delay is a result of the total hop count and the distance covered by the data packet before reaching the destination [15].Therefore, by minimizing the hop count and the total distance covered by the data packet, we can indirectly achieve the minimum packet delay.T-GAF shows the significant improvements in the aspect of minimizing the packet delay in data routing.

Algorithm Description.
Before the algorithm discussion, we make several assumptions about the sensors and the underlying networks as follows.
(i) There is a sink located at the last grid of the square sensing region.
(ii) Sensors and the sink are stationary.
(iii) All sensors are homogeneous in the aspect of functionalities and capabilities.
(iv) Each sensor knows its own location by using localization devices and location of the sensors of AGs and the sensors of NAGs if they are in transmission range through simple hello protocol [6][7][8][9][10].
(v) The source sensor knows the sink location.
(vi) Communication link is bidirectional.
The implementation of T-GAF can be divided into five steps including virtual grid division, sensor and grid information collection, coordinator election, and data transmission.The first two steps execute only once, while the last three steps would be executing periodically with change of coordinators in each grid.
Step 1 (virtual grid division).In this step, T-GAF divides the target region into several square-shaped virtual grids of side length  depending on the transmission range.Equations ( 1) and ( 2) are used to derive the value of  for GAF/T-GAF and DGAF/T-DGAF, respectively.
Step 2 (sensor and grid information collection).In this step, information related to sensors and grids are collected.For sensors; sensor-id, sensor location, energy-level, grid-id (the sensor belongs to) and distance from the sink.Sensors belonging to same grid can share their own information with the neighboring sensors of the same grid through broadcasting.Further, grid related information like total sensors in the grid, total residual energy of the grid, and sensors of adjacent grids can be used by the coordinators which will be shared with the new coordinator after each coordinator rotation.
Step 3 (coordinator election in virtual grids).T-GAF elects a sensor with the most residual energy as coordinators in each grid.The sensors are elected as coordinators and participate in data routing, while the noncoordinator sensors turn off their radio for some defined period of time.Later on, when all noncoordinator sensors get back to active state and compete for the coordinator, T-GAF again elects one of the sensors as a coordinator with the most residual energy.The total number of coordinators is equivalent to the total number of virtual grids formed.
Step 4 (establishing/maintaining routing table).In this step, all coordinators from each grid send a broadcast message to all its neighbors specifying its own location and the grid-id it belongs to.When a sensor receives this broadcast message, it updates its routing table making new entry if the sensor is in either its AG or its NAG.Sensors need not verify the transmission range since it will receive broadcast messages only from the sensors placed within the transmission.At the end, each grid will be updated with its routing table containing the sensors of AGs and the sensors of NAGs if they are in transmission range for further data routing.
Step 5 (performing data routing).Once a sensor has a data packet sent to the sink, first, it checks whether it can be directly sent to the sink or not.If the sink is in the transmission range, the data packet will be sent directly.Otherwise, it looks for routing table and selects a sensor having shortest distance from the sink as a relay and forwards the data packet to the sensor which becomes the new source.This process continues till data reaches the sink.Figure 6 shows an example of the data routing from the source to the sink, where the source is located at the first grid and the sink is at the last grid.

Simulation and Analysis
To measure the effectiveness of the proposed work, a simulation program has been used.Since the number of active sensors (coordinators) depends upon the number of grids formed after virtual grid division but not the number of sensors deployed, we have simulated the result for different size of target regions to get different number of grids formed after virtual grid division.In the simulation environment, 2000 sensors with a 100 m transmission range were randomly deployed in 400 m × 400 m, 500 m × 500 m, 600 m × 600 m, 800 m × 800 m, and 1000 m × 1000 m square planes, respectively.The sink was located at the centre of the last grid.The total number of virtual grids formed for different size of target regions is shown in Table 1.
In GAF/T-GAF and DGAF/T-DGAF, grid sides can be calculated by using by using (1) and (2), respectively.Energy consumption has been calculated during data routing for each grid.A sensor can change the transmit power for different transmission distance from the destination that will be calculated by using (3), while the reception power will be fixed as shown in (4).We assume that the queuing delay is low so that it can be ignored.Further, the transmission and reception delay are 0.1 and 0.05 seconds, respectively, [15].Hence for a relay sensor, the total delay is 0.15 seconds.Table 2 shows all the parameters values used in our simulation model.
We use the following metrics to evaluate the performance of the proposed work and compare the results with traditional GAF and DGAF: total hop count, total distance covered during data routing, energy consumption, and packet delay.

Total Hop Count.
It is defined as the total number of hops for routing the data packets from the source to the sink.It is to be seen that less hop count represents less number of participating sensors in data routing for optimum energy usage.Figure 7 shows the comparison of the total hop count for GAF versus T-GAF and DGAF versus T-DGAF for different size of target regions.As illustrated in Figure 7, T-GAF needs 40% to 44% less hop count comparing to GAF and T-DGAF needs 40% to 47% comparing to DGAF.

Energy Consumption.
It is to be noted that energy consumption is directly proportional to the hop count and the distance in data routing.Therefore, the improvements in the hop count and the distance show less energy conservation.
Figure 9 shows the comparison of the energy consumption for GAF versus T-GAF and DGAF versus T-DGAF.As illustrated in Figure 9, T-GAF consumes 30% to 35% less energy comparing to GAF and 27% to 30% in T-DGAF comparing to DGAF.
Figure 10 shows the comparison of the average energy consumption for T-GAF/T-DGAF with coordinator election scheme depending on the residual energy of sensors and the scheme proposed by Qi and Qiu [14], where coordinator election depends upon the best position of sensors and their residual energy.Simulation result shows that the proposed work performs efficiently with less overhead of the coordinator election.

Packet Delay.
It is to be noted that packet delay is directly proportional to the hop count and the distance in data routing.Therefore, the improvements in the hop count and the distance tend to less data packet delay.Figure 11 shows the comparison of the packet delay of data packets for GAF versus T-GAF and DGAF versus T-DGAF for different size of the target regions.As illustrated in Figure 10, there is 43% to 49% less packet delay in T-GAF comparing to GAF and 45% to 52% in T-DGAF comparing to DGAF.
Analysis and simulation results show that, by involving the idea of two-level neighbors sharing scheme, T-GAF and T-DGAF achieve significant improvements in reducing the total hop count, the total distance covered by the data packet, and the packet delay comparing to traditional GAF and DGAF in the aspect of efficient energy consumption.

Conclusion
In WSNs, the main objective of routing protocols is higher energy efficiency to prolong the network lifetime.This can be achieved through various approaches like efficient usage of available sensors, uniform load distribution, minimizing hop count, and so forth.However, GAF uses various energy conservation schemes to extend the network lifetime.It conserves energy by identifying equivalent sensors from routing perspective and then turning off unnecessary sensors to keep the number of active sensors as less as possible.Nevertheless, GAF still cannot achieve the optimum energy usage, since it needs more number of hops and high packet delay.In this paper, we modified GAF and named it T-GAF to make significant improvements in the aspect of the hop count, the packet delay, and the distance covered by the data packet during data routing.The main objective of T-GAF/T-DGAF is to keep hop count as low as possible so that less number of active sensors (coordinators) participates in routing of data packets.As a result, it also shows effective improvements in efficient energy usage and packet delay to prolong the lifetime of the network.T-GAF/T-DGAF has an advantage of less overhead of coordinator election where a sensor with higher residual energy is elected as coordinator.

Figure 4 :Figure 5 :
Figure 4: Comparison of the routing scheme between GAF and T-GAF (a) In GAF, a sensor can forward the data packet to any sensors of its AGs, while (b) In T-GAF, a sensor can forward the data packet to any sensors of its NAGs, if they are in the transmission range.

Figure 6 :
Figure 6: Simulation topology showing data transmission from the source to the sink.

Figure 7 :
Figure 7: Comparison of the average hop count for different size of the target regions.

Figure 8 :Figure 9 :
Figure 8: Comparison of the average distance covered by the data packets for different size of target regions.

Table 1 :
Number of square grids for different size of target regions.