WiFly: experimenting with Wireless Sensor Networks and Virtual coordinates
Experimentation is important when designing communication protocols for Wireless Sensor Networks. Lower-layers have a major impact on upper-layer performance, and the complexity of the phenomena can not be entirely captured by analysis or simulation.…
Authors: Thomas Watteyne (INRIA Rh^one-Alpes, FT R&D), Dominique Barthel (FT R&D)
ISSN 0249-6399 apport de recherche Thème COM INSTITUT N A TION AL DE RECHERCHE EN INFORMA TIQUE ET EN A UTOMA TIQUE W iFly: experimenting with W ireless Sensor Netw orks and V irtual coordinates Thomas W atteyne — Dominiq ue B arthel — Mischa Dohler — Isabelle Augé-Blum N° 6471 January 2008 Unité de recherche INRIA Rhône-Alpe s 655, av enue de l’Europ e, 38334 Montbon not Saint Ismier (France) Téléphone : +33 4 76 61 52 00 — Télécopie +33 4 76 61 52 52 WiFly: exp erimen ting with Wireless Sensor Net w orks and Virtual o ordinates ∗ Thomas W atteyne † ‡ , Dominique Barthel † , Mis ha Dohler § , Isab elle Augé-Blum ‡ Thème COM Systèmes omm unian ts Pro jet ARES Rapp ort de re her he n ° 6471 Jan uary 2008 27 pages Abstrat: Exp erimen tation is imp ortan t when designing omm uniation proto ols for Wireless Sensor Net w orks. Lo w er-la y ers ha v e a ma jor impat on upp er-la y er p erformane, and the omplexit y of the phenomena an not b e en tirely aptured b y analysis or sim ulation. In this rep ort, w e go through the omplete pro ess, from designing an energy-eien t self- organizing omm uniation ar hiteture (MA C, routing and appliation la y ers) to real-life exp erimen tation roll-outs. The presen ted omm uniation ar hiteture inludes a MA C proto ol whi h a v oids build- ing and main taining neigh b orho o d tables, and a geographially-inspired routing proto ol o v er virtual o ordinates. The appliation onsists of a mobile sink in terrogating a wireless sensor net w ork based on the requests issued b y a disonneted base station. After the design pro ess of this ar hiteture, w e v erify it funtions orretly b y sim ulation, and w e p erform a temp oral v eriation. This study is needed to alulate the maxim um sp eed the mobile sink an tak e. W e detail the implemen tation, and the results of the o-site exp erimen tation (energy onsumption at PHY la y er, ollision probabilit y at MA C la y er, and routing). Finally , w e rep ort on the real-w orld deplo ymen t where w e ha v e moun ted the mobile sink no de on a radio-on trolled airplane. Key-w ords: Wireless Sensor Net w orks, exp erimen tation, m ulti-hop wireless omm unia- tion, virtual o ordinates, mobile sink no de. ∗ This w ork w as partially supp orted b y the F ren h Ministry of Resear h under on trat ARESA ANR- 05-RNR T-01703. † F rane T eleom R&D, Meylan, F rane. rstname.lastnameorange-ftgroup.om ‡ ARES INRIA / CITI, INSA-Ly on, F-69621, F rane. rstname.lastnameinsa-ly on.fr § Cen tre T enològi de T eleom uniaions de Catalun y a (CTTC), Barelona, Spain. mis ha.dohlertt.es WiFly: exp érimen tation a v e un Réseaux de apteurs et des o ordonnées virtuelles Résumé : L'étude exp érimen tale est imp ortan te lorsque l'on rée des proto oles de om- m uniation p our réseaux de apteurs sans ls. Les ou he proto olaires bas niv eau on t un grand impat sur les p erformanes des ou hes sup érieures, et la omplexité des phénomènes ne p eut pas être en tièremen t apturé par l'analyse mathématique ou la sim ulation. Dans e rapp ort, nous dériv ons le pro essus omplet, depuis la mise en plae d'une ar hite- ture de omm uniation eae en énergie et auto-organisan te (ou hes MA C, routage et appliation), jusqu'au déploiemen t réel. L'ar hiteture de omm uniation présen tée omp orte un proto ole MA C qui évite la onstrution et la main tien de tables de v oisinage, ainsi qu'un proto ole de routage inspiré par les proto oles de routage géographique. Celui-i s'appuie sur des o ordonnées virtuelles des no euds, indép endan tes de leurs o ordonnées réelles. L'appliation onsiste en un no eud de ollete mobile in terrogean t un réseau de apteurs sans l, à partir de requêtes émises par une station de base déonnetée du réseau. Après le pro essus de mise en plae de ette ar hiteture, nous v érions son b on fon- tionnemen t par sim ulation, et nous eetuons une étude temp orelle. Cette dernière est utile p our aluler la vitesse maximale du no eud de ollete mobile. Nous détaillons les phases de l'implémen tation, et les résultats des exp érimen tations préliminaires (onsommation éner- gétique à la ou he PHY, probabilité de ollision au niv eau MA C, et routage). Finalemen t, nous présen tons l'exp érimen tation nale où nous mon tons le no eud de ollete mobile sur un a vion radioguidé. Mots-lés : Réseaux de apteurs, exp érimen tation, omm uniation sans l m ulti-sauts, o ordonnées virtuelles, no eud de ollete mobile. WiFly: WSNs and Virtual o or dinates 3 1 In tro dution and related w ork Mu h eort has b een put during the last 5-10 y ear in to Resear h on Wireless Sensor Net w orks (WSNs). Numerous onferenes, journals and sp eial issues are dediated to these net w orks, and new solution app ear on a w eekly basis. Despite all this ativit y , a surprisingly lo w n um b er of atual deplo ymen t examples ha v e b een made publi. Whereas rolling out a solution an b e onsidered more part of engineering rather than Resear h, w e argue that ph ysial implemen tation onfron ts the resear her with imp ortan t on-eld onstrain ts. As solutions for WSNs are ross-la y ered, and as these solutions are largely impated b y lo w er la y ers (e.g. wireless transmission), real w orld onfron tation has a v ery b eneial impat on Resear h. Real-w orld deplo ymen t has b een largely simplied b y the app earane of ommerial pro duts. The most-kno wn MICA wireless sensor no des ha v e b een dev elop ed b y lab oratories at Univ ersit y of California at Berk eley . They w ere initially ommerialized b y Crossb o w (Mia2 in 2002, Mia2dot in 2003), the latest v ersions (Tmote SKY in 2004 [1℄, Tmote Mini in 2007) are brough t to the mark et b y Moteiv, a spin-o ompan y of the Univ ersit y of California at Berk eley . On-going Resear h is aiming at dev eloping energy-harv esting no des whi h ollet data from their en vironmen t, radially hanging the energy-onstrained assumption made for WSNs. In [2℄, the authors for example atta h a solar panel to an early v ersion of the Tmote SKY no des. A pioneering team at Berk eley lead the smart dust pro jet, whi h used the early v ersions of the Mia2 motes to do pro of-of-onept demonstration. An early exp erimen t in 2001 in v olv ed a autonomous radio-on trolled airplane whi h dropp ed sensors along a high w a y to monitor the passing of large military v ehiles. The plane on tin uously passed ab o v e them to ollet the measured data, whi h w as then transfered ba k to a base station. In 2002, a 43-no de net w ork w as deplo y ed on an uninhabited island 15km o the oast of Maine, USA [3℄. This net w ork w as used to monitor the migration and nesting habits of birds. With the monitored data b eing a v ailable online in real time, this deplo ymen t an b e seen as a milestone and an early publi demonstration of WSNs. The same team deplo y ed a net w ork to monitor trees in a tropial forest [4℄. In [5℄, the authors didatially desrib e the n umerous problems one an fae during real-w orld deplo ymen ts of WSNs. Sine 2005, ompanies ha v e b een emerging whi h pro vide servies en tirely based on WSNs. One in teresting example is Coronis, a F ren h start-up ompan y , sp eialized in auto- mated meter reading. It's rst big deplo ymen t in v olv ed a net w ork of 25,000 no des atta hed to the home w ater meters of a medium-sized it y [6℄. It no w has sold o v er a million of those sensors w orldwide. The ompan y Ar h Ro k reeiv ed ma jor atten tion lately [7℄. It ommerializes an o-the- shelf solution for small to medium sale monitoring WSNs (t ypially less than 100 no des). Its urren t solution in v olv es pa k aged Tmote SKY no des whi h omm uniate with a small p ersonal omputer as sink no de. This omputer in turn is onneted to the In ternet and with the use of W eb Servies allo ws the in tegration of this net w ork in to larger appliations. The main on tributions of this w ork are: RR n ° 6471 4 W atteyne, Barthel, Dohler, A ugé-Blum w e presen t a omplete energy-eien t self-organizing omm uniation ar hi- teture for Wireless Sensor Net w orks. This solution om bines MA C and routing proto ols in to a ross-la y ered solution, and is partiularly suited for lo w-throughput, dynami and energy-onstrained appliations. w e implemen t this solution on a medium-sized net w ork. A mobile sink onsisting of a radio on trolled airplane is used to in terrogate the WSN based on requests issued b y a remote base station. Whereas our implemen tation resem bles the early implemen tation done b y the Smart Dust team, the k ey dierene is that the mobile sink omm uniates with a omplete WSN and not a series of individual no des. In the latter ase, the net w orking problems w ere largely simplied as the m ulti-hop nature of no de-to-sink omm uniation w as essen tially remo v ed. Ha ving a real m ulti-hop WSN raises in teresting problems su h as self-organization and real-time omm uniation. The remainder of this rep ort is organized as follo ws. In Setion 2, w e desrib e the om- m uniation ar hiteture used in the WSN. The exp erimen tal setup is presen ted in Setion 3 together with hardw are details and frame durations. Setion 4 fo uses on real-time om- m uniation, and alulates the maxim um sp eed the mobile sink ma y mo v e at. Sim ulations results are presen ted in Setion 5. Exp erimen tal results are split in t w o setions. Setion 6 fo uses on preliminary exp erimen ts onduted o-site, Setion 7 presen ts the results obtained during deplo ymen t. This rep ort is onluded, and future w ork is presen ted in Setion 8. 2 The omm uniation ar hiteture 2.1 Ov erview In this w ork, w e aim at ev aluating the p erformane of the sta k represen ted in T able 1, whi h om bines the 1-hopMA C medium aess on trol proto ol [8℄, the 3rule routing proto ol [9℄ and the use of virtual o ordinates [10℄. The main hallenge is to form a omplete energy-eien t self-organizing omm uniation ar hiteture from these proto ols. This inludes adapting the dieren t la y ers one to the other. In the subsequen t subsetions, w e detail the adaptations whi h w ere needed. 2.2 A dapting the 1-hopMA C proto ol 1-hopMA C [8℄ is a medium aess on trol proto ol for WSNs whi h a v oids the need to main tain a neigh b orho o d list. Main taining su h a list at ea h no de w ould mean p erio dially ex hanging Hello pa k ets. This an turn out to b e v ery energy onsuming, as Hello pa k ets need to b e ex hanged ev en when the net w ork sits idle. In a forest re detetion senario (or an y senario with lo w throughput), the net w ork w ould deplete its energy b y p erio dially ex hanging Hello pa k ets whereas there is no useful data to transmit. INRIA WiFly: WSNs and Virtual o or dinates 5 Appliation onnetivit y graph onstrution Routing 3rule routing virtual o ordinates Medium aess on trol 1-hopMA C Ph ysial la y er EM2420 mo dule T able 1: The omm uniation sta k 1-hopMA C ta kles this problem in a fully on-demand solution. When a no de w an ts to send some data, it issues a request to whi h all of its neigh b ors answ er using a ba k o timer in v ersely prop ortional to some metri. The no de whi h answ ers rst is eleted rela ying no de. The metri atta hed to ea h no de do es not need to b e unique, but it should b e arefully hosen b y the routing la y er so that follo wing a path of dereasing metri leads to the sink no de. T o b e fully energy-eien t, 1-hopMA C uses the v arian t of pream ble sampling desrib ed in [11℄, whi h enables idle dut y yle of as lo w as 1%. The idle dut y yle aoun ts for the p eren tage of time a no de has its radio on ("dut y yle") when no information is sen t or reeiv ed ("idle"). In the original 1-hopMA C proto ol, the sending no de ould tak e ation after reeiving the rst a kno wledgmen t message. As our routing proto ol (desrib ed next) needs the omplete list of neigh b ors, w e mo dify the 1-hopMA C proto ol b y asking the sending no de to w ait for all the A CK messages b efore taking ation. This mo de is alled the basi mo de in [8℄. Note that, as su h, if no des ha v e v ery lose metri, the A CK messages ould b e separated b y a duration whi h is so small that A CK messages w ould ollide. W e address and answ er this problem in subsetion 5.1 . 2.3 A dapting the 3rule routing proto ol It has b een sho wn in [9℄ that urren t geographi routing proto ols su h as GF G [12℄ or GPSR [13℄ suer from inaurate p ositioning systems. Inaurate p osition an ev en ause those routing proto ols to fail, i.e. they do not deliv er their message although there exists a ph ysial path. The 3rule routing proto ol (presen ted and alled LeftHandGeoPR in [9℄) asks ea h no de to app end its iden tier to the pa k et header. With this information, it eien tly ho oses the next hop no de using a distributed v ersion of the w ell kno wn depth rst sear h algorithm in a tree. Although the 3rule proto ol inreases the size of the pa k et header, it is sho wn that it a hiev es a 100% deliv ery ratio indep enden tly from the p ositioning auray , with a hop oun t iden tial to GFF or GPSR. RR n ° 6471 6 W atteyne, Barthel, Dohler, A ugé-Blum Its robustness lead us to hose this routing proto ol for our omm uniation ar hiteture. Nev ertheless, the presene of a mobile sink somewhat ompliates the problem as the sink ma y ha v e mo v ed when the message rea hes its original destination. When this happ ens, w e restart the 3rule routing proto ol b y erasing the sequene of tra v ersed no des in the header. W e sho w b y sim ulation in Setion 5 that the proto ol restarts only a limited n um b er of times, and that this n um b er qui kly dereases with lo w er sp eeds of the sink or n um b er of neigh b ors inreasing. Y et, using a geographial-based routing proto ol implies that no des kno w their p ositions whi h is a ostly assumption (b oth in terms of money and energy). As GPS-lik e solutions an not b e oun t on, w e reen tly sho w ed in [10℄ that virtual o ordinates an o v erome this problem. By iterativ ely applying en troid transformation to initially random o ordinates, the n um b er of hops using the 3rule routing proto ol on those virtual o ordinates drops sharply . It is sho wn that with ab out 10 en troid rounds, the n um b er of hops drops b y more than 50% ompared to the fully random ase. Curren t w ork sho ws that with another t yp e of virtual o ordinate up date, the net w ork on v erges to a state where path length only exeeds the shortest path b y 4%. Details will b e giv en in subsequen t publiations. The use of virtual o ordinates is partiularly suited for the ase of a mobile sink. Indeed, as in our solution the sink k eeps the same predened virtual p osition (regardless of its real ph ysial p osition), it do es not need to p erio dially inform the other no des of its p osition. This, w e b eliev e, is a ma jor adv an tage of using virtual o ordinates, and is m u h simpler than the lassial p erio di heartb eat [14℄ or rendez-v ous p oin t [15℄ solutions. 3 Exp erimen tal setup and implemen tation details 3.1 The exp erimen tation framew ork In order to test the omm uniation ar hiteture presen ted in Setion 2, w e need to add some proto ols to op erate in a realisti en vironmen t with a real appliation. Our target appliation is an on-demand tra king system, where w e assume only one no de answ ers a sp ei request. A mobile sink is giv en a query b y a base-station whi h is disonneted from the net w ork (Phase 1). It tra v els to the WSN net w ork where it omm uniates this query to a random no de (Phase 2). The query is then broadasted in the net w ork (Phase 3). The no de whi h holds the answ er (alled soure no de) transmits it using our omm uniation ar hiteture to the mobile sink (Phase 4). The mobile sink a kno wledges this reeption (Phase 5), tra v els ba k to the base station to whi h it transmits the data (Phase 6). Refer to Fig. 1 for an illustration of the exp erimen tatal framew ork. F rom the previous desription, it is lear that our main in terest is ho w the data is transmitted from the soure no de to the mobile sink, i.e. Phase 4. All other phases are used to pro vide a real-w orld ev aluation framew ork, but are not the ore of our study . That's wh y these phases ma y use simplisti/sub optimal solutions. W e no w detail the dieren t phases, in tro duing the pa k et names: INRIA WiFly: WSNs and Virtual o or dinates 7 WSN MS BS Figure 1: The exp erimen tal framew ork setting. Phase 1: Data Request. This phase in v olv es the base station ( B S ) and the mobile sink ( M S ). The B S p erio dially sends Data Request messages with p erio d T DRp and of duration D DRp . These D Rp messages are formed b y a sequene of miro-frames, whi h ea h on tain the n um b er S eq of remaining miro-frame in the D Rp message. The M S he ks whether the medium is free ev ery T cca and during D cca . D cca is hosen su h that it hears a omplete miro-frame when a sequene of miro-frames is sen t ( D cca ≥ T DRp + D DRp ). When the M S orretly reeiv es a miro-frame, it alulates using S eq when the B S nishes to send all the miroframes the D Rp message onsists of, and sends an AC K . Whenev er the B S is not sending a D Rp message, it is listening to medium, w aiting for the AC K message. One the AC K is sen t, the M S en ters phase 2. Phase 2: starting Broadast Request. This phase in v olv es the mobile sink ( M S ) and the WSN. After phase 1, the M S p erio dially sends Broadast Requests with p erio d T B Rp and of duration D B Rp . Similar to the D Rp messages, these B R p messages are formed b y a sequene of miro-frames. When a no de hears a B R p miro-frame, it w aits for the end of the B R p and starts a random ba k o B B R uniformly hosen within a on ten tion windo w of length W B R . During its ba k o duration B B R , it listens for other p oten tial B R p message. If it reeiv es a seond B R p , it anels B B R and restarts it D B Rp later. When B B R elapses, the no de sends a B R p . Up on hearing a rela y ed B R p , the mobile sink kno ws its B R p has b een heard, and it en ters diretly Phase 5. Phase 3: Broadast Request. This phase only in v olv es the WSN. The ba k o- based algorithm desrib ed in Phase 2 is arried out b et w een all no des. Its goal is to o o d the omplete net w ork. Note that ea h no de will send exatly one op y of B R p . The no de whi h holds the answ er to the request iden ties itself. Up on reeiving the B R p , it do es not start the B B R ba k o but rather the B S RC . This ba k o is used to w ait for the o o d to pass. Up on elapsing B S RC , the soure no de en ters Phase 4. Note that all other no des en ter Phase 4 after reeiving a seond op y of the B R p , or after rela ying it. RR n ° 6471 8 W atteyne, Barthel, Dohler, A ugé-Blum Phase 4: Routing. This phase only in v olv es the WSN. This is the phase w e are in terested in. The soure no de sends a message to the M S using the omm uniation ar hiteture desrib ed in Setion 2. W e all D AT A the data messages, and B AC K the ba k o tak en within a on ten tion windo w W RR . Note that B AC K is prop ortional to the metri of the no de, whi h is the virtual distane to the M S . In order to b e more robust, w e ask ea h no de to listen to the medium for a xed duration B RR . If during this p erio d, it do es not hear another no de retransmitting RRp , it assumes it w as lost and retransmits it. Phase 5: D A T A reeption b y mobile sink. This phase in v olv es the mobile sink ( M S ) and the WSN. The M S has en tered this phase after Phase 2, and is w aiting for the D AT A to rea h it. It runs the 1-hopMA C proto ol desrib ed in Setion 2 but has a metri of 0. After reeiving the D AT A , it sends an AC K to inform the sender not to retransmit the message. The M S then swit hes to Phase 6. All no des, after suessfully rela ying the message swit h to Phase 2. Phase 6: D A T A retriev al b y base station. This phase in v olv es the base station ( B S ) and the mobile sink ( M S ). Reall that the B S p erio dially sends D Rp messages. Phase 6 is similar to Phase 1, the only dierene b eing that the M S answ ers to the D Rp with a D AT A pa k et. 3.2 P arameters and hardw are F or exp erimen tal testing of our omm uniation ar hiteture, w e ha v e used a WSN omp osed of 20 Em b er EM2420 no des. The ore omp onen ts of these sensors are a Em b er/Chip on CC2420 radio hip, and a A tmel A tMega128 miro-on troller. Some no des w ere equipp ed with sensing devies, push/slide button and ligh t meters. All no des w ere programmed using a omp onen t based language alled Think, whi h is dev elop ed at F rane T eleom R&D. Unlik e the Tin yOS or Con tiki op erating systems, Think is based on a set of omp onen ts whi h are ompiled together to form a binary o de, whi h is then loaded on to the no des. This omp onen ts approa h oers great exibilit y and o de re-use as individual omp onen ts su h as the s heduler or a sp ei routing proto ol do not need to b e reprogrammed when hanging appliation. This is also true for hanging platform, whi h enabled us to use t w o platforms. As those no des are v ery onstrained, w e w ere limited b y the follo wing. The transmission queue is limited to 128 b ytes, whi h is th us the maxim um size of the D AT A pa k ets. The EM2420 mo dule is 802.15.4 enabled, but while w e ompletely replaed its MA C proto ol with 1-hopMA C, w e w ere still b ound b y the hardw are to use 2 b yte addresses. The no des omm uniate at 250 kbps, with one ph ysial sym b ol eno ding 4 bits of data. As for our sim ulations, w e assumed ha ving a 25 no de net w ork, with an a v erage n um b er of neigh b ors of 5. The EM2420 needs T RxT x = 192 µs to swit h b et w een reeption and transmission states, whi h w e needed to tak e in to aoun t during implemen tation of our proto ols. The base station is formed b y a laptop onneted via a RS232 link to the EM2420 dev elopmen t kit. This onnetion is only used to monitor the ativit y of the base station, INRIA WiFly: WSNs and Virtual o or dinates 9 whi h is really the no de onneted to the dev elopmen t kit. As w e w an ted to test a large range of mobile sink sp eeds, w e ha v e used an MS 2001 radio-on trolled airplane with an EM2420 no de atta hed to it. The implemen ted appliation is the follo wing. W e w an t to determine the net w ork top ol- ogy , i.e. whi h are the neigh b ors of ea h no de. F or this, the B S asks for the list of neigh b ors of a sp ei no de, b y putting the no de iden tier in its D Rp , as sp eied in the net subse- tion. Ea h plane rotation will enable the base B S to learn the neigh b ors of a sp ei no de, and after a series of rotations, the B S will b e able to onstrut the onnetivit y graph of the net w ork. Note that this is just a pro of-of-onept appliation, and this onnetivit y graph is not used b y the MA C and routing la y ers. 3.3 P a k et format, sizes and durations In T able 2 , w e summarize the dieren t pa k et formats and sizes. Note that pa k ets of t yp e D Rp , B R p and RRp are really sequenes of miro-frames. The t w o rst bits of the S eq eld are used to dieren tiate the miro-frames of a D Rp (00), B R p (01) and RRp (10); the remaining 6 are used to indiate the n um b er of remaining miro-frames. As disussed ab o v e, the 0 xX 2 22 and address elds are a legay of the 802.15.4. As a onsequene, the destination address is alw a ys set to 0x, the broadast address. W e use the soure address to iden tify the sender. In the pa yload of the D Rp and B R p miro-frames, w e sp eify the address of the soure no de (as w e ha v e less than 256 no des in our net w ork, 1 b yte is enough to iden tify ea h no de). The pa yload of the RRp miro-frames is not used. Similarly , the S eq eld of the AC K and D AT A messages is not used. The pa yload of the D AT A messages onsists of t w o parts: the rst one on tains the sequene of tra v ersed no des needed b y the routing proto ol, the seond the list of neigh b ors of the soure no de. Both elds are iden tied using a 1 b yte length eld in the data pa yload. The n um b er of no de addresses in the sequene and neigh b or list m ust total up to less than 119. T able 3 summarizes the durations of the dieren t pa k ets and timers. F or a generi pa k et X , its duration is iden tied b y D X , T X for its p erio d (if appliable), B X for the ba k o used when sending it (if appliable). Note that ba k o B X is dra wn within the on ten tion windo w W X . When a pa k et is iden tied b y X p , it means it is a sequene of miro-frames ( p stands for pream ble). Note that the alulation of W B R and W RR are explained in subsetion 5.1 . 3.4 A hiev able omm uniation ranges During the early stages of the pro jet, w e ha v e p erformed some omm uniation range mea- suremen ts using the EM2420 no des. Results are presen ted in T able 4 . These measuremen ts sho w ed that the heigh t of a no de has a signian t impat on the transmission range. In order to ha v e a small net w ork (in large net w orks, p eople tend to lea v e no des b ehind during exp erimen tation), w e ha v e deided to use a xed transmission p o w er of -25dBm. RR n ° 6471 10 W atteyne, Barthel, Dohler, A ugé-Blum 0x6222 Seq. destination addr. soure addr. pa yload Che k Seq. miro-frame 0x4222 Seq. destination addr. soure addr. Che k Seq. A CK 0x2222 Seq. destination addr. soure addr. pa yload Che k Seq. · · · D A T A length sequene of tra v ersed no des neigh b or list D A T A pa yload T able 2: P a k et formats at MA C lev el. Ea h graduation represen ts one b yte. D mf 512 µs 8 bits Seq + 8 bits pa yload T mf 930 µs D cca 1442 µs D mf + T mf T cca 140 ms 100 × D cca to ha v e 1% idle radio use D AC K 480 µs 8 bits Seq D DAT A 4 ms 128-8=120 data b ytes D DRp 144 ms 155 miro-frames T DR 200 ms > D DAT A + D DRp T B Rp 300 ms > 2 · D B Rp + W B R D B Rp 144 ms 155 miro-frames W B R 10 ms less than 10% ollision probabilit y B B R randomly and uniformly hosen in [0 ..W B R ] B S RC 1000 ms > 6( D B Rp + W B R ) D RRp 144 ms 155 miro-frames W RR 30 ms less than 10% ollision probabilit y B AC K prop ortional to metri (uniformly distributed) B RR 500 µs > 0 T able 3: Timers and durations INRIA WiFly: WSNs and Virtual o or dinates 11 transmission p o w er heigh t range 0 dBm 1 m 100 m -25 dBm 1 m 25 m -25 dBm 0 m 5 m T able 4: Range 4 Real-time v eriation Real-time systems an b e divided in t w o lasses. Hard real-time systems guaran tee that a ertain ev en t happ ens b efore a giv en deadline. Guaran teeing in v olv es some form of formal v alidation. Due to the hazardous nature of the wireless medium, and the unreliabilit y of sensors no des, hard-real time omm uniation proto ols for wireless sensor net w orks are often based on unrealisti assumptions su h as a Unit Disk Graph propagation mo del. Soft real- time systems are made so that a p ortion of ev en ts happ ens within time b ounds. Beause of link unreliabilit y , the random nature of deplo ymen t and the path follo w ed b y the M S , our omm uniation ar hiteture an not guaran tee hard-real time onstrain ts. Rather than a hard-real time v alidation (based on formal mo dels and stati parameters), in this setion w e use mathematial mo dels to sho w real-time onstrain ts are v alidated in bad-ase senarios. The ritial parameter when onsidering real-time in our setting is the sp eed of the M S . Indeed, the net w ork needs to broadast the request and return the answ er b efore the M S lea v es the net w ork. The alulations presen ted in 4.2 and 4.3 aim at nding a maxim um sp eed v max for the M S . 4.1 Goals and assumptions W e assume the M S mo v es at an altitude of 5m ab o v e the no des. Moreo v er, as w e use a transmission p o w er of -25 dBm, w e onsider that the net w ork and B S an omm uniate with the M S for up to 25m, aording to 3.4 . As depited in Fig. 2 , the M S is onneted to another no de for a duration orresp onding to a mo v emen t of 50m. 4.2 Comm uniation b et w een the M S and the B S Comm uniation b et w een M S and B S go es on in phases 1 and 6. In this analysis, w e onsider only phase 6 whi h is the w orst ase with D AT A b eing a longer message than AC K . In this ase w e ha v e v max = 50 T DR + D DRp + D DAT Amax ≈ 500 k m.h − 1 RR n ° 6471 12 W atteyne, Barthel, Dohler, A ugé-Blum 25m MS BS or network node 5m ~50m Figure 2: Maxim um distane o v er whi h the M S an tra v el while onneted to the B S or a net w ork no de. W e argue that this requiremen t is not hard to meet as, to our kno wledge, no radio on trolled plane a hiev es su h sp eeds. 4.3 Comm uniation b et w een the M S and the net w ork This problem is someho w more omplex than the previous one b eause (1) the M S omm uni- ates with the omplete net w ork rather than with an individual no de and (2) omm uniation inside the net w ork is omplex and onsists of broadasting the request and transmitting the reply . W e mak e the follo wing assumptions. The net w ork onsists of 25 no des regularly deplo y ed in a square grid of size 5 hops, as depited in Fig. 3. T w o no des on the same horizon tal or v ertial line are separated b y 25m. Using the sim ulation framew ork dened in Setion 5 , w e obtain that the a v erage n um b er of hops using our omm uniation s heme is 8.771 with a 95% ondene in terv al [8 . 558 . . . 8 . 98 4] . As a onsequene, ev aluating the w orst ase hop oun t at 10 is a reasonable hoie. W e assume the M S will tra v erse the net w ork en tering one side, and lea ving at the opp osite side. The distane during whi h the M S is onneted to the net w ork is th us b et w een 150m and 190m. The broadasting proto ol is blind o o ding. Using the simple proto ol desrib ed in Setion 3 , ea h no de will send one B R p , and t w o neigh b or no des an not send at the same time. With the regular grid top ology , the broadast message will tak e up to a duration of 8 · ( W B R + D B Rp ) to rea h the soure no de, i.e. when the no de initiating the broadast and the soure in opp osite orners. B S RC needs to b e set so that the rst RRp message do es not ollide with a remaining B R p , i.e. the broadast storm needs to b e o v er. W e assume that a no de has at most 6 neigh b ors, whi h is onserv ativ e onsidering our top ology . In the w orst ase senario, all these neigh b ors hear one another, and ea h has a B R p message to send. Sending these messages will tak e at most 6 · ( W B R + D B Rp ) . As a onsequene B S RC > 6 · ( W B R + D B Rp ) . Using these observ ations, w e obtain : INRIA WiFly: WSNs and Virtual o or dinates 13 25m A B D E C 3 4 5 1 2 Figure 3: The regular 25 no de grid used to alulate v max . The a v erage n um b er of neigh b or no des N = 3 . 2 0 . v max = 150 8 · ( W BR + D BR p )+ B S RC +10 · ( D RRp + W RR + D DAT A ) ≈ 140 k m.h − 1 W e argue that this v alue is reasonable for a M S moun ted on a radio-on trolled plane, whi h ies at a sp eed of ab out 50 k m.h − 1 . F or more demanding appliations where the mobile sink is exp eted to go faster, it is p ossible to redue T mf , th us the time b et w een suessiv e lear hannel assessmen ts. This w ould enable the pream ble messages to b e arbi- trarily short in time, th us sp eeding up the m ulti-hop omm uniation, th us inreasing v max . Y et omm uniation sp eed trades o with energy onsumption, and reduing T mf inreases the idle radio use. This is partiularly onstraining when the net w ork sits idle most of the time. 5 Sim ulation results 5.1 Collision probabilit y at MA C lev el W e ha v e used join t analysis and sim ulation to determine the ollision probabilit y b et w een messages. Collision an happ en at t w o instan ts (1) during the broadast of a message in phases 2 and 3, denoted P ( B R ) and (2) b et w een the AC K message during the routing pro edure in phases 4 and 5, alled P ( RR ) . W e alulate these ollision probabilities for an a v erage n um b er of neigh b ors N = 5 . W e hose to use a n um b er larger than the a v erage v alue for the regular deplo ymen t in Fig. 3, to ha v e a seurit y margin as the ollision probabilit y inreases with the n um b er of neigh b or no des. Calulating P ( B R ) . W e use the follo wing assumptions. When a no de hears a B R for the rst time, it starts a ba k o B B R randomly tak en within the on ten tion windo w W B R . During this duration, it remains in reeption state to detet a p ossible rela y of the message RR n ° 6471 14 W atteyne, Barthel, Dohler, A ugé-Blum b y another no de. If this has not happ ened when its ba k o timer elapses, it swit hes to transmission mo de and rela ys the B R . There is a p ossibilit y of ollision b eause swit hing from reeption to transmission mo de tak es D RxT x = 192 µs . An analogy an b e dra wn b et w een this ollision probabilit y and the one alulated in [16℄. In this w ork, the authors alulate the ollision probabilit y whi h in v olv ed the rst AC K message. Collision w as dened as t w o messages o v erlapping in time. Here, w e an use the exat same denition, only ollision is dened as another no de pi king a ba k o time shorter than D RxT x after the rst ba k o timer expires, whi h is stritly equiv alen t to the alulation done in [16℄ but onsidering messages of duration D RxT x . The theoretial v alue of P ( B R ) is giv en in Eq. 1. W e are not surprised to see that P ( B R ) dereases with W B R inreasing. P B R = 1 − W RR − D RxT x W RR N . (1) Calulating P ( RR ) . W e use the results from [16℄ to alulate P RR in Eq. 2 . Similarly as in the previous ase, P ( RR ) dereases with W RR inreasing. P RR = 1 − W RR − D AC K W RR N . (2) W e w an t the ollision probabilit y in either ases to b e lo w er than 10%, whi h w e onsider an aeptable ollision rate. T o deriv e the v alue of b oth on ten tion windo ws W B R and W RR , w e plot Fig. 4 using D AC K from T able 3 . The sim ulation results pro vided b y an iterating C++ program are presen ted as dots in Fig. 4 and mat h the theoretial results. W e see that with W RR = 30 ms and W B R = 1 0 ms w e a hiev e P < 0 . 1 . 5.2 Routing proto ol on a random graph Ev aluating the p erformane of a routing proto ol is a task t ypially done b y sim ulation, as routing an b e seen as a omplex global b eha vior emerging from simple lo al in terations b e- t w een no des. W e ran these sim ulations on a home-made C++ sim ulator. In this subsetion, w e hose to use a graph where no des are randomly p ositioned, the X and Y o ordinates b eing randomly p ositioned within [0 . . . 1000] . W e assume a onstan t omm uniation range of 200, and a simple Unit Disk Graph propagation mo del. W e v ary the a v erage n um b er of neigh b or no des, and alulate the n um b er of no des aordingly . Ea h no de runs a p erfet MA C proto ol (whi h do es not mo del ollisions) and the routing proto ol desrib ed in sub- setion 2.3 . Ea h message is sen t from a randomly and uniformly hosen no de (onneted to the sink) to the sink no de. Sim ulation is p erformed in rounds. A t ea h round, a no de deides whi h of its neigh b ors is the next hop aording to our routing proto ol, and sends its data. A t the same time, w e up date the sink no de's p osition as follo ws. The sink no de's X p osition is inreased b y a n um b er hosen randomly and uniformly b et w een 0 and a maxim um v alue (alled speed in Fig. 5 and Fig. 6 ). When the X p osition rea hes the b order of the eld (here 1000), it is INRIA WiFly: WSNs and Virtual o or dinates 15 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 10000 20000 30000 40000 50000 P D P(BR) P(RR) Figure 4: Collision probabilit y for N = 5 . The theoretial results are presen ted as plain lines whereas the results obtained b y sim ulation are represen ted as unonneted dots. T o ease readabilit y , w e ha v e plotted P = 0 . 1 . Sim ulation results are a v eraged o v er 10 5 runs. dereased (at ea h iteration) un til it rea hes zero. The same algorithm is applied to the sink no des Y ategory . As a results, the sink no de mo v es in a diretion pi k ed in [north-east, south-east, south-w est, north-w est℄, and b ounes o the edges of the eld m u h lik e a ball on a p o ol table. The rst result w e w an t to extrat is the n um b er of restarts the routing proto ol under- go es. Although this feature mak es the proto ol robust to link dynamis and sink mo v emen t, w e w an t to k eep the n um b er of restarts lo w as it inreases the n um b er of hops. W e depit the n um b er of restarts v ersus the a v erage n um b er of neigh b ors in Fig. 5. The n um b er of restarts is lo w in all runs. Note that the 95% ondene in terv al lo oks large b eause of the lo w v alues of the n um b er of restarts. Y et, w e see that the n um b er of restarts dereases when the n um b er of neigh b ors inreases and the sink sp eed dereases. A rst reommendation w ould b e to k eep the sp eed of the M S as lo w as p ossible. W e will see in the next paragraph that this is not neessarily true. In Fig. 6 , w e plot the n um b er of hops for a message to rea h the sink no de. The fat that this n um b er inreases with the n um b er of neigh b ors should not b e misundersto o d. Indeed, with a lo w a v erage n um b er of neigh b ors, the soure no de is neessarily lose to the sink, as the probabilit y for a no de to b e onneted dereases qui kly with distane [17℄. The surprising results here is that the n um b er of hops dereases when sink mobilit y inreases. This is someho w on traditory with the previous observ ation, as sink mobilit y inreases the n um b er of restarts, th us hop oun t. Y et, sink mobilit y inreases the probabilit y that the sink RR n ° 6471 16 W atteyne, Barthel, Dohler, A ugé-Blum -0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 2 4 6 8 10 12 14 16 18 Average number of restarts Number of neighbors speed 0 speed 50 speed 100 Figure 5: Num b er of restarts on a random graph . The n um b er of restarts is relativ ely lo w, and dereases with sink sp eed dereasing and n um b er of neigh b ors inreasing. A 95% ondene in terv al is presen ted with the data. enoun ters the message during its transmission. Fig. 6 sho ws that this b eha vior outbalanes the inreased hop oun t due to routing proto ol restarts. 5.3 Routing proto ol on the regular graph Subsetion 5.2 presen ts results on a random graph, with a random sink mo v emen t. Moreo v er, the sink alw a ys sta ys onneted to the net w ork. Y et, w e w ould lik e to p erform similar sim ulations on the regular graph of Fig. 3 to ha v e data omparable to the exp erimen tal results. Our top ology is th us a regular grid of 25 no des. The total net w ork is a square of size 100m. W e assume the M S lea v es the net w ork b y the side opp osite to the one it en tered. W e assume that it mo v es in a straigh t line, at a onstan t sp eed. W e ha v e t w o mobilit y mo dels. In the rst one (alled edg e in Figs. 7-8 -9 ), the M S en ters in the lo w er- left orner, and lea v es at the lo w er righ t orner. In the seond one (alled diag onal in Figs. 7-8 -9 ), it en ters at the lo w er-left orner but lea v es at the upp er-righ t orner. These t w o mo dels represen t the shortest and longest duration the M S is onneted to the net w ork, resp etiv ely . With the sink lea ving the net w ork, it is no w p ossible that the net w ork times-out, i.e. the M S has already left the net w ork when the message should ha v e rea hed it. W e therefore an ha v e a non-zero miss ratio, the ratio of the messages not rea hing the M S . INRIA WiFly: WSNs and Virtual o or dinates 17 0 10 20 30 40 50 60 2 4 6 8 10 12 14 16 18 Average number of hops Average number of neighbors speed 0 speed 50 speed 100 Figure 6: Hop oun t on a random graph . Whereas sink no de mobilit y inreases the n um b er of restarts, th us the n um b er of p oten tial hops, it globally dereases the n um b er of hops. A 95% ondene in terv al is presen ted with the data. In Fig. 7 , w e plot the n um b er of restarts as a funtion of the sink sp eed. W e see that, due to the fat that the M S is only onneted to the net w ork for a limited duration, the routing proto ol has no time to trigger restarts. As stated b efore, it is p ossible than the M S mo v es to o fast to allo w a message to rea h it. Fig. 8 depits miss ratio against sink sp eed. As exp eted, this n um b er inreases with the sink sp eed. Moreo v er, as mo ving along the diagonal allo ws more time for the message to rea h the sink, the miss ratio is less. One should b e areful when reading Fig. 9 as it sho ws the n um b er of hops needed for a message to rea h the sink where only messages whi h atually rea h it are tak en in to aoun t. The fat that this n um b er dereases with the sink sp eed inreasing has t w o auses: (1) the sink enoun ters the message and (2) for a high sink sp eed, the miss ratio b eing high, suessful transmission originate from soure no des already lose to the sink's tra jetory . 6 O-site exp erimen tal results 6.1 Energy onsumption of the 1hopMA C proto ol Prior to the demonstration results, w e study the energy onsumption of our omm uniation sta k. As it is the MA C proto ol whi h on trols the state of the radio mo dule (transmis- sion, reeption or idle), with a giv en PHY la y er, energy eieny is primarily a MA C-la y er RR n ° 6471 18 W atteyne, Barthel, Dohler, A ugé-Blum -1 -0.5 0 0.5 1 0 50 100 150 200 250 Average number of restarts Sink speed (km/h) edge diagonal Figure 7: Num b er of restarts on a regular graph . 0 0.2 0.4 0.6 0.8 1 0 50 100 150 200 250 Miss ratio Sink speed (km/h) edge diagonal Figure 8: Ratio of missed messages b eause of net w ork time-out on a regular graph . Sim ulation results are a v eraged o v er 10 4 runs. INRIA WiFly: WSNs and Virtual o or dinates 19 3 4 5 6 7 8 9 10 11 12 0 50 100 150 200 250 Average number of hops when message reaches Sink speed (km/h) edge diagonal Figure 9: Hop oun t on a regular graph . Sim ulation results are a v eraged o v er 10 4 runs. issue. As a rst exp erimen tal setting, w e read the p o w er onsumption using a osillosop e atta hed diretly to the p o w er soure of no des. W e will analyze in more detail the p o w er onsumption v alues and dieren t duration, but let's rst fo us on Fig. 10 whi h plots the p o w er onsumption as a funtion of time at a sending (upp er part) and a reeiving no de (lo w er part). W e rep eat this exp eriene for dieren t metri v alues. W e ha v e dra wn v ertial lines to ease the in terpretation of the data presen ted in Fig. 10 . On the leftmost part, the sending no de sends a series of miroframes; the reeiv er w ak es up and reeiv es one miro-frame. F rom the information it on tains, the reeiv er is put ba k to sleep un til the last miro-frame is sen t. In the en tral part, the sender starts listening for an AC K message, whi h the reeiv ers sends after a ba k o prop ortional to its metri. As for these measuremen ts w e ha v e used the rst v arian t of 1-hopMA C (refer to [8℄ for details), the sender swit hes o its radio after suessfully reeiving a rst AC K . In the righ tmost part, after the on ten tion windo w for the AC K messages has passed, b oth sending and reeiving no des swit h their radios ba k on. The sender starts b y informing the reeiv er it has b een seleted as the next hop, and sends the D AT A to it. This simple 2-no de setting pro vides us with in teresting information: The radio mo dule has a ma jor impat on the total energy budget of a no de and its ativit y an b e diretly read from the p o w er onsumption of the whole no de; Sending, reeiving or idle listening onsume appro ximately the same amoun t of energy; W e v erify our implemen tation b y noting that the AC K messages are sen t at dieren t instan ts dep ending on the v alue of the no de's metri. RR n ° 6471 20 W atteyne, Barthel, Dohler, A ugé-Blum 0.02 0.04 0.06 0.02 0.04 0.06 0.04 0.06 0.02 0.04 0.06 -0.01 -0.005 0 0.005 0.01 0.015 0.02 0.025 Power (W) Time (sec) ACK for metric=0 ACK for metric=3 ACK for metric=5 Figure 10: P o w er onsumption v ersus time during Phase 4 with t w o omm uniating no des. Measuremen ts for a transmitter and the reeiv er are presen ted in the upp er and lo w er parts, resp. The exp erimen t is rep eated for a metri equal to 0, 3 and 5, hene the three groups of gures. Note that the rst part of the pream ble is trunated to ease readabilit y . EM2420 mo dule 0dBm -25dBm P sleep 8.018 m W 2.735 m W P poll 8.629 m W 3.300 m W P listen 65.833 m W 61.030 m W P T x 66.156 m W 32.807 m W P Rx 70.686 m W 65.444 m W T able 5: Consumption of the individual radio states No w that w e ha v e a lear piture of the funtioning of our implemen tation, w e extrat the energy onsumption of the dieren t radio states. W e do this analysis for transmission at b oth 0dBm and -25dBm, and for b oth t yp es of no des. W e mak e sure that all measured timers and pa k et duration are onsisten t with the requiremen ts from T able 3. The rst set of results is presen ted in T able 5 , and relate to the p o w er onsumption of individual states of the radio hip. Using the onsumption mo del, w e an start analyzing more marosopi b eha viors. Let's onsider w e are using the EM2420 mo dule with its transmission p o w er set to - 25dBm. This mo dule is p o w ered b y t w o AAA alk aline batteries, pro viding a total of ab out INRIA WiFly: WSNs and Virtual o or dinates 21 EM2420 mo dule 0dBm -25dBm E preamb a 1.243 mJ 0.467 mJ E T x 3.494 mJ 2.440 mJ E comp 1.545 mJ 0.592 mJ E Rx 1.796 mJ 0.843 mJ a This v alue is measured, the others are deriv ed from T ables. 3 and 5. T able 6: Consumption of ma jor proto ol phases using 1 − hopM AC basic , with a mean n um b er of neigh b ors of 5 10,000 J (2.8 Wh). When no ativit y go es on, all no des op erate in pream ble sampling mo de. W e ha v e measured that this mo de onsumes 3.300 m W on a v erage, oering a lifetime of 850 hours, or 35 da ys. A MA C proto ol su h as IEEE802.11 whi h lea v es the radio mo dules on w ould onsume 61.030 m W during idle p erio d, oering a lifetime of only 45 hours, ev en without tra. T o omplete our energy onsumption mo del, w e deriv e the energy needed for sending and reeiving a pa k et. Note that rela ying a pa k et is equiv alen t to reeiving and retransmitting it. W e onsider for these alulations that ea h no de has 5 neigh b ors on a v erage. Sending a pa k et is equiv alen t to sending a pream ble, then listening and reeiving 5 AC K messages, and nally sending the D AT A message. This results in energy onsumption of E T x . Among the 5 neigh b ors, all will onsume the energy equiv alen t to reeiving one pream ble, and sending an AC K ( E C omp ). Among the 5 neigh b ors, only one will ha v e the additional ost of reeiving the data, resulting in a total energy exp enditure of E Rx . Th us, sending a pa k et under these assumptions osts E T x + E comp + E Rx . Refer to Eq. 3 for the detailed alulation. E T x = E preamb + ( W RR − N · D AC K ) P listen + ( N · D AC K ) P Rx + D DAT A P T x E comp = ( D RRp + W RR + D DAT A − D cca − D AC K ) × P sleep + P Rx D cca + P T x D AC K E Rx = ( D RRp + W RR − D cca − D AC K ) P sleep + P Rx D cca + P T x D AC K + P Rx D DAT A (3) T able 6 pro vides us with some in teresting insigh ts on the funtioning of our MA C pro- to ol. First, all no des are virtually on at an y time, a v oiding ostly (re-)syn hronization me hanisms. Seond, it enables on tin uous tuning of the lateny/energy eieny trade-o through tuning T mf . Finally , w e see that our proto ol transfers most of the energy burden of omm uniation to the sender. Indeed, sending a message osts ab out 2-3 times more energy than reeiving one. This has a ma jor impat on upp er-la y er proto ol design as ha ving a dense net w ork do es not jeopardize energy-eieny . RR n ° 6471 22 W atteyne, Barthel, Dohler, A ugé-Blum By oupling the 1-hopMA C proto ol with the 3rule routing proto ol and virtual o ordi- nates, w e self-organize the net w ork in a v ery ost eetiv e w a y as no struture needs to b e main tained when the net w ork sits idle. 6.2 Collision probabilit y at MA C lev el The aim of the 1-hopMA C proto ol is to a v oid main taining a neigh b orho o d table. Instead, this table is impliitly built on-demand with no des a kno wledging a request during a on- ten tion windo w. All no des send their AC K message after a ba k o prop ortional to some metri, whi h w e onsider uniformly distributed in some range. Sev eral AC K messages ma y ollide, in whi h an these messages are lost. As the requesting no de hoses the no de whi h answ ers rst as the next hop, a ollision in v olving this rst message an result in ho osing the wrong next hop no de. This phenomenon has b een analyzed in [16℄, with the simple assumption that all messages o v erlapping in time ollide and are lost (see subsetion 5.1). Y et, this assumption do es not tak e in to aoun t the apture eet whi h happ ens when a reeiving no de suessfully deo des at least one of the messages whi h w ere o v erlapping. In other w ords, the assumption used in [16℄ ma y b e to o p essimisti. The aim of this subsetion is to v erify and quan tify this. The exp erimen tal setting go es as follo ws. As depited in Fig. 11 , a en tral no de is onneted to a host omputer through the dev elopmen t kit pro vided with the EM2420 mo dules, with 5 battery-p o w ered no des surrounding it. The basi exp erimen t is divided in t w o phases. During the rst phase, the host omputer randomly hoses 5 in teger metris within [0 .. 361] , and transfers them to the en tral no de. W e ho ose the range [0 .. 361] b eause this is the range the built-in random generator of the EM2420 mo dules op erates in. The en tral no de then broadasts a pa k et on taining these metris. Ea h surrounding no de pi ks one of these metris using a predened sequene (ea h no de pi ks a dieren t metri). In the seond phase, the en tral no de uses the 1-hopMA C proto ol and issues a request. Based on the reeiv ed AC K messages, its tak es a deision of whi h is the next hop. This deision is transfered ba k to the host omputer, whi h ompares it with the theoretial deision ( i.e. the no de with lo w est metri should ha v e b een hosen). By rep eating this exp erimen t a large n um b er of times, it is p ossible to extrat the probabilit y 1-hopMA C tak es the wrong deision, aused b y ollision b et w een AC K messages. W e plot our exp erimen tal results together with sim ulation and theoretial results in Fig. 12 . Ea h no de on tains a metri b et w een 0 and 361. The dierene b et w een Fig. 12 and Fig. 4 is that the former w as dra wn with a disrete set of 362 p ossible ba k o v alues, uniformly distributed in [0 . . . W RR ] The results onrm our analysis that the apture eet lo w ers the ollision probabilit y , i.e. sim ulation and analysis are to o p essimisti ompared to exp erimen tation. T o quan tify the gain, w e in tegrate the urv es and nd a 1.21% derease of the exp erimen tal ollision probabilit y ompared to the theoretial one. As a onsequene, the v alues of the on ten tion windo w W RR determined in Setion 5.1 are v alid and ev en a little onserv ativ e. The same result applies to W B R . INRIA WiFly: WSNs and Virtual o or dinates 23 Host Figure 11: The exp erimen tal setting used to determine the ollision probabilit y . 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 10000 20000 30000 40000 50000 collision probability between ACK W RR (10 -6 sec) simulation experimentation theory Figure 12: Comparing the exp erimen tal ollision probabilit y with theoretial and sim ulation results. Sim ulation results are a v eraged o v er 10 5 ; exp erimen tal results o v er 8000 runs. RR n ° 6471 24 W atteyne, Barthel, Dohler, A ugé-Blum 75 m plane’s trajectory MS WSN landing strip BS 20 m Figure 13: Exp erimen tal setup of the WiFly demo (bird's view). 7 On-site exp erimen tation results The exp erimen tat w as arried out during the summer at Alp e d'Huez, a ski resort in the F ren h Alps. The airraft is a MS2001 with a wingspan of 2.20 meters, p o w ered b y a 7.5 motor, and on trolled b y a Multiplex radio. It ies at ab out 25 km/h. During the exp erimen ts, w e ask ed the pilots to y ab o v e the net w ork and the base station at an altitude of no more than 5 m. F or the net w ork and the base station to b e disonneted, they are deplo y ed at the opp osite ends of the run w a y , ab out 80 m apart. As depited in Fig. 13 , w e used a 16-no de net w ork. Due to the nature of the terrain, the deplo y ed net w ork sligh tly diers from the one used in the previous Setions of this rep ort. After some adjustmen ts, the exp erimen t ran smo othly . A laptop w as onneted to the B S and drew the neigh b ors of the soure no de as w ell as the path follo w ed b y the last message, in real time. Fig. 14 sho ws su h a snapshot. It is in teresting to note that due to the random nature of the eletromagneti signal, neigh b ors no des are not alw a ys the losest ones ( e.g. no de 12 is not no de 0's neigh b or in Fig. 14 ). W e refer the in terested reader to the rst author's w ebsite for omplemen tary photos and videos of the exp erimen t. INRIA WiFly: WSNs and Virtual o or dinates 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 source Figure 14: Snapshot of the real-time displa y during the exp erimen t. Ea h n um b er iden ties a no de. Note that the top ology depited here is upside-do wn ompared to Fig. 13 . Dashed lines onnet the soure no de (here 0) with its neigh b ors (here 7 and 8). Plain arro ws indiate the path b et w een the soure no de and the MS (here 0->7->10). 8 Conlusion and future w ork In this rep ort, w e ha v e presen ted a omplete energy-eien t self-organizing omm uniation ar hiteture, omp osed of the 1-hopMA C and the 3rule routing proto ols, used o v er virtual o ordinates. The appliation in v olv es a mobile sink going ba k and forth b et w een a base station whi h issues requests, and a wireless sensor net w ork. W e ha v e used sim ulation to sho w the ollision probabilit y at MA C la y er, and the routing p erformanes. These harateristis w ere v eried b y exp erimen tation, together with the energy onsumption of our platform. This platform w as used in a real-w orld deplo ymen t, with the mobile sink moun ted on a radio on trolled airplane. F rom a proto ol p oin t of view, urren t and future w ork in v olv es optimizing the routing proto ol b y up dating the virtual o ordinates to ha v e a lo w er hop oun t. W e w an t to reuse the platform presen ted here, and w e are urren tly w orking on do umen ting the dieren t steps needed to implemen t a giv en proto ol. A kno wledgemen ts The authors w ould lik e to thank Mi haël Gauthier for his tremendous w ork and motiv ation for implemen ting our proto ols, Julien Gaillard for his great w ork on the hardw are of the RR n ° 6471 26 W atteyne, Barthel, Dohler, A ugé-Blum mote, T ahar Jarb oui for his help on Think and Loï Amadu and Loris Grasset from "Sejours V aanes Mo délisme" at Alp e d'Huez for letting us use their radio on trolled planes. Referenes [1℄ J. P olastre, R. Szew zyk, and D. Culler, T elos: Enabling ultra-lo w p o w er wireless resear h, in International Confer en e on Information Pr o essing in Sensor Networks: Sp e ial tr ak on Platform T o ols and Design Metho ds for Network Emb e dde d Sensors (IPSN/SPOTS) . Los Angeles, CA, USA: IEEE, April 2005. [2℄ X. Jiang, J. P olastre, and D. Culler, P erp etual en vironmen tally p o w ered sensor net- w orks, in International Symp osium on Information Pr o essing in Sensor Networks (IPSN) . Los Angeles, CA, USA: IEEE, April 2005, pp. 463468. [3℄ R. Szew zyk, J. P olastre, A. Main w aring, and D. Culler, Lessons from a sensor net- w ork exp edition, in Eur op e an W orkshop on Wir eless Sensor Networks (EWSN) , Berlin, German y , Jan uary 2004. [4℄ D. Culler, D. Estrin, and M. Sriv asta v a, Ov erview of sensor net w orks, IEEE Com- puter, Guest Editors' Intr o dution , v ol. 37, no. 8, pp. 4149, 2004. [5℄ K. Langendo en, A. Baggio, and O. Visser, Murph y lo v es p otato es: Exp erienes from a pilot sensor net w ork deplo ymen t in preision agriulture, in 14th Int. W orkshop on Par al lel and Distribute d R e al-Time Systems (WPDR TS) . Rho des, Greee: A CM, April 25-26 2006. [6℄ C. Dugas, Conguring and managing a large-sale monitoring net w ork solving real w orld hallenges for ultra-lo w p o w ered and long-range wireless mesh net w orks, Inter- national Journal of Network Management , v ol. 15, pp. 269282, 2005. [7℄ D. Clark, New sensor line inspires start-ups, The W al l Str e et Journal , v ol. 1, p. 6, Mar h 27 2006. [8℄ T. W atteyne, A. Ba hir, M. Dohler, D. Barthel, and I. Augé-Blum, 1-hopma: An energy-eien t ma proto ol for a v oiding 1-hop neigh b orho o d kno wledge, in Interna- tional W orkshop on Wir eless A d-ho and Sensor Networks (IWW AN) . New Y ork, NY, USA: IEEE, June 2006. [9℄ T. W atteyne, I. Augé-Blum, M. Dohler, and D. Barthel, Geographi forw arding in wireless sensor net w orks with lo ose p osition-a w areness, in 18th A nnual International Symp osium on Personal, Indo or and Mobile R adio Communi ations (PIMR C) . A thens, Greee: IEEE, Septem b er 3-7 2007. INRIA WiFly: WSNs and Virtual o or dinates 27 [10℄ T. W atteyne, D. Simplot-Ryl, I. Augé-Blum, and M. Dohler, On using virtual o ordi- nates for routing in the on text of wireless sensor net w orks, in 18th A nnual Interna- tional Symp osium on Personal, Indo or and Mobile R adio Communi ations (PIMR C) . A thens, Greee: IEEE, Septem b er 3-7 2007. [11℄ A. Ba hir, D. Barthel, M. Heusse, and A. Duda, Miro-frame pream ble ma for m ulti- hop wireless sensor net w orks, in International Confer en e on Communi ations (ICC) . Istan bul,T urk ey: IEEE, 11-15 June 2006. [12℄ H. F rey and I. Sto jmeno vi, On deliv ery guaran tees of fae and om bined greedy-fae routing algorithms in ad ho and sensor net w orks, in Twelfth A CM A nnual Interna- tional Confer en e on Mobile Computing and Networking (MOBICOM) . Los Angeles, CA, USA: A CM, Septem b er 23-29 2006. [13℄ B. Karp and H. Kung, Gpsr: Greedy p erimeter stateless routing for wireless net w orks, in A nnual International Confer en e on Mobile Computing and Networking (Mobi om) . A CM, August 2000, pp. 243254. [14℄ G. Shim and D. P ark, Lo ators of mobile sinks for wireless sensor net w orks, in Inter- national Confer en e on Parl lel Pr o essing W orkshops (ICPPW) , 2006, pp. 159164. [15℄ J. H. Shin, J. Kim, K. P ark, and D. P ark, Railroad: virtual infrastruture for data dissemination in wireless sensor net w orks, in 2nd A CM International W orkshop on Performan e Evaluation of Wir eless A d Ho , Sensor, and Ubiquitous Networks (PE- W ASUN) , Otob er 2005, pp. 168174. [16℄ T. W atteyne, I. Augé-Blum, M. Dohler, and D. Barthel, Reduing ollision proba- bilit y in wireless sensor net w ork ba k o-based eletion me hanisms, in IEEE Glob al T ele ommuni ations Confer en e (GLOBECOM) . W ashington, DC, USA: IEEE, 26-30 No v em b er 2007. [17℄ F. A. Onat and I. Sto jmeno vi, Generating random graphs for atuator net w orks, in IEEE International Symp osium on a W orld of Wir eless, Mobile and Multime dia Networks (W oWMoM) . Helsinki, Finland: IEEE, 18-21 June 2007 2007. RR n ° 6471 Unité de recherche INRIA Rhône-Alpe s 655, av enue de l’Eu rope - 38334 Montbonno t Saint-I smier (France) Unité de reche rche INRIA Futurs : Parc Club Orsay Uni versité - ZAC de s V ignes 4, rue Jacques Monod - 91893 ORSA Y Cedex (France ) Unité de reche rche INRIA Lorraine : LORIA, T echnopôle de Nancy- Brabois - Campus scientifique 615, rue du Jardin Botani que - BP 101 - 54602 V illers-lè s-Nancy Cedex (France) Unité de reche rche INRIA Rennes : IRISA, Campus univ ersitai re de Beaulie u - 35042 Rennes Cedex (France ) Unité de recherch e INRIA Rocquen court : Domaine de V oluceau - Rocquencourt - BP 105 - 78153 Le Chesnay Cedex (France) Unité de reche rche INRIA Sophia Antipolis : 2004, route des Lucioles - BP 93 - 06902 Sophia Antipolis Cedex (France) Éditeur INRIA - Domaine de V olucea u - Rocquenco urt, BP 105 - 78153 Le Chesnay Cede x (France) http://www.inria.fr ISSN 0249 -6399 ISSN 0249-6399 apport de recherche Thème COM INSTITUT N A TION AL DE RECHERCHE EN INFORMA TIQUE ET EN A UTOMA TIQ UE W iFly: experimenting with W ireless Sensor Netw orks and V irtual coordinates Thomas W atteyne — Dominique Barthel — Mischa Dohler — Isabelle Augé-Blum N° ???? January 2008 Unité de recherche INRIA Rhône-Alpes 655, av enue de l’Europe, 38334 Montbonnot Saint Ismier (France) Téléphone : +33 4 76 61 52 00 — Télécopie +33 4 76 61 52 52 WiFly: exp erimenting with Wireless Sensor Net w orks and Virtual co ordinates ∗ Thomas W atteyne † ‡ , Dominique Barthel † , Misc ha Dohler § , Isab elle Augé-Blum ‡ Thème COM — Systèmes communican ts Pro jet ARES Rapp ort de rec herche n° ???? — January 2008 — 27 pages Abstract: Exp erimentation is imp ortant when designing comm unication proto cols for Wireless Sensor Netw orks. Low er-lay ers ha v e a ma jor impact on upper-lay er performance, and the complexit y of the phenomena can not b e entirely captured b y analysis or simulation. In this report, w e go through the complete process, from designing an energy-efficien t self- organizing communication architecture (MA C, routing and application la yers) to real-life exp erimen tation roll-outs. The presented communication architecture includes a MAC proto col whic h av oids build- ing and maintaining neigh b orho o d tables, and a geographically-inspired routing protocol o ver virtual coordinates. The application consists of a mobile sink interr ogating a wireless sensor net work based on the requests issued b y a disconnected base station. After the design pro cess of this architecture, we verify it functions correctly by simulation, and w e perform a temp oral v erification. This study is needed to calculate the maximum sp eed the mobile sink can take. W e detail the implementation, and the results of the off-site exp erimen tation (energy consumption at PHY lay er, collision probabilit y at MAC lay er, and routing). Finally , we report on the real-w orld deplo yment where we hav e mounted the mobile sink node on a radio-controlled airplane. Key-w ords: Wireless Sensor Net works, experimentation, multi-hop wireless comm unica- tion, virtual coordinates, mobile sink no de. ∗ This work was partially supp orted by the F rench Ministry of Researc h under contract ARESA ANR- 05-RNR T-01703. † F rance T elecom R&D, Meylan, F rance. firstname.lastname@orange-ftgroup.com ‡ ARES INRIA / CITI, INSA-Lyon, F-69621, F rance. firstname.lastname@insa-lyon.fr § Centre T ecnològic de T elecomunicacions de Cataluny a (CTTC), Barelona, Spain. misc ha.dohler@cttc.es WiFly: exp érimentation a v ec un Réseaux de capteurs et des co ordonnées virtuelles Résumé : L’étude exp érimen tale est imp ortante lorsque l’on crée des proto coles de communicati on p our réseaux de capteurs sans fils. Les couche proto colaires bas niv eau ont un grand impact sur les performances des couches sup érieures, et la complexité des phénomènes ne peut pas être entièremen t capturé par l’analyse mathématique ou la simulation. Dans ce rapp ort, nous décriv ons le pro cessus complet, depuis la mise en place d’une architecture de communication efficace en énergie et auto-organisante (couches MAC, routage et application), jusqu’au déploiemen t réel. L’arc hitecture de communication présentée comporte un proto cole MAC qui évite la construction et la main tien de tables de voi sinage, ainsi qu’un proto cole de routage inspiré par les proto coles de routage géographique. Celui-ci s’appuie sur des co ordonnées virtuelles des noeuds, indép endantes de leurs co ordonnées réelles. L’application consiste en un noeud de collecte mobile in terrogeant un réseau de capteurs sans fi l, à partir de requêtes émises par une station de base déconnectée du réseau. Après le pro cessus de mise en place de cette architecture, nous vérifions son b on fonctionnement par simulation, et nous effectuons une étude temporelle. Cette dernière est utile p our calculer la vitesse maximale du noeud de collecte mobile. Nou s détaillons les phases de l’implémen tation, et les résultats des exp érimentations préliminaires (consommation énergétique à la couc he PHY, probabilité de collision au niveau MAC, et routage). Finalement, nous présen tons l’exp érimentation finale où nous montons le no eud de collecte mobile su r un a vion radioguidé. Mots-clés : Réseaux de capteurs, expérimentation, communication sans fil m ulti-sauts, co ordonnées virtuelles, noeud de collecte mobile. WiFly: WSNs and Virtual c o or dinates 3 1 In tro duction and related w ork Muc h effort has b een put during the last 5-10 year in to Research on Wireless Sensor Netw orks (WSNs). Numerous conferences, journals and sp ec ial issues are dedicated to these netw orks, and new solution app ear on a w eekly basis. Despite all this activity , a surprisingly lo w n umber of actual deploymen t examples ha ve b een made public. Whereas rolling out a solution can b e considered more part of engineering rather than Researc h, we argue that ph ysical implementat ion confronts the researcher with imp ortant on-field constrain ts. As solutions for WSNs are cross-lay ered, and as these solutions are largely impacted b y low er la yers (e.g. wireless transmission), real world confron tation has a very b eneficial impact on Researc h. Real-w orld deploymen t has b een largely simplified by the app earance of commercial pro ducts. The most-known MICA wireless sensor no des hav e b een develo p ed by lab oratories at Universit y of California at Berkeley . They w ere initially commercialized b y Crossb ow (Mica2 in 2002, Mica2dot in 2003), the latest versions (Tmote SKY in 2004 [1], Tmote Mini in 2007) are brought to the mark et by Moteiv, a spin-off company of the Univ ersity of California at Berk eley . On-going Research is aiming at dev eloping energy-harv esting no des which collect data from their en vironment, radically c hanging the energy-constrained assumption made for WSNs. In [2], the authors for example attach a solar panel to an early v ersion of the Tmote SKY nodes. A pioneering team at Berkeley lead the smart dust pro ject, which used the early v ersions of the Mica2 motes to do pro of-of-concept demonstration. An early exp eriment in 2001 in volv ed a autonomous radio-controlled airplane which dropp ed sensors along a highw ay to monitor the passing of large military v ehicles. The plane con tinuously passed abov e them to collect the measured data, which was then transfered back to a base station. In 2002, a 43-no de netw ork w as deploy ed on an uninhabited island 15km off the coast of Maine, USA [3]. This netw ork was used to monitor the migration and nesting habits of birds. With the monitored data b eing a v ailable online in real time, this deploymen t can b e seen as a milestone and an early public demonstration of WSNs. The same team deplo y ed a netw ork to monitor trees in a tropical forest [4]. In [5], the authors didactically describe the n umerous problems one can face du ring real-world deplo yments of WSNs. Since 2005, companies ha ve b een emerging whic h provide services ent irely based on WSNs. One interesting example is Coronis, a F rench start-up company , specialized in auto- mated meter reading. It’s first big deplo ymen t in v olved a netw ork of 25,000 nodes attac hed to the home water meters of a medium-sized cit y [6]. It no w has sold o v er a million of those sensors w orldwide. The compan y Arch Ro ck received ma jor attention lately [7]. It commercializes an off-the- shelf solution for small to medium scale monitoring WSNs (typically less than 100 nodes). Its current solution in volv es pac k aged Tmote SKY no des whic h communicate with a small p ersonal computer as sink no de. This computer in turn is connected to the In ternet and with the use of W eb Services allows the integration of this netw ork into larger applications. The main con tributions of this w ork are: RR n° 0123456789 4 W atteyne, Barthel, Dohler, A ugé-Blum • we present a complete energy-efficient self-organizing comm unication arc hi- tecture for Wireless Sensor Net works. This solution combines MAC and routing proto cols in to a cross-lay ered solution, and is particularly suited for lo w-throughput, dynamic and energy-constrained applications. • we implement this solution on a medium-sized net work. A mobile sink consisting of a radio controlled airplane is used to interrogate the WSN based on requests issued by a remote base station. Whereas our implementation resem bles the early implementation done by the Smart Dust team, the k ey difference is that the mobile sink comm unicates with a complete WSN and not a series of individual no des. In the latter case, the netw orking problems were largely simplified as the multi-hop nature of node-to-sink communication was essentially remo ved. Having a real multi-hop WSN raises interesting problems such as self-organization and real-time comm unication. The remainder of this rep ort is organized as follo ws. In Section 2, w e describ e the com- m unication architecture used in the WSN. The experimental setup is presented in Section 3 together with hardware details and frame durations. Section 4 fo cuses on real-time com- m unication, and calculates the maximum sp eed the mobile sink may mo ve at. Sim ulations results are presented in Section 5. Exp erimental results are s plit in tw o sections. Section 6 fo cuses on preliminary exp eriments conducted off-site, Section 7 prese nts the results obtained during deplo yment. This rep ort is concluded, and future work is presented in Section 8. 2 The comm unication architecture 2.1 Ov erview In this work, w e aim at ev aluating the p erformance of the stack represented in T able 1, which com bines the 1-hopMAC medium access control proto col [8], the 3rule routing proto col [9] and the use of virtual coordinates [10]. The main challenge is to form a complete energy-efficien t self-organizing comm unication architecture from these protocols. This includes adapting the differen t la yers one to the other. In the subsequen t subsections, w e detail the adaptations whic h w ere needed. 2.2 A dapting the 1-hopMA C proto col 1-hopMA C [8] is a medium access control proto col for WSNs which av oids the need to main tain a neighborho o d list. Maintaining such a list at each no de would mean p erio dically exc hanging Hello pack ets. This can turn out to b e v ery energy consuming, as Hello pack ets need to b e exchanged even when the net work sits idle. In a forest fire detection scenario (or any scenario with low throughput), the net work would dep lete its energy by p erio dically exc hanging Hello pac kets whereas there is no useful data to transmit. INRIA WiFly: WSNs and Virtual c o or dinates 5 Application connectivit y graph construction Routing 3rule routing virtual coordinates Medium access con trol 1-hopMA C Ph ysical la yer EM2420 module T able 1: The comm unication stack 1-hopMA C tac kles this problem in a fully on-demand solution. When a node w ants to send some data, it issues a request to whic h all of its neighbors answer using a back off timer in versely proportional to some metric. The no de whic h answers first is elected relaying no de. The metric attached to eac h no de does not need to b e uniq ue, but it should b e carefully chosen b y the routing lay er so that following a path of decreasing metric leads to the sink no de. T o b e fully energy-efficient, 1-hopMAC uses the v ariant of preamble sampling describ ed in [11], which enables idle duty cycle of as lo w as 1%. The idle dut y cycle accounts for the p ercen tage of time a no de has its radio on ("dut y cycle ") when no information is sen t or receiv ed ("idle"). In the original 1-hopMAC proto col, the sending no de could take action after receiving the first ackno wledgmen t message. As our routing proto col (describ ed next) needs the complete list of neigh b ors, w e modify the 1-hopMAC proto col b y asking the sending no de to wait for all the A CK messages before taking action. This mode is called the basic mo de in [8]. Note that, as such, if no des hav e very close metric, the ACK messages could b e separated b y a duration whic h is so small that ACK messages would collide. W e address and answer this problem in subsection 5.1. 2.3 A dapting the 3rule routing proto col It has b een shown in [9] that curren t geographic routing proto cols such as GFG [12] or GPSR [13] suffer from inaccurate positioning systems. Inacc urate position can ev en cause those routing proto cols to fail, i.e. they do not deliver their message although there exists a ph ysical path. The 3rule routing proto col (prese nted and called LeftHandGeoPR in [9]) asks eac h node to app end its iden tifier to the pack et header. With this information, it efficiently c ho oses the next hop node using a distributed v ersion of the well kno wn depth first search algorithm in a tree. Although the 3rule proto col increases the size of the pack et header, it is sho wn that it achiev es a 100% delivery ratio indep endently from the positioning accuracy , with a hop coun t iden tical to GFF or GPSR. RR n° 0123456789 6 W atteyne, Barthel, Dohler, A ugé-Blum Its robustness lead us to chose this routing proto col for our communica tion architecture. Nev ertheless, the presence of a mobile sink somewhat complicates the problem as the sink ma y ha v e mo v ed when the message reaches its original destination. When this happ ens, w e restart the 3rule routing proto col by erasing the sequence of tra versed no des in the header. W e show b y simulation in Section 5 that the protocol restarts only a limited n umber of times, and that this n umber quic kly decreases with lo wer speeds of the sink or n umber of neigh b ors increasing. Y et, us ing a geographical-based routing proto col implies that no des know their p ositions whic h is a costly assumption (b oth in terms of money and energy). As GPS-lik e solutions can not b e count on, we recently sho wed in [10] that virtual co ordinates can o vercome this problem. By iteratively applying cen troid transformation to initially random coordinates, the num ber of hops using the 3rule routing proto col on those virtual co ordinates drops sharply . It is sho wn that with ab out 10 cen troid rounds, the num ber of hops drops b y more than 50% c ompared to the fully random case. Curren t work shows that with another type of virtual co ordinate up date, the net work c onv erges to a state where path length only exceeds the shortest path b y 4%. Details will b e given in subsequent publications. The use of virtual co ordinates is particularly suited for the case of a mobile sink. Indeed, as in our solution the sink keeps the same predefined virtual p osition (regardless of its real ph ysical p osition), it do es not need to perio dically inform the other no des of its p osition. This, w e b elieve, is a ma jor adv antage of using virtual co ordinates, and is muc h simpler than the classical perio dic heartb eat [14] or rendez-v ous p oint [15] solutions. 3 Exp erimental setup and implemen tation details 3.1 The exp erimentation framew ork In order to test the comm unication architecture presented in Section 2, we need to add some proto cols to op erate in a realistic environmen t with a real application. Our target application is an on-demand trac king system, where w e assume only one no de answ ers a sp ecific request. A mobile sink is given a query by a base-station which is disconnected from the netw ork (Phase 1). It trav els to the WSN netw ork where it communicates this query to a random no de (Phase 2). The query is then broadcasted in the netw ork (Phase 3). The no de which holds the answ er (called source node) transmits it using our comm unication arc hitecture to the mobile sink (Phase 4). The mobile sink ackno wledges this reception (Phase 5), trav els back to the base station to which it transmits the data (Phase 6). Refer to Fig. 1 for an illustration of the exp erimentatal framework. F rom the previous description, it is clear that our main interest is how the data is transmitted from the source no de to the mobile sink, i.e. Phase 4. All other phases are used to provide a real-world ev aluation framework, but are not the core of our study . That’s why these phases ma y use simplistic/suboptimal solutions. W e now detail the different phases, introducing the pack et names: INRIA WiFly: WSNs and Virtual c o or dinates 7 WSN MS BS Figure 1: The exp erimental framework setting. • Phase 1: Data Request. This phase inv olves the base station ( B S ) and the mobile sink ( M S ). The B S p erio dically sends Data Request messages with p erio d T DR p and of duration D DR p . These D Rp messages are formed b y a sequence of micro-frames, whic h each contain the num b er S eq of remaining micro-frame in the D Rp message. The M S c hec ks whether the medium is free ev ery T cca and during D cca . D cca is chosen suc h that it hears a complete micro-frame when a sequence of micro-frames is sent ( D cca ≥ T DR p + D DR p ). When the M S correctly receives a micro-frame, it calculates using S eq when the B S finishes to send all the microframes the D Rp message consists of, and sends an AC K . Whenever the B S is not sending a D R p message, it is listening to medium, waiting for the AC K message. Once the AC K is sent, the M S enters phase 2. • Phase 2: starting Broadcast Request. This phase in volv es the mobile sink ( M S ) and the WSN. After phase 1, the M S p erio dically sends Broadcast Requests with p erio d T B Rp and of d uration D B Rp . Similar to the D R p messages, these B Rp messages are formed by a sequence of micro-frames. When a node hears a B Rp micro-frame, it w aits for the en d of the B Rp and starts a random bac koff B B R uniformly chosen within a con ten tion window of length W B R . During its back off duration B B R , it listens for other p otential B Rp message. If it receives a s econd B Rp , it cancels B B R and restarts it D B Rp later. When B B R elapses, the no de sends a B Rp . Up on hearing a relay ed B R p , the mobile sink kno ws its B R p has been heard, and it en ters directly Phase 5. • Phase 3: Broadcast Request. This phase only in volv es the WSN. The back off- based algorithm describ ed in Phase 2 is carried out b et ween all no des. Its goal is to flo o d the complete netw ork. Note that each no de will send exactly one copy of B Rp . The node which holds the answ er to the request identifies itself. Up on receiving the B R p , it do es not start the B B R bac koff but rather the B S RC . This bac k off is used to w ait for the flo o d to pass. Up on elapsing B S RC , the source no de enters Phase 4. Note that all other no des enter Phase 4 after receiving a second copy of the B Rp , or after rela ying it. RR n° 0123456789 8 W atteyne, Barthel, Dohler, A ugé-Blum • Phase 4: Routing. This phase only in volv es the WSN. This is the phase w e are in terested in. The source no de sends a message to the M S using the comm unication arc hitecture describ ed in Section 2. W e call D AT A the data messages, and B AC K the bac koff taken within a con ten tion windo w W RR . Note that B AC K is proportional to the metric of the no de, whic h is the virtual distance to the M S . In order to b e more robust, w e ask eac h node to listen to the medium for a fixed duration B RR . If during this p erio d, it do es not hear another no de retransmitting RRp , it assumes it was lost and retransmits it. • Phase 5: D A T A reception b y mobile sink. This phase in volv es the mobile sink ( M S ) and the WSN. The M S has entered this phase after Phase 2, and is waiting for the D AT A to reac h it. It runs the 1-hopMAC proto col describ ed in Secti on 2 but has a metric of 0. After receiving the DAT A , it sends an AC K to inform the sender not to retransmit the message. The M S then switches to Phase 6. All no des, after successfully rela ying the message switc h to Phase 2. • Phase 6: D A T A retriev al b y base station. This phase in v olves the base station ( B S ) and the mobile sink ( M S ). Recall that the B S p erio dically sends D R p messages. Phase 6 is similar to Phase 1, the only difference b eing that the M S answ ers to the D Rp with a DAT A pack et. 3.2 P arameters and hardw are F or exp erimental testing of our communication architecture, we hav e used a WSN comp osed of 20 Em ber EM2420 no des. The core components of these sensor s are a Em b er/Chip con CC2420 radio c hip, and a A tmel AtMega128 micro-controller. Some no des were equipped with sensing devices, push/slide button and light meters. All no des were programmed using a component based language called Think, which is developed at F rance T elecom R&D. Unlik e the Tin yOS or Con tiki op erating systems, Think is based on a set of components whic h are compiled together to form a binary co de, which is then loaded on to the nodes. This comp onents approach offers great flexibility and co de re-use as individual components suc h as the scheduler or a sp ecific routing proto col do not need to be reprogrammed when c hanging application. This is also true for changing platform, whic h enabled us to use t w o platforms. As those no des are very constrained, we were limited by the following. The transmission queue is limited to 128 b ytes, which is thus the maxim um size of the DAT A pac kets. The EM2420 module is 802.15.4 enabled, but while w e completely replaced its MAC proto col with 1-hopMA C, w e w ere still b ound b y the hardw are to use 2 byte addresses. The nodes comm unicate at 250 kbps, with one physical symbol enco ding 4 bits of data. As for our sim ulations, we assumed ha ving a 25 no de netw ork, with an av erage n umber of neighbors of 5. The EM2420 needs T RxT x = 192 µs to switch b etw een reception and transmission states, whic h we needed to take into account during implementation of our proto cols. The base station is formed b y a laptop connected via a RS232 link to the EM2420 dev elopment kit. This connection is only used to monitor the activity of the base station, INRIA WiFly: WSNs and Virtual c o or dinates 9 whic h is really the no de connected to the dev elopment kit. As we wan ted to test a large range of mobile sink sp eeds, w e hav e us ed an MS 2001 radio-con trolled airplane with an EM2420 node attached to it. The implemented application is the following. W e w ant to det ermine the netw ork top ol- ogy , i.e. which are the neighbors of each no de. F or this, the B S asks for the list of neigh b ors of a specific node, by putting the no de iden tifier in its D Rp , as sp ecified in the nect subsec- tion. Each plane rotation will enable the base B S to learn the neighbors of a sp ecific no de, and after a s eries of rotations, the B S will b e able to construct the connectivit y graph of the net work. Note that this is just a pro of-of-concept application, and this connectivit y graph is not used b y the MA C and routing la y ers. 3.3 P ac k et format, sizes and durations In T able 2, we summarize the different pack et formats and sizes. Note that pack ets of type D Rp , B Rp and RR p are really sequences of micro-frames. The tw o first bits of the S eq field are used to differentiate the micro-frames of a D Rp (00), B Rp (01) and R Rp (10); the remaining 6 are used to indicate the num ber of remaining micro-frames. As discussed ab o ve, the 0 xX 222 and address fields are a legacy of the 802.15.4. As a consequence, the destination address is alwa ys set to 0xffff, the broadcast add ress. W e use the source address to iden tify the sender. In the pa yload of the D Rp and B Rp micro-frames, w e sp ecify the address of the source no de (as we hav e less than 256 no des in our netw ork, 1 byte is enough to identify each no de). The payload of the RRp micro-frames is not used. Similarly , the S eq field of the AC K and D AT A messages is not used. The pa yload of the D AT A messages consists of tw o parts: the first one contains the sequence of trav ersed no des needed by the routing proto col, the second the list of neigh b ors of the source no de. Both fields are identified using a 1 byte length field in the data pa yload. The num b er of node addresses in the sequence and neigh b or list must total up to less than 119. T able 3 summarizes the durations of the different pack ets and timers. F or a generic pac ket X , its duration is identified b y D X , T X for its p erio d (if applicable), B X for the bac koff used when sending it (if applicable). Note that bac koff B X is drawn within the con tention window W X . When a pack et is iden tified b y X p , it means it is a sequence of micro-frames ( p stands for preamble). Note that the calculation of W B R and W RR are explained in subsection 5.1. 3.4 A c hiev able comm unication ranges During the early stages of the pro ject, we hav e p erformed some comm unication range mea- suremen ts using the EM2420 no des . Results are presen ted in T able 4. These measurements sho wed that the height of a no de has a significan t impact on the transmission range. In order to hav e a small netw ork (in large netw orks, people tend to lea v e no des behind during exp erimen tation), we hav e decided to use a fixed transmission p ow er of -25dBm. RR n° 0123456789 10 W atteyne, Barthel, Dohler, A ugé-Blum 0x6222 Seq. destination addr. source addr. payload Check Se q. micro-frame 0x4222 Seq. destination addr. source addr. Check Seq. A CK 0x2222 Seq. destination addr. source addr. payload Check Seq. · · · D A T A length sequence of tra versed no des neighbor list D A T A payload T able 2: Pac ket formats at MAC lev el. Each graduation repres e nts one b yte. D mf 512 µs 8 bits Seq + 8 bits payload T mf 930 µs D cca 1442 µs D mf + T mf T cca 140 ms 100 × D cca to ha ve 1% idle radio use D AC K 480 µs 8 bits Seq D DAT A 4 ms 128-8=120 data b ytes D DR p 144 ms 155 micro-frames T DR 200 ms > D DAT A + D DR p T B Rp 300 ms > 2 · D B Rp + W B R D B Rp 144 ms 155 micro-frames W B R 10 ms less than 10% collision probabilit y B B R randomly and uniformly c hosen in [0 ..W B R ] B S RC 1000 ms > 6( D B Rp + W B R ) D RRp 144 ms 155 micro-frames W RR 30 ms less than 10% collision probabilit y B AC K prop ortional to metric (uniformly distributed) B RR 500 µs > 0 T able 3: Timers and durations INRIA WiFly: WSNs and Virtual c o or dinates 11 transmission pow er height range 0 dBm 1 m 100 m -25 dBm 1 m 25 m -25 dBm 0 m 5 m T able 4: Range 4 Real-time v erification Real-time systems can be divided in tw o classes. Hard real-time systems guaran tee that a certain even t happens before a given deadline. Guaranteeing inv olv es some form of formal v alidation. Due to the hazardous nature of the wireless medium, and the unreliability of sensors no des, hard-real time communication proto cols for wireless sensor netw orks are often based on unrealistic assumptions suc h as a Unit Disk Graph propagation mo del. Soft real- time systems are made so that a p ortion of even ts happ ens within time b ounds. Because of link unreliability , the random nature of deploymen t and the path follo wed b y the M S , our comm unication architecture can not guarantee hard-real time constrain ts. Rather than a hard-real time v alidation (based on formal mo dels and static parameters), in this section we use mathematical models to show real-time constrain ts are v alidated in bad-case scenarios. The critical parameter when considering real-time in our setting is the sp eed of the M S . Indeed, the net work needs to broadcast the request and return the answ er b efore the M S lea ves the netw ork. The calculations presen ted in 4.2 and 4. 3 aim at finding a maxim um sp eed v max for the M S . 4.1 Goals and assumptions W e assume the M S mov es at an altitude of 5m ab ov e the nodes. Moreov er, as we use a transmission p ow er of -25 dBm, we consider that the net work and B S can communicate with the M S for up to 25m, according to 3.4. As depicted in Fig. 2, the M S is connected to another node for a duration corresp onding to a mo vemen t of 50m. 4.2 Comm unication b etw een the M S and the B S Comm unication b etw een M S and B S goes on in phases 1 and 6. In this analysis, we consider only phase 6 whic h is the w orst case with D AT A b eing a longer message than AC K . In this case w e ha ve v max = 50 T DR + D DRp + D DAT Amax ≈ 500 k m.h − 1 RR n° 0123456789 12 W atteyne, Barthel, Dohler, A ugé-Blum 25m MS BS or network node 5m ~50m Figure 2: Maximum distance o ver which the M S can tra v el while connected to the B S or a net work no de. W e argue that this requiremen t is not hard to meet as, to our knowledge, no radio con trolled plane ac hieves such speeds. 4.3 Comm unication b etw een the M S and the netw ork This problem is someho w more complex than the previous one b ecause (1) the M S communi- cates with the complete netw ork rather than with an individual no de and (2) communication inside the net work is complex and consists of broadcasting the request and transmitting the reply . W e mak e the follo wing assumptions. The net work consists of 25 no des regularly deplo yed in a square grid of size 5 hops, as depicted in Fig. 3. T w o no des on the same horizontal or v ertical line are separated by 25m. Using the simulation framew ork defined in Section 5, we obtain that the a verage n umber of hops using our comm unication sc heme is 8.771 with a 95% confidence in terv al [8 . 558 . . . 8 . 984] . As a cons equence, ev aluating the worst case hop count at 10 is a reasonable c hoice. W e assume the M S will trav erse the netw ork entering one side, and leaving at the opposite side. The distance during which the M S is connected to the netw ork is thus b et ween 150m and 190m. The broadcasting proto col is blind flo o ding. Using the simple proto col describ ed in Section 3, each no de will send one B Rp , and tw o neigh b or no des can not send at the same time. With the regular grid topology , the broadcast message will take up to a duration of 8 · ( W B R + D B Rp ) to reach the source no de, i.e. when the no de initiating the broadcast and the source in opp osite corners. B S RC needs to b e set so that the first R Rp message do es not collide with a remaining B Rp , i.e. the broadcast storm needs to be o ver. W e assume that a no de has at most 6 neigh b ors, whic h is conserv ativ e considering our top ology . In the w orst case scenario, all these neighbors hear one another, and eac h has a B R p message to send. Sending these messages will tak e at most 6 · ( W B R + D B Rp ) . As a consequence B S RC > 6 · ( W B R + D B Rp ) . Using these observ ations, w e obtain : INRIA WiFly: WSNs and Virtual c o or dinates 13 25m A B D E C 3 4 5 1 2 Figure 3: The regular 25 no de grid used to calculate v max . The av erage num b er of neighbor no des N = 3 . 20 . v max = 150 8 · ( W BR + D BRp )+ B S RC +10 · ( D RRp + W RR + D DAT A ) ≈ 140 k m.h − 1 W e argue that this v alue is reasonable for a M S mounted on a radio-controlled plane, whic h flies at a sp eed of ab out 50 k m.h − 1 . F or more demanding applications where the mobile sink is exp ected to go faster, it is p ossible to reduce T mf , thus the time betw een successiv e clear channel assessmen ts. This w ould enable th e preamble messages to b e arbi- trarily s hort in time, thus sp eeding up the multi-hop communication, thus increasing v max . Y et comm unication sp eed trades off with energy consumption, and reducing T mf increases the idle radio use. This is particularly constraining when the netw ork sits idle most of the time. 5 Sim ulation results 5.1 Collision probabilit y at MA C lev el W e hav e used join t analysis and sim ulation to determine the collision probabilit y b etw een messages. Collision can happ en at tw o instan ts (1) during th e broadcast of a message in phases 2 and 3, denoted P ( B R ) and (2) b et w een the AC K message during the routing pro cedure in phases 4 and 5, called P ( RR ) . W e calculate these collision probabilities for an av erage num ber of neighbors N = 5 . W e c hose to use a n umber larger than the a ver age v alue for the regular deplo yment in Fig. 3, to hav e a s ecurity margin as the collision probabilit y increases with the num b er of neigh b or no des. Calculating P ( B R ) . W e use the following assumptions. When a no de hears a B R for the first time, it starts a bac k off B B R randomly tak en within the con tention window W B R . During this duration, it remains in reception state to detect a p ossible rela y of the message RR n° 0123456789 14 W atteyne, Barthel, Dohler, A ugé-Blum b y another no de. If this has not happ ened when its bac k off timer elapses, it switches to transmission mo de and rela ys the B R . There is a p ossibility of collision because switching from reception to transmission mo de takes D RxT x = 192 µs . An analogy can b e drawn b etw een this collision probability and the one calculated in [16]. In this w ork, the authors calculate the collision probabilit y which in v olved the first AC K message. Collision w as defined as tw o messages ov erlapping in time. Here, we can use the exact same definition, only collision is defined as another no de pic king a back off time shorter than D RxT x after the first back off timer expires, whic h is strictly equiv alent to the calculation done in [16] but considering messages of duration D RxT x . The theoretical v alue of P ( B R ) is giv en in Eq. 1. W e are not surprised to see that P ( B R ) decreases with W B R increasing. P B R = 1 − W RR − D RxT x W RR N . (1) Calculating P ( RR ) . W e use the results from [16] to calculate P RR in Eq. 2. Similarly as in the previous case, P ( RR ) decreases with W RR increasing. P RR = 1 − W RR − D AC K W RR N . (2) W e wan t the collision probability in either cases to b e low er than 10%, which we consider an acceptable collision rate. T o derive the v alue of b oth conten tion windows W B R and W RR , w e plot Fig. 4 using D AC K from T able 3. The simulation results provided by an iterating C++ program are presented as dots in Fig. 4 and match the theoretical results. W e see that with W RR = 30 ms and W B R = 10 ms w e achiev e P < 0 . 1 . 5.2 Routing proto col on a random graph Ev aluating the p erformance of a routing proto col is a task typically done b y simulation, as routing can b e seen as a complex global b ehavior emerging from simple lo cal interactions b e- t ween no des. W e ran these sim ulations on a home-made C++ sim ulator. In this subsection, w e c hose to use a graph where no des are randomly p ositioned, the X and Y co ordinates b eing randomly p ositioned within [0 . . . 1000] . W e assume a constant comm unication range of 200, and a simple Unit Disk Graph propagation mo del. W e v ary the a v erage n umber of neigh b or no des, and calculate the num b er of nodes accordingly . Each no de runs a perfect MA C protocol (which do es not model collisions) and the routi ng proto col describ ed in sub- section 2.3. Each message is sen t from a randomly and uniformly c hosen no de (connected to the sink) to the sink no de. Sim ulation is p erformed in rounds. At each round, a no de decides which of its neighbors is the next hop according to our routing proto col, and sends its data. At the same time, w e up date the sink no de’s position as follo ws. The sink no de’s X p osition is increased by a n umber c hosen randomly and uniformly betw een 0 and a maxim um v alue (called speed in Fig. 5 and Fig. 6). When the X p osition reaches the b order of the field (here 1000), it is INRIA WiFly: WSNs and Virtual c o or dinates 15 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 10000 20000 30000 40000 50000 P D P(BR) P(RR) Figure 4: Collision probability for N = 5 . The theoretical resu lts are presented as plain lines whereas the results obtained b y simulation are represen ted as unconnected dots. T o ease readabilit y , w e ha ve plotted P = 0 . 1 . Sim ulation results are a veraged ov er 10 5 runs. decreased (at each iteration) until it reaches zero. The same algorithm is applied to the sink no des Y category . As a results, the sink no de mov es in a direction pic ked in [north-east, south-east, south-w est, north-w est], and bounces off the edges of the field muc h lik e a ball on a po ol table. The first result we wan t to extract is the n umber of restarts the routing protocol under- go es. Although this feature makes the proto col robust to link dynamics and sink mo vemen t, w e w ant to k eep the n umber of restarts low as it increases the n umber of hops. W e depict the num b er of restarts versus the av erage num b er of neigh b ors in Fig. 5. The num b er of restarts is lo w in all runs. Note that the 95% confidence interv al lo oks large b ecause of the lo w v alues of the num b er of restarts. Y et, we see that the num b er of restarts decreases when the num b er of neighbors increases and the sink sp eed decreases. A first recommendation w ould b e to keep the sp eed of the M S as low as p ossible. W e will see in the next paragraph that this is not necessarily true. In Fig. 6, w e plot the num b er of hops for a message to reach the s ink no de. The fact that this num b er increases with the n umber of neigh b ors should not b e misundersto o d. Indeed, with a low av erage n um b er of neigh b ors, the source no de is nece ssarily close to the sink, as the probability for a no de to be connected decreases quickly with distance [17]. The surprising results here is that the n um b er of hops decreases when sink mobility increases. This is somehow contradi ctory with the previous observ ation, as sink mobility increases the n umber of restarts, thus hop count. Y et, sink mobility increases the probability that the sink RR n° 0123456789 16 W atteyne, Barthel, Dohler, A ugé-Blum -0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 2 4 6 8 10 12 14 16 18 Average number of restarts Number of neighbors speed 0 speed 50 speed 100 Figure 5: Num b er of restarts on a random graph . The num b er of restarts is relativ ely lo w, and decreases with sink speed decreasing and num b er of neigh b ors increasing. A 95% confidence in terv al is presented with the data. encoun ters the message during its transmission. Fig. 6 shows that this b ehavior outbalances the increased hop coun t due to routing proto col restarts. 5.3 Routing proto col on the regular graph Subsection 5.2 presents results on a random graph, with a random sink mov ement. Moreov er, the sink alwa ys stays connected to the netw ork. Y et, we w ould like to p erform similar sim ulations on the regular graph of Fig. 3 to ha ve data comparable to the exp erimental results. Our topology is thus a regular grid of 25 nodes. The total net w ork is a square of size 100m. W e assume the M S leav es the netw ork by the side opp osite to the one it en tered. W e assume that it mov es in a straight line, at a constant sp eed. W e hav e t w o mobilit y mo dels. In the first one (called edg e in Figs. 7-8-9), the M S en ters in the low er- left corner, and leav es at the low er right corner. In the second one (called diag onal in Figs. 7-8-9), it enters at the low er-left corner but leav es at the upper-right corner. These t wo mo dels represent the shortest and longest duration the M S is connected to the netw ork, resp ectiv ely . With the sink leaving the netw ork, it is no w p ossible that the netw ork times-out, i.e. the M S has already left the net work when the message should ha ve reac hed it. W e therefore can ha ve a non-zero miss ratio, the ratio of the messages not reaching the M S . INRIA WiFly: WSNs and Virtual c o or dinates 17 0 10 20 30 40 50 60 2 4 6 8 10 12 14 16 18 Average number of hops Average number of neighbors speed 0 speed 50 speed 100 Figure 6: Hop count on a random graph . Whereas sink no de mobility increases the num b er of restarts, thus the n umber of p oten tial hops, it globally decreases the n um b er of hops. A 95% confidence in terv al is presented with the data. In Fig. 7, we plot the n um b er of restarts as a function of the sink speed. W e see that, due to the fact that the M S is only connected to the net work for a limited duration, the routing protocol has no time to trigger restarts. As stated before, it is p ossible than the M S mov es to o fast to allow a message to reach it. Fig. 8 depicts miss ratio against sink sp eed. As expected, this n umber increases with the sink sp eed. Moreov er, as moving along the diagonal allows more time for the message to reac h the sink, the miss ratio is less. One should b e careful when reading Fig. 9 as it shows the num b e r of hops needed for a message to reach the sink where only messages which actuall y reac h it are taken in to accoun t. The fact that this num b er decreases with the sink sp eed increasing has tw o causes: (1) the sink encounters the message and (2) for a high sink sp eed, the miss ratio b eing high, successful transmission originate from source no des already close to the sink’s tra jectory . 6 Off-site exp erimen tal results 6.1 Energy consumption of the 1hopMA C proto col Prior to the demonstration results, w e study the energy consumption of our communication stac k. As it is the MA C proto col which controls the state of the radio module (transmis- sion, reception or idle), with a giv en PHY la yer, energy efficiency is primarily a MAC-la y er RR n° 0123456789 18 W atteyne, Barthel, Dohler, A ugé-Blum -1 -0.5 0 0.5 1 0 50 100 150 200 250 Average number of restarts Sink speed (km/h) edge diagonal Figure 7: Number of restarts on a regular graph . 0 0.2 0.4 0.6 0.8 1 0 50 100 150 200 250 Miss ratio Sink speed (km/h) edge diagonal Figure 8: Ratio of missed messages b ecause of net work time-out on a regular graph . Sim ulation results are a veraged ov er 10 4 runs. INRIA WiFly: WSNs and Virtual c o or dinates 19 3 4 5 6 7 8 9 10 11 12 0 50 100 150 200 250 Average number of hops when message reaches Sink speed (km/h) edge diagonal Figure 9: Hop count on a regular graph . Sim ulation results are a veraged ov er 10 4 runs. issue. As a first experimental setting, w e read the p o w er consumption using a oscilloscop e attac hed directly to the p ow er source of no des. W e will analyze in more detail the p ow er consumption v alues and different duration, but let’s first focus on Fig. 10 which plots the p o wer consumption as a function of time at a sending (upp er part) and a receiving no de (lo wer part). W e rep eat this exp erience for different metric v alues. W e hav e dra wn v ertical lines to ease the in terpretation of the data presen ted in Fig. 10. On the leftmost part, the sending node sends a series of microframes; the receiv er w ak es up and receiv es one micro-frame. F rom the information it contains, the receiv er is put back to sleep until the last micro-frame is sent. In the central part, the s ender starts listening for an AC K message, whic h the receivers sends after a bac k off proportional to its metric. As for these measurements we hav e used the first v ariant of 1-hopMAC (refer to [8] for details), the sender switches off its radio after successfully receiving a first AC K . In the rightmost part, after the conten tion windo w for the AC K messages has passed, b oth sending and receiving no des switch their radios bac k on. The sender starts by informing the receiver it has been selected as the next hop, and sends the D AT A to it. This simple 2-node setting provides us with interesting information: • The radio mo dule has a ma jor impact on the total energy budget of a node and its activit y can b e directly read from the p ow er consumption of the whole node; • Sending, receiving or idle listening consume approxima tely the same amount of energy; • W e verify our implementation by noting that the AC K messages are sent at differen t instan ts dep ending on the v alue of the no de’s metric. RR n° 0123456789 20 W atteyne, Barthel, Dohler, A ugé-Blum 0.02 0.04 0.06 0.02 0.04 0.06 0.04 0.06 0.02 0.04 0.06 -0.01 -0.005 0 0.005 0.01 0.015 0.02 0.025 Power (W) Time (sec) ACK for metric=0 ACK for metric=3 ACK for metric=5 Figure 10: Po w er consumption v ersus time during Phase 4 with tw o comm unicating no des. Measuremen ts for a transmitter and the receiver are presented in the upp er and low er parts, resp. The exp eriment is rep eated for a metric equal to 0, 3 and 5, hence the three groups of figures. Note that the first part of the pream ble is truncated to ease readabilit y . EM2420 module 0dBm -25dBm P sleep 8.018 m W 2.735 m W P poll 8.629 m W 3.300 m W P listen 65.833 m W 61.030 m W P T x 66.156 m W 32.807 m W P Rx 70.686 m W 65.444 m W T able 5: Consumption of the individual radio s tates No w that we ha ve a clear picture of the functioning of our implemen tation, w e extract the energy cons umption of the differen t radio states. W e do this analysis for transmission at b oth 0dBm and -25dBm, and for both t yp es of no des. W e make sure that all measured timers and pack et duration are consisten t with the requirem e nts from T able 3. The first set of results is presented in T able 5, and relate to the pow er consumption of individual states of the radio c hip. Using the consumption model, w e can start analyzing more macroscopic b eha viors. Let’s consider we are using the EM2420 mo dule with its transmission pow er set to - 25dBm. This module is p ow ered by tw o AAA alk aline batteries, providing a total of ab out INRIA WiFly: WSNs and Virtual c o or dinates 21 EM2420 module 0dBm -25dBm E preamb a 1.243 mJ 0.467 mJ E T x 3.494 mJ 2.440 mJ E comp 1.545 mJ 0.592 mJ E Rx 1.796 mJ 0.843 mJ a This v alue is measured, the others are derived from T ables. 3 an d 5. T able 6: Consumption of ma jor proto col phases using 1 − hopM AC basic , with a mean num b er of neigh b ors of 5 10,000 J (2.8 Wh). When no activit y go es on, all no des op erate in preamble sampling mo de. W e hav e measured that this mo de consumes 3.300 m W on av erage, offering a lifetime of 850 hours, or 35 da ys. A MAC proto col such as IEEE802.11 whic h lea ves the radio mod ules on would consume 61.030 m W during idle p erio d, offering a lifetime of only 45 hours, ev en without traffic. T o complete our energy consumption mo del, w e deriv e the energy needed for sending and receiving a pack et. Note that relaying a pack et is equiv alent to receiving and retransmitting it. W e consider for thes e calculations that each no de has 5 neighbors on a verage. Sending a pac ket is equiv alen t to sending a preamble, then listening and receiving 5 AC K messages, and finally sending the D AT A message. This results in energy consumption of E T x . Among the 5 neighbors, all will consume the energy equiv alent to receiving one preamble, and sending an AC K ( E C omp ). Among the 5 neighbors, only one will hav e the additional cost of receiving the data, resulting in a total energy exp enditure of E Rx . Th us, sending a pack et under these assumptions costs E T x + E comp + E Rx . Refer to Eq. 3 for the detailed calculation. E T x = E preamb + ( W RR − N · D AC K ) P listen + ( N · D AC K ) P Rx + D DAT A P T x E comp = ( D RRp + W RR + D DAT A − D cca − D AC K ) × P sleep + P Rx D cca + P T x D AC K E Rx = ( D RRp + W RR − D cca − D AC K ) P sleep + P Rx D cca + P T x D AC K + P Rx D DAT A (3) T able 6 pro vides us with some in teresting insigh ts on the functioning of our MAC pro- to col. First, all nodes are virtually on at any time, av oiding costly (re-)synchronization mec hanisms. Second, it enables contin uous tuning of the latency/energy efficiency trade-off through tuning T mf . Finally , w e see that our proto col transfers most of the energy burden of comm unication to the sender. Indeed, sending a message costs ab out 2-3 times more energy than receiving one. This has a ma jor impact on upp er-lay er proto col design as having a dense net work do es not jeopardize energy-efficiency . RR n° 0123456789 22 W atteyne, Barthel, Dohler, A ugé-Blum By coupling the 1-hopMAC proto col with the 3rule routing proto col and virtual co ordi- nates, we self-organize the netw ork in a very cost effective w ay as no structure needs to b e main tained when the net work sits idle. 6.2 Collision probabilit y at MA C lev el The aim of the 1-hopMA C proto col is to av oid maintaining a neigh b orho o d table. Instead, this table is implicitly built on-demand with nodes ackno wledging a request during a con- ten tion window. All no des send their AC K message after a bac koff proportional to some metric, which w e consider uniformly distributed in some ran ge. Sev eral AC K messages ma y collide, in whic h can these messages are lost. As the requesting no de c hoses the node whic h answ ers first as the next hop, a collision inv olving this first message can result in choosing the wrong next hop no de. This phenomenon has b een analyzed in [16], with the simple assumption that all messages ov erlapping in time collide an d are lost (see subsection 5.1). Y et, this assumption does not take in to account the capture effect whic h happens when a receiving no de successfully decodes at least one of the messages which were ov erlapping. In other words, the assumption used in [16] may b e to o p essimistic. The aim of this subsection is to v erify and quan tify this. The exp erimen tal setting go es as follo ws. As depicted in Fig. 11, a central no de is connected to a host computer through the developmen t kit provided with the EM2420 mo dules, with 5 battery-pow e red nodes surrounding it. The b asic experiment is divided in t wo phases. During the first phase, the host computer randomly c hoses 5 in teger metrics within [0 .. 361] , and transfers them to the cen tral no de. W e c ho ose the range [0 .. 361] b ecause this is the range the built-in random generator of the EM2420 mo dules op erates in. The cen tral no de then broadcasts a pac ket conta ining these metrics. Eac h surrounding no de picks one of these metrics using a predefined sequence (each no de pi c ks a different metric). In the second phase, the central no de uses the 1-hopMAC proto col and issues a request. Based on the receiv ed AC K messages, its takes a decision of whic h is the next hop. This decision is transfered back to the host computer, whic h compares it with the theoretical decision ( i.e. the no de with lo w est metric should hav e b een chosen). By rep eating this experiment a large num b er of times, it is p ossible to extract the probabilit y 1-hopMAC takes the wrong decision, caused b y collision betw een AC K messages. W e plot our exp erimen tal results together with simulation and theoretical results in Fig. 12. Each node con tains a metric b etw een 0 and 361. The difference b etw een Fig. 12 and Fig. 4 is that the former was drawn with a discrete set of 362 p ossible bac koff v alues, uniformly distributed in [0 . . . W RR ] The results confirm our analysis that the capture effect low ers the collision probability , i.e. simulation and analysis are too pessimistic compared to experimentation. T o quan tify the gain, we integrate the curves and find a 1.21% decrease of the exp eriment al collision probabilit y compared to the theoretical one. As a consequenc e , the v alues of the conten tion windo w W RR determined in Section 5.1 are v alid and even a little conserv ativ e. The same result applies to W B R . INRIA WiFly: WSNs and Virtual c o or dinates 23 Host Figure 11: The exp erimental setting used to determine the collision probabilit y . 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 10000 20000 30000 40000 50000 collision probability between ACK W RR (10 -6 sec) simulation experimentation theory Figure 12: Comparing the exp erimental collision probability with theoretical and sim ulation results. Simulation results are av eraged o ver 10 5 ; experimental results o v er 8000 runs. RR n° 0123456789 24 W atteyne, Barthel, Dohler, A ugé-Blum 75 m plane’s trajectory MS WSN landing strip BS 20 m Figure 13: Exp erimental setup of the WiFly demo (bird’s view). 7 On-site exp erimen tation results The exp erimentat w as carried out during the summer at Alp e d’Huez, a ski resort in the F rench Alps. The aircraft is a MS2001 with a wingspan of 2.20 meters, p ow ered by a 7.5cc motor, and controlled b y a Multiplex radio. It flies at ab out 25 km/h. During the exp erimen ts, w e asked the pilots to fly ab ov e the netw ork and the base station at an altitude of no more than 5 m. F or the net work and the base station to b e disconnected, they are deploy ed at the opp osite ends of the runw a y , ab out 80 m apart. As depicted in Fig. 13, w e used a 16-node net work. Due to the nature of the terrain, the deploy ed net work slightly differs from the one used in the previous Sections of this rep ort. After some adjustmen ts, the exp eriment ran smo othly . A laptop w as connected to the B S and drew the neigh b ors of the source no de as w ell as the path follow ed b y the last message, in real time. Fig. 14 shows such a snapshot. It is in teresting to note that due to the random nature of the electromagnetic signal, neigh b ors no des are not alwa ys the closest ones ( e.g. no de 12 is not no de 0’s neighbor in Fig. 14). W e refer the in terested reader to the first author’s w ebsite for complemen tary photos and videos of the exp eriment. INRIA WiFly: WSNs and Virtual c o or dinates 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 source Figure 14: Snapshot of the real-time displa y during the exp eriment. Eac h num b er identifies a no de. Note that the top ology depicted here is upside-down compared to Fig. 13. Dashed lines connect the source no de (here 0) with its neigh b ors (here 7 and 8). Plain arrows indicate the path betw een the source node and the MS (here 0->7->10). 8 Conclusion and future w o rk In this rep ort, w e ha ve presen ted a complete energy-efficient self-organizing comm unication arc hitecture, composed of the 1-hopMAC and the 3rule routing protocols, used o v er virtual co ordinates. The application in volv es a mobile sink going bac k and forth b etw een a base station whic h issues requests, and a wireless sensor netw ork. W e hav e used simulation to show the collision probabilit y at MAC lay er, and the routing p erformances. These characteristics were verified b y exp erimentat ion, together with the energy consumption of our platform. This platform was used in a real-world deplo yment, with the mobile sink mounted on a radio controlled airplane. F rom a protocol point of view, current and future w ork in v olves optimizing the routing proto col by up dating the virtual co ordinates to ha ve a lo wer hop count. W e wan t to reuse the platform presen ted here, and we are currently working on do cumenting the differen t steps needed to implemen t a giv en protocol. A c knowledgemen ts The authors w ould lik e to thank Michaël Gauthier for his tremendous work and motiv ation for implemen ting our proto cols, Julien Gaillard for his great work on the hardw are of the RR n° 0123456789 26 W atteyne, Barthel, Dohler, A ugé-Blum mote, T ahar Jarb oui for his help on Think and Loïc Amadu and Loris Grasset from "Sejours V acances Mo délisme" at Alp e d’Huez for letting us use their radio con trolled planes. References [1] J. P olastre, R. Szewczyk, and D. Culler, “T elos: Enabling ultra-lo w p o w er wireless researc h,” in International Confer enc e on Information Pr o c es sing in Sensor Networks: Sp e cial tr ack on Platform T o ols and Design Metho ds for Network Emb e dde d Sensors (IPSN/SPOTS) . Los Angeles, CA, USA: IEEE, April 2005. [2] X. Jiang, J. Polastre, and D. Culler, “P erp etual environmen tally p ow ered s ensor net- w orks,” in International Symp osium on Information Pr o c essing in Sensor Networks (IPSN) . Los Angeles, CA, USA: IEEE, April 2005, pp. 463–468. [3] R. Szewczyk, J. Polastre, A. Mainw aring, and D. Culler, “Lessons from a sensor net- w ork exp edition,” in Eur op e an W orkshop on Wir eless Sensor Networks (EWSN) , Berlin, German y , Jan uary 2004. [4] D. Culler, D. Estrin, and M. Sriv astav a, “Overview of sensor netw orks,” IEEE Com- puter, Guest Editors’ Intr o duction , v ol. 37, no. 8, pp. 41–49, 2004. [5] K. Langendoen, A. Baggio, and O. Visser, “Murphy lov es p otatoes: Exp eriences from a pilot sensor netw ork deploymen t in precision agriculture,” in 14th Int. W orkshop on Par al lel and Distribute d R e al-Time Systems (WPDR TS) . Rho des, Greece: A CM, April 25-26 2006. [6] C. Dugas, “Configuring and managing a large-scale monitoring netw ork solving real w orld challenges for ultra-low pow ered and long-range wireless mesh netw orks,” Inter- national Journal of Network Management , v ol. 15, pp. 269–282, 2005. [7] D. Clark, “New sensor line inspires start-ups,” The W al l Str e et Journal , vol. 1, p. 6, Marc h 27 2006. [8] T. W atteyne, A. Bachir, M. Dohler, D. Barthel, and I. Augé-Blum, “1-hopmac: An energy-efficien t mac proto col for av oiding 1-hop neighborho o d knowledge,” in Interna- tional W orkshop on Wir eless A d-ho c and Sensor Networks (IWW AN) . New Y ork, NY, USA: IEEE, June 2006. [9] T. W atteyne, I. Augé-Blum, M. Dohler, and D. Barthel, “Geographic forwarding in wireless sensor net works with loose p osition-a wareness,” in 18th Annual International Symp osium on Personal, Indo or and Mobile R adio Communic ations (PIMRC) . Athens, Greece: IEEE, September 3-7 2007. INRIA WiFly: WSNs and Virtual c o or dinates 27 [10] T. W atteyne, D. Simplot-Ryl, I. Augé-Blum, and M. Dohler, “On using virtual co ordi- nates for routing in the context of wireless sensor netw orks,” in 18th Annual Interna- tional Symp osium on Personal, Indo or and Mobile R adio C ommunic ations (PIMR C) . A thens, Greece: IEEE, Septem b er 3-7 2007. [11] A. Bachir, D. Barthel, M. Heusse, and A. Duda, “Micro-frame pream ble mac for m ulti- hop wireless sensor netw orks,” in International Confer enc e on Communic ations (ICC) . Istan bul,T urk ey: IEEE, 11-15 June 2006. [12] H. F rey and I. Sto jmeno vic, “On delivery guarantees of face and com bined greedy-face routing algorithms in ad ho c and sensor net works,” in Twelfth ACM Annual Interna- tional Confer enc e on Mobile Computing and Networking (MOBICOM) . Los Angeles, CA, USA: A CM, Septem b er 23-29 2006. [13] B. Karp and H. Kung, “Gpsr: Greedy p erimeter stateless routing for wireless netw orks,” in Annual International Confer enc e on Mobile Computing and Networking (Mobic om) . A CM, August 2000, pp. 243–254. [14] G. Shim and D. P ark, “ Lo cators of mobile sinks for wireless sensor netw orks,” in Inter- national Confer enc e on Parl lel Pr o c essing W orkshops (ICPPW) , 2006, pp. 159–164. [15] J. H. Shin, J. Kim, K. Park, and D. P ark, “Railroad: virtual infrastructure for data dissemination in wireless sensor netw orks,” in 2nd ACM International W orkshop on Performanc e Evaluation of Wir eless A d Ho c, Sensor, and Ubiquitous Networks (PE- W ASUN) , Octob er 2005, pp. 168–174. [16] T. W atteyne, I. Augé-Blum, M. Dohler, and D. Barthel, “Reducing collision proba- bilit y in wireless sensor net work back off-based election mec hanisms,” in IEEE Glob al T ele c ommunic ations Confer enc e (GLOBECOM) . W ashington, DC, USA: IEEE, 26-30 No vem b er 2007. [17] F. A. Onat and I. Sto jmeno vic, “Generating random graphs for actuator net works,” in IEEE International Symp osium on a W orld of Wir eless, Mobile and Multime dia Networks (W oWMoM) . Helsinki, Finland: IEEE, 18-21 June 2007 2007. RR n° 0123456789 Unité de recherche INRIA Rhône-Alpes 655, av enue de l’Europe - 38334 Montbonnot Saint-Ismier (France) Unité de recherche INRIA Futurs : Parc Club Orsay Uni versité - ZA C des V ignes 4, rue Jacques Monod - 91893 ORSA Y Cedex (France) Unité de recherche INRIA Lorraine : LORIA, T echnopôle de Nancy-Brabois - Campus scientifique 615, rue du Jardin Botanique - BP 101 - 54602 V illers-lès-Nancy Cedex (France) Unité de recherche INRIA Rennes : IRISA, Campus univ ersitaire de Beaulieu - 35042 Rennes Cedex (France) Unité de recherche INRIA Rocquencourt : Domaine de V oluceau - Rocquencourt - BP 105 - 78153 Le Chesnay Cedex (France) Unité de recherche INRIA Sophia Antipolis : 2004, route des Lucioles - BP 93 - 06902 Sophia Antipolis Cedex (France) Éditeur INRIA - Domaine de V oluceau - Rocquencourt, BP 105 - 78153 Le Chesnay Cedex (France) http://www.inria.fr ISSN 0249-6399
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment