1 Introduction

The ocean is closely related to human life. Based on the increased research on underwater area [1], the upsurge of ocean development is rising all over the world. Underwater Sensor Networks (UWSN) has become a research hotspot, and node localization is one of its key technologies [2, 3]. The information collected by sensor nodes is meaningful only when the node location is known in UWSN [4]. In the ocean electronic warfare system, determining the geographical location of the target is one of its basic functions, and it is also the technical guarantee to finally destroy the enemy’s target and defend the sea. At the same time, with the rapid progress of ocean engineering technologies such as ocean development, seabed exploration and ocean biological research, such as the exploitation of submarine crude oil and gas reserves, forecasting of submarine seismic activities, underwater cable laying, shipwreck salvage, and application of underwater robots to monitor marine life, all require underwater accurate target localization technology as a support.

However, GPS cannot be used in underwater environment and it is difficulty to directly locate sensor nodes in real time [5]. The unique underwater environment determines that acoustic signal is the main communication method for UWSN [6]. Moreover, the bandwidth of the underwater acoustic channel is very narrow, and underwater acoustic communication has the characteristics of low power, high noise, and fast energy attenuation [7, 8]. These characteristics lead to the fact that terrestrial wireless sensor network localization algorithms cannot be applied to UWSN directly [9,10,11].

For the existing UWSN localization algorithm, the localization accuracy is poor, the energy consumption is high. Underwater beacon nodes are easily affected by ocean currents and tides to move in the complex underwater environment [12, 13]. But most existing algorithms in this field do not consider the mobility of beacon nodes [14,15,16], which increases the error of node localization. It is found through calculation that if the beacon node has a movement of 1 m, the error of the unknown node will increase about 3.84 m, if the beacon node has a movement of 5 m, the error of the unknown node will increase about 19.18 m. Due to the particularity of UWSN, after the beacon node is deployed, it will continuously move with the water flow, resulting in a very large movement error. The long delay of underwater acoustic communication is also added the difficulty of node localization [17, 18]. The localization error affects application seriously, for example, in marine engineering and military applications. In marine engineering, high-precision operations such as pipeline docking and installation of underwater structures often requires sub-meter construction accuracy, and the localization accuracy of the underwater acoustic system is extremely high [19]. In military applications, underwater localization errors of several meters can cause serious consequences. On February 10, 2001, the US “Greenville” nuclear submarine crashed into the Japanese fishing practice ship “Aiwan Maru” during the emergency floating exercise due to localization problems. In January 2002, the boat collided with the amphibious ship “Ogaden” again in the waters near Oman, causing the ship’s fuel to leak. On January 9, 2007, in the Strait of Hormuz, the US “Newport News” nuclear submarine collided with the Japanese “Minamikawa” super tanker. On March 20, 2009, the US “Hartford” nuclear submarine collided with the US “New Orleans” amphibious landing ship in the Strait of Hormuz. Therefore, the placement of high-precision underwater acoustic localization systems is very important to ensure marine safety [20].

In addition, sensor node has limited computational power and cannot perform complex operation. Ocean science research, target detection, resource survey and other data must be combined with location information to make sense, the accuracy of location information determines the application value of sensory data [21]. Therefore, designing practical localization algorithm based on the characteristics of UWSN is an urgent problem to be solved.

Our design originates from the OCEANSENSE experiment system deployed in Qingdao Bay. To prevent the nodes being washed away by water, we connect the beacon node with the anchor in the seabed through the cable and these nodes are called mobility-constrained beacon. Figure 1(a) shows the deployment of this type of sensor nodes. The node is anchored to the seabed by anchor and always floating on the sea surface under the action of gravity, buoyancy, water flow, and cable tension, and it moves within the length of the rope. Figure 1(b) shows the actual deployment photos. We propose an underwater sensor network localization algorithm based on mobile-constrained beacons by observing the movement rules of the deployed nodes.

Fig. 1
figure 1

