Adaptive Clock Synchronization in Sensor Networks
Total Page:16
File Type:pdf, Size:1020Kb
Adaptive Clock Synchronization in Sensor Networks Santashil PalChaudhuri Amit Kumar Saha David B. Johnson [email protected] [email protected] [email protected] Department of Computer Science Rice University Houston, TX 77005 ABSTRACT 1. INTRODUCTION Recent advances in technology have made low cost, low Recent advances in technology have made low-cost, low- power wireless sensors a reality. Clock synchronization is an power wireless sensors a reality. Sensor networks formed important service in any distributed system, including sen- from such sensors can be deployed in an ad hoc fashion and sor network systems. Applications of clock synchronization cooperate to sense and process a physical phenomenon. As in sensor networks include data integration in sensors, sen- each sensor has a finite battery source, an important feature sor reading fusion, TDMA medium access scheduling, and of sensor network is energy efficiency to extend the network's power mode energy saving. However, for a number of rea- lifetime. sons, standard clock synchronization protocols are unsuit- As in any distributing computer system, clock synchro- able for direct application in sensor networks. nization is an important service in sensor networks. Sensor In this paper, we introduce the concept of adaptive clock network applications can use synchronization for data inte- synchronization based on the need of the application and gration and sensor reading fusion. A sensor network may the resource constraint in the sensor networks. We describe also use synchronization for TDMA medium access schedul- a probabilistic method for clock synchronization that uses ing, power mode energy savings, and scheduling for direc- the higher precision of receiver-to-receiver synchronization, tional antenna reception. Sensor networks show some unique as described in Reference Broadcast Synchronization (RBS) characteristics that make it difficult to directly apply tradi- protocol. This deterministic protocol is extended to pro- tional network clock synchronization approaches. vide a probabilistic bound on the accuracy of the clock syn- The error in clock synchronization comes mainly from the chronization, allowing for a tradeoff between accuracy and non-deterministic random time delay for a message transfer resource requirement. Expressions to convert service spec- between two nodes. Kopetz et al. [1] first characterized this ifications (maximum clock synchronization error and confi- message delay. In some recent work, this non-determinism dence probability) to actual protocol parameters (minimum has been reduced to provide tighter bounds on the clock number of messages and synchronization overhead) are de- synchronization error [2, 3]. Our work, which is based on the rived. Further, we extend this protocol for maintaining clock Reference Broadcast Synchronization (RBS) [3], provides an synchronization in a multihop network. analytical way to convert service specifications to protocol parameters. Categories and Subject Descriptors The need in sensor networks is to provide the best possible clock synchronization under existing circumstances, given C.2 [COMPUTER-COMMUNICATION NETWORKS]: the limited resources of the nodes and the network in the [Network Protocols, Applications]; G.3 [PROBABILITY system. Highly accurate clock synchronization typically re- AND STATISTIC]: [Probabilistic algorithms] quires more message transfers and processing as part of the synchronization protocol. In situations where the system General Terms energy is extremely low, it might not be possible to provide high accuracy. The accuracy needed in clock synchroniza- Algorithms, Design tion is variable, depending on the higher layer application requirements. If the need for determinism can be relaxed, Keywords probabilistic guarantees often suffice for the needs of an ap- Clock synchronization, Sensor Networks, Probabilistic Al- plication, while allowing for optimal use of resources. Prob- gorithms abilistic guarantees provide better accuracy in most cases as compared to deterministic accuracy in all cases. Also the failure probability of achieving a certain accuracy can be bounded. Quality of Service (QoS) in networks make exten- Permission to make digital or hard copies of all or part of this work for sive use of this concept to give probabilistic guarantees by personal or classroom use is granted without fee provided that copies are allowing resources to be allocated on the basis of expected not made or distributed for pro®t or commercial advantage and that copies aggregate demand. Previous work [4, 5] uses this concept for bear this notice and the full citation on the ®rst page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior speci®c providing probabilistic clock synchronization in distributed permission and/or a fee. systems. IPSN'04, April 26±27, 2004, Berkeley, California, USA. Clock synchronization might not be necessary at all times, Copyright 2004 ACM 1-58113-846-6/04/0004 ...$5.00. 340 except during sensor reading integration. In such a case, Multihop: Most of the typical synchronization pro- providing clock synchronization all the time will be a waste • tocols have a highly accurate clock present in the LAN, on the limited available resources of sensors. The sensor such that all the nodes in the system can directly ex- clocks can be allowed to go out of sync, and then re-synchronize change messages. Sensor networks span many hops, only when there is a need for synchronization, thereby sav- with higher jitter. So the algorithms for sensor net- ing resources. work clock synchronization need to have some sort of We design our adaptive clock synchronization protocol localization to reduce this error, as well as some other keeping in mind the concepts discussed above. The remain- means of achieving multihop synchronization even in der of this paper is organized as follows. In Section 2, we the presence of high jitter. describe the various concepts of clock synchronization in de- Server-less: Traditional protocols have specified tail and motivate the design principles used in building our • algorithm. In Section 3, we survey the related work in this servers, with multiple accuracy levels which are sources area. Section 4 describes the RBS protocol, along with our of accurate time. Sensor networks do not have any ex- improvements. Section 6 evaluates the performance of the ternal infrastructure present and can be large in scale. protocol. Section 5 extends this protocol for multihop sensor Maintaining global time scale in this network is thus networks. Finally, we discuss our conclusions in Section 7. harder, if no external broadcast source of global time such as GPS is present. Elson et al. [7] proposed that each node maintain an undisciplined clock, augmented 2. DESIGN PRINCIPLES with the relative frequency and phase information of In the paper describing the Network Time Protocol (NTP), its neighbors. We also use this approach in our work. Mills [6] defines the various terms used in clock synchro- nization. The stability of a clock is how well the physical 2.2 Theoretical Bounds on Clock Synchroniza- clock can maintain a constant frequency. Accuracy refers tion to how well the maintained time is true to the standard There have been various theoretical results that have been time. The offset of two clocks is the actual time difference proven regarding clock synchronization. These analytical between them, and the skew is the frequency difference be- results and their consequences are useful when designing a tween them. To synchronize frequency means to adjust the clock synchronization protocol: clocks to run at the same frequency, and to synchronize time From the causality property in a system, the ordering of means to set their time at a particular epoch to be exactly events can be formally stated. If an event a occurs before the same. To synchronize clock means to synchronize the another event b, then a should happen at an earlier time clocks in both frequency and time. In this paper, our algo- than b. Let Ci(a) be the clock value of process i when event rithm will synchronize clocks, i.e., it will synchronize both a occurs. Then it can be formally stated that: frequency and time. If a and b are events in process i, and event a 2.1 Traditional versus Sensor Network occurs before event b, then C (a) < C (b) . Synchronization i i NTP is scalable, robust to failures, self-configuring, and Lamport [8] showed that, when the value of a clock needs to has various properties that are needed in the sensor network be adjusted, it always has to be set forward and never back. world. However, wireless sensor networks pose a number of Setting the clock back could cause the above condition to be challenges beyond traditional network systems. Elson and violated. Hence, in an ideal system, the slower clocks needs Romer [7] describe the differences quite exhaustively. We to be adjusted to the value of the fastest clock, for all clocks state the design principles that are used in the design of the to be synchronized. This restriction will also maintain the protocol. partial ordering of the events. It is useful to have a bound on the best accuracy achiev- Energy Constraint: Energy efficiency is very im- able in any system, such that no bound lower than that is • portant for sensor networks as opposed to traditional specified. Srikanth et al. [9] have shown that for any syn- networks. chronization algorithm, even in the absence of faults, the bound on the rate of drift of logical clocks from real time Tunable Accuracy: Traditional synchronization is greater than the bound on the rate of drift of physical • protocols try to achieve the highest degree of accuracy clocks. In the presence of faults | such as message losses possible. The higher the level of accuracy required, and node failures | the accuracy of logical clocks becomes the higher the resource requirement. The accuracy of even worse. required synchronization depends on the application Most clock synchronization algorithms proposed in liter- requirement. Therefore, there is a need for a trade- ature try to guarantee a deterministic upper bound on the off between resource requirements and accuracy, de- clock skew.