on the multi-hop performance of synchronization mechanisms...

14
1 On the Multi-Hop Performance of Synchronization Mechanisms in High Propagation Delay Networks Pai-Han Huang, Electrical Engineering-Systems, University of Southern California Maulik Desai, Electrical Engineering, Columbia University Xiaofan Qiu, Texas Instruments Inc. Bhaskar Krishnamachari, Electrical Engineering-Systems, University of Southern California Abstract—We analyze the single and multi-hop performance of time synchronization mechanisms for challenging environments characterized by high propagation delays, low duty-cycle operation, and imprecise clocks, such as underwater acoustic sensor networks. We find that receiver-receiver based schemes are unsuitable for such environments, and therefore focus primarily on sender-receiver schemes. According to our analysis, a one-way dissemination approach provides good clock skew estimation but poor offset estimation while a two-way exchange approach provides accurate offset estimation but imprecise clock skew estimation. In average, using one-way scheme can result in significant cumulative propagation error over multiple hops, and using two-way can lead to high variance of propagation error. We develop and analyze a hybrid one-way dissemination/two-way exchange technique, and verify the performance of our hybrid scheme through trace-based experiments. The results suggest that this hybrid approach can provide bounded average error propagation in multi-hop settings and significantly lower variance of propagation error. Index Terms—Wireless communications, Formal models, Data communications, Protocol verification, Sensor networks, Algo- rithm/protocol design and analysis. 1 I NTRODUCTION Recently there has been an emergence of interest in developing sensor networks that operate in even more challenging environments, such as acoustic underwater networks, that are characterized by high propagation delays, high relative clock skews, and longer inter-sync periods (due to even more severe energy constraints). In this work, we analyze various existing approaches for time synchronization in RF-based sensor networks and find that they can yield significant error under these stricter conditions. Our analysis suggests that a hybrid mechanism does much better in terms of precision and variance. The packets used for synchronization purpose are called synchronization packets. Depending on the syn- chronization packets exchange strategies, existing works can be categorized into two major types. One is the sender-receiver scheme, which involves direct commu- nication between two devices in order to synchronize one to the other. The other one is the receiver-receiver scheme, which will synchronize clocks between nodes receiving the same reference broadcast. The existing works that involve sender-receiver synchronization can The work described here is supported in part by NSF through grants CNS- 0347621, CNS-0627028, CCF-0430061, CNS-0325875, NASA through an AIST grant, and the USC Viterbi School of Engineering’s Summer Intern- ship program. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the NSF, NASA, or USC Viterbi School of Engineering. be further categorized into two types. One can be called one-way dissemination and the other is two-way exchange. While the former needs a synchronized node to disseminate packets to unsynchronized nodes, the latter achieves synchronization by exchanging pack- ets between synchronized and unsynchronized nodes. FTSP [2] and TPSN [3] are representative works which utilize one-way packet dissemination scheme and two- way packet exchange scheme respectively, and RBS [4] is a representative work of receiver-receiver scheme. Clock offset and skew are two critical parameters while doing time synchronization. Clock offset refers to the difference of two clocks: the clocks within the reference node and the node that needs synchronization, at the moment of synchronization. Estimation of the off- set thus helps to reset the clocks for re-synchronization. Clock skew refers to change in this offset over some period of time. Estimating the rate of this change can be useful in mitigating further clock drift between synchro- nization events, especially in a sensor network adopting low duty cycle. We undertake a comparative analysis of the synchronization error of various synchronization schemes in this paper. According to our analysis, in high propagation delay environments, RBS-like receiver- receiver schemes show poor performance. Among the sender-receiver schemes, the one-way packet dissemi- nation does better on estimating clock skew, while the two-way exchange does better on estimating clock offset. However, in high propagation delay environments, the

Upload: others

Post on 16-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: On the Multi-Hop Performance of Synchronization Mechanisms ...anrg.usc.edu/wiki/uploads/0/03/Timesync_TC_2008.pdf · 1 On the Multi-Hop Performance of Synchronization Mechanisms in

1

On the Multi-Hop Performance ofSynchronization Mechanisms in High

Propagation Delay NetworksPai-Han Huang, Electrical Engineering-Systems, University of Southern California

Maulik Desai, Electrical Engineering, Columbia UniversityXiaofan Qiu, Texas Instruments Inc.

Bhaskar Krishnamachari, Electrical Engineering-Systems, University of Southern California

Abstract—We analyze the single and multi-hop performance of time synchronization mechanisms for challenging environmentscharacterized by high propagation delays, low duty-cycle operation, and imprecise clocks, such as underwater acoustic sensornetworks. We find that receiver-receiver based schemes are unsuitable for such environments, and therefore focus primarily onsender-receiver schemes. According to our analysis, a one-way dissemination approach provides good clock skew estimation butpoor offset estimation while a two-way exchange approach provides accurate offset estimation but imprecise clock skew estimation. Inaverage, using one-way scheme can result in significant cumulative propagation error over multiple hops, and using two-way can leadto high variance of propagation error. We develop and analyze a hybrid one-way dissemination/two-way exchange technique, and verifythe performance of our hybrid scheme through trace-based experiments. The results suggest that this hybrid approach can providebounded average error propagation in multi-hop settings and significantly lower variance of propagation error.

Index Terms—Wireless communications, Formal models, Data communications, Protocol verification, Sensor networks, Algo-rithm/protocol design and analysis.

F

1 INTRODUCTION

Recently there has been an emergence of interest indeveloping sensor networks that operate in even morechallenging environments, such as acoustic underwaternetworks, that are characterized by high propagationdelays, high relative clock skews, and longer inter-syncperiods (due to even more severe energy constraints).In this work, we analyze various existing approachesfor time synchronization in RF-based sensor networksand find that they can yield significant error under thesestricter conditions. Our analysis suggests that a hybridmechanism does much better in terms of precision andvariance.

The packets used for synchronization purpose arecalled synchronization packets. Depending on the syn-chronization packets exchange strategies, existing workscan be categorized into two major types. One is thesender-receiver scheme, which involves direct commu-nication between two devices in order to synchronizeone to the other. The other one is the receiver-receiverscheme, which will synchronize clocks between nodesreceiving the same reference broadcast. The existingworks that involve sender-receiver synchronization can

The work described here is supported in part by NSF through grants CNS-0347621, CNS-0627028, CCF-0430061, CNS-0325875, NASA through anAIST grant, and the USC Viterbi School of Engineering’s Summer Intern-ship program. Any opinions, findings, and conclusions or recommendationsexpressed in this material are those of the authors and do not necessarilyreflect the views of the NSF, NASA, or USC Viterbi School of Engineering.

be further categorized into two types. One can becalled one-way dissemination and the other is two-wayexchange. While the former needs a synchronized nodeto disseminate packets to unsynchronized nodes, thelatter achieves synchronization by exchanging pack-ets between synchronized and unsynchronized nodes.FTSP [2] and TPSN [3] are representative works whichutilize one-way packet dissemination scheme and two-way packet exchange scheme respectively, and RBS [4]is a representative work of receiver-receiver scheme.

Clock offset and skew are two critical parameterswhile doing time synchronization. Clock offset refersto the difference of two clocks: the clocks within thereference node and the node that needs synchronization,at the moment of synchronization. Estimation of the off-set thus helps to reset the clocks for re-synchronization.Clock skew refers to change in this offset over someperiod of time. Estimating the rate of this change can beuseful in mitigating further clock drift between synchro-nization events, especially in a sensor network adoptinglow duty cycle. We undertake a comparative analysisof the synchronization error of various synchronizationschemes in this paper. According to our analysis, inhigh propagation delay environments, RBS-like receiver-receiver schemes show poor performance. Among thesender-receiver schemes, the one-way packet dissemi-nation does better on estimating clock skew, while thetwo-way exchange does better on estimating clock offset.However, in high propagation delay environments, the

Page 2: On the Multi-Hop Performance of Synchronization Mechanisms ...anrg.usc.edu/wiki/uploads/0/03/Timesync_TC_2008.pdf · 1 On the Multi-Hop Performance of Synchronization Mechanisms in

2

one-way scheme shows high average synchronizationerror while the two-way scheme shows high variance.

