## 2 Related Work
### Hybrid PSOGWO Principle
#### 2.2.2 Gwo
```
Input: gray wolf population \(L_{t}(i=1,2,\cdots,n)\), size \(n\), number of iteration \(T\), control parameter \(a\), synergy coefficient \(A\), \(C\) and learning factors \(r_{1}\), \(r_{2}\) Output: the optimal solution \(L_{t}\)
1 initialize the first best solution as \(L_{\alpha}\), the second as \(L_{\beta}\) and the third as \(L_{\delta}\)
2 while(\(t<T\))do
3 for\(i=1:n\)do
4 calculate the fitness of each search agent \(Fit_{i}\)
5 update the current search agent location by Equations (3)-(6)
6 evaluate the fitness of \(Fit_{i}\)
7 update the \(a\), \(A\) and \(C\)
8 update the best solution \(L_{\alpha}\), \(L_{\beta}\) and \(L_{\delta}\) by Equations (3)-(4)
9\(t=t+1\)

#### 2.2.3 Psogwo

Although PSO and GWO have been widely used in many fields, there are still some problems in the optimization process. PSO has strong search ability, but it easily falls into local optimum. GWO has a strong ability to develop solution space and does not easily fall into local optima, but the lack of information sharing among gray wolves leads to poor search ability. The hybrid PSOGWO algorithm [39] can maximize the advantages and minimize the disadvantages of the PSO and GWO. Therefore, this paper uses it to locate the target node. To increase information sharing among individual gray wolves, when GWO calculates the final location, it does not simply take the average location of the three optimal wolves as the target location but introduces the speed equation of PSO, which can effectively improve the search ability of GWO. The improvements of this hybrid model are as follows:

\[V_{ij}^{t+1}=wV_{ij}^{t}+c_{1}r_{1}(L_{1}-L_{ij}^{t})+c_{2}r_{2}(L_{2}-L_{ij}^{ t})+c_{3}r_{3}(L_{3}-L_{ij}^{t}) \tag{8}\]

\[L_{ij}^{t+1}=L_{ij}^{t}+V_{ij}^{t+1} \tag{9}\]

where \(w\) is the inertial factor. By adjusting the size of \(w\), the performance of global optimization and local optimization can be promoted. \(c_{1}\), \(c_{2}\) and \(c_{3}\) are the acceleration constants and represent the learning factor of the three optimal gray wolves, respectively. \(r_{1}\), \(r_{2}\) and \(r_{3}\) are random numbers in the interval [0, 1], which can increase the randomness of the search. \(L_{1}\), \(L_{2}\) and \(L_{3}\) represent the locations of the optimal three gray wolves, respectively. \(L_{ij}^{t}\) and \(V_{ij}^{t}\) are the velocity vector and location of the candidate gray wolf \(i\) (i.e., the optimal solution) in the \(j\)th dimension and \(t\)th iteration. The implementation process of ILP-PSOGWO is shown in Algorithm 3. ```
Input: gray wolf population \(L_{i}(i=1,2,\cdots,n)\), size \(n\), number of iteration \(T\), control parameter \(a\), synergy coefficient \(A\), \(C\) and learning factors \(r_{1}\), \(r_{2}\) Output: the optimal solution \(L_{t}\)
1 calculate the fitness value \(fit_{i}\) of each search agent
2 Initialize the first best solution as \(L_{\alpha}\), the second as \(L_{\beta}\) and the third as \(L_{\delta}\)
3 while(\(t<T\))do
4 for\(i=1:n\)do
5 calculate the fitness value \(fit_{i}\) of each particle
6 update the fitness value of \(\alpha\), \(\beta\) and \(\delta\), update \(a\)
7 for\(i=1:n\)do
8 for\(j=1:d\)do
9 calculate \(D_{\alpha}\), \(D_{\beta}\) and \(D_{\delta}\) by Equation (5)
10 update the \(r_{1}\), \(r_{2}\), \(A\) and \(C\)
11 calculate velocity \(V_{i}\) and the location \(L_{t}\) by Equations (6)-(9)
12
```

**Algorithm 3**The implementation process of PSOGWO. ## 3 ILP-PSOGWO Method

The process of ILP-PSOGWO can be roughly divided into the following three stages: the construction and analysis of the relationship model between the RSS and distance, the selection of the reference point locations and locating the target node. The principle framework of ILP-PSOGWO is shown in Figure 1, and its detailed process is described as follows:

* **Step 1: Collect data. ** Determine the room where the target node is located and start to collect the signal strength to provide data support for building the signal attenuation model. * **Step 2: Process data.