1. Introduction
Underwater Wireless Sensor Networks (UWSNs) typically consists of power-limited terminals capable of computing and communications. UWSNs plays a key role in various applications, such as detection of seabed minerals, investigation of fishery resources, and military purposes, etc. [
1,
2]. Time synchronization is the basis for the collaborative execution of distributed task among a set of synchronized sensor nodes. Each sensor working in a distributed manner has its own clock. Due to the imperfect crystal oscillators [
3], different clocks will drift from each other over time. Most of the applications that employ WSNs demand all of the sensor nodes to run on a common time scale, which highlights the importance of clock synchronization. In addition, data fusion, power management, node positioning, and transmission scheduling all require high-precision time synchronization [
4].
The authors of [
5] comprehensively study the time synchronization algorithm of terrestrial wireless sensor networks, including some widely used time synchronization protocols. However, the clock synchronization protocol for terrestrial wireless networks is not easily applicable to the underwater domain. Underwater sensor networks relying on acoustic signals to communicate have great differences compared to radio communication, due to their high speed of electromagnetic waves [
6]. However, challenges brought by acoustic-based communication such as a large propagation delay, sensor node mobility, ray bending, multipath effects, limited bandwidth, and so on, also add difficulties to UWSNs [
7]. Underwater communication nodes usually move with the ocean at a rate of 0.83–1.67 m/s [
8], and the time-varying propagation delay caused by the slow propagation speed of the acoustic wave and nodes inherent mobility is the keys to the underwater clock synchronization algorithm. The essential work of the clock synchronization for UWSNs is to estimate the clock skew and offset [
9]. Moreover, underwater nodes are resource-constrained. Therefore, it is hard for UWSNs to ensure the accuracy of clock by implementing frequent synchronization process. Existing clock synchronization methods for UWSNs mainly depend on the two-way packet exchanges between the time reference nodes and the nodes to be synchronized. Then, the clock synchronization between two nodes is realized by linear regression using the time stamps carried in sending and receiving data packets. The time synchronization of the entire network, therefore, can be realized through the clock synchronization of pair nodes.
Time synchronization for high latency (TSHL) [
10], the first approach to underwater clock synchronization, proposes a two-phase synchronization algorithm. During phase I, the node clock skew is obtained by performing linear regression over multiple beacon packets; during phase II, clock offset is estimated through the two-way message exchange time-stamps of the MAC layer. However, TSHL assumes that the propagation delay is a constant, which means that nodes must be stationary, so TSHL is only suitable for static UWSNs.
MU-Sync [
11], a cluster-based synchronization algorithm, uses a two-phase method to calculate the clock skew and offset employing the information obtained from message exchanges. The first phase aims to acquire the clock skew and offset by applying twice linear regression over a set of reference modem packets (beacons). The first linear regression enables the cluster head to offset the effect of long and varying propagation delay; the second linear regression is to compensate the original clock and obtain the accurate clock skew and offset. MU-Sync assumes that the propagation delay of a two-way message exchange is the same, which introduces an estimated time error. In phase 2, the synchronization phase, the so-called cluster head broadcasts the clock skew and offset to all the neighboring nodes. EMU-Sync [
12] performs the second linear regression from the perspective of cluster heads and nodes to be synchronized, and takes the mean values of clock skew and offset as the estimated values, thereby outperforming the MU-Sync results.
In D-Sync, the synchronization process is started from a cluster by broadcasting a reference packet, and replied by all the neighboring nodes [
13]. D-Sync employs Doppler measurements to estimate the relative speed between the cluster head and its neighboring nodes. As with MU-Sync, D-Sync is essentially a master–slave approach to handle substantial mobility. D-Sync distinguishes the propagation delays of requests and responses, which enables the synchronization accuracy to exceed the previous approaches. DA-Sync [
14] applies a Kalman filter algorithm to refine the velocity estimation, which achieves marginal improvements over D-Sync.
Mobi-Sync [
15], different from previous approaches, uses the temporal and spatial correlation between mobile nodes to estimate the dynamic propagation delay and the moving velocity of ordinary nodes. Mobi-Sync assumes the networks consist of three types of node: surface buoys equipped with GPS; supernodes, working as reference clocks; inexpensive ordinary nodes of low complexity. In addition, Mobi-Sync does not take into account packet loss, nor receiver node mobility while a packet travels through water. The whole process contains three phases. In phase I, the ordinary node broadcasts the synchronization request to the supernodes to acquire the time-stamps and velocity vectors. Phase II, when the ordinary nodes gather sufficient data points, linear regression is performed to calibrate the clock skew and offset. In the last phase, the calibrated results are reused for the propagation delay measurement in phase I and then reused in phase II to obtain the final accurate clock skew and offset.
Robust Opportunistic Clock Synchronization (ROCS) [
16] proposes a synchronization algorithm that does not depend on the fixed synchronization process. It does not need to send specific data packets for synchronization. It only needs to insert the time-stamps in the data packets of the communication to achieve synchronization. In particular, this algorithm considers the problem of time-stamps loss caused by packet loss during underwater acoustic communication. Through matching sending and receiving time-stamp pairs correctly, the nodes can maintain synchronization even if the communication is interrupted for a long time.
Various localization algorithms have been proposed for UWSNs [
17]. Based on the sensor nodes’ mobility, the authors divide localization algorithms into three categories: stationary localization algorithms, mobile localization algorithms, and hybrid algorithms. Moreover, these algorithms are all TOA-based, which usually suffer from the clock imperfections. Therefore, the time synchronization among pair nodes is required. In addition, there are some algorithms that joint clock synchronization and localization, such as STSL [
18] and JSL [
19]. STSL assumes that the nodes to be synchronized are within the coverage of multiple anchor nodes, equipped with a track derivation navigation system, which simultaneously achieves synchronization and positioning through periodic packet exchanges. JSL proposes a joint time synchronization and localization algorithm based on arrival time, similar to the principle of timing and positioning by GPS. Taking into account node mobility, it uses the time position information sent by four anchor nodes and the speed information provided by its own sensor to obtain the Maximum Likelihood (ML) estimate of the time and location. Modeling the stratification effect of the underwater medium with a ray-tracing approach, GN-JS [
20] employs GaussNewton method to solve the original non-convex ML problem in an iterative manner, and adopts the one-way message exchange approach, which is superior to the STSL and JSL methods in both accuracy and energy efficiency.
To sum up, the majority of prior literature in the field of clock synchronization for UWSNs, except where noted, mainly depends on a series of two-way message exchanges, followed by linear regression to estimate the clock offset and drift, while ignoring the correlation between multiple message exchanges. Furthermore, most synchronization of underwater acoustic sensor networks is based on the clock synchronization between pairwise nodes. The main solutions for nodes mobility can be divided into two ways. One of the representative methods is Mobi-Sync, which utilizes the temporal and spatial correlation between mobile nodes to estimate the dynamic propagation delay and the moving velocity of ordinary nodes. However, this will introduce a large number of supernodes, so more energy will be consumed, which will also limit the scope of applications. The other way is to use Doppler information, that is, the relative speed of the ordinary nodes. Most of the existing methods improperly deal with the uncertainty of the system.
Jointly considering the regularity of sensor nodes mobility and the dynamic propagation delay, we propose a novel pairwise nodes clock synchronization approach: K-Sync. The algorithm models the system as a linear equation with the correlation of multiple bidirectional message exchanges processes, and uses Kalman filters to estimate system state variables, namely clock skew and cumulative clock offset. Moreover, the K-Sync method can achieve high precision clock synchronization merely based on the time-stamps information contained in the message exchanges, while other existing methods additionally require a sensor node’s relative speed or location information acquired by Autonomous Underwater Vehicle (AUV) [
21] or some other measuring equipment.
Our main contribution is summarized as follows: the algorithm does not require additional position sensors or speed sensing device, nor a large number of super-nodes, and can achieve high-precision clock synchronization only based on the time-stamps information in a series of two-way message exchanges. According to the K-Sync algorithm, the recursive equations of the node clock skew, clock offset, relative motion velocity, and relative distance are established by using the general constraints of the motion characteristics of sensor nodes. At the same time, the system observation equation is based on viewing the time-stamps as the observation measurement. Then, the Kalman filter algorithm is used to optimize the normalized clock skew and clock offset of pairwise nodes. The simulation shows that the K-Sync algorithm has obvious advantages in some key performance indicators such as the accuracy of clock skew and offset, convergence speed and network overhead. In addition, the method is more robust to a variety of underwater motion scenes.
3. Method
3.1. System State Equation and Measurement Equation Construction
Defining
as the state variables of synchronizing node, combining (
7), (
9), (
10) and (
11), the state-space update equations
can be described as
Here, the state transition matrix
, can be interpreted as the random disturbance in the evolution equation, that is with zero mean and the covariance matrix .
Assume that the speed of
does not change over a time-stamp exchange and acoustic velocity
c is 1500 m/s. Defining
corresponds to the distances between node
and node
in the
k-th round of time-stamp exchanges at the reference time {
,
,
,
}, respectively, as shown in
Figure 2.
Considering the
k-th round of time-stamp exchanges process, node
sends synchronization request to the reception of that message, there is
The elapsed time between node
replying to the synchronization request and node
receiving a reply is
Combining (
13) and (
14),
can be eliminated
When formula (
13) plus formula (
14), we can obtain
Using the reference clock
to represent the time-stamp clock
. Meanwhile, considering the uncertainties brought by the demodulation of the physical layer during clock synchronization message receiving [
26], a Gaussian error is superimposed on the ideal time value of sending and receiving. As a reference node,
provides the time-stamps with zero accumulated clock offset. We can obtain
As discussed above, the normalized clock skew
of node
remains approximately unchanged during the
k-th round of time-stamp exchanges procedure, so the time stamps
satisfy
The frequency offset of the node’s crystal clock can be lower than 10 ppm, that is (
), (
18) can be approximated as
Applying (
17) and (
19) to (
15) and (
16) gives
Note that Equation (
21) contains nonlinear terms, that is, the product term of the cumulative clock offset
and the relative velocity
of the node to be synchronized. Here, we can use the extended Kalman filter to take the partial differentiation of the system variable on the right side of Equation (
21). Finally, the system observation equation can be expressed as
where
is the observation matrix and
represents the observation noise subjecting to the Gaussian distribution with 0 mean and variance
, respectively.
3.2. Kalman Clock Synchronization Algorithm
Kalman filter is a recursive process and the estimation of system state variables can be obtained, which is an optimal minimum mean square error (MMSE) state estimator under the Gaussian assumption of both the process noise and the measurement noise. The previous state value can be used to predict the new measured value. After obtaining the latest measured value, the current system state can be estimated optimally according to the system observation equation. The Kalman clock synchronization algorithm flow is given in Algorithm 1.
Algorithm 1: Simulated K-Sync Algorithm |
1: Initialize variables
and ,(,). |
2: Iteration |
3: fordo |
4: Run the time-stamps exchanges model between node and node , and calculate observation matrix while obtaining {, , , }. |
5: Prediction step |
6:
|
7: Update step |
8:
|
9: Clock synchronization |
10: Based on the calculated system variable , the real clock time can be computed
|
11:
|
12: Wait for the next round of two-way time-stamp exchanges, then go to step 6. |
13: end for |
3.3. Clock Parameters Initialization
Note that before K-Sync clock parameters tracking algorithm starts, it is necessary to set the initial estimated system value , the initial covariance matrix of the system variable estimation error, the covariance of system equation error, and the covariance of the observation equation error.
The initial system value , system variables contains the normalized clock skew , accumulated clock offset , relative speed , and the distance to the reference node . Since the normalized clock skew estimation cannot be obtained in advance and the clock skew deviation of the two nodes is less than 10 ppm, it can be set roughly to 1. Cumulative clock offset can be calculated roughly as an initial value through a single send-to-receive two-way message exchange. can be set to 0 m/s. can be calculated by the product of the propagation delay and the speed of sound. Although the initial value is set using the first measurement, it can be used as a rough estimate of the initial value without affecting the first Kalman filter iterative process.
The covariance of the initial estimation error of system variable is
Since there is no referential information for the initially normalized clock skew offset, the initial variance of the normalized clock frequency can be set to the square of the maximum normalized clock frequency of the crystal. The error of the normalized clock skew is not independent of the error of the accumulated clock offset. It can be seen from Equation (
9), there is a linear relationship between them, which is related to the bidirectional interactive time interval of the node synchronization process. The correlation should be considered when setting the initial value. Similarly, there is no reliable source of information for the initial value of relative velocity. According to experience, the variance of the underwater node velocity can be set to the square of the underwater passive node maximum speed of 1.67 m/s [
8]. The distance between the node to be synchronized and the reference node, as shown in (
11), is not independent of each other, has a linear relationship with the relative velocity error. Considering that the initial value of the relative distance is initially estimated by the propagation delay, the initial covariance of the relative velocity can be appropriately reduced.
is the covariance matrix of the systematic error. It can be seen from the noise term of the system that the clock skew is affected by the crystal oscillator parameters; the cumulative clock offset is affected by the clock skew; the movement of the node is affected by ocean currents, and its speed change can be considered as Gaussian noise with zero mean, and the variance is affected by the actual underwater environment.
is the covariance matrix of the observation equation. The observation value is the time-stamp generated by the synchronization message exchanges between the nodes. The domain error is the uncertainty of the underwater acoustic propagation path and the interrupt processing of the signal transmission and reception process and the delay of the bit alignment. These noises are all zero-mean Gaussian noise and are independent of each other.
3.4. Cramér–Rao Lower Bound Error Analysis
Cramér-Rao lower bound (CRLB) is widely used to evaluate the performance of filters and provides the best mean square error a filter can achieve. The CRLB for estimating the error at time
k has the following form
where
is Fisher information matrix
The calculation of Fisher information matrix
obeys the following recursive formula [
27]
where
For the following nonlinear system,
For system model (
28), assuming the noise is subject to a Gaussian distribution, then conditional probability density function has
Using (
29) and the notations in (
27), (
27) can be written as
Substituting (
30) into (
26), we can obtain
The CRLB of state estimation errors is .