# Three-Dimensional UWSN Positioning Algorithm Based on Modified RSSI Values

Authors: Qin Qin; Yi Tian; Xin Wang
Journal: Mobile Information Systems
 (2021)

---

## Abstract

Sensor nodes in underwater wireless sensor networks (UWSNs) are in a three-dimensional space, and water fluidity continuously changes the positioning in water, the clock synchronization of underwater nodes is challenging, and ranging algorithms affected by water flow produce large errors. A three-dimensional UWSN positioning algorithm based on modified RSSI values is proposed to address the problem of UWSN positioning algorithms being susceptible to water influence and prone to unstable positioning and large positioning errors. An unlocated node screens the received anchor node signal strength and then makes a weighted correction to reduce the influence of the water environment and improve the ranging accuracy. A position estimation model is proposed and combined with a three-dimensional underwater model and least squares method to deduce the unlocated node’s position on the basis of the distance between the unlocated node and the anchor node. The proposed algorithm effectively reduces the influence of the water environment on the ranging algorithm’s accuracy and improves the performance of three-dimensional underwater positioning algorithms. Simulation results show that the proposed algorithm can effectively reduce the influence of the underwater environment on positioning algorithms.


---

## Body

## 1. Introduction

Sensor node positioning is a key technology in wireless sensor networks. With the development of terrestrial wireless sensor network applications, underwater wireless sensor network applications have attracted increasing attention. However, the complex underwater environment hinders the location of underwater wireless sensor networks (UWSNs) [1]. It also necessitates the consideration of all factors affecting positioning performance. Sensors in water are usually deployed in areas that cannot be easily accessed by humans or those with few infrastructure; meanwhile, common sensor nodes are randomly arranged [2]. The factors affecting underwater signal transmission must be considered when estimating the positions of sensor nodes relative to anchor nodes by using received signal strength. The result identifies the factors affecting transmission in a real environment. UWSNs comprise unevenly distributed sensor nodes, sparse nodes, and nodes that are easily affected by water fluidity. Anchor nodes that assist positioning can improve the positioning accuracy of sensor networks [3–5]. Li et al. [6] proposed a weighted centroid ranging algorithm that is based on received signal strength indicators (RSSIs) and time difference of arrival (TDOA); this algorithm uses the distance parameter and signal strength between anchor nodes as a reference to correct the estimated distance between unlocated nodes and anchor nodes. It also reduces positioning errors relative to the traditional RSSI centroid. A positioning algorithm in [7] reduces positioning errors in an uneven node distribution by using RSSI values to optimize the single hop value in the DV-Hop algorithm. A three-sided RSSI centroid positioning algorithm was proposed in [8], and it is able to correct the path loss factor in an actual environment, reduce the ranging algorithm errors caused by the environment, and improve positioning algorithm accuracy. Zhang and Huang [9] aimed to correct RSSI values by dynamically acquiring path loss factors and reduce environment impact by combining three-sided centroid positioning algorithms. However, the positioning model needs to be adjusted regularly, and the error range of the acquired path loss factors affects positioning algorithms. Although existing algorithms show improved positioning accuracy, the accuracy of ranging algorithms requires improvement [10]; an enhanced design for positioning algorithms is also needed as nodes cannot be synchronized accurately in an underwater environment, and they tend to influence positioning algorithms.In sum, underwater positioning algorithms in UWSNs are prone to large errors, and they are susceptible to water fluidity. Moreover, the nodes comprising UWSNs are difficult to synchronize. A received signal strength ranging algorithm is low cost and requires simple technology and minimal hardware. However, underwater sensor nodes are difficult to replace, they are susceptible to the underwater environment, their energy is limited, and their cost is relatively high. Therefore, a three-dimensional UWSN positioning algorithm based on modified RSSI values is proposed in this work. Weighted and modified RSSI values reduce ranging errors. Combined with a three-dimensional underwater positioning model, the proposed algorithm can estimate the unlocated node position in a three-dimensional space by using the least squares method. The proposed algorithm shows improved robustness, reduces the impact of underwater fluidity on ranging, and enhances the accuracy of network node positioning.


## 2. Distance Conversion Model

### 2.1. Received Signal Strength Algorithm

