Next Article in Journal
Health Condition Estimation of Bearings with Multiple Faults by a Composite Learning-Based Approach
Previous Article in Journal
Addressing the Data Acquisition Paradigm in the Early Detection of Pediatric Foot Deformities
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Pair Nodes Clock Synchronization Algorithm Based on Kalman Filter for Underwater Wireless Sensor Networks

School of Informatics, Xiamen University, Xiamen 361005, China
*
Author to whom correspondence should be addressed.
Sensors 2021, 21(13), 4426; https://doi.org/10.3390/s21134426
Submission received: 24 May 2021 / Revised: 17 June 2021 / Accepted: 24 June 2021 / Published: 28 June 2021
(This article belongs to the Section Sensor Networks)

Abstract

:
Time synchronization is the basis of many applications. Aiming at the limitations of the existing clock synchronization algorithms in underwater wireless sensor networks, we propose a pairwise synchronization algorithm called K-Sync, which is based on the Kalman filter. The algorithm does not need the assistance of the position sensor or the speed sensor, and the high time synchronization accuracy can be realized only by utilizing the time-stamps information in the process of message exchange. The K-Sync uses the general constraints of the motion characteristics of the sensor nodes to establish the recursive equations of the clock skew, clock offset, relative mobility velocity, and relative distance. At the same time, the time-stamps are viewed as the observation variables and the system observation equation is obtained. The K-Sync estimates the normalized clock skew and offset of the node via the Kalman filter to achieve high-precision clock synchronization between the two nodes. The simulation shows that the K-Sync has obvious advantages in the key indicators such as the estimated accuracy of clock skew and clock offset, convergence speed, etc. In addition, the K-Sync is more robust to a variety of underwater motion scenes.

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.

2. Theoretical Background

The main challenge of underwater sensor node clock synchronization are the dynamic propagation delay and the unsynchronized clocks between the pairwise nodes, which severely degrade the performance of global clock synchronization for the previously proposed synchronization algorithms in UWSNs. In this section, we first describe the message exchange model of the pairwise nodes. Then, the clock model and the pairwise synchronization approach are presented.

2.1. Overview of Clock Synchronization

There are typically two approaches for exchanging time synchronization messages to achieve clock synchronization in UWSNs: one-way message dissemination and two-way message exchanges. In the former, the propagation delay cannot be eliminated and the synchronization accuracy is low. Two-way message exchange, known as round-trip synchronization, is more accurate but less efficient compared to the one-way message dissemination. In order to improve the synchronization accuracy, the two-way message exchange is adopted in K-Sync, as shown in Figure 1.
In the two-way message exchange for time synchronization, assuming S i is the node to be synchronized and the node S j is the reference node, as illustrated in Figure 1, each round of time-stamp exchange includes the process of sending a synchronization message by the node to be synchronized and returning a reply message by the reference node. High precision clock synchronization is achieved through multiple rounds of time-stamp message exchanges [22]. Response time is the interval from the reference node receiving the synchronization request to returning the replied message to the node to be synchronized. The time interval between two rounds of time-stamp exchange, that is, the time interval between two synchronization requests, is initiated by the node to be synchronized. For the k-th round-trip message exchange process, a complete two-way message exchange is described as shown in Figure 1. S j initiates a round-trip synchronous message exchange with its sending time T 1 j ( k ) . After a propagation delay, S i receives the request message at time T 2 i ( k ) and replies S j at the time T 3 i ( k ) . Then, S j records the reception time T 4 j ( k ) of node S i ’s reply. According to the above steps, after the k-th time synchronization message exchange finishes, we can obtain k sets of time stamps { T 1 j ( 1 ) , T 2 i ( 1 ) , T 3 i ( 1 ) , T 4 j ( 1 ) ; T 1 j ( 2 ) , T 2 i ( 2 ) , T 3 i ( 2 ) , T 4 j ( 2 ) ; ; T 1 j ( k ) , T 2 i ( k ) , T 3 i ( k ) , T 4 j ( k ) }.

2.2. Frequency Offset and Accumulated Clock Offset

