The Neighborhoods Method and Virtual Polar Coordinates in Wireless Sensor Networks

In this paper we propose the development of a neighborhoods method for finding the route with the least number of transitions. A double pass of neighborhoods allows the determination of the shortest routes, and also the solution to the local minima problem. The proposed algorithms are complemented by search algorithms for the central anchor of and rules for angle calculation, which automatically leads to the assignment of a virtual polar coordinate system. The problem of reconstruction maps for the sensors, on the basis of limited data about nodes and their immediate neighbors, is discussed. The possibility of generalizing the neighborhoods method for inter-domain routing is supposed.


Introduction
Wireless sensor network is a distributed, self-organizing network of geographically distributed autonomous devices, using sensors for the joint control of physical or environmental conditions in different areas.Currently, wireless sensor networks are used in many areas of life, including environmental monitoring, health care, or control movement.
In wireless sensor networks technology of relayed near radio 802.15.4/ZigBee (Sokolov, 2004) is used.A ZigBee protocol stack is built on the principle of a hierarchical seven-layer model of data communication protocols, in open systems OSI (Open System Interconnection).The stack includes a level of standard IEEE 802.15.4,responsible for the implementation of the communication channel, program network layers, and levels of support for applications, according to a specification of the Alliance ZigBee.
It is important to understand that the 802.15.4 standard defines a range of frequencies and radio format, and ZigBee is a logical network and software stack, providing security and routing functions.
The main task of routing in wireless sensor networks is to search for optimal delivery routes from the sender to the destination node, which requires minimal resources of its member nodes.There are two main classes of routing schemes in wireless sensor networks: geographical routing; and routing based on virtual coordinates.
Geographic routing is based on the physical location information of nodes, which can be obtained with the help of a GPS (Global Positioning System), or by localization algorithms, such as RSSI (Received Signal Strength Indication), and TDOA (Time Difference Of Arrival) (Bachrach & Taylor, 2005).The best-known geographical routing protocol is a protocol GPSR (Greedy Perimeter Stateless Routing), which is used in "Greedy Forwarding" (GF) technology for packet transfer, and the appearance of alleged hole circumvention of its perimeter, according to the right-hand rule (Fang, Gao, & Guibas, 2004).A virtual coordinate system (VCS) is a coordinate system in which each node is characterized by the coordinate vector of dimension n, which consists of the shortest number of hops to each of a set of n fixed nodes, called anchors (Caruso, Chessa, De, & Urpi, 2005;Cao & Abdelzaher, 2004;Dhanapala & Jayasumana, 2009).The number of anchors n is taken for the network dimensions.For routing in sensor networks virtual Cartesian coordinates are usually used.
Protocols of geographic and virtual routing often use GF technology, according to which the data packet is directed to a neighboring node that is closer to the destination than the node holding the packet (Karp & Kung, 2000).GF technology allows the sending of packets over the shortest path, but its use may cause a situation known as the local minima problem (Karp & Kung, 2000).The local minima problem occurs when there is no neighbor closer to the destination than the current node holding a packet for transmission (Dhanapala & Jayasumana, 2011).In the case of holes it is assumed to bypass perimeter empty right-hand rule (Zou & Chakrabarty, 2003).In order to solve the problem of local minimum different algorithms are offered (Wuu, Li, & Kuo, 2010;Xing, Xu, Zhao, & Harfoush, 2007), including those aimed at reducing the number of hops on the basis of the neighborhoods method (Denardin, Barriquello, Campos, & do Prado, 2011).But this method has never extended to entire route.This paper deals with the improvement of greedy forwarding (GF) technology in order, to solve the local minima problem (Mottola, Pathak, Bakshi, Prasanna, & Picco, 2007).The basis of our approach is the concept of a neighborhood (Eschenauer, & Gligor, 2002;Fekete, Kaufmann, Kröller, & Lehmann, 2005;Whitehouse, Sharp, Brewer, & Culler, 2004), which includes all neighboring nodes.Simple information, such as a list of nodes and their neighbors, will calculate the shortest route.The neighborhood method to find the route is described in Section 2 of this paper.
Section 3 deals with testing a neighborhoods method, which was created by the original software package, given an arbitrary configuration of sensor nodes and holes.This package allows the selection of a neighborhood, to find the minimum number of hops and the routes.Section 4 discusses an algorithm to find the central point for a given node configuration, and testing of the method.
Section 5 draws an analogy between the search for routing in sensor networks, and inter-domain routing in the global network.Section 6 is devoted to the implementation of a virtual polar coordinate system, to recover a sensors map in the space, while the special algorithm calculates the radius vector and the polar angle.