We use our insights from the analysis to proposea hybrid one-way/two-way mechanism that is showntheoretically to perform more gracefully in multi-hopnetworks with high propagation delay, while incurringmild additional communication overhead. We validateour analysis through experimental trace-based simula-tions on a line network of radio-based sensor nodeswhere we use application-layer time-stamping to mimicconditions of high propagation delay. The results ofthese simulations confirm that the hybrid scheme notonly provides bounded error propagation over multiplehops in average, but also produces low variance ofpropagation error.

The key contributions of this paper are threefold. First,we present comprehensive analysis of various existingsynchronization schemes and address the pros and consof each of them. We make use of our results andpropose a hybrid scheme which provides precise andlow variance synchronization. In addition, we provideboth theoretical analysis and experimental trace-basedsimulations to verify the performance of our hybridscheme.

This paper is organized as follows: we first presentsome existing efforts in Section 2, and analyze the pre-cision for one-way, two-way, receiver-receiver, multipletwo-way and the hybrid mechanism for a single sender-receiver pair in Section 3. We then investigate the multi-hop synchronization error propagation of one-way, two-way and hybrid in Section 4. Details of our time stampscollecting experiments are stated in Section 5. The threeapproaches are compared via trace based simulations inSection 6. We conclude with a summary and directionsfor future work in Section 7.

2 RELATED WORKS

Several issues make time synchronization challengingin high propagation delay environment, such as un-derwater acoustic networks. First, because the propaga-tion distance of radio signal in water is limited, acous-tic communication becomes a popular alternative [26].However, the speed of underwater sound is five ordersslower than radio signal, propagation latency becomesa non-negligible source of delay. Therefore, alleviatingthe impact of high propagation delay plays a major rolein devising an efficient time synchronization protocolfor such challenging environment. Because of low costhardware adopted in sensor networks, clock generatorsperform differently from each other. Thus, eliminatingthe uncertainty is also an important and challengingissue. Some existing literatures [12] [27] have moredetailed descriptions about underwater acoustic sensornetworks.

Reference Broadcast Synchronization (RBS) [4] is anrepresentative protocol of receiver-receiver scheme. InRBS, a reference beacon is broadcasted by a reference

node. Nodes which receive the broadcasted beacon willrecord its time of arrival and exchange this informationwith others. The average error of RBS is 1.85±1.28µs in802.11 wireless Ethernet with kernel timestamping [4].However, as shown in following contents, RBS is notsuitable for high propagation delay environments dueto the different distance between the reference node andother receivers.

Karp et al. [19] propose an variation of RBS, whichis applicable to a network with a loop. The authors useresistive networks to derive a synchronization algorithmwhich provides global consistency and low variance. Thetrade-off between energy consumption and synchroniza-tion precision is also studied. Because we focus on tree-structured networks, this type of implementation is outof extent of our work.

Timing-sync Protocol for Sensor Networks (TPSN) [3]is one implementations of two-way exchange scheme.For a multi-hop network, TPSN first builds up a tree,assigns each node to a specific level, and does synchro-nization from level to level sequentially. The averageerror of TPSN is 16.9µs [3]. In addition, TPSN is the firstprotocol to use MAC layer time stamping, which is ableto reduce medium access time efficiently. LightweightTime Synchronization (LTS) [13] also adopts two-wayexchange scheme and is a similar tree-style, sender-receiver implementation as TPSN.

Gridhar et al. [20] and Solis et al. [21] use two-way ex-change scheme, and takes advantage of loops existing innetworks to smoothen their synchronization estimation.The key idea of these papers is the sum of offset along aloop should be zero, and imposing these constraints toeach loop can provide a smooth and accurate value.

Graham et al. [24] and Sichitiu et al. [14] proposesynchronization protocols which use two-way exchangescheme. CTP [24] uses a similar equation as TPSN to esti-mate offset, and then further refines the estimation withlinear regression. While Tiny-sync and Mini-sync [14]uses multiple time stamps collected from bi-directionalsynchronization packets to form constraints of clockoffset and skew estimations, this algorithm has similarprecision as CTP [24] when the number of time stampsis large.

The Flooding Time Synchronization Protocol(FTSP) [2] utilizes one-way dissemination scheme.Maroti et al. propose a sophisticated time stampingtechnique, which is able to reduce various kinds ofjitter terms significantly [2]. The performance of FTSP ismainly verified by experiments, and the average errorof FTSP is 1.5µs pair-wise and 0.5µs per hop [2](Note:by “pair-wise” and “per hop”, we are referring tosingle-hop and multi-hop network setting, respectively.The “per-hop” error, is calculated by dividing the errorat n-hop clock by n.).

RITS and RATS [23] [11] both utilize one-way scheme.One important conclusion is that if the non-determinismis minimal, even a simple implementation of one-wayscheme can provide high synchronization precision. The

Page 3: On the Multi-Hop Performance of Synchronization Mechanisms ...anrg.usc.edu/wiki/uploads/0/03/Timesync_TC_2008.pdf · 1 On the Multi-Hop Performance of Synchronization Mechanisms in

3

average error of RATS and RITS is in the scale of µs [23],.Bychkovskiy et al. [18] propose another one-way

scheme implementation. For pair-wise synchronization,the authors use linear regression on collected uni-directional time stamps to compute offset. For multi-hop calibration, they take advantage of existing loopsto maximize consistency.

There is an ongoing version of IEEE 1588 [37], or Pre-cision Time Protocol (PTP), which targets at providingnetworks with clock precision in sub-microsecond. Thereare two fundamental assumptions that differentiate ourworks and this effort. First, PTP assumes synchroniza-tion messages can be exchanged in a short period of time,such that no relative offset occurs during the exchangeprocess. Second, PTP also assumes the transmit timeof synchronization messages between two clocks is aconstant. In our works, we do not have this assumptions,thus making our conclusions versatile.

Paxson [31] collected time stamps information fromhosts connected by Internet. Due to the high-varianceand long latency nature of Internet routing, we canexpect their results also apply to the challenging en-vironment specified above. The author propose to useonly one-way messages to predict the relative skew, andtwo-way messages to estimate relative offset betweentwo hosts. Although they have similar solution as ours,detailed theoretical analysis, especially variance analysisand multi-hop performance evaluation, is lacking in thispaper.

Ellingson et al.’s [35] work is the closest one to ourstudies. The authors analyze one-way and two-way andpropose variance analysis of one-way pair-wise errorunder the case of dynamic network setting. In addition,the authors propose a recursive algorithm to filter outmeasurement error. Again, the multi-hop, variance, andthe impact of message number analysis for pair-wisetwo-way is lacking. On the hand, we focus more on theprecision with the existence of non-filtered measurementerror.

An excellent survey [1] reviews some of the state ofthe art in time synchronization, that are not mentionedhere.

Some synchronization works focus on objectives otherthan precision or power consumption. Cristian [36] pro-poses a probabilistic method to alleviate the clock read-ing error. Their solution is using a probabilistic methodto determine a clock reading is valid or not, according tothe knowledge of the distribution of network delay. Inour works, we don’t discard clock readings, and use allcollected time-stamps for average performance analysis.Clearly, combining Cristian’s technique can improve theresults presented in our works.

Lamport [33] propose an algorithm to reconstruct thecomplete ordering of all events taking place in thesystem, by using knowledge of partial ordering of asubset of events. They apply this concept to do timesynchronization, and bound the synchronization error.One of the main assumption of this paper is, if a message

is sent earlier than another message, then it will alsobe received earlier. This assumption does not apply toacoustic communication system, due to the slow propa-gation speed of acoustic waves.

Some existing works deal with the synchronizationtasks with special assumptions. Lamport et al. [34] pro-pose an algorithm that can provide bounded error, inthe existence of “two-faced clock”. A two-faced clockprovide inconsistent clock readings to different users,thus making many synchronization protocols fail.

TSHL [12] is an implementation specifically designedfor high propagation delay networks, which is done in aparallel efforts of our works. However, several things arelacking in this paper [12]. First, the authors only addressthe propagation delay in their computation, and assumeall other jitter terms are negligible. This assumption maynot be true when the acoustic traveling distance is notlong enough, and application layer time stamping isadopted , thus making the applicability limited. Second,the authors use simple one-way and two-way implemen-tations in their analysis, which is an unfair comparison.In addition, the analysis of their TSHL protocol, and thediscussion of multi-hop setting are also lacking.

In sum, synchronization protocols designed for wiredenvironment do not take energy overhead into accountexplicitly. Although protocols designed for RF-basedsensor networks do bear power consumption in mind,they suffer from long propagation delay. On the otherhand, although some works are capable of providingprecise and energy efficient protocols for the challengingenvironment mentioned above, comprehensive compar-ison and performance under multi-hop network settingare lacking.

