Abstract
The birth of computer networks and distributed systems has led to the appearance of the clock synchronization problem. This issue has gained increasing importance with the emergence of new resource constrained networks such as wireless sensor networks. In this paper, we propose a new distributed clock synchronization algorithm, referred to as Weighted Consensus Clock Synchronization (WCCS), whose objective is to achieve a consensus clock among network nodes. In this distributed approach and in contrast to centralized schemes, each node periodically exchanges the local clock reading with its immediate neighbor nodes. Then, each node employs these time informations to calculate its relative offset and skew with respect to its neighbor nodes using a weighted average consensus based technique. The effectiveness of WCCS is proved through both simulations and an experimental study on TelosB mote using TinyOS.
Similar content being viewed by others
References
Mills, D. (1991). Internet time synchronization: The network time protocol. IEEE Transactions on Communications, 39, 1482–1493.
Elson, J., & Römer, K. (2003). Wireless sensor networks: A new regime for time synchronization. ACM SIGCOMM Computer Communication Review, 33(1), 149–154.
Elson, J., Girod, L., & Estrin, D. (2002). Fine-grained network time synchronization using reference broadcasts. ACM SIGOPS Operating Systems Review, 36, 147–163.
Ganeriwal, S., Kumar, R., & Srivastava, M. B. (2003). Timing-sync protocol for sensor networks. In Proceedings of the 1st international conference on embedded networked sensor systems (pp. 138–149).
Maróti, M., Kusy, B., Simon, G., & Lédeczi, Á. (2004). The flooding time synchronization protocol. In ACM second international conference on embedded networked sensor systems (SenSys 04) (pp. 39–49).
Maggs, M. K., O’Keefe, S. G., & Thiel, D. V. (2012). Consensus clock synchronization for wireless sensor networks. IEEE Sensors Journal, 12(6), 2269–2277.
Sommer, P., & Wattenhofer, R. (2009). Gradient clock synchronization in wireless sensor networks. In R. Gupta (Ed.), Proceedings of the 2009 international conference on information processing in sensor networks (pp. 37–48). Washington: IEEE Computer Society.
Lenzen, C., Sommer, P., & Wattenhofer, R. (2015). PulseSync: An efficient and scalable clock synchronization protocol. IEEE/ACM Transactions on Networking.
Schenato, L., & Fiorentin, F. (2011). Average TimeSynch: A consensus-based protocol for clock synchronization in wireless sensor networks. Automatica, 47(9), 1878–1886.
He, J., Cheng, P., Shi, L., Chen, J., & Sun, Y. (2014a). Time synchronization in WSNs: A maximum-value-based consensus approach. IEEE Transactions on Automatic Control, 59(3), 660–675.
Kusy, B., Dutta, P., Levis, P., Maroti, M., Ledeczi, A., & Culler, D. (2006). Elapsed time on arrival: A simple and versatile primitive for canonical time synchronisation services. International Journal of Ad Hoc and Ubiquitous Computing, 1(4), 239–251.
Sommer, P., & Wattenhofer, R. (2008). Symmetric clock synchronization in sensor networks. In A. Dunkels & P. J. Marron (Eds.), Proceedings of the workshop on Real-world wireless sensor networks (pp. 11–15). New York: ACM.
Chen, Y., Tron, R., Terzis, A., & Vidal, R. (2011). Accelerated corrective consensus: Converge to the exact average at a faster rate. In American control conference (ACC), 2011 (pp. 3417–3422). IEEE.
Oreshkin, B. N., Aysal, T. C., & Coates, M. J. (2008). Distributed average consensus with increased convergence rate. In IEEE international conference on acoustics, speech and signal processing, 2008. ICASSP 2008 (pp. 2285–2288). IEEE.
Lenzen, C., Sommer, P., & Wattenhofer, R. (2009). Optimal clock synchronization in networks. In Proceedings of the 7th ACM conference on embedded networked sensor systems (pp. 225–238).
He, J., Cheng, P., Shi, L., Chen, J., & Sun, Y. (2014b). Time synchronization in WSNs: A maximum-value-based consensus approach. IEEE Transactions on Automatic Control, 59(3), 660–675.
Wu, J., Zhang, L., Bai, Y., & Sun, Y. (2015). Cluster-based consensus time synchronization for wireless sensor networks. IEEE Sensors Journal, 15(3), 1404–1413.
Heinzelman, W. B., Chandrakasan, A. P., & Balakrishnan, H. (2002). An application-specific protocol architecture for wireless microsensor networks. IEEE Transactions on Wireless Communications, 1(4), 660–670.
Yang, Z., He, L., Cai, L., & Pan, J. (2014). Temperature-assisted clock synchronization and self-calibration for sensor networks. IEEE Transactions on Wireless Communications, 13(6), 3419–3429.
Xu, M., & Xu, W. (2013). Taco: Temperature-aware compensation for time synchronization in wireless sensor networks. In 2013 IEEE 10th international conference on mobile ad-hoc and sensor systems (MASS) (pp. 122–130). IEEE.
Benzaïd, C., Bagaa, M., & Younis, M. (2016). Efficient clock synchronization for clustered wireless sensor networks. Ad Hoc Networks, 56, 13–27.
Djenouri, D., Merabtine, N., Mekahlia, F. Z., & Doudou, M. (2013). Fast distributed multi-hop relative time synchronization protocol and estimators for wireless sensor networks. Ad Hoc Networks, 11(8), 2329–2344.
Luo, B., Cheng, L., & Wu, Y.-C. (2016). Fully distributed clock synchronization in wireless sensor networks under exponential delays. Signal Processing, 125, 261–273.
Bliman, P.-A., & Ferrari-Trecate, G. (2008). Average consensus problems in networks of agents with delayed communications. Automatica, 44(8), 1985–1995.
Carli, R. (2008). Topics on the average consensus problems. Ph.D. thesis, PhD school in Information Engineering – University of Padua.
Avrachenkov, K., El Chamie, M., & Neglia, G. (2011). A local average consensus algorithm for wireless sensor networks. In 2011 international conference on Distributed computing in sensor systems and workshops (DCOSS) (pp. 1–6). IEEE.
Knorn, F., Stanojevic, R., Corless, M., & Shorten, R. (2009). A framework for decentralised feedback connectivity control with application to sensor networks. International Journal of Control, 82(11), 2095–2114.
Cao, M., Morse, A. S., & Anderson, B. D. O. (2008). Reaching a consensus in a dynamically changing environment: A graphical approach. SIAM Journal on Control and Optimization, 47(2), 575–600.
Olshevsky, A., & Tsitsiklis, J. N. (2009). Convergence speed in distributed consensus and averaging. SIAM Journal on Control and Optimization, 48(1), 33–55.
Sivrikaya, F., & Yener, B. (2004). Time synchronization in sensor networks: A survey. IEEE Network, 18(4), 45–50.
Lundelius, J., & Lynch, N. (1984). An upper and lower bound for clock synchronization. Information and Control, 62(23), 190–204.
Graham, S., & Kumar, P.R. (2004). Time in general-purpose control systems: The control time protocol and an experimental evaluation. In 43rd IEEE conference on decision and control, 2004. CDC (vol. 4, pp. 4004–4009).
Boulis, A. (2007). Castalia: Revealing pitfalls in designing distributed algorithms in WSN. In Proceedings of the 5th international conference on Embedded networked sensor systems (pp. 407–408). New York: ACM.
Pediaditakis, D., Tselishchev, Y., & Boulis, A. (2010). Performance and scalability evaluation of the Castalia wireless sensor network simulator. In Proceedings of the 3rd international ICST conference on simulation tools and techniques (p. 53). ICST (Institute for Computer Sciences, Social-Informatics and Telecommunications Engineering).
Ren, F., Lin, C., & Liu, F. (2008). Self-correcting time synchronization using reference broadcast in wireless sensor network. IEEE Wireless Communications, 15(4), 79–85.
Hussain, S. S., & Sprent, P. (1983). Non-parametric regression. Journal of the Royal Statistical Society Series A (General), 146, 182–191.
Acknowledgements
This paper has been written while the first author was visiting the Wireless Sensor group at Lab-STICC in Brest. Financial support through the PNE program established by the Government of Algeria is gratefully acknowledged.
Author information
Authors and Affiliations
Corresponding author
Appendices
Appendix 1: Proof of Lemma 1
Proof
Once node i receives a synchronization packet at time \(t_1\), it tries to synchronize itself with the received virtual compensated clock \({\mathcal {C}}_j(t)\). The relative clock rate is the ratio of the virtual compensated clock frequency of node j to the local clock frequency of node i. Thus, from Eqs. (4) and (7) we have:
Subtracting \(\tau _i(t_1)\) from each side of this equation leads to:
As a result:
Similarly, at time \(t_2\) we have:
and subtracting (17) from (18) gives:
Consequently,
\(\square\)
Appendix 2: Proof of Theorem 1
Proof
According to Lemma 1 and Eq. (11), we have:
By adding 1 to each side of the equation, we obtain:
As \(\hat{\alpha }_{i}=\alpha _{i}+1\), the above equation can be written as:
From Eq. (12), we can easily prove that \(\sum \nolimits _{j\in {\mathcal {N}}_i} w_{ij}=1\), implying:
According to (3) and (8), we can substitute the values of both \({\mathcal {C}}_j(t)\) and \(\tau _i(t)\) into the above equation to obtain:
If we multiply each side of the equation by \(a_i\) we obtain:
If we denote \(\hat{\alpha }_{i}a_i\) by \(x_i\), we can rewrite the above equation as follows:
which can be rewritten more compactly as:
where \({\mathcal {W}}\) denotes the \(n\times n\) matrix whose elements are the weights \(w_{ij}\) defined by Eq. (12), and where \({\mathbf {x}}(k)= [x_1(k),\ldots , x_n(k)]^T\) defines a column vector whose elements represent the clock rates of all compensated clocks of the network at time slot k. According to Eq. (12), the elements of \({\mathcal {W}}\) are nonnegative. In addition, \({\mathcal {W}}\) is row-stochastic since it is nonnegative and the sum of the elements of each row is equals 1, i.e., \({\mathcal {W}}{\mathbf {1}}={\mathbf {1}}\) where \({\mathbf {1}} =(1, 1, 1,\ldots , 1)^T\). Also, the state of each node \(i\in {\mathcal {V}}\) will be influenced directly or indirectly by every node \(j\in {\mathcal {V}}\) through a sequence of communications as \({\mathcal {G}}\) is connected according to Assumption 1. Following [28, 29], all this provides a sufficient condition to guarantee that all \(x_i\) will converge to a steady-state value c:
Consequently, as \(x_i=\hat{\alpha }_{i}a_i\),
\(\square\)
Appendix 3: Proof of Lemma 2
Proof
According to Eq. (19), we can write:
Consequently,
\(\square\)
Appendix 4: Proof of Theorem 2
Proof
The Eq. (14) can be written as:
where \(\overline{a}_it= \sum \nolimits _{j\in {\mathcal {N}}_i} w_{ij}a_it\) and \(\overline{b}_i= \sum \nolimits _{j\in {\mathcal {N}}_i} w_{ij}b_i\) as stated by Eq. (16). According to Eqs. (8) and (21), we have:
We denote \(\hat{\alpha }_{i}(k+1)b_i+\hat{\beta }_{i}(k+1)\) by \(x_i(k+1)\) to obtain:
Using Eqs. (15) and (16), we can substitute the values of both \(offset ^{old}_{i}\) and \(\overline{\tau }_i(t_{old})\) into the above equation to obtain:
According to Eq. (7), we can substitute the value of \({\mathcal {C}}_j(t)\) into the above equation to obtain:
which can be rewritten more compactly as:
According to Theorem 1, \(\lim \nolimits _{k \rightarrow \infty }a_i\hat{\alpha }_{i}(k)=\alpha _v, \forall i\in {\mathcal {V}}\) , and thus \(\lim \nolimits _{k \rightarrow \infty }\varvec{\phi }(k)=0\). Likewise, \({\mathcal {W}}\) is row-stochastic since it is nonnegative and the sum of the entries of each row equals 1. Also, according to Assumption 1, each node \(i\in {\mathcal {V}}\) can communicate its values to every other node \(j\in {\mathcal {V}}\). As a result [28, 29], \(x_i\) will converge to a steady-state value c:
Consequently, as \(x_i=\hat{\alpha }_{i}b_i+\hat{\beta }_{i}\), we obtain:
\(\square\)
Rights and permissions
About this article
Cite this article
Aissaoua, H., Aliouat, M., Bounceur, A. et al. A Distributed Consensus-Based Clock Synchronization Protocol for Wireless Sensor Networks. Wireless Pers Commun 95, 4579–4600 (2017). https://doi.org/10.1007/s11277-017-4108-4
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11277-017-4108-4