13.07.2015 Views

Network-level Synchronization in Decentralized Social Ad-Hoc ...

Network-level Synchronization in Decentralized Social Ad-Hoc ...

Network-level Synchronization in Decentralized Social Ad-Hoc ...

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Network</strong>-<strong>level</strong> <strong>Synchronization</strong> <strong>in</strong> <strong>Decentralized</strong> <strong>Social</strong> <strong>Ad</strong>-<strong>Hoc</strong> <strong>Network</strong>sMatthew Dobson, Spyros Voulgaris, Maarten van SteenDept. of Computer ScienceVrije Universiteit Amsterdam, The Netherlands{mc.dobson, spyros, steen}@cs.vu.nlAbstract<strong>Social</strong> ad-hoc networks can be composed of a largenumber of t<strong>in</strong>y, wireless, battery-powered nodes, and exhibitarbitrary mobility. We aim to enable the executionof distributed applications that depend on captur<strong>in</strong>g networkdynamics across large-scale social ad-hoc networks.Conservation of the nodes’ fixed energy budget is thechief concern <strong>in</strong> all design decisions, and necessitatesthat wireless communication is kept to a m<strong>in</strong>imum. Inthis paper we present GMAC 1 : a gossip<strong>in</strong>g TDMA MAClayer created to address these problems. We analyze itsefficiency <strong>in</strong> achiev<strong>in</strong>g and ma<strong>in</strong>ta<strong>in</strong><strong>in</strong>g a tight networklayersynchronization with respect to the active periods ofnode radios.Keywords: ad-hoc wireless networks, TDMA MAClayer, duty cycle synchronizationI. IntroductionAt the <strong>in</strong>tersection of wearable comput<strong>in</strong>g, wirelessad-hoc networks, and social networks, lies an area wehave dubbed social ad-hoc networks. Such networks arecomposed of nodes carried or worn by people, use wirelesscommunication, do not rely on exist<strong>in</strong>g communication<strong>in</strong>frastructures, and are battery powered. Unlike typicalwireless ad-hoc networks, that focus on propagat<strong>in</strong>g collecteddata to a s<strong>in</strong>k, social ad-hoc networks aim atcaptur<strong>in</strong>g network dynamics at regular <strong>in</strong>tervals.A number of applications can benefit from captur<strong>in</strong>gnetwork dynamics. Consider, for <strong>in</strong>stance, a (large) groupof people at a conference or similar social event, eachwear<strong>in</strong>g a small unobtrusive electronic badge with a limitedradio range. By simply measur<strong>in</strong>g how often and for1 GMAC is protected by US Patent Application 12/215,040. GMAC isavailable free of charge for academic use.978-1-4244-9142-1/10/$26.00 c○2010 IEEEhow long two badges are with<strong>in</strong> range of each other, wecan register social <strong>in</strong>teraction and study the structure of thesocial network. Furthermore, by aggregat<strong>in</strong>g and dissem<strong>in</strong>at<strong>in</strong>gdata we can even stimulate social <strong>in</strong>teraction, for<strong>in</strong>stance by a social game where groups of people (e.g.,students of the same department) <strong>in</strong>crease their score bytalk<strong>in</strong>g to members of other groups, and lose po<strong>in</strong>ts whenstick<strong>in</strong>g among themselves. F<strong>in</strong>ally, a family or group offriends attend<strong>in</strong>g a large social event may be <strong>in</strong>formedwhen they come <strong>in</strong> close proximity to each other, help<strong>in</strong>gthem to stay <strong>in</strong> contact. Other applications easily cometo m<strong>in</strong>d, <strong>in</strong>clud<strong>in</strong>g peer-to-peer messag<strong>in</strong>g, f<strong>in</strong>d<strong>in</strong>g peoplewith specific profiles, and crowd management, to name afew.There are three ma<strong>in</strong> challenges at the MAC layer thatmust be overcome <strong>in</strong> order to implement large-scale socialad-hoc network<strong>in</strong>g. The first, and primary concern foralmost any mobile device, is energy consumption. As thesemobile nodes are battery powered, careful and judicioususe of a node’s fixed energy budget is essential. Thesecond problem we face is scalability. We require that ourplatform operates efficiently on a wide variety of networksizes, from a few tens of nodes (e.g., a birthday partyor small restaurant) to thousands of nodes (e.g., a largesport<strong>in</strong>g event or stadium rock concert). Our third majorchallenge is node mobility. In the social sett<strong>in</strong>gs where ourapplications will be execut<strong>in</strong>g people are free to jo<strong>in</strong> andleave the network, and to move anywhere they please (i.e.,make arbitrary changes <strong>in</strong> the network topology). Thesedynamic changes to network topology can wreak havoc onmany algorithms (e.g., rout<strong>in</strong>g and leader election) whichassume stable and symmetric connections between nodes.As part of an overall solution, we propose GMAC: agossip-based MAC protocol, with energy-awareness be<strong>in</strong>ga primary goal. GMAC is designed to run on highlyconstra<strong>in</strong>ed sensor nodes and it therefore has very low process<strong>in</strong>grequirements and a small memory footpr<strong>in</strong>t. Thisserves to reduce energy consumption, but GMAC’s chiefmechanism for energy conservation is duty cycl<strong>in</strong>g. Dutycycl<strong>in</strong>g is a common technique from the area of wireless


