Ad Hoc Networks 3 (2005) 281–323 www.elsevier.com/locate/adhoc

Clock for wireless sensor networks: a survey

Bharath Sundararaman, Ugo Buy *, Ajay D. Kshemkalyani

Department of Computer Science, University of Illinois at Chicago, 851 South Morgan Street, Chicago, IL 60607, United States

Received 17 September 2004; received in revised form 1 January 2005; accepted 18 January 2005

Abstract

Recent advances in micro-electromechanical (MEMS) technology have led to the development of small, low-cost, and low-power sensors. Wireless sensor networks (WSNs) are large-scale networks of such sensors, dedicated to observ- ing and monitoring various aspects of the physical world. In such networks, data from each sensor is agglomerated using data fusion to form a single meaningful result, which makes time synchronization between sensors highly desir- able. This paper surveys and evaluates existing synchronization protocols based on a palette of factors like pre- cision, accuracy, cost, and complexity. The design considerations presented here can help developers either in choosing an existing synchronization protocol or in defining a new protocol that is best suited to the specific needs of a sensor- network application. Finally, the survey provides a valuable framework by which designers can compare new and exist- ing synchronization protocols. 2005 Elsevier B.V. All rights reserved.

Keywords: Synchronization protocol; Sensor network; Wireless network; Comparative evaluation

1. Introduction closely observing real-world phenomena. Such sensors may be embedded in the environment or In recent years, tremendous technological enabled with mobility; they can be deployed in advances have occurred in the development of inaccessible, dangerous, or hostile environments. low-cost sensors, which are capable of wireless The sensors need to configure themselves in a com- communication and data processing [29,32, munication network, in order to collect informa- 61,65]. Wireless sensor networks (WSNs) are dis- tion that has to be pieced together to assemble a tributed networks of such sensors, dedicated to broader picture of the environment than what each sensor individually senses. A huge surge of interest in this field has been triggered by applications in * Corresponding author. Tel.: +1 312 413 2296; fax: +1 312 413 0024. domains as diverse as military [16], environmental E-mail address: [email protected] (U. Buy). [7,8,63], medical [33], scientific [1,5,39,60,72,73],

1570-8705/$ - see front matter 2005 Elsevier B.V. All rights reserved. doi:10.1016/j.adhoc.2005.01.002 282 B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323

Table 1 Example applications of wireless sensor networks Domain Applications Military Detection of nuclear, biological, and chemical attacks and presence of hazardous materials Prevention of enemy attacks via alerts when enemy aircrafts are spotted Monitoring friendly forces, equipment and ammunition Environmental Forest fire monitoring, flood detection, and earthquake detection Monitoring ecological and biological habitats Civilian Determining spot availability in a parking lot. Active badge tracking at the workplace Surveillance for security in banks and shopping malls. Highway traffic monitoring Health Tracking and monitoring doctors inside a hospital Identifying pre-defined symptoms by telemonitoring human physiological data Home and K-12 education The intelligent home and smart kindergarten, where wireless networks are used in developmental, problem-solving environments Scientific Space and interplanetary exploration. Deep undersea exploration Subatomic particle study. High-energy physics. Study of cosmic radiation and industrial, civilian, and home networks Researchers have developed successful clock [9,33,41,69,70], as shown in Table 1. As wireless synchronization protocols for wired networks over sensor networks become an integral part of the the past few decades. These are unsuitable for a modern era [6,13,14,22,23,26], addressing the is- wireless sensor environment because the challenges sues in designing such networks becomes manda- posed by wireless sensor networks are different and tory. Good sources of further information on manifold. The most important differences are sum- wireless sensor networks and the challenges therein marized here. First, wireless sensor networks can include surveys authored by Akyildiz et al. [2,3], contain several thousands of sensors and their by Culler and Hong [13], by Culler et al. [14],by wide deployment is enabled by the fact that sen- Tilak et al. [64], and by Tubaishat and Madria sors are becoming cheaper and smaller in size. [66]. For example, a military tracking application may In wireless sensor networks, the basic operation consist of hundreds of thousands of sensors, and is data fusion, whereby data from each sensor is scalability becomes a major issue. If a particular agglomerated to form a single meaningful result area needs sudden surveillance it might be popu- [17,44,71,74,76–78]. For instance, in forest fire lated with thousands of sensors in an ad-hoc man- monitoring, a forest fire can be detected by differ- ner, and the network must be scalable to the ent sensors at different points in time when the fire change. Second, self-configuration and robust- enters the range of each sensor. Sensor readings ness become a direct necessity in order to function (e.g., direction or velocity) and timestamps (indi- under rapid deployment conditions and operation cating the time at which the fire was sensed) are in inaccessible or dangerous environments. Third, passed along so that fusion of such information energy conservation is a very important concern. from various sensors will add up to a global result. It is impossible to provide a power source to each In this case, it might be the time elapsed since the sensor in such a vast network, and the small sizes fire was first spotted and its direction. The fusion of sensors restrict the amount of energy that can of individual sensor readings is possible only by be stored and procured. exchanging messages that are timestamped by each This paper has three objectives. First, it presents sensors local clock. This mandates the need for a a survey of clock synchronization protocols for the common notion of time among the sensors. Proto- rapidly emerging wireless networks, based on a cols that provide such a common notion of time palette of factors such as precision, accuracy, cost, are clock synchronization protocols. and complexity. The survey will help a reader B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 283 choose the most appropriate protocol for his ineffective. The section next explains the design application. Second, our analysis of issues underly- principles underlying clock synchronization proto- ing synchronization protocols will guide designers cols for wireless sensor networks. It then provides in defining new protocols tailored to specific appli- a classification of existing protocols based on syn- cations of sensor networks. Finally, the survey chronization issues and application-dependent fea- establishes a framework for comparing new and tures. Section 4 analyzes several existing clock existing clock synchronization protocols. synchronization protocols for wireless sensor net- Although there are many surveys on wireless works. Section 5 presents a quantitative and qual- sensor networks, most of the existing surveys do itative comparison of clock synchronization not focus on time synchronization. Culler et al. re- protocols. The conclusions of our survey are given cently published an overview of sensor networks in in Section 6. a special issue of IEEE Computer magazine [14]. Tilak et al. [64] present performance metrics for sensor networks along with a classification of sen- 2. Traditional clock synchronization sor networks based on the organization of commu- nicating nodes within a network. Their survey is 2.1. Motivation especially valuable in its ability to relate the syn- chronization requirements to the organization of In centralized systems, there is no need for syn- a sensor network. Akyildiz et al. wrote an excellent chronized time because there is no time ambigu- survey on sensor networks [3]. These authors dis- ity. A process gets the time by simply issuing a cuss various communication protocols based on system call to the kernel. When another process the layers of the Open System Interconnection then tries to get the time, it will get either an equal (OSI) model. Several open research issues—includ- or a higher time value. Thus, there is a clear ing hardware design, modulation protocols, and ordering of events and the times at which these strategies to overcome signal propagation ef- events occur. fects—are discussed along with various MAC pro- In distributed systems, there is no global clock tocols. Hill et al. [29] discuss various hardware or common memory. Each processor has its own architectures for nodes in sensor networks. Their internal clock and its own notion of time. In prac- survey was published in a special issue of the Com- tice, these can easily drift seconds per day, munications of the ACM on wireless sensor net- accumulating significant errors over time. Also, works. The issue contains various other articles because different clocks tick at different rates, they that discuss synchronization issues in these net- may not remain always synchronized although works [13,63,71]. The work closest to ours is Elson they might be synchronized when they start. This and Romers discussion of the design principles clearly poses serious problems to applications that underlying synchronization protocols for wireless depend on a synchronized notion of time. For networks [20]. most applications and algorithms that run in a dis- This paper is organized as follows. Section 2 tributed system, we need to know time in one or discusses the foundations of clock synchronization more of the following aspects. and reviews traditional synchronization protocols for wired networks that are not constrained by • The time of the day at which an event happened the peculiar limitations of wireless sensor net- on a specific machine in the network. works. It is necessary to understand these proto- • The time interval between two events that hap- cols to appreciate why new protocols had to be pened on different machines in the network. designed specifically for wireless sensor networks. • The relative ordering of events that happened Section 3 introduces the reader to clock synchroni- on different machines in the network. zation in wireless sensor networks by explaining the peculiar characteristics of such networks that Unless the clocks in each machine have a com- render the traditional synchronization protocols mon notion of time, time-based queries cannot be 284 B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 answered. Some practical examples that stress the the counter is decremented by one. When the need for synchronization are listed below. counter becomes becomes zero, an interrupt is gen- erated and the counter is reloaded from the hold- • In database systems, the order in which pro- ing register. Therefore, it is possible to program cesses perform updates on a database is impor- a timer to generate an interrupt 60 times a minute, tant to ensure a consistent, correct view of the where each interrupt is called a clock tick, by set- database. To ensure the right ordering of ting an appropriate value in the holding register. events, a common notion of time between co- At each clock tick, the interrupt procedure incre- operating processes becomes imperative. ments the clock value stored in memory. • Liskov [43] states that clock synchronization The clock value can be scaled to get the time of improves the performance of distributed algo- the day; the result can be used to timestamp an rithms by replacing communication with local event on that computer. In practice, the quartz computation. When a node N needs to query crystals in each of the machines in a distributed node M regarding a property, it can deduce system will run at slightly different frequencies, the property with some previous information causing the clock values to gradually diverge from it has about node M and its knowledge of the each other. This divergence is formally called the local time in node M. clock skew, which can lead to an inconsistent no- • It is quite common that distributed applications tion of time. Clock synchronization is performed and network protocols use timeouts, and their to correct this clock skew in distributed systems. performance depends on how well physically There are two broad ways to achieve this. dispersed processors are time-synchronized. Design of such applications is simplified when • Clocks are synchronized to an accurate real- clocks are synchronized. time standard like universal coordinated time (UTC). Clocks that must not only be synchro- Clock synchronization is the process of ensur- nized with each other but also have to adhere ing that physically distributed processors have a to physical time are termed physical clocks. common notion of time. It has a significant effect Such clocks are the subject of this paper. on many areas like security systems, fault diagno- • For applications in which causality-based logi- sis and recovery, scheduled operations, database cal time can be substituted for real-time (e.g., systems, and real-world clock values. mutual exclusion requires only the logical con- dition that no two processes access the critical 2.2. Clocks in distributed systems section concurrently), clocks are relatively syn- chronized to each other because the require- In distributed systems where each machine has ment is only to provide an ordering of events, its own physical clock, we have seen that clock and not the exact real-world time at which each synchronization is of significant importance. Be- event occurred. For clocks that provide only fore delving into the details of synchronizing relative synchrony, only causality-based consis- clocks, we define the notion of a clock. A computer tency of clocks matters as opposed to syn- clock is an electronic device that counts oscilla- chrony with respect to physical time. Such tions in an accurately-machined quartz crystal, at clocks are denoted by (causality-based) logical a particular frequency. It is also defined as an clocks [37,38]. Synchronizing such clocks will ensemble of hardware and software components not be considered in this paper. used to provide an accurate, stable, and reliable time-of-day function to the operating system and its clients. Computer clocks are essentially timers. 2.3. Clock inaccuracies The timer counts the oscillations of the crystal, which is associated with a counter register and a We require the following definitions. For any holding register. For each oscillation in the crystal, two clocks Ca and Cb, Fig. 1 gives our termino- B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 285

Fig. 1. Clock terminology. logy, which is consistent with previous definitions Fast Clock [46,47,50]. dC/dt > 1 The term software clock normally refers to the Perfect Clock time in a computer clock to stress that it is just a dC/dt = 1 counter that gets incremented for crystal oscilla- Slow Clock tions. The interrupt handler must increment the dC/dt < 1 software clock by one every time an interrupt Clock time, C (i.e., a clock tick) occurs. Most common clock hardware is not very accurate because the fre- quency that makes time increase is never exactly right. Even a frequency deviation of just 0.001% UTC, t would cause a clock error of about one second Fig. 2. Behavior of fast, slow, and perfect clocks with respect to per day. This is also a reason why clock perfor- UTC. mance is often measured with very fine units like one part per million (PPM). Consider the physical clock synchronization of where constant q is the maximum skew rate speci- machines in a distributed system to UTC. At any fied by the manufacturer. Fig. 2 illustrates the point of time, if the time at UTC is t, the time in behavior of fast, slow, and perfect clocks with re- the clock of machine p is Cp(t). In a perfect world, spect to UTC. Cp(t)=t for all p and all t. This means dC/dt =1. However, due to the clock inaccuracy discussed 2.4. Clock synchronization protocols above, a timer (clock) is said to be working within its specification if The requirements of a clock synchronization dC protocol are listed in Fig. 3. Numerous clock syn- 1 q 6 6 1 þ q; ð1Þ dt chronization protocols have been developed in the

Fig. 3. Requirements of clock synchronization protocols. 286 B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323

past few decades. Some of the representative pro- T0 T1 tocols are discussed next. Client

2.4.1. Remote clock reading method Request Clock synchronization between any two nodes S time is generally accomplished by message exchanges, which allow one of the nodes to estimate the time in the other nodes clock. Once the time difference Time server between the clocks of the nodes is computed, the Time clocks can be corrected or adjusted to run in tan- Fig. 5. Remote clock reading [11]. dem. In the presence of non-deterministic and un- bounded message delays, messages can get delayed arbitrarily, which makes synchronization very remote clock reading method, as shown in Fig. 4 difficult. The effectiveness of a synchronization and illustrated in Fig. 5. protocol centers around its ability to prevent Drawbacks. A disadvantage of Cristians proto- non-deterministic message delays from affecting col is that the time for any message to be sent is the quality of synchronization. highly variable due to network traffic and message Cristian defined the Remote Clock Reading routing. These factors are not only hard to mea- method, which handles unbounded message delays sure accurately but also unpredictable. This proto- between processes [11]. This protocol is also used col also induces a high complexity in terms of the by other clock synchronizing methods [28,51]. number of message exchanges, and there is no When a process wants a time estimate of a remote definitive means of deciding how many trials must process, it sends a time request and waits for the be performed to reach an accurate round-trip time remote process to respond. When it receives the re- estimate. sponse, the process calculates the round-trip as the difference between the time at which it initiated the 2.4.2. Time transmission method request and the time at which it received the re- Arvind [4] defined the Time Transmission Proto- sponse. The response contains the estimate of the col (TTP), which is used by a node to communi- time on the remote process. On obtaining such a cate the time on its clock to a target node. The response, it corrects its local clock to the sum of target node then estimates the time in the source the estimate and half the round-trip time. Several node by using the message timestamps and mes- trials are performed because the message delay is sage delay statistics. non-deterministic and the trial which offers the least round-trip time is chosen; alternately, the Algorithm. Assume that M is the source node and average of multiple trials is chosen. Cristians S is the target node. The algorithm for estimating method synchronizes several clients to an accurate the time is given in Fig. 6. Eq. (2) gives the specific time service (universal coordinated time) using the formula to estimate the time.

Fig. 4. Cristians synchronization protocol. B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 287

Fig. 6. The time transmission algorithm [4].

Derivation. The derivation of formula (2) in Fig. Drawbacks. The protocol involves a large num- 6 is as follows. ber of synchronization messages, resulting in a high computational overhead. The number of mes- • The actual time Tact on the source node Ms sages required for synchronization reduces the local clock is applicability of the protocol.

