Sensor Node Easy Moving Monitoring Region Location Algorithm in Internet of Things

Because of the influence from geographical location, weather and other kinds of circumstances in monitored areas, the shift of the node location and non-uniform distribution, this paper proposed an improved DV-Hop location algorithm. First of all, the package structure by changing the anchor nodes to reduce the number of hops data acquisition phase node data storage; introducing weights to the average hop distance calculation phase the original average hop distance calculation method was improved, and between the node and anchor node distance calculated on the basis of reference anchor nodes are different; then, iterative refinement of node localization stage through the use of multilateral measurement method and Taylor series. Finally, simulation experiment of this method, and compared with the existing methods, the results prove that the method in this paper can greatly reduce positioning errors without adding hardware equipment and network traffic, improve the positioning accuracy, a better solution to the problem of node localization networking monitoring area.


Introduction
The Internet of Things was firstly proposed by Auto-ID Laboratory of Massachusetts Institute of Technology in 1999, and it's basically an intelligent network which connects one thing to another through the sensor network, RFID transceiver, two-dimensional code, GPS and other hardware.At present, the Internet of Things is widely used in agriculture, industry, military and environment fields to accomplish data acquisition and real-time monitoring.
The Internet of Things for monitoring is mostly located in territories with so poor environment conditions that even human can't approach.So in such areas the helicopters are usually applied in spreading sensor nodes to acquire and analyze the environment data.Besides the sensor nodes may sometimes shift in the environment, such as in the ocean monitoring, sensor nodes change their positions by the water flow.So the location of sensor nodes is constantly changing as well as the network topology.However, the acquired data becomes meaningless without the detailed location and network topology information.Thus it is very important to locate the sensor nodes for data acquisition and target monitoring, especially in the territories that sensor nodes can easily shift.
There are two basic sensor nodes localization methods: the Ranged-Based method and Range-Free method respectively.For the former one the location information is obtained with additional hardware and extra distance and angle information such as RSSI [1], TOA [2], TDOA [3] and AOA [4].But for the latter one the connectivity information is only needed to get the sensor nodes position, such as convex programming algorithm [5], DV-Hop algorithm and MDS-MAP algorithm [6]- [7].Because in the monitoring areas the wireless sensor nodes network of the Internet of Things requires low power consumption and low cost, the Range-Free method is better for the Internet of Things.
DV-Hop algorithm is a classic Range-Free method, which has good accuracy to monitor regions with steady and uniformly distributed sensor nodes, but has poor performance for the non-uniform distribution and mobile network.In order to improve the algorithm the mean square error is used to calculate the hop distance, and the average hop anchor nodes distance is used to obtain the distance from nodes to anchor nodes [8]- [9].The combination of RSSI and DV-Hop is also proposed to improve the accuracy [9]- [10].Using the DV-Hop method with multi-anchor nodes, the distance is obtained by multiplying the weighting factor.
The above methods have the vital significance to improve the localization accuracy and reduce the positioning error.But in the second stage of the algorithm, anchor nodes need to store broadcast packets again, which increases the amount of data storage nodes and the nodes cost and also affects the existing time of the network [11].In this paper a node localization algorithm based on DV-Hop algorithm is proposed, in which the calculation of DV-Hop algorithm, the average hop distance in hops and node coordinate positioning stages have been improved.

DV-Hop Algorithm
There are three stages in the DV-Hop algorithm: (1) Obtain Hop count of nodes The anchor nodes in the radiate data packet are denoted as (ID, x, y, hop) in the network, of which ID is the ID number of anchor node itself, x and y are the position of anchor 705 nodes, hop is the initial value of hop count 0. When the node receives this packet at the first time, the data packet is saved and hop count is added by one.When the node secondly receives data packet with the same ID, the original data packet is replaced if the current hop count is less than the existing hop count, and is transmitted.This procedure stops until all IDs of anchor nodes on longer change.
(2) Calculate the average hop distance The average hop distance hopValue from the ith anchor node to the other M-1 anchor nodes is calculated using the formula (1) In the formula (1), ( ) is the total distance between anchor node i and anchor node j, is the total jump between anchor node i and anchor node number j.
When all the average hop distances of each anchor nodes are calculated, the data packets are beginning to be broadcasted in the network.And each node only saves the first data packet.
Once obtaining the hop count of all anchor nodes and the average hop distance of each anchor node, the node location can be easily acquired using the three sided measurement or the maximum likelihood method.The DV-Hop algorithm flow can be expressed as shown in Figure (1).

The Improved DV-Hop Algorithm 3.1. The drawback of DV-Hop algorithm
As the classical method of Range-Free, DV-Hop algorithm can be easily achieved with very low cost, and is only suitable for node location in homogeneous monitoring areas.But in actual detection areas, because of environmental factors, nodes are often non-uniformly distributed and shifting all the time, which leads to an error that the calculated gap distance of the average hop using the traditional DV-Hop algorithm is far from the actual distance.Meanwhile as the average hop distance of each anchor node are not identical, and the nonanchor nodes only receive the first average hop distance value, so the average node hop distance has a larger error, which affects the localization accuracy.

