# Efficient Underwater RSS Value to Distance Inversion Using the Lambert Function

Authors: Majid Hosseini; Hassan Chizari; Tim Poston; Mazleena Bt. Salleh; Abdul Hanan Abdullah
Journal: Mathematical Problems in Engineering
 (2014)

---

## Abstract

There are many applications for using wireless sensor networks (WSN) in ocean science; however, identifying the exact location of a sensor by itself (localization) is still a challenging problem, where global positioning system (GPS) devices are not applicable underwater. Precise distance measurement between two sensors is a tool of localization and received signal strength (RSS), reflecting transmission loss (TL) phenomena, is widely used in terrestrial WSNs for that matter. Underwater acoustic sensor networks have not been used (UASN), due to the complexity of the TL function. In this paper, we addressed these problems by expressing underwater TL via the Lambert W function, for accurate distance inversion by the Halley method, and compared this to Newton-Raphson inversion. Mathematical proof, MATLAB simulation, and real device implementation demonstrate the accuracy and efficiency of the proposed equation in distance calculation, with fewer iterations, computation stability for short and long distances, and remarkably short processing time. Then, the sensitivities of LambertW function and Newton-Raphson inversion to alteration in TL were examined. The simulation results showed that Lambert W function is more stable to errors than Newton-Raphson inversion. Finally, with a likelihood method, it was shown that RSS is a practical tool for distance measurement in UASN.


---

## Body

## 1. Introduction

In underwater acoustic communications, especially at short range, distance measurement is crucial in tracking [1] and sensor localization [2]. Techniques for this on land include Time Difference of Arrival (TDoA), Time of Arrival (ToA), Received Signal Strength (RSS), and Angle of Arrival (AoA). TDoA compares arrival times by two transmission media, for example, radio frequency (RF) and acoustic waves, to estimate the distance between two nodes using the dissimilar dissemination velocities. In aquatic environment RF has very limited propagation [3], so TDoA is not suitable for UASNs. Since AoA relies on a direct line-of-sight (LOS) path from a transmitter to a receiver, a multipath component arriving as a signal from an entirely different direction can lead to very large errors in AoA measurements [4]. In existing short-range underwater acoustic sensor networks, ToA is widely used to measure distance for sensor localization [2] or target tracking [1]. It is based on the traveling time of an acoustic wave, either one-way or round-trip [4]. A source sends a packet, attaching the current time, and the destination node derives the traveling time by comparing this to its local time (assuming a shared clock). The distance can be inferred via the underwater sound velocity, roughly 1.5
×
1
0
3 m/sec. Although some good results are reported, as in [5], they assume precise synchronization [3] which is hard to achieve due to the characteristics of sound travel in the water [6]. To date, RSS has had less attention as a method to measure distance.In underwater applications, the problem of measuring RSS has been solved indirectly. In some literature it has been mainly assumed that the RSS value is converted to the distance and they pay less attention on the this conversion circumstance [7]. Reference [8] categorized its proposed network operations into two steps: offline and online. In offline mode, several devices beacon at different distances to sensors. Each sensor converts the received TL from time-domain to frequency-domain and stores it in its database, where it was assumed that the sensor knows the exact location of beacons. In online step, after receiving a TL, the sensor compares it with its database and measures the distance of sender based on maximum-likelihood method. Although accurate results have been reported from this work, this method is based on availability of beacons and feasibility of having offline step which may not be practical in some applications. To review state-of-the-art methods for localization reader may refer to [9], where the measurement of distance using direct conversion of TL has not yet been investigated.Efficient inversion is the first contribution of this paper. We show that, as a function of underwater transmission loss (TL), distance calculation involves the LambertW function and evaluate it with few iterations. We also invert the TL function of distance by the Newton-Raphson method, as a yardstick for the proposed equation in accuracy, number of iterations, and processing time. The second contribution of this paper is to practice the feasibility of this inversion due to high tolerance of TL. In this part, firstly, the sensitivities of Lambert W function and Newton-Raphson method to alteration in received TL are examined. Secondly, using a maximum-likelihood (ML) method it is shown that using an error recovery method, distance measurement using TL inversion is practical.The evaluation is divided into four phases. First, we mathematically derive theW function, along with the numerical tests. Second, we use a MATLAB numerical simulation for both methods, sensitivity to error analysis and error recovery method. Third, we use the ATMEL RAVENRZ-3290 sensor, a part of the ATMEL RZRAVEN 2.4 GHz Evaluation and Starter kit [10], to obtain real device results regarding our desired factors. The last phase is to examine the possibility of using W function when there are some unexpected alterations to TL.The rest of this paper is organized as follows. Section2 explains transmission loss calculation in the underwater environment. Section 3 presents the Lambert W function, with a derivation of the distance equation through the TL function. Newton's method inversion for the TL function is in Section 4. Sections 5 and 6 present the simulation and real test-bed results, respectively. Section 7 demonstrates the effect of TL alteration and provides a method for reducing the measured distance error. The paper concludes in Section 8.