T act ¼ Rn dn; ð4Þ 2.4.3. Offset delay estimation method where dn is the offset between clocks S and M. The offset delay estimation method is employed • Since dn is not determinable, the average value by the (NTP) [48] which is over n messages is widely used for clock synchronization on the Inter- 1 Xn net. The design of NTP involves a hierarchical tree dðnÞ¼ d : ð5Þ n i of time servers. The primary server at the root syn- i¼1 chronizes with the UTC. The next level contains • From this formulation, we get, secondary servers, which act as a backup to the primary server. At the lowest level is the synchro- T ¼ R dðnÞ: ð6Þ approx n nization subnet which has the clients. • The ith message is received at S only di units Clock offset and delay estimation. In practice, a after it is transmitted by M. source node cannot accurately estimate the local time on the target node due to varying message Ri ¼ T i þ di þ di: ð7Þ or network delays between the nodes. This proto- It follows that, col employs a very common practice of performing several trials and chooses the trial with the mini- dðnÞ¼RðnÞT ðnÞdðnÞ: ð8Þ mum delay. Recall that Cristians remote clock reading method [11] also relied on the same strat- Rearranging, we get egy to estimate message delay. T approx ¼ Rn RðnÞþT ðnÞþdðnÞ: ð9Þ Fig. 7 shows how NTP timestamps are num- bered and exchanged between peers A and B. Let As individual message delays are not known, T1, T2, T3, T4 be the values of the four most recent dðnÞ is replaced with d, an expected value of timestamps as shown. Assume that clocks A and B message delay. Tapprox now becomes are stable and running at the same speed. Let a = T T and b = T T . If the network delay 1 3 2 4 T est ¼ Rn RðnÞþT ðnÞþd: ð10Þ difference from A to B and from B to A, called 288 B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323

T1 T2 Server A Ti-2 Ti-1 B

A T T T3 T4 Server B i-3 i

Fig. 7. Offset and delay estimation [48]. Fig. 8. Timing diagram for the two servers [48]. differential delay, is small, the clock offset h and Drawbacks. The offset delay estimation proto- round-trip delay d of B relative to A at time T4 col is similar to Cristians method [11] due to its are approximately given by the following. averaging approach. The disadvantage of both methods is that they lead to a high synchronization a þ b h ¼ ; d ¼ a b: ð11Þ overhead in terms of message complexity and re- 2 duced accuracy. However, accuracy of the net- Each NTP message includes the latest three work time protocol is better than for Cristians timestamps T1, T2 and T3, while T4 is determined protocol because delays are partly compensated. upon arrival. Thus, both peers A and B can inde- pendently calculate delay and offset using a single 2.4.4. Set-valued estimation method bidirectional message stream as shown in Fig. 8. The set-valued estimation method [40] is partic- The NTP protocol is shown in Fig. 9. ularly useful in systems where modeling uncer-

Fig. 9. The network time protocol synchronization protocol [48]. B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 289

Fig. 10. The set-valued estimation protocol, shown for a pair of processes Pi and Pj [40]. tainty is not directly captured by a priori models.

Assume that a distributed system consists of pro- ti1 ti1 ti2 ti2 tiN tiN P cessors Pi, for i =1,...,N. Let ti denote the local i time on the clock for processor Pi. We assume that the local times ti and tj on processors Pi and Pj, respectively, can be related by the linear equation: ti ¼ aijtj þ bij; ð17Þ where aij and bij represent the relative skew and off- set between the two hardware clocks. Pj t tt For any two processors Pi and Pj which pass j1 j2 jN messages between each other, the protocol works Fig. 11. Message passing between P and P [40]. as shown in Fig. 10. i j Clock correction. Clock correction is performed using an algorithm by Dolev et al. [18], which timing uncertainty works as follows. Synchronization proceeds in ti3 rounds and the interval between synchronization rounds is predefined. The node that first reaches ti3 the end of the synchronization round is obviously a ij the fastest and all other nodes have to adjust their ti2 true timing relationship rate to match the rate of this node. t There are two tasks associated with each node, i2 time monitor and message handler. If a node b ij ti1 reaches the end of the synchronization period be- t fore receiving any message from other nodes, it i1 performs the time monitor task by sending a mes- ttj1 j2 tjN sage to every other node indicating that it has reached the end of its synchronization period first. Fig. 12. Data triples plotted with the local time of Pj on the X- axis and the local time of P on the Y-axis [40]. Every other node will execute the message handler i to process the incoming message and adjust its clock to the fastest clock. tem. However, message corruption and message Drawbacks. The advantage of this protocol is losses might greatly degrade the accuracy. In addi- that every node tries to act as a synchronizer at tion, there is a possibility of instability during clock the same time and at least one succeeds. There is correction because nodes always seek to adjust no single point of failure associated with the sys- their clock rates to match the fastest clock in the 290 B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 network. If a processor Pi overcorrects its clock 3.1.1. Limited energy (e.g., because of variations in message transmission While the efficiency of computing devices is delays), this will trigger a new round of corrections increasing rapidly, the energy consumption of a as all other nodes will try to match the new clock wireless sensor network is becoming a bottleneck. rate of Pi. Worse yet, this phenomenon may repeat Due to the small size and cheap availability of the itself and continue indefinitely, leading to faster sensors, sensor networks can employ thousands and faster clock rates throughout the network. of sensors. This makes it impossible to wire each of these sensors to a power source. Also, the need for unmanned operation dictates that the sensors 3. Clock synchronization in wireless sensor networks be battery-powered. Since the amount of energy available to such sensors is quite modest, synchro- The traditional clock synchronization protocols nization must be achieved while preserving energy surveyed in the previous section are widely used in to utilize these sensors in an efficient fashion. wired networks. However, they are not suitable for wireless sensor networks for a variety of reasons 3.1.2. Limited bandwidth that we discuss in this section. Clock synchroniza- In wireless sensor nets, much less power is tion in wireless sensor networks requires newer consumed in processing data than transmitting it. and more robust approaches. A thorough under- Presently, wireless communication is restricted to standing of the challenges posed by wireless sensor a data rate in the order of 10–100 Kbits/s [21]. networks is crucial for the successful design of Pottie and Kaiser [55] have shown that the energy synchronization protocols for such networks. This required to transmit 1 bit over 100 m, which is section examines the design principles for clock syn- 3 joules, can be used to execute 3 million instruc- chronization in wireless sensor networks, and then tions. Bandwidth limitation directly affects message classifies various such synchronization protocols. exchanges among sensors, and synchronization is impossible without message exchanges. 3.1. Challenges of sensor networking 3.1.3. Limited hardware Wireless sensor networks have tremendous po- The hardware of a sensor node is usually very re- tential because they will expand our ability to mon- stricted due to its small size. A typical sensor node itor and interact remotely with the physical world. like the Berkeley Mica2 mote [35] has a small solar Smart sensors have the ability to collect vast battery, an 8-bit CPU that runs at a speed of amounts of hitherto unknown data, which will pave 10 MHz, 128 KB to 1 MB memory, and a commu- the way for a new breed of computing applications nication range of less than 50 m. Hill et al. [29] sur- as we showed in Table 1. Sensors can be accessed re- veyed some sensor-network platforms as well as the motely and placed where it is impractical to deploy most popular sensor architectures, such as Spec, data and power lines. Nodes can be spaced closely, Smartdust, Intels Imote [32], and Stargate. Fig. yielding fine-grained pictures of real-world phe- 13 illustrates the configuration of a typical sensor nomena that are currently modeled only on a large scale. However, to exploit the full potential of sensor networks, we must first address the peculiar 1 Kbps–1Mbps, 128KB–1MB 3–100 meters limitations of these networks and the resulting tech- Limited Storage Transceiver Lossy Transmissions nical issues. Evidently, sensor networks can be best Memory Embedded exploited by applications that perform data fusion Processor 8–bit, 10 MHz, to synthesize global knowledge from raw data on Slow Computations the fly. Although data fusion requires that nodes Sensors 66% of Total Cost be synchronized, the synchronization protocols Requires Supervision Battery Limited Lifetime for sensor networks must address the following fea- tures of these networks. Fig. 13. Sensor node hardware for Mica mote [29]. B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 291 node. The restrictions on computational power and veyed in Section 2. However, due to the peculiar storage space pose a huge challenge. The size of a characteristics, limitations, and the dynamic nature sensor cannot be increased because it would make of wireless sensor networks, as seen in Section 3.1, it more expensive and consume more power. This these protocols cannot be applied directly. Several would prevent the deployment of thousands of sen- important design considerations are listed next. sor nodes, which is usually required for efficient operation of several critical applications. 3.2.1. Energy efficiency

3.1.4. Unstable network connections • External time standard (GPS) usage An implicit advantage usually available to a In sensor nets, energy conservation is very wireless network is mobility. Mobile ad-hoc net- important. Traditional protocols like NTP [48] works are becoming increasingly popular and the and TEMPO [28] use an external standard like following issues must be addressed. Global Positioning System (GPS) or Universal Time (UTC) to synchronize the network to an • The communication range of the mobile sensors accurate time source. However, the use of GPS is very limited (roughly 20–100 m), which poses a high demand for energy which is usually makes message exchanges between sensor nodes not available in sensor networks. This makes it difficult. difficult to maintain a common notion of time. • A wireless medium is unshielded to external • Mode of transmission interference and this may lead to a high percent- Reduction of energy is achieved by choosing to age of message loss. transmit over multiple short distances instead of • A wireless connection suffers from a restricted a single long path. This translates into either a bandwidth and intermittent connectivity. lower transmit power or a higher data transmis- • The network topology frequently changes due sion speed over a given distance. Either one will to the mobility of the nodes. Dynamic reconfig- decrease the total end-to-end energy needed to uration becomes necessary. transmit a packet of data. This implies that in large sensor networks, data is transmitted in sequences or hops, instead of a single long path 3.1.5. Tight coupling between sensors and physical from the sender to the receiver. world • Proactive versus reactive routing WSNs seek to monitor real-world phenomena A proactive protocol keeps track of all the nodes and the network design is tailored to the specific in a nodes neighborhood, having total knowl- environment being sensed. Therefore, as WSNs edge of all possible routes at all times. Reactive are used for critical and diverse applications like protocols do not maintain routing information military tracking, forest fire monitoring, and geo- proactively and find routes only when they need graphical surveillance, the network has to be them. A reactive protocol leads to energy sav- tailored to suit the application. For instance, sen- ings because nodes do not waste energy by sors can be used to measure temperature, light, attempting to maintain synchronization at all sound, or humidity, and the application (e.g., for- times. Nodes are awakened only when they are est fire monitoring) decides the type of sensors to needed. Elson et al.s Reference Broadcast Syn- be used (e.g., temperature sensors). chronization (RBS) [19] uses a similar technique, called post-facto synchronization. 3.2. Design principles of clock synchronization in sensor networks 3.2.2. Infrastructure Researchers have developed a wide variety of In many critical sensor applications, the net- clock synchronization protocols for traditional work is deployed in an ad-hoc fashion. Ad-hoc wired networks over the past few decades, as sur- networks are networks of mobile wireless sensors 292 B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 in which the mobile nodes constantly change their • Message delivery is very unreliable due to the neighborhood and the configuration. This denies dynamic nature of the network, the intermittent the convenience of having an infrastructure like connectivity, and the limited communication NTP [48], which has several layers of servers that range of each node. provide an accurate source of time. In ad-hoc sen- sor networks, the nodes must cooperate to orga- 3.2.5. Network dynamics nize themselves into a network and resolve A stationary sensor network, without any contention for the available bandwidth. These mobility, usually requires an initial set-up before tasks become more complex if the number of beginning operation. However, if the application nodes grows or if the relationship among nodes demands a higher population of nodes in a partic- changes rapidly, for instance, because of mobility. ular part of the network, the addition of extra nodes changes the neighborhood of each node 3.2.3. End-to-end latency and the configuration of the network. Dynamic Traditional wired networks are fully connected sensor networks add further challenges because networks in which the variability in the propagation the nodes are mobile. Mobility directly leads to a and (intermediate) queuing delay is relatively small. frequent change in topology of the network. In addition, any node can send a message directly to Hence, the protocols used for such networks, another node at any point in time. This implies a whether stationary or dynamic, must ensure self- constant end-to-end delay throughout the network configuration (by use of suitable neighborhood and provides a close approximation for the actual definition or leader election protocols) to achieve latency. Sensor nets may be large in size and have synchronization. to deal both with mobility and wireless transmission over a shared medium. These features make it 3.3. Classification of synchronization protocols impractical to assume a single latency bound be- tween the ends of the network. Sensor nets therefore Wireless sensor networking can be applied to a need localization algorithms to reduce this latency wide range of applications, from simple parking error as well as the jitter, the unpredictable variation lot monitoring to safety-critical applications like in transmission times. Also, protocols that assume a earthquake detection. As most networks are very fully connected network cannot be applied to multi- closely coupled to the application, the protocols hop sensor networks. used for synchronization differ from each other in some aspects and resemble each other in other 3.2.4. Message loss and message delivery aspects. We classify synchronization protocols Fault-tolerant algorithms for traditional wired based on two kinds of features. networks handle message loss by sending extra messages. This ensures that every node partici- 1. Synchronization issues pates in the synchronization, leading to better 2. Application-dependent features operation. Several protocols for wired networks employ the averaging method to compute the delay between two nodes, which is a critical aspect 3.3.1. Synchronization issues in maintaining synchronized time. Message loss Wireless sensor networks provide answers to handling and estimating message delay by averag- user queries by fusing data from each sensor to ing are not desirable in sensor nets because of the form a single answer or result. To accomplish this following reasons. data fusion, it becomes necessary for these sensors to agree on a common notion of time. All the par- • Transmission of every bit requires energy and ticipating sensors can be enveloped in a common multiple message transmissions to estimate aver- timescale by either synchronizing the local clocks age delays lead to higher energy requirements. in each sensor or by just translating timestamps B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 293 that arrive at a sensor into the local clock times. clock of each node to the local clock of every Various options are now described. other node in the network. Local timestamps are then compared using the table. In this way, • Master–slave versus peer-to-peer synchroniza- a global timescale is maintained while letting tion the clocks run untethered. Romer [56] uses the Master–slave. A master–slave protocol assigns same principle. When timestamps are exchanged one node as the master and the other nodes between nodes, they are transformed to the local as slaves. The slave nodes consider the local clock values of the receiving node. The round- clock reading of the master as the reference trip delay between two nodes and the idle time time and attempt to synchronize with the mas- of a message are taken into consideration. ter. In general, the master node requires CPU • Internal synchronization versus external synchro- resources proportional to the number of slaves, nization and nodes with powerful processors or lighter Internal synchronization. In this approach, a loads are assigned to be the master node. global time base, called real-time, is not avail- Mock et al. [49] have adopted the IEEE able from within the system and the goal is to 802.11 clock synchronization protocol due to minimize the maximum difference between the its simple, non-redundant, master/slave struc- readings of local clocks of the sensors. The pro- ture. Pings protocol [54] also adheres to the tocol of Mock et al. [49] uses internal synchro- master–slave mode. nization. Peer-to-peer. Most protocols in the literature, External synchronization. In external synchroni- such as RBS [19], Romers protocol [56], the zation, a standard source of time such as Uni- protocol by PalChaudhuri et al. [53], the time versal Time (UTC) is provided. Here, we do diffusion protocol by Su and Akyildiz [62], not need a global time base since we have an and the asynchronous diffusion protocol of Li atomic clock that provides actual real-world and Rus [42] are based on a peer-to-peer struc- time, usually called reference time. The local ture. Any node can communicate directly with clocks of sensors seek to adjust to this reference every other node in the network. This elimi- time in order to be synchronized. Protocols like nates the risk of master node failure, which NTP [48] synchronize in this fashion because would prevent further synchronization. Peer- external synchronization is better suited to to-peer configurations offer more flexibility loosely coupled networks like the Internet. but they are also more difficult to control. Most protocols in sensor networks do not per- • Clock correction versus untethered clocks form external synchronization unless the appli- Clock correction. Most methods in practice per- cation demands it, because energy efficiency is a form synchronization by correcting the local primary concern and employing an external clock in each node to run on par with a global time source typically induces high-energy timescale or an atomic clock, which is used to requirements. provide a convenient reference time. The proto- Internal synchronization usually leads to a col of Mock et al. [49] and Pings protocol [54] more correct operation of the system, while are based on this method. The local clocks of external synchronization is primarily used to nodes that participate in the network are cor- give users convenient reference time informa- rected either instantaneously or continually to tion. Note that internal synchronization can keep the entire network synchronized. be performed in a master–slave or peer-to-peer Untethered clocks. Achieving a common notion fashion. External synchronization cannot be of time without synchronization is becoming performed in a peer-to-peer fashion; it requires popular, because a considerable amount of a master node which communicates with a time energy can be saved by this approach. RBS [19] service like GPS to synchronize the slaves and builds a table of parameters that relate the local itself to the reference time. 294 B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323

