CS 546: Intelligent Embedded Systems Gaurav S. Sukhatme Robotic Embedded Systems Lab Center for Robotics and Embedded Systems Computer Science Department.

Slides:



Advertisements
Similar presentations
Christoph Lenzen Philipp Sommer Philipp Sommer Roger Wattenhofer Roger Wattenhofer Optimal Clock Synchronization in Networks.
Advertisements

The Flooding Time Synchronization Protocol
Gradient Clock Synchronization in Wireless Sensor Networks
Synchronization.
HIERARCHY REFERENCING TIME SYNCHRONIZATION PROTOCOL Prepared by : Sunny Kr. Lohani, Roll – 16 Sem – 7, Dept. of Comp. Sc. & Engg.
Wireless Sensor Networks Clock Synchronization Professor Jack Stankovic University of Virginia.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
Time and synchronization (“There’s never enough time…”)
Time and Clock Primary standard = rotation of earth De facto primary standard = atomic clock (1 atomic second = 9,192,631,770 orbital transitions of Cesium.
Sensor Network-Based Countersniper System Gyula S, Gyorgy B, Gabor P, Miklos M, Branislav K, Janos S, Akos L, Andras N, Ken F Presented by Vikram Reddy.
Computer Science 425 Distributed Systems CS 425 / ECE 428  2013, I. Gupta, K. Nahrtstedt, S. Mitra, N. Vaidya, M. T. Harandi, J. Hou.
Time Synchronization for Wireless Sensor Networks
CS 546: Intelligent Embedded Systems Gaurav S. Sukhatme Robotic Embedded Systems Lab Center for Robotics and Embedded Systems Computer Science Department.
Time in Embedded and Real Time Systems Lecture #6 David Andrews
Time Synchronization (RBS, Elson et al.) Presenter: Peter Sibley.
Teaching material based on Distributed Systems: Concepts and Design, Edition 3, Addison-Wesley Copyright © George Coulouris, Jean Dollimore, Tim.
He Huang Introduction:The Flooding Time Synchronization Protocol.
1 University of Freiburg Computer Networks and Telematics Prof. Christian Schindelhauer Wireless Sensor Networks 15th Lecture Christian Schindelhauer.
The Flooding Time Synchronization Protocol
Time Synchronization Murat Demirbas SUNY Buffalo.
1 University of Freiburg Computer Networks and Telematics Prof. Christian Schindelhauer Wireless Sensor Networks 13th Lecture Christian Schindelhauer.
EEC-681/781 Distributed Computing Systems Lecture 10 Wenbing Zhao Cleveland State University.
EEC-681/781 Distributed Computing Systems Lecture 10 Wenbing Zhao Cleveland State University.
1 CS194: Clocks and Synchronization Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering and Computer Sciences University.
Distributed Systems Foundations Lecture 1. Main Characteristics of Distributed Systems Independent processors, sites, processes Message passing No shared.
1 Synchronization Part 1 REK’s adaptation of Claypool’s adaptation of Tanenbaum’s Distributed Systems Chapter 5.
Lecture 2-1 CS 425/ECE 428 Distributed Systems Lecture 2 Time & Synchronization Reading: Klara Nahrstedt.
8/18/2015 Mobile Ad hoc Networks COE 549 Synchronization Tarek Sheltami KFUPM CCSE COE 1.
1 Physical Clocks need for time in distributed systems physical clocks and their problems synchronizing physical clocks u coordinated universal time (UTC)
Timing-sync Protocol for Sensor Networks (TPSN) Presenter: Ke Gao Instructor: Yingshu Li.
Energy-Aware Synchronization in Wireless Sensor Networks Yanos Saravanos Major Advisor: Dr. Robert Akl Department of Computer Science and Engineering.
Naming CSCI 4780/6780. Attribute-based Naming Flat and structured names provide location transparency Structured names are also human-friendly Increasingly,
CS450 Network Embedded Sensing Systems Week 11: Time Synchronization and Reconstruction Jayant Gupchup.
Clock Synchronization in Sensor Networks Mostafa Nouri.
On-Demand Traffic-Embedded Clock Synchronization for Wireless Sensor Networks Sang Hoon Lee.
Computer Science Lecture 10, page 1 CS677: Distributed OS Last Class: Naming Name distribution: use hierarchies DNS X.500 and LDAP.
Parallel and Distributed Simulation Synchronizing Wallclock Time.
CS 546: Intelligent Embedded Systems Gaurav S. Sukhatme Robotic Embedded Systems Lab Center for Robotics and Embedded Systems Computer Science Department.
1 Clock Synchronization for Wireless Sensor Networks: A Survey Bharath Sundararaman, Ugo Buy, and Ajay D. Kshemkalyani Department of Computer Science University.
Energy and Latency Control in Low Duty Cycle MAC Protocols Yuan Li, Wei Ye, John Heidemann Information Sciences Institute, University of Southern California.
Communication & Synchronization Why do processes communicate in DS? –To exchange messages –To synchronize processes Why do processes synchronize in DS?
Wireless Sensor Networks Nov 1, 2006 Jeon Bokgyun
Time synchronization for UWSN. Outline Time synchronization knowledge Typical time sync protocol Time sync in UWSN Discussion.
Topic 2: Communications (Short Lecture) Jorge J. Gómez.
Fasika Assegei Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.
Computer Science 1 TinySeRSync: Secure and Resilient Time Synchronization in Wireless Sensor Networks Speaker: Sangwon Hyun Acknowledgement: Slides were.
Fine-Grained Network Time Synchronization using Reference Broadcasts Jeremy Elson, Lew Girod, and Deborah Estrin OSDI Boston, MA Speaker : hsiwei-Chen.
Synchronization Distributed System. Why synchronization? Two sharpshooters in a multiplayer online game kill the same target. Which one gets the points?
Lecture 9: Time and clocks (Chap 11) Haibin Zhu, PhD. Assistant Professor Department of Computer Science Nipissing University © 2002.
Time This powerpoint presentation has been adapted from: 1) sApr20.ppt.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Real-Time & MultiMedia Lab Synchronization Distributed System Jin-Seung,KIM.
Time Synchronization Protocols in Wireless Sensor Networks.
CS 546: Intelligent Embedded Systems Gaurav S. Sukhatme Robotic Embedded Systems Lab Center for Robotics and Embedded Systems Computer Science Department.
Synchronization CSCI 4900/6900. Importance of Clocks & Synchronization Avoiding simultaneous access of resources –Cooperate to grant exclusive access.
Physical clock synchronization Question 1. Why is physical clock synchronization important? Question 2. With the price of atomic clocks or GPS coming down,
Time and global states Chapter 11. Outline Introduction Clocks, events and process states Synchronizing physical clocks Logical time and logical clocks.
Distributed Systems CS Synchronization – Part I Lecture 8, Sep 23, 2013 Mohammad Hammoud.
UNIT IV INFRASTRUCTURE ESTABLISHMENT. INTRODUCTION When a sensor network is first activated, various tasks must be performed to establish the necessary.
6 SYNCHRONIZATION. introduction processes synchronize –exclusive access. –agree on the ordering of events much more difficult compared to synchronization.
Hwajung Lee. Primary standard = rotation of earth De facto primary standard = atomic clock (1 atomic second = 9,192,631,770 orbital transitions of Cesium.
Distributed Systems Lecture 5 Time and synchronization 1.
Distributed Computing
Lecture 5 Time and synchronization
Time and Clock.
Clock Synchronization
Time and Clock.
Overview: Chapter 4 Infrastructure Establishment
CSE 486/586 Distributed Systems Time and Synchronization
Presentation transcript:

CS 546: Intelligent Embedded Systems Gaurav S. Sukhatme Robotic Embedded Systems Lab Center for Robotics and Embedded Systems Computer Science Department University of Southern California

Last time –Sensors –Networking Today –HW3 –Time synchronization basics –Firefly paper –RBS paper

Today Memory Processor InterfaceSensor and actuator suite Energy supply External communication Platform OS and SW architecture Tools User interface Application Figure adapted from [Pottie and Kaiser 2005] 1/24, 4/18: Cyclops 1/31: Networking 2/21: Energy management 4/18: Cyclops 2/7,14 and 28: Time synch, localization and data management 3/21,28 and 4/11: Environmental monitoring

Why Time Synch? To time-stamp measurements To perform in-network signal processing For localization For cooperative communication For medium access For sleep scheduling (energy management) For coordinated actuation

Key Issues Clock = crystal + timer circuitry Clock is incremented after K ticks or interrupts by the timer Low-end systems = cheap crystal and unreliable timer circuitry Clocks are jittery, unstable, and error prone in real systems

Basic Model Real frequency is modeled as the sum of an ‘ideal’, an offset, a drift term, and random noise Oscillator model Initial time Value of Clock C at time t

Simplified Model Drop drift and random term to obtain a linear model Clock offset at reference time t=0Clock drift Ideal clock has α=0 and β=1 Clock is said to be fast if β>1 and slow if β<1

Synchronization Manufactured clocks usually have a maximum drift rate parameter ρ such that 1- ρ < β < 1+ ρ For a typical mote ρ ~ 40 ppm, giving a drift rate of ±40 μs Two synchronized clocks can drift apart at a maximum rate of 2ρ Suppose we want to always keep relative offset between two clocks bounded by δ seconds => synchronization every δ/2ρ seconds (or more often)

Synchronization: Simple Approaches Periodic broadcast of a global clock (UTC – Universal Coordinated Time) –Such a clock needs to be consistent and high quality (e.g. US NIST WWV, WWVH, WWVB) –WWVB is a 60kHZ carrier, 50kW signal transmitter, accurate to 1μs but comm delays allow receiver synch ~10μs Satellite-based GPS receiver –~1μs, but expensive, and only work in unobstructed environments

Requirements Quality – vary from ~0.1μs to ~10-100ms Scope –All nodes synched to a global external references vs. local sync between neighbors only Consistency –All nodes synched at all times vs. intermittent or post facto synch Costs –Energy, convergence time, equipment

Approaches to Time-synch Original approach by Lamport Cristian’s algorithm and its (hierarchical) NTP implementation Fine grained –RBS –TPSN (pair wise receiver-sender) –Linear parameter-based –FTSP (flooding) –Predictive –Firefly (biologically inspired oscillator entrainment) Coarse grained –Wisden - an alternative to true time-synch (retroactive time stamping)

Lamport Consistent ordering of all events in a distributed system Label each event x with a distinct time stamp Lx such that –Lx not equal to Ly for all unique x and y –If x precedes y within a node then Lx <Ly –If x is a message transmission at one node and y is its receipt at another node then Lx<Ly Lamport timestamps do not provide true causality. If true times of x and y are Tx and Ty then –Tx Lx < Ly but –Lx< Ly does not imply Tx < Ty

Cristian Two node clock synch –A sends request to B (which has a reference clock) –B sends clock value T B to A –A records transmission time T 1 and reception time T 2 Simple estimate for propagation time is (T 2 -T 1 )/2 If processing delay is known to be D then better estimate is (T 2 – T 1 – D)/2 Even better if you do several round trip samples and use minimum or mean delays after removing outliers NTP is essentially a hierarchy of time servers and a cascaded implementation of Cristian’s algorithm

Factors Affecting Message Latency Send time: processing time and time to assemble and move message to link layer Access time: random delays while message is buffered at link layer due to contention and collisions Propagation time: point to point travel time (small for one link, dominant over multiple hops depending on network congestion) Receive time: processing and recording message arrival

RBS (more later) Exploit broadcast Beacon node B broadcasts reference signal Received by receivers A and C simultaneously (assume insignificant propagation delay) A and C record received time A and C exchange local time stamps Key feature is the elimination of sender-side uncertainty Can be extended to multihop

TPSN Timing-synch protocol for sensor networks Cristian’s algorithm –A stamps a mesg locally as T1 and sends to B –B stamps the received time as T2 –B send mesg to A (stamped locally at B as T3) –A stamps the received mesg as T4 Let the offset between A and B be Δ and the propagation delay be d T2 = T1 + Δ + d T4 = T3 – Δ + d, thus Δ = [(T2 – T4) – (T1 – T3)]/2 d = [(T2 + T4) – (T1 + T3)]/2 Network-wise synch using a level-by-level structure

Linear Parameter-based Synch Provide bounds for relative clock drift and offset Recall for two clocks A and B C A = α A +β A t and C B = α B +β B t Eliminate t to get C A = α AB +β AB C B Two constraints T 1 < α AB +β AB T 2 T 4 > α AB +β AB T 3

FTSP Flooding time synch protocol Reduce uncertainties of RBS and TPSN –Interrupt handling time (delay between processor and radio) –Modulation/encoding time (delay at the radio) FTSP broadcasts an actual time measurement from single sender to multiple receivers. Receivers do not synch among themselves Fine tuning –Multiple time measurements at byte boundaries –Flooded messaging

Predictive time synch Frequency of inter-node sampling is adjusted based on drift prediction

Reachback Firefly Algorithm (more later) Biologically inspired synch Not timestamping Fully decentralized and heavily fault tolerant

Coarse grained Data Synch WISDEN –Collect and record latency measurements in each packet in a special field –Retroactively timestamp at the base station when packet arrives Only base station needs an accurate reference clock

Next week Localization HW 3 is due a week from today