An Algorithmic Approach to Wireless Sensor Networks Localization Using Rigid Graphs

In this work estimating the position coordinates of Wireless Sensor Network nodes using the concept of rigid graphs is carried out in detail. The range based localization approaches use the distance information measured by the RSSI, which is prone to noise, due to effects of path loss, shadowing, and so forth. In this work, both the distance and the bearing information are used for localization using the trilateration technique. Rigid graph theory is employed to analyze the localizability, that is, whether the nodes of theWSN are uniquely localized. The WSN graph is divided into rigid patches by varying appropriately the communication power range of the WSN nodes and then localizing the patches by trilateration. The main advantage of localizing the network using rigid graph approach is that it overcomes the effect of noisy perturbed distance. Our approach gives a better performance compared to robust quads in terms of percentage of localizable nodes and computational complexity.


Introduction
The manual configuration of WSN nodes is not always feasible because it might be deployed in human unattended geographic regions [1], while even GPS cannot be installed in every WSN node because it is costly hardware and it does not support indoor localization [2].These limitations lead to the development of localization algorithms, where certain nodes known as anchor nodes know their positions in prior time and the remaining nodes estimate positions based on these anchor nodes.These localization techniques are termed as cooperative localization or in-network localization or selflocalization [3].Usually, geographical localization methods use various information from the deployed WSN, such as ranging information like intersensor distances, intersensor angle (bearings), and neighbor information.The main reason why ranging based information is used for localization is due to the fact that it does not need extra hardware, which makes it cost-effective.
The WSN localization problem is more or less similar to the Euclidean graph realization problem, where the edge length of the corresponding two vertices and distance calculated from the coordinates of the two vertices must be equal.Thus, if the graph  of the WSN is uniquely realizable, then the WSN can be localizable to the global homogeneous coordinate transformations of rotation, reflection, and translation [4].Rigid graphs have certain properties of connectivity which makes them more suitable in using them for WSN localization.Rigid graphs are more efficient than the prior graph theory related distance measurement localization techniques because their distances remain intact with homogeneous coordinate transformations.In some cases the whole WSN cannot be localized due to constraints in hardware and deployment issues.Therefore dense deployment is needed to have a fully localizable network [5].The process of localization is a costly affair because it consumes a lot of resources like energy, computational time, and so forth.Therefore, in the recent years, research is carried on analyzing whether the given WSN graph is able to be localized based on certain graph theoretical properties and formal analysis.This process is called the localizability analysis.From the WSN graph determined, is it possible to localize the network?This query is called the network localizability.The localization algorithms developed using rigid graphs can be either centralized or distributed.Centralized algorithms developed in [6] provide accurate 2 Journal of Sensors location estimates but are having issues related to scalability, large amount of computational complexity, and low reliability as compared to distributed algorithms like [7][8][9].This work is an extension of our previous work [10].In this work we deal with both distance and bearing information for accurate and efficient localization; we also deal with error analysis systematically and also compared our results with the robust quads technique.To localize networks in human unattended areas only distributed algorithms can be employed.Therefore, in this work we have developed a distributed localization technique, which involves the following aspects: (1) The main problem in keeping the communication power range to a minimal value is that sufficient rigid graphs cannot be generated; thereby the algorithm will not be able to localize all the nodes uniquely.It is possible to vary the power level of WSN nodes as in [11], so that the WSN can be made into a localizable network from a nonlocalizable one.We suitably vary the power level of the WSN nodes such that its communication radius is increased.This increase in communication radius will obviously increase the average node degree of the WSN and thereby we can expect a bigger number of rigid trilateration patches needed for iterative trilateration localization.
(2) Placing of anchor nodes is not feasible in some outdoor localization scenarios; hence an anchor-free localization technique is designed in this work.
(3) In order to achieve higher location estimation accuracy, in this approach both distance and angle information between the neighboring WSN nodes are used.
(4) The patches obtained are subjected to global coordinate transformations of translation and rotation, and trilateration is used to localize these patches.