Neighborhoods Method for Route Search
Suppose that between two nodes, X and Y, a sensor network configuration can complete many routes and choose the shortest one, or in other words, the route with the fewest hops n (X, X 1 , ..., X i …, X n-1 , Y).On this route, each subsequent node X i+1 is one of the nearest neighbors of considered node X i , but it cannot connect to another previous node of route X j , if i < j.
Therefore, for further search it is useful to introduce the concept of neighborhood.By a neighborhood of node we mean the set of neighbors, i.e. the sensors are located at a distance of N hops.Thus, the nearest neighbors are neighborhood level 1, and the neighbors are located at a distance of 5 hops, from neighborhood level 5 (see Figure 1).

Figure 1. Illustration of neighborhoods
Initial data for the routing is a list of all possible nodes, indicating the nearest neighbors.We choose one of the two points X and Y, between which we need to install the routing, as a source (X).For this point, we will build many neighborhoods.The neighborhood of the first level i X 1 1 includes the nearest neighbors.In the neighborhood of the second and subsequent levels in n X neighbors of nodes of the previous level are included, except for those that occur earlier (see Figure 2).The second step is to determine the route as a list of intermediate nodes, through which data will be transferred.We must pass the search area in the reverse order.
For a node Y we construct the intersection of its first neighborhood i This set is not empty; it contains at least one node.Let us denote this node as . For the node(s) we again build an intersection of its first neighborhood with the previous neighborhood 2 2 N N i X − − of the source node X. Doing this iteration N times, we obtain a set of routes from X to Y with the number of hops N. It remains to compare the effectiveness of these routes, by matching the appropriate dynamic routing metric functions (Sukhov & Chemodanov, 2011).
In order to verify the neighborhoods method it is necessary to conduct tests on well-known and common configurations of sensors.These data can be used to find several routes using the neighborhoods method.

Testing the Neighborhoods Method
In order to test the proposed method of route search a special software package written in Java was developed.This package runs in the browser and allows the creation and testing of different configurations of sensor networks.After starting the software the menu appears on the left-hand side.
The functionality of this package allows the user to set a selected, random configuration of M sensors on the area of K*L.An upper subtitle menu Creation Area is responsible for this function.The menu Max X sets K, Max Y is L, the number of sensors M is prescribed in the Sensors Count.Each sensor in a map designated circle with two boundaries, all the sensors are numbered and that number is shown in circles (see Figure 3).In addition, the software package can display the number of possible routes (Max Ways Limit), obtain a list of the sequence of nodes for alternative routes, and build these routes visually on the map (see Figure 5).
Tested configuration shows that the proposed neighborhoods method copes with the local minima problem, and allows to bypass the holes by the shortest route.For the simply connected topology of the network, when there is no separate pieces of the network, the network configuration can be completed at all times.

Algorithm for Finding the Center Point (the Origin)
In order to introduce virtual coordinate system (Cartesian or polar), we need to define the coordinate system origin O, a direction which will be relative to the polar angle ϕ , and the distance from the pole to the specified node r.Therefore, the first algorithm that should be given is a search algorithm; a central node (pole) for an arbitrary configuration of sensors.
For the central node, the number of neighborhoods covering the current configuration should be minimal.Therefore, when selecting an arbitrary node it is necessary to move it in the direction of the most remote sensors.In this case, the number of neighborhoods should decrease as long as it does not become the minimal one.Any shift from the found node should increase the number of neighborhoods.
The described algorithm can be defined as follows: Step one: we take an arbitrary node X, build the set of neighbors that are within 1 hop, 2 hops (except for those at a distance of 1 hop), etc.So we reach the last neighborhood N.
Step two: we select any point Y from N neighborhood, construct a set of neighborhoods for this point.Let that number be L.
Step Three: we build a neighborhood of a point of X and choose the node X 1 with the minimum number of neighborhoods from N-L/2 neighborhood.
Step Four: Taking a new node X 1 as a pole, we construct the set of neighborhoods, the number of which is taken as the M. Any point Y of M neighborhood is chosen.After building a set of neighborhoods for this node let its number be L.

M=L/2
(1) or points X and X 1 belong to the same neighborhood, relative to the node Y, then the node on the first step of the iteration can be considered central.If this condition is not satisfied, then we denote the set M of N and then go to step 2, etc.
Algorithm will be executed as long as there is no equality (1).
Algorithm in the form of a block diagram is shown in Figure 6.