• Probabilistic versus deterministic synchroniza- requests a timestamp until the time it tion actually receives a response. Probabilistic synchronization. This technique The drawbacks of this approach are obvi- provides a probabilistic guarantee on the maxi- ous. There is a variance in message delay mum clock offset with a failure probability that between the sender and the receiver. The can be bounded or determined. The reasoning variance is due to network delays (promi- behind a probabilistic approach is that a deter- nent in multi-hop networks) and the work- ministic approach usually forces the synchroni- load in the nodes that are involved. Most zation protocol to perform more message methods compute the average message delay transfers and induces extra processing. In a after performing many trials, during which wireless environment where energy is scarce, they lose accuracy and add further over- this can be very expensive. The protocol of Pal- head. Also, optimization of the time taken Chaudhuri et al. [53] is a probabilistic variation by the sender to prepare and transmit the of RBS [19]. Arvind [4] defined a probabilistic message, and the time taken by the receiver protocol for wired networks. to process the message must be considered. Deterministic synchronization. Arvind [4] defines Receiver-to-receiver synchronization. This ap- deterministic algorithms as those that guarantee proach exploits the property of the physical an upper bound on the clock offset with cer- broadcast medium that if any two receivers tainty. Most algorithms in the literature are receive the same message in single-hop trans- deterministic. Sichitiu and Veerarittiphans pro- mission (see below), they receive it at approxi- tocol [58] is centered on a deterministic algo- mately the same time. Instead of interacting rithm. RBS [19] and the time-diffusion with a sender, receivers exchange the time at protocol [62] are also deterministic. which they received the same message and com- • Sender-to-receiver versus receiver-to-receiver pute their offset based on the difference in recep- synchronization tion times. The obvious advantage is the Most existing methods synchronize a sender reduction of the message-delay variance. This with a receiver by transmitting the current clock protocol is vulnerable only to the propagation values as timestamps. As a consequence, these delay to the various receivers and the differences methods are vulnerable to variance in message in receive time. delay. Newer methods such as RBS [19] per- form synchronization among receivers using Table 2 classifies the various protocols for clock the time at which each receiver receives the synchronization, based on the analysis in this same message. Such an approach reduces the section. time-critical path, which is the path of a message that contributes to non-deterministic errors in 3.3.2. Application-dependent features the protocol. Sender-to-receiver synchronization. This tradi- • Single-hop versus multi-hop networks tional approach usually happens in threesteps. Single-hop communication. In a single-hop net- work, a sensor node can directly communicate 1. The sender node periodically sends a mes- and exchange messages with any other sensor sage with its local time as a timestamp to in the network. However, many wireless sen- the receiver. sor-network applications span several domains 2. The receiver then synchronizes with the or neighborhoods. (Nodes within a neighbor- sender using the timestamp it receives from hood can communicate via single-hop message the sender. transmission.) The network is often too large, 3. The message delay between the sender and making it impossible for each sensor node to receiver is calculated by measuring the total directly exchange messages with every other round-trip time, from the time a receiver node. Elson and Romer [20] show that a single B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 295

Table 2 Classification based on synchronization issues Protocol Synchronization issues Master–slave vs. Internal vs. external Probabilistic Sender-to-receiver Clock peer-to-peer vs. deterministic vs. receiver-to-receiver correction RBS [19] Peer-to-peer Both Deterministic Receiver-to-receiver No Romer [56] Peer-to-peer Internal Deterministic Sender-to-receiver No Mock et al. [49] Master/slave Internal Deterministic Receiver-to-receiver Yes Ganeriwal et al. [25] Master/slave Both Deterministic Sender-to-receiver Yes Ping [54] Master/slave Both Deterministic Sender-to-receiver Yes PalChaudhuri et al. [53] Peer-to-peer Both Probabilistic Receiver-to-receiver No Sichitiu and Veerarittiphan [58] Peer-to-peer Internal Deterministic Sender-to-receiver Yes Time-diffusion protocol [62] Peer-to-peer Internal Deterministic Receiver-to-receiver Yes Asynchronous diffusion [42] Peer-to-peer Internal Deterministic Sender-to-receiver Yes

latency bound cannot be assumed. Protocols the environment. The protocols used by RBS such as those by Mock et al. [49], Ganeriwal [19], Mock et al. [49], Ganeriwal et al. [24,25], et al. [24,25], Ping [54], and PalChaudhuri and PalChaudhuri et al. [53] are geared to sta- et al. [53] are based on single-hop communica- tionary networks. tion; however, they can be extended to multi- Mobile networks. In a mobile network, the sen- hop communication. sors have the ability to move, and they connect Multi-hop communication. The need for multi- with other sensors only when entering the geo- hop communication arises due to the increase graphical scope of those sensors. The scope of in the size of wireless sensor networks. In such a mobile sensor is the communication range up settings, sensors in one domain communicate to which it can communicate and successfully with sensors in another domain via an interme- exchange messages with other sensors. Romer diate sensor that can relate to both domains [56] shows the need for a robust protocol, [19]. Communication can also occur as a which can handle the frequent changes in net- sequence of hops through a chain of pairwise- work topology due to the mobility of the nodes. adjacent sensors. RBS [19], Pings protocol The change in topology is often a problem [54], the protocol by PalChaudhuri et al. [53], because it requires resynchronization of nodes and Su and Akyildizs time-diffusion protocol and recomputation of the neighborhoods or [62] can be suitably extended to handle multi- clusters. hop communication. • MAC-layer-based approach versus standard • Stationary networks versus mobile networks approach Most sensor networks are tightly coupled to the The Media Access Control (MAC) layer is a application and synchronization protocols vary part of the Data Link Layer of the Open System depending on the application at hand. Mobility Interconnection (OSI) model. This layer is is an inherent advantage of a wireless environ- responsible for the following functions. ment but it induces more difficulties in achiev- – Providing reliability to the layers above it ing synchronization. It leads to frequent with respect to the connections established changes in network topology and demands that by the physical layer. the protocol be more robust. – Preventing transmission collisions so that the Stationary networks. In stationary sensor net- message transmission between one sender works, the sensors do not move. An example and the intended receiver node(s) does not is a network of sensors for monitoring the interfere with transmission by other nodes. motion of a vehicle in a certain area. For MAC protocols effectively utilize the MAC layer these sensor networks, the topology remains to achieve better energy efficiency, which is cru- unchanged once the sensors are deployed in cial in sensor networks. The IEEE 802.11 MAC 296 B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323

protocol [31] is widely used. Several variations Now we summarize various existing synchroniza- of this protocol have been defined for the pur- tion protocols and their relationships to the above pose of controlling power consumption, includ- issues. We also discuss the relative advantages and ing the protocols listed below. A survey by Chen disadvantages of these protocols. Given that sensor et al. [10] compares some of these protocols. networks are generally closely tied to the real-world – Sensor-MAC (S-MAC) [75], environment that they monitor, different networks – Power-Aware Multi-Access Protocol will have different characteristics affecting their (PAMAS) [59], synchronization requirements. For this reason, – Energy-Conserving MAC (EC-MAC) [34], some of the protocols that we discuss below will – Packet-Reservation Multiple Access MAC be more suitable than others in some cases and vice (PRMA) [27], versa. – Distributed-Queuing Request Update Multi- We will specifically consider the following ple Access (DQRUMA) [36], protocols. – Multiservice Dynamic Reservation TDMA (MDR-TDMA) [52]. 1. Reference Broadcast Synchronization (RBS) Reference Broadcast Synchronization [19] does seeks to reduce non-deterministic latency using not rely on MAC protocols in order to avoid a receiver-to-receiver synchronization and to con- tight integration of the application with the serve energy via post-facto synchronization [19]. MAC layer. The protocols used by Mock et al. 2. Romers protocol, which has been successfully [49], Ganeriwal et al. [24,25], and Sichitiu and applied to mobile ad-hoc networks, uses an Veerarittiphan [58] rely on the CSMA/CA proto- innovative time transformation algorithm for col for the MAC layer. A survey of MAC proto- achieving clock synchronization [56]. This pro- cols for sensor networks is given by Jones et al. tocol appears to be especially effective in envi- [34]. ronments with strict resource constraints. 3. Mocks protocol extends the IEEE 802.11 Table 3 classifies the various protocols for clock master–slave protocol by exploiting the synchronization, based on the analysis in this tightness property of the communication med- section. ium [49]. Minimal message complexity and fault tolerance are the main benefits of this protocol. 4. Network-wide Time Synchronization is geared 4. Discussion of synchronization protocols toward networks with a large node density [24]. 5. Delay Measurement Time Synchronization Pro- In the previous section, we analyzed the issues tocol for wireless sensor networks [54] is an underlying synchronization in sensor networks. energy-efficient protocol due to its low message

Table 3 Classification based on application-dependent features Protocol Application-dependent features Single-hop vs. multi-hop MAC layer vs. standard Geared to mobility RBS [19] Both Standard No Romer [56] Both Standard Yes Mock et al. [49] Single-hop MAC layer No Ganeriwal et al. [25] Both MAC Layer Yes Ping [54] Both Standard No PalChaudhuri et al. [53] Both Standard No Sichitiu and Veerarittiphan [58] Both MAC Layer No Time-diffusion protocol [62] Both Standard Yes Asynchronous diffusion [42] Both Standard Yes B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 297

complexity. It is also lighter in computational broadcast at the physical layer will arrive at a set cost, albeit less accurate, than the RBS protocol of receivers with very little variability in its delay. [19]. If each receiver records the local time as soon as 6. The Probabilistic Clock Synchronization Service the message arrives, all receivers can synchronize for sensor networks extends RBS by providing with a high degree of precision by comparing their probabilistic bounds on the accuracy of clock local clock values when the message was received. synchronization [53]. This protocol uses a sequence of synchronization 7. Sichitiu and Veerarittiphans protocol provides messages from a given sender in order to estimate good synchronization accuracy in wireless sen- both offset and skew of the local clocks relative to sor networks while using a deterministic proto- each other. The protocol exploits the concept of col with minimal computational and storage time-critical path, that is, the path of a message complexity [58]. that contributes to non-deterministic errors in a 8. The Time-Diffusion Protocol (TDP) by Su and protocol. Fig. 14 compares the time-critical path Akyildiz achieves a network-wide ‘‘equilib- of traditional protocols, which are based on sen- rium’’ time using an iterative, weighted averag- der-to-receiver synchronization, with receiver-to- ing technique based on a diffusion of messages receiver synchronization in RBS. involving all the nodes in the synchronization Non-deterministic transmission delays are detri- process [62]. mental to the accuracy of a synchronization proto- 9. The Asynchronous Diffusion protocol by Li and col because they make it difficult for a receiver to Rus uses a strategy similar to TDP; however, estimate the time at which a message was sent network nodes execute the protocol and correct and vice versa. In general, the time involved in their clocks asynchronously with respect to each sending a message from a sender to a receiver is other [42]. the result of the following four factors, all of which can vary non-deterministically.

4.1. Reference broadcast synchronization [19] 1. Send time: The time spent by the sender for message construction and the time spent to The Reference Broadcast Synchronization (RBS) transmit the message from the senders host to protocol is so named because it exploits the broad- the network interface. cast property of the wireless communication med- 2. Access time: The time spent waiting to access ium [19]. According to this property, two receivers the transmit channel. located within listening distance of the same sender 3. Propagation time: The time taken for the mes- will receive the same message at approximately the sage to reach the receiver, once it has left the same time. In other words, a message that is sender.

NIC NIC Sender Sender

Receiver Receiver

Receiver

Critical Path Critical Path

Time

Fig. 14. Time-critical path for traditional protocols (left) and RBS protocol (right) [19]. 298 B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323

4. Receive time: The time spent by the receiver to given random clock offsets; the times of m message process the message. transmissions were selected randomly. Each syn- chronization message was delivered to every recei- By considering only the times at which a mes- ver and timestamped using the receivers clock. sage reaches different receivers, the RBS protocol Since every receiver computes its offset with every directly removes two of the largest sources of other receiver, O(n2) offsets were obtained and non-determinism involved in message transmis- compared with the actual offsets. The maximum sion, namely the send time and the access time. difference between computed and actual offsets Thus, this protocol can provide a high degree of was considered to be the group dispersion. synchronization accuracy in sensor networks. In order to show that the precision of offset esti- The RBS protocol uses the algorithm shown in mation increased with the number of broadcasts, Fig. 15 to estimate the phase offset between the an experiment was conducted for values of m be- clocks of two receivers. tween 1 and 50 broadcasts and values of n between This protocol can produce highly accurate re- 1 and 20 receivers for a total of 1000 trials. In the sults if message reception by each receiver is tight case of two receivers, the results show that when 30 and if each receiver can record its local clock read- reference broadcasts were sent instead of one ing as soon as the message is received. This is often broadcast, the precision improved from an error the case for single-hop communication in a wire- of 11 ls to 1.6 ls. A precision of the order of less network. In practice, however, messages sent microseconds is clearly an excellent accuracy result over a wireless sensor network can be corrupted. for a sensor network. In addition, a receiving node may not be able to The RBS protocol also estimates the skew be- record the time of message arrival promptly, for tween clocks in neighboring nodes of a sensor net- instance, if the node was busy with other computa- work. The skew computation must use multiple tions when the message arrived. To alleviate these reference broadcasts in order to observe variations non-deterministic factors, the RBS protocol uses a in the offset of two node clocks over time. Elson sequence of reference messages from the same sen- et al. [19] use the least squares method to find a der, rather than a single message. Receiver j will best-fit line that will provide an estimate of an- compute its offset relative to any other receiver i other nodes clock skew. as the average of clock differences for each packet An experiment was conducted with a network received by nodes i and j: of Berkeley motes [35]. A reference packet with a 1 Xm sequence number was periodically broadcast in a Offset½i; j¼ ðT T Þ: ð19Þ network of five motes. Each mote used a 2 ls res- m i;k j;k k¼1 olution clock to timestamp the reception times of In this equation, parameters i and j denote two incoming broadcasts. receivers, m is the number of reference broadcasts, Fig. 16 shows a diagram by Elson et al. in which and Ti,k is node is clock when it receives broad- they plot the performance of their protocol [19]. cast k. Each point in the diagram represents the difference Elson et al. [19] conducted an experiment with between the times at which the two nodes reported an actual network of n sensor nodes that were receiving a reference broadcast, plotted on a time-

Fig. 15. Estimation of phase offset in RBS protocol [19]. B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 299