A ranging algorithm based on received signal strength can convert the signal strength received by an unlocated node and sent by an anchor node in a certain distance. Specifically, a mobile anchor node sends the signal. During the transmission process, certain loss occurs because of the influence of the external environment. The longer the transmission distance is, the greater the signal loss will be and the smaller the RSSI value received by the unlocated node. The loss during transmission can be converted into an RSSI value through the path loss model. In an actual ranging process, the loss model uses a log-normal distribution model. The parameters in the model can be calculated by the actual distance between anchor nodes and by the algorithm measurement distance [11].In the current work, the signal transmission attenuation model uses a log-normal distribution model:(1)prd0prdij=dijd0NP.By simplifying formula (1) and taking the logarithm of each side, the following result is obtained:(2)prdij=prd0−10NPlgdijd0+Xσ,where prdij is the received power between dij nodes, prd0 is the d0 received strength path loss of unit distance, prd0 can be obtained by measuring the actual distance between nodes, NP is the channel attenuation index whose value depends on the application environment, generally ranges from 2 to 5, and Xσ refers to the Gaussian distribution noise and is often expressed by a normal distribution.The distancedij between nodes can be deduced from formula (2):(3)dij=10A/10NP,where dij is the communication distance between node i and node j. A=prd0−prdij+Xσ. The signal strength sent by the nodes in the UWSN decreases with an increase in transmission distance. Moreover, the signals from sensor nodes suffer from losses to a certain extent. The unlocated nodes obtain N RSSI values with anchor nodes, and the distance value between unlocated nodes and multiple anchor nodes can be obtained by formula (3).


### 2.2. Weighted Correction of RSSI

The signal strength ranging algorithm is easily affected by the application environment, thereby resulting in ranging errors [12]. In practice, the temperature, salinity, obstacles, and density of the water environment cause signal losses and a decrease in signal strength. Water fluidity causes objects in water to move slightly [13]. Hence, the signal strength received by sensor nodes varies from time to time, eventually affecting distance estimation between nodes [14]. Thus, averaging and Gaussian filter methods are combined to weigh and modify RSSI values. A modified RSSI value improves ranging accuracy and positioning accuracy of UWSNs.A mobile anchor node broadcasts signals regularly during its movement. Anchor nodes release signalN times at the same place to enhance the ranging accuracy. Each sensor node has a list of the ID numbers of mobile anchor nodes in different positions. After an unlocated node receives information from a mobile anchor node, the average Φ and variance α of the RSSI value of the same received ID can be calculated by the following formula:(4)Φ=1N∑i=1NPi,i=1,2,3,…,N,α=1N−1∑i=1NPi−μ,i=1,2,3,…,N.According to formula (4), the same ID RSSI values received by the unlocated node are screened. The M RSSI values outside the (Φ − α and Φ + α) interval are cancelled, and the average value Φ∗ within the interval is recalculated. The weighted formula of the RSSI value within the interval is as follows:(5)P=1N−MPi×1Pi−Φ∗.According to formula (5), the weighted and modified RSSI values can be obtained. Then, the distance between the unlocated node and the anchor node can be calculated by substituting the obtained RSSI value into formula (3).


### 2.3. Position Estimation Model

As the anchor node moves through the network and broadcasts signals to the surroundings, the ordinary node receives information from the anchor node and uses the distance conversion model to calculate the distance between nodes. In this section, a position estimation model is proposed to obtain the location information of unlocated nodes on the basis of the distance between nodes.


### 2.4. Three-Dimensional Underwater Model

Wireless sensor networks on land generally require two-dimensional planar positioning, whereas UWSNs in special underwater environments require three-dimensional positioning [15–17]. Such requirements cannot be met by traditional positioning algorithms. Hence, research should consider how anchor and normal nodes send and receive signals in the three-dimensional underwater environment [18].The positioning requirements of wireless sensor networks on land are generally two-dimensional planar positioning, while the special underwater environment requires UWSN to adopt a three-dimensional positioning. The traditional positioning algorithm cannot meet the requirement of underwater sensor nodes positioning. It is necessary to consider how the anchor node and normal node send and receive signals in the three-dimensional underwater environment.As shown in Figure1, signals in an UWSN diverge in a spherical shape when nodes communicate. Anchor nodes broadcast signals to unlocated nodes within the communication range. The signals are transmitted in a three-dimensional space, whose the coverage area is a sphere and the communication diameter is the radius.Figure 1
Sensor node sending and receiving signals.In a three-dimensional underwater environment, unlocated nodes receive the information ofn anchor nodes with the strongest signal. As shown in Figure 2, the sensor nodes in this model are equipped with pressure sensors to obtain their own depth information. Node depth can be directly converted into the Z-axis of node coordinates. The coordinates of unlocated nodes are (x, y, z), and the coordinates of three anchor nodes are A (z1, y1, z1), B (z2, y2, z2), C (x3, y3, z3), …, N (xn, yn, zn). On the basis of the distance between unlocated nodes and n anchor nodes, the following equations can be obtained:(6)x−x12+y−y12+z−z12=l1,x−x22+y−y22+z−z22=l2,⋮x−xn2+y−yn2+z−zn2=ln.Figure 2
Sensor nodes sending and receiving signals.Three sensor nodes form a plane. An unlocated node in underwater node positioning requires three anchor nodes, and four nodes form a polyhedron. Four nodes need to be projected to a horizontal plane to achieve relative positioning. Three anchor nodes are mapped to the same plane as that of the unlocated node. The coordinateZ of the unlocated node can be obtained by its own pressure sensor. The mapped formula is as follows:(7)Y1=D12−Z−Z12,Y2=D22−Z−Z22,Y3=D32−Z−Z32.From formulas (6) and (7), the coordinates of three anchor nodes on the same two-dimensional plane can be deduced as AX1,D12−Z−Z12, BX2,D22−Z−Z22, and CX3,D32−Z−Z32.


