330 likes | 492 Views
Sundial: Using Light to Reconstruct Global Timestamps Jayant Gupchup † , Răzvan Musăloiu -E. † , Alex Szalay ± , Andreas Terzis † Department of Computer Science, Johns Hopkins University † Department of Physics and Astronomy, Johns Hopkins University ±. Outline. Introduction
E N D
Sundial: Using Light to Reconstruct Global Timestamps Jayant Gupchup†, RăzvanMusăloiu-E.† , Alex Szalay±, Andreas Terzis† Department of Computer Science, Johns Hopkins University† Department of Physics and Astronomy, Johns Hopkins University±
Outline • Introduction • Problem Description • Solution • Evaluation • Discussion
Introduction Local Clock DateTime / Universal Clock
Postmortem Timestamp Reconstruction • Commonly used by environmental monitoring networks • Time-Synchronization is expensive • Increase network lifetime • Measurements are recorded in “Local timestamps” • Global Timestamps are assigned/mapped retro-actively • collect pairs of <local ts, global ts>, i.e. “anchor points” • Typically sampled by a gateway/basestation
Problems Traditional Postmortem Reconstruction
Basic Methodology ^ ^ GTS = α . LTS + β “α” (slope) represents Clock-skew <LTS, GTS> “Anchor Points” “β” (intercept) represents Node Deployment time
Reboots Segment 2 Segment 1
Reboots Segment 1 Segment 2
Failures • Basestation can fail • Network is in “data-logging” mode • Nodes become disconnected from the network • Mote is in data-logging mode • Basestation clock (global clock source) could have an offset/Drift • Corrupt “anchor points” • Bad estimates for α and β
Solution • Robust Global Timestamp Reconstruction Algorithm • “Sundial”
Robust Global Timestamp Reconstruction (RGTR) Algorithm • Piece-Wise Timestamp Reconstruction • Identify Segments • Identify Anchor points associated with each segment • Obtain a fit (αi, βi) for each segmenti • Apply the fit for each segment to reconstruct global timestamps
Robust estimates • “Anchor Points” belonging to a segment • Properties • Line passing through the points has a slope ~ 1 • Intercept for equation of a line passing through the points must be same • Remove “outliers” for a robust Fit • Bad anchor points corrupt the fit • Iterative fit works as follows: • Obtain a fit using the “good” points • Compute residuals of points from the fit • Censor bad points • Repeat until “convergence”
Motivation for “Sundial” • Global clock source might • Contain an offset • Drift • Fail • Nodes might become disconnected from the network • “Sun” to the rescue !
Annual Solar Patterns <LOD, noon> = f(Latitude, Time of Year)
On-board Light Data Smooth
“Sundial” Noon Length of day (LOD) argmax lag Xcorr (LOD lts, LOD gts, lag) “Anchor Points”
Architecture Light (localclock) “Sundial” “Anchor Points” “Time Reconstruction Algorithm (E.g. RGTR)” Universal Timestamps (unixts)
Evaluation • Establish Ground Truth • Results
Ground Truth Fit • Used reconstructed Segments that passed Validation Checks • Validation of global timestamps • Use Ambient Temperature data • Correlate among sensors • Correlate with co-located Weather Station
Segments • “Jug bay” Deployment • Telos B motes • 30 minute sampling • 13 boxes • Max Size : 167 days • “Leakin” Deployment • MicaZ motes • 20 minute sampling • 6 boxes • Max Size : 587 days
Reconstruction Results • Day Error • Offset in days • Proportional to Error in • Intercept (β) • Minute Error • RMSE Error in minute within the day • Proportional to Error in slope/clock • drift (α)
Effect of Segment Length • Experimental Set up • Select Segments of varying size • To eliminate bias, • Segment-start chosen from a Uniform PDF • Use “Sundial” to reconstruct timestamps
Eliminate Day Error Precipitation Soil Moisture
Eliminate Day Error Precipitation Soil Moisture
Discussion/Conclusion • Novel Post-mortem Timestamp Reconstruction Algorithm • Not a synchronization-protocol • Works in conjunction with other timestamp reconstruction methods (RGTR, [1]), • Robust to “random mote-reboots” and “drifting global clocks” • Uses inexpensive on-board light data and annual solar patterns to reconstruct timestamps (no anchor points) • Experimental Results using light data sampled at 20 minutes • Accuracy towards 10 parts per million • Reconstruction within minutes (always within one sample period) • Data from nearby-weather stations can also be used • Susceptible to “microclimate effects” [1] G. Werner-Allen et. al, Yield in a Volcano Monitoring Sensor Network. In Proceedings of the 7th USENIX Symposium on Operating Systems Design and Implementation (OSDI), Nov. 2006.
Estimation of Clock Drift • Observations • Difference in Clock drifts due to Node-Types • Error in ppm is close to operating frequency of Quartz crystal • Error is related to Length of Deployment (Leakin shows less error)
Eliminate Day Error • Day Error < 7 days (8 segments). • Correlate data with “known” events (E.g. rain) • Correlate in local neighborhood • Correlate daily Soil Moisture vectors with Rain Vectors • 7 out of 8 aligned to the correct day
Discussion • Sundial uses well-established Solar patterns to reconstruct timestamps • Does not replace other Timestamp reconstruction methods (RGTR, [1]), but works in conjunction with them • Sundial can be used • Motes disconnect from the network and reboot • Base-station fails and motes reboot • The global clock source is unreliable • Independent validation using “LOD” and “noon” metrics • Other ? • Data from nearby-weather stations can also be used • Susceptible to “microclimate effects” [1] G. Werner-Allen et. al, Yield in a Volcano Monitoring Sensor Network. In Proceedings of the 7th USENIX Symposium on Operating Systems Design and Implementation (OSDI), Nov. 2006.