# Difference DV_Distance Localization Algorithm Using Correction Coefficients of Unknown Nodes
## 3 Theoretical Background  
The DV_Distance algorithm is a cooperative localization method based on the distance vector routing principle, and it not only has better distribution and expansibility, but also is easy and simple to be realized. A general WSN is shown in Figure 2, where unknown nodes are represented by white dots, and black dots indicate anchor nodes, besides that, the solid lines between nodes mean that they can communicate with each other, while the dashed lines represent the actual Euclidean distance. In brief, the localization process for the basic DV_Distance algorithm consists of the following two steps:  
Step 1: calculating minimum hop number and corresponding accumulated hop distance from unknown nodes to anchor nodes. In terms of the typical distance vector protocol, anchor nodes only broadcast their own information packets, including hop number and accumulated hop distance (both initialized to zero), to neighbor nodes. When an unknown node receives many information packets from a same anchor, it will first compare the hop number and then preserve the information packet having the minimum hop number, after that the hop number will be added 1, and meanwhile the accumulated hop distance from every anchor node will be computed and forwarded to its neighbor node. By means of the above mechanism, both the minimum hop number and the accumulated hop distance from unknown nodes to anchor nodes can be obtained. As shown in Figure 2, the minimum hop number from the unknown node \(U_{0}\) to anchor nodes \(A_{1}\), \(A_{2}\), \(A_{3}\), and \(A_{4}\), respectively, are set as 2, 1, 2, and 3, thus the corresponding accumulated hop distances are expressed as \(d_{1}=\left|\right.U_{0}U_{1}\left|\right.+\left|\right.U_{1}A_{1}\left|\right.\), \(d_{2}=\left|\right.U_{0}A_{2}\left|\right.\), \(d_{3}=\left|\right.U_{0}U_{4}\left|\right.+\left|\right.U_{4}A_{3}\left|\right.\), and \(d_{4}=\left|\right.U_{0}U_{5}\left|\right.+\left|\right.U_{5}U_{6}\left|\right. +\left|\right.U_{6}A_{4}\left|\right.\). In addition, the actual Euclidean distances from \(U_{0}\) to anchor nodes are represented by \(D_{1}\), \(D_{2}\), \(D_{3}\), and \(D_{4}\). Obviously, \(D_{1}\
eq d_{1}\), \(D_{3}\
eq d_{3}\), and \(D_{4}\
eq d_{4}\), that is, the accumulated hop distance is not equal to the actual Euclidean distance. \begin{table}
\begin{tabular}{c c} \hline \hline
**Symbol** & **Description** \\ \hline \(i\), \(j\) & Indexes for anchor nodes, \(i\
eq j\); \\ \(k\) & Index for unknown node; \\ \(h_{s,s}\) & Hop number between sensor nodes; \\ \(d_{s,s}\) & Accumulated hop distance between sensor nodes; \\ \(D_{ij}\) & Actual Euclidean distance from anchor \(i\) to anchor \(j\); \\ \(cv_{i,j}\) & Correction coefficient from anchor \(i\) to anchor \(j\); \\ \(d_{k,j}^{est}\) & Corrected distance from the unknown node \(k\) to anchor \(j\); \\ \(cv_{k,i,j}\) & Correction coefficient from unknown node \(k\) to anchor \(i\) according to anchor \(j\), \(i\
eq j\); \\ \(\omega_{k,i,j}\) & Weighting factor for \(cv_{k,i,j}\); \\ \(N\) & Total number of anchor nodes; \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Symbol description for some DV_Distance improvement algorithms. Figure 2: The schematic diagram of basic DV_Distance localization algorithm. Step 2: unknown nodes localization using three-edge or multilateral distance measurement. The accumulated hop distances from each anchor to unknown nodes, which have been calculated in step 1, are regarded as the effective distances, and then the coordinates of unknown nodes can be computed by three-edge or multilateral distance method. Assume that, the coordinates of anchor nodes are \((x_{i},y_{i})\), \(i=1,\,2,\,\ldots,\,n\), and their accumulated hop distances are respectively \(d_{1},\,d_{2},\,\ldots,\,d_{n}\). If the coordinate of unknown node is expressed as \((x,y)\), we have the equations as follows:  
\[\left\{ \begin{array}{c}(x-x_{1})^{2}+(y-y_{1})^{2}=d_{1}^{2}\\ (x-x_{2})^{2}+(y-y_{2})^{2}=d_{2}^{2}\\ \vdots\\ (x-x_{n})^{2}+(y-y_{n})^{2}=d_{n}^{2}\end{array} \right.