Each individual sensor has its own clock, which is essentially a counter driven by a low-cost uncompensated crystal oscillator [23]. According to the characteristics of the crystal oscillator, the sensor node has an analog clock [24]:
p i ( t ) = cos Φ i ( t ) .
Here, Φ i ( t ) is the instantaneous phase, which evolves as
Φ i ( t ) = 2 π ( f 0 + Δ f i ) t + Φ i ( 0 ) + ζ i ( t )
where Φ i ( t ) is the nominal frequency of crystal oscillator and Δ f i is the frequency offset caused by hardware imperfection. Φ i ( 0 ) is the initial phase, ζ i ( t ) = 2 π f 0 q i B ( t ) is a random process modeling phase noise. q i is a parameter describing degree of phase noise. B ( t ) represents the standard Wiener process [25]. Based on (2), the clock reading of node S i can be expressed as
c i ( t ) = Φ i ( t ) 2 π f 0 = f 0 + Δ f f 0 t + Φ i ( 0 ) 2 π f 0 + ζ i ( t ) 2 π f 0 = f i t + θ i 0 + q i B ( t ) ,
where f i is the normalized frequency, and  θ i 0 represents the initial clock offset. Defining the cumulative clock offset
ϑ i ( t ) = c i ( t ) t ,
for any discrete observation time t 1 , t 2 , , t l , , we can obtain
ϑ i ( t l ) ϑ i ( t l 1 ) = c i ( t l ) c i ( t l 1 ) ( t l t l 1 ) = ( f i 1 ) ( t l t l 1 ) + q i [ B i ( t l ) B i ( t l 1 ) ] = ( f i + q i [ B i ( t l ) B i ( t l 1 ) ] t l t l 1 1 ) ( t l t l 1 ) .
Assuming uniform sampling( t l t l 1 = τ 0 ), the time-varing clock offset can be defined as
β i ( t l ) = f i + q i B i ( t l ) B i ( t l 1 ) τ 0 .
According to the properties of standard Wiener process, we know that β i ( t l ) N ( f i , q i τ 0 ) . Furthermore, the time-varying clock skew of node S i can described as the Gauss–Markov model
β i ( t l ) = β i ( t l 1 ) + q i [ B i ( t l ) B i ( t l 1 ) τ 0 B i ( t l 1 ) B i ( t l 2 ) τ 0 ] = β i ( t l 1 ) + u i ( t l ) .
where u i ( t l ) is the Gaussian noise with zero mean and variance σ u 2 = 2 q i τ 0 . Then, we can rewrite the cumulative clock offset ϑ i ( t l ) in a recursive form    
ϑ i ( t l ) = ϑ i ( t l 1 ) + ( β i ( t l ) 1 ) τ 0 .
Substituting (7) into (8) gives
ϑ i ( t l ) = ϑ i ( t l 1 ) + β i ( t l 1 ) τ 0 + u i ( t l ) τ 0 τ 0 .

2.3. Sensor Node Mobility

Assuming that the reference node S j is completely fixed, S i will move within a certain range with the flow of water. In the process of two successive round-trip message exchanges, it can be assumed that the speed of the node to be synchronized relative to the standard clock reference node is constant, and the speed error is δ v caused by this assumption. Then, the speed relationship of S i between two rounds of time-stamp exchanges can be formulated as
v i ( k ) = v i ( k 1 ) + δ v ,
Based on (10), assuming that S i moves at a constant speed, τ 0 is the time interval between two successive message exchanges and δ d is the distance error, the distance from S i to S j can be expressed as
d i j ( k ) = d i j ( k 1 ) + τ 0 v i ( k 1 ) + δ d .

3. Method

3.1. System State Equation and Measurement Equation Construction

