## 3 Methodology and Model
### IPSA-DV-Hop Algorithm
#### 3.1.3 Improved PSA Mechanism  
The PSA requires the initialization of the population. For the localization problem, the number of decision variables is denoted as \(d\), and the upper and lower bounds of the variables are \(ub\) and \(lb\), respectively. The control parameters of the algorithm include the maximum number of iterations \(T\) and the population size \(n\). Therefore, the initial population can be expressed by Equation (21):  
\[x_{ij}=\left(ub_{j}-lb_{j}\right)\cdot r_{1}+l_{j}(i=1,\ 2,\ \cdots,\ n;\ j=1,\ 2,\ \cdots,\ d) \tag{21}\]  
where \(r_{1}\) is a random number from 0 to 1, and \(x_{ij}\) represents the \(j\)-th dimension of the individual. The fitness function for estimating the unknown node locations is constructed using the table of beacon node locations and distances between network nodes, as follows:  
\[fitness(x,y)=\sum_{i=1}^{M}\left[\sqrt{\left(x_{i}-x_{u}\right)^{2}+\left(y_{ i}-y_{u}\right)^{2}}-d_{iu}\right]^{2} \tag{22}\]  
where \((x_{i},y_{i})\) represents the coordinates of the beacon nodes, and \((x_{u},y_{u})\) represents the coordinates of unknown nodes. \(d_{iu}\) represents the estimated distance between the beacon node and the unknown node. The execution steps of the incremental PID control algorithm can be divided into the following stages:  
1. Calculating system deviations In the minimization problem, the best individual \(x*(t)\) at iteration \(t\) is the individual corresponding to the population's history minimum. The deviation in the population after \(t\) iterations is \[e_{k}(t)=x*(t-1)-x(t-1)\] (23)  
The overall systematic deviations of the previous iteration and the two previous iterations can be expressed as \(e_{k-1}(t)\) and \(e_{k-2}(t)\), respectively. When \(t=1\), \(e_{k-2}(t)=e_{k-1}(t)=e_{k}(t)\). When \(t>1\), \(e_{k-2}(t)=e_{k-1}(t-1)\). In order to reduce the space complexity of the algorithm, \(e_{k-1}(t)\) can be expressed by Equation (24):  
\[e_{k-1}(t)=e_{k}(t-1)+x*(t)-x*(t-1) \tag{24}\]
2. PID regulation The output value of PID regulation at iteration \(t\) can be expressed by Equation (25): \[\Delta u(t)=K_{p}r_{2}[e_{k}(t)-e_{k-1}(t)]+K_{i}r_{3}e_{k}(t)+K_{d}r_{4}[e_{k }(t)-2e_{k-1}(t)+e_{k-2}(t)]\] (25) where \(r_{2},\ r_{3},\ \text{and}r_{4}\) are random number vectors with values between 0 and 1, each having \(n\) rows and 1 column. \(K_{p},\ K_{i},\ \text{and}\ K_{d}\) are the adjustment coefficients for the proportional, integral and differential terms, respectively, and are set to 1, 0.5, and 1.2 in this paper. \[o(t)=\left[\cos\left(1-\frac{t}{T}\right)+\lambda r_{5}\cdot L\right]\cdot e_{k }(t)\] (26) where \(r_{5}\) represents a vector of random numbers from 0 to 1 with \(n\) rows and \(d\) columns. \(\lambda\) is an adjustment coefficient that slowly decreases with the increase in \(t\). \(L\) in Equation (26)is a Levy flight function. The updates of all individuals are related to \(\Delta u(t)\) and \(o(t)\). The population renewal formula is defined as Equation (27):  
\[x(t+1)=x(t)+\eta\cdot\Delta u(t)+(1-\eta)\cdot o(t) \tag{27}\]  
where \(\eta=r_{6}cos(t/T)\) is a matrix with \(n\) rows and \(1\) column. To address the issue of slow convergence in the early stage and the potential for the PSA to fall into a local optimum in the later stage, we propose an improved IPSA-DV-Hop localization algorithm. The theory of Good Point Set is introduced during the initialization phase of the population. Good Point Set was originally proposed by [PERSON] et al. [20]. When applying the theory, let \(G_{s}\) be a unit cube in an s-dimensional Euclidean space. If \(r\) belongs to \(G_{s}\), then a set of \(n\) good points can be constructed as shown in Equation (28):  
\[P_{n}(i)=\{(r_{1}k_{1},\ r_{2}k_{2},\ \cdots,\ r_{n}k_{n})\},\ i=1,\ 2,\ \ldots,\ n \tag{28}\]  
where \(k_{i}\) represents the smallest prime number that satisfies the condition.