A tale of two synchronizing clocks

  • Authors:
  • Jinkyu Koo;Rajesh K. Panta;Saurabh Bagchi;Luis Montestruque

  • Affiliations:
  • Purdue University;Purdue University;Purdue University;EmNet, LLC

  • Venue:
  • Proceedings of the 7th ACM Conference on Embedded Networked Sensor Systems
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

A specific application for wastewater monitoring and actuation, called CSOnet, deployed city-wide in a mid-sized US city, South Bend, Indiana, posed some challenges to a time synchronization protocol. The nodes in CSOnet have a low duty cycle (2% in current deployment) and use an external clock, called the Real Time Clock (RTC), for triggering the sleep and the wake-up. The RTC has a very low drift (2 ppm) over the wide range of temperature fluctuations that the CSOnet nodes have, while having a low power consumption (0.66 mW). However, these clocks will still have to be synchronized occasionally during the long lifetime of the CSOnet nodes and this was the problem we confronted with our time synchronization protocol. The RTC to fit within the power and the cost constraints makes the tradeoff of having a coarse time granularity of only 1 second. Therefore, it is not sufficient to synchronize the RTC itself---that would mean a synchronization error of up to 1 second would be possible even with a perfect synchronization protocol. This would be unacceptable for the low duty cycle operation---each node stays awake for only 6 seconds in a 5 minute time window. This was the first of three challenges for time synchronization. The second challenge is that the synchronization has to be extremely fast since ideally the entire network should be synchronized during the 6 second wake-up period. Third, the long range radio used for the metropolitan-scale CSOnet does not make its radio stack software available, as is seen with several other radios for long-range ISM band RF communication. Therefore, a common technique for time synchronization---MAC layer time-stamping---cannot be used. Additionally, MAC layer time-stamping is known to be problematic with high speed radios (even at 250 kbps). We solve these challenges and design a synchronization protocol called Harmonia. It has three design innovations. First, it uses the finely granular microcontroller clock to achieve synchronization of the RTC, such that the synchronization error, despite the coarse granularity of the RTC, is in the microsecond range. Second, Harmonia pipelines the synchronization messages through the network resulting in fast synchronization of the entire network. Third, Harmonia provides failure handling for transient node and link failures such that the network is not overburdened with synchronization messages and the recovery is done locally. We evaluate Harmonia on CSOnet nodes and compare the two metrics of synchronization error and synchronization speed with FTSP. It performs slightly worse in the former and significantly better in the latter.