Mobility-constrained node structure and deployment photo

The main contributions of this paper are as the following three aspects: (1) On the basis of the mobility-constrained model, the exact location of the beacon node is unknown, the coordinates of the unknown node can be calculated by the geometric relationship between the position of the anchor and the movement range of the beacon node. (2) Due to the limited resources of underwater nodes, the polygonal area obtained by the geometric relationship between node positions is converted into a rectangular area, and the three-dimensional space is mapped to a two-dimensional space, which simplifies the calculation process and the feasibility of the algorithm is improved. (3) Through simulation experiments, we compare the proposed algorithm with existing algorithms. Simulation results show that the proposed algorithm is superior to other UWSN localization algorithms in accuracy and practicality.

The remaining portion of this paper is organized as follows: Sect. 2 summarizes the related works. In Sect. 3, we introduce the network model and describe Mobility-constrained Beacon based localization algorithm in 2D (MCB-2D) and Mobility-constrained Beacon based localization algorithm in 3D (MCB-3D) in details. Simulation results are reported in Sect. 4. We conclude our work in Sect. 5 with a discussion of future research works.

2 Related works

With the development of high technology in underwater environment, such as underwater image processing [22], AR and artificial intelligence applications [23], localization technology is still one of the key technologies for UWSN. Due to the serious attenuation of electromagnetic waves in underwater, GPS cannot provide location services for UWSN. Most of the UWSN localization algorithms are based on the ranging method. If the position of the node changes continuously, the error rate of the algorithm will rise sharply. At present, large-scale underwater sensor network localization methods are generally based on iterative methods. If the position of a node moves continuously, the impact on localization accuracy will be continuously accumulated in an iterative manner [24]. In addition, the underwater nodes are moving, the communication bandwidth is very narrow, and the communication delay is very high, which makes the existing localization algorithm of the Wireless Sensor Network (WSN) unable to be applied to UWSN.

At present, underwater wireless sensor network localization algorithms are mainly divided into two categories: centralized localization and distributed localization [25]. Centralized localization algorithm sends information to the central node for calculation. The distributed localization algorithm does not need to send information to the central node, but each node independently performs calculations. The UPS localization algorithm [26] is a distance-related localization algorithm, which adopts the method of silent positioning. The silent positioning method adopted by the UPS reduces energy consumption, but has great requirements for node deployment. The DNRL localization algorithm [27] uses a free-floating beacon node which is similar to the UPS algorithm. It also uses three non-coplanar beacon nodes to communicate with the node to be located, and obtains the distance between the node to be located and the beacon node information. However, the floating and sinking beacons of the DNRL algorithm cannot be rapidly degraded, so that the entire network cannot achieve fast localization. The AAL localization algorithm [28] is an AUV-assisted localization algorithm. This algorithm uses the two-way ranging TOA method for ranging. However, the AAL algorithm has more accurate network synchronization, which makes the energy consumption of the localization network increase, and the node localization accuracy is affected by the AUV frequency variation. The LSHL algorithm [29] is a hierarchical localization scheme in a static environment. When the node receives the position coordinates sent by the three non-coplanar anchor nodes and the distance between the anchor nodes, the node can communicate with each other. The LSHL algorithm also adds a threshold of error. When the position error of the node to be located is less than the threshold, the node can be used as a secondary node to locate other nodes. The APIT algorithm [30] is also a distance-independent localization algorithm. The algorithm can greatly reduce the area where the unknown node is located and improve the localization accuracy. The PI algorithm [31] makes use of the broadcast information by the mobile beacon node periodically. This algorithm reduces the dependence of the localization process on the node density, but the localization process relies too much on several specific signal values. Both the LDB algorithm [32] and the LoMoB algorithm [33] use the underwater robot AUV to perform the auxiliary node calculation. They depend on the aid of AUV. These algorithms need to know the exact location of the beacon node. As mentioned above, the underwater environment is complex, and the movement of the nodes causes these algorithms to be computationally complex and the node localization efficiency is low and the error is large.