## 2. Underwater Acoustic Transmission Loss

Sound loss in water is classified asspreading loss, both spherical (1) and cylindrical (2), andattenuation loss[11], from absorption, duct leakage, scattering, and diffraction [12]. Effective attenuation parameters relate to the medium (salinity, acidity, pressure, and temperature) and environment (air bubbles, sediment absorption, surface reflection, and scattering). Here, we only consider the transmission medium parameters. For a distance Dist from emitter to receiver,
(1)
T
L
sph
=
20
log
⁡
(
Dist
)
,
Spherical
(2)
T
L
cyl
=
10
log
⁡
(
Dist
)
,
Cylindrical
,
so the general transmission loss in sea water is given [12] by
(3)
T
L
total
=
T
L
sph
+
T
L
cyl
+
1
0
-
3
α
Dist
,
where α is the absorption coefficient in sea water, given (4) by the Thorp absorption coefficient model [13]. It depends only on frequency f below 50
kHz [11]:
(4)
α
=
1.0936
[
0.1
f
2
1
+
f
2
+
40
f
2
4100
+
f
2
]
,
where 1.0936 changes the units from dBky
d
-
1 to dBk
m
-
1. Spherical spread fits measured data adequately under a wide variety of conditions [11]. So we reduce (3) and (1) to
(5)
T
L
total
=
T
L
sph
+
1
0
-
3
α
Dist
(6)
=
20
log
⁡
(
Dist
)
+
1
0
-
3
α
Dist
.Assume that underwater wireless devices can measure the received signal strength, which givesT
L
total. So (5) should be solved for the variable Dist. In natural logarithms, representing T
L
total by TL, (6) gives
(7)
TL
=
20
ln
⁡
(
Dist
)
ln
⁡
(
10
)
+
α
Dist
1000
.We would like toconvert (7) to Lambert W function in order to find a solution for Dist based on TL. The Lambert W function is
(8)
Y
=
A
X
e
A
X
=
W
(
X
)
.
To solve for X is to find the Lambert function, X
=
W
(
Y
). Let us consider that X
=
Dist, so we will have
(9)
Y
=
A
X
·
e
A
X
,
Y
=
A
·
Dist
·
e
A
·
Dist
,
Y
A
=
Dist
·
e
A
·
Dist
,
ln
⁡
(
Y
A
)
=
ln
⁡
(
Dist
·
e
A
·
Dist
)
,
ln
⁡
(
Y
A
)
=
ln
⁡
(
Dist
)
+
A
·
Dist
.Let us considerλ
=
ln
⁡
(
10
)
/
20, then
(10)
ln
⁡
(
Y
/
A
)
λ
=
ln
⁡
(
Dist
)
λ
+
A
·
Dist
λ
.In order to reach to (7), we must have these two conditions:
(11)
A
λ
=
α
1000
,
ln
⁡
(
Y
/
A
)
λ
=
TL
,
which by solving them we will have
(12)
A
=
λ
α
1000
,
Y
=
A
e
λ
TL
.
Thus, (7) can be converted to Lambert W function where A and Y are presented in (12).


## 3. The LambertW Function

