Analysis of Distributed Consensus Time Synchronization with Gaussian Delay over Wireless Sensor Networks

This paper presents theoretical results on the convergence of the distributed consensus timing synchronization (DCTS) algorithm for wireless sensor networks assuming general Gaussian delay between nodes. The asymptotic expectation and mean square of the global synchronization error are computed. The results lead to the deﬁnition of a time delay balanced network in which average timing consensus between nodes can be achieved despite random delays. Several structured network architectures are studied as examples, and their associated simulation results are used to validate analytical ﬁndings.


Introduction
Wireless sensor networks are typically comprised of inexpensive, small-sized, power-limited terminals.In a variety of applications, sensor nodes are required to maintain accurate time synchronization, for example, moving object tracking, reconnaissance and surveillance, environmental monitoring, and so forth [1].This necessitates algorithms that achieve and maintain global time synchronization at all network nodes, that is, algorithms that align all nodes to a common notion of time.
Due to imperfections in low-cost hardware nodes and the decentralized nature of wireless sensor networks, global time synchronization has been recognized as a particularly challenging task.Recently, several distributed time synchronization algorithms have been proposed; one such class is distributed consensus time synchronization (DCTS) [2].In the DCTS approach, a global time consensus can be sufficiently reached within a connected network by averaging pairwise local time information.In [3], Olfati-Saber et al. established a theoretical framework for the analysis of consensus synchronization algorithms.Later, a fully distributed, asynchronous DCTS algorithm was proposed in [4]; this scheme was designed to reach agreement on time offset and skew offset between network nodes using media access control (MAC) layer time-stamped packet exchanges.As an alternative, a physical layer-based DCTS algorithm was introduced in [5] by modeling sensor nodes as coupled discrete time oscillators.Based on our knowledge, the existing body of literature on the DCTS approach does not examine the effects of time delay uncertainty between network nodes.In this paper, we study the convergence of the DCTS algorithm when uncertain delays impact local pairwise time information exchange.
In [6], Xiao et al. considered distributed average consensus with additive noise and investigated the design of network link weights to minimize the mean-square deviation in steady state.In this paper, we analyze the convergence characteristics of the DCTS algorithm under Gaussian delay uncertainties.First, we determine the asymptotic expectation of the global synchronization error.Our results lead to the definition of a time delay balanced network, and we claim that under such network topologies average timing consensus between nodes can be achieved despite the presence of random delays.Additionally, we show that the asymptotic mean square synchronization error is lower and upper bounded by several values related to network parameters.As examples, we analyze the global synchronization error of the DCTS algorithm for several structured networks.
This paper is outlined as follows.Section 2 provides background and system model for the DCTS algorithm studied here.the synchronization error of the DCTS algorithm due to Gaussian random delays between nodes.Section 4 discusses the convergence characteristics of the global synchronization error for several structured networks.Simulation results are presented in Section 5, and we conclude our discussion in Section 6.

Time Delay for Local Time Information
Exchange.The DCTS algorithm requires local time information exchange between two or more nodes in a wireless sensor network.This exchange can occur using either MAC layer timestamped packets or via physical layer pulse signals.In either case, the delay between two network nodes is defined as the interval between when the time information is generated by the sender node and when this information is determined by the receiver node.Furthermore, in either case, this delay can be comprised of a deterministic and a random portion.In the following, we discuss the delay sources at the two layers and argue that, in both cases, a common underlying model of Gaussian delay uncertainty can be adopted.(We have separately examined the performance of the DCTS algorithm considering alternate delay distributions, e.g., exponential delay distribution [7].Results show similar performance bounds as those presented in this paper for the Gaussian assumption.For this reason, we constrain our discussion here to the more common Gaussian delay model.)2.1.1.Physical Layer-Based Time Delay.Sender nodes using physical layer synchronization algorithms convey local time information to receiver nodes by transmitting pulse signals according to their local clocks.The receiver node, however, estimates the arrival time of the pulse signal as the clock of the sender node.As shown in Figure 1, there is an offset between the transmit time of the pulse at the sender and the arrival time estimate at the receiver.
One source of this lag is T p , the propagation delay between the sender and receiver nodes.The propagation delay is related to the distance between the two nodes such that T p = i j /c, where i j is the distance between nodes i and j and c is the speed of light.Once the pulse signal propagates to the receiver, the receiver node takes some time to reliably detect the pulse signal and to make an arrival time estimate.We assume the arrival time estimation procedure at the receiver will automatically compensate for this detection and estimation delay.However, since the pulse signal is received in noise (and may additionally experience fading over the wireless link), the actual arrival time estimate produced at the receiver will have an associated error.It is known from parameter estimation theory that any maximum likelihood (ML) estimator is asymptotically unbiased, and an ML estimate is asymptotically Gaussian distributed [8].Thus, if an ML arrival time estimator is employed at the receiver, the arrival time estimation error can be modeled as a Gaussian random variable, ν PHY , with zero mean and variance σ 2 PHY (the variance of arrival time estimator).In the physical layer delay model used here, we assume such an estimation error and write the total delay between the transmit time and estimated arrival time of a pulse signal as 2.1.2.MAC Layer-Based Time Delay.At the MAC layer, local time information at a sender node is clocked and incorporated into a packet during packet formation.The overall delay between two nodes exchanging such timestamped packets is, therefore, the time interval between when the sender time is clocked and when the receiver node decodes this time information from its received packet [9].The sources of delay during this interval are shown in Figure 2.
The major sources of random delay at the MAC layer are T tp , the transmission processing time; T a , the channel access time; and T r p , the receiver processing time.The delay in processing a packet (at either the transmitter or receiver) depends on several factors such as the protocol processing time, the CPU load, and delays in the operating system.T a , on the other hand, is the time the sender node that must wait to access the transmit channel, which is determined by the MAC protocol in use as well as the current network traffic.Here, we assume the overall delay, T tp + T a + T r p results from the additive effect of delays introduced by several independent random processes (e.g., the instantaneous workload on the sender/receiver CPU, packet generation processes at other network nodes, etc.).Using the central limit theorem, we model this delay as a Gaussian random variable with mean μ MAC = E(T tp ) + E(T a ) + E(T r p ) and variance σ 2 MAC = Var(T tp ) + Var(T a ) + Var(T r p ).Additionally, the packet experiences a propagation delay of T p ; the overall MAC layer delay is therefore given as (2) In the following, we use a general delay model that incorporates the two delay calculations for the physical and MAC layers, that is, we assume where T c is a constant equal to zero for physical layer-based schemes and μ MAC for MAC layer-based schemes; and ν is a zero mean Gaussian random variable.The variance of ν, σ 2 , is equal to σ 2 PHY for physical layer schemes and to σ 2 MAC for MAC layer-based schemes.

