1. Introduction
Underwater Sensor Networks (UWSNs) are usually composed of some autonomous and individual sensor nodes [
1], which can sense data, perform intelligent computations, and forward information. Sensor nodes are spatially distributed in UWSNs with some sensing work to obtain waterrelated properties such as mass, temperature and pressure data [
2]. UWSNs usually arrange many sensor nodes to monitor the underwater environment. Those sensor nodes exchange the node location information and other data through the underwater acoustic communication. Moreover, UWSNs can be applied to many areas such as disaster early warning, pollutant control, marine resource exploration and maritime military activity.
The location information of the sensor nodes in UWSNs is necessary to provide users with an efficient testing service. Therefore, underwater sensor node positioning can be regarded as the foundation and core for UWSNs. How to accurately estimate the position of the underwater node in UWSNs is of great research significance. Many researchers have studied the topic of sensor localization. In an outdoor environment, GPSbased positioning systems are mostly used and have a good performance. In an indoor environment, RFbased and VLCbased positioning systems have attracted many researchers. However, it is unfeasible to apply any of them to UWSNs. Only RF signals at low frequencies of about 30–300 Hz can be used in UWSNs, moreover, large antennas or high transmission power is needed [
3]. Optical signals are also subject to underwater attenuation and scattering [
4]. Fortunately, the frequency of sound waves is small between 10 Hz and 1 MHz [
1], which can provide small bandwidth but long wavelengths. Therefore acoustics can be used to relay information over kilometers [
5].
Underwater localization usually requires some objects with known locations (anchors) and objects to be localized (unknown nodes) [
6]. The location information of anchors can be obtained through a variety of methods. In [
7], the authors divided the localization scheme of UWSNs into two phases, namely the positionrelated information collection phase and the position estimation phase. In the first phase, positionrelated information such as the distance, angle, and hop count between each other or the anchor point is measured by the node. In the second phase, the localization algorithms are performed by the sink nodes or locally calculated by them. Conventional localization algorithms use the distance or angle measurements between the anchor and the unknown nodes to estimate the location of unknown nodes. Some positioning schemes do not require an anchor node and use the connection information to obtain the location of unknown nodes [
8,
9]. The deployment of UWSNs is still a challenging task because of the limitations of computing power, cost, memory, transmission range and the lifetime of any single sensor [
1]. A large number of anchor nodes can provide greater coverage and higher accuracy but may add cost. Therefore, how to decrease the number of anchor nodes or to achieve anchorfree localization is still an active research direction. Moreover, the battery resources are limited which shortens the operation time. Thus, an effective strategy must guarantee the system performance with low energy consumption.
Time synchronization is directly assumed in many localization schemes. However, it is not feasible in the UWSNs. In [
10], the authors show that precise time synchronization is hard to achieve due to the characteristics of sound. In UWSNs, the propagation delay is much higher due to the fiveordersofmagnitude difference in the speed of sound in water compared with RF propagation: 1500 m/s compared with
$3\times {10}^{8}$ m/s. Therefore the high propagation delay of UWSNs will bring time synchronization problems. Many time synchronization localization algorithms rely on some form of clock synchronization, either by ensuring that the transmitterreceiver is synchronized with the twoway message or by assuming that surface “anchor” nodes which can synchronize their clocks and disseminate or collect information to or from other nodes [
11]. However, that method will bring new challenges in terms of overhead and communications management, and often assumes very low data rate communications. Therefore how to develop a synchronizationfree algorithm is a direction to solve this problem.
In this paper, basing on Time SynchronizationFree Localization using mobile beacons (we called it as TSFL) [
12], we propose the TwoPhase Time SynchronizationFree Algorithm (TPTSFLA). TPTSFLA can be divided into two phases, namely, a rangebased estimation phase (Phase I) and rangefree evaluation phase (Phase II). In Phase I, we use the TSFL algorithm to obtain the distance measurements from the anchor node to the unknown sensor nodes, then we employ the PSO algorithm to solve the localization optimization problem. In Phase II, we propose a rangefree algorithm to locate the unlocalized sensor nodes. Only sensor nodes which cannot be localized in Phase I will execute Phase II. In Phase II, the localized sensor nodes act as the new anchor nodes to help realize localization. The unlocalized sensor node actively initiates a localization request, then the localized sensor nodes within the transmission range of the unlocalized sensor node can receive the request and respond their coordinate to the unlocalized node. Then the unlocalized sensor node starts a Circlebased RangeFree Localization Algorithm (CRFLA) to locate itself. Besides, a coordinate adjustment scheme is proposed to improve the precision of CRFLA. In our algorithm, we use the TSFL algorithm to obtain the distance measurements without time synchronization. In the TSFL algorithm, the distance is estimated by using the time interval between the first and second message received by the unknown sensor node from the same anchor node. Thus, the time synchronization between the sensor node and anchor node is unnecessary. Also, the synchronization among the unknown sensor nodes or the anchor nodes is unnecessary. It is obvious that the PSO algorithm and CRFLA do not have the requirement of time synchronization. Therefore, TPTSFLA we proposed in this paper without time synchronization can effectively solve the problem of time synchronization.
The remaining portion of this paper is organized as follows: in
Section 2, we survey localization algorithms according to their different natures. The system model is given in
Section 3. In
Section 4, we use the rangebased estimation algorithm based on the PSO algorithm to obtain the coordinates of the unknown sensor nodes. CRFLA and its coordinate adjustment scheme are presented in
Section 5 and
Section 6, respectively. The detailed algorithm application procedure is shown in
Section 7.
Section 8 shows the simulation results and comparison. Finally, we conclude in
Section 9.
2. Related Work
Recently, numerous localization algorithms have been put forward, and some researchers have done some surveys of localization algorithms [
13,
14]. In this section, we discuss the localization algorithms in UWSNs in five aspects, namely computation algorithms, anchor requirements, range measurements, synchronization requirements, and communication between nodes. We only discuss the differences in each aspect and use some references to describe them.
According to the computation algorithm to be implemented, we classify the computation algorithms into two categories: centralized techniques [
15] and distributed techniques [
16]. The centralized techniques perform the localization algorithm at the command center or the sink node. However, in the distributed techniques, the sensor nodes alone estimate the location of each sensor node. In [
17], a Reverse Localization Scheme (RLS) with a fast response to events is proposed. The scheme is based on the centralized technique. Thus, the data can be transmitted to the station, and the positioning algorithm is executed there. The scheme is divided into two phases, namely, a a transmitting phase and a centralized geometric localization phase. In the transmission phase, a new message exchange mechanism based on eventdriven reporting is proposed. At the beginning of the second phase, the sink collects information from the anchor and estimates the location of the sensor node. The authors of [
18] have reported a localization algorithm based on distributed technology. The authors mainly consider the problem of estimating the isolated unknown nodes and propose a Multihop Fitting Localization Approach (MFLA). The method sets the intermediate node between the beacon and the unknown node as a router to construct the path through the greedy method, and then fits the multihop path into a straight line and estimates it by trilateration.
The anchor requirement means the anchor node is required or not in the localization algorithm. According to this, we classify the localization algorithms into two taxonomies: anchorfree and anchorbased schemes. In UWSNs, many positioning algorithms can use anchor nodes to help estimate location. However anchor nodes are not necessary, and some researchers have proposed a selflocalization algorithm that does not need anchor nodes. The positioning scheme [
19] is an anchorbased scheme. This scheme consists of four types of nodes: surface buoys, Detachable Elevator Transceivers (DETs), anchor nodes and ordinary nodes. Besides, the scheme locates the nodes in two phases. First, the anchor node uses a rangebased distributed approach to locate itself. Secondly, ordinary nodes use the regional positioning scheme to achieve locationfree centralized approach. In [
20], an AnchorFree Location Algorithm (AFLA) for active restricted UWSNs is proposed. The algorithm uses the relationship between adjacent nodes. In this scenario, the underwater sensor node which is actively limited means that when anchored to the seafloor, it floats in the sea and moves within the hemispherical region. A node with unknown location broadcasts a message and receives the information from other nodes at the same time. When the node receives two messages from two different nodes, it starts the location calculation process.
Based on the range measurement, we classify the localization algorithms into two categories: rangebased schemes, and rangefree schemes. In general, rangebased schemes estimate distances by various algorithms and then convert them into positional information. A rangefree scheme does not require distance measurementa and bearing information, but uses a local topology and the position of the neighboring anchor nodes to obtain the position estimate. However, the rangefree scheme can only get a rough location with little accuracy. The positioning method of [
20] is a rangebased approach and is known as the multistage AUVassisted positioning scheme that is an improvement of the “multistage DNR” scheme. In [
16], the DNR is replaced by an AUV. The AUV with known coordinates dives to a preprogrammed depth and begins to traverse the sensor network according to a preprogrammed path. When a noncollinear position receives signals from three beacons, triangulation is used to obtain the position of the node. In [
21], the authors propose an efficient Area Localization Scheme (ALS). The scheme estimates the position of the sensor within a particular region. An anchor node broadcasts a beacon signal to a sensor node and sends an acoustic signal with a varying power level. The sensor nodes passively monitor the signals and record the received information, then forward it to the sink. The sink uses the information gathered from sensor nodes to estimate the area in which the sensor is localized.
The synchronization requirement means that time synchronization is required or not in the localization algorithm. Based on this, we classify the localization algorithms into two categories: synchronization localization schemes and the synchronizationfree localization schemes. In many cases, the localization scheme directly assumes that sensor nodes are synchronized with each other. However, this is difficult to implement in underwater environments, thus the researchers have proposed some localization algorithms without synchronization requirements. The localization scheme of [
22] requires time synchronization, but dual hydrophones on each node can reduce the time synchronization requirement. In [
22], a Dual Hydrophone Localization (DHL) approach is proposed, and the localization problem is converted into a halfplane intersection problem. As for the synchronizationfree positioning scheme, we introduce three papers to show it. In [
23,
24], a rangefree scheme using AUV periodically broadcasts message blocks via four directional beams to estimate the location information of sensor nodes. The node receives the message block and uses two different continuous beams to estimate the position of the AUV at two different moments. The location of the nodes can then be obtained by using the two estimated locations. In [
25], a Basic SynchronizationFree Localization (BSFL) scheme is proposed. It consists of two steps, namely the range difference calculation, and the position calculation. However, the BSFL still suffers from some of the drawbacks of largescale UWSNs. Therefore, a LargeScale Localization Scheme (LSLS) based on BSFL is designed. It consists of three phases, namely sea surface anchoring, iterative localization and complementary phase.
Based on the communication characteristics between the reference node and the common node, we classify the UWSNs localization algorithm into two classes: single stage methods [
26,
27] and multistage methods [
28,
29,
30]. The single stage method means that the exchange of messages between all sensor nodes and the reference nodes is straightforward. After obtaining the location, they are still passive and cannot be used to help locate other sensor nodes [
31]. In the multistage scheme, the common nodes do not need to communicate directly with the reference nodes. Once sensor nodes are localized, they become new reference nodes and can help to locate other sensor nodes [
31]. The positioning scheme of [
32] is based on the singlestage method. The authors use hyperbolic methods and normal distribution estimation error modeling and calibration for location estimation. The positioning scheme [
33] is based on a multilevel localization scheme. The Topdown Positioning Scheme (TPS) for UWSNs without evenly distributed anchor nodes or additional infrastructures can increase location coverage while maintaining low positioning errors. In this scheme, there are three types of nodes, namely surface anchor nodes, new reference nodes, and nonlocalized nodes. First, only sensor nodes that are close to the surface anchor nodes can be localized. Once the positions of sensor nodes are obtained, they compute their confidence values and compare them to the confidence thresholds. If the nodes’ confidence values are greater than the confidence thresholds, they become new reference nodes to help the nonlocalization nodes locate themselves.
Next, we compare the TPTSFLA we proposed in this paper (we use the term “our” to express it in
Table 1) and those algorithms which are mentioned in
Section 2 in the five aspects (computation algorithm, anchor requirement, range measurement, synchronization requirement, and communication between nodes). The detailed comparison is shown in
Table 1.
4. RangeBased Estimation Algorithm Using PSO
In this section, we employ the Particle Swarm Optimization (PSO) algorithm to obtain the estimated position of the unknown sensor nodes. To solve a variety of optimization problems, many optimization algorithms have been proposed, such as climbing method, genetic algorithm and so on. The hill climbing method has high precision, but it easily falls into a local minimum. The genetic algorithm belongs to the evolutionary algorithm class. However, the genetic algorithm requires more sophisticated programming, and the choice of the parameters severely affects the quality of the solution, and most of these parameters depend on experience. The PSO algorithm, with smooth implementation, high precision, and fast convergence is similar to a genetic algorithm, and it also starts from a random solution. The PSO algorithm iteratively finds the optimal solution and evaluates the quality of the solution through fitness, but it is simpler than the genetic algorithm. It does not have the “cross” (crossover) and “mutation”. The global optimum is sought by following the current search to the optimal value.
Basing on the TSFL algorithm, after at least three distance measures
${d}_{i}$ from different mobile beacons
$\left({x}_{i},{y}_{i},{z}_{i}\right)$ have been obtained, the authors of [
12] estimate the position of the sensor node
$\left(x,y,z\right)$ by using the following equation:
where:
and:
However, this kind of method to obtain the coordinate of the unknown sensor node is not suitable for our algorithm. When we take the impact on changing speed for the mobile beacon and for the sound through the water, the localization problem becomes a multidimensional nonlinear optimization problem, and we employ the PSO algorithm to solve it. The detailed mathematical derivation is shown as follows.
The distance between unknown sensor node
$\left(x,y,z\right)$ and the anchor node
$\left({x}_{i},{y}_{i},{z}_{i}\right)$ expressed as
${r}_{i}$ is given as:
Let
${\widehat{r}}_{i}$ be the noisy range value of
${r}_{i}$. Actually, in this paper, the value of
${\widehat{r}}_{i}$ is the distance measure
${d}_{i}$ which is obtained by using the TSFL algorithm. Then:
where
${n}_{i}$ is the measured noise.
Assume that the estimated location of the unknown sensor nodes is
$x$, and the location of the anchor node is
$p$, then the estimated location of the unknown sensor nodes
$x$ is given by:
where
$\left\right{p}_{i}x\left\right$ represents the Euclidean distance between
${p}_{i}$ and
$x$.
$N$ is the number of anchor nodes which can be received by the sensor node. Thus, the localization is a multidimensional nonlinear optimization problem which can only be solved by using an iterative approach [
34]. Equation (9) involves a nonconvex objective function (with a Hessian matrix not positive definite). Therefore, the result of using the L2 optimization methods is not generally optimal. To solve this problem with low computational cost, we employ the PSO algorithm. Besides, the PSO algorithm can ensure high accuracy.
4.1. Search Space of Particles
The transmission range of anchor node
$\left({x}_{i},{y}_{i},{z}_{i}\right)$ is
R. In [
35], the authors use the circumscribed square of side length R as the search space of particles. Then:
where
${S}_{i}$ is the search space of the particles. If the unknown sensor node has
$N$ anchor nodes, the search space of the particles can be expressed as:
Actually, the transmission range of an anchor node is a circle of the radius
R, thus we redesign the search space of particles. The search space of an anchor node
${S}_{i}$ is a circle of the radius
R and circle center
$\left({x}_{i},{y}_{i}\right)$, moreover,
${S}_{i}$ can be expressed as follows:
In our algorithm, at least three anchor nodes are needed to obtain the coordinate of the unknown sensor node. Therefore, the search space of the particles
$S$ is given as:
Hence, we initialize a group of random particles (random candidate solution) in the search space of the particles
$S$. Then the PSO algorithm iteratively finds the optimal solution. In each iteration, the particle updates itself by tracking two extreme values. One of the extreme values is the optimal solution found by the particle itself, and the solution is called the individual extreme (pBest). The other is the optimal solution found by the whole population. The extreme value is the global extreme value (gBest). When these two optimal values are found, the particle updates its speed and new position according to the following equation:
where
$v[]$ is the speed of the particle,
$w$ is the inertia weight,
$present[]$ is the current position of the particle,
$pbest[]$ is the individual extreme value,
$gbest\left[\right]$ is the global extreme value, and
$rand()$ is the random number between (0, 1).
${c}_{1}$ and
${c}_{2}$ are the learning factors.
4.2. Inertia Weight
In general, the inertia weight can be fixed or linear decrease. Moreover, some studies have shown that bigger inertia weight contributes global search, while smaller inertia weight contributes local search [
36]. In [
36], the authors use the following equation to express the inertia weight:
where,
${\omega}_{\mathrm{max}}$ is the initial weight,
${\omega}_{\mathrm{min}}$ is the final weight,
${k}_{\mathrm{max}}$ is the maximum number of iterations, and
$k$ is the current iteration. In this paper, we use the same parameters as [
36].
4.3. Learning Factor
The learning factor can be a constant or variable. In [
36], the authors give formulas for
${c}_{1}$ and
${c}_{2}$, respectively:
where
${k}_{\mathrm{max}}$ is the maximum number of iterations, and
$k$ is the current iteration.
The design of the learning factor based on that global search does not easily fall into local optimum at the beginning of the search. Thus, in earlier search, ${c}_{1}$ with a larger value, and ${c}_{2}$ with a smaller value will enhance the global search capability of the PSO algorithm. In the latter part of the search, ${c}_{1}$ with a smaller value and ${c}_{2}$ with a larger value will enhance the local search capabilities of the PSO algorithm.
4.4. Fitness Function
The distance measure of the unknown sensor node
$\left(x,y,z\right)$ from the anchor node
$\left({x}_{i},{y}_{i},{z}_{i}\right)$ is
${d}_{i}$. The coordinate of the particle is
$\left({x}_{j},{y}_{j},{z}_{j}\right)$, and the number of anchor node is N, and the fitness function can be described as:
If the fitness function tends to be 0, the estimated coordinate tends to be the coordinate of the unlocalized sensor node. After the maximum number of loops is reached, the current global extreme value will be chosen as the coordinate of the sensor node.
5. CRFLA
Generally, the number of the anchor nodes is limited when we take the cost of the system into account. Actually, in our simulation environment, the number of mobile beacons is 25, while the number of unknown sensor nodes is 800. Although the anchor nodes have a large transmission range, there still are some unknown sensor nodes which cannot receive at least three pieces of information from different anchor nodes. Therefore, after Phase I, some sensor nodes may not obtain the location information. Then those sensor nodes execute Phase II to locate themselves. In Phase II, the environment is different from Phase I. In Phase I, the mobile beacon acts as the anchor node, and the number of mobile beacons is small. However, in Phase II, the localized node serves as the new anchor node, and the number is much more than the unlocalized sensor node. The unlocalized sensor node (UN) transmits the localization request, and the localized sensor node (LN) which is localized in the transmission range of UN (denoted as
$r$) can receive the request. The distance
${d}_{p}$ between UN and LN which is in the transmission range satisfies the inequation
${d}_{p}<r$. We draw a circle whose center is the localized sensor node
$({x}_{p},{y}_{p},{z}_{p})$ and which radius is
$r$, then the unlocalized sensor node must locate in the circular area. In the rangebase algorithm, we can use the point of intersection of those three circles as the estimated coordinate of the sensor node (EN), but in the rangefree algorithm, the three circles may not intersect at one point. Thus, we use the geometric center of the intersection area of the circles as the coordinate of the unlocalized sensor node (shown in
Figure 2). We can see that if the intersection area is small, the precision will be much higher. We can state that if the following two conditions are satisfied, the precision of the circlebased rangefree algorithm will be much higher.
Condition I: The distance ${d}_{p}$ between the unlocalized sensor node and the localized sensor node is infinite close to the transmission range $r$ of the unlocalized sensor node.
Condition II: The three localized sensor nodes locate in the different directions of the circle.
Here, we use the figure to show the counterexample of the two conditions. We assume
${d}_{p}<r/2$ to verify Condition I and show it in
Figure 3.
As shown in
Figure 3, if
${d}_{p}$ is much smaller than
$r$, the intersection area will increase. If the three intersection points are symmetrical, the geometric center of the intersection area is still near the unlocalized sensor node. However, all sensor nodes are randomly distributed in UWSNs, and the probability of the three localized sensor nodes being distributed symmetrically is very low. Hence, if the intersection area is small, even though the three localized sensor nodes are not symmetrical, the geometric center will not be far away from the unlocalized sensor node.
To satisfy Condition I as far as possible, we employ the fact that the signal strength decreases with the increase of distance. The unlocalized sensor node utilizes the response information from the localized sensor node which contains the coordinates of the localized sensor node and the signal strength to choose the three localized sensor nodes. Simply said, the unlocalized sensor node determines the three localized nodes which have the lowest signal strength. It means that the distance of the chosen three localized sensor nodes from the unlocalized sensor node is the largest in all localized sensor nodes which can receive the information from the unlocalized sensor node. Here, we do not obtain the distance from the signal strength but compare the value of the signal strength.
We suppose the following case that the three localized sensors satisfy Condition I but not satisfy Condition II, and show it in
Figure 4.
Three localized sensor nodes are far away from the unlocalized sensor node and
${d}_{p}$ is close to
$r$, but the three localized sensor nodes are in the same direction of the circle of the unlocalized sensor node. In
Figure 4, the intersection point is three, and the geometric center of the intersection area is far away from the unlocalized sensor node. It means that the localization error is larger.
To satisfy Condition II as far as possible, we employ the kmeans clustering algorithm. The clustering algorithm can ensure that the class distance is as small as possible, and the distance between classes as large as possible. In TPTSFLA, we cluster the localized node which locates in the transmission range of the unlocalized sensor node into four categories. The localized sensor node with the lowest signal strength in each category is chosen. It means that four localized sensor nodes with the lowest signal strength in four different categories are determined. Any three of the four localized sensor nodes are picked. We use the localized sensor node as the circle center and $r$ as the radius to draw the circle. Hence, three circles can be obtained, and then calculate the geometric center of the intersection area of the three circles. Using the four localized sensor nodes, we can get four different groups of intersection area.
Then the average value of the four geometric centers of the four intersection areas is used as the coordinate of the unlocalized sensor node. The circlebased rangefree algorithm is shown in
Figure 5.
The red circle expresses the transmission range of the unlocalized sensor node. The other points within the red circle mean the localized sensor node which can receive the request of the unlocalized sensor node. Then employing the kmeans algorithm clusters those localized sensor nodes into four classes (using different shapes to express). In each class, the algorithm picks out the LN which is the lowest signal strength in its cluster (the distance between the localized sensor nodes and unlocalized sensor nodes is the largest). Three LNs draw three circles. The geometric center of the intersection area of the three circles can be obtained.
If LNs within the transmission range of UN satisfy the two conditions with a high possibility to ensure that the three circles are intersecting and the intersection area is relatively small. The relatively high precision can be guaranteed. Note that the intersection point can be three or two. We can describe CRFLA in Algorithm 1.
Algorithm 1: CRFLA 
Step 1: The unlocalized sensor node (UN) $(x,y,z)$ transmits the localization request. 
Step 2: The localized sensor nodes (LNs) which satisfy ${d}_{p}<r$ respond the information which contains the coordinate $({x}_{p},{y}_{p},{z}_{p})$ and signal strength $RSSIp$ to the UN. 
Step 3: The UN use the kmeans clustering algorithm to cluster the LNs into four classes ($c{c}_{i}$). 
Step 4: For each $cci$, choosing the LN with $\mathrm{min}(RSS{I}_{p})$, four LNs can be obtained as $LN1,LN2,LN3,LN4$. 
Step 5: Picking three LNs from $LN1,LN2,LN3,and\text{}LN4$ to draw three circles, the cases contain $\left(LN1,LN2,LN3\right)$, $\left(LN1,LN2,LN4\right)$, $\left(LN1,LN3,LN4\right)$ and $\left(LN2,LN3,LN4\right)$, four geometric centers of the intersection area can be obtained expressed as $\left({x}_{123},{y}_{123}\right)$, $\left({x}_{124},{y}_{124}\right)$, $\left({x}_{134},{y}_{134}\right)$, and $\left({x}_{234},{y}_{234}\right)$. 
Step 6: Calculate the average value of $\left({x}_{123},{y}_{123}\right)$,$\left({x}_{124},{y}_{124}\right)$, $\left({x}_{134},{y}_{134}\right)$, $\left({x}_{234},{y}_{234}\right)$ as the coordinate of the UN.

