# A Dependable Localization Algorithm for Survivable Belt-Type Sensor Networks
## 3 Hop-Distance Estimation Correction
### Locating the Node and Fix the Result  
Once the target node obtains three or more distance parameters of the anchor nodes, the triangulation positioning method is run immediately. Let the coordinate of the anchor node be \((x_{n},y_{n})\), its cumulative distance to the unknown node (target node) is \(d_{n}\), and coordinate of the unknown node is \((x,y)\). According to the distance relationship between two points, the distance system between the different anchor node and the target node is established as shown in Equation (10):  
\[\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}\\ \cdots\cdots\cdots\cdots\cdots\cdots\cdots\cdots\cdots\cdots\cdots\\ (x-x_{n})^{2}+(y-y_{n})^{2}=d_{n}^{2}\\ \end{array} \right. \tag{10}\]  
According to the difference of the connectivity of the neighboring nodes, if the hop count is used directly to estimate the distance, the result is bound to be erroneous. When adopting the trilateral method to locate nodes, the process will produce many circles with different radius lengths. In essence, these equations of the circles with different radius are difficult to converge precisely at one point, which may cause the system to produce no solution. We can adopt the least squares method to obtain a set of approximate solutions for the unknown node. The expression after conversion is given by Equation (11):  
\[AX=b \tag{11}\]  
The matrix forms of \(A\) and \(b\) are shown in Equations (12) and (13):  
\[A=\left[ \begin{array}{cc}2(x_{1}-x_{n})&2(y_{1}-y_{n})\\ \vdots&\vdots\\ 2(x_{n-1}-x_{n})&2(y_{n-1}-y_{n})\end{array} \right] \tag{12}\]  
\[b=\left[ \begin{array}{c}x_{1}^{2}-x_{n}^{2}+y_{1}^{2}-y_{n}^{2}+d_{kn}^{2}-d _{k1}^{2}\\ \vdots\\ x_{n-1}^{2}-x_{n}^{2}+y_{n-1}^{2}-y_{n}^{2}+d_{kn}^{2}-d_{k(n-1)}^{2}\end{array} \right] \tag{13}\]  
The matrix form of the unknown node coordinates to be positioned is Equation (14):  
\[X=\left[ \begin{array}{c}x\\ y\end{array} \right] \tag{14}\]  
According to the estimation method of the standard minimum mean square error, we can calculate the following result:  
\[\hat{x}={{{(A^{T}A)}^{-1}}}{A^{T}}b \tag{15}\]  
In order to improve the distance estimation between nodes, to maximize the credibility of the distance between the neighbor anchor nodes and to improve the positioning accuracy of the ribbon network based on connectivity, the estimated position of the unknown target node needs to coordinate the calibration. The purpose of doing that is to make the estimated position constantly approach the true position. The algorithm can introduce a special mathematical control method according to the distance constraint relation between neighbor nodes with high reliability weights. It can improve the accuracy of the location results by making finite iteration updates to the subsequent node coordinates after the three-side measurement. If we adopt the recursive form of a Taylor series expansion, we need to use the results which have been achieved the last time as an initial value. The local solution of the measurement error is obtained by the least squares method, and the iteration value of the operation is obtained. The algorithm needs to fix the position of the node constantly, and the operation ends when the error reaches the pre-set threshold. The Taylor series expansion method is suitable for the positioning systems with three or more base stations. It is necessary to ensure that the process is convergent. However, this method is more dependent on the selected initial value. Also, the computational complexity is higher and cannot run in a single node. In this paper, we use the gradient descent algorithm which is relatively simple to correct the estimation results. This method can improve the positioning accuracy by optimizing and improving the target position estimation. The gradient descent algorithm is a minimized optimization method based on the Newton principle [8].