Defining x ( k ) = [ β i ( k ) ϑ i ( k ) v i ( k ) d i j ( k ) ] T as the state variables of synchronizing node, combining (7), (9), (10) and (11), the state-space update equations x ( k ) can be described as
x ( k ) = A ( k ) x ( k 1 ) + b ( k ) + ω ( k ) .
Here, the state transition matrix
A ( k ) = 1 0 0 0 τ 0 1 0 0 0 0 1 0 0 0 τ 0 1
b ( k ) = [ 0 τ 0 0 0 ] T , ω ( k ) can be interpreted as the random disturbance in the evolution equation, that is ω ( k ) = [ u i ( k ) τ 0 u i ( k ) δ v δ d ] T with zero mean and the covariance matrix E [ ω ( k ) ω T ( k ) ] .
Assume that the speed of S i does not change over a time-stamp exchange and acoustic velocity c is 1500 m/s. Defining d l i j ( k ) ( l = 1 , 2 , 3 , 4 ) corresponds to the distances between node S j and node S i in the k-th round of time-stamp exchanges at the reference time { t 1 j ( k ) , t 2 i ( k ) , t 3 i ( k ) , t 4 j ( k ) }, respectively, as shown in Figure 2.
Considering the k-th round of time-stamp exchanges process, node S j sends synchronization request to the reception of that message, there is
t 2 i ( k ) t 1 j ( k ) = d 2 i j ( k ) c = d 1 i j ( k ) + ( t 2 i ( k ) t 1 j ( k ) ) v j ( k ) c .
The elapsed time between node S i replying to the synchronization request and node S j receiving a reply is
t 4 j ( k ) t 3 i ( k ) = d 3 i j ( k ) c = d 1 i j ( k ) + ( t 3 i ( k ) t 1 j ( k ) ) v j ( k ) c .
Combining (13) and (14), d 1 i j ( k ) can be eliminated
t 2 i ( k ) + t 3 i ( k ) t 1 j ( k ) t 4 j ( k ) = ( t 2 i ( k ) t 3 i ( k ) ) v j ( k ) c .
When formula (13) plus formula (14), we can obtain
t 2 i ( k ) + t 4 j ( k ) t 1 j ( k ) t 3 i ( k ) = ( t 2 i ( k ) + t 3 i ( k ) 2 t 1 j ( k ) ) v j ( k ) + 2 d 1 i j ( k ) c .
Using the reference clock t l i , j ( k ) to represent the time-stamp clock T l i , j ( k ) . 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, S j provides the time-stamps with zero accumulated clock offset. We can obtain
T 1 j ( k ) = t 1 j ( k ) + δ 1 ( k ) , T 4 j ( k ) = t 4 j ( k ) + δ 4 ( k ) .
As discussed above, the normalized clock skew β i ( k ) of node S i remains approximately unchanged during the k-th round of time-stamp exchanges procedure, so the time stamps T l i ( k ) satisfy
T 2 i ( k ) = t 2 i ( k ) + ϑ i ( k ) + [ β i ( k ) 1 ] [ d 2 i j ( k ) / c ] + δ 2 ( k ) , T 3 i ( k ) = t 3 i ( k ) + ϑ i ( k ) + [ β i ( k ) 1 ] [ d 2 i j ( k ) / c ] + δ 3 ( k ) .
The frequency offset of the node’s crystal clock can be lower than 10 ppm, that is ( β i ( k ) 1 ) 1 × 10 5 ), (18) can be approximated as
T 2 i ( k ) = t 2 i ( k ) + ϑ i ( k ) + δ 2 ( k ) , T 3 i ( k ) = t 3 i ( k ) + ϑ i ( k ) + δ 3 ( k ) .
Applying (17) and (19) to (15) and (16) gives
T 2 i ( k ) + T 3 i ( k ) T 1 j ( k ) T 4 j ( k ) = [ ( T 2 i ( k ) T 3 i ( k ) ) v i ] / c + 2 ϑ i ( k ) + δ 2 ( k ) + δ 3 ( k ) .
T 2 i ( k ) + T 4 j ( k ) T 1 j ( k ) T 3 i ( k ) = [ ( T 2 i ( k ) + T 3 i ( k ) 2 T 1 j ( k ) 2 ϑ i ( k ) ) v i + 2 d 1 i j ( k ) ] / c + δ 2 ( k ) + δ 4 ( k ) δ 1 ( k ) δ 3 ( k ) .
Note that Equation (21) contains nonlinear terms, that is, the product term of the cumulative clock offset ϑ i ( k ) and the relative velocity v i ( k ) 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
y ( k ) = H ( k ) x ( k ) + v ( k ) = [ T 2 i ( k ) + T 3 i ( k ) T 1 j ( k ) T 4 j ( k ) , T 2 i ( k ) + T 4 j ( k ) T 1 j ( k ) T 3 i ( k ) ] T .
H ( k ) = 0 2 [ T 2 i ( k ) T 3 i ( k ) ] / c 0 0 2 v i ( k 1 ) / c ( T 2 i ( k ) + T 3 i ( k ) 2 T 1 j ( k ) 2 ϑ i ( k 1 ) ) 2 / c .
where H ( k ) is the observation matrix and v ( k ) = [ v 1 ( k ) v 2 ( k ) ] T represents the observation noise subjecting to the Gaussian distribution with 0 mean and variance 2 σ 2 , 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 x ( 0 ) and P ( 0 | 0 ) ,( Q ( 0 ) , R ( 0 ) ).
2: Iteration
3: for k = 1 , 2 , 3 N do
4:  Run the time-stamps exchanges model between node S j and node S i , and calculate observation matrix y ( k ) while obtaining { T 1 j ( k ) , T 2 i ( k ) , T 3 i ( k ) , T 4 j ( k ) }.
5:  Prediction step
6:
x ^ ( k | k 1 ) = A ( k 1 ) x ^ ( k 1 | k 1 ) + b ( k 1 ) , P ( k | k 1 ) = A ( k 1 ) P ( k 1 | k 1 ) A ( k 1 ) T + Q ( k ) , K ( k ) = P ( k | k 1 ) H T ( k ) ( H ( k ) P ( k | k 1 ) H T ( k ) + R ( k ) ) 1 .
7:  Update step
8:     
x ^ k | k = K ( k ) y ( k ) + [ I K ( k ) ] x ^ k | k 1 , P ( k | k ) = [ I K ( k ) ] P ( k | k 1 ) .
9:  Clock synchronization
10:  Based on the calculated system variable x ( k ) , the real clock time t ^ can be computed
11:
t ^ = T i ( t ) θ i 0 β i ( k ) , θ i 0 = ϑ i ( k ) ( β i ( k ) 1 ) i = 1 N τ i .
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 x ^ + 0 , the initial covariance matrix P ^ + 0 of the system variable estimation error, the covariance Q of system equation error, and the covariance R of the observation equation error.
The initial system value x ^ + 0 = E [ x ( 0 ) ] , system variables x ( k ) = [ β i ( k ) ϑ i ( k ) v i ( k ) d i j ( k ) ] T contains the normalized clock skew β i , accumulated clock offset ϑ i , relative speed v i , and the distance d i j to the reference node S j . 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. v i can be set to 0 m/s. d i j 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 P ^ + 0 = E [ x ^ + 0 x ( 0 ) ] [ x ^ + 0 x ( 0 ) ] T . 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.
Q is the covariance matrix of the systematic error. It can be seen from the noise term of the system that the clock skew β i 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.
R 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
C R L B k = Δ J k 1 ,
where J k is Fisher information matrix
J k = E 2 ln p ( x 1 : k , y 1 : k ) x k 2 .
The calculation of Fisher information matrix J k obeys the following recursive formula [27]
J k = D k 22 D k 21 ( J k 1 + D k 11 ) 1 D k 12 .
where
D k 11 = E 2 ln p ( x k | x k 1 ) x k 1 2 , D k 12 = E 2 ln p ( x k | x k 1 ) x k 1 x k = [ D k 21 ] T , D k 22 = E 2 ln p ( x k | x k 1 ) x k 2 + E 2 ln p ( y k | x k ) x k 2 .
For the following nonlinear system,
x ( k ) = A ( k ) x ( k 1 ) + b ( k ) + ω ( k ) , y ( k ) = H ( k ) x ( k ) + ν ( k ) ,
For system model (28), assuming the noise is subject to a Gaussian distribution, then conditional probability density function has
p ( x k | x k 1 ) = 1 2 π Q k 1 exp w k T Q k 1 w k 2 , p ( y k | x k ) = 1 2 π R k exp v k T R k 1 v k 2 .
Using (29) and the notations in (27), (27) can be written as
D k 11 = A K 1 T Q k 1 1 A k 1 D k 12 = A K 1 T Q k 1 1 = [ D k 21 ] T D k 22 = Q k 1 1 + H k T R k 1 H k
Substituting (30) into (26), we can obtain
J k = Q k 1 1 + H k T R k 1 H k Q k 1 1 A k 1 ( J k 1 + A k 1 T Q k 1 1 A k 1 ) 1 A k 1 T Q k 1 1 .
The CRLB of state estimation errors is C R L B k = Δ J k 1 .

