- Research Article
- Open Access
- Published:

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

*EURASIP Journal on Wireless Communications and Networking*
**volume 2009**, Article number: 528161 (2009)

## Abstract

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 definition 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 findings.

## 1. 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. Section 3 presents convergence results on 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.

## 2. Background and System Model

### 2.1. 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 time-stamped 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 , the propagation delay between the sender and receiver nodes. The propagation delay is related to the distance between the two nodes such that , where is the distance between nodes and and 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, , with zero mean and variance (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 time-stamped 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 , the transmission processing time; , the channel access time; and , 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. , 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, 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 and variance . Additionally, the packet experiences a propagation delay of ; the overall MAC layer delay is therefore given as

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 is a constant equal to zero for physical layer-based schemes and for MAC layer-based schemes; and is a zero mean Gaussian random variable. The variance of , , is equal to for physical layer schemes and to for MAC layer-based schemes.

### 2.2. 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 layer-based 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 is given as

where is the local time at node during iteration ; is the set of neighboring nodes that can communicate reliably with node ; ; is the constant delay defined above; is the constant step size for each iteration; are i.i.d Gaussian random variables, with zero mean and variance . Local time information exchange between nodes and under this delay model is shown in Figure 3.

The DCTS algorithm in (4) can be rearranged as

where . It should be noted that and might not be independent between nodes and since the two nodes might have identical noise coming from some potentially overlapping neighbors.

### 2.3. Network Model and Some Preliminaries

In the following, we model a wireless sensor network as an undirected graph , consisting of a set of nodes and a set of edges . (The convergence properties presented here can be easily extended for a directed graph. We omit this extension here.) Each edge is denoted as where and are two nodes connected by edge . We assume that the presence of an edge indicates that nodes and 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 as the adjacency matrix of such that

Next, we let be the graph Laplacian matrix of which is defined as

where is the degree matrix of . Specifically, is equal to the number of neighbors of node with which it can communicate reliably, that is, . Given this matrix , we can show that and , where and . Additionally, is a symmetric positive semidefinite matrix (implying its eigenvalues are all nonnegative), and for a connected graph, the rank of is and its eigenvalues can be arranged in increasing order as [11]. We now define vectors and . Based on these definitions, the evolution of DCTS algorithm in (5) can be written as

where is called a Perron matrix of a graph with parameter [3]. Here, denotes the identity matrix. The eigenvalues of are and can be ordered in decreasing order: . It is worth mentioning that the constant step size which minimizes convergence time is given as [12]. (Note that the optimal is generally difficult to obtain as it involves computing the eigenvalues of the Laplacian matrix . However, in practical applications, a numerical solution can be obtained offline based on node deployment within a given wireless sensor network, and this can then be flooded to all nodes before they run the DCTS algorithm.) Let us define and , where . 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 , *average consensus* can be asymptotically achieved by the DCTS algorithm, that is, In our discussion, we also assume an undirected, connected network with a constant step size unless otherwise stated.

In the following analysis, we use the following matrices: , and . For matrices and , it is straightforward to show that the eigenvalues of agree with those of except that is replaced by ; such that ; and and .

## 3. Convergence Analysis of DCTS Algorithm with Gaussian Delay

Let us define the average value in each iteration as . Then, mean of the average value in each iteration of the DCTS algorithm is , and the variance of the average value is It can be seen that as iteration time increases, both mean and variance increase linearly with the time index . Furthermore, the variance of increases linearly with the variance of the random Gaussian delay, .

### 3.1. Expectation and Second Central Moment of Disagreement Vector

We now define the disagreement vector as ; that is, is the difference between the updated times and the actual average times of the network nodes. Then, the disagreement vector evolves as .

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 . We next note the following.

Lemma 2.

For the DCTS algorithm in (8), the second central moment of disagreement vector is given as

where denotes the trace of a matrix.

Proof.

Please see Appendix.

### 3.2. Asymptotic Expectation of Global Synchronization Error

Using Lemma 1, we see that the steady state of expectation of disagreement vector is

Let us define ; then the eigenvalues of are . For this , we can show that.

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 as . It is easy to check that the eigenvector corresponding to is . 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 (is not equal to ). 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 . 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 . In this equation, is the disagreement vector of . When , we see that , for and . More specifically, when and , then and , 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 , for and , or equivalently, .

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.

### 3.3. Asymptotic Mean Square Synchronization Error

Using Lemma 2, the steady state of second central moment of disagreement vector is

Let us define . Thus, the eigenvalues of are . 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 nodes. We see that

Theorem 2.

For a connected, time delay unbalanced network, in (15) is bounded by

where , , , , is the total degree in the networks, and denotes the norm of a vector.

Proof.

Please see the Appendix.

Based on this result, it can be seen that the lower and upper bounds of are determined by several values related to network parameters: eigenvalues of and , total degree of network, step size, and delay time vector.

## 4. 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.

Definition 2 (A Ring Network with Equal Distance ()).

A ring network is a network that consists of a single cycle. The ring network with equal distance is a ring network that has nodes, edges, and for and .

Definition 3 (A Star Network with Equal Distance ()).

A star network is a network that consists of edge set . The star network with equal distance is a star network that has nodes, edges, and for and .

Definition 4 (A Hypercube Network with Equal Distance Degree ()).

A hypercube network with equal distance degree is a hypercube network that has nodes, edges and .

Figure 4 illustrates several examples of such networks. In the following, we simply present convergence results for these structured networks without proof.

### 4.1. Convergence Properties for Ring Networks

For a ring network , the DCTS algorithm in (8) produces a global synchronization error with the following properties:

where , . Since , we see that the ring network is a time delay balanced network.

### 4.2. Convergence Properties for Star Networks

For a star network , the DCTS algorithm in (8) produces a global synchronization error with the following properties:

where and .

The star network is time delay unbalanced. Furthermore, it should be noted that when operating the DCTS algorithm with , we get that . This is because can be simplified in this case to . As a result, we see that as becomes large, .

### 4.3. Convergence Properties for Hypercube Networks

For a hypercube network , the DCTS algorithm in (8) produces a global synchronization error with the following properties:

where and . Since , the hypercube network is also time delay balanced.

## 5. Simulation Results

The simulation parameters are described as follows: initial time phase of node is , , where , and the standard deviation of delay variance is . 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 ). We use this fixed offset assumption here for comparison purposes.)

### 5.1. Structured Networks

In our simulations of structured networks, we assume and the optimal constant step size is . 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 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 .

### 5.2. Random Networks

We also present here simulation results for a random network comprised of 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 .

Figure 7 shows the simulation results of in a particular realization of the random network. We choose for this simulation. It can be seen that, asymptotically, there exists global synchronization error between some pairs of nodes, and for this random network. If we specify a threshold to be greater than or equal to this , 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 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 and in random networks as functions of and in Figures 8 and 9. For a given value of 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 and decrease as the number of nodes increases. Similarly, with the same number of nodes in the networks, and 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*".

## 6. 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

### A. Proof of Lemma 2

Proof.

Define . 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 instead since

Then, the proof of the lemma is equivalent to proving the following statement:

The statement is obviously true for . Now let us assume that the statement is true when , , that is,

When , we have

Therefore, has the exact same form as (A.3) for . 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 and any symmetric matrix , let , then one has [14]

where denotes the th smallest eigenvalue of a matrix. In particular, if is a positive semidefinite matrix, one has

If is a positive semidefinite matrix, replacing with in (B.2), we have [15]

Combining (B.2) with (B.3), we have the following theorem.

Theorem 4.

If and are two positive semidefinite matrices, one has

We can now prove Theorem 2.

Proof.

We know that the eigenvalues of are 1 and . Also, and . Recall that

Since , the eigenvalues of are nonnegative. Thus, . In addition, and are positive semidefinite matrices with . For a time delay unbalanced network, . Based on (16) and (B.4), is upper bounded by

