Johnson Department of Computer Science Rice University Houston Texas Abstract Recent advances in technology have made low cost low power wireless sensors a reality Clock synchronization is an important service in any distributed system including sen ID: 22901
Download Pdf The PPT/PDF document "Probabilistic Clock Synchronization Serv..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
NTP[10]isscalable,robusttofailures,self-conÞguring,andhasvariouspropertiesthatareneededinthesensornetworkworld.However,wirelesssensornetworksposeanumberofchallengesbeyondtraditionalnetworksystems.ElsonandRomer[4]describethedifferencesquiteexhaustively.Wereiteratethesedifferences,astheyareimportantfromthedesignpointofview:EnergyConstraint:EnergyefÞciencyisveryimportantforsensornetworksasopposedtotraditionalnet-works.Thebasicassumptionsofthenodeshavingsteadypowersupply,listeningtonetworkforfree,andnetworktransmissionsbeinginexpensive,donotholdforsensornetworks.Inwirelessnetworks,listeningtothenetworkinterfaceandsendingpacketstakesigniÞcantenergy.Also,theCPUispowereddowninsensornet-worksformuchofthetime,breakingthetraditionalassumptionoftheavailabilityofCPUwhenevernecessary.Synchronizationisnotrequiredtobemaintainedatalltimes,butonlywhenrequiredbytheapplication.Hence,todotraditionalsynchronizationinasensornetworkwouldrequiretheCPUandnetworkinterfacetobepoweredupforsigniÞcantamountsoftime,therebyhavingalargeresourceoverhead.TunableAccuracy:Traditionalsynchronizationprotocolstrytoachievethehighestdegreeofaccuracypos-sible.Thehigherthelevelofaccuracyrequired,thehighertheresourcerequirement.Theaccuracyofsyn-chronizationrequireddependsontheapplicationrequirement.Usingresourcesforhighaccuracyevenifloweraccuracyisenoughfortheapplicationwastesthelimitedresourcesofsensornetworks.Therefore,thereisaneedforatrade-offbetweenresourcerequirementsandaccuracy,dependingontheneedoftheapplicationandresourceavailabilityofthesystem.Non-determinism:Sensornetworksaredynamicsystemswithconsiderablyhigherrateoffailuresoftheindividualnodesthanintraditionnetworks.Thenodescanalsobemobile.Thisgivesrisetoagreaternon-determinismforcommunicationdelaysthanthatpresentintraditionalnetworks.Typically,NTPhastheneedforsomemanualconÞgurationofpeersandupstreamnodes.Hence,thesynchronizationprotocolneedstobemorerobusttofailuresandalsotothegreatervariabilityincommunicationdelay.Multihop:MostofthetypicalsynchronizationprotocolshaveahighlyaccurateclockpresentintheLAN,suchthatallthenodesinthesystemcandirectlyexchangemessages.Sensornetworksspanmanyhops,withhigherjitter.Hence,algorithmsforsensornetworkclocksynchronizationneedtohavesomesortoflocalizationtoreducethiserror,aswellassomeothermeansofachievingmultihopsynchronizationeveninthepresenceofhighjitter.Server-less:TraditionalprotocolshavespeciÞedservers,withmultipleaccuracylevelswhicharesourcesofaccuratetime.Sensornetworksdonothaveanyexternalinfrastructurepresentandcanbelargeinscale.Maintainingglobaltimescaleinthisnetworkisthusharder,ifnoexternalbroadcastsourceofglobaltimesuchasGPSispresent.Elsonetal.[4]proposethateachnodemaintainanundisciplinedclock,augmentedwiththerelativefrequencyandphaseinformationofitsneighbors.Wealsousethisapproachinourwork. SendTime:Thetimespentatthesendertobuildthemessage.Thistimeincludesthetimeforkernelprocessing,contextswitches,andsystemcalloverheadincurredbythesynchronizationapplicationandishencehighlyvariabledependingonthecurrentsystemload.AccessTime:Thisisthedelayincurredwhenwaitinginthenetworkinterfaceforaccesstothetransmissionchannel.ThistimedependsontheMACprotocolinuseanditsmethodstohandlecongestion.TypicalwirelessMACprotocolslikeIEEE802.11[6]networksexchangeRTS/CTSbeforetheactualexchangeofthemessage.Dependingonthecongestioninthenetwork,thiswaitingtimeisthemostsigniÞcantintermsofthetotaldelaylatency.PropagationTime:Thisisthetimeneededforthemessagetopropagatefromsendertoreceiveroverthewirelessmedium.Ifthesenderandreceiverareinthesamebroadcastregion,thistimeistypicallyverysmall.Thistimecanbeapproximatelycalculatedbydividingthedistancebetweenthesenderandreceiverbythespeedoflight.Thistimeisnegligiblecomparedtotheotherdelays.ReceiveTime:ThisisthetimeneededforprocessingatthereceiverÕsnetworkinterface.ItdenotesthetimedifferencebetweentheactualreceptionofthepacketandactuallyinformingtheapplicationofthepacketÕsarrival,allowingtheapplicationtoprocessthepacket.Ifthetime-stampofreceptioncanbedoneatasuitablelowlevel,thisdelaycanbemadeverysmall,andmoreimportantly,deterministic.Mostclocksynchronizationalgorithmsgotogreatlengthstoreducetheabovenon-determinisminmessagedeliv-ery.AsigniÞcantlydifferentapproachhasbeentakenintheCesiumSpraysystem[13].CesiumSpraytakesadvantageoftheinherentbroadcastnatureofthewirelessmedium.TheSendTimeandAccessTimeareunknownandhighlyvariable.However,forasetofreceiverslisteningtoacommonsender,thosetimesareidenticalforallofthereceivers.TheonlyvariabletimeisthePropagationTimeandReceiveTime,whicharemuchsmallerinvalue.Thisapproachentailssynchronizingasetofreceiverswitheachother,incontrasttosynchronizingwiththesender.WeusethisideatoreducesigniÞcantlythesourcesoferrorinourclocksynchronizationprotocol.D.ModelsofClockSynchronizationTherearemanydifferenttypesofclocksynchronization.Eachtypehasitsusage.Theyareasfollows:Globalclock:Thereisapreciseglobaltime,UTC,whichismaintainedbyatomicclocksinstandardlabo-ratories.Traditionalinternetclocksynchronizationalgorithmstrytomaintainthisglobaltimeinallcomputersystems.MaintainingthistimeinsensornetworksissigniÞcantlyharder.Sensornetworksalsodonottypicallyneedthisstrictclocksynchronization.Inthispaper,wecanprovidethisservicewithacertaindegradedaccuracyifaGPSisavailable.But,maintainingthistimeisnotthethrustofthiswork.Relativeclock:Thisistherelativenotionoftimewithinthesensornetwork.EachnodeeachsynchronizedwitheveryothernodewithatimewhichmightbetotallydifferentfromUTC.ThissufÞcesformostoftheapplicationsofclocksynchronizationthatwehavedescribedearlier.Inthiswork,weprovidethissynchronizationwithanaccuracywhichisboundedwithatunableconÞdenceprobability. leavesinthetree.TheseprotocolscannotbeapplieddirectlytosensornetworksbecauseofthedifferencespointedoutinSectionII-A.B.WirelessClockSynchronizationProtocolsTherehavebeenafewsynchronizationprotocolswhicharespeciÞcallyforwirelessoradhocnetworks.Romer[11]proposedaschemeforsparseadhocnetworks.Thealgorithmdoesnotsynchronizethecomputerclocksofthenodes,butgeneratetime-stampsusingwhichtheunsynchronizedclockstransformthemessagetime-stamp.Asamessagemovesfromhoptohop,eachnodetransformsthemessagetimestamptoitÕslocaltime-stampwithsomeintroducederror.Thiserrorincreaseswiththenumberofhops.Also,theprotocolusesroundtripdelays,thecalculationofwhichwillhavethetypicalerrorsassociatedwithestimatingroundtriptime.Huangetal.[5]showedthatthe802.11MACtimesynchronizationprotocolisnotscalableforlargenumberofnodes.TheyproposedasimplemodiÞcationtotheMACprotocolwhichmaintainssynchronizationamongnodesinasinglebroadcastregion.C.Receiver-ReceiverSynchronizationAcoupleofpreviousworksuseacompletelydifferentapproachthanthetraditionalapproaches.Theysynchronizeasetofreceiversamongstthemselves.Thisreducesmuchofthemessagedeliverylatencynon-determinismassociatedwithtraditionalprotocols.CesiumSpray[13]wastheÞrstworktousethisidea.Itisahybridexternal/internalsynchronizationprotocol.Itusesatwo-levelhierarchytoimprovescalability.ReferenceBroadcastSynchronization(RBS)[3]istheworkonwhichourpaperisbased.Least-squareslinearregressionisusedtoÞndtherelativefrequencyoftheclocks.RBSusespost-factosynchronizationtosynchronizetwonodesclocksbyextrapolatingbackwardstoestimatethephaseoffsetatanyprevioustime.Itextendstheworktodomultihopclocksynchronization.Ourpaperisessentiallysimilartothisworkintermsofprotocolinthesingle-hopcase,otherthansomeminorimprovements.However,theirpaperdoesnotcontainanyanalysisonthenumberofreferencebroadcastsnecessary,orthefre-quencyofreferencebroadcasts.Weanalysetheseissuesandprovideaprobabilisticboundonthemaximumerror.Wealsorelatethisprobabilitywiththenumberofreferencebroadcastsrequired.RBSalsohasmoreoverheadintermsofexchanginginformationbetweenthereceivers.Itassumesasinglebroadcastregionforthesenderandallthereceivers,whichisnotthecase.Tworeceivers,lyinginthebroadcastrangeofasender,mightnotbeabletoexchangemessagessincetheymightbeourofrangeofeachother.Formultihopsynchronization,unlikeRBS,ourprotocoldoesnotrequireallsensornodestobewithinonehopofatleastonesender.D.ProbabilisticClockSynchronizationThereareafewsynchronizationprotocolswhichareprobabilisticinnature.Theclockskewthataprobabilisticprotocolguaranteeshasaprobabilityofinvalidityassociatedwiththeguarantee.However,theprobabilityofinvaliditycanbebounded.Alltheprobabilisticalgorithmsproposedareforserver-clientarchitecture,wheretheclientstrytosynchronizewiththeclockoftheserver.Thisisfundamentallydifferentfromourapproachwherewesynchronize 9 ReceiverTimeReceiverReceiver NICNIC Fig.1.TypesofClockSynchronization[3]:Sender-ReceiverSynchronizationandReceiver-ReceiverSynchronizationeachotherthetimeofreceptionofthereferencepulse.Sinceeachreceiverassumesthatthepulseshouldhavebeenreceivedbyallotherreceiversatapproximatelythesamerealtime,areceiverisabletoestimatetheoffsetofitsclockwithrespecttoanotherreceiverwhichhasexchangedinformationwith.Thenumberofreferencepacketscanbeincreasedinordertogetbettersynchronization.Elsonetal.[3]havefoundthedistributionofthesynchronizationerroramongareceiverset.Multiplepulsesaresentfromthesendertothesetofreceivers.Thedifferenceinactualreceptiontimeatthereceiversisplotted.Aseachofthesepulsesareindependentlydistributed,thedifferenceinreceptiontimesgivesaGaussian(ornormal)distributionwithzeromean.InthisÞgure,wouldbetheanypointinthex-axis,withthepdfofthedistributiongivenbythecorrespondingy-value.Theprobabilityofbeing0ismaximum,itbeingthemean.Theprobabilityfallsexponentiallyasthevalueofincreases.GivenaGaussianprobabilitydistributionforthesynchronizationerror,wecaneasilycalculatetherelationbetweenagivenmaximumerrorinsynchronizationandprobabilityofactuallysynchronizingwithanerrorlessthanthemax-imumerror.Ifthemaximumerrorthatweallowbetweentwosynchronizingnodesis,thentheprobabilityofsynchronizingwithanerrorisgivenfromGaussiandistributionproperty. 2 So,asthelimitisincreased,theprobabilityoffailuredecreasesexponentially.Weusethisobservationintheanalysisbelow.B.DescriptionoftheProtocolInthissection,wepresentourprotocol,extendingthedeterministicRBSprotocoltoprovideprobabilisticclocksynchronization.TheframeworksforprovidingexternalsynchronizationwithUTCandforprovidingrelativesyn-chronizationamongthenodesaredifferent.Inthispaper,weconcentrateonprovidingrelativesynchronization,asitoftenissufÞcientformostsensornetworkapplications.Forexternalsynchronization,weassumetheavailabilityofGPSinasubsetofthenodes.Thesenodeswillbesendersofsynchronizationmessages.ThesensornodeswillsynchronizewiththeseGPSreceiversusinganyof C.MathematicalAnalysisTheprecedingsectionshowshowouralgorithmkeepstheclocksofsensornodessynchronized.Inthissectionwewillanalysetheprobabilisticguaranteeofachievingthedesiredsynchronizationskew.Wewillderivehowtocon-verttheservicespeciÞcations(maximumclocksynchronizationerrorandconÞdenceprobability)toactualprotocolparameters(minimumnumberofmessagesandsynchronizationinterval).Synchronizationoverhead:Theerroramongthereceiversisanormaldistribution,asdescribedinSectionIV-A.Normaldistributionmakesitmucheasiertostudyadistributionstatistically.Thefollowingtheoremgivesare-lationbetweenthesynchronizationerroranditsassociatedprobability,withthemessageoverhead.Forsynchronizationpulsesfromthesender,thereceiversexchangetheirobservationsviathesender.Asexplainedearlier,theslopeoftheskewbetweenthereceiversisfoundbyaleastsquarelinearestimationusingthedatapoints.Thecalculatedslopeoftheskewhasanassociatederrorinit.Thiserroristhedifferenceinphasebetweenthecalculatedslopeandtheactualslope.AsthepointshaveaGaussiandistribution,thiserrorcanbecalculated.Asthenumberofdatasamples,,increases,thiserrorreduces.Toprovethetheorem,thefollowinglemmaswillbeused.InLemma1,itisprovedthatthecharacteristicfunctionofthesumofindependentrandomvariablesisaproductofthecharacteristicfunctionofeachrandomvariable.Lemma1:denotingpdfÕsof,andrespectively,areindependentrandomvariables.Then,)=Extendingtheresultbyinduction,)=InLemma2,thecharacteristicfunctionofthesumofindependentrandomvariablesisderived,iftherandomvariableÕsareGaussiandistributions.ThisderivationusesLemma1.Lemma2:ThecharacteristicfunctionofthesummationofGaussiandistributionsis: Proof:Giventhat, n=X1 n+X2 n+Xn n synchronizationisdone.Theorem1:)=2erf whereistheclockskewatsynchronization,isthemaximumspeciÞedclockskewatsynchronizationpoint,istheminimumnumberofsynchronizationmessagestoguaranteethespeciÞederror,andisthevariationofthedistribution.Proof:ForaGaussiandistributionµ,,thepdf, 2[xµ ]2 Hence,fortheGaussiandistributionof 2xµ n2 2( Theprobabilitythattheerror,lieswithinisgivenby: n)2 2( Putting ne 22 2=2 0e 2 [Putting ]=2 0ez2 2 [Putting erf n [Where,erf 2 Synchronizationinterval:TheprevioustheoremspeciÞedtheminimumsynchronizationerror,giventhenum-berofmessages.Thatwastheerrorinsynchronizationpreciselywhensynchronizationfordone.Inthenexttheorem,therelationbetweenthesynchronizationperiodandthemaximumspeciÞedclockskewisshown.Givenamaximumvalueforclockskew,atimeperiodisderivedwithinwhichre-synchronizationhastobedone.Theorem2:syncwhereisthemaximumallowablesynchronizationatanypointintime,syncisthetimeperiodbetweensynchronizationpointsfortheAlwaysOnmodel(timeperiodofvalidityforSensorInitiatedmodel),isthe 15 Probability Numberofmessages TABLEIARIATIONINPROBABILITYANDNUMBEROFMESSAGESFORDIFFERENTVALUESOF 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 5 10 15 20 25 30 35 40 Probability number of messages Fig.3.Probabilityofachievederrorbeinglessthanamaximum .ThisproportionalitysuggeststhatoncethehasbeenspeciÞed,thenumberofmessagesrequiredisverysensitivetothestandarddeviation.FromTableI,itisclearthatforlowervaluesfortheratioof thenumberofmessagesrequiredgetsquitelarge.Forexample,toachieveaprobabilityof0.99%with ,thealgorithmrequires7messageswhereasfor ,thealgorithmrequiresonly2messages. inFigure4,willexistinthebroadcastregionoftwosenders;thetwosendersmightbeatatthesamelevelortheymightbeseparatedbyasinglelevel.NowsinceR3issynchronizedwithR4R3cantransformthetimereportedbyR6.FinallysinceR3issynchronizedwithR4,R4cantransformthetimereportedbyR3.Hence,allalongtheroutingpathofthemessagesuitabletimetransformationscanbeperformed.However,fromthedescriptionoftheprotocolitseemsthattheprotocolwillhaveaveryhighoverheadsincetheprotocolessentiallyßoodstheentirenetworkwithreferencepackets.ThiscanbeeasilyÞxedbycausingtimesynchronizationtobesensorinitiatedsothatasender(atanylevel)broadcastsreferencepacketsonlyifthesenderreceivesarequestforsynchronizationfromasensornodeinthelocalbroadcastregionofthesender.Thisensuresthatanodedoesnotbroadcastreferencepacketsifthereisnosensornodeinitslocalbroadcastregionthatcanlistentothereferencepackets.B.MathematicalAnalysisThemathematicalanalysisofthisprotocolissimilartothemathematicalanalysispresentedinSectionIV-C.Ifisthemaximumerrorbetweentworeceiverspresentinthebroadcastregionofasenderthenthemaximumerrorpossiblebetweentwosensornodeswhicharehopsapartis.Thiscanbeprovedasfollows:Weshallprovebymathematicalinductiononthenumberoftimetransformsperformedonanactualreportedtime.BaseCase:IfthereisasingletimetransformperformedonthemessagethenbytheanalysisofSectionIV-Cthemaximumerrorpossiblebetweentheactualtimereportedandthetransformedtimeis.Thus,iftheactualtimeisthenthereportedtimewilllieintheinterval + InductionHypothesis:timetransformationsontheactualreportedtime,thetransformedtimecanlieintheinterval +k· sincebyinductionhypothesisthemaximumerroraftertimetransformationsSupposeweperformonemoretimetransformonthetime +k· .Thenthetransformedtimewilllieintheinterval +k· + +1) +1) Thus,theerroris+1) +1).Thisprovesourinductionhypothesis.Moreover,ifistheprobabilitythatthemaximumerrorbetweentworeceiverswithinbroadcastregionofasender,thenistheprobabilitythatisthemaximumerrorbetweentworeceiverswhicharehopsapart.Since,thelargerthenumberoftimetransformations,thelessertheprobabilityofstayingwithinanerrorbound.However,ifweconsidertheaverageerroroverasinglehoptobeerravg thentheaverageerroroverhopswillbeerravg (sincevarianceisadditive).Thisimpliesthattheerrorpropagationissublinear.VII.CONCLUSIONInthispaper,wehavepresentedandanalyzedaprobabilisticserviceforclocksynchronizationinsensornetworks.ThisprotocolisbasedontheearlierdeterministicRBSprotocol[3].TheRBSprotocolusestheconceptofreceiver- ProbabilisticClockSynchronizationServiceinSensorNetworksSantashilPalChaudhuri,AmitSaha,andDavidB.JohnsonDepartmentofComputerScience,RiceUniversityHouston,TexasAbstractRecentadvancesintechnologyhavemadelowcost,lowpowerwirelesssensorsareality.Clocksynchronizationisanimportantserviceinanydistributedsystem,including