# A Mobility-Assisted Localization Algorithm for Three-Dimensional Large-Scale UWSNs
## 3 System Model
### Distance Measurement Model
#### 3.2.2 Distance Measurement  
The localization scheme proposed in this paper is also a multistage localization scheme. In Phase I, according to the state analysis of mobile anchor nodes and ordinary sensor nodes in UWSNs, then, the method in Reference [20] is adjusted reasonably to measure the distance between the ordinary node and the anchor node. Then, in Phase II, we measure the distance between the unlocated sensor node and the new reference node by using the two-way TOA method. Therefore, the localization scheme does not require time synchronization in this paper. In Phase I, the mobile anchor node rises to the surface to receive coordinate information by using the equipped GPS. During the diving process, mobile anchor nodes propagate localization messages at fixing intervals. For UWSNs with overall drift, the mobile anchor node moves in a straight line at a constant speed in the vertical direction, while the ordinary sensor node remains stationary relative to the anchor node. Moreover, the overall drift of all sensor nodes can cause deviations in the direction of message transmission. However, since sound travels in seawater at a speed of 1497 m/s (25. C), when an ordinary sensor node receives a message block, the displacement of its drift is relatively small and negligible. As shown in Figure 3, we assume that the underwater acoustic velocity is constant, \(v_{acoustic}\). At \(t_{1}\) timestamp, the anchor node propagates the localization message block at location \(B\). At the \(t_{2}\) timestamp, the ordinary sensor node receives the localization message, and the anchor node is in position \(B^{\prime}\). Moreover, \(d_{1}\) is the first communication distance. At the \(t_{3}\) timestamp, the anchor node sends the message block and is in position \(C\). At the \(t_{4}\) timestamp, the ordinary sensor node receives the message block, and the anchor node is at position \(C^{\prime}\). Moreover, \(d_{2}\) is the second communication distance. We assume that all sensor nodes are equipped with UPS. Therefore, all sensor nodes (including anchor nodes) can obtain their coordinate information in real time. Here, \(d_{1}\) and \(d_{2}\) can be projected on the horizontal plane of the ordinary sensor node, and the projection distance is \(d_{a,bj}\). Furthermore, the localization message block is shown in Figure 4. Here, \(a_{i}\) is the \(i\) ordinary sensor node, \(b_{j}\) is the \(j\) mobile anchor node, and \(\left(X_{b_{j}},Y_{b_{j}}\right)\) are the plane coordinates of the \(b_{j}\) mobile anchor node. There are three scenarios for anchor node locations to be considered [20]: \(z_{b_{j}}^{t_{1}}<z_{a_{i}}<z_{b_{j}^{\prime}}^{t_{3}}\), \(z_{b_{j}}^{t_{1}}<z_{b_{j}}^{t_{3}}<z_{a_{i}}\), and \(z_{a_{i}}<z_{b_{j}}^{t_{1}}<z_{b_{j}}^{t_{3}}\). Here, \(z_{a_{i}}\) is the depth of the ordinary sensor node. \(z_{b_{j}^{\prime}}^{t_{1}}\), \(z_{b_{j}}^{t_{3}}\) are the depth coordinates of the mobile beacon at different times. In this section, we have simply optimized it so that a uniform formula can be used for each scenario. Therefore, \(H_{1}\) is the absolute value of the  
Figure 4: Localization message block from anchor. Figure 3: Distance measurement. depth difference between the sensor node \(a_{i}\) and the mobile anchor node \(b_{j}\) at time \(t_{1}\). \(H_{2}\) is the absolute value of the depth difference between the sensor node \(a_{i}\) and the mobile anchor node \(b_{j}\) at a time \(t_{3}\). Moreover, \(\Delta T_{1}\) and \(\Delta T_{2}\) are the time difference. \[H_{1}=\left|z_{a_{i}}-z_{b_{j}}^{t_{1}}\right| \tag{3}\]  
\[H_{2}=\left|z_{b_{j}}^{t_{3}}-z_{a_{i}}\right| \tag{4}\]  
\[\Delta T_{1}=t_{4}-t_{2} \tag{5}\]  
\[\Delta T_{2}=t_{3}-t_{1}=\frac{z_{b_{j}}^{t_{3}}-z_{b_{j}}^{t_{1}}}{v_{anchor}} \tag{6}\]  
By using the Pythagorean Theorem, the projection distance \(d_{a_{i}b_{j}}\) is established in Equation (7). Thus, the equation is transformed into Equation (9).