ted herman/march 20051 time, synchronization, and wireless sensor networks part ii ted herman...

30
Ted Herman/March 2005 1 Time, Synchronization, Time, Synchronization, and Wireless Sensor and Wireless Sensor Networks Networks Part II Part II Ted Herman University of Iowa

Upload: edwin-sharp

Post on 22-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 1

Time, Synchronization, Time, Synchronization, and Wireless Sensor Networksand Wireless Sensor Networks

Part IIPart II

Time, Synchronization, Time, Synchronization, and Wireless Sensor Networksand Wireless Sensor Networks

Part IIPart II

Ted HermanUniversity of Iowa

Page 2: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 2

Presentation: Part II

metrics and techniquesmetrics and techniquessingle-hop beaconsregional time zonesrouting-structure and leader clockuniform convergenceconclusion

Page 3: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 3

Multihop Synchronizationo wireless sensor networks are multihop

(sometimes ad hoc) networkso measures of quality of synchronization:

-difference between neighboring clocks -difference between basestation and any clock -difference along any path in routing tree

basestation

Page 4: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 4

Synchronization Techniques1. use GPS or radio beacon

requires special hardware, extra cost

2. use only “regional time zones” complicated time zone conversion gateways

3. use routing structure and leader clock = (distance) x building, maintaining routing structure fault tolerance

issues4. use uniform convergence to maximal clocks

similar metrics to routing structure, but different fault tolerance properties

5. other: biologically-inspired methods, phase “waves”, time-flow algorithms (not yet practical)

Page 5: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 5

How to Evaluate in Practice ?o can use GPS for independent evaluation

useful to evaluate skew, not so useful for fast evaluation of offset synchronization

o self-sampling: nodes calculate difference between clock and time in a timesync message large difference lack of synchrony

o probes: single-hop broadcast, timestamped by all who receive, then transmit recorded timestamps and observe differences in the timestamps

1st: probe broadcast

2nd: send timestamp messages

3rd: compare timestamps to infer difference in local clocks

Page 6: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 6

Presentation: Part II

metrics and techniques

single-hop beaconssingle-hop beaconsregional time zonesrouting-structure and leader clockuniform convergenceconclusion

Page 7: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 7

Single-Hop Beacono excellent performanceo single point of failureo concerns of power, legality, stealth, assurance

o practical for open area, limited scaleo special hardware: tall antenna, strong signalo basically using standard sensor hardware

Page 8: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 8

Presentation: Part II

metrics and techniquessingle-hop beacons

regional time zonesregional time zonesrouting-structure and leader clockuniform convergenceconclusion

Page 9: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 9

Regional Time Zoneso proposed for RBS

(Reference Broadcast Synchronization [Elson, 2003])

o use only “regional time zones”o conversion adds complexity --- but useful

if timesync not needed everywhere

1

3

2

A4

8

C

5

7

6B

10

D11

9

1

3

2

4

8

5

7

6

10 11

9

Page 10: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 10

RBS Statisticso multiple reference beacons, receiver-receiver

synchronization forms distribution of noise

Page 11: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 11

Noise Filteringo elimination of noise by knowledge of distribution

& error-minimizing hypotheses

Page 12: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 12

RBS Statistical Techniqueo linear regression used to obtain best offseto outlier removal would improve resultso linear regression also useful to correct skew

Page 13: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 13

Multihop RBS resultso some results after conversion over multiple regions

0

1

2

3

4

5

6

7

1 Hop 2 Hop 3 Hop 4 Hop

Err

or

(use

c)

Std Dev

Error

o better than worst case some errors positive, some errors negative, so some errors cancel

Page 14: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 14

Presentation: Part II

metrics and techniquessingle-hop beaconsregional time zones

routing-structure and leader clockrouting-structure and leader clockuniform convergenceconclusion

Page 15: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 15

Rooted Spanning Treeo popular routing structure

basestation at root selection of links in tree based on Quality metrics

o other routing types: “fat tree”, mesh, geographic

Page 16: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 16

Leader Clock at Rooto everyone follow parent in tree

periodic timesync message to neighbors collect many samples from parent (ignore others) use linear regression to follow parent offset & skew

Page 17: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 17

Leader Failureo leader doesn’t need to be basestation

if leader fails, recovery phase elects new leader

