Fast distributed multi-hop relative time synchronization protocol and estimators for wireless sensor networks Djamel Djenouri a,⇑ , Nassima Merabtine b , Fatma Zohra Mekahlia b , Messaoud Doudou a a CERIST Center of Research, Ben-aknoun, BP 143, Algiers 16030, Algeria b Saad Dahlab University, Blida, Algeria article info Article history: Received 27 March 2013 Received in revised form 5 June 2013 Accepted 7 June 2013 Available online xxxx Keywords: Wireless sensor networks Time synchronization Distributed algorithms abstract The challenging problem of time synchronization in wireless sensor networks is considered in this paper, where a new distributed protocol is proposed for both local and multi-hop synchronization. The receiver-to-receiver paradigm is used, which has the advantage of reducing the time-critical-path and thus improving the accuracy compared to common sender-to-receiver protocols. The protocol is fully distributed and does not rely on any fixed reference. The role of the reference is divided amongst all nodes, while timestamp exchange is integrated with synchronization signals (beacons). This enables fast acquisi- tion of timestamps that are used as samples to estimate relative synchronization parame- ters. An appropriate model is used to derive maximum likelihood estimators (MLE) and the Cramer-Rao lower bounds (CRLB) for both the offset-only, and the joint offset/skew estima- tion. The model permits to directly estimating relative parameters without using or refer- ring to a reference’ clock. The proposed protocol is extended to multi-hop environment, where local synchronization is performed proactively and the resulted estimates are trans- ferred to the intermediate/end-point nodes on-demand, i.e. as soon as a multi-hop commu- nication that needs synchronization is initiated. On-demand synchronization is targeted for multi-hop synchronization instead of the always-on global synchronization model, which avoids periodic and continuous propagation of synchronization signals beyond a sin- gle-hop. Extension of local MLE estimators is proposed to derive relative multi-hop estima- tors. The protocol is compared by simulation to some state-of-the-art protocols, and results show much faster convergence of the proposed protocol. The difference has been on the order of more than twice compared to CS-MNS, more than ten times compared to RBS, and more than twenty times compared to TPSN. Results also show scalability of the pro- posed protocol concerning the multi-hop synchronization. The error does not exceed few microseconds for as much as 10 hops in R4Syn, while in CS-MNS, and TPSN, it reaches few tens of microseconds. Implementation and tests of the protocol on real sensor motes confirm microsecond level precision even in multi-hop scenarios, and high stability (long lifetime) of the skew/offset model. Ó 2013 Elsevier B.V. All rights reserved. 1. Introduction Time synchronization has always been one of the fun- damental problems in distributed systems. The lack of a common clock and a shared memory makes message-ex- change-based algorithms the only way to ensure synchro- nization. However, delays of exchanged messages are not 1570-8705/$ - see front matter Ó 2013 Elsevier B.V. All rights reserved. http://dx.doi.org/10.1016/j.adhoc.2013.06.001 ⇑ Corresponding author. Tel.: +213 (0)554 689372; fax: +213 (0)21 912126. E-mail addresses: ddjenouri@acm.org (D. Djenouri), nassimane@ gmail.com (N. Merabtine), mekahlia.fzohra@yahoo.fr (F.Z. Mekahlia), doudou@mail.cerist.dz (M. Doudou). Ad Hoc Networks xxx (2013) xxx–xxx Contents lists available at SciVerse ScienceDirect Ad Hoc Networks journal homepage: www.elsevier.com/locate/adhoc Please cite this article in press as: D. Djenouri et al., Fast distributed multi-hop relative time synchronization protocol and estimators for wireless sensor networks, Ad Hoc Netw. (2013), http://dx.doi.org/10.1016/j.adhoc.2013.06.001