Time, Synchrnizatin, and Wireless Sensr Netwrks Part II Ted Herman University f Iwa Ted Herman/March 2005 1
Presentatin: Part II metrics and techniques single-hp beacns reginal time znes ruting-structure and leader clck unifrm cnvergence cnclusin Ted Herman/March 2005 2
Multihp Synchrnizatin wireless sensr netwrks are multihp (smetimes ad hc) netwrks measures f quality f synchrnizatin: δ-difference between neighbring clcks -difference between basestatin and any clck δ-difference alng any path in ruting tree basestatin δ δ δ? δ Ted Herman/March 2005 3
Synchrnizatin Techniques 1. use GPS r radi beacn requires special hardware, extra cst = δ 2. use nly reginal time znes cmplicated time zne cnversin gateways 3. use ruting structure and leader clck = (distance) x δ building, maintaining ruting structure fault tlerance issues 4. use unifrm cnvergence t maximal clcks similar metrics t ruting structure, but different fault tlerance prperties 5. ther: bilgically-inspired methds, phase waves, time-flw algrithms (nt yet practical) Ted Herman/March 2005 4
Hw t Evaluate in Practice? can use GPS fr independent evaluatin useful t evaluate skew, nt s useful fr fast evaluatin f ffset synchrnizatin self-sampling: ndes calculate difference between clck and time in a timesync message large difference lack f synchrny prbes: single-hp bradcast, timestamped by all wh receive, then transmit recrded timestamps and bserve differences in the timestamps 1st: prbe bradcast 2nd: send timestamp messages 3rd: cmpare timestamps t infer difference in lcal clcks Ted Herman/March 2005 5
Presentatin: Part II metrics and techniques single-hp beacns reginal time znes ruting-structure and leader clck unifrm cnvergence cnclusin Ted Herman/March 2005 6
Single-Hp Beacn excellent perfrmance single pint f failure cncerns f pwer, legality, stealth, assurance practical fr pen area, limited scale special hardware: tall antenna, strng signal basically using standard sensr hardware Ted Herman/March 2005 7
Presentatin: Part II metrics and techniques single-hp beacns reginal time znes ruting-structure and leader clck unifrm cnvergence cnclusin Ted Herman/March 2005 8
Reginal Time Znes prpsed fr RBS (Reference Bradcast Synchrnizatin [Elsn, 2003]) use nly reginal time znes cnversin adds cmplexity --- but useful if timesync nt needed everywhere 1 A 2 5 B 6 1 2 5 6 3 4 C 7 3 4 7 8 9 8 9 10 D 11 10 11 Ted Herman/March 2005 9
RBS Statistics multiple reference beacns, receiver-receiver synchrnizatin frms distributin f nise Ted Herman/March 2005 10
Nise Filtering eliminatin f nise by knwledge f distributin & errr-minimizing hyptheses Ted Herman/March 2005 11
RBS Statistical Technique linear regressin used t btain best ffset utlier remval wuld imprve results linear regressin als useful t crrect skew Ted Herman/March 2005 12
Multihp RBS results sme results after cnversin ver multiple regins 7 6 Errr (usec) 5 4 3 2 Std Dev Errr 1 0 1 Hp 2 Hp 3 Hp 4 Hp better than wrst case sme errrs psitive, sme errrs negative, s sme errrs cancel Ted Herman/March 2005 13
Presentatin: Part II metrics and techniques single-hp beacns reginal time znes ruting-structure and leader clck unifrm cnvergence cnclusin Ted Herman/March 2005 14
Rted Spanning Tree ppular ruting structure basestatin at rt selectin f links in tree based n Quality metrics ther ruting types: fat tree, mesh, gegraphic Ted Herman/March 2005 15
Leader Clck at Rt everyne fllw parent in tree peridic timesync message t neighbrs cllect many samples frm parent (ignre thers) use linear regressin t fllw parent ffset & skew Ted Herman/March 2005 16
Leader Failure leader desn t need t be basestatin if leader fails, recvery phase elects new leader leader electin: leader is sensr nde having smallest Id, parent is clsest nde t leader what happens when a nde r link fails? much like ruting table recvery, lk fr new path t leader, eventually reach threshld timeut and then elect a new leader n leader Ted Herman/March 2005 17
Evaluatin f Leader Tree generally excellent synchrnizatin hwever, strange cases can lead t δ lw verhead, simple implementatin rapid set-up fr n-demand synchrnizatin (if we use basestatin as rt) suited t sensr netwrks where links are stable & failures are infrequent des nt handle sensr mbility Ted Herman/March 2005 18
Presentatin: Part II metrics and techniques single-hp beacns reginal time znes ruting-structure and leader clck unifrm cnvergence unifrm cnvergence cnclusin Ted Herman/March 2005 19
Unifrm Cnvergence basic idea: instead f a leader nde, have all ndes fllw a leader value leader clck culd be ne with largest value leader clck culd be ne with smallest value leader value culd be mean, median, etc lcal cnvergence glbal cnvergence send peridic timesync messages, use easy algrithm t adjust ffset if (received_time > lcal_clck) lcal_clck = received_time Ted Herman/March 2005 20
Unifrm Cnvergence Advantages fault tlerance is autmatic each nde takes input frm all neighbrs mbility f sensr ndes is n prblem extremely simple implementatin self-stabilizing frm all pssible states and system cnfiguratins, partitins & rejins was useful in practice fr Line in the Sand demnstratin Ted Herman/March 2005 21
Unifrm Cnvergence Challenges even ne failure can cntaminate entire netwrk (when failure intrduces new, larger clck value) mre difficult t crrect skew than fr tree hw t integrate GPS r ther timesurce? we can use a hierarchy f clcks fr applicatin what des largest clck mean when clck reaches maximum value and rlls ver? rare ccurrence, but happens smeday transient failures culd cause rllver sner Ted Herman/March 2005 22
Preventing Cntaminatin algrithm: build picture f neighbrhd nde p cllects timesync messages frm all neighbrs are they all reasnably clse? yes adjust lcal clck t maximum value n cases t cnsider: mre than ne utlier n cnsensus, adjust t maximum value nly ne utlier frm cnsensus clck range if p is utlier, then p rebts its clck if ther neighbr is utlier, ignre that neighbr handles single-fault cases nly Ted Herman/March 2005 23
Special Case: restarting nde algrithm: again, build picture f neighbrhd nde p jining netwrk r rebting clck lk fr nrmal neighbrs t trust nrmal neighbrs cpy maximum f nrmal neighbrs n nrmal neighbrs adjust lcal clck t maximum value frm any neighbr (including restarting nes) after adjusting t maximum, nde becmes nrmal Ted Herman/March 2005 24
Clck Rllver p s clck advances frm 2 32-1 back t zer q (neighbr f p) has clck value 2 32-35 questin: what shuld q think f p s clck? prpsal: use (<,max) cyclic rdering arund dmain f values [0,2 32-1] < a < h b < c < d < e < f < g < Ted Herman/March 2005 25
Bad Case fr Cyclic Ordering netwrk is in ring tplgy values (w,x,y,z) are abut ¼ f 2 32 apart in dmain f clck values in rdering cycle maybe, each nde fllws larger value f neighbr in parallel never synchrnizing! y a slutin t this prblem x z reset t zer when neighbr clcks are t far apart, use special rule after reset w Ted Herman/March 2005 26
Presentatin: Part II metrics and techniques single-hp beacns reginal time znes ruting-structure and leader clck unifrm cnvergence cnclusin Ted Herman/March 2005 27
Cnclusin Part I we saw hw time sync has different needs & pprtunities in wireless sensr netwrks than fr traditinal LAN/WAN/Internet prpagatin delay ften insignificant special techniques t deal with radi/mac/system delays Ted Herman/March 2005 28
Cnclusin Part II sme quite varied alternatives fr hw t synchrnize in multihp netwrks single-hp beacn (like GPS) gd fr sme situatins time sync strategies can be similar t ruting prtcl structures (trees, znes) time sync is a lcal prperty, s ntins like unifrm cnvergence may be useful Ted Herman/March 2005 29
Cnclusin Sme Open Prblems hw t chse a timesync algrithm based n applicatin requirements? hw t cnserve energy in timesync? are there special needs fr crdinated actuatin, lng-term sleeping, sentries, and lw duty cycles? what kind f tls are helpful t use cmplicated timesync ideas, but make applicatin design simple? Ted Herman/March 2005 30