3 PAIR-WISE SYNCHRONIZATION ERRORANALYSIS

3.1 Definitions and Assumptions of AnalysisBy “ideal clock”, we are referring to a clock that iscapable of measuring time in consistent, and “ideal clockreading” is a clock reading given by an ideal clock. By“clock offset”, we are referring to the reading differencebetween two clocks at the same instance. The rate ofone clock “drifting away” from an ideal clock or anothernon-ideal clock is defined as “clock bias”, and “relativeclock skew”, respectively. In this paper, we assume everynode is equipped with an affine clock, clock bias {Si} arenot functions of time and iid (identically, independentlydistributed), and every node is equipped with identicalhardware and software settings. In the following we usea random variable Γi to denote the total delay/jittertaken for packet i, transmitted from one node to anotherand is measured by an ideal clock. In addition, weassume {Γi} are iid , and {Γi} and {Si} are independent.

Some possible sources of delays in packet transmissioninclude application layer send-receive times, access time,link layer transmission and reception time, propagationtime, interrupt handling time, encoding and decoding

Page 4: On the Multi-Hop Performance of Synchronization Mechanisms ...anrg.usc.edu/wiki/uploads/0/03/Timesync_TC_2008.pdf · 1 On the Multi-Hop Performance of Synchronization Mechanisms in

4

Ti A clock reading (time stamp) generated by a node involved in a synchronization process.ti The time measured by the ideal clock corresponding to the clock reading Ti.Γi Total delay/jitter corresponding to packet i as measured by the ideal clock.Si Bias of clock i (clock skew between clock i and the ideal clock).bi Intercept of clock i (clock reading difference between clock i and the ideal clock at time 0).

Oati

Actual offset between reference and unsynchronized node at instance ti.Oe

tiEstimated value of Oa

ti.

ROati→tj

Actual offset difference between reference and unsynchronized node contributed by period ti to tj . ROati→tj

= Oati−Oa

tj

ROeti→tj

Estimated value of ROati→tj

.

εjti

Overall error at time ti, up to level j.

TABLE 1Notations

Fig. 1. Message timelines for one-way synchronizationscheme

time, and byte alignment time [2]. Note that, even aftersome delay sources are mitigated through sophisticatedtime stamping techniques such as those proposed inFTSP [2], the value of Γi,∀i is always positive.

The symbols used in the following contents are listedin Table 1.

3.2 Analysis of One-way Dissemination Scheme

An example of one-way scheme is plotted in Figure 1.The arrows in the figure represent directions of trans-mitted packets for synchronization purposes. The timerelations of packet I can be written as T2 = T1 +OA→B

t1 +SAΓI , and similarly for other packets.

We first define the following matrix:

AM =

1 T1

1 T3

......

, BM =

T2

T4

...

, XM =

(CM

DM

)(1)

Where matrix XM represents the two unknown parame-ters of doing linear regression on these time stamps. Byusing linear algebra skills [28], we can compute XM bysolving AT

MAMXM = ATMBM . Therefore,

XM =

(CM

DM

)= (AT

MAM )−1ATMBM (2)

However, if all uncertainties can be magically eliminated,

matrix XI becomes:

XI =

(CI

DI

)= (ATA)−1ATBI

where, A = AM , BI = BM −N,N =

SAΓI

SAΓII

...

(3)

Thus, Xerror = XM −XI = (ATA)−1ATN . Because:

ATA =

(m

∑mi=1 T2i−1∑m

i=1 T2i−1

∑mi=1 T

22i−1

)

ATN =

(SA

∑mi=1 Γi

SA(∑m

i=1 T2i−1Γi)

)m: number of packets (4)

Xerror can be calculated as (for brevity purpose, we omitthe superscript m and subscript i = 1 of summation inthe following derivation):

Xerror = XM −XI =

(Cerror

Derror

)=

SA

m(∑T 2

2i−1)− (∑T2i−1)2

×

((∑T 2

2i−1)(∑

Γi)− (∑T2i−1)(

∑T2i−1Γi)

−(∑T2i−1)(

∑Γi) +m(

∑T2i−1Γi)

)(5)

Because of independency of {Γi} and {Si}, one impor-tant observation of equation (5) is that the expected valueof Derror equals 0, even the value of m is the minimal 2.That means, one-way dissemination scheme is capableof estimating clock skew accurately in average, and thisresult is consonant with Freris et al’s conclusion [22].

On the other hand, because {Γi} are iid, the expectedvalue of Cerror becomes SΓ, given Exp[Γi] = Γ andExp[Si] = S. Since the value of {Γi} and {Si} are pos-itive, doing linear regression on time stamps collectedfrom uni-directional packets will over-estimate offset inaverage, and this conclusion holds no matter how largethe value of m is.

From equation (5), because the variance of Derror is adecreasing function of m, it would be helpful to use more

Page 5: On the Multi-Hop Performance of Synchronization Mechanisms ...anrg.usc.edu/wiki/uploads/0/03/Timesync_TC_2008.pdf · 1 On the Multi-Hop Performance of Synchronization Mechanisms in

5

Fig. 2. Message timelines for two-way synchronizationschemes

packets if an accurate and low variance skew estimationis desired.

3.2.1 An Explanation of FTSP’s Performance

In FTSP [2], RITS [11] and RATS [23] we notice theaverage error of these protocols may fluctuate withrespect to the hop distance, i.e. using one-way sometimesmay under-estimate offset. One possible reason for thisconfliction is the high variance of Cerror and Derror.

Because of the adoption of sophisticated time stamp-ing techniques, e.g. FTSP [2], the value of Γ is verysmall in practice. However, from equation (5), we noticethe standard deviation of Cerror and Derror is so largecomparing with Γ. Thus, it is possible to see the situationof under-estimate for one-way scheme if the number ofiteration is not large enough. In addition, because thevariance increases with respect to hop distance in multi-hop scenario, this phenomenon becomes even morelikely when the un-synchronized node is far from theroot node.

Even though we do not explicitly model the mecha-nism of filtering out extreme sample points while doinglinear regression in FTSP, this strategy has equivalenteffect of using smaller variance of Γ in our analysis.Because we do not make assumption about the varianceof Γ, the conclusion of over-estimate clock offset inaverage still subsists.

3.3 Analysis of Two-way Exchange Scheme

Figure 2 is an example of two-way scheme. Similar asprior analysis, we can write:

T2 = T1 −Oat1 + Sref ΓI

T4 = T3 +Oat3 + SAΓII (6)

From TPSN [3], LTS [13] and Paxson et al. [31], the offsetestimation is (T4−T3)+(T1−T2)

2 . Because Oat1 = Oa

t3+(Sref−SA)(t3 − t1), from equation (6):

Oet4 =

(T4 − T3) + (T1 − T2)2

=12

[(Oat3 + SAΓII) + (Oa

t1 − Sref ΓI)]

= Oat3 +

12

[(Sref − SA)(t3 − t1) + (SAΓII − Sref ΓI)] (7)

Fig. 3. Message timelines for hybrid synchronizationschemes

However, Oat4 = Oa

t3−(Sref−SA)(t4−t3) = Oat3−(Sref−

SA)ΓII . Thus,

Error = (T4 −Oet4)− (T4 −Oa

t4) = Oat4 −O

et4

= −12

(Sref − SA)(t4 − t1)− Sref

2(ΓII − ΓI) (8)

Because the clock skew is difference, the first term inequation (8) represents the relative offset contributed bythe period of synchronization process, which we call it“actual relative offset from t1 to t4” and is denoted byROa

t1→t4 . Since {Γi} are iid, and {Si} are iid, the expectederror is 0. Therefore, two-way is capable of estimatingoffset precisely in average. One potential problem oftwo-way scheme is the high variance of precision. Fromequation (8), the first term is a function of t4−t1. Becausethe variance of this error can be computed as:

Variance of error =(t4 − t1)2

2var[S] +

12var[SΓ] (9)

If (t4 − t1) is large, then the variance of synchroniza-tion precision can be potentially high. Therefore, usingtwo-way scheme in a low-duty, high propagation delayenvironment may not be able to provide satisfying syn-chronization precision.

3.4 Analysis of Hybrid SchemeThe basic idea of hybrid is: using two-way schemeto estimate offset, and then using the skew estimationcalculated from one-way scheme to further refine theoffset estimation. 1 An example of simplest 3-packetexchange scenario of hybrid scheme is shown in Figure 3.First, we can write:

T2 = T1 −Oat1 + SAΓI

T4 = T3 +Oat3 + Sref ΓII

T6 = T5 −Oat5 + SAΓIII (10)

From packet II and III we can compute Oet6 =

(T6−T5)+(T3−T4)2 . From equation (8), we know the error

of Oet6 is 1

2 (Sref − SA)(t6 − t3) + Sref

2 (ΓIII − ΓII). To

1. TSHL uses one-way skew estimation to calibrate time stamps ofun-synchronized node before it proceeds to use two-way scheme toestimate offset. In hybrid scheme, we ONLY use the skew estimation tocompensate the relative offset taking place during the synchronizationprocess. Therefore, hybrid scheme can operate with only 3 synchroniza-tion packets, while TSHL needs at least 4. In addition, hybrid schemeis lighter in terms of computation demand.

Page 6: On the Multi-Hop Performance of Synchronization Mechanisms ...anrg.usc.edu/wiki/uploads/0/03/Timesync_TC_2008.pdf · 1 On the Multi-Hop Performance of Synchronization Mechanisms in

6

reduce the variance contributed by ROat3→t6 = 1

2 (Sref −SA)(t6− t3), we use the skew estimation calculated frompacket I and III to compensate it.

Because the skew estimation is T5−T1T6−T2

, the estimationof ROa

t3→t6 becomes:

ROet3→t6 =

T6 − T3

T6 − T2(T5 − T1)− (T6 − T3) (11)

According to the affine clock model assumption, equa-tion (11) can be re-written as:

ROet3→t6 =

T6 − T3

T6 − T2(T5 − T1)− (T6 − T3)

= Sref (t5 − t1)T6 − T3

T6 − T2− SA(t6 − t3)(12)

Thus, the error of hybrid can be calculated as:

Oet6 − Oa

t6 = error of ROet3→t6 +

Sref

2(ΓII − ΓI)

=Sref

2[T6 − T3

T6 − T2(ΓIII − ΓI) + (ΓII − ΓI)] (13)

Because {Γi} are iid, the mean error of hybrid equals to0. In addition, the variance of hybrid scheme is:

Variance of error = var[SΓ]×

(14

(T6 − T3

T6 − T2)2 +

14

(T6 − T3

T6 − T2+ 1)2 +

14

) (14)

Because T6−T3T6−T2

< 1 , we notice the high variance problemof two-way has been mitigated by compensating therelative offset. Thus, hybrid scheme not only has 0 meanerror, its variance is also significantly smaller than two-way scheme. Although the hybrid scheme we analyzehere is the case with least packet exchange, it is possibleto use more uni-directional packets from reference to A,to improve the precision of clock skew estimation. Notethat, more uni-directional packets can produce higherskew estimation precision in the expense of higher en-ergy overhead. On the other hand, higher clock skewestimation in a single synchronization instance leadsto less frequent re-synch process, given a desired errorrequirement. Thus, one of our future work is to studythe trade-off between number of uni-directional packetsinvolved in a single synchronization process and syn-chronization precision. We also have interest in findingthe optimal number of packets used in hybrid scheme,in terms of network lifespan.

3.5 Analysis of Receiver-Receiver SchemeAn example of synchronization packet exchange sce-nario by using receiver-receiver scheme is shown inFigure 4. Similarly, we can write:

T2 = T1 +Oa,ref→At1 + SAΓI

T3 = T1 +Oa,ref→Bt1 + SBΓII (15)

For clarification, we use Oa,ref→At1 to denote the actual

offset between reference and A at instance t1, and simi-larly for Oa,ref→A

t1 . Because the estimated offset is T3−T2,

Fig. 4. Message timelines for hybrid synchronizationschemes

Fig. 5. Message timelines for hybrid synchronizationschemes

the error of this offset estimation becomes:

Error = (T3 − T2)− (Oa,ref→Bt1 −Oa,ref→A

t1 )= SBΓII − SAΓI (16)

One potential problem of receiver-receiver scheme is thedifference of acoustic traveling distance between refer-ence to A and reference to B. If the difference of travelingdistance for A and B are significant, then the error ofoffset estimation using receiver-receiver scheme can benon-negligible. In addition, receiver-receiver scheme re-quires A and B to be located within the broadcast regionof reference. However, we focus on a tree-structurednetwork with only one node in each level. Thus, receiver-receiver scheme does not fit into our need.

3.6 Analysis of Multiple Two-way Exchange SchemeCTP [24], Tiny-sync, and Mini-Sync [14] are representa-tive works of this scheme. Basically, multiple two-wayexchange requires multiple rounds of two-way packetexchange, and then using linear regression to estimateclock offset and skew. An example of multiple two-wayexchange scheme is shown in Figure 5. We can write:

AM =

1 T2

1 T3

1 T6

1 T7

......

, BM =

T1

T4

T5

T8

...

, XM =

(CM

DM

)(17)

Similarly as one-way, we can calculate the error as:

Error = XI −XM =SA

m(∑r2i )− (

∑ri)2×(

(∑r2i )(

∑(−1)i+1Γi)− (

∑ri)(∑ri(−1)i+1Γi)

−(∑ri)(∑

(−1)i+1Γi) +m(∑ri(−1)i+1Γi)

)(18)

Page 7: On the Multi-Hop Performance of Synchronization Mechanisms ...anrg.usc.edu/wiki/uploads/0/03/Timesync_TC_2008.pdf · 1 On the Multi-Hop Performance of Synchronization Mechanisms in

7

Where {ri} represents the time stamps generated byreference, i.e. T2, T3, T6, T7... etc. One observation is thatthe expected value of Cerror is strictly larger than 0 ,and the mean value of Derror is strictly less than 0.Obviously, this is not an ideal solution comparing withhybrid scheme.

4 ANALYSIS OF SYNCHRONIZATION ERRORUNDER MULTI-HOP SITUATIONS4.1 Definitions and Assumptions of AnalysisBecause of the existence of clock skew, a synchronizedclock, say A, may already significantly drift away fromthe reference clock before another clock, say B, tries tosynchronize with it. If clock A uses skew estimation tocalibrate itself before providing readings to other clocks,the inaccuracy of clock skew estimation still deterioratesthe synchronization precision. Therefore, the relativeoffset taking place during the synchronization processis not a negligible error source when synchronizationprocess is long. In multi-hop networks with sleep-scheduling, which can increase the intervals betweentwo consecutive synchronization process, this source oferror is significant. We call this error as “relative offseterror”. Intuitively, if precise clock skew estimation ispossible, then we can benefit from compensating relativeoffset error; otherwise, it may further deteriorate syn-chronization precision. We analyze both cases separatelyin the following sections. The used symbols are listed inTable 1, and we make the following assumptions:

1) We assume a tree-structured network, and everynode is assigned to a specific level, determined byits hop distance to the root/reference node. Theroot node is assigned to level 0, and synchroniza-tion takes place sequentially from the root to higherlevel node.

2) Every synchronization instance is independentwith each other.

3) By “overall error up to level i”, we refer to the clockreading difference between calibrated level i clockand the root clock, at the instance when level i nodecompletes its synchronization with level i−1 node.

4.2 Propagation Error Without Relative Offset Com-pensation4.2.1 One-way Dissemination SchemeAn example scenario is plotted in Figure 6. Similarly, wecan compute XM,i+2 = (CM,i+2, DM,i+2)T = [(Ai+2 +Pi+2)T (Ai+2 + Pi+2)]−1(Ai+2 + Pi+2)TBM,i+2, where:

Ai+2 =

1 T7

1 T9

......

, Pi+2 =

0 −Oe

t6,i+1

0 −Oet6,i+1

......

,

BM,i+2 =

T8

T10

...

(19)

Fig. 6. An example scenario for doing synchronization ina multihop network using one-way scheme.

For clarification, we add the subscripts i + 2 to Ai+2,Pi+2 and BM,i+2 to identify these matrixes/vlaues arecomputed between level i+2 and i+1 clock, and add thesubscript i+1 in Oe

t6,i+1 to represent this offset estimationis computed between level i+ 1 and i clocks. Then, theerror matrix Xerror,i+2 can be computed as:

Xerror,i+2 =Si+2

m∑

(T e2i−1)2 − (

∑T e

2i−1)2

×