The LambertW function,omega function orproduct log, is the multivalued inverse of w
↦
w
e
w defined by
(13)
z
=
W
(
z
)
e
W
(
z
)
,
where z and W
(
z
) may be complex. We use the subdomain where both are real and positive (Figure 1). First developed by Johann Heinrich Lambert around 1764 [14], its pure and applied applications include the enumeration of trees [15], water-wave height calculation [16], the relations among voltage, current, and resistance in a diode [17], ballistic projectiles [18], statistical mechanics, quantum chemistry, enzyme kinetics, the analysis of algorithms [19], and the jet fuel problem [14].Figure 1
The LambertW function is the inverse of w
↦
w
e
w. For z
<
0, it is multivalued and/or complex, but it is 1-to-1 between z
≥
0 and w
≥
0.Thez here is the transmission loss (6) of a received signal, which is real and positive, found from the ratio between received (RSS) and emitted signal strengths. As in Figure 1, there is exactly one real w
≥
0 for each z
≥
0, so W returns a single value as distance. To find it, start with the special equation [14]:
(14)
w
1
=
p
-
1
,
where
p
=
2
(
e
Y
+
1
)
,
and iterate toward W
(
Y
) by the Halley method from [14]
(15)
w
j
+
1
=
w
j
-
w
j
e
w
j
-
z
e
w
j
(
w
j
+
1
)
-
(
(
w
j
+
2
)
(
w
j
e
w
j
-
z
)
/
(
2
w
j
+
2
)
)
.
This solves (13) for w when z
>
0, converging much faster than either Newton’s method or fixed-point iteration [20].Accordingly, (8) can be solved as follows:
(16)
Y
=
A
X
e
A
X
∴
X
=
W
(
Y
)
A
.
From (16) and (12), we can write
(17)
Dist
=
20000
×
W
(
(
ln
⁡
⁡
(
10
)
/
20000
)
α
e
λ
TL
)
α
ln
⁡
(
10
)
=
A
1
×
W
(
A
2
×
e
A
3
)
with
A
1
=
1000
(
λ
α
)
,
A
2
=
1
A
1
,
A
3
=
λ
TL
,
and α from (4). Thus (17) is the final equation of Dist based on RSS via the Lambert W function. We next illustrate the efficiency of the proposed distance estimation. Numerical proof of the proposed equation can be found in [21].


## 4. The Newton-Raphson Method

The well-known Newton or Newton-Raphson method converges fast to a root of a real-valued functionf
(
x
). It uses f
(
x
) and the derivative f
′
(
x
) to find the root through
(18)
x
n
+
1
=
x
n
-
f
(
x
n
)
f
′
(
x
n
)
.
In solving (6) for Dist, apply this with
(19)
f
(
Dist
)
=
20
log
⁡
(
Dist
)
+
1
0
-
3
α
Dist
-
TL
,
(20)
f
′
(
Dist
)
=
20
Dist
+
1
0
-
3
α
.The starting point is a significant factor in convergence speed in this method. There are also different methods to choose a good start. Our case does not allow a starting point greater than137, where (18) gives a value Dist
<
0, invalid for a logarithm function in (19). Nor can it be 0, due to division by zero in the first part of (20). Furthermore, our numerical evaluation shows an impractical number of iterations for any starting point value between 1 and 136. So for the n
=
0 starting point, for n
≥
1, we take the initial distance x
0
=
Dis
t
0
=
1 m. Then, from (18), (19), and (20),
(21)
Dis
t
n
+
1
=
Dis
t
n
-
20
log
⁡
(
Dist
)
+
1
0
-
3
α
Dist
(
20
/
Dist
)
+
1
0
-
3
α
.We present simulation and real device experiment results with both methods, for a full evaluation.


## 5. MATLAB Simulation and Results

MATLAB is a well-known tool for simulation and evaluation. We used it to evaluate our proposed scheme against the Newton method, concerning the accuracy of calculation and the necessary number of iterations. As an accuracy goal, we aim to calculate distance with a resolution of1
0
-
2 m. Both methods do achieve this, but iterations matter for small devices, in processing time and energy-efficiency. Figure 2 illustrates the iterations that each method needs to get the desired accuracy. The Newton method needs 6 iterations for distances above 100 m, rising to 8 above 300 m. Our scheme reaches the goal with just 4 iterations, up to 5000 m. This uniformity saves the cost of a convergence test.Figure 2
The average number of iterations through different methods.Figure3 graphs error against distance, with various iteration counts, for each method. The 4-step Newton error is very high, even at a distance barely more than 100 m. The error shrinks with more iterations, but even up to 7 iterations it is over 0.5 m for distances longer than 2000 m. Our scheme shows a steady cost and 1
0
-
2 m accuracy with only 4 iterations. This is competitive to results obtained by 8 Newton iterations, clearly needing fewer computing cycles and less power. Experiments using a real sensor prove its accuracy and efficiency.The distance calculation error using different methods and different number of iterations.
(a)
(b)


## 6. Real Test-Bed Evaluation and Results

Real test-beds usually give results slightly or quite different from simulations (especially with sensor networks, for which there is no specific free simulator available in academia), which thus do not guarantee practicality. For a real test-bed experiment, we used the RAVENRZ-3290 (specifications represented in Table1) sold by ATMEL [10] as a part of the ATMEL RZRAVEN 2.4 GHz Evaluation and Starter kit. The board connects to a computer for programming through the AVR JTAGICE-MKII programmer (Figure 4). So we wrote the codes for each model in C, the major programming language for the ATMEL AVR products [10], and uploaded to the experimental board. ATMEL's powerful and user friendly GUI, called AVR Studio, enables users to obtain accurate results without complex microprocessor programming.Table 1
The specification of the ATMEL RZRAVEN 2.4 GHz Evaluation and Starter kit.
Item
Specification
Device
ATmega 3290
Flash
32 Kbytes
EEPROM
1 Kbytes
RAM
2 Kbytes
AVR core
8 bit
Speed grade
4–8 MHzFigure 4
RAVENRZ-3290 sensor and AVR JTAGICE-MKII programmer.The experiment evaluated bothW/Halley and the Newton-Raphson method, regarding the iteration count needed to achieve the desired accuracy, and the processing time required.


### 6.1. Computation Accuracy

For positioning purposes, the accuracy of computation is very significant since RSS-based distance measurement is subject to errors like channel fading and interference. As expected, a real test-bed gave unexpected results. Figure5 shows the real test-bed distance error calculated by each method, while there are two different numbers of iterations for the Newton-Raphson method. As can be seen from the figure, the Newton method with 4 iterations achieves more accuracy compared to the results obtained from the simulation for similar method. However, it also shows less accuracy for the 8 iterations one compared to the simulation results (Figure 3). The error by 8 iterations rises to over 5 m in 1000 m distance and grows to 88.36 m for the range of 5000 m, surprisingly different from the simulation results. Meanwhile, the W scheme still shows a steady calculation behavior, giving nearly exact values. Our initial guess is that this error might be due to different round-off errors from different methods.Figure 5
The calculation error under different methods and iterations.


### 6.2. Computation Processing Time

Figure6 shows the time required by each method for one distance calculation in a range from 1 to 5000 m. In order to have more realistic results, the methods are embedded in ATMEL experimental kits and ran 10 times for the whole mentioned range of distances. On one hand, the figure shows the average values of such implementation. The Lambert/Halley scheme takes more than 51 sec with very high accuracy, roughly 8 sec faster than the 4-iteration Newton method with its high error. On the other hand, the 8-iteration Newton method which is supposed to reach the desired accuracy according the simulation results requires 68.75% more processing time (roughly 86.5 sec) for a computation which is not also accurate enough for distances greater than 1500 m.Figure 6
The required processing time by different methods.It is shown that our transmission-loss/distance inversion method using the Lambert function and the Halley iteration is significantly faster and stable compared to the well-known Newton-Raphson method. This work clarifies the differences between simulations and real test-bed implementations of different mathematical methods on low computation ability devices like sensors which might be related to the microcontroller architecture designs. Such differences due to mathematical tools require minutely consideration when it is necessary like in our case for distance measurement.


## 6.1. Computation Accuracy

For positioning purposes, the accuracy of computation is very significant since RSS-based distance measurement is subject to errors like channel fading and interference. As expected, a real test-bed gave unexpected results. Figure5 shows the real test-bed distance error calculated by each method, while there are two different numbers of iterations for the Newton-Raphson method. As can be seen from the figure, the Newton method with 4 iterations achieves more accuracy compared to the results obtained from the simulation for similar method. However, it also shows less accuracy for the 8 iterations one compared to the simulation results (Figure 3). The error by 8 iterations rises to over 5 m in 1000 m distance and grows to 88.36 m for the range of 5000 m, surprisingly different from the simulation results. Meanwhile, the W scheme still shows a steady calculation behavior, giving nearly exact values. Our initial guess is that this error might be due to different round-off errors from different methods.Figure 5
The calculation error under different methods and iterations.


## 6.2. Computation Processing Time