### 2.5. Least Squares Position Estimation

The coordinates ofN anchor nodes around the unlocated node D are (x1, y1, z1), (x2, y2, z2), (x3, y3, z3), …, (xn, yn, zn). The distance from these anchor nodes to node D can be calculated by the distance conversion model as d1, d2, …, dn. The unlocated node D can obtain its own depth through its pressure sensor. The three-dimensional underwater positioning model can convert the obtained coordinates into two-dimensional coordinates. The converted coordinates are (x1, y1), (x2, y2), …, (xn, yn). Assuming that the two-dimensional coordinates of node D are (x, y), the following formula can be obtained as(8)x1−x2+y1−y2=d12,x2−x2+y2−y2=d22,⋮xn−x2+yn−y2=dn2.Formula (9) is obtained by subtracting the last equation from the first equation of formula (8):(9)x12−xn2−2x1−xnx+y12−yn2−2y1−yny=d12−dn2,x22−xn2−2x2−xnx+y22−yn2−2y2−yny=d22−dn2,⋮xn−12−xn2−2xn−1−xnx+yn−12−yn2−2yn−1−yny=d12−dn2.Formula (9) is converted into the linear equation AX=b, as shown in the following formula:(10)A=2x1−xn2x2−xn⋮2xn−1−xn2y1−yn2y2−yn⋮2yn−1−yn,(11)b=x12−xn2+y12−yn2+dn2−d12x22−xn2+y22−yn2+dn2−d22⋮xn−12−xn2+yn−12−yn2+dn2−dn−12.Finally, the estimated position coordinate of the unlocated sensor nodeD is determined as X=ATA−1ATb by using the least squares method.


### 2.6. Three-Dimensional UWSN Positioning Algorithm Based on Modified RSSI Value

Differences exist between water and terrestrial environments [19]. Hence, in UWSN positioning, the algorithm adopted must consider underwater features [20], such as water fluidity, complex substances in water, actual signal losses varying with anchor nodes’ movement through different water areas, and signal strength changing with different obstacles in water [21]. Ranging algorithms based on signal strength produce large ranging error because of the instability of the underwater environment. An increase in ranging errors increases positioning errors accordingly. In this section, the weighted and corrected RSSI value is used to improve ranging algorithm accuracy. The value is combined with the three-dimensional underwater positioning method to improve the positioning accuracy of underwater nodes.As shown in Figure3, the three-dimensional positioning algorithm for the UWSN based on the revised RSSI value involves two stages: ranging (stage 1) and node positioning (stage 2). In stage 1, the mobile anchor node in the UWSN broadcasts information to the surrounding nodes through mobile communication. The unlocated node receives the RSSI value between itself and the anchor node. Moreover, the signal strength of each anchor node received by the unlocated node is converted into the distance between the unlocated node and each anchor node by the distance conversion model. In stage 2, the relative position of the unlocated node in the UWSN can be calculated with the distance between the sensor nodes in stage 1 by using the position estimation model. Then, the sensor node is located on the basis of the actual position of the anchor nodes.Figure 3
Algorithm model diagram.The process of the proposed three-dimensional positioning algorithm is shown in Figure4. The detailed steps are as follows:Step 1: the mobile anchor node traverses the network according to the planned route, reaches the specified location, broadcasts signals forN times, and sends its own information list containing the ID number and three-dimensional coordinates (Xi, Yi, Zi) of the location.Step 2: the unlocated node receives the information of the mobile anchor node and records the information list and signal strength on its own information list. The ID number of the same position corresponds toN signal strength.Step 3: the node processes the data in the obtained information list. A unique RSSI value is obtained by correcting the signal strength at the same position through the weighted modified RSSI value model. The information list is updated. An unknown ID corresponds to a signal strength.Step 4: according to the distance conversion model, only the input RSSI value gets the distance between nodes.Step 5: the unlocated nodes repeat Steps 2, 3, and 4 to obtain the corresponding distance of three position IDs and convert the three-dimensional space ID into a two-dimensional space ID by using the three-dimensional positioning model.Step 6: the maximum likelihood estimation method is used to calculate the two-dimensional coordinates of the positioning node. With the node’s own depth information, the three-dimensional reverse conversion is carried out, and two-dimensional coordinates are converted into three-dimensional network coordinates. The estimated position of the unlocated node is obtained, thereby completing the network positioning.Figure 4
Algorithm flowchart.


