# A Hybrid Bald Eagle Search Algorithm for Time Difference of Arrival Localization
## 3 Proposed Localization Algorithm
### Hybrid Bald Eagle Search Optimization Algorithm
#### 3.2.4. Sine Cosine Algorithm  
The second phase of the BES algorithm searches for spatial prey is to search for prey in a spiral flight search based on the first phase with respect to the region selected in the first phase. This transition phase can be helpful for the algorithm to go beyond the local optimum to ultimately get the best value if it increases the search convenience and the exploration of the solution space. The sine cosine algorithm proposed by [PERSON] [35] in 2016 is characterized by fast convergence speed and few adjustment parameters. The sine cosine algorithm replaces the process of biological searching for food in the swarm intelligence algorithm by the oscillation of the sine and cosine function. The position update formula of the sine cosine algorithm is as follows:  
\[X_{i}^{t+1}=\left\{\begin{array}{l}X_{i}^{t}+r_{1}*\sin(r_{2})*\left|r_{3}P_ {j}^{t}-X_{i}^{t}\right|,r_{4}<0.5\\ X_{i}^{t}+r_{1}*\cos(r_{2})*\left|r_{3}P_{j}^{t}-X_{i}^{t}\right|,r_{4}\geq 0.5 \end{array}\right. \tag{23}\]  
where \(t\) is the current iteration number, \(X_{i}^{t}\) represents the particle \(i\) of the \(t\) iteration, \(r_{2}\), \(r_{3}\), \(r_{4}\) are random numbers whose values range is (0, 2), (\(-\)2, 2), (0, 1) respectively. \(P_{j}^{t}\) represent the individual with the best fitness in the current population, and \(r_{1}\) is a parameter that linearly decreases with the number of iterations and controls the switching between global search and local development of the algorithm.  
\[r_{1}=a-t\frac{a}{T} \tag{24}\]  
where \(T\) is the total number of iterations, when \(|r_{1}\times\sin(r_{2})|\) or \(|r_{1}\times\cos(r_{2})|\) is greater than 1 the algorithm deviates from \(P_{j}^{t}\) to enhance the algorithm's global search, when \(|r_{1}\times\sin(r_{2})|\) or \(|r_{1}\times\cos(r_{2})|\) less than or equal to 1 the algorithm is close to \(P_{j}^{t}\) to facilitate the algorithm's local exploration to find the optimal solution. This paper incorporates the oscillation mechanism of the positive cosine algorithm in the second stage of the BES algorithm to adjust the local development mode of the global search of the algorithm and improve the algorithm's ability to find the optimal solution. Because \(r_{1}\) is linearly decreasing, this paper adjusts \(r_{1}\) as a nonlinear parameter to facilitate the global search  
Figure 2: Tent-Mapping Bifurcation Chart.  
in the early stage of slow decline, and local development in the late stage of fast decline to find the optimal solution, while introducing a nonlinear weight factor \(\omega\) to adjust the dependence of the bald eagle algorithm on individual information. In order to match the conversion pattern of \(r_{1}\), \(\omega\) is smaller in the early stage and larger in the late stage, which is in line with the strategy of global search in the early stage and local development in the late stage.  
\[r=(1-(\frac{t}{T})^{\frac{\eta}{\eta}})^{\frac{1}{\eta}} \tag{25}\]  
\[\omega=\frac{e^{\frac{t}{T}-1}}{e-1} \tag{26}\]  
\[X_{i}^{t+1}=\left\{\begin{array}{l}\omega X_{i}^{t}+r\times\sin(r_{2})\times \left|r_{3}X_{mean}^{t}-X_{i}^{t}\right|,r_{4}<0.5\\ \omega X_{i}^{t}+r\times\cos(r_{2})\times\left|r_{3}X_{mean}^{t}-X_{i}^{t} \right|,r_{4}\geq 0.5\end{array}\right. \tag{27}\]  
Equation (25) is the adjusted \(r_{1}\), Equation (26) is the expression of \(\omega\), and Equation (27) is the improved expression of the bald eagle search algorithm's two-stage integration with the sine cosine algorithm. The curves of \(r\), \(\omega\), \(r_{1}\) with iteration number are shown in Figure 3.