o leader election: leader is sensor node having smallest Id, parent is closest node to leader

o what happens when a node or link fails? much like routing table recovery, look for new path to leader,

eventually reach “threshold timeout” and then elect a new leader

no leader …

Page 18: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 18

Evaluation of Leader Treeo generally excellent synchronization

however, strange cases can lead to

o low overhead, simple implementationo rapid set-up for on-demand synchronization

(if we use basestation as root)

o suited to sensor networks where links are stable & failures are infrequent

o does not handle sensor mobility

Page 19: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 19

Presentation: Part II

metrics and techniquessingle-hop beaconsregional time zonesrouting-structure and leader clock

uniform convergenceuniform convergenceconclusion

Page 20: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 20

Uniform Convergenceo basic idea: instead of a leader node, have

all nodes follow a “leader value” leader clock could be one with largest value leader clock could be one with smallest value leader value could be mean, median, etc

o local convergence global convergenceo send periodic timesync messages, use easy

algorithm to adjust offsetif (received_time > local_clock)

local_clock = received_time

Page 21: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 21

Uniform Convergence Advantageso fault tolerance is automatico each node takes input from all neighborso mobility of sensor nodes is no problemo extremely simple implementationo self-stabilizing from all possible states and

system configurations, partitions & rejoinso was useful in practice for “Line in the Sand”

demonstration

Page 22: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 22

Uniform Convergence Challengeso even one failure can contaminate entire

network (when failure introduces new, larger clock value)

o more difficult to correct skew than for treeo how to integrate GPS or other timesource?

we can use a hierarchy of clocks for application

o what does “largest clock” mean when clock reaches maximum value and rolls over? rare occurrence, but happens someday transient failures could cause rollover sooner …

Page 23: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 23

Preventing Contaminationo algorithm: build picture of neighborhood

o node p collects timesync messages from all neighborso are they all reasonably close?

yes adjust local clock to maximum value no cases to consider:

• more than one outlier no consensus, adjust to maximum value• only one outlier from “consensus clock range”

– if p is outlier, then p “reboots” its clock– if other neighbor is outlier, ignore that neighbor

o handles single-fault cases only

Page 24: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 24

Special Case: restarting nodeo algorithm: again, build picture of neighborhood

o node p joining network or rebooting clocko look for “normal” neighbors to trust

normal neighbors copy maximum of normal neighbors no normal neighbors adjust local clock to maximum

value from any neighbor (including restarting ones) after adjusting to maximum, node becomes “normal”

Page 25: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 25

Clock Rollovero p’s clock advances from 232-1 back to zeroo q (neighbor of p) has clock value 232-35

question: what should q think of p’s clock?

o proposal: use (<,max) cyclic ordering around domain of values [0,232-1]

c<b

ad

h

e

g f

<

< <<

<

<<

Page 26: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 26

Bad Case for Cyclic Orderingo network is in “ring” topologyo values (w,x,y,z) are about ¼ of 232 apart in

domain of clock values in ordering cycleo maybe, each node follows larger value of

neighbor in parallel never synchronizing!

x

w

z

y a solution to this problem

reset to zero when neighbor clocks are too far apart, use special rule after reset

Page 27: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 27

Presentation: Part II

metrics and techniquessingle-hop beaconsregional time zonesrouting-structure and leader clockuniform convergence

conclusionconclusion

Page 28: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 28

Conclusion

o Part I we saw how time sync has different

needs & opportunities in wireless sensor networks than for traditional LAN/WAN/Internet

propagation delay often insignificant special techniques to deal with

radio/MAC/system delays

Page 29: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 29

Conclusion

o Part II some quite varied alternatives for how to

synchronize in multihop networks single-hop beacon (like GPS) good for

some situations time sync strategies can be similar to

routing protocol structures (trees, zones) time sync is a “local” property, so notions

like uniform convergence may be useful

Page 30: Ted Herman/March 20051 Time, Synchronization, and Wireless Sensor Networks Part II Ted Herman University of Iowa

Ted Herman/March 2005 30

Conclusiono Some Open Problems

how to choose a timesync algorithm based on application requirements ?

how to conserve energy in timesync ? are there special needs for coordinated

actuation, long-term sleeping, sentries, and low duty cycles ?

what kind of tools are helpful to use complicated timesync ideas, but make application design simple ?