## 2.1. Received Signal Strength Algorithm

A ranging algorithm based on received signal strength can convert the signal strength received by an unlocated node and sent by an anchor node in a certain distance. Specifically, a mobile anchor node sends the signal. During the transmission process, certain loss occurs because of the influence of the external environment. The longer the transmission distance is, the greater the signal loss will be and the smaller the RSSI value received by the unlocated node. The loss during transmission can be converted into an RSSI value through the path loss model. In an actual ranging process, the loss model uses a log-normal distribution model. The parameters in the model can be calculated by the actual distance between anchor nodes and by the algorithm measurement distance [11].In the current work, the signal transmission attenuation model uses a log-normal distribution model:(1)prd0prdij=dijd0NP.By simplifying formula (1) and taking the logarithm of each side, the following result is obtained:(2)prdij=prd0−10NPlgdijd0+Xσ,where prdij is the received power between dij nodes, prd0 is the d0 received strength path loss of unit distance, prd0 can be obtained by measuring the actual distance between nodes, NP is the channel attenuation index whose value depends on the application environment, generally ranges from 2 to 5, and Xσ refers to the Gaussian distribution noise and is often expressed by a normal distribution.The distancedij between nodes can be deduced from formula (2):(3)dij=10A/10NP,where dij is the communication distance between node i and node j. A=prd0−prdij+Xσ. The signal strength sent by the nodes in the UWSN decreases with an increase in transmission distance. Moreover, the signals from sensor nodes suffer from losses to a certain extent. The unlocated nodes obtain N RSSI values with anchor nodes, and the distance value between unlocated nodes and multiple anchor nodes can be obtained by formula (3).


## 2.2. Weighted Correction of RSSI

The signal strength ranging algorithm is easily affected by the application environment, thereby resulting in ranging errors [12]. In practice, the temperature, salinity, obstacles, and density of the water environment cause signal losses and a decrease in signal strength. Water fluidity causes objects in water to move slightly [13]. Hence, the signal strength received by sensor nodes varies from time to time, eventually affecting distance estimation between nodes [14]. Thus, averaging and Gaussian filter methods are combined to weigh and modify RSSI values. A modified RSSI value improves ranging accuracy and positioning accuracy of UWSNs.A mobile anchor node broadcasts signals regularly during its movement. Anchor nodes release signalN times at the same place to enhance the ranging accuracy. Each sensor node has a list of the ID numbers of mobile anchor nodes in different positions. After an unlocated node receives information from a mobile anchor node, the average Φ and variance α of the RSSI value of the same received ID can be calculated by the following formula:(4)Φ=1N∑i=1NPi,i=1,2,3,…,N,α=1N−1∑i=1NPi−μ,i=1,2,3,…,N.According to formula (4), the same ID RSSI values received by the unlocated node are screened. The M RSSI values outside the (Φ − α and Φ + α) interval are cancelled, and the average value Φ∗ within the interval is recalculated. The weighted formula of the RSSI value within the interval is as follows:(5)P=1N−MPi×1Pi−Φ∗.According to formula (5), the weighted and modified RSSI values can be obtained. Then, the distance between the unlocated node and the anchor node can be calculated by substituting the obtained RSSI value into formula (3).


## 2.3. Position Estimation Model

As the anchor node moves through the network and broadcasts signals to the surroundings, the ordinary node receives information from the anchor node and uses the distance conversion model to calculate the distance between nodes. In this section, a position estimation model is proposed to obtain the location information of unlocated nodes on the basis of the distance between nodes.


## 2.4. Three-Dimensional Underwater Model

Wireless sensor networks on land generally require two-dimensional planar positioning, whereas UWSNs in special underwater environments require three-dimensional positioning [15–17]. Such requirements cannot be met by traditional positioning algorithms. Hence, research should consider how anchor and normal nodes send and receive signals in the three-dimensional underwater environment [18].The positioning requirements of wireless sensor networks on land are generally two-dimensional planar positioning, while the special underwater environment requires UWSN to adopt a three-dimensional positioning. The traditional positioning algorithm cannot meet the requirement of underwater sensor nodes positioning. It is necessary to consider how the anchor node and normal node send and receive signals in the three-dimensional underwater environment.As shown in Figure1, signals in an UWSN diverge in a spherical shape when nodes communicate. Anchor nodes broadcast signals to unlocated nodes within the communication range. The signals are transmitted in a three-dimensional space, whose the coverage area is a sphere and the communication diameter is the radius.Figure 1
Sensor node sending and receiving signals.In a three-dimensional underwater environment, unlocated nodes receive the information ofn anchor nodes with the strongest signal. As shown in Figure 2, the sensor nodes in this model are equipped with pressure sensors to obtain their own depth information. Node depth can be directly converted into the Z-axis of node coordinates. The coordinates of unlocated nodes are (x, y, z), and the coordinates of three anchor nodes are A (z1, y1, z1), B (z2, y2, z2), C (x3, y3, z3), …, N (xn, yn, zn). On the basis of the distance between unlocated nodes and n anchor nodes, the following equations can be obtained:(6)x−x12+y−y12+z−z12=l1,x−x22+y−y22+z−z22=l2,⋮x−xn2+y−yn2+z−zn2=ln.Figure 2
Sensor nodes sending and receiving signals.Three sensor nodes form a plane. An unlocated node in underwater node positioning requires three anchor nodes, and four nodes form a polyhedron. Four nodes need to be projected to a horizontal plane to achieve relative positioning. Three anchor nodes are mapped to the same plane as that of the unlocated node. The coordinateZ of the unlocated node can be obtained by its own pressure sensor. The mapped formula is as follows:(7)Y1=D12−Z−Z12,Y2=D22−Z−Z22,Y3=D32−Z−Z32.From formulas (6) and (7), the coordinates of three anchor nodes on the same two-dimensional plane can be deduced as AX1,D12−Z−Z12, BX2,D22−Z−Z22, and CX3,D32−Z−Z32.


## 2.5. Least Squares Position Estimation

The coordinates ofN anchor nodes around the unlocated node D are (x1, y1, z1), (x2, y2, z2), (x3, y3, z3), …, (xn, yn, zn). The distance from these anchor nodes to node D can be calculated by the distance conversion model as d1, d2, …, dn. The unlocated node D can obtain its own depth through its pressure sensor. The three-dimensional underwater positioning model can convert the obtained coordinates into two-dimensional coordinates. The converted coordinates are (x1, y1), (x2, y2), …, (xn, yn). Assuming that the two-dimensional coordinates of node D are (x, y), the following formula can be obtained as(8)x1−x2+y1−y2=d12,x2−x2+y2−y2=d22,⋮xn−x2+yn−y2=dn2.Formula (9) is obtained by subtracting the last equation from the first equation of formula (8):(9)x12−xn2−2x1−xnx+y12−yn2−2y1−yny=d12−dn2,x22−xn2−2x2−xnx+y22−yn2−2y2−yny=d22−dn2,⋮xn−12−xn2−2xn−1−xnx+yn−12−yn2−2yn−1−yny=d12−dn2.Formula (9) is converted into the linear equation AX=b, as shown in the following formula:(10)A=2x1−xn2x2−xn⋮2xn−1−xn2y1−yn2y2−yn⋮2yn−1−yn,(11)b=x12−xn2+y12−yn2+dn2−d12x22−xn2+y22−yn2+dn2−d22⋮xn−12−xn2+yn−12−yn2+dn2−dn−12.Finally, the estimated position coordinate of the unlocated sensor nodeD is determined as X=ATA−1ATb by using the least squares method.


## 2.6. Three-Dimensional UWSN Positioning Algorithm Based on Modified RSSI Value

Differences exist between water and terrestrial environments [19]. Hence, in UWSN positioning, the algorithm adopted must consider underwater features [20], such as water fluidity, complex substances in water, actual signal losses varying with anchor nodes’ movement through different water areas, and signal strength changing with different obstacles in water [21]. Ranging algorithms based on signal strength produce large ranging error because of the instability of the underwater environment. An increase in ranging errors increases positioning errors accordingly. In this section, the weighted and corrected RSSI value is used to improve ranging algorithm accuracy. The value is combined with the three-dimensional underwater positioning method to improve the positioning accuracy of underwater nodes.As shown in Figure3, the three-dimensional positioning algorithm for the UWSN based on the revised RSSI value involves two stages: ranging (stage 1) and node positioning (stage 2). In stage 1, the mobile anchor node in the UWSN broadcasts information to the surrounding nodes through mobile communication. The unlocated node receives the RSSI value between itself and the anchor node. Moreover, the signal strength of each anchor node received by the unlocated node is converted into the distance between the unlocated node and each anchor node by the distance conversion model. In stage 2, the relative position of the unlocated node in the UWSN can be calculated with the distance between the sensor nodes in stage 1 by using the position estimation model. Then, the sensor node is located on the basis of the actual position of the anchor nodes.Figure 3
Algorithm model diagram.The process of the proposed three-dimensional positioning algorithm is shown in Figure4. The detailed steps are as follows:Step 1: the mobile anchor node traverses the network according to the planned route, reaches the specified location, broadcasts signals forN times, and sends its own information list containing the ID number and three-dimensional coordinates (Xi, Yi, Zi) of the location.Step 2: the unlocated node receives the information of the mobile anchor node and records the information list and signal strength on its own information list. The ID number of the same position corresponds toN signal strength.Step 3: the node processes the data in the obtained information list. A unique RSSI value is obtained by correcting the signal strength at the same position through the weighted modified RSSI value model. The information list is updated. An unknown ID corresponds to a signal strength.Step 4: according to the distance conversion model, only the input RSSI value gets the distance between nodes.Step 5: the unlocated nodes repeat Steps 2, 3, and 4 to obtain the corresponding distance of three position IDs and convert the three-dimensional space ID into a two-dimensional space ID by using the three-dimensional positioning model.Step 6: the maximum likelihood estimation method is used to calculate the two-dimensional coordinates of the positioning node. With the node’s own depth information, the three-dimensional reverse conversion is carried out, and two-dimensional coordinates are converted into three-dimensional network coordinates. The estimated position of the unlocated node is obtained, thereby completing the network positioning.Figure 4
Algorithm flowchart.