Graph Theoretical Framework and Localization Using Rigid Graphs
The rigid graphs as the name suggests fall into the category of graph theory, hence denoted using the graph theory notations.In our work [12], we discussed how rigid graph theory can be applied to localization and topology control in WSN.In this section, the graph theoretical framework depicting WSN nodes in the form of graph is shown.
A -dimension point formation at  = column{ 1 ,  2 , . . .,   } usually denoted as (), which is in the Euclidean coordinate system set of  number of points { 1 ,  2 , . . .,   } in   , is considered in [5,13,14].In terms of WSN, the points correspond to the positions of WSN nodes which forms the network.The communication link is the intersensor node distance.In this coordinate of points, communication links between points   and   are deduced, where  and  are integers of set  = (1, 2, . . ., ).Length of the communication link is the Euclidean distance between the points   and   .Some of the standard definitions are given below.
Definition 1 (sensor graph).A WSN graph (, ), where  represents the WSN nodes and  the distance between WSN nodes, can be represented by a graph  = (, ) with a vertex set  and an edge set , where each vertex  ∈  is related with a sensor node   in the network graph and each edge (, ) ∈  relates to a sensor pair   ,   for which the intersensor distances   are known.One calls  = (, ) the underlying graph of the sensor network (, ).
Definition 2 (framework and realization).A -dimensional ( ∈ 2, 3) representation of graph is mapping of a graph  = (, ) to the point formations  :  →   .Given graph  = (, ) and a -dimensional representation of it, the pair (, ) is termed as a -dimensional framework.A distance set  for  is set of distances   > 0 defined for all edges (, ) ∈ .Given the distance set  for the graph , a -dimensional ( ∈ 2, 3) representation  of  is a realization if it results in ‖(  ) − (  )‖ =   for all pairs of (, ) ∈ , where (, ) ∈ .
Definition 4 (flexible graph and rigid graph).A framework (, ) is called generic if the set containing the coordinates of all its points is algebraically independent over the rationales.A framework (, ) is called rigid if there exists a sufficiently small positive constant  such that if (, ) is equivalent to (, ) and ‖(  ) − (  )‖ <  for all  ∈ , then (, ) is congruent with (, ).A graph (, ) is called rigid if there is an associated framework (, ) that is generic and rigid.A framework is called flexible if one has a continuous deformation starting from the known configuration to another, such that edge lengths are preserved as shown in Figures 1(a) and 1(b).If no such deformation exists, then it is called rigid.A framework (, ) is globally rigid if every framework equivalent to (, ) is also congruent with (, ).A graph (, ) is called globally rigid if there is an associated framework (, ) that is generic and globally rigid.
Definition 5 (minimal rigid graph).A rigid framework is minimally rigid if it becomes flexible after an edge is removed as shown in Figure 1(c).
Definition 6 (redundantly rigid framework).A rigid framework is redundantly rigid, if it remains rigid upon the removal of any edge as shown in Figure 1(d).
Definition 7 (localizability).As already defined above, for a WSN graph  = (, ), every node is realized as a point formation.If there is a unique location  :  →   for every node belonging to the node set  such that   =‖ ()−() ‖ for all the edges, then one says that such a graph is localizable.The localization problem is summarized by Eren et al. [3] as follows.
Theorem 8. Let (, ) be a sensor network graph in  dimension.Let (, ) be the realization framework for the underlying graph (, ).Then the sensor network localization problem is solvable only if (, ) is generically globally rigid (GGR).
In  2 , the rigidity test of a graph can be done combinatorially by using the combinatorial necessary and sufficient condition given by [15].Based on -connected graph property and redundantly rigid graph the following necessary and sufficient condition was given by [16].
Theorem 10.A graph  = (, ) in  2 with || ≥ 4 is generically globally rigid if and only if it is 3-connected and redundantly rigid.

Trilaterations
(i) Generically globally rigid (GGR) graphs are labeled by using the notions of trilateration graphs in  2 .
(ii) Consider a graph (, ) in  2 ; applying trilateration on the GGR graph  is nothing but addition of new vertex V to .Then, there should be at least three edges joining V to the vertices in .
(i) The graphs and subgraphs which have this trilateration ordering will reduce the computational complexity of localization by a greater margin (polynomial with sensor nodes) [17].
(ii) GGR graphs of trilateration and quadrilateration can be obtained by addition of extra edges [18].
(iii) Adding extra edges in sensor network localization means increase of the communication radius by varying the antenna transmission power.
The following theorems are given by [18] to acquire globally rigid trilateration graphs.
Then  2 obtained by increasing the communication radius is generically globally rigid.
Theorem 12 can be extended and be generalized for a cycle.This is given as follows: consider a 2-connected cycle  in 2-; then  2 obtained by increasing the communication radius is generically globally rigid.