6. The Extension of CRFLA
Based on CRFLA, we can get an estimation of the unlocalized sensor node’s position. However, the precision is rough. Thus, we try to increase the accuracy of CRFLA by studying the relative relationship between the original coordinates of the unlocalized sensor node, estimation coordinates, and the coordinates of the localized sensor nodes. Considering several of the geometric position relationships of the three coordinates, two cases are shown, as follows: in
Figure 6, LN expresses the localized sensor node, and UN expresses the unlocalized sensor node, and EN expresses the estimated coordinate of the unlocalized sensor node.
Connecting three LN points constitute a triangle. From
Figure 6, we can see that EN is far away from UN and close to LN2. Hence, we approximate that EN is in the direction of LN2 away from UN.
Figure 6 shows the case that LN2 is above UN and EN.
The case that LN2 is below EN and UN is shown in
Figure 7. Similarly, we can approximate that EN is in the direction of LN2 away from UN. Next, we should try to find out why the point is not LN1 or LN3 but LN2. Through observation, we find the angle α is the largest angle in the triangle. We test some cases and from those tests, it is true that it is a high possibility that EN is in the direction of LN2 away from UN. Hence, LN2 corresponds to the point that the angle of it is the largest angle in the triangle. We transfer the largest angle to the longest opposite edge. It means that the distance between LN1 and LN3 is the largest. We will use the MATLAB simulation to demonstrate it. Next, we give the mathematical model of the extension of CRFLA.
The coordinate of UN is
$(x,y,z)$, and the coordinate of LN2 is
$({x}_{2},{y}_{2},{z}_{2})$, and the coordinate of EN is
$(\widehat{x},\widehat{y},\widehat{z})$. If we want
$(\widehat{x},\widehat{y},\widehat{z})$ is close to
$(x,y,z)$, we should adjust the coordinate
$(\widehat{x},\widehat{y},\widehat{z})$ in the opposite direction of the movement of EN where EN is in the direction of LN2 away from UN. Because the zcoordinate can be obtained from the pressure sensor equipped on the unlocalized sensor node, we just discuss the adjustment of the xcoordinate and ycoordinate. The final coordinate of the unlocalized sensor node can be formulated as follows.
The extension of CRFLA adjusts the estimated coordinates in two steps:
The determination of the variables
${a}_{1}$ and
${b}_{1}$ is hard. The value of variables
${a}_{1}$ and
${b}_{1}$ will seriously affect the precision of the location. Unfortunately, we still cannot find an excellent method to determine the value of variables
${a}_{1}$ and
${b}_{1}$. We first assume a kind of relationship between the variables
${a}_{1}$,
${b}_{1}$ and the distance between the side lengths of the triangle drawn by using the localized sensor node. Then we use a significant number of MATLAB simulations to change the parameters to observe the precision changes. In this paper, we use the parameters as follows:
We will show the comparison of the different parameters using a MATLAB simulation.
7. TPTSFLA Procedure
The TPTSFLA proposed in this paper contains two phases. In Phase I, the mobile beacon is employed as the anchor to realize the time synchronizationfree localization of sensor nodes. If the sensor node cannot obtain its coordinates in Phase I, it goes into Phase II and uses CRFLA to locate the unlocalized sensor nodes. Hence, for each phase, there are two steps. The detailed algorithm can be described as follows:
Phase I: Rangebased estimation phase
Step 1: The sensor node uses the TSFL algorithm to obtain the distance measure $d$ from the mobile beacon to the sensor nodes. In this step, sensor nodes passively listen to the messages of the mobile beacon. Then using those messages received from the mobile beacons, the sensor node can measure the distance from the mobile beacon. If at least three distance measures are obtained, sensor node records those distance measures and goes into Step 2.
Step 2: Every sensor node which has obtained at least three distance measures through Step 1 use the PSO algorithm to obtain the estimated position.
Phase II: Rangefree evaluation phase
Step 3: Sensor nodes which cannot obtain their position through Phase I actively launch the localization request. The localized sensor nodes within the transmission range of the unlocalized sensor node receive the request and respond their coordinates to the sensor node. Then the unlocalized sensor node uses CRFLA to obtain its coordinates.
Step 4: Sensor nodes adjust the estimated coordinate to improve the precision of the rangefree method, and the final estimated location is taken as the coordinate of the unlocalized sensor node.
The block diagram of TPTSFLA is shown in
Figure 8.
Table 2 gives all the mathematical notation and symbols definitions used in Algorithm 2.
The detailed stepwise procedure for TPTSFLA is shown in the following Algorithm 2.
Algorithm 2: TPTSFLA 
Phase I: 
Step 1: TSFL 
1: Each sensor node $i$ initialize data: ${z}_{3}=depth$, ${M}_{ii}$ = 0, $Lo{c}_{i}$ = 0, ${D}_{i}$ = 0 
2: Sensor node receives the beacons and records the beacon id $j$, ${M}_{j}$ = ${M}_{j}$ + 1 
3: if ${M}_{j}$ ≥ 2, sensor node uses TSFL algorithm to compute the distance measure ${d}_{i}$, records ${D}_{i}$ = ${D}_{i}$ + 1 
4: end if 
Step 2: The PSO algorithm 
5: if ${D}_{i}\ge 3$ 
6: Initialize the parameter of PSO, and produce initial particles $jj$ and velocities, and compute ${f}_{jj}$, then set $Maxgen$ 
7: while the $Maxgen$ is not achieved do 
8: Update the velocity, particle population, and ${f}_{jj}$ 
9: Update the population optimal $gbest$ 
10: end while 
11: $coordinat{e}_{i}$ = $gbest$, sensor node records $Lo{c}_{i}$ = 1 
12: end if 
Phase II: 
Step 3: Circle based rangefree localization 
13: if $Lo{c}_{i}$ = 0 
14: $coordinate\_initia{l}_{i}$ = Algorithm I 
15: $Lo{c}_{i}$ = 1 
Step 4: Sensor nodes adjust the estimated coordinates to improve the precision 
16: Compute the parameter ${a}_{1}=\sqrt{\left{x}_{1}\widehat{x}\right}$, ${b}_{1}=\sqrt{\left{y}_{2}\widehat{y}\right}$ 
17: Adjust the xcoordinate and ycoordinate: $x=\widehat{x}\pm {a}_{1}$, $y=\widehat{y}\pm {b}_{1}$ 
18: $coordinat{e}_{i}=(x,y,{z}_{3})$ 
19: end if 
8. Discussion
In this section, we use a MATLAB simulation to evaluate the performance of TPTSFLA. The simulation environment is 600 m × 600 m × 500 m. In order to sense the data of the whole simulation environment, we use 800 sensor nodes (the transmission range of sensor nodes is tens of meters) in UWSNs. All sensor nodes are regarded as stationary. Considering the size of the simulation environment, balancing the localization ratio and cost, we use 25 mobile beacons in this environment. The following parameters are the same as [
12]. The speed of sound is set to 1500 m/s, and the rate of the mobile beacon is 1 m/s. The beacon interval varies from the 30 s to 100 s, and the transmission range varies from 150 m to 250 m.
In [
12], the authors do not show the localization precision of their algorithm. The effect of the underwater environment is not taken into account. Here we consider the factors which may lead to the distance measurement error. Thus, we employ the PSO algorithm to obtain the coordinate of the unknown sensor nodes. The maximum number of iterations
${k}_{\mathrm{max}}$ is 200, the search space of the particle is the union set of the several circles whose center is the mobile beacon and the radius is the transmission range
$R$. Because the transmission range
$R$ is large, thus the search space is relatively large. Thus, particle number has a big impact on average localization error of the algorithm. Here the particle number varies from 100 to 1000. And we design the experiment to compare the localization time and the average localization error at different particle number. The inertia weight can be obtained by using the Equation (16). In our experiment simulation,
${\omega}_{\mathrm{max}}=0.9,\text{}{\omega}_{\mathrm{min}}=0.4$.
${c}_{1}$ and
${c}_{2}$ can be calculated by Equations (17) and (18), and
${k}_{\mathrm{max}}=200$. First, we fix the number of particles at 600, and the localization error of the sensor nodes by using the rangebased estimation algorithm is shown in
Figure 9. The average positioning error of the rangebased estimation algorithm of using PSO by the MATLAB simulation is 0.7123 m. Note that we use 800 sensor nodes in this simulation, but in
Figure 9 only about 650 sensor nodes are shown. It is because that some sensor nodes cannot obtain the position information only through Phase I. The localization ratio of the rangebased estimation algorithm of using PSO is about 82.13%.
Meanwhile, we discuss the effect of the particle number on the localization error when the sensor node uses the rangebased estimation algorithm of using PSO to realize localization. Here we make the assumption that the particle number varies from 100 to 1000. Due to the large search space, the right choice of the particle number will decrease the average localization error. Moreover, the more particles mean the longer positioning time. In this simulation, we record the ratio of the localization time
$T{r}_{i}=\frac{{T}_{i}}{{T}_{100}}$.
${T}_{i}$ is the localization time when particle number is
$i(i=100,200,300,...,1000)$. When the particle number varies from 100 to 1000, the average localization error and the ratio of the localization time of the rangebased estimation algorithm of using PSO is shown in
Figure 10 and
Figure 11, respectively. From
Figure 10, we can see the average localization error is larger when the particle number is less than 600. While the particle number is more than 600, the increase of particle number does not significantly improve the positioning accuracy. From
Figure 11, we can see that the localization time increase greatly with the increase of particle number. Thus, it is not worth increasing the more particles to decrease the localization error when the particle number is more than 600. Even the average error localization will increase with the increase of the particle number when the particle number is more than 600. It may be caused by the PSO algorithm falling into a local optimum.
We study the effect of the beacon interval and transmission range on the localization ratio (defined as the number of localized sensor nodes). However, in [
12], the authors did not put out the simulation environment, just noting that sensor nodes are 250. In [
12], the authors show that the localization ratio is about 76% when the beacon interval is 100 s, while the localization ratio is about 90% when the beacon interval is 30 s. However, our simulation experiment (shown in
Figure 12) indicates that the localization ratio is about 57.75% when the beacon interval is 100 s, while the localization ratio is 82.13% when the beacon interval is 30 s. In [
12], when the transmission range is 150 m, the localization ratio is about 80%, while the transmission range is 250 m, the localization ratio is about 90%. However, our simulation experiment (shown in
Figure 13) indicates that the localization ratio is close to 0 when the transmission range is small than 180 m. Hence, the localization ratio is close to 82.13% when the transmission range is 250 m. The reason for it may be that our simulation environment is much larger than that used in [
12]. Meanwhile, the results show that when this method is utilized in the larger environment, the localization ratio may be not enough. Thus, we use CRFLA to improve the localization ratio. In the CRFLA, we use the beacon interval as 30 s and the transmission range as 250 m.
CRFLA is based on the assumption that the number of anchor nodes is relatively larger in the localizedtobe area. In TPTSFLA, only xcoordinate and ycoordinate of the sensor nodes are needed to obtain. Therefore, we project sensor nodes into the 2Dplane and study the 2Drelationship between sensor nodes. In
Figure 14, we use the red circle to express the sensor node, and the blue triangle to show the estimation location of the rangebased estimation algorithm of using PSO. We can see the red circle which is not surrounded by the blue triangle is the unlocalized sensor nodes. Hence, it is evident that the localized sensor nodes (new anchor nodes) are much more than the unlocalized sensor nodes. They locate in the different directions of the unlocalized sensor nodes. Thus, the prerequisites of CRFLA are established.
We then use the MATLAB simulation to estimate the positioning error of CRFLA. The results show that the average positioning error is about 6.7996 m. Compared with the rangebased localization algorithm (Phase I), the localization error is much larger. This is the shortcoming of the rangefree localization algorithms, but the rangefree localization is much simpler, and the power consumption is much lower. Besides, the rangefree localization does not need some unrealistic assumptions such as precise time synchronization, and fixed speed which may lead to the localization error. An extension of CRFLA is proposed by designing a coordinate adjustment scheme. The comparison of the localization error of the unlocalized sensor node in Phase II is shown in
Figure 15.
From
Figure 15, we can see most of the localization error of the extension of CRFLA is lower than CRFLA. The average positioning error using the extension of CRFLA is 3.5348 m. Besides, the extension of CRFLA may increase the localization error. But it is just a small part of it. Hence, to this extent, the coordinate adjustment scheme is useful. Compared with TSFL which those coordinates of unlocalized sensor node are unknown, TPTSFLA can locate most of them with the average localization error of 3.5348 m and has significantly improved the performance. The localization ratio is 96.38%, while the localization ratio of TSFL is 82.13%.
Moreover, we survey the effect of the coordinate adjustment parameter settings on the localization error. We discuss some cases, and here we just list ten of them whose localization error is relatively small. We list the parameter settings of
${a}_{1}$ and
${b}_{1}$, and the No (#) of the cases, and the different localization errors are shown in
Table 3. The coordinates of the UN are
$(x,y,z)$, the coordinates of LN1 are
$({x}_{1},{y}_{1},{z}_{1})$, the coordinates of LN2 are
$({x}_{2},{y}_{2},{z}_{2})$, the coordinates of LN3 are
$({x}_{3},{y}_{3},{z}_{3})$, and the coordinates of EN are
$(\widehat{x},\widehat{y},\widehat{z})$. Note that LN2 corresponds to the point where the angle is the largest angle in the triangle. We use the No (#) of cases as 0 to express CRFLA. Then we discuss some cases of the parameter settings and choose ten of them to show the localization error. We can see the different parameter settings can decrease the localization error at different extent. Compared with the localization error of CRFLA, the localization error of all the cases is reduced and shown in
Figure 16.
The MATLAB simulation shows that the average localization error of the rangebased estimation algorithm by using PSO is 0.7123 m. The PSO algorithm can efficiently locate the sensor nodes and ensure a relatively high accuracy without time synchronization. In Phase II, we use CRFLA to locate the unlocalized sensor nodes, and the localization ratio achieved is 96.38% while the localization ratio using TSFL is 82.13%. The average localization error of CRFLA is 6.7996 m while using the coordinate adjustment scheme so the average localization error can decrease to 3.5348 m.