Fig. 1. GMAC’s TDMA structuresensor networks where <strong>in</strong>dividual nodes periodically turnon their wireless radio for only a short period of timeto allow for communication. GMAC’s communication isbased on a periodic gossip paradigm, <strong>in</strong> which one periodof gossip-based communication is known as a gossipround. Dur<strong>in</strong>g each gossip round, each node sends oneapplication message and one jo<strong>in</strong> message. Applicationmessages comprise a small GMAC header with synchronizationand strategy <strong>in</strong>formation, and the application data.Jo<strong>in</strong> messages carry debug and/or statistical <strong>in</strong>formationfrom the GMAC core, and are also used to aid networksynchronization.Note that most exist<strong>in</strong>g MAC protocols, focus<strong>in</strong>g onadapt<strong>in</strong>g radios’ duty cycles to variable data propagationneeds, are not appropriate for monitor<strong>in</strong>g network dynamicsat regular <strong>in</strong>tervals. GMAC’s periodic duty cycl<strong>in</strong>gprovides an <strong>in</strong>herent solution to that, provided that nodesare properly synchronized with each other. The synchronizationmechanism, which is what we concentrate on <strong>in</strong>this paper, is the glue that holds the entire network together.Properly synchronized, GMAC’s gossip-based datadissem<strong>in</strong>ation will epidemically spread application messagesthroughout the network. Improperly synchronized,network-<strong>level</strong> packets will collide or go unheard entirely.By extensive simulation, we show that it is feasible forGMAC to dynamically establish and adaptively ma<strong>in</strong>ta<strong>in</strong>a synchronized duty cycle for networks of very largescale, even <strong>in</strong> the presence of drift<strong>in</strong>g clocks and diversetopologies.II. System model / GMAC descriptionGMAC’s core design considerations were predictable(and low) energy consumption and self-adaptability. In orderto accomplish these goals, GMAC comb<strong>in</strong>es network<strong>level</strong>gossip<strong>in</strong>g with a low duty-cycle Time-Division MultipleAccess protocol. TDMA protocols divide time <strong>in</strong>to arepeated series of frames compris<strong>in</strong>g a number of fixedlengthslots, each of duration T slot . They attempt toavoid message collisions by schedul<strong>in</strong>g transmissions <strong>in</strong>unused slots. This schedul<strong>in</strong>g mechanism is known asslot allocation, which GMAC provides <strong>in</strong> the form ofschedul<strong>in</strong>g strategy modules. For the slot allocation tobe effective, nodes must be synchronized. That is, thenodes participat<strong>in</strong>g <strong>in</strong> this protocol must closely align theirslots, m<strong>in</strong>imiz<strong>in</strong>g the offset between all pairs of nodes.To this end, GMAC also supports the use of varioussynchronization modules. GMAC’s TDMA structure isshown <strong>in</strong> Fig. 1.GMAC ma<strong>in</strong>ta<strong>in</strong>s a fixed duty-cycle when <strong>in</strong> a synchronizedstate, and thus constant and predictable energy consumption.At compile-time GMAC computes the largest<strong>in</strong>teger number of TDMA slots that fit with<strong>in</strong> the desiredframe time, Slots frame = ⌊T frame /T slot ⌋. T slot is basedon the transmit time of a fixed-length GMAC packet anda guard time, which is padded to both ends of a s<strong>in</strong>gleTX time to compensate for a possible synchronizationoffset between nodes, as shown <strong>in</strong> Fig. 1. The TX andguard times are measured at the granularity of the node’sunderly<strong>in</strong>g hardware clock tick, T 2 tick , which determ<strong>in</strong>esthe m<strong>in</strong>imum possible synchronization adjustment. Thetransmit time is based on the radio hardware present on anode, specifically the total time for the radio to transitionfrom standby mode to transmit mode (T StandbyT oT X ) andthe time to transmit a s<strong>in</strong>gle packet ( P acketSizeDataRate). Thus,T icks T X = ⌊(T StandbyT oT X + P acketSizeDataRate )/T tick⌋ + 1.The guard time is a compile-time constant, currently setto 300µs, giv<strong>in</strong>g us T icks guard = ⌊300µs/T tick ⌋. Thisyields a f<strong>in</strong>al formula for the length of a TDMA slot:T slot = (T icks T X + 2 × T icks guard ) × T tick . F<strong>in</strong>ally,the GMAC’s duty cycle is Slots active /Slots frame , whereSlots active (the number of active slots <strong>in</strong> a frame) is aGMAC parameter.A. Gossip<strong>in</strong>gGMAC addresses our issues of scalability and mobilityby us<strong>in</strong>g a simple gossip-based communication paradigm[1]. Gossip<strong>in</strong>g has had much success <strong>in</strong> peer-to-peer protocolsfor wired networks, partly due to its scalabilityand robustness <strong>in</strong> the face of network churn (changes <strong>in</strong>network membership or topology). For wireless networks,our basic model is that nodes periodically broadcast messagesconsist<strong>in</strong>g of various news items. Other nodes with<strong>in</strong>transmission range receive these messages and ma<strong>in</strong>ta<strong>in</strong> acache of recently heard news items. Dur<strong>in</strong>g each gossipperiod, or round 3 , a node selects and sends a number of2 In the case of a 32,768Hz clock, T tick = 1s/32, 768 ≃ 30.5µs3 The term round and frame describe the same th<strong>in</strong>g, a s<strong>in</strong>gle periodof GMAC communication. Round is used to refer to gossip, while frameis used at the MAC layer