((∑

(T e2i−1)2)(

∑Γi)− (

∑T e

2i−1)(∑

(T e2i−1Γi))

−(∑T e

2i−1)(∑

Γi) +m(∑

(T e2i−1Γi))

)(20)

For brevity, we use T e2i−1 = T2i−1 − Oe

t6,i+1 to representthe clock reading T2i−1 from level i+ 1, such that it hasbeen calibrated by using offset estimations between leveli + 1 and i. Because {Γi} are iid, we can compute theexpected value of Xerror,i+2 as:

Exp[Xerror,i+2] =Si+2

m∑

(T e2i−1)2 − (

∑T e

2i−1)2

×

(mΓ(

∑(T e

2i−1)2)− Γ(∑T e

2i−1)2

−mΓ(∑T e

2i−1) +mΓ(∑T e

2i−1)

)(21)

Two conclusions can be made by observing equation(21). First, the mean error of DM,i+2 is 0. That means,one-way can provide precise clock skew estimation be-tween i+1 and i+2 in average, without using clock skewestimation. The other observation is that mean error ofCM,i+2 equals SΓ. Therefore, using one-way withoutcompensating relative offset error will produce excessSΓ amounts of intercept estimation error in average.Because the intercept estimation error in level i+ 2 is ontop of prior errors, using one-way without relative offsetcompensation will lead to unbounded error under multi-hop scenario in average. By induction, we can write:

Exp[Overall Error up to level j] = jSΓ (22)

4.2.2 Two-way Exchange Scheme

An example scenario is plotted in Figure 7. For conve-nience, we denote the reference clock reading at instanceti as T a

i , i.e. T ai = S0ti + b0. By definition, we can write

Page 8: On the Multi-Hop Performance of Synchronization Mechanisms ...anrg.usc.edu/wiki/uploads/0/03/Timesync_TC_2008.pdf · 1 On the Multi-Hop Performance of Synchronization Mechanisms in

8

Fig. 7. An example scenario for doing synchronization ina multihop network using two-way scheme.

Fig. 8. An example scenario for doing synchronization ina multihop network using hybrid scheme.

εi+1t4 = T e

4 − T a4 . Because:

T e6 = T6 −Oe

t4,i+1

T e7 = T7 −Oe

t4,i+1

Oet8,i+2 =

(T8 − T e7 ) + (T5 − T e

6 )2

(23)

Using the affine clock model, e.g. T6 = Si+1t6 + bi+1, wecan thus compute εi+2

t8 as:

εi+2t8 = T e

8 − T a8 = (T8 −Oe

t8,i+2)− T a8

= εi+1t4 + S0(t4 − t7 − ΓIV )

+Si+1t6 + t7 − 2t4

2+ Si+2

t7 − t6 + ΓIII + ΓIV

2(24)

Because {Si} and {Γi} are iid, the mean value of εi+2t8

equals εi+1t4 . From section 3.3 we know the average error

up to level 1 is 0. By induction, we can have:

Exp[overall error at level j] = 0 (25)

However, one potential problem of using two-way with-out relative offset compensation is the high varianceof error. By observing equation 24, because every syn-chronization task introduces a constant error on top ofprior hop’s overall error in average, it can be expectedusing two-way without relative offset error compensa-tion demonstrates linear increasing variance with re-spect to hop count distance. This result is also conso-nant with Giridhar and Kumar’s result [20]. In addi-tion, if the length of synchronization process and inter-synchronization period are large, we may end up withhuge propagation error in some instances.

4.2.3 Hybrid SchemeAn example scenario is plotted in Figure 8. Overall errorat t6 up to level i + 1 as εi+1

t6 = T e6 − T a

6 , and the offsetestimation at t12 can be computed as:

Oet12,i+2 =

(T12 − T e11) + (T9 − T e

10)2

−ROet9→t12 (26)

Using the affine clock assumption, and the clock skewestimation DM,i+2 derived from doing linear regressionon packets sent by level i+ 1 and received by i+ 2, wecan compute overall error at t12 up to level i+ 2 as:

εi+2t12 = εi+1

t6 + Si+2t12 − t9

2+ Si+1

t10 + t11 − 2t62

−S0(t12 − t6) + (DM,i+2 − 1)(t12 − t9) (27)

Since {Si} are iid, the expected value of εi+2t12 equals εi+1

t6 .From section 3.4, we know the mean value of overallerror up to level 1 is 0. By induction, we know the meanoverall error at any level j,∀j ≥ 1 is still 0. Therefore,using hybrid without compensating relative offset er-ror can produce good synchronization precision undermulti-hop scenario in average. However, the trade-off ofnot compensating relative offset error is high varianceof precision, and this effect will be reflected by largevalue and high variance of DM,i+2. Because hybrid canproduce accurate clock skew estimation, using hybridwithout compensating relative offset error is clearly asub-optimal strategy.

4.3 Propagation Error With Relative Offset Compen-sation4.3.1 One-way Dissemination SchemeConsider Figure 6 again. The effect of compensatingrelative offset error makes the matrix Pi+2 differentfrom equation (19), thus changing the value of {T e

2i−1}in equation (20) and (21). However, this effect will becanceled out because they both appear in the numeratorand denominator of equation (21). Therefore, no matterwe compensate relative offset error or not, using one-way will lead to unbounded multi-hop error in average.Since {Si} and {Γi} are both iid and independent witheach other, by induction, we know the expected overallerror up to level of using one-way with relative offseterror is the same as equation (22). Although the meanerror is the same as not compensating inter-sync error,compensating relative offset error does provide lowervariance, due to the fact one-way is capable of estimatingclock skew precisely.

4.3.2 Two-way Exchange SchemeConsider Figure 7 again. Because both TPSN [3] andLTS [13] do not provide skew estimation, we assume itsskew estimation by doing linear regression on collectedtime stamps. Thus, the clock skew estimation can becomputed as T4−T1

T e3−T e

2, where T e

2 and T e3 represent the

relative offset calibrated time stamps corresponding toT2 and T3, respectively. For convenience, we denote the

Page 9: On the Multi-Hop Performance of Synchronization Mechanisms ...anrg.usc.edu/wiki/uploads/0/03/Timesync_TC_2008.pdf · 1 On the Multi-Hop Performance of Synchronization Mechanisms in

9

clock skew estimation between level j and j+1 as αej+1.

By using affine clock model, we can compute the errorof skew estimation between level i and i+ 1 as:

Error of αei+1 =

Si+1(t3 − t2 + ΓI + ΓII)Si(t3 − t2) +ROe

t2→t3

(28)

Because ROet2→t3 = αe

i (t3 − t2), the error of clock skewestimation in one level will further deteriorate clockskew estimation in its next level. By changing the valueof T e

6 and T e7 in equation (23), we can calculate the

overall error up to level at t8 as:

εi+2t8 = T e

8 − T a8 = εi+1

t4 + Si+1t7 + t6 − 2t4

2αei+1

+S0

2[(1− 1

αei+1

)(t6 + t7)− 2t4αe

i+1

− 2t8]

+Si+2t7 − t6 + ΓIII + ΓIV

2(29)

Since {Si} and {Γi} are both iid and independent witheach other, the expected overall error becomes:

Exp[εi+2t8 ] = εi+2

t4 − S2t4αe

i+1

(30)

We first notice, offset estimation error in current hop willbe carried to the next hop. Second, the skew estimationkeeps adding error in every hop and also deterioratesthe offset estimation in next hop. Therefore, the overallerror of using two-way with compensating relative offseterror under multi-hop scenario will keep accumulatingquadratically.

4.3.3 Hybrid SchemeConsider Figure 8 again. Due to the affine clock modelassumption, the overall error up to level i+2 at time t12can thus be calculated as:

εi+2t12 = εi+1

t6 + (Si+1 +DM,i+1 − 1)t10 + t11 − 2t6

2

−S0(t12 − t6) + Si+2t12 − t9

2+ (DM,i+2 − 1)(t12 − t9) (31)

Since {Si} and {Γi} are both iid and independent witheach other, the expected value of εi+2

t12 becomes εi+1t6 . In

addition, because we know the average overall error upto level 1 is 0 from Section 3.4, by induction, we canwrite:

Exp[overall error up to level j] = 0,∀j (32)

Again, since every synchronization task adds in a con-stant error on top of prior hop’s propagation error inaverage, it can be expected the variance of using hybridwith relative offset compensation increases linearly withrespect to level number.

5 EXPERIMENTS

Our focus in this paper is on evaluating differentschemes for high propagation delay environments, suchas underwater acoustic sensor networks. However, weare not aware of any acoustic underwater testbeds that

would be suitable for experimental evaluations. Instead,we use traces collected from experiments with RF-basedsensor nodes (specifically the Moteiv Tmote Sky plat-form [29]). State of the art RF-based time synchronizationmechanisms such as FTSP and TPSN advocate the useof MAC-layer time stamping to reduce communicationjitter. However, our testbed uses application-layer time-stamping, which incurs a higher latency and variancefrom sender to receiver. This sufficiently mimics thehigh propagation delay and high variance characteristicsof interest to us. Although underwater acoustic sensornetworks can see propagation delays on the order ofhundreds of milliseconds, while the application layertime stamping on our testbed gives per-hop latencies ofaround ten milliseconds, it still suffices to show the rela-tive strengths and weaknesses of the various techniques.

We have chosen to evaluate various schemes by firstcollecting time-stamp data traces from a common set ofexperiments and then undertaking offline simulations,instead of directly implementing these schemes on themotes and running them separately online. There areseveral good reasons for adopting this approach. First,the offline method will yield essentially the same per-formance as an online implementation as the only keydifference is in where the computations take place (on-mote versus off-board on a PC). Since the calculationsinvolved in the different schemes that we evaluate (one-way, two-way, and hybrid) are extremely lightweight,the effect of additional hardware capability on perfor-mance is negligible. We instead gain several benefitsfrom this approach. The testbed experiments we useare set up in such a way (all nodes can hear packetsfrom each other) that they can be easily used to generatesimulations of n! permutations of multihop chains. Thisallows us to average results over a thousand runs triv-ially, to generate results with high statistical significance.By contrast, if the algorithms were to be run online, wewould have to manually change the topology a thousandtimes while doing the experiments, which would makeit prohibitively time-consuming to achieve the samesignificance. Further, this approach is inherently fair tothe various schemes, as they are each evaluated over thesame set of time-stamp data. Finally, the traces from theexperiments that we undertook in order to obtain thesesimulations can be reused in the future as a benchmarkfor other techniques and mechanisms; to this end, wehave made our experimental traces publicly available[30].

We now detail the experiments, and then present andcomment on the results obtained.

5.1 Experimental Setup for Collection of Time-Stamp TracesWe use 20 motes and mark each of them with a uniquephysical ID number, from 1 to 20. Every mote is placedwithin the transmission range of others, thus, each moteis capable of communicating directly with any other onein our experiment.

Page 10: On the Multi-Hop Performance of Synchronization Mechanisms ...anrg.usc.edu/wiki/uploads/0/03/Timesync_TC_2008.pdf · 1 On the Multi-Hop Performance of Synchronization Mechanisms in

10

A synchronization packet includes the following in-formation: Round Number, Sender Time Stamp, andReceiver Time Stamp, which are explained as follows:

1) Round Number: A round is consisted of a sequen-tial synchronization packets sent through Node ID1 to Node ID 20. Each round consists of 20 sendingcycles. (Detailed in following contents.)

2) Time Stamp: The clock readings when a synchro-nization packet is constructed.

Our data collection experiment proceeds as follows:1) Exactly one node is scheduled to transmit packets

in any instance, and all the others are considered asreceivers. At time 0, ID 1 node starts broadcastingten synchronization packets at an interval of 10 ms.Once it finishes transmitting 10 packets, a sendingcycle is complete.

2) Whenever a receiver hears a synchronizationpacket, it records the sending time stamp, senderID, and the corresponding local receive time stampfor that packet. Only the first packet, which iscommonly received by all receivers, is kept forfuture use and the remaining packets within thesame sending cycle are discarded. Because we needto guarantee the existence of such packet in onesending cycle despite possible transmission errors,we make each sender broadcast 10 packets withinits sending cycle.

3) Nodes in the network initiate their own sendingcycle in sequence of their physical ID. Becauseevery sending cycle takes roughly 100 ms, we makethe node with physical ID i+ 1 start its cycle after150 ms of the first received packet from ID i nodeto avoid overlapping prior sending cycle.

4) When the node with ID 20 finishes its sendingcycle, one sending round completes. To avoid over-lapping of two sending rounds, ID 1 node waitsone minute and start a new sending round, after itreceives packets sent by ID 20 node.

5) Repeat the above steps. In our experiments, wehave collected 80 sending rounds of data.

5.2 Multi-hop Error CalculationBy choosing a permutation of the 20 nodes in ourexperiments, we obtain a virtual 19-hop line networkwith exactly one node in each level. The node whichprovides the reference clock for other nodes is locatedin level 0. The sequence of time-stamped message ex-changes for each scheme are obtained by using thepacket from each round of the experimental trace. Tosimulate a different network instance, we simply pick adifferent permutation of the 20 nodes. This allows us toobtain statistically meaningful results by averaging overdifferent independent random network.

For each permutation, we apply the different synchro-nization schemes (one-way, two-way and hybrid; withand without relative offset compensation) offline usingMatlab and compute the error at each level as follows.

Synchronization is conducted by calibrating the clockssequentially level-by-level from 0 to 19, with eachscheme. Error at level i is computed by obtaining theclock difference between “calibrated level i clock read-ing” and “the corresponding level 0 clock reading at thesame instance”. By “level 0 clock reading at the sameinstance”, we are referring to the receive time of thelast packet involved in level i’s synchronization process,measured by the node assigned to level 0 in the samepermutation 2. Presented results for each technique areaverage of error at each level across 1000 permutations.

6 RESULTS AND DISCUSSION

6.1 Predicted outcomesIn the trace based simulations, we have the followingconditions which are relevant to our analysis models:• The time periods between two consecutive packets,

within the same synchronization process, are ap-proximately the same.

• The time periods between two consecutive synchro-nization process, i.e. the duration between the endof a synchronization process and the beginning ofthe next immediate process, are approximately thesame.

• The above two values are approximately the same.By applying above conditions, the predicted outcomes

of our experiments are listed in Table 2 and 3. The formeradopts skew estimation to compensate for relative offseterror, whereas the later does not.

6.2 Experiment Results and DiscussionThe average 19-hop propagation error of all three syn-chronization schemes with and without inter-sync errorcompensation are listed in Table 2 and Table 3, respec-tively, and are plotted in Figure 9 and Figure 10, respec-tively. The outcomes presented are averaged over 1000synchronization iterations. For comparison purpose, welist the results side by side to the predicted outcomes.

As listed in Table 2, the hybrid scheme performs thelowest average error, while two-way scheme performsthe highest. A more interesting conclusion can be madeby observing Figure 9. One-way scheme maintains a lin-early increasing trend with respect to the hop distance tothe root node, and two-way scheme raises quadratically.Both schemes suffer from unbounded error. On the otherhand, hybrid scheme not only performs significantlybetter precision comparing to the other two schemes un-der the same settings, most importantly, hybrid scheme

2. In other words, we use a receiver-receiver scheme to determinethe error. It is for sure this method may introduce some “noise”into the actual error. However, the average error introduced by thismechanism is insignificant. According to our analysis in section 3.5,the major problem of using receiver-receiver scheme is the differenceof ΓI and ΓII . Because every T-mote in our experiment is configuredidentically, and physically located nearby, it can be expected ΓI andΓII has approximately the same distribution. Thus, the average errorintroduced by this method is negligible.

Page 11: On the Multi-Hop Performance of Synchronization Mechanisms ...anrg.usc.edu/wiki/uploads/0/03/Timesync_TC_2008.pdf · 1 On the Multi-Hop Performance of Synchronization Mechanisms in

11

One-Way Two-Way HybridMeasured Average Overall Propagation Error 176 ms 4535 ms -0.18 msPredicted Average Overall Propagation Error (ε19) 19× (E[Γ]) 510× (E[Γ]) ≈ 0Measured Average Per-hop Propagation Error 9.26 ms 238.7 ms -0.0.095 msEstimated Average Per-hop Propagation Error (ε19/19) E[Γ] 26.8× (E[Γ]) ≈ 0

TABLE 2Propagation error under different synchronization schemes with relative offset error compensation

One-Way Two-Way HybridMeasured Average Overall Propagation Error 167.4 ms - 0.2 ms 0.38 msPredicted Average Overall Propagation Error (ε19) 19× (E[Γ]) ≈ 0 ≈ 0Measured Average Per-hop Propagation Error 8.8 ms - 0.0105 ms 0.02 msPredicted Average Per-hop Propagation Error (ε19/19) E[Γ] ≈ 0 ≈ 0

TABLE 3Propagation error under different synchronization schemes without relative offset error compensation

is capable of providing bounded average propagationerror.

By comparing the one-way scheme with our predictedvalue, the mean value of Γ thus can be computed as167ms/19 ≈ 8.8ms. Similarly, the average value of Γcalculated from two-way scheme can be computed as4535ms/510 ≈ 8.9ms, which is very close to what weget from one-way calculation. For the hybrid case, whilethe predicted value is 0, our experiment outcomes showfluctuated propagation error at different hop distance.The reason of this unmatched results is caused by thehigh jitter nature of Γ. From the traces, we can calculatethe mean of Γ is around 8.9 ms, the standard deviationis 2.3, and, in addition, the distribution of Γ is veryclose to normal distribution. In both one-way and two-way scheme, since the mean propagation error is large,the fluctuation caused by the variance is not obviousat all. However, the hybrid scheme is very precise suchthat little fluctuations will be easily observed. Based onthe above discussions, all these experiment outcomes areconsistent with our analysis conclusions.

In Table 3, although one-way and hybrid scheme stillperforms similarly as they do in previous setting, two-way scheme possesses considerably lower propagationerror comparing with the prior settings. Especially, two-way scheme, as hybrid scheme, shows no obvious trendof increasing propagation while hop distance goes upin Figure 10, and the synchronization precision of bothtwo-way and hybrid schemes are comparable. Theseresults also match our prediction. From the one-wayside, because of the precise clock skew estimation, mostof the relative offset error can be mitigated efficiently.Thus only the offset estimation error will propagate hopby hop. By calculating the average value of E[Γ] fromthe experiment outcomes, we get 171ms/19 ≈ 8.9ms,which is the same as prior value. For the hybrid scheme,because it is capable of providing accurate offset andskew estimations simultaneously, the results presentedalso match our expectation. For the two-way scheme,due to the precise offset estimation we can get from it,

the dominant error source is the relative offset takenplace during inter and intra synchronization period.However, because of the equal probability that the clockbias of one node is faster or slower than the other clockthat intends to synchronize with itself, it can be expectedthat the relative offset are equally likely to get positiveand negative values. In addition, the value of Tinter

and Tintra is a constant in our trace based simulations,it is also reasonable to expect the relative offset willcancel each other throughout different synchronizationiterations. A more detailed descriptions can be found inSection 4.

From the above results, we notice while the aver-age propagation error of one-way increases withoutbounded, two-way without inter-sync error compensa-tion and our hybrid scheme (no matter compensatinginter-sync error or not) perform comparably. In addition,both the later two strategies provide bounded propaga-tion error in average. To further address the benefits ofhybrid scheme, we compare the variance of these twostrategies in the following section.

6.3 Variance Comparison Between Hybrid and Two-way SchemeFor comparison purpose, we compare the variance ofprecision between hybrid and two-way scheme undertwo different strategies: with or without relative offseterror compensation. The results are plotted in Figure11(a) and 11(b). In sum, both hybrid and two-wayschemes perform linearly increasing trend with respectto hop distance to the root node. This conclusion is alsoconsonant with Giridhar and Kumar’s work [20]. Bycomparing 11(a) and 11(b) we notice that, hybrid doesbenefit from compensating relative offset error. However,the variance performance of hybrid is not impressive,considering the extra packets exchange it costs. One pos-sible reason is, the relative offset error is not significant.In our time stamps collecting experiment, since all motesare placed near to each other, the environment may notcause high enough skew between different clocks. In

Page 12: On the Multi-Hop Performance of Synchronization Mechanisms ...anrg.usc.edu/wiki/uploads/0/03/Timesync_TC_2008.pdf · 1 On the Multi-Hop Performance of Synchronization Mechanisms in

12

(a) One-way

(b) Two-way

(c) Hybrid

Fig. 9. Trace based simulation results showing multi-hop error propagation for one-way, two-way and hybridschemes with inter-sync error compensation.

addition, the length of a synchronization process and theinter-synchronization period are not long enough, either.Therefore, the relative offset is not a significant source oferror. Instead, the high variance of {Γi} plays the majorrole on determining the variance of both schemes. Inorder to verify our speculation, we intentionally increasethe inter-synchronization period to around 12 minutesand re-do the trace-based simulation to simulate a 6-node, 5-hop line network. The variance comparison areplotted in Figure 11(c) and 11(d).

One interesting observation is, variance of two-waywithout relative offset compensation increases muchfaster than prior setting. Even the 5-hop varianceis higher than prior result of 20-hop. Although the

(a) One-way

(b) Two-way

(c) Hybrid

Fig. 10. Trace based simulation results showing multi-hop error propagation for one-way, two-way and hybridschemes without inter-sync error compensation.

variance of hybrid also increases with longer inter-synchronization period, the rate is much slower. Bycomparing Figure 11(c) and 11(d), we also notice thathybrid does benefit from compensating relative offseterror. From above results, hybrid with relative offsetcompensation does perform more gracefully than otherexisting strategies in a high propagation delay and low-duty cycle network.

7 SUMMARY AND FUTURE WORK

The major contributions of this work are as follows.First, we have presented a thorough comparison of two-way packet exchange, one-way dissemination schemes,receiver-receiver scheme, and multiple two-way scheme.

Page 13: On the Multi-Hop Performance of Synchronization Mechanisms ...anrg.usc.edu/wiki/uploads/0/03/Timesync_TC_2008.pdf · 1 On the Multi-Hop Performance of Synchronization Mechanisms in

13

(a) Two-way without compensation vs. hybrid withcompensation (19-hop)

(b) Two-way without compensation vs. hybrid withoutcompensation (19-hop)

(c) Two-way without compensation vs. hybrid withcompensation (5-hop)

(d) Two-way without compensation vs. hybrid withoutcompensation (5-hop)

Fig. 11. Variance comparison between two-way andhybrid scheme.

We find that, one-way dissemination performs worse inestimating clock offset, two-way dissemination performsworse while relative offset error is significant, receiver-receiver scheme performs worse when propagation de-lay is substantially different, and multiple two-way per-forms biased offset and skew estimation. Second, wehave proposed a hybrid one-way dissemination/two-way exchange synchronization scheme that can providesubstantially better accuracy, bounded error propagationover multiple hops in average, and low variance ofpropagation error. Such a strategy would be most usefulfor a challenging environment, characterized by highpropagation delay, low-duty cycle, and highly skewedclocks, such as underwater acoustic sensor networks.Third, we implement a series of experiments to collecttime stamps from real Tmotes. From the trace-basedsimulation results, we get the same conclusions as wemake in our analysis.

In the future, we hope to extend this work by do-ing fine-grained time stamping in practical experiments,and develop a time synchronization protocol based onthe hybrid scheme that will be suitable for multi-hopsettings. It would then be of great value to compare thedifferent approaches in detail through real implementa-tions on wireless devices. In addition, we would like tofind out the optimal number of packets used in hybridscheme, in terms of maximum network lifespan.

8 ACKNOWLEDGEMENTSThanks our anonymous reviewers as well as membersof the USC Autonomous Networks Research Group fortheir constructive and valuable feedback on this work.

REFERENCES[1] B. Sundararaman, U. Buy, A.D. Kshemkalyani, “Clock Synchro-

nization in Wireless Sensor Networks: A Survey”, Ad Hoc Networks,3(3): 281-323, May 2005.

[2] M. Maroti, B. Kusy, G. Simon and A. Ledeczi, “The Flooding TimeSynchronization Protocol,” SenSys, November 3-5, 2004, Baltimore,Maryland, USA.

[3] S. Ganeriwal, R. Kumar, and M.B. Srivastava, “Timing-sync Pro-tocol for Sensor Networks,” SenSys, November 5-7, 2003, LosAngeles, California, USA.

[4] J. Elson, L. Girod, and D. Estrin, “Fine-Grained Network TimeSynchronization using Reference Broadcasts,” in Proceedings of theFifth Symposium on Operating Systems Design and Implementa-tion (OSDI 2002), Boston, MA, December 2002.

[5] P. Huang and B. Krishnamachari, “Analysis of existing approachesand a new hybrid strategy for synchronization in sensor net-works,” in Proceedings of the Fifth (EmNets 2006), Boston, MA,May 2006.

[6] S. Ganeriwal, D. Ganesan, M. Hansen, M. B. Srivastava, D. Es-trin, “Rate-adaptive time synchronization for long-lived sensornetworks,” Proceedings of ACM SIGMETRICS international con-ference on measurement and modeling in computer, June 2005.

[7] R. Karp, J. Elson, D. Estrin, S. Shenker, “Optimal and Global TimeSynchronization in Sensornets,” UCLA CENS Technical Report0012, April 10, 2003.

[8] J. Elson, K. Romer, “Wireless Sensor Networks: A New Regime forTime Synchronization,” Proceedings of the First Workshop on HotTopics In Networks (HotNets-I), Princeton, New Jersey. October2002.

[9] F. Sivrikaya, B. Yener, “Time synchronization in sensor networks:a survey,” IEEE Network, July-Aug. 2004, Vol. 18, Issue 4, page 45-50.

Page 14: On the Multi-Hop Performance of Synchronization Mechanisms ...anrg.usc.edu/wiki/uploads/0/03/Timesync_TC_2008.pdf · 1 On the Multi-Hop Performance of Synchronization Mechanisms in

14

[10] F. Zhang, G. Deng, “Probabilistic time synchronization in wirelesssensor networks,” Proceedings of IEEE Wireless Communications,Networking and Mobile Computing, 2005.

[11] J. Sallai, B. Kusy, A. Ledeczi, P. Dutta, “On the scalability ofrouting integrated time synchronization,” European Workshop onWireless Sensor Networks (EWSN 22006), , Zu”rich, Switzerland,February 13, 2006.

[12] A. Syed, J. Heidemann, “Time Synchronization for high latencyacoustic networks,” Proceeding of Infocom, 2006.

[13] J.V. Greunen, J. Rabaey, “Lightweight time synchronization forsensor networks,” Proceeding of ACM WSNA, September 2003.

[14] M.L. Sichitiu, C. Veerarittiphan, “Simple, accurate Time Syn-chronization for wireless sensor networks,” Proceeding of IEEEconference on wireless communications and networking (WCNC),March 2003.

[15] S. Ganeriwal, D. Ganesan, H. Sim, V. Tsiatsis, M.B. Srivastava,“Estimating clock uncertatinty for efficient duty-cycling in sensornetworks,” Proceeding of Sensys, November 2005.

[16] J. Elson, D. Estrin, “Time synchronization for wireless sensornetworks,” UCLA CS technical report 200028, 2001.

[17] A. Hu, S.D. Servetto, “Algorithmic aspects of the time synchro-nization problem in large-scale sensor networks,” ACM/KluwerJournal on Mobile Networks and Applications (MONET), SpecialIssue on Wireless Sensor Networks, 2003.

[18] V. Bychkovskiy, S. Megerian, D. Estrin, M. Potkonjak “A collabo-rative approach to in-place sensor calibration,” Proceedings of the2nd International Workshop on Information Processing in SensorNetworks (IPSN’03), volume 2634 of Lecture Notes in ComputerScience, pages 301-316, Springer-Verlag Inc.,2003.

[19] R.M. Karp, J. Elson, C.H. Papadimitriou, S. Shenker, “Optimaland Global Time Synchronization in Sensornets,” CENS TechnicalReport 0012, April 10, 2003.

[20] A. Giridhar, P.R. Kumar, “Distributed clock synchronization overwireless networks: algorithms and analysis,” Proceedings of the45th IEEE Conference on Decision and Control, pp. 4915-4920, SanDiego, Dec. 13-15, 2006.

[21] R. Solis, V.S. Borkar, P.R. Kumar, “A new distributed time synchro-nization protocol for multihop wireless networks,” Proceedings ofthe 45th IEEE Conference on Decision and Control, pp. 2734–2739,San Diego, Dec. 13-15, 2006.

[22] N.M. Freris, P.R. Kumar, “Fundamental limits on synchronizationof affine clocks in networks,” Proceedings of the 46th IEEE Con-ference on Decision and Control, New Orleans, Dec. 12-14, 2007.

[23] B. Kusy, P. Dutta, P. Levis, M. Maroti, A. Ledeczi, D. Culler,“Elapsed time on arrival: a simple and versatile primitive forcanonical time synchronization services,” Int. J. Ad Hoc ubiquitouscomputing, 2006.

[24] S. Graham, P.R. Kumar, “Time in general-purpose control sys-tems: the control time protocol and an experimental evaluation,”Proceedings of the 43rd IEEE Conference on Decision and Control,pp. 4004-4009. Bahamas, Dec. 14-17, 2004.

[25] K. Shin, K. Lee, K. Lee, P. Mah, S. Park, H. Kim, “Enhancedtime-sync protocol for embedded sensor networks,” IEEE VehicularTechnology Conference, 2006.

[26] R. Urick, “Principles of underwater sound,” McGraw-Hill bookcompany, 1991.

[27] I.F. Akyildiz, D. Pompili, T. Melodia, “Underwater acoustic sensornetworks: research challenges,” Ad Hoc networks journal, pp.257-279, March 2005.

[28] G. Strang, “Linear algebra and its applications,” Brooks Cole, 4thedition, July 19, 2005.

[29] “Moteiv tmote sky quick start guide,”http://www.cems.uvm.edu/ crobinso/mote/tmote-sky-quickstart-110.pdf

[30] “Trace collected from Tmotes,” http://anrg.usc.edu/wiki/[31] V. Paxson, “On Calibrating Measurements of Packet Transit

Times”, ACM SIGMETRICS, Madison, Wisconsin, United States,p11 - 21, 1998.

[32] K. Noh, Q. Chaudhari, E. Serpedin and Bruce W. Suter, “NovelClock Phase Offset and Skew Estimation Using Two-Way TimingMessage Exchanges for Wireless Sensor Networks,” IEEE TRANS.ON COMMUNICATIONS, VOL. 55, NO. 4, APRIL 2007.

[33] L. Lamport, “Time, clocks, and the ordering of event in a dis-tributed system,” Communications of the ACM, vol.21, Issue 7,p558 - 565, 1978.

[34] L. Lamport and P. Melliar-Smith, “Synchronizing clocks in thepresence of faults,” Journal of the ACM (JACM), vol.32 , Issue 1,p52 - 78, 1985.

[35] C. Ellingson and R. Kulpinski, “Dissemination of system time,”IEEE Trans. on Communications, Vol. Com-21, No. 5, May 1973.

[36] C. Ellingson and R. Kulpinski, “Dissemination of system time,”IEEE Trans. on Communications, Vol. Com-21, No. 5, May 1973.

[37] IEEE 1588 standard for time synchronization,“http://ieee1588.nist.gov/”

Pai-Han Huang obtained his M.S. in ElectricalEngineering from University of Southern Cali-fornia in 2005, and is currently a Ph.D. studentin the Department of Electrical Engineering-Systems at the University of Southern California.His ongoing research is focused on developingmathematical models for fine grained time syn-chronization protocols used in sensor networks,and energy optimal scheduling for wireless net-works.

Maulik Desai obtained B.E. with Honors fromThe Cooper Union for the Advancement of Sci-ence and Art in 2007, and was awarded afull tuition scholarship for all four years. In thepast he has participated in a team developinga digital receiver front-end for the MRI systems.His current research interest includes employingstochastic modeling techniques to enhance theperformance of wireless networks. Maulik Desaiis a member of Eta Kappa Nu, the honor societyfor the Electrical Engineers, and is currently a

master student in the department of Electrical Engineering at theColumbia University.

Xiaofan Qiu attended Tsinghua University, Bei-jing, in 2003. After he finished sophomore year,he transferred to Texas A&M University, CollegeStation, in 2005. Xiaofan Qiu is completing hissenior year of undergraduate study, specializingin analogy circuit design. He is an Undergrad-uate Research Scholar at Texas A&M ,and hisscholar thesis is “Analysis and characterizationof a programmable low-dropout regulator”. Heparticipated in a summer research at Universityof Southern California, in 2006, studying time

synchronization protocols on wireless system. He is currently an en-gineer at Texas Instruments company.

Bhaskar Krishnamachari received the BE de-gree in electrical engineering from the CooperUnion, New York, in 1998 and the MS andPhD degrees from Cornell University in 1999and 2002, respectively. He is currently an Asso-ciate Professor in the Department of ElectricalEngineering, University of Southern California.His primary research interest is the design andanalysis of efficient mechanisms for operatingwireless networks.