Related Work
An extensive theoretical analysis of WSN localization, using rigid graphs, which analyzes the conditions when the WSN graph and the associated WSN nodes become localizable is dealt with in literature [4,17,19].Here, WSN localization is modeled by using the concept of grounded graphs and the computational time required to localize the network is derived.Graphical properties of WSN graphs for localization using distance information are studied extensively in [18], where the authors have proved how required localizable graph can be obtained from a mere connected graph by adjusting the communication power radius of the WSN nodes.These adjustments in the network graph will make localization possible and that too in linear time.Graphical properties of unique localizable networks using both distance and bearing information are studied in [20].Localizability analysis, that is, whether the given network is localizable or not, was studied extensively in [2,21,22].A distributed linear time algorithm to localize the WSN nodes without being affected by distance noise was developed in [7].In this approach, in order to prevent incorrect location coordinates due to the flip ambiguity issue concept of robust quads was used.The network nodes are divided into localizable and nonlocalizable ones and then a framework for localization of the partially localizable networks was designed in [9].Sweeps algorithm using bilateration technique was developed for localizing the sparse networks efficiently in [8].Outlier measurements of the distance instance used for localization are explored by the edge verifiability procedure making use of redundant rigid graphs in [22,23].

Localizability Analysis and Localization
The generic process of WSN localization using rigid graph concepts is depicted in Figure 2.
(1) Phase 1.In this phase the WSN nodes are deployed by setting their communication power radius to the lowest level.
(2) Phase 2. In this phase localizability analysis of the network is done.In this process the WSN nodes power level is increased adaptively until sufficient rigid patches are obtained as explained in Section 4.1.The local coordinate system of the obtained patches is set up as explained in Section 4.2.The patch is also subjected to global rotation and translation as explained in Section 4.3.Trilateration of the rigid patch will generate the location estimates of the unknown node as explained in Section 4.4.
(3) Phase 3. In this phase the initial deployment of the WSN nodes will be changed to new refined WSN deployment due to the adaptive temporary change in the power levels of the nodes.
(4) Phase 4. In this phase the location estimates of the deployed WSN nodes are found out based on the iterative trilateration algorithm explained in Section 4.4.

Rigid Patch Formation.
To localize the given WSN graph we will have to decompose the given WSN graph into patches of rigid graphs.The minimal rigid graph here will be constituted only of triangles and quadrilaterals which satisfies Theorems 8 and 10.A distributed technique is described in Algorithm 1 to find the rigid patches, using which the WSN graph can be efficiently localized.Each WSN node has the following capabilities: (i) It knows its own ID.
(ii) It knows the distance to each of its neighbors.
(iii) It can send a message to any selected subset of its neighbors.
(iv) It can receive a message from any of its neighbors.
(v) It performs local computation.
(vi) It keeps state information.
Initially an adjacency matrix for the WSN graph must be constructed.This adjacency matrix will maintain the intercommunication distance between nodes which are its neighbors.The intercommunication distance will be within the maximal communication radius of the WSN node.We start with node ID = 1 and check for its neighbor; if it has got a neighbor then that neighbor ID is put into a matrix named CYCLE.From the latter node ID again we find its neighbor and put its ID in cycle.Continuing this way when a cycle of length 3 is found we get the smallest rigid component, the triangle.The obtained rigid component information is then maintained in a matrix called RIGID.Continuing with the last established ID, we find the neighbor of that ID and put it in the matrix cycle.When the neighbor of the new found ID is the starting node with ID = 1 then we obtain cycle of length 4 which is a quadrilateral.If the quadrilateral satisfies Theorems 8 and 10, add the quadrilateral to the RIGID matrix; if not Input: The WSN graph of the form  = (, ).