## 3. Experimental Simulation

### 3.1. Experimental Environment Setting and Evaluation Index

MATLAB 2016a simulation software is applied to test the proposed positioning algorithm. A total of 50 ordinary sensor nodes are randomly arranged; the proportion of anchor nodes is 20%, and the communication radius of ordinary nodes is 20 m. Ordinary sensor nodes cannot be removed after being randomly deployed. Each anchor node is aware of its own position information. The logarithmic attenuation model is used in the signal propagation attenuation model in the experiment. The proposed algorithm is compared with the traditional RSSI location algorithm, the median RSSI location algorithm, and the DV-Hop location algorithm based on RSSI value optimization [22–24]. The simulation area is a cube region measuring 100 m × 100 m × 100 m. The distribution of underwater wireless sensor nodes in the simulation experiment is shown in Figures 5 and 6.Figure 5
Three-dimensional distribution diagram of UWSN nodes.Figure 6
Top view of three-dimensional node distribution.The evaluation indexes of the positioning algorithm in this work are as follows.Average measuring distance:Dij∗ represents the average measuring distance between the ith unlocated node and the jth anchor node. Dij represents the measuring distance between the ith unlocated node and the jth anchor node. m represents the number of anchor nodes, and n represents the unlocated nodes that can measure distance. The average measuring distance between an anchor node and a positioning node can be obtained by the following formula:(12)Dij∗=∑i=1n∑j=1mDij.Node average positioning error: the difference between the estimated position and the actual position of unlocated sensor nodei is the node positioning error marked as errori. N represents the total number of unlocated sensor nodes. The sum of the positioning errors of all nodes divided by the number of positioning nodes is the average positioning error of nodes.The smaller the node average positioning error is, the higher the positioning accuracy is and the better the performance of the positioning algorithm will be, as shown in the followingformula:(13)Perror=∑i=1Nerrori.Average maximum positioning error: in formula (14), Merroi represents the Kth maximum positioning error of the node and PMeero represents the average maximum positioning error of the node:(14)PMerro=∑i=1KMerroiK.The experimental parameter settings are shown in Table1.Table 1
Experimental parameter settings.
ParameterValueSimulation area side length (m)100Total number of sensor nodes (n)50Anchor node ratio (%)20Ordinary node communication radius (m)20Anchor node communication radius (m)25, 30, 35, and 40Signal transmission attenuation modelLogarithmic attenuation modelPath loss index2


### 3.2. Experimental Results and Analysis