4. Results and Analysis

In this section, we conduct extensive MATLAB simulations to evaluate the performance of K-Sync under different underwater mobility scenarios, including a uniform motion model and a classical kinematic model (Euler Model) [28]. The simulation parameters are described later. Finally, the synchronization accuracy under different underwater scenarios is compared with that of MU-Sync [11] and D-Sync algorithms [13].

4.1. Simulation Setup

Unless specified otherwise, the simulation parameters are set as listed in Table 1. Transmission and reception time jitters are caused by the uncertainty of acoustic modems. Generally, the time jitter is regarded as zero-mean Gaussian noise.

4.2. Motion Model

Model 1: The node to be synchronized relative to the reference node can be set as 1.67 m/s [8], and then the Gaussian noise with a zero-mean variance of 0.1 m/s is superimposed on it.
Model 2: The classical Kinematic model, also known as Euler model, is used to simulate the underwater node motion. The node velocities are modeled as [28].
V x = k 1 λ v sin ( k k 2 x ) cos ( k k 3 y ) + k 1 λ cos ( 2 k k 1 t ) + k 4 V y = λ v cos ( k k 2 x ) sin ( k k 3 y ) + k 5
where V x and V y denote the velocity along the X- and Y-axes, respectively. x and y correspond to the current horizontal and vertical coordinate value of the node location. k 1 , k 2 , k 3 , λ and v are the random parameters changing with different environmental factors such as bathymetry and water composition. Variable k 4 and k 5 means random addictive noise. Coefficient k controls how fast the speed changes. According to empirical observations, we assume all random variables considered in the kinematic model are subject to normal distribution. The numerical values of these variables are set as Table 2. The movement trajectory of nodes is shown in Figure 3.

4.3. Number of Synchronized Rounds

In the scenario of uniform motion, it can be seen from Figure 4 that the clock parameters estimation error of the K-Sync clock synchronization algorithm decreases continuously with the increase in the number of two-way message exchanges, and gradually approaches its theoretical Cramér–Rao lower bound. Although the clock parameter estimation error of MU-Sync and D-Sync converges, there is always a fixed difference between them and Cramér–Rao lower bound.
In the scenario of Euler random motion, the motion of the node to be synchronized is relatively random. As can be seen from Figure 5, the error of clock parameters estimation of the three clock synchronization algorithms converges continuously with the increase in the number of two-way message exchange between the sender and the receiver. When the number of sending and receiving two-way messages is large, the clock parameters estimation error of K-Sync is first close to its theoretical Cramér–Rao lower, followed by that of D-Sync, and the last is MU-Sync. Compared with the scenario of uniform motion, the clock offset estimation error of the K-Sync in Euler random motion scene increases. As the velocity model of the node to be synchronized in K-Sync is not suitable for the Euler random motion, the noise covariance of the system cannot be well estimated. Moreover, K-Sync adopts fixed Q and R , which leads to its slow convergence speed, and there is a certain deviation between the convergence result and its theoretical Cramér–Rao lower bound.

4.4. Error after Synchronization

Figure 6 demonstrates how synchronization errors grow after time synchronization when time going by, with the methods of K-Sync, MU-Sync, and D-Sync. In this scenario, the K-Sync outperforms better than both MU-Sync and D-Sync. The performance of the MU-Sync algorithm is the worst because it is assumed that the propagation delay of each round of message exchanges is constant. Although D-Sync takes into account the relative velocities between nodes and distinguishes the different propagation delays between the request phase and the response phase, it applies the estimated speed of sound directly to the synchronization process calculation, the error is still large. The K-Sync assumes that the nodes to be synchronized are moving at a constant speed and that the speed remains unchanged during two successive message exchanges, and allows the velocity value to have some noise, which can be estimated optimally by the Kalman filter. Therefore, K-Sync can achieve high clock accuracy in uniform motion scenario.

4.5. Response Time and Message Exchanges Interval

As can be seen from Figure 7 and Figure 8, for K-Sync, MU-Sync, and D-Sync, no matter in which scenario, the estimated mean of the clock skew gradually deviates from the true value, and the variance also increases with response time increasing. The MU-Sync does not consider the mobility of the node in one round of time-stamp exchange. The longer the response time of the node is, the greater the uncertainty of the moving distance in the response time is, so the clock synchronization accuracy decreases as the response time increases. The error of the D-Sync grows the slowest because it takes into account the relative mobility of the nodes. For the K-Sync, it is clear that the error of the measurement equation of the system grows with the response time, which finally results in an increase in the error of clock synchronization.
Comparing Figure 7 and Figure 8, it can be seen that in the constant motion scenario, the synchronization error of K-Sync and D-Sync is lower than that of the random motion scenario. This is as the randomness of the motion increases, as the interaction interval increases, the estimation error of the synchronization algorithm to the speed also increases, which leads to a decrease in the synchronization accuracy. For MU-Sync, because it does not consider the relative movement between nodes, the clock synchronization errors in the two scenarios are similar.
Figure 9 and Figure 10 show the relationship between message exchanges interval and clock skew estimation error. When the node to be synchronized is in a uniform motion scenario, the speed value does not change much during two adjacent two-way message exchanges, and the relative distance between the two nodes does not change much. The K-Sync algorithm has a better clock parameter estimation effect under the condition of a long send-interaction two-way message exchange interval.
In the random motion scenario, the greater the message exchange interval, the greater the random mobility of the node to be synchronized, the speed relevance of two adjacent sending-receiving two-way message exchanges decreases, and the system’s estimation error of speed also increases. For K-Sync, the recurrence equation of the system time state of its clock skew and accumulated clock offset takes into account the influence of the exchange interval, so as to compensate for the estimation of the clock parameters by the error in the observation to a certain extent. Therefore, in Figure 10, K-Sync is superior to the other two algorithms. However, compared with Figure 9, due to the random movement between nodes, the error variance of clock parameter estimation of K-Sync will not decrease with the increase in message exchange interval, and the stability of clock synchronization algorithm is affected by the environment.