needed. Clocks run untethered at their own natu- 20 ral rates and the timestamps from different clocks + + 15 500 are compared only when an event of interest oc- + 10 + + curs. This technique is similar to reactive routing, 400 5 (micro which we discussed earlier. By synchronizing the 0 (micro + + nodes only when necessary, energy is conserved 300 5 Offset + + + 10 Error because the nodes can be switched to power-saving 200 Fitmode sec) at all other times. Phase sec) + 15 + 100 20 Multi-hop communication. Multi-hop synchro- + + nization is required in sensor networks that span several node neighborhoods. Evidently, the possi- 050 100 150 200 Time (sec) bility of multiple hops would introduce a high de- gree of variability in message transmission time Fig. 16. Clock skew estimation in RBS: each point represents between multiple receivers of the same message. the phase offset between two nodes [19]. In this case, the RBS protocol would lose its accu- racy. To avoid loss of precision, two nodes located scale defined by one nodes clock. If Ti,k is the time in different neighborhoods are typically synchro- at which receiver is clock received message k, the nized using a third node lying in the intersec- coordinates of each point in the figure are defined tion of the two neighborhoods. The support as follows for each message k received by receivers for multi-hop communication is more than a r1 and r2: convenience; large sensor networks make it a necessity. x ¼ T r1;k; y ¼ T r2;k T r1;k: ð20Þ The diagonal line drawn through the points rep- Advantages: resents the best linear fit of the plotted points. The 1. The largest sources of error (send time and vertical impulses, read with respect to the right- access time) are removed from the critical path hand Y-axis, show the distance from each point by decoupling the sender from the receivers. to the best-fit line. Outliers (i.e., the points with 2. Clock offset and skew are estimated indepen- the highest residual error) are discarded. A node dently of each other; in addition, clock correc- can compute a least squares error fit (diagonal tion does not interfere with either estimation line) and convert time values between its local because local clocks are never modified. clock and that of its peers. Here are some addi- 3. Post-facto synchronization prevents energy tional features of the RBS protocol [19]. from being wasted on expensive clock updates. No clock correction. Once clock offset and skew 4. Multi-hop support is provided by using nodes are estimated, the local clocks of nodes are not belonging to multiple neighborhoods (i.e., corrected to run synchronously with a global time- broadcasting domains) as gateways. scale. Instead, each node keeps a table of parame- 5. This protocol is applicable to both wired and ters that relate the offset and skew of the node with wireless networks. respect to every other clock in the network. When- 6. Both absolute and relative timescales can be ever a clock reading is received from another node, maintained. a node checks its table to translate the clock value received to the local timescale. The advantage of Disadvantages: this method is that considerable energy is saved 1. The protocol is not applicable to point-to-point by avoiding the process of correcting or resetting networks; a broadcasting medium is required. each nodes local clock to a global time. 2. For a single-hop network of n nodes, this proto- Post-facto synchronization. The RBS protocol col requires O(n2) message exchanges, which achieves a high level of energy conservation by can be computationally expensive in the case performing synchronization only when it is of large neighborhoods. 300 B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323

3. Convergence time, which is the time required to t synchronize the network, can be high due to the 1 1 2 3 large number of message exchanges. 4. The reference sender is left unsynchronized in t 2 1 2 3 this method. In some sensor networks, if the ref- erence sender needs to be synchronized, it will Fig. 17. Store and forward communication [56]. lead to a significant waste of energy.

4.2. Time synchronization in ad-hoc networks [56] First, in traditional networks, the message trans- mission delay between any two nodes can be esti- Romers synchronization protocol was designed mated with a high degree of accuracy. Second, in specifically for ad-hoc communication networks those networks it is possible for nodes to periodi- [56]. These networks consist of mobile, wireless cally exchange messages in order to synchronize computing devices that can spontaneously com- with each other. In ad-hoc networks, the first municate when they are brought within each assumption does not hold because an intermediate others relatively limited transmission range. When node may introduce an arbitrarily long delay in this happens, a symmetric bidirectional link is communication between a sender and a receiver. formed between pairs of neighboring nodes and The second assumption does not hold because node synchronization takes place, if necessary. energy constraints make it impossible to establish Ad-hoc networks are further characterized by the a-priori synchronization between arbitrary pairs following features. First, nodes are highly dynamic of nodes in ad-hoc networks. (mobile) and sparsely distributed. Second, the Romers protocol is based on two assumptions. links or connections among the nodes have a rela- The first assumption puts an upper bound, usually tively short range (e.g., measuring in the order of denoted by q, on the maximum skew of computer hundred feet or less) and a short life span, due to clocks. Second, whenever a message is exchanged node mobility. Third, message passing is possible between two nodes, the connection remains long in the following two ways. enough for the two nodes to exchange one addi- tional message. 1. Two nodes can exchange messages if one node Similar to RBS, the key idea underlying Ro- enters the communication range of the other. mers protocol is to avoid synchronizing the local This is a direct way of message exchange. clocks of network nodes but instead to generate 2. Two nodes that reside in different partitions can timestamps using untethered local clocks. When communicate by using store and forward tech- timestamps are passed between nodes, they are niques. An intermediate node can receive the transformed to the local time of the receiving message from the sender, store it temporarily, node. Since this transformation will generally and eventually forward it to the receiver after introduce errors, Romers protocol seeks to define entering the receivers communication range. an upper bound on the absolute value of the clock error received by a node. Fig. 17 shows a time chart for communication When a message containing a timestamp is between a sender and a receiver through an inter- transferred between nodes, the timestamp is first mediate node. At time t1, node 1 (the sender) sends transformed from the local time to a common time a message to node 3 (the receiver) through node 2, transfer format (UTC) and then to the local time an intermediate node that stores the message. If of the receiver. In more detail, the synchronization node 2 comes into the receivers transmission range protocol performs the following steps: (1) deter- at time t2, the message is forwarded to node 3. mine lower and upper bounds for the real-time Romer notes that two fundamental assump- elapsed from the generation of the timestamp in tions underlying synchronization in traditional the source node to the arrival of the message in networks no longer hold in ad-hoc networks [56]. the destination node; (2) transform these bounds B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 301 to the time of the destination node; and (3) sub- the local time of node 1 (with an upper bound q1 tract the resulting values from the time of arrival on its skew) to the local time of node 2 (with upper in the destination node. The resulting interval bound q2), Dt is first estimated by the real-time specifies lower and upper bounds for the real-time interval ½ DC ; DC , which in turn is estimated by 1þq1 1q1 elapsed from the generation of the timestamp in the time interval ½DC 1q2, DC 1þq2 relative to the 1þq1 1q1 the source node to the arrival of the message in local time of node 2. Since an estimate of the life- the destination node. If real-time differences time of a timestamp is calculated as the timestamp (UTC) are denoted by Dt and computer clock dif- is passed along different nodes, it is not practical to ferences by DC, the transformation is based on the assume a constant message delay. In general, the following equation. transmission delay between any pair of nodes in- DC volved in the transmission will be variable. Thus, ð1 qÞ 6 6 ð1 þ qÞ: ð21Þ the message delay between every pair of nodes Dt along the path must be estimated in order to arrive The equation above can be transformed into: at an accurate solution. The message delay be- tween two nodes is estimated by bounding it with- ð1 qÞDt 6 DC 6 ð1 þ qÞDt; ð22Þ in interval [0,rtt] where rtt is the round-trip time between the two nodes. DC DC 6 Dt 6 : ð23Þ According to Fig. 19, the delay d for message 1 þ q 1 q M2 can be estimated by the following equation, It can be inferred that the local clock difference relative to the senders clock: DC that corresponds to the real-time difference Dt 6 6 1 qs can be bounded by the following interval: 0 d ðt3 t2Þðt6 t5Þ : ð25Þ 1 þ qr ½ð1 qÞDt; ð1 þ qÞDt: ð24Þ The difference t3 t2 is the round-trip time (rtt), The basic principles underlying Romers syn- and t6 t5 represents the storage time of the mes- chronization protocol are summarized in Fig. 18. sage at the receiver. Also, qs and qr are the q values In order to transform a time difference DC from for sender and receiver, respectively.

Fig. 18. Principles underlying Romers synchronization protocol [56].

t 4 t 5 t 6 Receiver Time in Receiver

M1 ACK 1 M2 ACK 2

Sender Time in Sender t 1 t 2 t 3

Fig. 19. Message delay estimation [56]. 302 B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323

idle 1 idle 2 1 2 3 N rtt1 rtt 2

Fig. 20. Timestamp estimation process [56].

As a message is transmitted over a sequence of 3. The protocol requires round-trip estimation, nodes, the round-trip time rtt between each pair of which can increase the synchronization error. nodes and the idle time (or storage time) are accu- mulated to estimate the value of the timestamp. A node n involved in the transmission must add the 4.3. Continuous clock synchronization in wireless times computed by all nodes including the message real-time applications [49] delay between each pair of nodes in order to esti- mate the timestamps value. Fig. 20 further illus- Mock et al. [49] defined a protocol for continu- trates this mechanism. ous clock synchronization in wireless sensor net- Meier et al. recently defined an improved ver- works by extending the IEEE 802.11 standard sion of Romers protocol [45]. We briefly discuss [31] for wireless local area networks. Their proto- this improvement in Section 4.10 below. col improves precision by exploiting the tightness of the communication medium, similar to RBS [19], and also tolerates message loss. The corner- Advantages: stone of the protocol by Mock et al. is the use of 1. Local node clocks are allowed to run at their continuous clock synchronization. This is in con- own natural rates, which saves energy by avoid- trast with the IEEE 802.11 standard, which uses ing computer clock correction. instantaneous clock synchronization. 2. The protocol requires low resource and message In the case of instantaneous synchronization, a overhead, making it appropriate for resource- node computes a local clock error and adjusts its restricted environments. clock using this computation. This results in 3. The protocol is suitable for applications that abrupt changes in local clock time, which can need to communicate over long distances, that cause time discontinuity. Time discontinuity can is, distances much greater than the nodes trans- lead to serious faults in distributed systems, such mission ranges. as a node missing important events (e.g., dead- 4. The time estimation is bounded within an lines) or recording the same event multiple times. interval. Ryu and Hong [57] show one such possibility, as seen in Fig. 21. In the figure, assume that a task Disadvantages: has a deadline at time 19. Assume further that at 1. The synchronization error increases with the number of hops along the path of the message containing the timestamp. In sparse networks, the number of hops is usually high and this 18 before sync poses an obvious problem unless q is quite small. 20 2. Elson and Romer [20] have claimed that the after sync synchronization achieved by this approach is localized and short-lived. This is appropriate for networks with highly mobile nodes, but it clearly limits the applicability of Romers Deadline miss protocol. Fig. 21. Instantaneous versus continuous correction [57]. B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 303

Fig. 22. The IEEE 802.11 protocol. time 18 resynchronization occurs, resulting in local master clock being corrected by 2 time units in the for- slave ward direction because it lags behind the reference clock by 2 time units. After synchronization, the time t t t ttt t local clock advances to time 20 and the deadline 1 2 3 s 4 5 6 at time 19 is missed. Fig. 24. Reduced time-critical path (from t3 to ts) [49]. Continuous clock synchronization avoids such discrepancies by spreading the correction over a fi- (i.e., from t1 to t4). Fig. 23 illustrates this time-crit- nite interval. The local clock time is corrected by ical path. gradually speeding up or slowing down the clock Given that the time-critical path above could be rate. However, this approach suffers from a high quite lengthy, Mock et al. exploit the broadcast run-time overhead since clocks need to be adjusted property of the medium by assuming that message every clock tick. reception is tight, similar to the RBS protocol [19]. The IEEE 802.11 standard [31] includes a mas- If two receivers receive the same message, it can be ter–slave protocol for clock synchronization which assumed that they receive it at approximately the achieves limited precision due to instantaneous same time. Based on this property, the time critical synchronization. Mock et al. improved the IEEE path is shortened as shown in Fig. 24. 802.11 protocol, which we show in Fig. 22,by Fig. 25 shows the main steps in the synchroniza- employing continuous correction and by using an tion protocol of Mock et al. The protocol uses two advanced rate adjustment algorithm. messages for synchronization between a master The time-critical path in the IEEE 802.11 proto- and a group of slaves, a so-called indication mes- col is the interval between the master taking its sage followed by a confirmation message. However, timestamp and the slaves adjusting their clocks subsequent synchronizations are achieved with a single message as the master timestamp for the last confirmation message now serves as the indication master message for the next synchronization round. This slave technique achieves synchronization with just one broadcast message per synchronization round, time resulting in a significant reduction in the message t t t t 1 2 3 4 overhead. Fig. 23. Time-critical path of IEEE synchronization protocol After the slave nodes complete the estimation of [49]. the masters time, they must correct their local

Fig. 25. Synchronization protocol by Mock et al. [49]. Time instants t1,...,t6 are relative to Fig. 24. 304 B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 clocks to reflect the masters clock value. As we constant clock skew between the masters and the discussed earlier, the protocol uses a rate-based slaves clocks, function MC is linear. Thus, this algorithm to adjust the virtual clocks of slave function is shown in Fig. 26 as a straight line. Let nodes to run in tandem with the master. The differ- SC be the virtual clock of a slave that is corrected ence between a virtual and a physical clock can be at every synchronization point. The values tmj, summarized as follows. The physical clock of a tmj+k contained in a message indicate the master node consists of an oscillator, which periodically timestamps for synchronization messages smj and generates events, and a counter, which records smj+k, respectively. Values tj and tj+k indicate the the number of elapsed events. This physical clock corresponding timestamps on the slaves physical is not adjustable in any way. The counters value clock. Suppose that ti is the next synchronization cannot be incremented or decremented by the sys- point and that ti is some physical time between tems software, and its frequency is also fixed. A ti1 and ti. Ti1 and T i are the corresponding vir- virtual clock is defined as a function from physical tual times of the slave clock for physical times clock values to virtual clock values. A virtual clock ti1 and ti , respectively. Clock correction is per- is intended to correct the skew rate of the physical formed by adjusting SC at every synchronization clock of the slave such that it resembles the phys- point. The adjustment is performed by changing ical clock of the master. The function chosen is the parameters of the linear transformation func- usually a linear transformation for the sake of tion and this adjustment is performed gradually simplicity. over a period of time (continuous) to avoid time Clock correction is performed by correcting the discontinuity. After the point Q in Fig. 26, it can parameters of the linear transformation from be observed that the master node and the slave physical to virtual clock values with every new syn- are in synchrony, assuming tight reception. chronization. Thus, changing a virtual clock really The protocol of Mock et al. also provides a high means changing the parameters of the transforma- degree of tolerance with respect to message loss. tion from physical to virtual clock values. The goal This is an important feature because the rate of is to make the virtual clock match the master clock message loss is higher in wireless than in wired net- as closely as possible. works as the wireless medium is rather prone to Fig. 26 plots the transformation from physical external interference. The protocol defines an omis- to virtual clock values at a slave node. Function sion degree OD to be an upper bound on the num- MC relates actual master clock values with a slaves ber of consecutive messages that can be lost due clock values. The goal of the protocol is to estimate to errors in the medium. In order to tolerate up this function as accurately as possible. Assuming a to OD consecutive message losses, the timestamp values for the last n (n = OD + 1) messages are in- cluded in each synchronization message. Thus, a slave can synchronize with the master on the recep- Virtual tion of a message, if it has received at least one of ' clock SC i the previous n synchronization messages.

* Ti Q' Q Advantages: Ti-1 1. The protocol provides reasonably good accu- SC i-1 racy results when message transmission between tm j+k MC P master and slaves is tight. tm j P' 2. The protocol improves over the IEEE 802.11 protocol by using continuous, rather than * t j t j+k t i-1 t i t i Physical instantaneous, clock updates [31]. clock 3. The message complexity of the protocol is quite Fig. 26. Time adjustment showing the slaves physical clock on low because the protocol requires only one mes- the X-axis and the virtual clock on the Y-axis [49]. sage per synchronization round. B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 305

4. The protocol accounts for potential message sign themselves a level that is one greater than losses, a common situation in wireless net- the level in the packet received (i.e., level 1 in this works. case). After this step, these neighbors broadcast a new level-discovery packet with their own level. Disadvantages: This process is continued until each node has a 1. The protocol assumes tight communication level. Upon being assigned a level, a node neglects between the master and the slaves. Conse- further packets to implement a constrained quently, the protocol cannot accommodate flooding. multi-hop communication because of its longer Collision handling is important at this point be- and unpredictable delays. cause a node may not receive any level-discovery 2. A considerable amount of energy is spent on packets due to MAC layer collisions. When a node performing clock correction. This problem is is deployed, it waits for some time to be assigned a exacerbated by the fact that clock correction is level. If it is not assigned a level within that period, continuous. it times out and broadcasts a level-request packet. 3. The computational load on each node is high The neighbors reply to this request by sending due to the rate-based correction method. their own level and the new node defines its level to be one greater than the level it received. Synchronization phase. Consider a message ex- 4.4. Network-wide time synchronization in sensor change between two nodes A and B, as shown in networks [24] Fig. 27. T1 and T4 represent the time measured by As local clock. Similarly, T2 and T3 represent Scalability is a primary concern in wireless sen- the time measured by Bs local clock. We assume sor networks because of the large number of nodes that As level is greater than Bs by one. The syn- with very limited energy resources at each node. chronization phase of the protocol is described in The network-wide time synchronization protocol Fig. 28. is aimed at ensuring that synchronization accuracy Unfortunately, the hierarchical structure that does not degrade significantly as the number of the protocol imposes on the net makes the proto- nodes being deployed increases [24]. The objective col vulnerable to node failures. This issue must of the protocol is to establish a unique global time- be addressed because nodes can fail unpredictably scale by creating a self-configuring hierarchical in a sensor network. When this happens, it is pos- structure in a wireless network. A node in this sible for a node at level i not to have a neighbor structure can simultaneously act as a synchroniza- (i.e., a synchronization server) at level i 1. In tion server to a number of client nodes and as a syn- such cases, the node at level i would not receive chronization client to another (server) node. The an acknowledgement to its synchronization mes- significance of this method lies in achieving syn- sage. To handle this case, the node retransmits a chronization at a network-wide level as opposed to methods which work effectively only within a small cluster of nodes lying in a neighborhood, T23T such as RBS and continuous clock correction Node B [19,49]. The network-wide time synchronization protocol works in two phases: The level discovery phase, followed by the synchronization phase. Level discovery phase. The level discovery phase is based on constrained flooding. The root node is assigned level 0; this node initiates this phase by Node A broadcasting a level-discovery packet that con- T T tains the identity and the level of the sender. The 1 4 immediate neighbors that receive this packet as- Fig. 27. Message exchange between two nodes A and B [24]. 306 B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323

Fig. 28. Synchronization protocol for network-wide time synchronization protocol [24]. message for a fixed number of times before assum- Disadvantages: ing that it has lost all its neighbors. If the node 1. Energy conservation is not very effective does not receive any responses to its synchroniza- because it requires a physical clock correction tion messages, it broadcasts a level-request packet to be performed on local clocks of sensors while with a new level. Next, the node synchronizes with achieving synchronization. its new neighbors as described in Fig. 28. The 2. The protocol requires a hierarchical infrastruc- number of retransmissions of a synchronization ture which makes it unsuitable for applications message is subject to two constraints. If this num- with highly mobile nodes. ber is too large, it will increase the time taken for 3. Support for multi-hop communication is not synchronization (i.e., the convergence time). If provided. the number is too small, a node may erroneously conclude that its server has died. In this case, the protocol will cause unnecessary message flooding 4.5. Delay measurement time synchronization in the network. The authors suggest that an opti- protocol [54] mal number of retransmissions is four [24]. Time-keeping is the process of maintaining a Advantages: uniform notion of time among the sensors that 1. The protocol is scalable and the synchroniza- participate in the network [54]. A global time- tion accuracy does not degrade significantly as stamp provides a basis for merging individual sen- the size of the network is increased. sor readings into a database. Also, synchronized 2. Network-wide synchronization is effectively time is essential for energy-efficient scheduling achieved in contrast with the protocol by Mock and power management. This protocol, which ap- et al. [49], which works effectively only within a pears in Fig. 29, includes the following features. small cluster of nodes. 3. Network-wide synchronization is computation- 1. Maintenance of a local clock. ally less expensive when compared to such pro- 2. Synchronization of local clocks over the whole tocols as NTP [48]. network to create a network time.

Fig. 29. Algorithm underlying flexible lightweight time-keeping protocol [54]. B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 307

3. Synchronizing to a global time source by con- Disadvantages: necting the global source to the synchronization 1. The protocol can be applied only to low resolu- leader in the network. tion, low frequency external clocks. 4. Application programming interface for provid- 2. Synchronization accuracy is traded for low com- ing services to client applications. putational complexity and energy efficiency.

This protocol has been implemented on sensor nodes consisting of Berkeley motes running the 4.6. Probabilistic clock synchronization service in TinyOS kernel [61]. Node synchronization is based sensor networks [53] on the concepts of event timestamps and network event scheduling. The synchronization protocol Most synchronization protocols in practice rely specifically combines delay measurement with the exclusively on deterministic algorithms. An advan- property of the senders timestamp being a com- tage of deterministic methods is that they usually mon-view timestamp from the receivers point of guarantee an upper bound on the error in clock view. The receivers can synchronize with each offset estimation. However, when the system re- other better than they can synchronize with the sources are severely constrained, a guarantee on sender. synchronization accuracy may result in a large The synchronization accuracy of this protocol is number of messages being exchanged during syn- bounded mainly by the precision of delay measure- chronization. In these cases, probabilistic algo- ments along the path. Since only one message is re- rithms can provide reasonable synchronization quired to synchronize all nodes within the leaders accuracy with lower computational and network transmission range, this method is quite energy overhead than deterministic protocols. Pal- efficient. It is also computationally lightweight be- Chaudhuri et al. [53] defined an extension to cause there are no complex mathematical opera- RBS [19], by providing a probabilistic bound on tions involved. the accuracy of clock synchronization. An attrac- Multi-hop synchronization is also supported by tive feature of their protocol extension is that it extending the single-hop synchronization protocol allows to tradeoff dynamically synchronization as follows. If a node knows that it has children, it accuracy for computational and energy resources. sends a broadcast after adjusting its As we show in Fig. 16, in RBS [19] multiple own time. The node can now synchronize with messages are sent from the sender to the set of its children by using single-hop time communica- receivers, and the differences in actual reception tion with a known leader. To tackle the problem times at the receivers are plotted. As these mes- that in most networks nodes have no knowledge sages are independently distributed, the difference about their children, the concept of a time-source in reception times gives a Gaussian (or normal) level is used to identify the network distance of a distribution with zero mean. Assuming a Gaussian node from the master. A time master initiates the probability distribution for the synchronization synchronization protocol; the masters time source error, the relationship between a given maximum level is zero. A node synchronizing directly with error in synchronization and the probability of the master is at time source level one. This algo- actually synchronizing with an error less than the rithm guarantees that the root time will be propa- maximum error can be easily computed. gated to all network nodes with a limited number If the maximum error allowed between two syn- of broadcasts. chronizing nodes is max, then the probability of synchronizing with an error 6 max is derived Advantages: from the Gaussian distribution property, 1. A user application interface is provided to mon- R itor a wireless sensor network at run-time. 2 max x =2 dx 2. Computational complexity is low and energy max Pðj j6 maxÞ¼ pffiffiffiffiffiffi : ð27Þ efficiency is quite high. 2p 308 B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323

As the max limit is increased, the probability Disadvantages: of failure (1 P(jj 6 max)) decreases exponen- 1. In safety-critical applications (e.g., nuclear tially. plant monitoring), a probabilistic guarantee Based on this relation between the maximum on accuracy may not suffice. synchronization error and the probability of actu- 2. The protocol is sensitive to message loss; how- ally synchronizing with a smaller error than the ever, provisions for message loss are not predefined maximum, PalChaudhuri et al. [53] de- considered. rive expressions that convert service specifications (maximum clock synchronization error) to actual 4.7. Sichitiu and Veerarittiphan’s protocol [58] protocol parameters (number of messages and syn- chronization overhead). The probability of the Sichitiu and Veerarittiphans protocol [58] pro- achieved error being less than the maximum spec- vides deterministic clock synchronization for wire- ified error is given as follows: less sensor networks with minimal computational pffiffiffi and storage complexity. The protocol is especially nmax Pðj j6 Þ¼2erf : ð28Þ suitable for applications with severe constraints on max r computational power and bandwidth. It uses two In the above equation, n is the minimum num- algorithms called mini-sync and tiny-sync. The ber of synchronization messages to guarantee the tiny-sync algorithm acquires its name from the fact error and r is the variation of the distribution. that it needs very limited resources, fewer re- The relationship between the number of sources than mini-sync. messages, n, and error probability P is shown in The two algorithms have various common Table 4. The table reports data for max/r ratios features. of 0.5, 1.0, and 2.0. 1. A tight deterministic bound is provided for Advantages: clock offset and skew, as opposed to probabilis- 1. A probabilistic guarantee reduces both the tic guarantees [53]. number of messages exchanged among nodes 2. The protocols are highly tolerant to message and the computational load on each node. losses. 2. A tradeoff between synchronization accuracy 3. Both protocols have low computational and and resource cost is allowed. storage complexity. 3. Support for multi-hop networks, which span 4. Both protocols can be extended to any commu- several domains, is provided. nication network that allows bidirectional data transmission. 5. The estimation of clock skew and offset is per- formed using the set-valued estimation method Table 4 [40] discussed in Section 2.4.4. Variation in probability and number of messages for different values of =r [53] max Recalling Eq. (17) of the set-valued estima- max/r Probability Number of messages tion method, for nodes 1 and 2, the skew and 0.5 0.95 16 offset between their clocks are captured by the fol- 0.5 0.99 28 lowing equation, where a and b represent the 0.5 0.999 44 12 12 skew and offset between the clocks in node 1 and 1.0 0.95 4 node 2. 1.0 0.99 7 1.0 0.999 11 t1ðtÞ¼a12t2ðtÞþb12: ð29Þ 2.0 0.95 1 Sichitiu and Veerarittiphans protocol [58] ex- 2.0 0.99 2 tends the set-valued estimation method [40] in 2.0 0.999 3 two significant ways. B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 309

1. Relaxing the immediate reply assumption.In the first and third data points. However, when the Fig. 11, it is assumed that node Pj immediately fourth data point arrives, since we discarded the responds to node Pi. The correctness of the second data point, we are forced to use the first approach is not affected if Pj sends a delayed and the fourth data points as bounding constraints. reply. However, if the delay between tik and tik Although the second data point—when bound to increases, the precision of the estimates will the fourth data point—could have yielded better decrease. Since Pj can delay its reply in practice, precision, this precision cannot be accomplished the loss of precision is handled by letting Pj because the second data point was discarded. Mini- timestamp the message both upon receipt (tjkr) sync corrects this flaw and improves precision by and when it resends it (tjkt). This gives us two discarding a constraint only if a newer constraint data points (tik, tjkr, tik and tik, tjkt, tik) which will eliminates an existing constraint. This means that be treated independently. The obvious solution the constraints corresponding to the second data is to choose the data point that gives a better point will not be discarded when the third data precision. point arrives. It will instead be saved until the 2. Increasing accuracy by considering the minimum fourth data point uses it to obtain a better estimate. delay. If the minimum delay that a message In practice, experiments reveal that around 40 data encounters between two nodes is known, the points (80 constraints) have to be stored at a time, data points can be adjusted for a boost in preci- which is quite reasonable. sion. In Fig. 11, if the delay between the time Pi timestamps the message (ti1) and the time at Advantages: which Pj timestamps the message (tj1), as well 1. The protocols provide a tight, deterministic syn- as the delay between Pj timestamping the mes- chronization scheme with low storage and com- sage and Pi receiving that timestamp are known, we can use this information in the data putational complexity. triplet to make more estimates. 2. The protocols are suitable for sensor networks that are highly constrained in bandwidth and Tiny-sync: The tiny-sync algorithm is based on computational power. the observation that not all data points obtained 3. The protocols are tolerant of message losses. from the set-valued estimation method are useful. Each data point consists of two constraints, which Disadvantages: are bounds on the clock offset and clock skew. At 1. The scalability and robustness of the protocols any point of time, only four constraints are kept in- have not been discussed. stead of six constraints. Upon the arrival of a new 2. The convergence time, which is the time needed data point, the two new constraints are compared to achieve synchronization of the entire net- with the existing data points and only the four con- work, is high. straints that result in the best estimates are kept. 3. The sensor network is logically organized as a The computational complexity of the tiny-sync hierarchy, making it inapplicable to mobile sen- algorithm is relatively low because the compari- sor networks. sons to determine the four best constraints involve only a few arithmetic operations. In addition, the storage space required is also quite low because 4.8. Time-diffusion synchronization protocol [62] at any time, only four constraints and eight time- stamps (two per constraint) need to be stored. The Time-Diffusion synchronization Protocol Mini-sync: The mini-sync algorithm improves (TDP) enables all the sensors in the network to the accuracy of Tiny-sync at a small computational have a local time that is within a small bounded cost. In Fig. 12, when the data point that corre- time deviation from the network-wide ‘‘equilib- sponds to [ti3; ti3] arrives, we can ignore the rium’’ time. Due to clock skews, the algorithms data point that corresponds to ti2 and consider only within the protocol have to be applied periodically. 310 B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323

Hence, the protocol operates in alternating active and inactive phases. The protocol is comprised of several algorithms, which will be described next in the context of one such active phase. Within each active phase there are multiple cy- cles, each cycle lasting a duration s. In each cycle, a subset of the nodes are elected as the masters by an Election/Relection Procedure (ERP). Each master concurrently initiates a diffusion of timing Fig. 30. Illustration of timing relationships between the TP messages; these messages effectively create a tree- rounds (each of duration d) and the PEP duration within each cycle, and the various cycles, each of duration s, within an like propagation structure dynamically in the net- active phase. work, for each diffusion. The non-leaf nodes in this tree are the nodes which propagate the timing mes- sages, and are termed as ‘‘diffused leaders’’. These B C diffusion initiated by A diffused-leader nodes are also elected by the ERP. DE A diffusion initiated Thus, it may happen that a node does not qualify G by E H to be a diffused leader node, and hence will not diffusion initiated propagate the diffusion. The goals of the ERP by K are twofold. F I J • To eliminate outlier nodes whose clock variance master node diffused leader node K is above some threshold function based on a specific type of variance calculation, termed Fig. 31. Illustration of time diffusion with three master nodes the Allen variance. This variance is determined and n = 3 hops. The level of a node is defined with respect to each master. Outlier nodes, which do not diffuse timing by exchanging messages and calculating devia- messages, are not shown for simplicity. In each round, nodes tions between pairs of adjacent nodes using a take the hop-weighted (or cumulative deviation weighted) Peer Evaluation Procedure (PEP). average of the different times received from the masters • To achieve load distribution among the nodes diffused broadcasts. because the roles of masters and diffused leaders put a greater demand on the energy resource. in a tree-like structure, as illustrated in Fig. 31. The load distribution is achieved by taking Also note that the masters time can be coordi- turns at being the master, based on factors such nated to an external precise time server that does as the available energy level being above a tun- periodic broadcasts of a reference time. If no time able threshold. servers are available, the protocol works equally well by using a time that is independent of the time In each cycle, the diffusion of timing messages used by the Internet, e.g., Universal Coordinated helps to converge the local times, and reach a com- Time (UTC). We now look at the details of a sin- mon notion of the system-wide time. gle cycle with respect to a single master. Each cycle has two logical functions, executed serially—(1) determining master nodes and dif- 1. The first function (PEP) in each cycle is to fused leader nodes, using the PEP, and then (2) determine the master node eligibility for the the main Time Diffusion Procedure (TP). Each next cycle, and the diffused leader responsibility cycle has duration s; the TP consists of multiple for the remainder of this cycle. rounds, initiated d time units apart. The timing (a) The first step occurs between any master, relations are illustrated in Fig. 30. There is a single which is at level one, and its neighbors. broadcast within each round, with respect to a sin- (i) The master sends a large number of gle master. Note that each master initiates a con- timestamped scan messages to its current broadcast that gets diffused in that round neighbors. B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 311

(ii) The neighbors send back acknowledge- • bM,k is the deviation of the corresponding ments containing the 2-sample Allen tM,i at a node k hops from the master M. variance of the local clock from the The TP within any cycle has a succession of masters clock. rounds initiated by the master, d time units (iii) Based on the received samples, the mas- apart from tM,0. The broadcast within a round ter calculates (a) an outlier ratio cyz for completes before the next round is initiated. itself (y) and each neighbor z, (b) the The following broadcast is executed for each average of the Allen variances, and round i. (c) the average of the Allen deviations. (a) The first step, executed between any master, Now, (a), (b), and (c) are sent to each which is at level one, and its neighbors: neighbor z in a RESULT message. (i) Send a timing message M(tM,i,n,bM,k) (b) In each subsequent step j =2,3,...,n, the to neighboring nodes at time tM,i. above is repeated between each level j dif- (ii) Elected diffused leaders at the next level fused leader node and its neighbors. respond with a timestamped ACK As this broadcast diffusion progresses, all sen- message. sors will get the outlier ratios and the average (iii) Master computes D = average(Dj), Allen deviation (with respect to their neigh- where Dj is the round-trip time between bors). These are used to evaluate the quality the master and the diffused leader j. of their clocks with respect to their neighbors. The diffused time from the master node If a nodes average outlier ratio is >1, its local is clock deviates from the clocks of its neighbors tM;i ¼ tM;i þ D=2 þ d: ð30Þ by more than twice the Allen variance. In this case, that node does not become a diffused lea- Here, d is the amount of time that the der during the (Time Diffusion Procedure of nodes wait (relative to tM,i) before the) current cycle, or a master in the next adjusting their clocks at the end of cycle. the round. The standard deviation a Further, among the nodes that are eligible for of the rtt Dj, which gives an estimate being masters in the next cycle, whether a node of the quality of diffused time tM,i,is will actually qualify for being a master in the accumulated in bM,k at each hop from next cycle now depends on its energy availabil- the master. This accumulated deviation ity being above a certain (dynamically adjust- is able) threshold. Load balancing is done by bM;k ¼ bM;k1 þ a; ð31Þ rotating the role of master nodes; hence the algorithm can be viewed as being distributed. where k 6 n is the number of hops Analogously but somewhat differently, whether from the master. the nodes eligible to become diffused leaders in (b) On receiving a timing message the current cycle actually assume that role is M(tM,i,n,bM,k), for each subsequent step determined dynamically for each round in this j =2,3,...,n, the above is repeated between cycle, based on energy level considerations. the elected diffused leaders at level j, and 2. The TP performs the main function of diffusing their neighbors. the time from each master in a tree-like manner For each round, each node builds a table Table for n hops, where n is some predetermined with rows of the following format, and popu- parameter smaller than the diameter of the net- lates it with the information received within that round. work. It uses the message M(tM,i,n,bM,k), where • t is the diffused time of the master M,to M,i hmaster id M; bM;k; tM;ii: ð32Þ which the nodes synchronize in round i. • n is the number of levels (i.e., depth) to which After each round i within a cycle, each node re- the timing information is to be diffused. sets its time to ti, the weighted sum of the times 312 B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323

tM,i in its table, based on the values of all the Disadvantages: diffused messages received in this round from 1. Each active period has multiple cycles, and each different master initiators, and as recorded in cycle has multiple rounds, in each of which a the local Table. The table is also cleared at the diffusion broadcast is initiated by multiple mas- end of each round i. ters. This leads to high complexity. X 2. The convergence time tends to be high when no ti ¼ external precise time servers are used. However, hbM;k ;tM;ii in Table if the servers are used, the convergence time is P comparable to a server-based technique. ½ b in TablebM0;k0 bM;k P M0;k0 P 3. It appears that it is possible for clocks to ½½ bM0;k0 bM00;k00 hbM00;k00 ;tM00;ii in Table bM0;k0 in Table run backward. This can happen whenever a clock value is suddenly adjusted to a lower tM;i: ð33Þ value.

For any tM,i, (i) the numerator of the weight is the sum of all the deviations of all the diffusion 4.9. Asynchronous diffusion protocol [42] messages, less the deviation for this particular message, and (ii) the denominator of the Li and Rus have defined a so-called rate-based weight is the sum of all such numerators for diffusion protocol in which nodes achieve synchro- all the timing entries in the table. Thus, the va- nization by flooding their neighbors with informa- lue of each clock is set to the weighted average tion about each nodes local clock value [42]. After of the clock values of the different master each node has learned the clock values of all its nodes of that round, after averaging the data neighbors, the node can use a mutually agreed collected from multiple messages received with- upon consensus value to adjust its clock. Examples in that round. Due to the weighted averaging, of consensus values suggested by the authors in- all the nodes tend towards a common equilib- clude the highest clock reading in the net, the low- rium time. est clock reading, or some statistical value based on the clock readings (e.g., the average or the med- Advantages: ian of the readings). According to the authors, 1. The protocol is tolerant of message losses. using the highest or the lowest reading yields the 2. The protocol achieves a system-wide ‘‘equilib- simplest synchronization algorithm; however, this rium’’ time across all nodes, computed using strategy lacks robustness. A malicious or erratic an iterative weighted averaging technique, and node may impose an abnormally high (or low) involves all the nodes in the synchronization clock value on the whole network. process. Li and Rus define a synchronous and an 3. The diffusion does not rely on a static level-by- asynchronous version of their rate-based diffusion level transmission. This non-dependence on a protocol [42]. Fig. 32 illustrates the synchronous static structure provides flexibility and fault- version. The algorithm appearing in the figure is tolerance. assumed to be executed with a certain frequency 4. The protocol is geared towards mobility. by all nodes contained in the network. During 5. Although there is a hierarchical structure, that each synchronization round, each network node is neutralized by having multiple master nodes ni exchanges its clock reading with every neighbor distributed across the network. nj. Node ni adjusts its clock value by a factor pro- 6. Most synchronization protocols require precise portional to ti tj, the difference in the clock val- time servers and cannot function properly with- ues of ni and nj. Coefficient rij is the so-called out these servers. On the other hand, the TDP diffusion value of node nj relative to ni; this value protocol can provide synchronization even indicates the weight of nj when adjusting ni’s clock without external time servers. value. B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 313

assumptions on network connectivity, provided that all net nodes perform synchronization with a certain probability. Nodes are not required to be fully connected with all other nodes in the network in order for this protocol to converge, although the network must be connected at all times [42]. Evi- Fig. 32. Algorithm underlying the synchronous version of Li dently, if a node or node subset becomes perma- and Russ diffusion protocol [42]. nently disconnected from the rest of the network, network-wide clock synchronization is impossible. Li and Rus define the r coefficientsP in such a way Li and Rus ran many simulations of the asyn- that "i"j, r P 0 and also r 1. Also, the ij 8j2N ij ¼ chronous synchronization algorithm while varying coefficients are symmetric, meaning that "i"j, rij = several synchronization parameters. Some simula- rji. When nodes ni and nj are not in the same neigh- tions show that the synchronization error among borhood, they cannot exchange clock readings. In network nodes decreases exponentially with the this case, the coefficients are assigned values rij = number of synchronization rounds for a network rji = 0. Li and Rus showed that this protocol con- of 200 nodes [42]. In addition, Li and Rus analyzed verges to the average value of the clock readings the convergence speed of the protocol as a function in the network, within a certain error, in a bounded of node density (i.e., the number of nodes in a number of synchronization rounds [42]. The neighborhood). These simulations show that number of synchronization rounds depends on sparse networks (i.e., networks with few nodes in the actual values of the coefficients in the network. a given area) exhibit both a slower convergence In the asynchronous version of Li and Russ dif- speed and a high variation in convergence time. fusion-based protocol, nodes compute average Networks with a high node density converge faster, clock readings asynchronously with respect to and with lower variation, than sparse networks. other network nodes. (In the synchronous version, Similarly, the convergence speed improves as the nodes exchange clock values and adjust their communication range of the nodes is increased. clocks simultaneously.) Fig. 33 illustrates the algo- rithm underlying the asynchronous version of the Advantages: diffusion protocol. 1. The protocol achieves a system-wide ‘‘equilib- Any network node can now update its clock va- rium’’ time across all nodes involved in a lue asynchronously with respect to other nodes in synchronization. the network. As we show in Fig. 33, a node ni starts 2. The protocol does not rely on an external time a round of synchronization by first asking all its server or a synchronization leader to reach con- neighbors for their clock values. Next, the node vergence, which is beneficial for the robustness computes the average of its clock value and the val- of the protocol. ues obtained from the neighbors. Finally, the node updates its clock to the computed average and noti- Disadvantages: fies its neighbors of the computed value. Li and 1. The protocol seems to violate a fundamental Rus show that the asynchronous version of the requirement of clock synchronization, namely, protocol converges to the average value of clock that time never run backward. (See Fig. 3 readings in the network, under relatively broad above.) As nodes adjust their clock values

Fig. 33. Algorithm underlying the asynchronous version of Li and Russ diffusion protocol [42]. 314 B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323

down, they will repeat clock values obtained mize the offset of a nodes clock relative to other earlier, defeating one purpose of synchroniza- nodes in a sensor network when the node is out tion. This problem is exacerbated in the asyn- of the communication range of any other network chronous version of the protocol because in node. Assume that synchronization rounds, during this case, nodes can adjust their clock values which nodes correct their clock values, occur peri- independent of other nodes in the network. odically in a sensor network. If a node becomes 2. The protocol assumes that any two nodes can temporarily isolated from the network, it will miss accurately swap their clock readings when run- one or more synchronization rounds with neigh- ning their synchronization protocol. In practice, boring nodes. In this case, the offset of the nodes achieving this goal can be quite difficult. Li and clock relative to the clock of its neighbors may Rus advocate the use of the RBS protocol [19] grow beyond an acceptable threshold. for this purpose, because RBS can in fact The DCR protocol observes the standard devi- achieve a high level of accuracy. ation of a nodes clock with respect to one of the 3. The complexity of the protocol is quite high, nodes neighbors over two consecutive synchroni- comparable to that of RBS. Many synchroniza- zation rounds. The observed deviations can be tion rounds are needed to reach reasonable con- used to correct the speed of a nodes clock, similar vergence, and each node must communicate to Cristian and Fetzers calibrated-clocks method with every other node in its neighborhood [12]. In the world of sensor networks, the rationale to achieve convergence. Worse yet, in Li and of the DCR method is similar to that of the set- Russ simulations, hundreds of synchronization valued estimation protocol, which we discussed rounds are needed to achieve reasonable accu- in Section 2.4.4, in that DCR adjusts a nodes racy [42]. It is unclear whether the asynchro- clock rate based on multiple readings of a neigh- nous diffusion protocol can improve RBSs bors clock. As with set-valued estimation, it is un- synchronization accuracy. clear whether DCR will work in practice, because 4. The protocol makes no provisions for exploit- it is possible for a node to overcorrect its clock ing clock skews in achieving synchronization. rate. This may happen when a node overestimates Given that all node pairs exchange clock infor- the speed of a neighbors clock, for instance, be- mation during each synchronization round, it cause of unpredictable variations in message trans- would be relatively easy for nodes to estimate mission delays. When this happens, a chain of the skew of their neighbors clocks in an effort corrections involving all nodes in an entire neigh- to improve accuracy. borhood may ensue, causing all nodes to increase indefinitely their clock rates. The second protocol, Probabilistic Clock Read- 4.10. Other protocols ing (PCR) is a probabilistic variation of DCR. PCR overcomes the problem of intermittent com- Clock synchronization in sensor networks is munication by using the theory of time-series currently the subject of numerous active investiga- forecasting. A network node uses a time-series tions. For reasons of space, we are unable to dis- approximation of a sequence of clock readings cuss in detail all the new protocols that have from one of the nodes neighbors in order to esti- been defined recently. In this subsection, we briefly mate the offset and skew of the neighbors clock summarize some of those protocols. relative to the nodes clock [67].

4.10.2. Meier et al.’s protocol 4.10.1. Tulone’s Clock Reading protocols Meier et al. recently defined an improved ver- Tulone sketched a deterministic protocol and a sion of Romers protocol [45] which we discussed probabilistic protocol for clock synchronization in in Section 4.2. Similar to Romers protocol, Meier sensor networks [67]. The first protocol, called et al. seek to provide tight lower and upper bounds Deterministic Clock Reading (DCR), seeks to mini- on the clock reading of local node ni when an event B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 315 is detected by a different node nj. Meier et al. define centralized version, called the Hierarchical Refer- a tighter lower bound for nis clock reading using a encing Time Synchronization (HRTS) protocol, different formula from Romers protocol. In addi- and a decentralized version, called the Individual tion, Meier et al. define a method for defining opti- Time Request (ITR) protocol. The HRTS protocol mal bounds under the assumption that message cleverly combines the notion of hierarchical syn- delay uncertainties are negligible [45]. Under this chronization, typical of network-wide synchroniza- assumption, multiple consecutive message ex- tion, with receiver-to-receiver synchronization, changes between two nodes can be regarded as a similar to RBS [19]. Dai and Han further enhance single communication event. Although these the performance of both the HTRS and ITR proto- assumption are not true in practice, the method cols by using dedicated MAC-layer channels for of Meier et al. can be modified to accommodate synchronization. The ITR protocol differs from small communication delays, such as those the HRTS protocol in that synchronization is initi- achieved with RBS [19]. ated by any node as opposed to a designated base station. Dai and Han compared empirically the performance of the HRTS and ITR protocols with 4.10.3. Lightweight Tree-based Synchronization a multi-hop extension of RBS [19]. In Dai and Van Greunen and Rabaeys Lightweight Tree- Hans experiments, HRTS can achieve a synchroni- based Synchronization (LTS) protocol [68] is a zation accuracy close to that of the RBS extension, slight variation of the network-wide synchroniza- while reducing the total number of exchanged mes- tion protocol of Ganeriwal et al. [25] which we dis- sages with respect to RBS. However, the accuracy cussed in Section 4.4. Similar to network-wide obtained with both RBS and HRTS, in the order synchronization, the main goal of the LTS proto- of 20 ls for single-hop synchronization, is lower col is to achieve reasonable accuracy while using than other reported results for RBS. (See, e.g., modest computational resources (both in terms [19].) The performance of the ITR protocol is of memory space and CPU time). Van Greunen worse than both HRTS and RBS, especially in and Rabaey give two versions of the LTS protocol the case of multi-hop synchronization. [68]. In the centralized version, each round of syn- chronization is initiated by a designated node at 4.10.5. Hu and Servetto’s protocol some frequency. In the decentralized version, any Finally, Hu and Servetto [30] defined a protocol node can start a synchronization round. As with for synchronization in networks with a high con- Network-Wide Synchronization [25], the LTS centration of nodes per unit of surface. Synchroni- protocol seeks to build a tree structure within the zation proceeds in concentric waves, starting from network. Adjacent tree nodes exchange synchroni- a master node located in the center of the network. zation information with each other. A disadvan- Under strong assumptions on the behavior of the tage is that the accuracy of synchronization net, Hu and Servetto show that their protocol is decreases linearly in the depth of the synchroniza- optimal in the sense that all nodes will eventually tion tree (i.e., the longest path from the node that synchronize with the masters clock. This is a valu- initiates synchronization to a leaf node). Van Gre- able theoretical result; however, it is currently un- unen and Rabaey discuss various ideas for limiting clear how this protocol will perform in practice. the depth of the tree; the performance of both pro- Hu and Servetto assume that there is no communi- tocol versions is analyzed with simulations [68]. cation delay between nodes (i.e., message transmis- sion delay is always zero) and no conflicts on network use (i.e., a node will have immediate ac- 4.10.4. TSync protocol cess to the network whenever it needs to transmit Similar to Van Greunen and Rabaeys LTS pro- a message). In addition, the complexity of the pro- tocol, Dai and Hans TSync protocol [15] is based tocol seems to be high, meaning that achieving on the network-wide synchronization protocol of optimality involves a large number of message ex- Ganeriwal et al. [25]. As with LTS, TSync has a changes among network nodes. 316 B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323

5. Comparison of protocols 1. Absolute precision. The maximum error (i.e., skew and offset) of a nodes logical clock with We compare and evaluate the various synchro- respect to an external standard such as UTC. nization protocols. Before we evaluate the various 2. Relative precision. The maximum deviation protocols, we must first define in detail the criteria (i.e., skew and offset) among logical clock read- that we will use in our comparisons. For the sake ings of the nodes belonging to a wireless of clarity, we divide our evaluation criteria be- network. tween quantitative and qualitative criteria. The former include synchronization accuracy, compu- In our discussions, we generally use the notion tational complexity, and convergence time. The of relative precision (2) above, unless otherwise latter include scalability, energy efficiency, and noted. In general, high synchronization precision fault-tolerance. When taken together, these mea- is clearly a desirable feature of a synchronization sures provide a good characterization of the appli- protocol. However, in the protocols that we stud- cability and performance of each protocol. ied, higher synchronization precision comes at the expense of increased computational cost mea- 5.1. Quantitative evaluation sured in terms of algorithmic complexity, the num- ber of messages exchanged among nodes, and the We note at the outset that the protocols dif- storage requirements of the protocol. The quanti- fer broadly in their computational requirements, tative precision of the various protocols appears energy consumption, precision of synchroniza- in Table 5. tion results, and communication requirements. In Piggybacking. Piggybacking is the process of addition, no protocol clearly outperforms the combining the acknowledgement messages during others in all possible applications of wireless synchronization with messages that carry synchro- networks. Rather, it is quite likely that the choice nization data among nodes. Instead of sending of a protocol will be driven by the characteristics independent acknowledgement messages, these and requirements of each application. For in- messages are piggybacked on the data messages stance, a low-cost, low-precision protocol could that have to be sent to the node, in order to reduce be appropriate for many environmental monitor- message traffic in the network. Piggybacking is ing applications. However, many safety-critical clearly advantageous because wireless networks applications, such as aircraft navigation or intru- are often subject to severe bandwidth constraints sion detection in military systems, will demand and piggybacking alleviates communication de- high-precision protocols in order for nodes to mands on the network. In addition, piggybacking correctly identify events occurring in the net and can also reduce the storage requirements on net- for an application to respond to those events. work nodes because storage space is also saved Synchronization precision. Each network node by clubbing acknowledgements with data mes- has a physical clock consisting of hardware oscilla- sages. Romers protocol [56] and network-wide tor circuits. Unfortunately, the frequency of hard- time synchronization [24,25] use piggybacking. ware clocks varies from one node to another Computational complexity. As wireless net- within a specified range. Thus, clocks on different works often have limited hardware capabilities nodes in wireless networks operate at different and severe energy constraints, the complexity of rates. Consequently, the clock values used for syn- a synchronization protocol can make a protocol chronization in wireless networks are not physical impractical for many applications. Here we distin- clock readings. Instead, network nodes generally guish between the computational complexity of a use a logical notion of clocks and time. Logical protocol (i.e., its run-time and memory require- clocks can be modified both by software (e.g., dur- ments) from the message complexity (i.e., the ing synchronization) and hardware (e.g., by the number of messages exchanged during synchroni- physical clocks). Consequently, synchronization zation). (See also discussion on convergence time precision can be defined in two ways. below.) B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 317

Table 5 Quantitative performance comparison of synchronization protocols Protocols Factors for performance comparison Precision Piggybacking Complexity Convergence GUI Network Sleep time services size mode RBS [19] 1.85 ± 1.28 ls N/A High N/A No 2–20 Nodes Yes Romer [56] 3 ms Yes Low N/A No Unknown Yes Mock et al. [49] 150 ls No High Low No Unknown No Ganeriwal et al. [25] 16.9 ls No Low Unknown No 150–300 Nodes Yes Ping [54] 32 ls Yes Low High (multi-hop) Yes Unknown No PalChaudhuri et al. [53] Unknown Unknown High N/A No Unknown Yes Sichitiu et al. [58] 945 ls No Low High (multi-hop) No N/A Yes Time Diffusion Protocol [62] 100 ls No High High (multi-hop) No 200 Nodes Yes Asynchronous diffusion [42] Unknown No High High (multi-hop) No 200–400 Nodes Yes

In our evaluations, we consider both the asymp- a low convergence time because only one message totic behavior of a protocols computation time is required per synchronization round. Other pro- and its memory requirements, relative to the num- tocols [54,58] can tolerate high convergence times ber of nodes being synchronized. Even though a for multi-hop networks. protocols computational requirements might be GUI services. Graphic User Interface (GUI) ser- linear in the number of nodes synchronizing with vices can present, in a clear and comprehensible each other, the protocol may still be impractical manner, meaningful results achieved by the net- if these requirements exceed physical node re- work to an end user. Since some wireless networks sources. RBS [19], the protocol by Mock et al. require on-line monitoring by human users, we in- [49], asynchronous diffusion [42], and TDP [62] cluded the existence of GUI services in our perfor- have higher computational and storage complexity mance comparisons. Only Pings protocol [54] compared to Romers protocol [56], network-wide provides such services to the application and time synchronization [25], and the protocol by Sic- higher-level kernel modules. Two services are spe- hitiu and Veerarittiphan [58]. cifically defined: (1) time reading and (2) synchro- Convergence time. Convergence time is the total nized network event scheduling. These services time required to synchronize a network. A proto- allow a user to schedule a synchronized event over col that requires a large number of message ex- a network by providing an interface to the users changes per synchronization will result in a timeframe. longer convergence time. As discussed earlier, Network size. Some authors have conducted reducing message complexity is vital to the cost- empirical evaluations of synchronization protocols efficiency of a synchronization protocol for sensor on actual sensor networks. Although this informa- networks. Since convergence time is directly pro- tion is not available for most of the protocols that portional to message complexity and bandwidth we studied, the network-wide time synchronization use, reducing the convergence time is also an protocol of Ganeriwal et al. [25] is noteworthy in important factor in wireless networks. this regard. This protocol was found to handle RBS [19], Romers protocol [56], and the proto- neighborhoods with up to 300 nodes. col by PalChaudhuri et al. [53] do not emphasize Compatibility with sleep mode. The ability of a low convergence time because they are based on node to be in low-power (sleep) mode can be criti- reactive routing. In these protocols, synchroniza- cal to meeting the nodes energy requirements. The tion is performed relatively infrequently, when an key idea underlying sleep mode is that nodes must event of interest occurs in the net. Thus, conver- be synchronized and active only when the applica- gence time and message complexity are of less crit- tion demands it. RBS [19] highlights this feature by ical importance in protocols that use reactive way of post-facto synchronization. Other protocols routing. The protocol by Mock et al. [49] requires [24,25,56] support this feature as well. 318 B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323

Table 5 shows the performance of the protocols networks, at this time it is unclear how these pro- relative to the quantitative criteria. The RBS pro- tocols will perform in practice. Finally, a protocol tocol [19] yields excellent accuracy results even in by Sichitiu and Veerarittiphan [58] achieves good the case of networks with modestly-equipped sen- accuracy results (less than one millisecond). This sor nodes. The accuracy reached by the protocol is is quite impressive considering that the protocol truly outstanding, in the order of few microsec- also has low computational complexity. How- onds, for a network of nodes (i.e., the Berkeley ever, the convergence time of this protocol is quite motes) with severely limited computational and high. energy resources. The convergence time and mes- The asynchronous diffusion protocol of Li and sage complexity of the protocol are relatively high, Rus [42] and the time diffusion protocol of Su of the order of O(m Æ n2) messages for m synchroni- and Akyildiz [62] use an averaging method to ad- zation rounds involving n nodes within single-hop just node clocks. These protocols are reasonably reach of each other. However, the CPU load and robust; however, the issue of clocks running back- storage requirements of the protocol are modest, ward must be suitably addressed before these pro- making RBS appropriate for even the simplest of tocols are implemented in practice. todays sensor nodes. Moreover, the lack of clock adjustments sharply reduces the energy needs of 5.2. Qualitative evaluation the protocol relative to other protocols. Romers protocol [56] achieves reasonably good accuracy We evaluate the protocols based on overall (in the order of few milliseconds) with low compu- quality criteria. In contrast to Section 5.1 above, tational complexity. The advantages of continuous here we discuss the goals of each protocol and time synchronization [49] are high accuracy results the extent to which we deem that the protocol suc- and low convergence time; however, these results ceeds in achieving those goals. While a quantita- are obtained at the expense of computational tive study deals with parameters that help the complexity. reader fine-tune a synchronization protocol by Network-wide Time Synchronization [24,25] is providing a telescopic view, a qualitative study an excellent compromise among synchronization provides a broader and more general perspective. accuracy, computational complexity, and conver- Table 6 compares the various protocols in terms gence time. While the accuracy results are in the of the following qualitative criteria. order of tens of microseconds, low computational Energy efficiency. Energy efficiency is an impli- complexity and fast convergence time make this cit requirement in most wireless networks. The ex- protocol quite attractive when higher accuracy is tent to which this requirement must be enforced not required. An additional strength of this proto- will vary depending on an application. For in- col is that the protocol has been tested on an ac- stance, in the case of sensor networks the require- tual sensor network containing 300 nodes. The ment is quite strict, forcing nodes to sleep as Delay-Measurement Time Synchronization proto- frequently as possible and severely limiting the en- col has comparable accuracy results as Network- ergy available for synchronization and other net- Wide Time Synchronization [54]. However, this work tasks. The main reason behind this energy result is obtained at the expense of a longer constraint is the small size of batteries in sensor convergence time. Improvements to Network- nodes, which greatly limits the amount of energy Wide Time Synchronization were defined by Dai that can be stored and produced (e.g., with solar and Han [15]. Their method has yielded excellent cells). accuracy results with lower message complexity An important tradeoff for wireless networks is than RBS. between using the available energy for computing The protocol by PalChaudhuri et al. [53] is or for communicating. Pottie and Kaiser [55] have interesting because it uses a probabilistic algo- shown that, in the case of sensor networks using rithm. While probabilistic algorithms hold consid- radio frequency transmitters and receivers, the erable promise for clock synchronization in sensor energy required to transmit 1 bit over 100 m, B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 319 which is 3 joules, can be used to execute 3 million ing cheaper, wireless sensor networks are becoming instructions. This finding makes it clear that com- increasingly large, up to tens of thousands of munication is far more energy-intensive than com- nodes. Thus, synchronization protocols must be putation. Elson and Romer [20] have stressed that sufficiently scalable with respect to network size. in low-power radio networks, listening and send- Most protocols that handle sensor networks place ing and receiving messages requires much more en- scalability on top of their list of priorities. ergy than in a wired network. The CPU is also Although most authors have not measured sca- sparingly available because it is shut down often lability in their experiments, Ganeriwal et al. to conserve energy. [24,25] have used a network of 150–300 nodes to Accuracy. Accuracy is a measure of how well the test scalability. In addition, Su and Akyildiz used time maintained within the network is true to the a net with 200 nodes to test the scalability of standard time. In other words, it is a measure of TDP [62]. RBS [19] typically synchronizes 3–20 the precision of synchronization. A protocol with nodes in a neighborhood; however, this protocol high accuracy thereby guarantees high precision. works well even in much larger networks using In the case of absolute precision, this means that gateways between neighborhoods. Protocols in the synchronized time in the network does not devi- which the synchronization error increases with ate much from an external standard (e.g., UTC or the size of the network, such as Romers protocol GPS). In the case of relative precision, this means [56], achieve scalability at the expense of accuracy. that, when a set of synchronized nodes is consid- Overall complexity. The quantitative evaluation ered, the maximum deviation of the clock of any in the previous subsection distinguishes various node within the set is reasonably small. complexity measures, including CPU load, storage Several protocols considered in this survey are requirements, and message complexity (i.e., con- highly accurate. (See, e.g., [19,58].) Probabilistic vergence time). In this section, overall complexity synchronization [53] allows a user to choose a de- is viewed as a combination of algorithmic complex- sired level of accuracy. The option of trading off ity, overhead caused due to fault tolerance provi- accuracy for a lower complexity could be quite sions, and communication overhead. Romers useful, depending on the networks load. protocol [56] is probably the best choice for a re- Scalability. Elson and Romer [20] state that the source-restricted environment because of its low scope of a network is the geographic span of nodes complexity. However, this method is not highly that are synchronized and the completeness of cov- accurate. This is not surprising as highly accurate erage within that region. In general, the scope of a protocols usually incur high overall complexity. network can be expanded by increasing the number Fault tolerance. Fault tolerance plays an impor- of nodes in the network. As the sensors are becom- tant role because a wireless medium is rather