DCTS Algorithm With Gaussian Delay.
In each iteration of the DCTS algorithm, each node processes and decodes the time-stamped message from its neighbors in the MAC layerbased approach or estimates the arrival time of its neighbors' pulse signals in the physical layer scheme.Each node then updates its local clock time using the weighted average of the time differences with its neighbor nodes.It is well known that in a connected network with nonrandom delay between nodes, this DCTS algorithm can reach average consensus [10]; that is, all nodes converge to the average of the initial timing differences between the nodes.
Our study focuses on the operation of the DCTS algorithm when there are both deterministic and random (Gaussian) delays during local time information exchange, as described above.In this case, the timing update rule of the DCTS algorithm at each node i is given as where t i (k) is the local time at node i during iteration k; N i is the set of neighboring nodes that can communicate reliably with node i; t j (k is the constant delay defined above; ε is the constant step size for each iteration; v j (k) are i.i.d Gaussian random variables, with zero mean and variance σ 2 .Local time information exchange between nodes i and j under this delay model is shown in Figure 3.The DCTS algorithm in (4) can be rearranged as where It should be noted that n i (k) and n j (k) might not be independent between nodes i and j since the two nodes might have identical noise coming from some potentially overlapping neighbors.

Network Model and Some Preliminaries.
In the following, we model a wireless sensor network as an undirected graph Node i Node j G = (V, E ), consisting of a set of n nodes V = {1, 2, . . ., n} and a set of edges E .(The convergence properties presented here can be easily extended for a directed graph.We omit this extension here.)Each edge is denoted as e = (i, j) ∈ E where i ∈ V and j ∈ V are two nodes connected by edge e.
We assume that the presence of an edge (i, j) indicates that nodes i and j can communicate with each other reliably.We assume here a connected graph; that is, there exists a path connecting any pair of distinct nodes in the network.Given this network model, we denote A as the adjacency matrix of G such that Next, we let L be the graph Laplacian matrix of G which is defined as where Specifically, d i is equal to the number of neighbors of node i with which it can communicate reliably, that is, Given this matrix L, we can show that L1 = 0 and 1 T L = 0 T , where 1 = [1, 1, . . ., 1] T and 0 = [0, 0, . . ., 0] T .Additionally, L is a symmetric positive semidefinite matrix (implying its eigenvalues are all nonnegative), and for a connected graph, the rank of L is n − 1 and its eigenvalues can be arranged in increasing order as 0 [11].We now define vectors Based on these definitions, the evolution of DCTS algorithm in (5) can be written as where H = I n − εL is called a Perron matrix of a graph with parameter ε [3].Here, I n denotes the n × n identity matrix.The eigenvalues of H are λ i (H) = 1 − ελ i (L) and can be ordered in decreasing order: It is worth mentioning that the constant step size ε opt which minimizes convergence time is given as 2/[λ 2 (L) + λ n (L)] [12].(Note that the optimal ε is generally difficult to obtain as it involves computing the eigenvalues of the Laplacian matrix L. However, in practical applications, a numerical solution can be obtained offline based on node deployment within a given wireless sensor network, and this ε opt can then be flooded to all nodes before they run the DCTS algorithm.)Let us define , where u i = j∈Ni (T c + i j /c).Then the noise vector in ( 8) is given as When there is no Gaussian delay between nodes, it can be shown that [10,12], for a time-invariant, connected, undirected network, when ε ∈ (0, 2/λ n (L)), average consensus can be asymptotically achieved by the DCTS algorithm, that is, T .In our discussion, we also assume an undirected, connected network with a constant step size 0 < ε < 2/λ n (L) unless otherwise stated.
In the following analysis, we use the following matrices: For matrices P and Q, it is straightforward to show that (1) the eigenvalues of P agree with those of

Convergence Analysis of DCTS Algorithm with Gaussian Delay
Let us define the average value in each iteration as m(k) = (1/n)1 T t(k).Then, mean of the average value m(k) in each iteration of the DCTS algorithm is m(0) + kε/n n i=1 u i , and the variance of the average value is kε 2 σ 2 /n 2 n i=1 d 2 i .It can be seen that as iteration time increases, both mean and variance increase linearly with the time index k.Furthermore, the variance of m(k) increases linearly with the variance of the random Gaussian delay, σ 2 .

Expectation and Second Central Moment of Disagreement
Vector.We now define the disagreement vector as δ(k) = t(k) − Kt(k); that is, δ(k) is the difference between the updated times and the actual average times of the network nodes.Then, the disagreement vector evolves as δ(k) = Pδ(k − 1) + Qn(k − 1).

Lemma 1.
For the DCTS algorithm in (8), the expectation of disagreement vector is The proof of this lemma is straightforward and thus omitted from the paper.Let us define the second central moment of disagreement vector as κ δ (k We next note the following.Lemma 2. For the DCTS algorithm in (8), the second central moment of disagreement vector is given as where tr(•) denotes the trace of a matrix.
Proof.Please see Appendix.
Theorem 1.In a network with fixed, connected topology, μ(∞) in ( 11) is a constant vector independent of the constant value of ε.
Proof.Let us denote the eigenvectors of W 1 as ω i .It is easy to check that the eigenvector corresponding to λ 1 (W 1 ) = 1 is ω 1 = 1.μ(∞) in ( 11) can thus be written as Thus, μ(∞) does not depend on ε.
Thus, for a constant step size ε, the steady state of expectation of disagreement vector is a constant vector regardless of ε.In other words, in a network with fixed topology, the expectation of global synchronization error is the same regardless of the speed of synchronization.
In general, we see that the DCTS algorithm with Gaussian delay cannot achieve average consensus since μ(∞) is a linear function of u (is not equal to 0).This global synchronization error can be viewed as the accuracy of time synchronization algorithm.If this synchronization error is tolerable or small compared to time resolution of the system, we say that this DCTS algorithm still achieves the average consensus but with "tolerable synchronization error".Let us now define the asymptotic expectation of pairwise synchronization error as Hence, the maximum asymptotic expectation of global synchronization error between any two nodes is Δt max = max{|Δt i, j |}.It is worth mentioning that, under certain network topologies (e.g., the ring network studied in Section 4), average consensus can still be asymptotically achieved when using the DCTS approach under Gaussian delays.
Recall that μ(∞) = (L + K) −1 Qu.In this equation, Qu = u − Ku is the disagreement vector of u.When u = Ku, we see that j∈Ni (T c + i j /c) = m∈Nk (T c + km /c), for (i, j) ∈ E and (k, m) ∈ E .More specifically, when d i = d j and i j = km , then μ(∞) = 0 and Δt max = 0, implying that the DCTS algorithm achieves average consensus asymptotically.The condition above indicates that the time delay between nodes can be canceled if each node receives the same amount of time delay from all neighbors; networks that meet this condition are defined as follows.
Definition 1.A network is called "time delay balanced network" if j∈Ni (T c + i j /c) = m∈Nk (T c + km /c), for (i, j) ∈ E and (k, m) ∈ E , or equivalently, Δt max = 0.
Otherwise we refer to the network as "time delay unbalanced".It is worth mentioning that a similar definition of "equal delay networks" was discussed in [13] for continuous time network synchronization.Based on the definition above, we see that time delay balance may be readily (but not exclusively) achieved in well-structured networks.

Asymptotic Mean Square Synchronization
Error.Using Lemma 2, the steady state of second central moment of disagreement vector is Let us define We now define the asymptotic mean square time synchronization error as which indicates the amount of error by which the updated time at each node differs from the average value over all n nodes.We see that Theorem 2. For a connected, time delay unbalanced network, σ 2 Δt in (15) is bounded by where is the total degree in the networks, and • denotes the 2 norm of a vector.
Proof.Please see the Appendix.
Based on this result, it can be seen that the lower and upper bounds of σ 2 Δt are determined by several values related to network parameters: eigenvalues of L and A 2 , total degree of network, step size, and delay time vector.

DCTS Algorithm with Gaussian Delay in Structured Networks
In this section, we apply the DCTS algorithm under Gaussian delay for several structured networks.In particular, we study the structured networks as they are analytically tractable, provide some valuable insights, and can be used to validate our analytical findings.(Typical sensor network deployments may in fact have a random topology.We study how our results extend to such random network scenarios using simulation in Section 5.) Specifically, we analyze at the impact of Gaussian delay when using DCTS in the following networks.Figure 4 illustrates several examples of such networks.In the following, we simply present convergence results for these structured networks without proof.

Convergence Properties for Ring Networks.
For a ring network R n , the DCTS algorithm in (8) produces a global synchronization error with the following properties: where Since Δt max = 0, we see that the ring network R n is a time delay balanced network.

Convergence Properties for Star Networks.
For a star network S n , the DCTS algorithm in (8) produces a global synchronization error with the following properties: where The star network S n is time delay unbalanced.Furthermore, it should be noted that when operating the DCTS algorithm with ε opt , we get that κ δ (∞) = (n − 1)σ 2 /n.This is because W 2 can be simplified in this case to ((n + 1) 2 /4n)Q.As a result, we see that as n becomes large, κ δ (∞) ≈ σ 2 .

Convergence Properties for Hypercube Networks.
For a hypercube network H n , the DCTS algorithm in (8) produces a global synchronization error with the following properties: when ϑ n is even, where ϑ n = log 2 n and λ i = 1/(4i − 4εi 2 ), i = 1, . . ., ϑ n .Since Δt max = 0, the hypercube network is also time delay balanced.

Simulation Results
The simulation parameters are described as follows: initial time phase of node i is (i − 1/2)T/n, i = 1, . . ., n, where T = 1000 μs, and the standard deviation of delay variance is σ = 1 μs.The simulation results are based on 5000 runs.(Trends similar to the ones noted below were observed when initial time offsets between nodes were arbitrary (e.g., when they were uniformly distributed over [0, T]).We use this fixed offset assumption here for comparison purposes.)

Structured Networks.
In our simulations of structured networks, we assume u cp = T c + c /c = 10 μs and the optimal constant step size is ε opt .The simulation results and asymptotic mean square time synchronization errors for structured networks with 16 nodes are shown in Figure 5.The asymptotic mean square (steady-state) time synchronization errors σ 2 Δt are calculated from (16).It can be seen that as the time index increases, the mean square time synchronization errors approach their respective steady state values when using DCTS with Gaussian delay.As expected, DCTS algorithm in a hypercube network achieves  the smallest variance of synchronization error and the fastest convergence among those structured networks.This is primarily due to the high degree of connectivity in the hypercube network, which also results in the smallest value of ε opt .

Random Networks.
We also present here simulation results for a random network comprised of n nodes that were randomly generated with uniform distribution over a unit square kilometer; two nodes were assumed connected if the distance between them was less than η, a predefined threshold.One realization of such a network with 16 nodes is shown in Figure 6.We assume that the average distance between two nodes is 0.5 km.  Figure 7 shows the simulation results of E[δ i (k)] in a particular realization of the random network.We choose ε opt for this simulation.It can be seen that, asymptotically, there exists global synchronization error between some pairs of nodes, and Δt max = 26.4130μs for this random network.If we specify a threshold Δt Th to be greater than or equal to this Δt max , we call this network as "average consensus achievable with tolerable synchronization error" as described in Section 3.2.
As mentioned above, the generation of random networks depends on two parameters: the number of users n and the predefined threshold η.In order to better understand the performance of DCTS algorithm with Gaussian delay in such networks, we show the asymptotic values of σ 2 Δt and Δt max in random networks as functions of n and η in Figures 8 and 9.For a given value of n and η, the presented asymptotic values were averaged over 1000 realizations of the random network, where we excluded disconnected network realizations.From the plots, we see that with the same threshold η, the asymptotic values of σ 2 Δt and Δt max decrease as the number of nodes increases.Similarly, with the same number of nodes in the networks, σ 2 Δt and Δt max decrease as threshold η increases.This is primarily due to the fact that when the number of nodes or threshold increases, the random network behaves more like a "time delay balanced network".

Conclusions
In this paper, we present theoretical results on the convergence of the DCTS algorithm for wireless sensor networks with general Gaussian delay between nodes.Specifically, we compute the asymptotic expectation and mean square of the global synchronization error of the DCTS algorithm.The results lead to the definition of a time delay balanced network in which average timing consensus between nodes can be achieved despite random delays.Furthermore, several structured network architectures are studied as examples, and their associated simulation results are used to validate analytical findings.In the future, we intend to investigate the effects of skew, link failure, and other practical conditions when utilizing the DCTS algorithm in wireless sensor networks.

Appendices
Then, the dynamics of this vector is given as follows: To prove this lemma, we can consider the evolution of covariance matrix of disagreement vector Σ δ (k) instead since Then, the proof of the lemma is equivalent to proving the following statement: The statement is obviously true for k = 1.Now let us assume that the statement is true when k = m, (m > 1), that is, Therefore, Σ δ (m + 1) has the exact same form as (A.3) for k = m + 1.Thus, (10) is valid, and we can conclude the proof.

B. Proof of Theorem 2
Before proving the theorem, first we present some known results.
Theorem 3.For any matrix A 1 and any symmetric matrix A 2 , let A 1 = (A 1 + A T 1 )/2, then one has [14] where λ i (•) denotes the ith smallest eigenvalue of a matrix.In particular, if A 2 is a positive semidefinite matrix, one has If A 1 is a positive semidefinite matrix, replacing A 1 with A 2 in (B.2), we have [15]  We can now prove Theorem 2.

Figure 1 :
Figure 1: Physical layer-based time delay model.

Figure 3 :
Figure 3: DCTS algorithm with Gaussian delay during local time information exchange.

Figure 5 : σ 2 Figure 6 :
Figure 5: σ 2 Δt as a function of the iteration time index for the DCTS algorithm in structured networks with Gaussian delay between network nodes.

Figure 7 :
Figure 7: Disagreement evolution of the DCTS algorithm in a random network with Gaussian delay.

Figure 8 : σ 2 Figure 9 :
Figure 8: σ 2Δt as a function of the number of nodes and threshold η for the DCTS algorithm in random networks with Gaussian delay.

1 + ε 2 σ 2 tr W 2 A 2 ≥+ ε 2 σ
2 max λ min (W 2 )tr A 2 , λ min A 2 tr(W 2 ) Section 3 presents convergence results on EURASIP Journal on Wireless Communications and Networking Definition 2 (A Ring Network with Equal Distance (R n )).A ring network is a network that consists of a single cycle.The ring network with equal distance is a ring network that has n nodes, n edges, and c = i j = km for (i, j) ∈ E and (k, m) Definition 3 (A Star Network with Equal Distance (S n )).A star network is a network that consists of edge set {(i, n), 1 ≤ i < n}.The star network with equal distance is a star network that has n nodes, n − 1 edges, and c = i j = km for (i, j) ∈ E and (k, m) ∈ E .
∈ E .n )).A hypercube network with equal distance degree is a hypercube network that has n nodes, n log 2 n edges and j∈Ni i j = i∈Nj ji .