5. Discussion

Efficient cooperation of sensor networks is founded on the basis of clock synchronization. The spatial correlation of nodes and Doppler information are recently employed to track the time-varying clock parameters to improve synchronization accuracy, but the correlation between the two message exchanges is ignored. This paper proposes a time synchronization algorithm called Kalman clock synchronization algorithm. The K-Sync only requires the time-stamps information in the process of message exchange without additional sensor information. By analyzing the motion properties of the sensor nodes in the synchronization process, the recursive equations of the clock skew, clock offset, relative motion velocity, and relative distance are established on the premise that the node speed between two messages bidirectional interactive is a constant. The time-stamp is viewed as observation variables, and the observation equation of the system is established. Finally, the Kalman filter method is used to obtain the optimal estimate of the clock parameters. The simulation results show that the K-Sync algorithm achieves higher accuracy when the number of message exchange is small, especially under the condition of a small two-way message exchanges interval and short response time. In addition, the K-Sync can maintain long-term accuracy of clock parameters and is robust to various sports scenes.

Author Contributions

All authors contributed to the theoretical development and writing of this article. Conceptualization, X.N. and T.L.; methodology, X.N.; software, T.L., X.N. and S.Y.; validation, S.Y. and Y.Z.; investigation, S.Y., Y.Z. and P.C.; writing—original draft preparation, X.N. and T.L.; writing—review and editing, X.N., S.Y. and L.C. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the Natural Science Foundation of China (Grant No. 61601388).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Heidemann, J.; Stojanovic, M.; Zorzi, M. Underwater sensor networks: Applications, advances and challenges. Philos. Trans. R. Soc. A Math. Phys. Eng. Sci. 2012, 370, 158–175. [Google Scholar] [CrossRef] [PubMed]
  2. Akyildiz, I.F.; Pompili, D.; Melodia, T. Underwater acoustic sensor networks: Research challenges. Ad Hoc Netw. 2005, 3, 257–279. [Google Scholar] [CrossRef]
  3. Walls, F.L.; Vig, J.R. Fundamental limits on the frequency stabilities of crystal oscillators. IEEE Trans. Ultrason. Ferroelectr. Freq. Control 1995, 42, 576–589. [Google Scholar] [CrossRef]
  4. Jin, Z.; Ding, M.; Luo, Y.; Li, S. Integrated time synchronization and multiple access protocol for underwater acoustic sensor networks. IEEE Access 2019, 7, 101844–101854. [Google Scholar] [CrossRef]
  5. Wang, X.; Jeske, D.; Serpedin, E. An overview of a class of clock synchronization algorithms for wireless sensor networks: A statistical signal processing perspective. Algorithms 2015, 8, 590–620. [Google Scholar] [CrossRef]
  6. Liu, G.; Yan, S.; Mao, L.; Sui, Z. Time Synchronization and Clock Parameter Estimation for Wireless Sensor Networks with Unequal Propagation Delays. In Proceedings of the 2020 IEEE International Conference on Signal Processing, Communications and Computing (ICSPCC), Macau, China, 21–24 August 2020; pp. 1–6. [Google Scholar]
  7. Liu, J.; Wang, Z.; Peng, Z.; Zuba, M.; Cui, J.H.; Zhou, S. TSMU: A time synchronization scheme for mobile underwater sensor networks. In Proceedings of the 2011 IEEE Global Telecommunications Conference—GLOBECOM 2011, Houston, TX, USA, 5–9 December 2011; pp. 1–6. [Google Scholar]
  8. Xie, P.; Zhou, Z.; Peng, Z.; Cui, J.H.; Shi, Z. SDRT: A reliable data transport protocol for underwater sensor networks. Ad Hoc Netw. 2010, 8, 708–722. [Google Scholar] [CrossRef]
  9. Luo, B.; Wu, Y.C. Distributed clock parameters tracking in wireless sensor network. IEEE Trans. Wirel. Commun. 2013, 12, 6464–6475. [Google Scholar] [CrossRef] [Green Version]
  10. Syed, A.A.; Heidemann, J.S. Time Synchronization for High Latency Acoustic Networks. In Proceedings of the Infocom, Barcelona, Spain, 23–29 April 2006; Volume 12. [Google Scholar]
  11. Chirdchoo, N.; Soh, W.S.; Chua, K.C. MU-Sync: A time synchronization protocol for underwater mobile networks. In Proceedings of the 3rd ACM International Workshop on Underwater Networks, San Francisco, CA, USA, 15 September 2008; pp. 35–42. [Google Scholar]
  12. Vonlopvisut, P.; Annur, R.; Wuttisittikulkij, L.; Chridchoo, N. Enhancement of MU-Sync: A Time Synchronization Protocol for Underwater Mobile Networks. In Proceedings of the 29th International Technical Conference on Circuit/Systems Computers and Communications, Phuket, Thailand, 1–4 July 2014. [Google Scholar]
  13. Lu, F.; Mirza, D.; Schurgers, C. D-sync: Doppler-based time synchronization for mobile underwater sensor networks. In Proceedings of the Fifth ACM International Workshop on UnderWater Networks, Woods Hole, MA, USA, 30 September–1 October 2010; pp. 1–8. [Google Scholar]
  14. Liu, J.; Wang, Z.; Zuba, M.; Peng, Z.; Cui, J.H.; Zhou, S. DA-Sync: A Doppler-assisted time-synchronization scheme for mobile underwater sensor networks. IEEE Trans. Mob. Comput. 2013, 13, 582–595. [Google Scholar] [CrossRef]
  15. Liu, J.; Zhou, Z.; Peng, Z.; Cui, J.H.; Zuba, M.; Fiondella, L. Mobi-sync: Efficient time synchronization for mobile underwater sensor networks. IEEE Trans. Parallel Distrib. Syst. 2012, 24, 406–416. [Google Scholar] [CrossRef]
  16. Vermeij, A.; Munafò, A. A robust, opportunistic clock synchronization algorithm for ad hoc underwater acoustic networks. IEEE J. Ocean. Eng. 2015, 40, 841–852. [Google Scholar] [CrossRef]
  17. Han, G.; Jiang, J.; Shu, L.; Xu, Y.; Wang, F. Localization algorithms of underwater wireless sensor networks: A survey. Sensors 2012, 12, 2026–2061. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  18. Diamant, R.; Lampe, L. Underwater localization with time-synchronization and propagation speed uncertainties. IEEE Trans. Mob. Comput. 2012, 12, 1257–1269. [Google Scholar] [CrossRef]
  19. Liu, J.; Wang, Z.; Cui, J.H.; Zhou, S.; Yang, B. A joint time synchronization and localization design for mobile underwater sensor networks. IEEE Trans. Mob. Comput. 2015, 15, 530–543. [Google Scholar] [CrossRef]
  20. Zhang, B.; Wang, H.; Zheng, L.; Wu, J.; Zhuang, Z. Joint synchronization and localization for underwater sensor networks considering stratification effect. IEEE Access 2017, 5, 26932–26943. [Google Scholar] [CrossRef]
  21. Hyakudome, T.; Nakatani, T.; Yoshida, H.; Tani, T.; Ito, H.; Sugihara, K. Development of fuel cell system for long cruising lange Autonomous Underwater Vehicle. In Proceedings of the 2016 IEEE/OES Autonomous Underwater Vehicles (AUV), Tokyo, Japan, 6–9 November 2016; pp. 165–170. [Google Scholar]
  22. Maróti, M.; Kusy, B.; Simon, G.; Lédeczi, A. The flooding time synchronization protocol. In Proceedings of the 2nd International Conference on Embedded Networked Sensor Systems, Baltimore, MD, USA, 3–5 November 2004; pp. 39–49. [Google Scholar]
  23. Serpedin, E.; Chaudhari, Q.M. Synchronization in Wireless Sensor Networks: Parameter Estimation, Performance Benchmarks, and Protocols; Cambridge University Press: Cambridge, UK, 2009. [Google Scholar]
  24. Simeone, O.; Spagnolini, U.; Bar-Ness, Y.; Strogatz, S.H. Distributed synchronization in wireless networks. IEEE Signal Process. Mag. 2008, 25, 81–97. [Google Scholar] [CrossRef]
  25. Demir, A.; Mehrotra, A.; Roychowdhury, J. Phase noise in oscillators: A unifying theory and numerical methods for characterization. IEEE Trans. Circuits Syst. I Fundam. Theory Appl. 2000, 47, 655–674. [Google Scholar] [CrossRef] [Green Version]
  26. Kopetz, H.; Ochsenreiter, W. Clock synchronization in distributed real-time systems. IEEE Trans. Comput. 1987, 100, 933–940. [Google Scholar] [CrossRef]
  27. Tichavsky, P.; Muravchik, C.H.; Nehorai, A. Posterior Cramér-Rao bounds for discrete-time nonlinear filtering. IEEE Trans. Signal Process. 1998, 46, 1386–1396. [Google Scholar] [CrossRef] [Green Version]
  28. Bagtzoglou, A.C.; Novikov, A. Chaotic Behavior and Pollution Dispersion Characteristics in Engineered Tidal Embayments: A Numerical Investigation 1. JAWRA J. Am. Water Resour. Assoc. 2007, 43, 207–219. [Google Scholar] [CrossRef]