The Improved DV-Hop Algorithm
In order to overcome the shortcomings, the DV-Hop algorithm is improved in three aspects below in this paper.

Obtain Hop count of node
Firstly it is essential to improve the data structure of anchor nodes broadcast packet (ID, x, y, hop, hop value, path).So the data structure was extended with two fields: hop value and path, where hop value is the way distance and path is the propagation path.These two fields are prepared for the second stage without initialization in the first stage.The anchor nodes broadcast the data packet by the flooding method in the whole network.Each node only saves the minimum hop packet sent by the anchor node with the same ID by the classical DV-Hop algorithm.The process goes on until all the non-anchor nodes obtain the minimum hop packet from all anchor nodes.

Calculate the average hop distance
In this stage, there are two ways to improve the algorithm: firstly changing the anchor node average hop distance calculation method by introducing the weighted value secondly calculating the distance of the common nodes to different anchor nodes according to the average hop distance of different anchor nodes The path of any two anchor nodes in the monitoring area is shorter, then the angle between the center node path and two anchor nodes is larger, so the path is nearly a straight line, finally the error of the average hop distance is smaller.So it is in need to introduce the hop distance weights of anchor nodes.Namely the average hop distance from the anchor node i to other anchor node j(1 1 j M    , M is the total number of anchor nodes) has different degrees of importance.The calculation of the weights is shown in formula (2): where ij w is the value of path calculation from the anchor node i to the anchor node j; ij hop is the hop count from the anchor i to the anchor node j; ij  is the angle of the center node k in the path from the anchor node i to the anchor node j and two anchor nodes, which is shown in formula (3): In the formula (3), the hop count in the path is used to replace the actual distance value to estimate the cos ij  value, then calculation weights from the anchor node i to the other anchor nodes is obtained.Eventually the weighted average hop distance of each anchor node is: When obtaining the weighted average hop distance hop value of each anchor nodes, data packets is broadcasted in the whole network in flood way, and the data structure here is (ID, hop value, path).The initial value of path is the anchor node ID.When each node receives the data packet, the data packet is referred with the same ID packet in the first stage and the hop value and path are filled in the data packets.Then the path with the node ID is transmitted to the neighbor node.The node only accepts and forward each data packet this time, afterwards the receive data packets is abandoned.When each node obtains all the weighted average hop distance of all the anchor nodes, then the distance of the node to all anchor nodes is obtained with the hop counts and the average hop distance in the first phase.

Locate the Node
The coordinates of the nodes are estimated by multilateral localization method in the node localization stage.The localization of node is assumed as ( x p , y p Using Taylor series shown in the [12] and supposing the error in X and Y direction of ( x p , y p ) respectively is (h, K), then: The error value (h, K) can by estimated by placing the formula (6) in the( x p , y p ).By setting the threshold according to equation ( 6) and stopping the iteration process until meeting the accuracy requirements, the final positioning coordinates ( x p , y p ) can be obtained.

The improved DV-Hop algorithm procedure
The improved DV-Hop algorithm is based on the basic algorithm shown in Figure 1 with improvements in three stages above, and its flow chart is shown in figure 2.  As shown in Figure 3 and Figure 4, with the increase of the number of neighbor nodes, positioning error of three methods are significantly reduced.However the method in this paper changes more gently, because when calculating the node distance the average hop distance of different reference anchor nodes is used.And the angle between different anchor nodes is taken into consideration when calculating the average hop distance.Due to the iterative refinement using a Taylor Series in the positioning, the positioning error becomes smaller.When the total number of nodes is 200, the average localization error between the present method and reference 10 is reduced by 12%, and 8% with reference 11.When the total number of nodes is 500, the average localization error with the present method and reference 10 is reduced by 20%, and 12% with reference 11.All the results above proved that the positioning accuracy of the method in this paper is higher under the same conditions.

Conclusions
In order to reduce the impact of environmental factors for the shifting of the locations of sensor nodes, an improved DV-Hop algorithm is proposed which is proper for sensor nodes  ISSN: 1693-6930 TELKOMNIKA Vol. 13, No. 2, June 2015 : 703 -710 710 motion and uneven distribute network.The three stages of the DV-Hop algorithm are all improved: firstly when obtaining the hop count, the data structure is changed, thereby the data storage space in the second stage is reduced.In the average hop distance calculation stage the previous method is improved by introducing the weights into the calculation, thus the new jump distance formula is closer to the actual node average distance.In the node positioning stage, firstly the initial node coordinates is obtained by the multilateral calculation method and then Taylor series of iterative refinement is implemented.Simulation results show that the improved method only broadcasts data packets two times as usual, and without increasing the network traffic and hardware device, the positioning error is reduced greatly, which improves the positioning accuracy and has a strong practicality.

Figure 2 .
Figure 2. The improved DV-Hop algorithm procedure

Figure 3 .Figure 4 .
Figure 3.Comparison of positioning error rate in the total number of nodes 200