Local Coordinate
System.The local coordinate system assignment for the WSN nodes is inspired from [24].Any neighboring node of the WSN node whose position has to be computed has to align at the origin (0, 0) of the coordinate system, and based on this WSN node and remaining neighboring nodes location estimation of the unknown WSN node is done.In Figure 3(a) two WSN nodes positioned at  1 and  2 with different coordinate systems ( 1 ,  1 ) and ( 2 ,  2 ) are shown.Let us consider WSN nodes  1 ,  2 ,  3 , and  4 with their coordinates points ( 1 ,  1 ), ( 2 ,  2 ), ( 3 ,  3 ), and ( 4 ,  4 ), respectively, as shown in Figure 3(b). 2 is called the 1-hop neighbor of  1 if and only if there is a direct communication link between  2 and  1 . 1 finds out its neighboring WSN nodes by sending some beacon packets.
The beacon packet will have the fields sender-ID, sequencenumber, and the neighboring nodes information.Thus for every node   ∀ = 1, 2, 3, . . .,  there is a neighbor set   ∀ = 1, 2, 3, . . ., .For the WSN nodes   and their neighboring pair   distance information   is calculated by RSSI based ranging technique as explained in Section 4 and the bearing (angle) information   is estimated using angleof-arrival (AOA) technique as explained below.For a WSN node  1 to construct its local coordinate system it needs minimum of two one-hop neighbors and they must not be collinear.It also needs to know the distance information of its neighbors and the distance   > 0.
Consider the WSN nodes  1 ,  2 , and  3 as shown in Figure 3(a).Their positions in coordinate system are  ( 13 can be obtained by applying the triangulation to ( 1 ,  2 ,  3 ): The position of node  4 is calculated using else  4 = − 14 sin  14 . ( Using cosine rule  14 and   1 can be calculated:  4(a).The bearing information is nothing but the angle between the -axis in the local coordinate system of WSN node  1 and the edge line joining  1 and  2 which represents the communication link between the two WSN nodes [20].The bearing information is measured in anticlockwise direction from the -axis of the WSN nodes local coordinate system.In the above local coordinate system analysis we discussed each WSN node having its own local coordinate system.In Figure 4(a) the bearing information of  1 and  2 is  12 and  21 , that is, the angle between the WSN nodes -axis and the communication link between  1 and  2 .The local coordinate system of two WSN nodes may not always have the same mapping; therefore direction analysis of local coordinate system of different WSN nodes is necessary.The mapping is done by obtaining the global coordinates of the nodes.For example, if we want to align the local coordinate system of  1 and  2 then global coordinate transformation of these nodes is necessary.For global coordinate transformation heading information needs to be derived.This heading information is the angle measured in anticlockwise direction between the -axis of WSN nodes local coordinate system and the -axis of the global coordinate system [20].Let us suppose that  1 is the heading for the WSN node  1 .Now, the node  1 has to pass its heading information  1 and bearing information  12 to its neighboring node  2 so that it can compute its heading information.Upon receiving the heading information and bearing information from the WSN node  1 , the WSN node  2 computes its heading information  Once the WSN nodes map to the global coordinate system then the bearing information of their local coordinate system is transformed into the bearing information in global coordinate system.Let Θ 12 and Θ 21 be the global coordinate bearing information of  1 and  2 , respectively, as shown in Figure 4(b): Global transformation is used to estimate the actual physical location of the individual WSN nodes using any anchor node, whose reference position will be fixed.This anchor node will be the reference for fixed coordinate system of the remaining WSN nodes.To localize the ordinary node the global transformation matrix   at every WSN node of the network translates from local coordinates to global coordinate system.The global transformation matrix   constitutes translation and rotation matrix of the ordinary WSN node.The global transformation matrix   is Substituting in the above equation the components of translation and rotation matrix, the final global transformation matrix is of the form 4.4.Localization Procedure.The localization is done using iterative trilateration of the obtained rigid patches followed with the coordinate transformations as explained in Sections 4.2 and 4.3.The localization procedure here does not use anchor nodes but starts with three initial nodes based on the concept of assumption based coordinate system [25].
(2) Now rotate the point, say, ( 2 ,  2 ) from the origin ( 1 ,  1 ) with an angle Θ as explained in Section 4.3.Thus, obtain the global transformation matrix equation   .This will translate the patch from local coordinate system to the global coordinate system.
(3) Trilateration: let  1 ,  2 , and  3 be the distance between the ordinary node and the anchor nodes as considered for trilateration as shown in Figure 5. Consider Figure 5: Three-circle intersection based trilateration.The big dark circled point is the unknown coordinate ( 4 ,  4 ) whose position has to be estimated based on the known coordinates (small dark circled). 1 ,  2 , and  3 are the communication radius between the known coordinates to the unknown.
The equation for the center of the circle and the distance for the anchor nodes as per Figure 5 are given by Subtracting ( 10) from ( 11) and ( 10) from ( 12) and rearranging them, the point ( 4 ,  4 ) is obtained which will be the location coordinates of the ordinary node: (4) Repeat the above steps for the remaining quad patches obtained.

Results and Discussions
The simulation parameters are shown in Table 1. number of nodes are deployed in a square region of 450 × 450 m using random uniform distribution, where there is an edge between nodes if and only if their distance is within communication range .

Node Deployment, Node Density, and Varying of Power
Levels.For simulation nodes are deployed in a square region of 450 × 450 m using random uniform distribution, where the number of nodes  can be scaled from 100 to 120 in a step size of 10.The power level of every node in the WSN is suitably varied such that the communication power radius   is increased.Here, the  values are increased from 70 to 100 in a step size of 5.This increase in communication radius  will obviously increase the average node degree of the WSN and thereby we can expect a bigger number of rigid trilaterable patches needed for iterative trilateration localization.For the different values of  of 70, 75, 80, 85, 90, 95, and 100 the WSN instance graph depicting the communication links is shown in Figure 7.It is observed that with increase in  the node degree of WSN nodes increases thereby increasing the connectivity of the graph.More about the role of node degree is explained in the next subsection.Node density is defined as the number of nodes per unit square area.When  = 120 for the given network topology, when the node density is 0.4 per unit area more than 90% of nodes will have neighbors more than 3 and similarly for  = 100 when node density is 0.5 per unit area as shown in Figure 6.

Node Degree.
The connectivity of the WSN graph is measured in terms of node degree.The node degree is defined as the ratio of number of communication links between the WSN nodes and the number of WSN nodes () deployed in the specific area.The communication power range is increased by a value of 5 meters and from 70 meters to 100 meters, and for each of these  values ten instances of simulation run are done as shown in Figure 7.It is observed in the figure that the node degree varies at each different instance of simulation run.This is mainly due to the random deployment of the WSN nodes.Due to this variation of node degree it is not always possible to obtain higher percentage of rigid patches at lower node degree.Therefore to achieve higher percentage of rigid patches the node degree must be high.The average node degree is the mean of the node degree calculated over the several instances of simulation run done.For the above simulation setup the average node degree is calculated for the different communication power range () as shown in Figure 7.In the figure average node degree is    also calculated with  values of 100, 110, and 120 to show how it varies when the WSN nodes in the network scale.It is observed as from the figure that with increasing values  at particular  value range the average node degree increases.For  value of 100 the average node degree increases from 7.62 to 13.31, and when  = 110 it increases from 7.97 to 14.17, and when  = 120 it varies from 8.602 to 16.21.Therefore good network connectivity comes with high node degree which can be achieved by higher communication power range and also by scaling the network appropriately.

Node Degree versus Percentage of Localizable Nodes.
The percentage of localizable nodes depends directly on the number of rigid patches that can be generated for particular WSN deployment at a specific communication power range, which in turn depends on the average node degree.In Figure 8 the percentage of localizable nodes at different average node degree is shown for  values of 100, 110, and 120, respectively.For all the  values when the average node degree is less than 7 the percentage of localizable nodes is less than 50%.This is due to the fact that with lower average node degree the number of rigid patches obtained is less.When the average node degree is between 8 and 9 in all the cases of  the percentage of localizable nodes is above 70 percent and up to 80%.When the node degree is 9 and  = 120 about 90 percent of nodes are localizable and between 80 and 90 percent of nodes are localizable for  = 100 and 120.For the node degree of 10 and above up to 16 more than 90% of nodes are localizable all the time.This is due to the fact that with higher average node degree a higher number of rigid patches can be obtained which can be easily localized.Therefore, to localize a network almost completely the average node degree must be maintained as high between 10 and 16.Each WSN nodes power level can be suitably varied, so that its communication power radius  is increased.Here, the  values are increased from 70 to 100 in a step size of 5.This increase in communication radius  will obviously increase the average node degree of the WSN and thereby we can expect a bigger number of rigid trilaterable patches needed for iterative trilateration localization.For the different values of  of 70, 75, 80, 85, 90, 95, and 100 the WSN instance graph depicting the communication links is shown in Figure 7.The percentage of localizable nodes depends directly on the number of rigid patches that can be generated for particular WSN deployment at a specific communication power range, which in turn depends on the average node degree.We compare our proposed algorithm with the robust quads of [7].Our method achieves above 90% localizable network when the node degree is between 10 and 14, while robust quads require node degree above 22 to achieve more than 90% localizable network, as shown in Figure 9.

Noise Model and Localization Error
(i) The distance noise model used in this work is given by where  is the Gaussian noise with zero mean and   is the noise factor which is considered here to be 15% (high noise).
(ii) The localization error occurs mainly due to the ranging error.The localization error may be defined as the amount of deviation of the position coordinates of the WSN nodes from the actual position where the node is deployed.Here, we will use the localization error equation normalized by the communication range, given by where (x  , ŷ ) is the estimated position coordinate of the ith WSN node and (  ,   ) is the actual position of the ith WSN node.
LE of our proposed method is compared with robust quads.As observed in Figure 10, in the proposed scheme  LE decreases with increase in communication range due to the fact that more trilaterable patches are obtained. LE is about 5% of maximum communication range (100) in the proposed approach, where as in robust quads it is about 10% of maximum communication range.This is because of the fact that location error propagates from the different robust quads in case of a high noise communication range.

Computational Complexity Analysis.
The running time to estimate robust quads and rigid patches of our approach is O( 3 ), where  is the average node degree.The value  in our approach is lower compared to robust quads, which makes our approach computationally efficient.Again, in our algorithm rigid patches are obtained with a cycle of  4 ; therefore the worst case to achieve rigid patches is (  3 ).For a specific average node degree this worst case efficiency will turn up to be O(1), that is, a linear time algorithm.The iterative trilateration procedure's complexity is O( ṕ ), where ṕ is the number of rigid patches, which will be (  3 ) in the worst case.

Conclusion and Future Scope
In this work using the analytical approaches of rigid graph theory a localization algorithm using both the distance and bearing measurement is developed.Rigid graph theory is used to analyze the localizability of the WSN nodes in the network.In this paper rigid patches of the WSN graph are obtained by varying the communication power range of the WSN nodes, which is then applied with trilateration procedure to obtain the position coordinates of the WSN nodes.Trilateration graphs have the advantage that localization will be carried out in polynomial time.The proposed approach has lesser average node degree, which makes it computationally efficient, as the computational complexity depends on the node degree.The localization error is normalized to the communication range, and a comparison shows that 5% of localization error is obtained in the proposed approach, whereas 10% of the error is obtained in robust quads at a high noise of 15%.As part of future work, rigid graph localization can be applied to real time context aware applications like target tracking, autonomous agent and robot tracking, and so forth and also implement the localization algorithm in a test bed.

Figure 1 :
Figure 1: In (a), a flexible framework is depicted.In (b) a flexible framework whose edge length is varied is shown.In (c) a rigid framework is shown.In (d) a redundantly rigid framework is shown.
(26) If it satisfies, then add NODE-ID's forming quadrilateral to the rigid matrix.Repeat the process for all the WSN nodes.(30) Put all the quads obtained with its NODE-ID in rigid matrix.(31) end for Algorithm 1: Finding the rigid quadrilateral patches.

Figure 3 :
Figure 3: Local coordinate system of WSN nodes.

Figure 6 :
Figure 6: Node density versus probability of number of neighbors more than 3.

Figure 7 :
Figure 7: Average node degree at different instances of simulation run.

Figure 8 :
Figure 8: Amount of localizable nodes at different node degree for different values of .

Figure 9 :
Figure 9: Percentage of localizable nodes at different node degree.

Figure 10 :
Figure 10: Normalized error in percentage at different communication ranges.