Metric of Inter-Domain Routing
For experimental verification of our assumptions it should be noted that the method of neighborhoods can not only be used for sensor networks.The described method of finding the route can also be used in the process of inter-domain routing for autonomous systems (AS).It is well known that the global routing table (BGP) contains a list of autonomous systems (Rekhter & Li, 1995) and their immediate neighbors, which can take the free passage of traffic.
However, the BGP table of AS must be modernized for the applyication of our method.Except for the list of the nearest AS, it is necessary to specify the number of hops for each system.Let us denote Z l as number of investigated AS, then Z m are numbers of the neighboring AS, and k m is the number of hops to this system.Consequently, the global routing table can be represented as (Z l , Z m , k m , where ), and L is the number of neighboring autonomous systems of Z l .
When splitting a set of AS in the neighborhood, the number of the new neighborhood is obtained by summing the number of the current neighborhood and the number of hops k m .If the AS Z l belongs to an n neighborhood n n i X , relative to the source of a route, then the autonomous system Z m will be included in the n+k m neighborhood.Thus the number of neighborhoods will be much greater than the number of transit autonomous systems.The preferable route has fewer hops from the source to the destination.
Taking advantage of the global routing table we can find the best route between two or three fixed stand-alone ASs to multiple external IP addresses, using our method.We can then compare these routes with the route obtained by standard inter-domain routing BGP4.

Polar Coordinate System
Polar coordinates except routing problem have another important mission.This is a visual representation (map) of nodes located in the space (Dhanapala & Jayasumana, 2011).Initial information about the network configuration is extremely sparse, and contains only a list of all network sensors with their nearest neighbors (Nagpal, Shrobe, & Bachrach, 2003;Newsome & Song, 2003).On the basis of this information, can we build a complete map of the network, close to the real map?
The standard method used in sensor networks is a method of virtual coordinates.For routing in sensor networks the researchers usually use virtual Cartesian coordinates, but the neighborhoods method is suited, ideally, to polar coordinates.
In polar coordinates, each node is characterized by the radius vector r, the length of which is measured by the number of hops from the origin O and angle ϕ .The central point is chosen as the origin, and its location algorithm is presented in Section 4. The angle is conducted from a certain direction, taken as the direction of reference.More information on how to set the angle is presented below.
In order to set the initial direction, we choose a point X, located at a distance of m hops from the origin O.For any point Z it is easy to find the number of hops n and l of the points O and X under construction of a set of neighborhoods (see Figure 8).Denoted by polar coordinates are defined, that allow the building of a sensors map, which should reflect the existing configuration.Further research is needed to compare the resulting configuration with the actual map, to identify ways of improving the accuracy of predictions for the average deviation of the coordinates: where r i Z are the real coordinates of nodes, and vpc i Z are the virtual coordinates, and N is number of sensors in the configuration.In order to improve the accuracy of a virtual polar coordinate system, it is necessary to offer an alternative way of measuring the length of the radius vector $n$.The described method can be generalized easily to the 3D arrangement of nodes.

Conclusions and Future Studies
This work develops a neighborhoods method, which was applied previously to routing problems in wireless sensor networks.A new method is developed and tested that allows the determination of the shortest route by building neighborhoods of the original node.It is shown that the local minima problem can be resolved successfully, and we do not need to schedule an additional traversal algorithm of holes.
In order to restore the map of the sensor location, according to the nearest neighbors of the site, additional experiments are required.They will help to find an expression for the accuracy of the node position, as well as ways to improve this accuracy.All results describe the 2D configuration of sensors, but the basic algorithms and formulas can be easily generalized for the case of 3D.
A separate experiment is required for consideration of inter-domain routing.The first stage the neighborhoods method can be used to analyze existing BGP tables, to compare the routes obtained by the neighborhoods method with those found by the standard routing.We also need to offer the best data format, to determine the neighborhood of an AS, to include data on the hops number.We can also find the center point of the current configuration of AS, and build a map of its location.

Figure 2 .
Figure 2. Illustration of the neighborhoods method Final destination Y falls into the corresponding neighborhood iN N X in the Nth step, and first phase of route search is then complete.Its result was the discovery of a set of nodes constituting N neighborhoods, and the number of hops from X to Y.

Figure 4 .
Figure 4. Partitioning of the neighborhoods Nodes belonging to different neighborhoods are highlighted in different colors.We can also change the range of the sensors to be included in the list of the nearest neighbor (first neighborhood).This parameter is set in the Available Radius.

Figure 5 .
Figure 5. Find the route on the map

Figure 6 .
Figure 6.Algorithm for finding the center point

Figure 7 .
Figure 7. Finding the center point