Figure6 shows the time required by each method for one distance calculation in a range from 1 to 5000 m. In order to have more realistic results, the methods are embedded in ATMEL experimental kits and ran 10 times for the whole mentioned range of distances. On one hand, the figure shows the average values of such implementation. The Lambert/Halley scheme takes more than 51 sec with very high accuracy, roughly 8 sec faster than the 4-iteration Newton method with its high error. On the other hand, the 8-iteration Newton method which is supposed to reach the desired accuracy according the simulation results requires 68.75% more processing time (roughly 86.5 sec) for a computation which is not also accurate enough for distances greater than 1500 m.Figure 6
The required processing time by different methods.It is shown that our transmission-loss/distance inversion method using the Lambert function and the Halley iteration is significantly faster and stable compared to the well-known Newton-Raphson method. This work clarifies the differences between simulations and real test-bed implementations of different mathematical methods on low computation ability devices like sensors which might be related to the microcontroller architecture designs. Such differences due to mathematical tools require minutely consideration when it is necessary like in our case for distance measurement.


## 7.TL Alteration

Localization for underwater sensors is a challenging problem which is still under attention of many researchers. Current solution for this problem usually is based on installing some powerful devices on ocean floor communicating with some other devices on ocean surface in order to help sensors identify their location [22]. Most of these techniques were not using RSS as their distance measurement method due to the multipath and shadowing effect on TL, which alters its value in receiver [9]. Based on limitation of RSS, most localization methods in UASN are using Time of Arrival (ToA) method, which needs very precise clock synchronization between sensors—another challenging problem even for terrestrial WSN.In order to identify the accuracy of proposed method when the measuredTL is not accurate. Some experiments have been done. According to [23], TL has the standard deviation of 5 for up to 2000
m underwater with a normal distribution. However, [24] reported the value from 10 to 15 as the standard deviation of TL based on the distance to the foreshore. To measure the worst case scenario, in this research the alteration of TL is modeled based on [24].In simulation setup, two sensor nodes were considered in communication range of each other underwater and not necessarily in the same depth. To make the model as simple as possible, the nodes do not share their information of the distance together. Now, when a sensor receives a packet based on the receivedTL, it calculates the sender distance and saves it in a list. By the next packet it receives, it measures the distance again and saves it to the list again. To identify the estimation distance, the sensor uses a simple likelihood algorithm (geometric mean) to find the best estimation from its distance to the receiver. The simulation has been run for 100 times when receiver just receives 5 packets. The simulation also has been run for receiving 10, 50, 100, 500, and 1000 packets. The experiments have been repeated for various distances between sensors. The distance error where the sensor calculates the distance based on just one received packet is based on [24]. Figures 7 and 8 show the error in distance measurement using TL and geometric mean as a simple likelihood algorithm when a various number of packets has been received in the sensor.The distance calculation error with error correction using geometric mean(
1
).
(a)
After receiving 5 packets
(b)
After receiving 10 packets
(c)
After receiving 50 packetsThe distance calculation error with error correction using geometric mean(
2
).
(a)
After receiving 100 packets
(b)
After receiving 500 packets
(c)
After receiving 1000 packetsThe results show that by increasing the number of received packets in the sensor, the error will be dramatically decreased. For instance, the average estimation error for 100 experiments between two sensors in500
m distance of each other and receiving 1000 packets is about 6
m. However, as it has been shown in the figures, there are still some rare results with high error rate up to 35
m for the same experiment. This indicates that although the proposed geometric mean reduced the amount of error in distance estimation, still some other methods can be added to the algorithm to make it more accurate. For instance, sensors can share their distance tables together in order to reduce the error. Another method can be using the triangulation method when there are more than one neighbors for refining the distance measurement algorithm.


## 8. Conclusions

A new mathematical scheme finds distances among nodes in underwater sensor networks via received signal strength that is presented by a hybrid computation scheme: invert the transmission loss TL using the LambertW function, evaluated by the Halley Method. We compare its efficiency and accuracy with TL inversion through the well-known Newton-Raphson method and show that the computation method influences the accuracy of distance measurement. In simulations the Newton method needs 8 iterations to reach the same accuracy as 4 Halley steps, and in the real test-bed even 8 iterations have substantial error. Moreover, in real test-bed results our scheme is 16.5% faster than the 4-iteration Newton method with high error. Mathematical calculation is thus significant for accurate, cost-effective distance measurement in sensor networks. By considering the alteration in value of TL because of multipath and shadowing effect of underwater, the error in distance measurement is calculated. Furthermore, it has been shown that although the error in distance measurement is very high, using a very simple likelihood method in receiving several samples of TL can dramatically reduce the distance estimation error. As long as the proposed error recovery method is based on two sensors sending data, our future work will be on developing an algorithm for high error recovery and near exact distance measurement using RSS for UASN.



---

*Source: 175275-2014-04-06.xml*