From [16], we know that . Then, is lower bounded by

This completes the proof.

## References

Culler D, Estrin D, Srivastava M: Overview of sensor networks.

*Computer*2004, 37(8):41-49.Scaglione A, Pagliari R: Non-cooperative versus cooperative approaches for distributed network synchronization.

*Proceedings of the 5th Annual IEEE International Conference on Pervasive Computing and Communications Workshops (PerComW '07), March 2007, White Plains, NY, USA*537-541.Olfati-Saber R, Fax JA, Murray RM: Consensus and cooperation in networked multi-agent systems.

*Proceedings of the IEEE*2007, 95(1):215-233.Schenato L, Gamba G: A distributed consensus protocol for clock synchronization in wireless sensor network.

*Proceedings of the 46th IEEE Conference on Decision and Control (CDC '07), December 2007, New Orleans, La, USA*2289-2294.Simeone O, Spagnolini U: Distributed time synchronization in wireless sensor networks with coupled discrete-time oscillators.

*EURASIP Journal on Wireless Communications and Networking*2007, Article ID 57054, 2007:-13.Xiao L, Boyd S, Kim S-J: Distributed average consensus with least-mean-square deviation.

*Journal of Parallel and Distributed Computing*2007, 67(1):33-46. 10.1016/j.jpdc.2006.08.010Abdel-Ghaffar HS: Analysis of synchronization algorithms with time-out control over networks with exponentially symmetric delays.

*IEEE Transactions on Communications*2002, 50(10):1652-1661. 10.1109/TCOMM.2002.803979Proakis J:

*Digital Communications*. 4th edition. McGraw-Hill, Boston, Mass, USA; 2000.Elson J, Girod L, Estrin D: Fine-grained network time synchronization using reference broadcasts.

*Proceedings of the 5th Symposium on Operating Systems Design and Implementation (OSDI '02), December 2002, Boston, Mass, USA*147-163.Olfati-Saber R, Murray RM: Consensus problems in networks of agents with switching topology and time-delays.

*IEEE Transactions on Automatic Control*2004, 49(9):1520-1533. 10.1109/TAC.2004.834113Horn RA, Johnson CR:

*Matrix Analysis*. Cambridge University Press, Cambridge, UK; 1985.Xiao L, Boyd S: Fast linear iterations for distributed averaging.

*Proceedings of the 42nd IEEE Conference on Decision and Control (CDC '03), December 2003, Maui, Hawaii, USA*5: 4997-5002.Lindsey WC, Ghazvinian F, Hagmann WC, Dessouky K: Network synchronization.

*Proceedings of the IEEE*1985, 73(10):1445-1467.Lasserre JB: A trace inequality for matrix product.

*IEEE Transactions on Automatic Control*1995, 40(8):1500-1501. 10.1109/9.402252Xing W, Zhang Q, Wang Q: A trace bound for a general square matrix product.

*IEEE Transactions on Automatic Control*2000, 45(8):1563-1565. 10.1109/9.871773Mohar B: Some applications of laplace eigenvalues of graphs. In

*Graph Symmetry: Algebraic Methods and Applications, NATO ASI Series C*Edited by: Hahn G, Sabidussi G. 1997, 497: 225-275.

## Author information

### Authors and Affiliations

### Corresponding author

## Rights and permissions

**Open Access** This article is distributed under the terms of the Creative Commons Attribution 2.0 International License (https://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

## About this article

### Cite this article

Xiong, G., Kishore, S. Analysis of Distributed Consensus Time Synchronization with Gaussian Delay over Wireless Sensor Networks.
*J Wireless Com Network* **2009, **528161 (2009). https://doi.org/10.1155/2009/528161

Received:

Accepted:

Published:

DOI: https://doi.org/10.1155/2009/528161

### Keywords

- Wireless Sensor Network
- Medium Access Control
- Random Network
- Time Synchronization
- Synchronization Error