Figure 1. Two-way timing message exchange model.
Figure 1. Two-way timing message exchange model.
Sensors 21 04426 g001
Figure 2. Distance representation in the k-th round-trip message exchanges process.
Figure 2. Distance representation in the k-th round-trip message exchanges process.
Sensors 21 04426 g002
Figure 3. Node motion trajectory under Euler model.
Figure 3. Node motion trajectory under Euler model.
Sensors 21 04426 g003
Figure 4. Clock parameters estimation error vs. number of synchronized rounds (Model 1).
Figure 4. Clock parameters estimation error vs. number of synchronized rounds (Model 1).
Sensors 21 04426 g004
Figure 5. Clock parameters estimation error vs. number of synchronized rounds (Model 2).
Figure 5. Clock parameters estimation error vs. number of synchronized rounds (Model 2).
Sensors 21 04426 g005
Figure 6. Clock error vs. time after sync (Model 1).
Figure 6. Clock error vs. time after sync (Model 1).
Sensors 21 04426 g006
Figure 7. Performance with response time (Model 1).
Figure 7. Performance with response time (Model 1).
Sensors 21 04426 g007
Figure 8. Performance with response time (Model 2).
Figure 8. Performance with response time (Model 2).
Sensors 21 04426 g008
Figure 9. Effect of message exchanges interval (Model 1).
Figure 9. Effect of message exchanges interval (Model 1).
Sensors 21 04426 g009
Figure 10. Effect of message exchanges interval (Model 2).
Figure 10. Effect of message exchanges interval (Model 2).
Sensors 21 04426 g010
Table 1. Simulation Parameter [10].
Table 1. Simulation Parameter [10].
ParametersValue
Initial relative distance400
Response time0.1 s
Message exchanges interval10 s
Number of message exchanges15
Time jitter variance15 s
Acoustic velocity of sound1500 m/s
Simulation run2000
Table 2. Parameters Setting.
Table 2. Parameters Setting.
SettingValue
k 1 N ( π , 0.1 π )
k 2 N ( π , 0.1 π )
k 3 N ( 0.2 π , 0.2 π )
k 4 N ( 1 , 0.1 )
k 5 N ( 1 , 0.1 )
λ N ( 0.3 , 0.03 )
v N ( 1 , 0.1 )  m/s
k0.01
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Ni, X.; Lu, T.; Ye, S.; Zheng, Y.; Chen, P.; Chen, L. Pair Nodes Clock Synchronization Algorithm Based on Kalman Filter for Underwater Wireless Sensor Networks. Sensors 2021, 21, 4426. https://doi.org/10.3390/s21134426

AMA Style

Ni X, Lu T, Ye S, Zheng Y, Chen P, Chen L. Pair Nodes Clock Synchronization Algorithm Based on Kalman Filter for Underwater Wireless Sensor Networks. Sensors. 2021; 21(13):4426. https://doi.org/10.3390/s21134426

Chicago/Turabian Style

Ni, Xiaomeng, Ting Lu, Sijia Ye, Yunsi Zheng, Pengfei Chen, and Lingyu Chen. 2021. "Pair Nodes Clock Synchronization Algorithm Based on Kalman Filter for Underwater Wireless Sensor Networks" Sensors 21, no. 13: 4426. https://doi.org/10.3390/s21134426

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop