# Range-Free Localization Approaches Based on Intelligent Swarm Optimization for Internet of Things
## 2 Related Works and Background
### Weight-Based Enhancements to DV-Hop
#### 2.1.1 Basic DV-HOP Algorithm
\begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline
**Authors** & **Summary** & **Strength of Approach** & **Anchors Based** & **Node Density** & **Localization Error** & **Approaches of Localization** & **Complexity** & **Accuracy** \\ \hline  & Three enhanced algorithms (DIV-Hop1, & & & & & & & & \\ [PERSON] et al. in [15] & 1 DV-Hop2, and Quad DV-Hop) based on the DV-Hop technique. & New approaches based on geometry. & Yes & High & Medium & Distributed & High & Medium \\ \hline  & A new DV-Hop-based scheme that incorporates PSO to minimize the localization error. & Combines DV-Hop and PSO & Yes & High & High & Iterative & High & High \\ \hline  & & Uses chicken swarm optimization to achieve superior results in comparison with the PSO method. & Yes & High & High & Iterative & High & High \\ \hline \hline \end{tabular}
\end{table} 
Table 1: _Cont._During this localization process stage, sensor nodes convey the hop value to the anchors. In the second step, anchor \(A_{i}\) determines the average hop distance \(AHSize_{i}\). After the computation of \(AHSize_{i}\), anchor \(A_{i}\) propagates this value across the network. The formula employed for determining the average hop distance \(AHSize_{i}\) for each anchor \(A_{i}\) is expressed as follows:  
\[AHSize_{i}=\frac{\sum\limits_{j\
eq i}\sqrt{(x_{i}-x_{j})^{2}+(y_{i}-y_{j})^{ 2}}}{\sum\limits_{j\
eq i}H_{i,j}} \tag{1}\]  
Here, \(H_{i,j}\) is the hop count from \(A_{i}\) to \(A_{j}\), where \((x_{i},y_{i})\) and \((x_{j},y_{j})\) represent the coordinates of anchors \(A_{i}\) and \(A_{i}\), respectively. Additionally, \(H_{i,u}\) is the hop count value from node \(A_{i}\) to the specific target node \(U\). Based on this formula, \(A_{i}\), which is an anchor, saves its unique average hop size \(AHSize_{i}\), which plays a crucial role in estimating the unknown nodes during the localization steps. When this has been computed, anchor node \(A_{i}\) broadcasts this information across the network, ensuring that all network nodes have access to it. In the third stage, when a node \(U\) obtains \(AHSize_{i}\), it multiplies it by \(H_{i,u}\) (the number of hops to \(A_{i}\)) in order to obtain the estimated distance to every anchor node \(A_{i}\), denoted as \(d_{i}\), which can be estimated as follows:  
\[d_{i}=AHSize_{i}\times H_{i}, \tag{2}\]  
where the value of \(i\) varies between \(1\) and \(k\) anchor nodes and \(H_{i}\) is the number of hops to anchor node \(A_{i}\). Therefore, the estimated position of node \(U\), denoted as \((x,y)\), can be found using the following equation. \[ \begin{cases}(x-x_{1})^{2}+(y-y_{1})^{2}=d_{1}^{2}\\ (x-x_{2})^{2}+(y-y_{2})^{2}=d_{2}^{2}\\...\\ (x-x_{k})^{2}+(y-y_{k})^{2}=d_{k}^{2}\end{cases}  \tag{3}\]  
By applying the least squares approach to solve the aforementioned equation, an unknown node \(U\) can determine its estimated location \(U_{DV-Hop}\) as follows:  
\[U_{DV-Hop}: \begin{bmatrix}x\\ y\end{bmatrix} =(A^{T}A)^{-1}A^{T}B, \tag{4}\]  
where  
\[A=-2\times \begin{bmatrix}x_{1}-x_{k}&y_{1}-y_{k}\\ x_{2}-x_{k}&y_{2}-y_{k}\\...&...\\ x_{k-1}-x_{k}&y_{k-1}-y_{k}\end{bmatrix}  \tag{5}\]  
\[B= \begin{bmatrix}d_{1}^{2}-d_{k}^{2}-x_{1}^{2}+x_{k}^{2}-y_{1}^{2}+y_{k}^{2}\\ d_{2}^{2}-d_{k}^{2}-x_{2}^{2}+x_{k}^{2}-y_{2}^{2}+y_{k}^{2}\\...\\ d_{k-1}^{2}-d_{k}^{2}-x_{k-1}^{2}+x_{k}^{2}-y_{k-1}^{2}+y_{k}^{2}\end{bmatrix} . \tag{6}\]  
It is important to note that the anchor nodes must not lie on a single line. If they do, the matrix \((A^{T}A)^{-1}\) becomes nonexistent due to the singularity of \(A^{T}A\).