In this paper, by considering the underwater affecting factors, a novel sensor network localization algorithm based on mobility-constrained beacon is proposed. The algorithm can be used for both 2D and 3D. In the localization process, the unknown node can be located without the exact position of the beacon node. The polygon area obtained by the geometric relationship between node locations can be converted into a rectangular area, which simplifies the calculation process and improves the feasibility of the algorithm.

3 Algorithm design

In this section, a mobile model of mobile-constrained beacon is established, and an underwater sensor network location algorithm based on mobile-constrained beacon is proposed. The algorithm can be used for both two-dimension and three-dimension underwater node localization.

3.1 Network model

Underwater communication adopts acoustic wave technology, which have many differences with terrestrial communication, such as high transmission delay, high bit error rate, limited transmission rate, severe channel damage, limited bandwidth, etc. In general, the underwater nodes are not equipped with GPS localization devices, moreover, their positions are easily affected by ocean currents, tides and various other factors. Because of the randomness, the above factors are difficult to model, and node cannot grasp its exact location. So we pre-set the anchor’s position, and it will not change. We can determine the movement range of the beacon node through the position of the anchor. The beacon nodes can move within a certain radius, and we named this sensor node as a mobility-constrained underwater sensor node. Based on the observation of OCEANSENSE experiment system, the beacon nodes are always floating on the sea surface under the action of gravity, buoyancy, water flow, and cable tension, and they move within the length of the rope. The beacon node’s movement model is shown in Fig. 2, which is the abstract representation of actual nodes. And similar models have been used in some previous studies [34, 35]. Yang et al. [34] proposed a geometrical structure of sea depth measurement to estimate the depth of the sea. Luo et al. [35] proposed a floating model of the double-head node, and presented a localization scheme termed localization for double-head maritime sensor networks. These models have different application environments, our model different from them which based on OCEANSENSE experiment system. It is simple but consistent with the actual node deployment, and could be used to node localization algorithm design.

Fig. 2
figure 2

Mobility-constrained node model

The anchor position is \((x_{O} ,y_{O} ,z_{O} )\), the cable length is L, the water depth is H, the maximum moving radius of the node at sea level is R, and \(L^{2} = R^{2} + H^{2}\). Make the vertical line from the anchor to the sea level, the corresponding vertical foot is \((x_{O} ,y_{O} ,z_{H} )\). The node may be located at any position within the circle centered on \((x_{O} ,y_{O} ,z_{H} )\) and radius R.

3.2 Two-dimensional localization algorithm

At the sea surface, the z-axis coordinates of the nodes are the same, so we only need to know the x-axis and y-axis coordinates to achieve two-dimensional localization. This paper designs a Mobile-constrained Beacon based localization algorithm in two-dimension (MCB-2D).

As shown in Fig. 3, the node D is a target node, and the nodes A, B, and C are mobility-constrained beacon nodes. The centers of their moving range are the corresponding 2D coordinates of the anchor which are \((x_{A} ,y_{A} )\), \((x_{B} ,y_{B} )\), and \((x_{C} ,y_{C} )\). The radius of the moving range is \(R_{A}\), \(R_{B}\), \(R_{C}\). The distance between the beacon nodes A, B and C to the node D is \(d_{A}\), \(d_{B}\), \(d_{C}\) respectively.

Fig. 3
figure 3

Localization principle of MCB-2D