news items from its cache, possibly <strong>in</strong>clud<strong>in</strong>g a freshlygenerated news item of its own. Similarly, a node thatreceives messages selects a number of news items that itheard dur<strong>in</strong>g the round to store <strong>in</strong> its local cache. Thissimple protocol provides all nodes with an approximationof the true global view of all the news items <strong>in</strong> thenetwork based purely on local data. The accuracy of thisapproximation depends on several factors, <strong>in</strong>clud<strong>in</strong>g theconnectivity of the network, the size of a node’s cache,and the algorithm a node uses to select which news itemsto send or store.<strong>Network</strong>-<strong>level</strong> gossip<strong>in</strong>g does not rely on rout<strong>in</strong>g, nodeIDs, or neighborhood ma<strong>in</strong>tenance. Still, it is highly faulttolerant, an ideal property <strong>in</strong> networks where both wirelessl<strong>in</strong>ks and <strong>in</strong>dividual nodes are unreliable. Such a simplegossip<strong>in</strong>g protocol is sufficient for many ad-hoc network<strong>in</strong>goperations, such as dissem<strong>in</strong>ation, aggregation, andeven ma<strong>in</strong>tenance of rout<strong>in</strong>g tables, as <strong>in</strong> [2], <strong>in</strong> case theyare needed.B. Duty-Cycle <strong>Synchronization</strong>GMAC’s use of duty cycl<strong>in</strong>g makes proper node synchronizationessential. If a node’s frame is not synchronizedwith those of its neighbors, it is very likely that thenode’s broadcasts will go unheard. For example, with atypical duty-cycle of 1.5%, the odds of hav<strong>in</strong>g the activeperiods of unsynchronized nodes overlap is quite low,mean<strong>in</strong>g these nodes will not hear each other’s messages.On the other hand, the better synchronized the nodes are,the more energy we can save. This is because GMACis designed to be pessimistic, and currently uses a guardtime that is quite high, approximately equal to the radio’sTX time. A guard time that is too large will result <strong>in</strong>wasted energy as receivers wait with their radios on fortransmitters to beg<strong>in</strong>. On the other hand, a guard time thatis too short will result <strong>in</strong> <strong>in</strong>creased message collisions,as transmissions from adjacent slots beg<strong>in</strong> to overlap.Shr<strong>in</strong>k<strong>in</strong>g this guard time as much as possible is one ofthe direct benefits of sharp synchronization.Groups of nodes whose active periods overlap are saidto form a synchronized subnetwork, or simply subnetwork.<strong>Synchronization</strong> of all nodes participat<strong>in</strong>g <strong>in</strong> thenetwork then takes two forms: ma<strong>in</strong>ta<strong>in</strong><strong>in</strong>g synchronizedsubnetworks and jo<strong>in</strong><strong>in</strong>g separate subnetworks. Because notwo clocks are exactly identical, GMAC’s synchronizationmodule must ma<strong>in</strong>ta<strong>in</strong> exist<strong>in</strong>g synchronized subnetworksby compensat<strong>in</strong>g for the <strong>in</strong>herent clock drift between anytwo nodes. GMAC operates <strong>in</strong> a completely decentralizedmanner, so there is a chance that nodes will form <strong>in</strong>dependentlysynchronized subnetworks or rema<strong>in</strong> isolated.GMAC’s jo<strong>in</strong> messages are responsible for jo<strong>in</strong><strong>in</strong>g theseisolated nodes and subnetworks together.The goal of the ma<strong>in</strong>tenance portion of GMAC’s synchronizationis to m<strong>in</strong>imize the offset (see Fig. 1), ∆T i,j =T i − T j between all pairs i, j of communicat<strong>in</strong>g nodes.GMAC divides the offset between nodes’ notions of time<strong>in</strong>to two parts: slot offset and phase offset. We def<strong>in</strong>e slotoffset as the number of whole TDMA slots by which thetwo nodes differ, i.e. ⌊∆T i,j /T slot ⌋. We def<strong>in</strong>e phase offsetas the number of clock ticks (<strong>in</strong>tervals of T tick ) the twonodes are offset with<strong>in</strong> one TDMA slot. So, the total offsetbetween the nodes is the sum of the slot offset and phaseoffset between them.Currently GMAC provides one synchronization moduleimplement<strong>in</strong>g a method known as the median algorithm,described <strong>in</strong> Alg. 1. The median algorithm uses the numberof packets received dur<strong>in</strong>g the current frame and the arrayof packets as <strong>in</strong>put. The algorithm sorts the received packetentries by their offset from the local time, selects themedian entry, and <strong>in</strong>creases (or decreases) the number ofslots for the next frame based on the tim<strong>in</strong>g data perta<strong>in</strong><strong>in</strong>gto that entry.Algorithm 1 Median <strong>Synchronization</strong>Require: NumEntries > 0, array RxEntriesSortByOffset(RxEntries)MedianEntry ← RxEntries[ NumEntries2]T ickCorrection ← MedianEntry.Offset/2SlotCorrection ← T ickCorrection div T icks slotP haseCorrection ← T ickCorrection mod T icks slotNextF rameSlots ← Slots frame − SlotCorrectionNextSlotT icks ← T icks slot − P haseCorrectionAs GMAC nodes execute their synchronization algorithm<strong>in</strong> a completely decentralized manner, it is possiblethat separately synchronized subnetworks form (i.e.,subnetworks partitioned <strong>in</strong> time, rather than space). In anattempt to jo<strong>in</strong> these separate subnetworks together to forma s<strong>in</strong>gle network, GMAC nodes send out jo<strong>in</strong> messages <strong>in</strong>every TDMA frame. Each node randomly selects a slotdur<strong>in</strong>g the <strong>in</strong>active portion of the frame and transmits amessage filled with synchronization and debugg<strong>in</strong>g <strong>in</strong>formation.Occasionally, a jo<strong>in</strong> message from Subnetwork Awill be received dur<strong>in</strong>g the active period of Subnetwork B .Nodes receiv<strong>in</strong>g a jo<strong>in</strong> message will modify their localclocks <strong>in</strong> an attempt to synchronize to the send<strong>in</strong>g node.Note that this jo<strong>in</strong> behavior is purely probabilistic, and itis not uncommon for disjo<strong>in</strong>t subnetworks to exist, despitethe nodes be<strong>in</strong>g <strong>in</strong> close physical proximity.C. Slot Schedul<strong>in</strong>g StrategyGMAC’s slot allocation algorithms are based on SlottedAloha [3], and are used to share access to the wirelessmedium. At a high <strong>level</strong>, the ma<strong>in</strong> difference between


GMAC and Slotted Aloha is GMAC’s use of duty cycl<strong>in</strong>g.Slotted Aloha is an always-on protocol, whereas GMACturns the radio on only for a small percentage of the totalslots <strong>in</strong> order to save energy. Slots <strong>in</strong> which the radiois powered up are known as active slots, <strong>in</strong> contrast to<strong>in</strong>active, or idle slots, where the radio is powered down.At the moment, GMAC provides three different TDMAstrategy algorithms. For the purposes of this paper, werestrict our <strong>in</strong>vestigation to the most basic strategy, knownas Simple TDMA.The Simple TDMA strategy takes as a parameter thenumber of active slots <strong>in</strong> a frame, denoted Slots active .In each frame, the algorithm selects a random TX slot<strong>in</strong> the range [1..Slots active ]. This algorithm works well<strong>in</strong> low- to moderate-traffic networks. However, highlycongested neighborhoods (i.e., where #Neighbors >>#ActiveSlots) will result <strong>in</strong> a large number of collisions,and thus significantly reduced throughput. The DistributedTDMA strategy attempts to remedy this problem by adapt<strong>in</strong>gthe number of active slots based on the perceivednumber of neighbors. We leave the <strong>in</strong>vestigation of thisand other strategies to our future work.III. Experimental setupWe implemented our GMAC simulator us<strong>in</strong>g theMiXiM (http://mixim.sourceforge.net) extensions overOMNET++ (http://www.omnetpp.org). The OMNET++platform is expressive, efficient, modular, and <strong>in</strong>creas<strong>in</strong>glythe de-facto simulation environment for mobile ad-hoc andsensor networks [4].A. Simulated NodesAs we are <strong>in</strong>terested only <strong>in</strong> synchronization, we canignore the difficulties of model<strong>in</strong>g sensors and actuators.The behavior of the GMAC layer is then driven solelyby the <strong>in</strong>terrupts from the <strong>in</strong>ternal clock and the radio.We chose to model our simulated clocks and radios <strong>in</strong>accordance with the hardware GMAC was designed torun on <strong>in</strong> the real world, MyriaNed nodes. These nodeshave an Atmel ATXMega128 CPU with 8k of RAM, 128kof Flash memory, a Nordic nRF24L01+ wireless radio,and four colored LEDs, and several sensors. The <strong>in</strong>ternaltimer is an oscillator designed to operate at 32,768Hz,and are specified to have a frequency offset ≤ ±20ppm(parts per million). This may seem small, but it meansthat after thirty seconds 4 , two <strong>in</strong>itially synchronized clocksmay have drifted as much as 1.2ms (40 ticks) apart. Thatis, one of the nodes may have counted as many as onemillion and twenty ticks <strong>in</strong> this time <strong>in</strong>terval, while another4 one million time <strong>in</strong>tervals of T tick = 1F req ≃ 30µsTABLE I. <strong>Network</strong>s InvestigatedNodes Dimensions Spac<strong>in</strong>g16 320m × 320m64 640m × 640m256 1280m × 1280m1024 2560m × 2560m80m Matrix, Randommay have counted only n<strong>in</strong>e-hundred n<strong>in</strong>ety-n<strong>in</strong>e thousand,n<strong>in</strong>e-hundred and eighty ticks <strong>in</strong> that same <strong>in</strong>terval. WithSlots active = 8 active slots of T icks slot = 28 ticks each,two nodes can become completely isolated from each other(i.e. their active periods do not overlap) <strong>in</strong> as little as3 m<strong>in</strong>utes. Compensat<strong>in</strong>g for this <strong>in</strong>herent divergence ofseparate clocks is the goal of any clock synchronizationalgorithm.We designed our own OMNET++ modules to representthe type of <strong>in</strong>ternal clocks described above. OMNET keepstrack of the global simulation time, T sim , while an <strong>in</strong>dividualnode computes its own local time. A node bases this onits own clock’s frequency offset (F offset ) and phase offset(P offset ) from the global simulation clock (provided asOMNET parameters): T i = (T sim ×F offseti )+P offseti . Anode’s phase offset determ<strong>in</strong>es the length of time betweenthe global start of the simulation and the start of thatparticular node. The frequency offset determ<strong>in</strong>es howmuch faster or slower than simulation time the node’s clockruns.For the purposes of this paper, we have restrictedour <strong>in</strong>vestigation to GMAC’s most basic synchronizationprimitives: median synchronization ma<strong>in</strong>tenance and theSimple TDMA strategy, which were discussed <strong>in</strong> Section II.B. Input parameters to <strong>in</strong>vestigateAs our primary <strong>in</strong>terests lie <strong>in</strong> GMAC’s synchronizationand stability <strong>in</strong> large mobile networks, our <strong>in</strong>vestigationsfocus on the follow<strong>in</strong>g parameters: clock drift, transmitpower and start<strong>in</strong>g topology. Due to space constra<strong>in</strong>ts, our<strong>in</strong>vestigation <strong>in</strong>to GMAC’s handl<strong>in</strong>g of mobility will bedeferred to a future publication.1) Clock Drift: Even clocks of the same specificationsexhibit slight differences, as previously discussed.We <strong>in</strong>vestigate a range of maximum clock drift sett<strong>in</strong>gs<strong>in</strong> our experiments. By select<strong>in</strong>g a maximum offset ofO max , the simulator will assign each simulated node’sclock a random clock frequency multiplier <strong>in</strong> the range[1 − O max , 1 + O max ]. This results <strong>in</strong> each node hav<strong>in</strong>ga similar but slightly varied value for T tick , caus<strong>in</strong>g oursimulated clocks to slowly drift apart just as real clocksdo.2) Start<strong>in</strong>g Topology: In this <strong>in</strong>vestigation, we exam<strong>in</strong>etwo different network topologies: matrix topologies and


andom topologies. In matrix topologies, N nodes aredeployed <strong>in</strong> a √ N × √ N grid topology, where rows (andcolumns) and placed 80m apart. This will show us thebehavior of the GMAC <strong>in</strong> a more ‘friendly’ sett<strong>in</strong>g, wherethe network is fully connected and there exist many pathsbetween all nodes. In the random topologies, N nodesare deployed at random locations <strong>in</strong> the same area as theequivalent matrix topology (i.e., with the same numberof nodes). Random topologies present more difficulty <strong>in</strong>synchronization as there will generally be some veryhighly connected areas and some less connected areas, andpotentially even physically isolated nodes. These randomtopologies, however, are more representative of the typeof topologies that will be encountered <strong>in</strong> the real world,and hence of more <strong>in</strong>terest to our <strong>in</strong>vestigation. S<strong>in</strong>cescalability is one of our primary <strong>in</strong>terests, we <strong>in</strong>vestigatenetworks of various comb<strong>in</strong>ations of size and deploymentpattern. A full list is given <strong>in</strong> Table I.C. Observable metricsWhen a simulated node beg<strong>in</strong>s a new round, it recordsthe round number and global simulation time (T sim ). Bylater compar<strong>in</strong>g the times that the nodes began each round,we can analyze the synchronization behavior of a simulatedGMAC network.IV. Simulation resultsIn this section, we present the results of our experimentssimulat<strong>in</strong>g the GMAC layer <strong>in</strong> the OMNET++ environment.We elected to analyze the GMAC’s synchronization performance<strong>in</strong> two ways. First, we ran a series of experimentswhere all nodes were started <strong>in</strong> a synchronized state at thevery beg<strong>in</strong>n<strong>in</strong>g of the run (P offset = 0). Second, we ranexperiments where each node i was started at a randomlychosen time <strong>in</strong> the first 15 seconds (0.0 ≤ P offset < 15.0).The first set of experiments is designed to show howGMAC’s synchronization ma<strong>in</strong>tenance, i.e., the medianalgorithm, performs <strong>in</strong> an already synchronized network.The second set will give us <strong>in</strong>sight <strong>in</strong>to the performanceof GMAC’s subnetwork jo<strong>in</strong><strong>in</strong>g mechanism, i.e., the jo<strong>in</strong>messages.A. Synchronous StartFor this series of experiments, our primary metric formeasur<strong>in</strong>g the <strong>level</strong> of synchronization <strong>in</strong> the networkis the standard deviation of the node start times. Asmentioned earlier, each node reports the time it beg<strong>in</strong>seach round. For each round, we compute the standarddeviation of all node’s reported time for the start ofthat round. This tells us how tightly synchronized thenetwork is at every round. This is a somewhat broadmeasurement, as it perta<strong>in</strong>s to the whole network. Thatis, it cannot give us <strong>in</strong>sight <strong>in</strong>to which sections of thenetwork are suffer<strong>in</strong>g from poor synchronization. Note thatthe best synchronization <strong>level</strong> we can realistically hope foris T tick2≃ 15µs, or half the smallest adjustment that theGMAC can make <strong>in</strong> its effort to compensate for the drift<strong>in</strong>gclocks. Consistent and stable synchronization to the <strong>level</strong>of a s<strong>in</strong>gle clock-tick is quite good, though, and <strong>in</strong>dicatesthat we could reduce T guard significantly below its currentvalue of 300µs <strong>in</strong> order to save energy.We beg<strong>in</strong> by look<strong>in</strong>g at Fig. 2a, depict<strong>in</strong>g a set of<strong>in</strong>dividual simulated runs. Each l<strong>in</strong>e is the result of a s<strong>in</strong>glerun on a 256-node matrix topology, with the standard deviationplotted per round. These simulations used the defaulttransmission power of 20mW and MaxClockDrift=25ppm.Here we can see much similarity between <strong>in</strong>dividual runs.The median algorithm ma<strong>in</strong>ta<strong>in</strong>s a steady-state where itcompensates for the clock drift between the nodes.In Fig. 2b, each l<strong>in</strong>e shows the average standard deviationfor each simulated round across the 10 experimentalruns for each MaxClockDrift sett<strong>in</strong>g. We explore the effectsof different clock drifts on the median algorithm, us<strong>in</strong>g thesame topology and transmit power sett<strong>in</strong>gs as above. Thus,the 10 l<strong>in</strong>es from Fig. 2a comprise the s<strong>in</strong>gle l<strong>in</strong>e <strong>in</strong> Fig. 2bat 25ppm. Here we can see how the median algorithmcopes with various clock sett<strong>in</strong>gs. More clock drift betweennodes leads to progressively looser synchronization. Thatis, as clocks drift apart faster and faster, the median cannotma<strong>in</strong>ta<strong>in</strong> the same <strong>level</strong> of synchronization between nodes.This can be seen by the <strong>in</strong>creased standard deviation athigher drift sett<strong>in</strong>gs.F<strong>in</strong>ally, <strong>in</strong> Fig. 2c we see the aggregation of a largeamount of experimental data. Each data po<strong>in</strong>t representsthe average standard deviation for the last half of the10 runs of a particular parameter sett<strong>in</strong>g. We plot theclock drift sett<strong>in</strong>gs along the x-axis and average convergedstandard deviation for the 10 runs of each MaxClockDriftvalue. Thus, the s<strong>in</strong>gle po<strong>in</strong>ts along the l<strong>in</strong>e {Matrix, 256}show the average value over the last 30 m<strong>in</strong>utes of the10 runs represented by the <strong>in</strong>dividual l<strong>in</strong>es from Fig. 2b.The solid l<strong>in</strong>es show matrix topologies, while the dashedl<strong>in</strong>es show random topologies and, as expected, the randomtopologies show much more variability.B. Asynchronous StartFor our second series of experiments, our metric foranalyz<strong>in</strong>g the jo<strong>in</strong><strong>in</strong>g of the nodes <strong>in</strong>to a s<strong>in</strong>gle synchronizednetwork is the fraction of nodes not belong<strong>in</strong>g tothe largest synchronized subnetwork. When analyz<strong>in</strong>g ourlogs, we group nodes <strong>in</strong>to subnetworks as follows: we


1000100100 1000 2000 3000 4000 5000 6000 7000Round NumberStandard Deviation of Round Start Times (us)100010010MaxClockDrift1 255 5010 10010 1000 2000 3000 4000 5000 6000 7000Round Number1 5 10 25 50 100MaxClockDrift(a) 10 <strong>in</strong>dividual runs of same sett<strong>in</strong>gs. Topology: (b) Average over 10 runs for each MaxClockDrift. (c) Converged offset standard deviations for comb<strong>in</strong>ations256-node Matrix, MaxClockDrift: 25ppm. Topology: 256-node Matrix.of MaxClockDrift and Topology. From topto bottom: {1024, 256, 64, 16} nodes, {Random,Matrix} topologies.Fig. 2. Variation <strong>in</strong> round start times, synchronous startStandard Deviation of Round Start Times (us)10 610 510 410 310 210 1100%10%1%0.1%% of Nodes OUTSIDE Largest Subnetwork100%10%1%0.1%MaxClockDrift15102550100% of Nodes OUTSIDE Largest Subnet100%10%1%0.1%0%0 1000 2000 3000 4000 5000 6000 7000 8000Round Number0%0 1000 2000 3000 4000 5000 6000 7000 8000Round Number(a) 10 <strong>in</strong>dividual runs of same sett<strong>in</strong>gs. Topology: (b) Average over 10 runs for each MaxClockDrift.256-node Matrix, MaxClockDrift: 25ppm. Topology: 256-node Matrix.0%1 5 10 25 50 100MaxClockDrift(c) Per-Parameter Per-Topology AverageFig. 3. Percentage of unsynchronized nodes, asynchronous startsort all the reported times for the start of a particularround. We iterate through the times, comput<strong>in</strong>g the offsetbetween the previous and current time. When there is anoffset between consecutive reported times greater than thesubnetwork threshold, we decide that the current reportedtime marks the beg<strong>in</strong>n<strong>in</strong>g of a new subnetwork. By separat<strong>in</strong>gthe nodes <strong>in</strong>to disjo<strong>in</strong>t sets represent<strong>in</strong>g synchronizedsubnetworks at various thresholds, we can analyze howwell GMAC’s jo<strong>in</strong> mechanism is work<strong>in</strong>g. We use thresholdsof 7000µs, 850µs, and 30µs which correspond toapproximately the length of an active period, a TDMA slot,and a simulated clock tick, respectively. At each round, foreach threshold, we calculate the percentage of all simulatednodes that are outside (i.e., not synchronized with) thelargest subnetwork. As such, we should expect this metricto beg<strong>in</strong> at or near 100% and fall towards 0%. In Fig. 3,we show the results of our asynchronous start experiments.In general, most runs behave as expected and rapidlyconverge to a s<strong>in</strong>gle network. However, <strong>in</strong> some runs, wef<strong>in</strong>d that separate subnetworks can exist for a long time, tothe po<strong>in</strong>t where they never form a s<strong>in</strong>gle network dur<strong>in</strong>gthe entire simulated hour. We can see just such behavior<strong>in</strong> Fig. 3a, which depicts the results of a set of twentyfive256-node matrix runs with a maximum clock drift of±25ppm. In Fig. 3b, we show the average of 25 such runsfor each MaxClockDrift sett<strong>in</strong>g. As previously expla<strong>in</strong>ed,the behavior of the jo<strong>in</strong> mechanism is probablistic, andthis can be clearly seen <strong>in</strong> the variability of the simulatedresults.F<strong>in</strong>ally, <strong>in</strong> Fig. 3c we plot (analogously to Fig. 2c) theaverage fraction of nodes outside the largest subnetworkover 25 runs for each sett<strong>in</strong>g, consider<strong>in</strong>g only the lasthalf of the rounds of each run. The sett<strong>in</strong>gs correspond toall comb<strong>in</strong>ations of clock drifts and topologies we experimentedwith. Clearly, <strong>in</strong> all of our simulations GMACeventually achieved synchronization of at least 99% ofthe participat<strong>in</strong>g nodes, irrespectively of the topology andmaximum clock drift.V. Related workIn [5], the authors discuss why traditional synchronizationmechanisms, like NTP, are unsuitable for ad-hocsensor networks. In [6] the authors give an overview of the


problem of time synchronization <strong>in</strong> sensor networks andevaluate several important protocols. [7] provides a morerecent survey of time synchronization protocols designedfor sensor networks, however the most scalable protocolanalyzed was run on networks up to 300 nodes, far belowwhat is required here.Many popular energy-aware MAC protocols, e.g. S-MAC [8], use carrier-sens<strong>in</strong>g or ready-to-send/clear-tosendhandshakes, which necessarily use more energy thana properly synchronized TDMA protocol that avoids collisionswithout these mechanisms. Both Tim<strong>in</strong>g-sync Protocolfor Sensor <strong>Network</strong>s (TPSN [9]) and Flood<strong>in</strong>g Time<strong>Synchronization</strong> Protocol (FTSP [10]) rely on creat<strong>in</strong>g aspann<strong>in</strong>g tree over the whole network, stemm<strong>in</strong>g from aglobally elected root node. The cost of leader electionand tree build<strong>in</strong>g make such solutions unsuitable for highdiameter and/or mobile networks. Reference Broadcast<strong>Synchronization</strong> (RBS [11]) provides only post-facto synchronizationand is thus <strong>in</strong>feasible <strong>in</strong> our sett<strong>in</strong>g. Post-factosynchronization is used to retroactively determ<strong>in</strong>e the timea past event occurred at a neighbor node (i.e., to come toconsensus on what time an event sensed by several nodetook place), but is not designed to synchronize the currentclock state of the nodes.VI. Conclusions and Future WorkOur results <strong>in</strong>dicate that the simple median synchronizationmechanism provided by GMAC is capable ofadaptively ma<strong>in</strong>ta<strong>in</strong><strong>in</strong>g good clock synchronization, even atvery large network sizes. Simulations show that the medianalgorithm is capable of compensat<strong>in</strong>g for clock frequencyoffsets far greater than can be expected from real clockcomponents. Furthermore, simulations show the medianalgorithm can ma<strong>in</strong>ta<strong>in</strong> synchronization <strong>in</strong> networks aslarge as 4096 nodes, and possibly beyond. This <strong>level</strong> ofscalability is an absolute necessity <strong>in</strong> the sett<strong>in</strong>g of largesocial ad-hoc networks.Though this synchronization ma<strong>in</strong>tenance algorithm isquite simple, <strong>in</strong> practice it turns out to be quite effective.One problem with the median algorithm is that it has no‘memory’, or state. This means that the median algorithmcan ma<strong>in</strong>ta<strong>in</strong> synchronization only while it is <strong>in</strong> regularcontact with other nodes. If a node becomes isolated(without neighbors) for an extended period of time, thenode’s clock will tend to drift away from the other nodesit was previously communicat<strong>in</strong>g with. It also seems thatfor smaller networks, GMAC keeps nodes tightly coupled.This <strong>in</strong>dicates that there may be much energy to be savedby reduc<strong>in</strong>g the TDMA guard time.Though GMAC’s synchronization ma<strong>in</strong>tenance mechanismwas shown to be scalable, its jo<strong>in</strong> mechanism didnot prove as effective. As a node can only receive jo<strong>in</strong>messages dur<strong>in</strong>g its (short) active period, separately synchronizedsubnetworks can persist for a long time. This isundesirable as subnetworks will be unable to communicatewith each other, lead<strong>in</strong>g to significantly reduced utility ofthe network as a whole. We plan to <strong>in</strong>vestigate us<strong>in</strong>g amore active jo<strong>in</strong> mechanism, which periodically listens forother subnetworks and actively tries to determ<strong>in</strong>isticallyjo<strong>in</strong> them. The frequency of this extended listen<strong>in</strong>g periodcould be adaptively based on the size of the network,neighborhood density, or other metrics.If we can modify GMAC to efficiently jo<strong>in</strong> all reachablenodes <strong>in</strong>to a s<strong>in</strong>gle synchronized network, we will havea firm foundation on which to build scalable distributedapplications runn<strong>in</strong>g on massive, dynamic social ad-hocnetworks.References[1] A. Demers, D. Greene, C. Hauser, W. Irish, J. Larson, S. Shenker,H. Sturgis, D. Sw<strong>in</strong>ehart, and D. Terry, “Epidemic algorithms forreplicated database ma<strong>in</strong>tenance,” <strong>in</strong> Proceed<strong>in</strong>gs of the sixth annualACM Symposium on Pr<strong>in</strong>ciples of distributed comput<strong>in</strong>g. ACMPress New York, NY, USA, 1987, pp. 1–12.[2] K. Iwanicki and M. van Steen, “Multi-hop cluster hierarchyma<strong>in</strong>tenance <strong>in</strong> wireless sensor networks: A case for gossip-basedprotocols,” <strong>in</strong> Proceed<strong>in</strong>gs of the Sixth European Conference onWireless Sensor <strong>Network</strong>s (EWSN 2009). Cork, Ireland: Spr<strong>in</strong>ger-Verlag LNCS 5432, February 2009, pp. 102–117. [Onl<strong>in</strong>e].Available: http://www.few.vu.nl/ iwanicki/publications/2009-02-EWSN/[3] N. Abramson, “The throughput of packet broadcast<strong>in</strong>g channels,”IEEE Transactions on Communications, vol. 25, no. 1, pp. 117–128,1977.[4] E. We<strong>in</strong>gartner, H. vom Lehn, and K. Wehrle, “A performancecomparison of recent network simulators,” <strong>in</strong> IEEE InternationalConference on Communications, 2009. ICC’09, 2009, pp. 1–5.[5] J. Elson and K. R”omer, “Wireless sensor networks: A new regime for time synchronization,”ACM SIGCOMM Computer Communication Review,vol. 33, no. 1, p. 154, 2003.[6] F. Sivrikaya and B. Yener, “Time synchronization <strong>in</strong> sensor networks:A survey,” IEEE network, vol. 18, no. 4, pp. 45–50, 2004.[7] S. Rahamatkar, A. Agarwal, and N. Kumar, “Analysis and ComparativeStudy of Clock <strong>Synchronization</strong> Schemes <strong>in</strong> Wireless Sensor<strong>Network</strong>s,” Analysis, vol. 2, no. 03, pp. 536–541, 2010.[8] W. Ye, J. Heidemann, and D. Estr<strong>in</strong>, “An energy-efficient MACprotocol for wireless sensor networks,” <strong>in</strong> IEEE INFOCOM 2002.Twenty-First Annual Jo<strong>in</strong>t Conference of the IEEE Computer andCommunications Societies. Proceed<strong>in</strong>gs, 2002, pp. 1567–1576.[9] S. Ganeriwal, R. Kumar, and M. Srivastava, “Tim<strong>in</strong>g-sync protocolfor sensor networks,” <strong>in</strong> Proceed<strong>in</strong>gs of the 1st <strong>in</strong>ternational conferenceon Embedded networked sensor systems. ACM New York,NY, USA, 2003, pp. 138–149.[10] M. Maróti, B. Kusy, G. Simon, and Á. Lédeczi, “The flood<strong>in</strong>g timesynchronization protocol,” <strong>in</strong> Proceed<strong>in</strong>gs of the 2nd <strong>in</strong>ternationalconference on Embedded networked sensor systems. ACM, 2004,pp. 39–49.[11] J. Elson and D. Estr<strong>in</strong>, “Time synchronization for wireless sensornetworks,” Parallel and Distributed Process<strong>in</strong>g Symposium, International,vol. 3, p. 30186b, 2001.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!