Given the 20 m communication radius of common nodes and the varying communication ranges of anchor nodes, the actual distance between nodes, traditional RSSI distance, median RSSI distance, and modified RSSI distance are compared in this work (Table2). The actual distance is the real distance between the anchor node and the unlocated node. As the reference value for the ranging accuracy of the ranging algorithm, the absolute value of the difference between the measured distance based on the ranging algorithm and the real distance is the evaluation index for the accuracy of the ranging algorithm. The larger the difference is, the lower the accuracy of the ranging algorithm is, and vice versa. When the communication radius of the anchor node is the same, the absolute difference value between the distance obtained by the modified RSSI ranging algorithm and the actual distance is the smallest. Moreover, the absolute difference value between the distance obtained by the traditional RSSI ranging algorithm and the actual distance is the largest. As the communication radius of the anchor node increases, the absolute difference values of the three ranging algorithms decrease again, but the absolute value of the modified RSSI ranging algorithm remains the smallest. Hence, the modified RSSI ranging algorithm is more accurate than other ranging algorithms.Table 2
Average measured distance between nodes.
Anchor node communication radius (m)Actual distance (m)Traditional RSSI ranging (m)Median RSSI ranging (m)Modified RSSI ranging (m)2512.99489.91811.184311.9665309.759677.70658.62039.06923517.565615.795616.879617.16934011.481212.287511.035411.6564Given the 20 m communication range of ordinary nodes and the varying communication ranges of anchor nodes, this work compares the average node positioning errors of the traditional RSSI positioning algorithm, DV-Hop-based positioning algorithm, and three-dimensional UWSN positioning algorithm based on revised RSSI values. The comparison is illustrated in Figure7. Given different communication ranges of anchor nodes, the average positioning error of the modified RSSI positioning algorithm is lower than those of the traditional RSSI algorithm and DV-Hop algorithm. Moreover, the average positioning error decreases steadily with the increase of the anchor nodes’ communication radius. Given a small radius, the DV-Hop algorithm produces a lower positioning error than the traditional RSSI algorithm; its error is close to that of the modified RSSI algorithm. The DV-Hop algorithm achieves positioning through multiple hops and thus achieves a higher positioning accuracy than the traditional RSSI algorithm in the network with sparse anchor nodes with a small communication radius. However, with an increase in the communication radius of anchor nodes, the information and calculation of nodes increase as well, thus leading to a continuous increase in errors. The revised RSSI algorithm does not need to carry out multiple data forwarding and data calculations and thus achieves reduced positioning errors. It also has high accuracy in the ranging phase and thus generates low positioning errors in the network.Figure 7
The average positioning error of nodes.Figure8 presents a comparison diagram of the relationship between the average maximum positioning error and the anchor nodes’ communication radius on the basis of the traditional RSSI positioning algorithm, DV-Hop positioning algorithm, and three-dimensional UWSN positioning algorithm based on modified RSSI values. The average maximum positioning error of the modified RSSI algorithm is lower than that of the traditional RSSI algorithm and DV-Hop algorithm (Figure 8). When the anchor nodes’ communication radius is 25 m, the average positioning error of the DV-Hop algorithm is lower than that of the traditional RSSI algorithm and is close to that of the modified RSSI algorithm. However, its average maximum positioning error is higher than that of the traditional RSSI algorithm and modified RSSI algorithm. Moreover, its positioning stability is not high. With an increase in the anchor nodes’ communication radius, the average maximum positioning error of the revised RSSI positioning algorithm decreases steadily and remains lower than that of the traditional RSSI algorithm. The newly proposed algorithm achieves a stable improvement in positioning accuracy. As underwater network positioning is easily affected by water, a steady positioning algorithm is crucial.Figure 8
Average maximum positioning error.


## 3.1. Experimental Environment Setting and Evaluation Index

MATLAB 2016a simulation software is applied to test the proposed positioning algorithm. A total of 50 ordinary sensor nodes are randomly arranged; the proportion of anchor nodes is 20%, and the communication radius of ordinary nodes is 20 m. Ordinary sensor nodes cannot be removed after being randomly deployed. Each anchor node is aware of its own position information. The logarithmic attenuation model is used in the signal propagation attenuation model in the experiment. The proposed algorithm is compared with the traditional RSSI location algorithm, the median RSSI location algorithm, and the DV-Hop location algorithm based on RSSI value optimization [22–24]. The simulation area is a cube region measuring 100 m × 100 m × 100 m. The distribution of underwater wireless sensor nodes in the simulation experiment is shown in Figures 5 and 6.Figure 5
Three-dimensional distribution diagram of UWSN nodes.Figure 6
Top view of three-dimensional node distribution.The evaluation indexes of the positioning algorithm in this work are as follows.Average measuring distance:Dij∗ represents the average measuring distance between the ith unlocated node and the jth anchor node. Dij represents the measuring distance between the ith unlocated node and the jth anchor node. m represents the number of anchor nodes, and n represents the unlocated nodes that can measure distance. The average measuring distance between an anchor node and a positioning node can be obtained by the following formula:(12)Dij∗=∑i=1n∑j=1mDij.Node average positioning error: the difference between the estimated position and the actual position of unlocated sensor nodei is the node positioning error marked as errori. N represents the total number of unlocated sensor nodes. The sum of the positioning errors of all nodes divided by the number of positioning nodes is the average positioning error of nodes.The smaller the node average positioning error is, the higher the positioning accuracy is and the better the performance of the positioning algorithm will be, as shown in the followingformula:(13)Perror=∑i=1Nerrori.Average maximum positioning error: in formula (14), Merroi represents the Kth maximum positioning error of the node and PMeero represents the average maximum positioning error of the node:(14)PMerro=∑i=1KMerroiK.The experimental parameter settings are shown in Table1.Table 1
Experimental parameter settings.
ParameterValueSimulation area side length (m)100Total number of sensor nodes (n)50Anchor node ratio (%)20Ordinary node communication radius (m)20Anchor node communication radius (m)25, 30, 35, and 40Signal transmission attenuation modelLogarithmic attenuation modelPath loss index2