Table 6 Qualitative performance tabulation of synchronization protocols Protocols Qualitative performance comparison Accuracy Energy efficiency Overall complexity Scalability Fault tolerance RBS [19] High High High Good No Romer [56] Average High Low Poor No Mock et al. [49] High Low Low N/A Yes Ganeriwal et al. [25] High Average Low Good Yes Ping [54] High High Low Good No PalChaudhuri et al. [53] Unknown High Low Good No Sichitiu and Veerarittiphan [58] High High Low N/A Yes Time Diffusion Protocol [62] High Average High Good Yes Asynchronous diffusion [42] Unknown Low High N/A Yes 320 B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 error-prone. The poor reliability of message deliv- integrating various solution features to create a ery in a wireless medium can have devastating ef- successful clock synchronization scheme for the fects on synchronization protocols because application. Finally, the survey will be a helpful synchronization requires message exchanges. benchmark for designers to compare and contrast Some fault-tolerant protocols [24,49,58] address their results with the protocols that are widely in message loss to some extent, but others have not ad- use. dressed this issue. Consequently, it is unclear how sensitive their protocols are to message loss. This is somewhat troublesome because handling mes- References sage loss can result in significant overheads and per- formance degradation during synchronization. [1] I.F. Akyildiz, O. Akan, C. Chen, J. Fang, W. Su, InterPlaNetary Internet: state-of-the-art and research chal- lenges, Computer Networks 43 (2) (2003) 75–112. [2] I.F. Akyildiz, W. Su, Y. Sankarasubramanian, E. Cayirci, 6. Conclusions A survey on sensor networks, IEEE Communications Magazine 40 (8) (2002) 102–114. [3] I. Akyildiz, W. Su, Y. Sankarasubramanian, E. Cayirci, With increasing frequency, attention has been Wireless sensor networks: a survey, Computer Networks focused on wireless sensor networks because of 38 (4) (2002) 393–422. their wide applicability to a diverse range of appli- [4] K. Arvind, Probabilistic clock synchronization in distrib- cation areas. Among the many difficulties in uted systems, IEEE Transactions on Parallel and Distrib- uted Systems 5 (5) (1994) 474–487. designing and building such networks, a central [5] S. Burleigh, V. Cerf, R. Durst, K. Fall, A. Hooke, K. Scott, challenge is providing clock synchronization H. Weiss, The InterPlaNetary Internet: a communications among the sensor nodes. Providing a common infrastructure for Mars exploration, in: 53rd International time axis is necessary for a large number of sensor Astronautical Congress, The World Space Congress, applications because the data they report has to be October 2002. [6] CENS: Center for Embedded Networked Sensing. Avail- meaningfully fused to draw coherent inferences able at . about the environment being sensed. [7] CENS: Monitoring of marine microorganisms. Avail- Traditional clock synchronization protocols for able at . sensor-network protocols require the ability to [8] CENS: Seismic monitoring and structural response. Avail- able at . mobility, and scalability. The sensors themselves [9] Chart on the Web. Maryland Department of Transporta- are heavily resource-constrained because of limited tion. Available at . battery power. Furthermore, they need to operate [10] J.-C. Chen, K.M. Sivalingam, P. Agrawal, S. Kishore, A in highly lossy and unreliable environments. As a comparison of MAC protocols for wireless local networks based on battery power consumption, in: IEEE Info- result, several clock synchronization protocols com98, San Francisco, USA, March 1998, pp. 150–157. for wireless sensor networks have been designed [11] F. Cristian, Probabilistic clock synchronization, Distrib- in the recent past. uted Computing 3 (1989) 148–153. This paper presented a survey and analysis of [12] F. Cristian, C. Fetzer, The timed asynchronous distributed existing clock synchronization protocols for wire- system model, IEEE Transactions on Parallel and Distrib- uted Systems 10 (6) (1999) 642–657. less sensor networks, based on a variety of factors [13] D. Culler, W. Hong (Eds.), Introduction, Communications including precision, accuracy, cost, and complex- of the ACM 47 (6) (2004) 30–34. ity. The design considerations presented here will [14] D. Culler, M. Srivastava, D. Estrin (Eds.), Guest Editors help the designer in building a successful clock Introduction: Overview of Sensor Networks, IEEE Com- synchronization scheme, best tailored to his appli- puter 37 (8) (2004) 41–49. [15] H. Dai, R. Han, TSync: a lightweight bidirectional time cation. Specifically, the detailed analysis of the synchronization service for wireless sensor networks, ACM various options and possible solutions for each SIGMOBILE Mobile Computing and Communications of the factors involved will guide the designer in Review 8 (1) (2004) 125–139. B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 321

[16] Distributed Surveillance Sensor Network. ONR SPAWAR Networks and Applications (WSNA 03), San Diego, Systems Center, San Diego. Available from . [31] IEEE, Wireless LAN Medium Access Control (MAC) and [17] A. Dobra, M. Garofalakis, J. Gehrke, R. Rastogi, Physical Layer (PHY) Specifications. IEEE Std. 802.11, Processing complex aggregate queries over data streams, November 1997. in: Proceedings of SIGMOD International Conference on [32] The Intel Mote. Intel Corporation. Available at . [18] D. Dolev, J.Y. Halpern, B. Simons, R. Strong, Dynamic [33] P. Johnson, et al., Remote continuous physiological mon- fault-tolerant clock synchronization, Journal of the ACM itoring in the home, Journal of Telemedicine Telecare 2 (2) 42 (1) (1985) 143–185. (1996) 107–113. [19] J. Elson, L. Girod, D. Estrin, Fine-grained network time [34] C.E. Jones, K.M. Sivalingam, P. Agrawal, J. Cheng, A synchronization using reference broadcasts, in: Proceed- survey of energy efficient protocols for wireless networks, ings of Fifth Symposium on Operating Systems Design and Wireless Networks 7 (4) (2001) 343–358. Implementation (OSDI 2002), vol. 36, 2002, pp. 147–163. [35] J.M. Kahn, R.H. Katz, K.S.J. Pister, Next century [20] J. Elson, K. Romer, Wireless sensor networks: a new challenges: mobile networking for Smart Dust, in: Pro- regime for time synchronization, in: Proceedings of First ceedings of Fifth Annual ACM/IEEE International Con- Workshop on Hot Topics In Networks (HotNets-I), ference on Mobile Computing and Networking, 1999, pp. Princeton, New Jersey, October 2002. 271–278. [21] R.C. Shah, J. Rabaey, Energy aware routing for low [36] M.J. Karol, Z. Liu, K.Y. Eng, An efficient demand- energy ad-hoc sensor networks, IEEE Wireless Communi- assignment multiple access protocol for wireless packet cation and Networking Conference (WCNC), March 2002, (ATM) networks, ACM/Baltzer Wireless Networks 1 (3) pp. 350–355. (1995) 267–279. [22] D. Estrin, D. Culler, K. Pister, G. Sukhatme, Connecting [37] A.D. Kshemkalyani, The power of logical clock abstrac- the physical world with pervasive networks, IEEE Perva- tions, 17 (2) (2004) 131–150. sive Computing 1 (1) (2002) 59–69. [38] L. Lamport, Time, clocks, and the ordering of events in a [23] D. Estrin, R. Govindan, J. Heidemann, S. Kumar, Next distributed system, Communications of the ACM 21 (7) century challenges: scalable coordination in sensor net- (1978) 558–565. works, in: Proceedings of Fifth Annual International [39] L. Lemmerman, et al. Earth science vision: platform Conference on Mobile Computing and Networks (Mobi- technology challenges. in: Proceedings of International COM 99), August 1999, pp. 263–270. Geoscience and Remote Sensing Symposium (IGARSS [24] S. Ganeriwal, R. Kumar, S. Adlakha, M. Srivastava, 2001), Sydney, Australia, 2001. Network-wide time synchronization in sensor networks, [40] M.D. Lemmon, J. Ganguly, L. Xia, Model-based clock Technical Report, Networked and Embedded Systems synchronization in networks with drifting clocks, in: Lab, Electronic Engineering Department, UCLA, Proceedings of 2000 Pacific Rim International Symposium 2003. on Dependable Computing, December 2000. [25] S. Ganeriwal, R. Kumar, M. Srivastava, Timing-Sync [41] Q. Li, M. DeRosa, D. Rus, Distributed algorithms for protocol for sensor networks, in: Proceedings of First guiding navigation across a sensor network. in: Proceed- International Conference on Embedded Networked Sensor ings of Ninth Annual International Conference on Mobile Systems, Los Angeles, California, November 2003. Computing and Networking, September 2003, pp. 313– [26] L. Girod, V. Bychkovskiy, J. Elson, D. Estrin, Locating 326. tiny sensors in time and space: a case study, in: Proceedings [42] Q. Li, D. Rus, Global clock synchronization in sensor of International Conference on Computer Design (ICCD networks, in: Proceedings of IEEE Conference on Com- 2002), September 2002. puter Communications (INFOCOM 2004), vol. 1, Hong [27] D.J. Goodman, R.A. Valenzuela, K.T. Gayliard, B. Kong, China, March 2004, pp. 564–574. Ramamurthi, Packet reservation multiple access for local [43] B. Liskov, Practical uses of synchronized clocks in distrib- wireless communications, IEEE Transactions on Commu- uted systems, in: Proceedings of Tenth Annual ACM nications 37 (1989) 885–890. Symposium on Principles of Distributed Computing, [28] R. Gusella, S. Zatti, TEMPO—A network time controller August 1991, pp. 1–9. for a distributed Berkeley UNIX system, IEEE Distributed [44] S. Madden, R. Szewczyk, M. Franklin, D. Culler, Sup- Processing Technical Committee Newsletter 6 (S12-2) porting aggregate queries over ad-hoc wireless sensor (1984) 7–14. networks, in: Proceedings of Workshop on Mobile Com- [29] J. Hill, M. Horton, R. Kling, L. Krishnamurthy, The puting Systems and Applications, 2002. platforms enabling wireless, sensor networks, Communi- [45] L. Meier, P. Blum, L. Thiele, Internal synchronization of cations of the ACM 47 (6) (2004) 41–46. drift-constrained clocks in ad-hoc sensor networks, in: [30] A.-S. Hu, S.D. Servetto, Asymptotically optimal time Proceedings of 5th ACM International Symposium on synchronization in dense sensor networks, in: Proceedings Mobile Ad Hoc Networking and Computing (MobiHoc of 2nd ACM International Workshop on Wireless Sensor 04), Roppongi Hills, Japan, May 2004, pp. 90–97. 322 B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323

[46] D.L. Mills, Network time protocol (version 3): specifica- [63] R. Szewczyk, E. Osterweil, J. Polastre, M. Hamilton, A. tion, implementation, and analysis, Technical Report, Mainwaring, D. Estrin, Habitat monitoring with sensor Network Information Center, SRI International, Menlo networks, Communications of the ACM 47 (6) (2004) 34– Park, CA, March 1992. 40. [47] D.L. Mills, Modelling and analysis of computer network [64] S. Tilak, N.B. Abu-Ghazaleh, W. Heinzelman, Taxonomy clocks, Technical Report, 92-5-2, Electrical Engineering of wireless micro-sensor network models, ACM Mobile Department, University of Delaware, May 1992. Computing and Communications Review 6 (2) (2002) 28– [48] D.L. Mills, Internet time synchronization: the network 36. time protocol, IEEE Transactions of Communications 39 [65] TinyOS. An operating system for networked sensors, (10) (1991) 1482–1493. Available at . [49] M. Mock, R. Frings, E. Nett, S. Trikaliotis, Continuous [66] M. Tubaishat, S. Madria, Sensor networks: an overview, clock synchronization in wireless real-time applications, in: IEEE Potentials 22 (2) (2003) 20–23. Proceedings of 19th IEEE Symposium on Reliable Dis- [67] D. Tulone, Resource-efficient time estimation for wireless tributed Systems (SRDS-00), October 2000, pp. 125–133. sensor networks, in: S. Basagni, C.A. Phillips (Eds.), [50] S.B. Moon, P. Skelly, D. Towsley, Estimation and removal Proceedings of DIALM-POMC Workshop on Founda- of clock skew from network delay measurements, Proceed- tions of Mobile Computing, October 2004, pp. 52–59, ings of IEEE INFOCOM, vol. 1, 1999, pp. 227–234. Philadelphia, Pennsylvania. Available at . allel and Distributed Computing 5 (9) (1994) 912–923. [68] J. van Greunen, J. Rabaey, Lightweight time synchroniza- [52] D. Raychaudhuri, N.D. Wilson, ATM-based transport tion for sensor networks, in: Proc. 2nd ACM Int. Work- architecture for multi-services wireless personal communi- shop on Wireless Sensor Networks and Applications cation networks, IEEE Journal on Selected Areas in (WSNA 03), San Diego, California, September 2003, pp. Communications 12 (1994) 1401–1414. 11–19. [53] S. PalChaudhuri, A. Saha, D.B. Johnson, Probabilistic [69] R. Want, A. Hopper, V. Falca¨o, J. Gibbons, The active clock synchronization service in sensor networks, Techni- badge location system, ACM Transactions on Information cal Report TR 03-418, Department of Computer Science, Systems 10 (1) (1992) 91–102. Rice University, 2003. [70] J. Werb, C. Lanzl, Designing a positioning system for [54] S. Ping, Delay measurement time synchronization for finding things and people indoors, IEEE Spectrum 35 (9) wireless sensor networks, Intel Research, IRB-TR-03-013, (1998) 71–78. June 2003. [71] A. Woo, S. Madden, R. Govindan, Networking support [55] G. Pottie, W. Kaiser, Wireless integrated network sensors, for query processing in sensor networks, Communications Communications of the ACM 43 (5) (2000) 51–58. of the ACM 47 (6) (2004) 47–52. [56] K. Romer, Time synchronization in ad hoc networks, in: [72] Available at . Proceedings of ACM Symposium on Mobile Ad Hoc [73] Available at . Networking and Computing (MobiHoc 01), October 2001, [74] Y. Yao, J. Gehrke, Query processing in sensor networks, pp. 173–182. in: Proceedings of the First Biennial Conference on [57] M. Ryu, S. Hong, Revisiting clock synchronization prob- Innovative Data Systems Research, Asilomar, California, lems: static and dynamic constraint transformations for January 2003. correct timing enforcement, Technical Report No. SNU- [75] W. Ye, J. Heidemann, D. Estrin, An energy-efficient MAC EE-TR-1998-3, Seoul National University, South Korea, protocol for wireless sensor networks, in: Proceedings of September 1998. the 21st International Annual Joint Conference of the [58] M.L. Sichitiu, C. Veerarittiphan, Simple, accurate time IEEE Computer and Communications Societies (INFO- synchronization for wireless sensor networks, in: Proceed- COM 2002), June, 2002, pp. 1567–1576. ings of IEEE Wireless Communications and Networking [76] X.Yu, K. Niyogi, S. Mehrotra, N. Venkatasubramanian, Conference (WCNC 2003), 2003, pp. 1266–1273. Adaptive middleware for distributed sensor environments. [59] S. Singh, C.S. Raghavendra, PAMAS: power aware multi- IEEE Distributed Systems Online, May 2003. access protocol with signaling for ad hoc networks, [77] W. Yuan, S. Krishnamurthy, S. Tripathi, Synchronization Distributed Computing 6 (1993) 211–219. of multiple levels of data fusion in wireless sensor [60] The sensor web project, NASA Jet Propulsion Laboratory, networks, in: Proceedings of IEEE Global Available from . Telecommunications Conference (Globecom), pp. 221– [61] SmartDust, Autonomous sensing and communication in a 225, 2003. cubic millimeter, Available at . for monitoring wireless sensor networks, in: [62] W. Su, I. Akyildiz, Time-diffusion synchronization proto- Proceedings of IEEE Workshop on Sensor Network cols for sensor networks, IEEE/ACM Transactions on Protocols and Applications (SANPA), May 2003, pp. Networking, in press. 139–148. B. Sundararaman et al. / Ad Hoc Networks 3 (2005) 281–323 323

Bharath Sundararaman was born and definition of techniques and tools for the static analysis of raised in Chennai, India and currently concurrent and real-time software. Using a variety of program lives in Palatine, Illinois. Bharath representations (e.g., finite-state automata and Petri nets), he received a Bachelor of Engineering investigated several techniques for promoting the reliability of degree in Computer Science from concurrent and real-time software. Madras University, India in 2000 and a He is currently investigating techniques for the automatic Master of Sciences degree in Computer synthesis of supervisory controllers for discrete manufacturing Science from the University of Illinois systems. The controllers must enforce traditional safety and at Chicago in 2003. He currently works timing properties of manufacturing plants. An additional as a Senior Software Engineer for research interest is the exploration of new computing applica- Starthis Inc., a provider of automation tions based on wireless sensor networks. middleware solutions in Arlington Heights, Illinois. Ajay Kshemkalyani is an Associate Professor of Computer Science at the University of Illinois at Chicago since Ugo Buy is an Associate Professor in 2000. He previously spent several years the Department of Computer Science at IBM Research Triangle Park work- of the University of Illinois at Chicago. ing on various aspects of computer He obtained his MS and PhD degrees networks. Ajay Kshemkalyani received in Computer Science from the Univer- a Ph.D. and an M.S. in Computer and sity of Massachusetts at Amherst in Information Science from The Ohio 1983 and 1990, respectively. From 1983 State University in 1991 and 1988, to 1986 he was a Senior Software respectively, and a B.Tech. in Com- Engineer with the Digital Equipment puter Science and Engineering from Corporation in Hudson, Massachu- the Indian Institute of Technology, setts. He has been on the UIC faculty Bombay, in 1987. His current research since 1990. interests include computer networks, distributed computing, His research interests are in the area algorithms, and concurrent systems. He is a recipient of the of software engineering. In the past, he has been involved in National Science Foundations CAREER Award. He is a several NSF-sponsored projects whose common goal was the member of the ACM and a senior member of the IEEE.