As the nodes are floating on the sea surface, the distance between them can be obtained by TDOA (Time Difference of Arrival). For a mobile-constrained beacon node A, the node D is located in a circle takes anchor coordinates \((x_{A} ,y_{A} )\) as the center, \(d_{A} - R_{A}\) and \(d_{A} + R_{A}\) as the radii (dA is the distance between the beacon node and the unknown node, and RA is the moving radius of the beacon node). In the same way, for the mobile-constrained beacon node B, the node D is located in a circle takes anchor coordinate \((x_{B} ,y_{B} )\) as the center, \(d_{B} - R_{B}\) and \(d_{B} + R_{B}\) as the radius. For the mobile-constrained beacon node C, the node D is located in a circle takes anchor coordinate \((x_{C} ,y_{C} )\) as the center, \(d_{C} - R_{C}\) and \(d_{C} + R_{C}\) as the radius. Through mathematical calculations, it is known that regardless of the position of the unknown node D in the three beaconing nodes, it will be in the junction area KMNJ of the three rings. Take the centroid of the area as the coordinates \((x_{D} ,y_{D} )\) of the node D. According to the centroid algorithm, the coordinate formula of D is as follows:

$$\left\{ {\begin{array}{*{20}c} {x_{D} = \frac{{x_{K} + x_{M} + x_{N} + x_{J} }}{4}} \\ {y_{D} = \frac{{y_{K} + y_{M} + y_{N} + y_{J} }}{4}} \\ \end{array} } \right.$$
(1)

The calculation of the rings intersection is very complicated. The computational load is too heavy for a sensor node with limited hardware resources. Therefore, the algorithm needs to be simplified. Converting a circular area into a rectangular area can greatly reduce the amount of calculation, as shown in Fig. 4. For mobile constrained beacon node A, node D is located between an inner square [\(x_{A} \pm \frac{{(d_{A} - R_{A} )}}{\sqrt 2 }\), \(y_{A} \pm \frac{{(d_{A} - R_{A} )}}{\sqrt 2 }\)] of a circle with the center \((x_{A} ,y_{A} )\), the radius is \(d_{A} - R_{A}\), and an outer square[\(x_{A} \pm (d_{A} + R_{A} )\), \(y_{A} \pm (d_{A} + R_{A} )\)] of a circle with the center \((x_{A} ,y_{A} )\), the radius is \(d_{A} + R_{A}\). Similarly, for the mobile constrained beacon node B, the node D is located in the area bounded by [\(x_{B} \pm \frac{{(d_{B} - R_{B} )}}{\sqrt 2 }\), \(y_{B} \pm \frac{{(d_{B} - R_{B} )}}{\sqrt 2 }\)] and [\(x_{B} \pm (d_{B} + R_{B} )\), \(y_{B} \pm (d_{B} + R_{B} )\)]. For the mobile constrained beacon node C, the node D is located in the area bounded by [\(x_{C} \pm \frac{{(d_{C} - R_{C} )}}{\sqrt 2 }\), \(y_{C} \pm \frac{{(d_{C} - R_{C} )}}{\sqrt 2 }\)] and [\(x_{C} \pm (d_{C} + R_{C} )\), \(y_{C} \pm (d_{C} + R_{C} )\)].

Fig. 4
figure 4

Mobility-constrained beacon based localization in 2-D

From Fig. 4(a)–(c), we can see that no matter where the unknown node D is, it is always in the above-mentioned area KMJN, and the centroid of the area can be taken as the coordinate of node D. The boundary calculation formula of KMJN is:

$$\begin{aligned} & \left\{ {\hbox{max} \left[ {\hbox{max} (x_{i} - (d_{i} + R_{i} )),\hbox{min} \left( {x_{i} + \frac{{(d_{i} - R_{i} )}}{\sqrt 2 }} \right)} \right],} \right. \\ & \quad \quad \hbox{min} \left[ {\hbox{min} (x_{i} + (d_{i} + R_{i} )),\hbox{max} \left( {x_{i} - \frac{{(d_{i} - R_{i} )}}{\sqrt 2 }} \right)} \right], \\ & \quad \quad \hbox{max} \left[ {\hbox{max} (y_{i} - (d_{i} + R_{i} )),\hbox{min} \left( {y_{i} + \frac{{(d_{i} - R_{i} )}}{\sqrt 2 }} \right)} \right], \\ & \quad \quad \left. {\hbox{min} \left[ {\hbox{min} (y_{i} + (d_{i} + R_{i} )),\hbox{max} \left( {y_{i} - \frac{{(d_{i} - R_{i} )}}{\sqrt 2 }} \right)} \right]} \right\}. \\ \end{aligned}$$

where \(i = A,B,C\). The coordinates of the four vertices of the region can be obtained by using the boundary of the rectangular region KMNJ, and the position of node D can be obtained by Eq. (1).

3.3 Three-dimensional localization algorithm

The underwater nodes not only have x-axis and y-axis coordinates but also have z-axis coordinates, which is a three-dimension localization problem. In this paper, a Mobility-constrained Beacon based localization algorithm in three-dimension (MCB-3D) is designed based on MCB-2D.

In a three-dimensional space, at least 4 different beacons are needed to get the target node position. This paper uses three mobile constrained beacon nodes A, B, and C at sea level to get the location of node D, as shown in Fig. 5. The underwater node can get z-axis coordinates with the pressure sensor. The distance between nodes could be obtained by TDOA method which is the same as the two-dimension algorithm. Since the x-axis and y-axis coordinates of the mobile-limited beacon nodes A, B, and C change within a certain range, the coordinates of the x-axis and y-axis of the node D are also uncertain. In order to obtain the coordinates of the x-axis and y-axis of the node D, this paper maps the three-dimensional space to the two-dimensional space.

Fig. 5
figure 5

Localization schematic in 3D

From node D, does a vertical line to the plane where the mobility-constrained beacons A, B, and C reside respectively, the foot is S, the length of each vertical line is,

$$d_{AS} = \sqrt {d_{AD}^{2} - d_{SD}^{2} }$$
$$d_{BS} = \sqrt {d_{BD}^{2} - d_{SD}^{2} }$$
$$d_{CS} = \sqrt {d_{CD}^{2} - d_{SD}^{2} }$$

where \(d_{SD}\) is the vertical distance from node D to sea surface.

Next, we get the active area (KMJN) of point S by MCB-2D, according to the coordinates of the mobility-constrained beacon nodes A, B, C and the length of each vertical line \(d_{\text{AS}}\), \(d_{\text{BS}}\),\(d_{\text{CS}}\), as shown in Fig. 4. Similar to the 2D localization algorithm, we convert this area into a rectangular area KMJN, taking its centroid as the coordinates \((x_{S} ,y_{S} )\) of the point S at the sea surface. Since point S is the foot of node D to the sea surface, the x-axis and y-axis coordinates of the two points are the same, \(x_{D} = x_{S}\), \(y_{D} = y_{S}\), so that the coordinates \((x_{\text{D}} ,y_{\text{D}} )\) of the node D is obtained.

4 Simulation analyses

In this section, we conducted experiment analysis of two-dimensional and three-dimensional localization algorithms. In the 2D experiment, we analyzed the environment conditions in the ocean and used wireless nodes to simulate the possible node movement in the sea and compared them with Trilateration localization algorithm (TL). In the 3D experiment, we simulated the localization process of underwater nodes in the ocean environment by simulation software Matlab and compared it with TP-TSFLA algorithm [36] and SLA algorithm [37]. Experiment and simulation results show that the algorithm is superior to the above three localization algorithms.

4.1 MCB-2D algorithm simulation experiment

Two-dimensional localization algorithm is mainly applied to the sea surface and can use wireless communication. We use the existing experiment equipment to simulate the movement rules of the sea nodes on the land and conduct an experiment analysis of the algorithm.

First, we selected 3 beacon nodes and 10 unknown nodes. Secondly, we set the moving radius of the beacon node is 10 cm and the moving range is a circle, the deployment of nodes and beacons is shown in Fig. 6. Ten unknown nodes are randomly distributed around the three beacon nodes. The unknown node number is 1–10. The beacon node 1 is marked by “x”, the beacon node 2 is marked by “*”, the beacon node 3 is marked by “o”. We use two-dimensional sea surface distance measurement method (such as TDOA) to measure the distance between the beacon node and the unknown node.

Fig. 6
figure 6

Deployment of nodes and beacons

Thirdly, we change the radius of three beacon nodes simultaneously to simulate the effect of beacon activity radius on localization, and get four sets of experiment errors, as shown in Fig. 7(a). The three beacon radii are 10, 8, 5 and 3 respectively. We can see that when the radius of three beacon nodes change at the same time, the error variation obtained by using the proposed algorithm is very stable and almost does not change with the radius. This is because the accuracy of the algorithm is related to the size of the rectangular region KMJN, but the rectangular region KMJN is affected not only by the moving radius R of the beacon but also by the distance d between the beacon node and the unknown node, and by the distance and orientation between the beacon nodes. When the moving radius of the beacon node changes, the distance d between the beacon node and the unknown node will change, the distance and orientation between the beacon nodes will change too.

Fig. 7
figure 7

MCB-2D localization error

Next, we rotated the three beacons clockwise with the same radius, all 10 cm, to simulate the position of the beacons on the sea surface moved with the waves. We set the initial states to 0 degree. Then we simultaneously clockwise rotate the three beacons 90°, 180°, and 270° and compare them with 0 degree. The errors are shown in Fig. 7(b). We can see that the error is also quite stable.

In addition, we can see the error of unknown nodes 1, 3, 9 is smaller than other nodes from Fig. 7. This is because in the node localization process, the deployment position of the node is an important factor that affects the localization accuracy. As mentioned above, after the MCB-2D algorithm is transformed by the model, a rectangular area KMJN is eventually formed, and the unknown node will be in this area, as shown in Fig. 4. When we use the centroid algorithm to calculate the coordinates of an unknown node, if the unknown node happens to be near the center of the rectangular area KMJN, the error is minimal, such as nodes 1, 3, and 9, and vice versa.

As can be seen from Fig. 3, the unknown node is in the ring region of d + R and d − R. Although the activity range R of the beacon node is known, the distance d between the unknown node and the beacon node is unknown, and the area JMKN is not only affected by d, but also by the distance between the three beacon nodes and influence of position. Therefore, we cannot determine whether the unknown node will be near the center of the handover area JMKN before deployment, and the error is unavoidable. Even so, compared with other algorithms, it can still be seen that this algorithm is superior to other localization algorithms.

We took the experiment data into Trilateration Localization (TL) algorithm and compared the errors with MCB-2D. Figure 8 is the error comparison result of MCB-2D algorithm and TL algorithm. As can be seen, the average localization error and maximum localization error of MCB-2D algorithm are much smaller than those of TL algorithm. This is because the model of MCB-2D algorithm places the unknown node in a circular intersecting area, as shown in Fig. 3, so that the possible area where the unknown node is located is greatly reduced, and the accuracy is naturally improved.

Fig. 8
figure 8

Localization error comparison in 3D

4.2 MCB-3D algorithm simulation experiment

In the three-dimensional simulation experiment, due to the limitations of experiment equipments and conditions, it is difficult to do experiments on the OCEANSENSE test platform. Therefore, we use the Matlab simulation to analyze the performance of the algorithm. In the simulation experiment, we randomly generated 20 unknown nodes and placed the nodes in the area of 100 m * 100 m * 30 m, at the same time, we randomly generated 3 beacon nodes to locate the 20 unknown nodes. We use the TDOA method to obtain the distance between the beacon node and the unknown node. Among them, the time interval for sending information is 0.1 s. We set the seawater temperature and salinity to 15 °C and 35‰, respectively, and the communication radius is 150 m. The propagation speed of underwater acoustic waves is listed according to the underwater channel:

$${\text{c}} = 1449.30 + 4.6T - 0.055T^{2} + 0.00029T^{3} + \left( {1.34 - 0.01T} \right) \times \left( {S - 35} \right) + 0.16P$$

T represents the temperature, S represents the salinity, and P represents the pressure at the depth of the node.

We made simulation experiments on MCB-3D algorithm, TP-TSFLA algorithm and SLA algorithm, and obtained the node distribution of these three algorithms, as shown in Fig. 9. We compare the errors of these three algorithms, as shown in Fig. 10.

Fig. 9
figure 9

Node localization result

Fig. 10
figure 10

Node localization error comparison in 3D

The TP-TSFLA algorithm has two stages. The first stage is based on the particle swarm algorithm to obtain the coordinates of the unknown node. The second stage is based on the circle distance-independent localization algorithm to locate the unknown nodes that cannot be located in the first stage. The TP-TSFLA algorithm and the MCB-3D algorithm have a great similarity, that is, all beacon nodes could move.

The SLA algorithm first calculates the position of the unknown node in the overlapping area of the three beacon nodes, and then uses an iterative algorithm to extend the handover area to the surrounding area to calculate the coordinates of other unknown nodes.

In the MCB-3D algorithm simulation experiment, we compare the original position of the randomly selected underwater nodes with the position calculated by the algorithm, as shown in Fig. 9. The “*” is the original position of the underwater node, the blue circle is the node position of the MCB-3D algorithm, and the blue triangle and the yellow square are the node positions calculated by TP-TSFLA algorithm and SLA algorithm, respectively. From Fig. 9, we can see clearly that the position of the node obtained by MCB-3D algorithm is closer to the original node.

Figure 10 shows the node localization error comparison results of MCB-3D algorithm, TP-TSFLA algorithm, and SLA algorithm. The localization average error and the maximum error of MCB-3D algorithm are smaller than those of TP-TSFLA algorithm and SLA algorithm. This is because the model of the MCB-3D algorithm is to place the unknown node in the annular area where the three beacon nodes intersect, as shown in Fig. 3, so that the possible area where the unknown node is located is greatly reduced, and the accuracy is naturally improved.

In order to detect the error of MCB-3D at high density, we randomly deploy 500 nodes in a certain area. The depth of these nodes is 0 to 30 m from the sea surface. Figure 11 shows the CDF of node localization errors computed by MCB-3D, TP-TSFLA, and SLA algorithms in the same ocean environment. The node error of MCB-3D algorithm is smaller than that of TP-TSFLA algorithm and SLA algorithm. When CDF is 0.6, the node localization error of TP-TSFLA algorithm is greater than 5.5 m, the node localization error of SLA is greater than 7 m, while the node localization error of MCB-3D algorithm is only about 3.5 m.

Fig. 11
figure 11

CDF of MCB-3D, TP-TSFLA, and SLA algorithm

It can be seen from the experiments that the localization error of the proposed algorithm is smaller and the stability is better in the same ocean environment

5 Conclusions

In summary, the node localization algorithm of the underwater sensor network proposed in this paper is a node location algorithm based on mobile limited beacons, including two-dimensional localization algorithm MCB-2D and three-dimensional localization algorithm MCB-3D. The algorithm not necessary to know the exactly location of beacon node, the unknown node can be located by the geometric relationship between the position of the anchor and the moving radius of the beacon node. In addition, the polygonal area obtained by the geometric relationship between node positions is converted into a rectangular area, and the three-dimensional space is mapped to two-dimensional space, which simplifies the calculation process and improves the localization efficiency. Moreover, the algorithm places the unknown node at the junction of the mobile areas of the beacon node, reducing the possible area of the unknown node and improving the localization accuracy, and the algorithm greatly reduces the cost of investment and external environment impact. Simulation results show that the proposed algorithm is superior to other UWSN localization algorithms in accuracy and practicality.

In the future, we will improve the precision of the algorithm in different ocean condition, so that it can be better applied to the practical underwater wireless sensor networks. And we will make practical experiment when the equipment conditions are available.