## 3.2. Experimental Results and Analysis

Given the 20 m communication radius of common nodes and the varying communication ranges of anchor nodes, the actual distance between nodes, traditional RSSI distance, median RSSI distance, and modified RSSI distance are compared in this work (Table2). The actual distance is the real distance between the anchor node and the unlocated node. As the reference value for the ranging accuracy of the ranging algorithm, the absolute value of the difference between the measured distance based on the ranging algorithm and the real distance is the evaluation index for the accuracy of the ranging algorithm. The larger the difference is, the lower the accuracy of the ranging algorithm is, and vice versa. When the communication radius of the anchor node is the same, the absolute difference value between the distance obtained by the modified RSSI ranging algorithm and the actual distance is the smallest. Moreover, the absolute difference value between the distance obtained by the traditional RSSI ranging algorithm and the actual distance is the largest. As the communication radius of the anchor node increases, the absolute difference values of the three ranging algorithms decrease again, but the absolute value of the modified RSSI ranging algorithm remains the smallest. Hence, the modified RSSI ranging algorithm is more accurate than other ranging algorithms.Table 2
Average measured distance between nodes.
Anchor node communication radius (m)Actual distance (m)Traditional RSSI ranging (m)Median RSSI ranging (m)Modified RSSI ranging (m)2512.99489.91811.184311.9665309.759677.70658.62039.06923517.565615.795616.879617.16934011.481212.287511.035411.6564Given the 20 m communication range of ordinary nodes and the varying communication ranges of anchor nodes, this work compares the average node positioning errors of the traditional RSSI positioning algorithm, DV-Hop-based positioning algorithm, and three-dimensional UWSN positioning algorithm based on revised RSSI values. The comparison is illustrated in Figure7. Given different communication ranges of anchor nodes, the average positioning error of the modified RSSI positioning algorithm is lower than those of the traditional RSSI algorithm and DV-Hop algorithm. Moreover, the average positioning error decreases steadily with the increase of the anchor nodes’ communication radius. Given a small radius, the DV-Hop algorithm produces a lower positioning error than the traditional RSSI algorithm; its error is close to that of the modified RSSI algorithm. The DV-Hop algorithm achieves positioning through multiple hops and thus achieves a higher positioning accuracy than the traditional RSSI algorithm in the network with sparse anchor nodes with a small communication radius. However, with an increase in the communication radius of anchor nodes, the information and calculation of nodes increase as well, thus leading to a continuous increase in errors. The revised RSSI algorithm does not need to carry out multiple data forwarding and data calculations and thus achieves reduced positioning errors. It also has high accuracy in the ranging phase and thus generates low positioning errors in the network.Figure 7
The average positioning error of nodes.Figure8 presents a comparison diagram of the relationship between the average maximum positioning error and the anchor nodes’ communication radius on the basis of the traditional RSSI positioning algorithm, DV-Hop positioning algorithm, and three-dimensional UWSN positioning algorithm based on modified RSSI values. The average maximum positioning error of the modified RSSI algorithm is lower than that of the traditional RSSI algorithm and DV-Hop algorithm (Figure 8). When the anchor nodes’ communication radius is 25 m, the average positioning error of the DV-Hop algorithm is lower than that of the traditional RSSI algorithm and is close to that of the modified RSSI algorithm. However, its average maximum positioning error is higher than that of the traditional RSSI algorithm and modified RSSI algorithm. Moreover, its positioning stability is not high. With an increase in the anchor nodes’ communication radius, the average maximum positioning error of the revised RSSI positioning algorithm decreases steadily and remains lower than that of the traditional RSSI algorithm. The newly proposed algorithm achieves a stable improvement in positioning accuracy. As underwater network positioning is easily affected by water, a steady positioning algorithm is crucial.Figure 8
Average maximum positioning error.


## 4. Conclusions

A three-dimensional UWSN positioning algorithm based on modified RSSI values is proposed to address the problem of UWSN positioning algorithms being susceptible to water influence and prone to unstable positioning and large positioning errors. The unlocated node screens the received signal strength of the anchor node and then performs weighted correction to reduce the influence of the water environment and improve ranging accuracy. Combined with a three-dimensional underwater environment, the accuracy and stability of the positioning algorithm are improved, and the error of the underwater positioning algorithm is reduced. The algorithm is simulated with other related positioning algorithms through experiments. The results show that the proposed three-dimensional UWSN positioning algorithm based on modified RSSI values remains stable, shows improved ranging accuracy, and reduces positioning error.



---

*Source: 5554791-2021-06-23.xml*