Clock Synchronization in Sensor Networks Mostafa Nouri Outline
- Slides: 31
Clock Synchronization in Sensor Networks Mostafa Nouri
Outline Need for time synchronization in sensor networks n Definition of time synchronization n Common problems in time synchronization n Typical schemes and algorithms. n
Sensor Networks n Sensor networks and applications ¨ Deeply embedded into the environment ¨ Sense, monitor, and control environments for a long period of time without human intervention n Vast collection of miniature, lightweight, inexpensive, energy-efficient sensor nodes
Sensor Networks n Applications ¨ Biological & Environmental: habitat monitoring, wildlife, pollution, natural catastrophes ¨ Civil: infrastructure, machine health, human health, traffic monitoring ¨ Military: surveillance, tracking, detection n Network Architecture / Sensor Platforms ADC Battery Low-power CPU/m. C Memory Radio Sensors Base Station
Why Need for Time Synchronization n Link to the physical world ¨ When n does an event take place? Key basic service of sensor networks ¨ Fundamental n Crucial to the efficient working of other basic services ¨ Localization, n to data fusion Calibration, In-network processing, … Several protocols require time synchronization ¨ Cryptography, Topology management.
Sensor Networks n Characteristics of SN ¨ Cheap n No Accurate Oscillator ¨ Limited n n Energy Together Data Fusion Conclusion ¨ must ? ? Need to Sleep ¨ Work n ? and Small initiate T-Sync in WSN ? ?
Metrics for Synchronization Protocols Precision n Longevity of synchronization n Time and power budget available for synchronization n Geographical span n Size and network topology n
Examples n Energy efficient radio scheduling Sender Receiver Time n Array processing Radio On Radio Off Guard band due to clock skew; receiver can’t predict exactly when packet will arrive
Computer Clocks n Clocks in computers ¨ ¨ ¨ n C(t)=k∫ 0 tω(τ)d τ + C(t 0) ω is frequency of oscillator, C(t 0). Time of the computer click implemented based on a hardware oscillator Computer clock is an approximation of a real time t ¨ C(t)=a*t+b n n n Perfect clock ¨ ¨ C(t) a is a clock drift (rate) B is an offset of the clock Rate = 1 Offset = 0 b C(t) a t
Definition of time synchronization n Let C(t) be a perfect clock ¨A clock Ci(t) is called correct at time t n ¨A If Ci(t)=C(t) clock Ct(t) is called accurate at time t n If d. Ci(t)/dt = d. C(t)/dt = 1 ¨ Two n n clocks Ci(t) and Ck(t) are synchronized at time t if Ci(t)=Ck(t) Time synchronization ¨ Requires knowing both offset and drift
NTP Overview n Most widely used time synchronization protocol ¨ Hierarchical: n Perfectly acceptable for most cases. ¨ Coarse n C/S model grain synchronization Inefficient when fine grain synchronization is required
Why not Use NTP n Link Ratio of packet loss is very low in Internet (fiber, cable) ¨ Links are short range and short lived in sensor networks (wireless) ¨ n Topology ¨ n Static, robust and configurable Energy aware Frequent message exchange ¨ Listening to the network is free ¨ Using the CPU in moderation free ¨
Difficulties in Sensor Networks n No periodic message exchange is guaranteed ¨ There n Transmission delay between two nodes is hard to estimate ¨ The n may be no links between two nodes at all link distance changes all the time Energy is very limited ¨ Nodes n sleep most of the time to conserve power Node need to be small and cheap ¨ No expensive clock circuitry
Basic Approach n Collaboration among sensor nodes ¨ Establish pair-wise relationship between nodes. ¨ Extend this to network level. n Two approaches for collaboration ¨ Receiver-Receiver ¨ Sender-Receiver
SR vs. RR A n A B Beacon B A Sources of error-variation of packet delays and clock drifts B
Basic Mechanism n n n Pair-wise synchronization T 2=T 1+delay+offset A distance B T 1 T 2 T 3 T 4=T 3+delay-offset T 4 n n offset=((T 2 -T 1)-(T 4 -T 3))/2 delay=((T 2 -T 1)+(T 4 -T 3))/2 hi hj
Sources of Errors n Send time ¨ ¨ ¨ n Kernel processing Context switches Interrupt processing Access time ¨ Specific to MAC protocol n n n Transmission time Propagation time ¨ n n e. g. in Ethernet, sender must wait for clear channel Very small in WSNs, can be ommited Reception time Receive time
Illustration Sender Receive time Send time NIC Acess time Transmission time Propagation time NIC Reception time Physical Media
Typical Schemes and Algorithms n n n n RBS (Reference Broadcast Synchronization) TPSN (Timing-Sync Protocol for Sensor Networs) DTMS (Delay Measurement Time Synchronization) LTS (Lightweight Time Synchronization) FTSP (Flooding Time Synchronization Protocol) TS/MS (Tiny-Sync and Miny-Sync) TSync AD (Asynchonous Diffusion)
TPSN n Features ¨ Sender-receiver bidirectional mechanism ¨ Two phases of operation: n Level discovery and synchronization ¨ Level discovery phase n Root node initiates level discovery n A node on receiving its level broadcasts it n Any node receiving multiple level packets takes the first one and ignores the others n Any node not receiving a level packet times out and sends a request for level packet
Level Discovery Phase 2 1 K B 0 1 A H 1 2 F C 1 2 E L 3 2 2 I G D 3 J
TPSN n Synchronization phase ¨ Root node sends a start synchronization packet ¨ All nodes of level 1 synchronize themselves to the root node ¨ For every level i, the nodes of that level synchronize to the nodes of level i-1 ¨ If a node in level i-1 is not synchronized, then it does not respond to synchronization requests from level i
Time Synchronization Algorithm K B 0 1 A H 1 2 F C 1 2 E L 3 2 2 I G D 3 J
LTS n Features ¨ Minimize synchronization complexity rather than maximizing accuracy n Authors claim that wireless sensor networks need quite low synchronization accuracy ¨ Sender-receiver bidirectional ¨ Two LTS algorithms n Centralized ¨ n mechanism Node sends a synchronization request to a closest reference node by any routing mechanism Distributed ¨ Requires a spanning tree to be constructed firstly
LTS n LTS optimizes synchronization frequency with required precision ¨ n The synchronization frequency is calculated from the requested precision, from the depth of the spanning tree, from the drift bound Simulation results ¨ ¨ 500 nodes (120 x 120) Target precision: 0. 5 Duration: 10 hrs Centralized: 65% of all nodes request synchronization n ¨ 4 -5 synchronization operation on average per node Distributed: n Average 26 pair-wise synchronization per node
TS/MS n Features Determining relative offset and drift between two nodes ¨ Sender-receiver bidirectional scheme ¨ n n n ¨ Two clocks c 1(t) and c 2(t) are linearly related as n ¨ Node 1 sends a probe message to node 2 time-stamped with t 0 Node 2 generates timestamp tb and responds immediately Node 1 generates timestamp tr C 1(t)=a 12 C 2(t)+b 12 The following inequalities are held: n t 0<a 12 tb+b 12<tr
TS/MS C 1(t) = a 12 H 2(t) + b 12 C 1(t) Sample 3 tr t 0 Sample 1 b 12 Node 1 t 0 a 12 Node 2 tb tr tb C 2 (t)
Parameter Estimation n Relative drift a 12 and offset b 12 n The tighter the bound, the higher the synchronization precision Requires high amount of data points and quite complex Algorithms precision increases with the increased number of data points. n n
Difference Between TS and MS n Different methods in selecting useful data points ¨ Tiny-Sync n Keep only four constrains of all data points n Does nor always give the best solution for the bounds ¨ Mini-Sync is an extension of Tiny-Sync n More optimal solution with increased complexity n Keeps also the data points which may be useful by some future data points to give tighter bounds n A data point is discarded only if it is definitely useless n Quite complex selection criterion.
Reference n n n Elson, Girod, Estrin, “Fine-Grained Network Time Synchronization using Reference Broadcasts” Sichitiu, Veerarittiphan, “Simple, Accurate Time Synchronization for Wireless Sensor Networks” Ganeriwal, Kumar, Srivastava, “Timing-Sync Protocol for Sensor Networks” Genunen, Rabaey, “Lightweight Time Synchronization for Wireless Sensor Networks” Li, Rus, “Global Clock Synchronization in Sensor Networks” Dai, Han, “TSync: A Lightweight Bidirectional Time Synchronization Service for Wireless Sensor Networks”
Thank you
- Fast clock to slow clock synchronization
- Taoufik nouri
- Clock synchronization in distributed system
- External clock synchronization
- Mostafa abdallah
- Mostafa firoz
- How to learn written english by mostafa kamal
- Joseph wei
- Smart sensor networks using bluetooth
- Wireless sensor networks for habitat monitoring
- Single node architecture in wireless sensor networks
- Alan mainwaring
- Bluetooth based smart sensor networks
- 60 minutes make an hour
- Backbone networks in computer networks
- A switch in a datagram network uses a
- Sandwich in a sentence
- Dining philosophers problem using monitors java
- Cs 4414 cornell
- Linux kernel synchronization
- Process synchronization means
- Basic synchronization principles
- Multiprocessor synchronization
- Deming chain reaction
- Synchronization primitives c#
- Classic problems of synchronization
- High level synchronization construct
- Multiprocessor synchronization
- Linux synchronization primitives
- Laser synchronization
- Windchill workspace synchronization
- What is lean synchronization