Coteto-Free Perodc Message Sceduler Medum Access Cotrol Wreless Sesor / Actuator Networks Tomas W. Carley ECE Departmet Uversty of Marylad tcarley@eg.umd.edu Moussa A. Ba Embedded Researc Solutos mba@embeddedzoe.com Rajeev Barua ECE Departmet Uversty of Marylad barua@eg.umd.edu Davd B. Stewart Embedded Researc Solutos dstewart@embeddedzoe.com Abstract Ts paper presets a tme dvso multple access medum access cotrol protocol for wreless sesor / actuator etworks mplemeted wt a coteto-free message sceduler. A message sceduler s used to determe wc message as access to te medum at ay tme. A set of messages s coteto-free f oly oe message s ready at a tme. Oterwse, some oter crtero suc as prorty must be used to resolve coteto. I ts case te message sceduler at eac ode te etwork must scedule all messages order to resolve coteto. If te scedule s coteto-free owever, te eac ode oly scedules te messages tat terest t. Te key cotrbuto of our coteto-free sceduler protocol s scalablty. Large wreless sesor / actuator etworks may cota udreds of odes excagg tousads of messages. Due to resource costrats t s feasble tat eac ode scedule every message. Our protocol scales by optmzg eac ode to scedule oly te messages t s terested. 1. Itroducto Recet mprovemets tecology ave made possble expesve etworks of sesors ad actuators tat commucate wrelessly. Ts as made possble a ew rage of applcatos [2]. Oe example s evrometal motorg ad cotrol. Wreless sesor / actuator etworks allow scetsts to motor remote evrometal codtos suc as temperature, pressure, ad cemcal presece. Evrometal motorg ad cotrol ca be used to detect forest fres ad alert autortes, or eve extgus te fre. Aoter example s precso agrculture. Wreless sesor / actuator etworks ca sese sol codtos suc as temperature, mosture, ph level, ad cemcal cotet to eable precse applcato of agets suc as water, fertlzer, ad pestcde. Idustral applcatos clude process cotrol, ad robot gudace ad cotrol. Mltary applcatos clude as battlefeld tellgece, supply logstcs, ad tellget gudace systems. May wreless sesor / actuator etwork applcatos ave tmeless costras, bot o actvtes o dvdual odes, ad across multple odes. Ts results tmeless costrats o bot tasks rug o odes ad messages excaged by odes. Medum access cotrol (MAC) s oe of te most mportat, ad most studed, protocol layers wreless sesor / actuator etworks. Wreless sesor / actuator etworks are ofte caracterzed by extreme costrats o sze, cost, power, ad tmeless. Ts mposes costrats o every aspect of te desg of tese etworks, especally te protocol stack. Wreless etworks are eretly broadcast meda; all odes te etwork sare oe commo commucato medum. Terefore, a metod for resolvg coteto we multple odes requre access to te medum s ecessary. Ts s te purpose of a MAC protocol. Te MAC protocol defes ow ad we odes may access te medum. It must esure tat odes sare te medum suc a way tat applcato requremets are met. Te MAC protocol as a large mpact o te effcecy of te etwork. May tecques ave bee developed for MAC over te years. Tose appled to wreless etworks fall uder te followg categores: Aloa, CSMA, CDMA, FDMA, ad TDMA. Te costrats mposed o wreless sesor / actuator etworks lmt te use of tese protocols. Aloa ad CSMA tecques are o-determstc ad so coflct wt tmeless ad power costrats. CDMA s complex ad ca ot be mplemeted wt te lmted resources of wreless sesor / actuator odes. FDMA s effcet for perodc messages commo real-tme systems. Tradtoal TDMA mplemetatos are based o a table tat determes wc message as access to te etwork at ay gve tme. Table TDMA s determstc ad effcet. Furtermore, te table may be optmzed for eac ode to clude oly te messages tat t seds or receves. However, mplemetatos are memory tesve. Recet work as proposed a promsg approac to MAC tat uses determstc real-tme scedulg to
mplemet TDMA [4]. Eac ode rus a real-tme scedulg algortm to determe wc message as access to te medum. Te autors refer to ter approac as mplct coteto. Eac message mplctly coteds for te medum troug te scedulg algortm, for example wt prortes, stead of explctly o te medum. Ufortuately, to mplemet mplct coteto, eac ode must scedule all messages te etwork; t caot be optmzed for eac ode lke table TDMA. Te complexty of MAC for eac ode ts approac grows learly wt te umber of messages te etwork. It does ot scale to large wreless sesor / actuator etworks wc may cota udreds to tousads of messages, ad were eac ode as extremely lmted computato ad memory resources. Furter, te etwork sceduler determes access of messages o te etwork wtout regard for te separate task sceduler tat cotrols executo of real-tme tasks o te ode. Ts creates a coflct betwee te etwork sceduler ad real-tme task sceduler; breakg tmeless guaratees of bot. I ts paper a determstc scedulg TDMA MAC protocol tat addresses tese ssues specfcally for wreless sesor / actuator etworks s preseted. A perodc model for messages travelg o te etwork s used. A coteto-free scedule s costructed for te messages o te etwork to esure tat tere s o coteto for te medum, ot eve te etwork sceduler. Sce tere s o coteto te etwork sceduler eac ode oly eeds to scedule te messages tat cocer t. Te complexty of eac ode oly grows wt te umber of messages t s cocered wt, wc s ofte costat. Ts reducto space ad tme complexty of te etwork sceduler results savgs memory ad processor utlzato, ad terefore, power cosumpto. Ts eables scalablty to large wreless sesor / actuator etworks. Furter, sce te etwork sceduler for eac ode oly scedules messages tat are set or receved by tat ode t s possble to ufy t wt te task sceduler for tat ode. Aalyss may te be performed to determe f tere s ay terferece betwee etwork ad computatoal tasks. Ts paper s orgazed as follows. Secto 2 dscusses caracterstcs of our wreless sesor / actuator etwork model. Secto 3 provdes formal deftos for symbols, ad troduces termology used trougout te paper. Secto 4 dscusses wreless etwork MAC protocols ad aalyzes ter advatages ad dsadvatages. Secto 5 detals our coteto-free message sceduler TDMA MAC protocol. Secto 6 dscusses expermets ad results. Secto 7 cocludes te paper. Secto 8 dscuses future work related to ts researc. 2. Wreless Sesor / Actuator Network Caracterstcs Ts secto dscusses caracterstcs of our wreless sesor / actuator etwork model terms of etwork topology, te messages passed o te wreless etwork, ad te odes te etwork. Te wreless sesor / actuator etwork cossts of a set of odes. I ts paper some odes are desgated for partcular tasks, suc as sycrozato. If a base stato exsts t may assg tese roles, oterwse a dstrbuted electo algortm may be used. For smplcty of desg ad presetato of our MAC we assume te etwork s sgle-op ad every ode te etwork ca commucate drectly wt every oter ode. We wll address mult-op etworkg future work. Messages a wreless sesor / actuator etwork ave very dfferet caracterstcs from tose oter etworks. Frst, messages ave tmeless costrats. As wt most real-tme systems a perodc model s used for messages. Secod, messages cosst of a umber of fxedsze packets. Most messages cosst of oly a sgle packet. Furter, te packets are small: a typcal sze s 32 bytes. Te justfcato for tese caracterstcs s tat te messages cosst of perodcally sampled sesor data. Due to extreme power ad cost costrats odes a wreless sesor / actuator etwork ave severely lmted resources. Te processors ave very lttle memory; typcally o te order of 256 bytes to 16 klobyte of RAM ad 4 klobytes to 128 klobytes of ROM. Processor speeds rage from 32 khz to 10 MHz. Eve so, tey use too muc power ad must eter low power sleep modes durg perods of actvty. Te wreless rado must also be expesve ad low power. Ts lmts badwdt ad rage. Typcal rados used wreless sesor / actuator etworks ave a badwdt from 9600 bts/secod to 56 klobts/secod ad rage from 10 to 100 meters. 3. Deftos & Termology I ts secto we defe symbols ad troduce termology used trougout te paper. = { m } s a set of messages; we messages are perodc m = ( ϕ, C, D, T ) wt teger propertes: pase (or offset) ϕ, umber of packets C, relatve deadle D, ad perod Τ. By perodc we mea tat te j t release of message m s r, j = ϕ + j T. Te relatve deadle specfes te legt of tme after release by wc te message trasmsso must be complete. We referrg to messages te ut of tme, t ut, s te tme t takes to trasmt oe packet o te wreless etwork, plus some costat overead eeded for te protocol. Te eed for, ad amout of, overead wll be dscussed secto 5. We assume, wtout loss of geeralty, tat messages are
o-decreasg order by perod. We deote te mum perod a message set as T. Te utlzato of a message set s U = = 1C T, were s te umber of messages te set. I wat follows, te greatest commo dvsor of a ad b s deoted gcd ( a, b ), ad te least commo multple of a ad b s deoted lcm( a, b ). Te yperperod Tˆ = lcm ( T) of a perodc message set s te = 1... perod wt wc ts scedule repeats. A message set s armoc f ad oly f eac message perod s a postve teger multple of all smaller message perods; equvaletly, eac message perod dvdes all larger message perods. We refer to a coteto-free message set as. Ν s a set of odes, wt a ode Ν. We refer to te messages set or receved by ode as. 4. Wreless Network MAC Protocols I ts secto we descrbe tradtoal MAC protocols used wreless etworks, suc as IEEE 802.11b, ad ow tey ave bee exteded for use wreless sesor / actuator etworks. Frst, we descrbe te two most commoly used MAC algortms wreless etworks: CSMA secto 4.1, ad TDMA secto 4.2. Eac of tese approaces as dsadvatages tat make t dffcult to satsfy te costrats o wreless sesor / actuator etworks dscussed secto 2. However, tey eac ave advatages tat we leverage our MAC desg. 4.1. CSMA Carrer sese multple access (CSMA) protocols are based o te followg algortm, toug tere are may varats [18]. CSMA reles of te fact tat odes ca sese te medum ad determe f t s use. We a ode as a message to sed t seses te medum ad wats for t to be dle for some partcular amout of tme, called te wat tme. It te seds ts message. I case of a collso te seder wats a certa amout of tme, called te back-off tme, before tryg to sed aga. Ts protocol s o-determstc by desg. Not oly ca collsos ot be predcted, but te wat ad back-off tmes are ofte radom order to mmze collsos. Ts makes CSMA approprate for wreless sesor / actuator etworks wt ard real-tme costrats o messages. However, by softeg te real-tme costrats CSMA may be appled to wreless sesor / actuator etworks. Despte tese drawbacks several CSMA protocols ave bee employed wreless sesor / actuator etworks. Ts s because CSMA s smple to mplemet ad etworks tat use t are easer to cofgure. Tese protocols attempt to mmze te ll effects CSMA as o power ad tmeless costrats of wreless sesor / actuator etworks. However, oe aceve determstc tmeless. PAMAS [15] uses a separate sgalg cael to eable odes to reduce power by dsablg te rado we tey are ot terested te message o te medum. Ter tecque as o effect o message delay or trougput. PAMAS aceves a 10-70% power savgs most systems smulated. S-MAC [19], spred by PAMAS, aceves smlar results power savgs wtout te separate cael for sgalg. However, S- MAC, messages suffer a crease delay. RAP [12] mproves soft real-tme respose tmes wt two approaces. Frst, RAP corporates prorty to te wat ad back-off tmes, decreasg te probablty tat a ger prorty message wll collde wt a lower prorty message. Secod, RAP troduces velocty mootoc scedulg (VMS), wc cosders bot dstace ad deadle we scedulg message routg a mult-op etwork. I BB [17] odes coted for te cael wt a eergy pulse wose durato s a fucto of te tme a ode wated for te cael to become dle. Ts aceves a roud rob scedulg of te medum. Wle ts provdes a determstc boud o message respose tme, roud rob scedulg s ot very good at meetg realtme costrats. 4.2. TDMA Ts secto dscusses tme dvso multple access (TDMA) MAC protocols. TDMA MAC protocols ave te advatage tat tey are determstc. TDMA MAC protocols determe wc message may access te medum based o te curret tme. Tradtoal TDMA s mplemeted wt a look-up table; ts approac s dscussed secto 4.2.1. Secto 4.2.2 dscusses a very dfferet approac to TDMA; usg a real-tme scedulg algortm to determe wc message may access te medum. Table TDMA s memory tesve ad statc but ca be optmzed for eac ode. Sceduler TDMA s less memory tesve but caot be optmzed for eac ode. Our approac, dscussed secto 5, s a coteto-free sceduler TDMA tat as te advatages of bot table ad sceduler TDMA, wle mmzg te dsadvatages. 4.2.1. Table TDMA Tradtoally, TDMA s mplemeted as a table tat determes wc message may access te wreless medum for eac ut of tme [18]. Te mum sze of ts table s te legt of tme te TDMA scedule defes, ofte te umber of tme uts after wc te scedule repeats or s updated. Te mmum sze of ts table s te total umber of messages te scedule, wc s aceved by removg from te table tme uts wc o messages are sceduled. Furter, f eac ode te etwork does ot eed to kow te etre scedule,
but oly te subset of te scedule tat volves te messages tat t eter seds or receves, te te table may be optmzed for eac ode. Ts s smlar cocept to te tecque tat our coteto-free sceduler TDMA MAC uses. We llustrate te complexty of exstg TDMA table approaces wt a set of perodc messages. Te TDMA table ca be flled wt a pweel scedule [9] geerated for te message set. A smple desg would be to ave a etry te TDMA table for eac tme ut te scedule. I ts case te mum sze of te TDMA table s te yperperod of te all message perods, T ˆ. For a set of perodc messages te mmum sze of ts table s te total umber of message packets te scedule, wc s te sum of te umber of perodc releases of eac message wt te yperperod multpled by te umber of packets eac release. Ts smplfes to T ˆ * U. I te optmzed case for a ode Ν te mmum sze of te TDMA table s T ˆ * U, were U s te utlzato of messages tat ode eter seds or receves. Terefore, te space complexty of table TDMA s OT ( ˆ * U ). Ts s very large sce Tˆ ca be as large as te product of all message perods. Te tme complexty of table TDMA s costat for eac message release. Averaged over a yperperod te tme complexty s OU ( ). I secto 6 we aalyze TDMA table szes ad sow tat eve te optmzed TDMA table s too large for te memory costrats of wreless sesor / actuator odes. Terefore, we eed a more compact TDMA represetato. 4.2.2. Sceduler TDMA A terestg approac, wc we refer to as sceduler TDMA, uses determstc real-tme scedulg to mplemet TDMA [4]. Eac ode rus a earlest deadle frst (EDF) dyamc scedulg algortm to determe wc message as access to te wreless medum. For te MAC to work te scedulers o all odes must make te same decso. Ts requremet s satsfed by usg a perodc task set so tat te release tmes of every message are kow. Te autors refer to ter approac as mplct coteto, eac message mplctly coteds for te medum troug te scedulg algortm stead of explctly o te medum. Note tat eac ode must scedule all messages te etwork. Ts approac as advatages over table TDMA, but dsadvatages tat lmt ts use large wreless sesor / actuator etworks. Te space complexty, wc s proportoal to memory utlzato, of te sceduler TDMA MAC protocol mplemetato o eac ode s O( ). It as te advatage tat te space complexty of eac ode grows learly wt te sze of te message set, but te dsadvatage tat t grows wt te sze of te etre message set. Te tme complexty, wc s proportoal to executo tme, of te scedulg algortm for eac ode s OU ( *log ) averaged over oe yperperod. Ts aga as te dsadvatage tat s scales wt te etre message set. Ts s due to te fact tat te scedulg algortm as a O( log ) tme complexty for eac message release ad T ˆ * U releases oe yperperod T ˆ. It as te advatage tat t coteds for te medum troug computato of te scedulg algortm, ot commucato. Ts reduces power cosumpto because commucato costs a order of magtude more ta computato. Ulke table TDMA te message set caot be optmzed for eac ode. Ts approac wll ot scale to large wreless sesor / actuator etworks wc may cota udreds to tousads of messages. Fally, te etwork sceduler determes access of messages o te etwork wtout regard for te separate task sceduler tat cotrols executo of real-tme tasks o te ode. Ts creates a coflct betwee te etwork sceduler ad real-tme task sceduler; breakg tmeless guaratees of bot. 5. Coteto-free Scedulg TDMA MAC I ts secto we descrbe a ew sceduler TDMA MAC protocol for wreless sesor / actuator etworks usg a perodc message model wt a coteto-free message set. A coteto-free message set as te property tat messages are set o release, ad packets are trasmtted to completo. Tere s o watg, queug, or coteto of ready messages wt te sceduler. Implemetg TDMA wt a perodc sceduler eables a space complexty lear te umber of messages sceduled. Requrg te task set to be coteto-free eables eac ode to scedule oly te messages tat cocer t. Combg tese two propertes results tme ad space complexty for eac ode tat scales wt te umber of messages te ode s cocered wt. Ts allows our MAC to scale up to muc larger etworks ta prevous tecques. Ts secto s orgazed as follows. TDMA protocols requre tat all odes are sycrozed tme. Secto 5.1 descrbes a protocol wc provdes sycrozato tat works wt our coteto-free sceduler TDMA MAC protocol troug a perodc sycrozato message ad as a low overead. I secto 5.2 we descrbe our sceduler TDMA MAC protocol. Here we use a result tat s dscussed secto 5.3, tat tere exsts a perodc message set wt a coteto-free scedule tat determes exactly wc message may access te medum for eac tme ut. How to obta a perodc message set wt a coteto-free scedule troug message attrbute assgmet s dscussed
secto 5.3. We dscuss tree message attrbute algortms used to cofgure te etwork. Two of te algortms determe te cofgurato off-etwork; of tese oe s off-le, ad te oter s o-le. By off-etwork we mea tat a computer ot o te wreless sesor / actuator etwork - but coected to t troug a gateway - determes te cofgurato. For off-etwork ad off-le cofgurato a expesve ad cetralzed algortm, suc as te optmal algortm descrbed secto 5.3.1, may be used. For off-etwork ad o-le cofgurato a more effcet soluto s eeded, suc as te cetralzed sub-optmal eurstc algortm descrbed secto 5.3.2. Te trd algortm determes te cofgurato oetwork ad o-le. By o-etwork we mea tat te cofgurato s determed by te odes te etwork. Eve our effcet cetralzed sub-optmal algortm s ot sutable for executo o te resource costraed odes. Secto 5.3.3 dscusses a very effcet dstrbuted sub-optmal algortm for etwork cofgurato. 5.1. Sycrozato Protocol Our sycrozato protocol requres some small overead, bot te etwork tme ut to allow for small accuracy sycrozato, ad etwork badwdt so tat we may mplemet te sycrozato protocol. Our sycrozato protocol s desged two parts. Frst, assumg we ave a loose sycrozato, we mplemet a tgt sycrozato by avg te recever of a message beg lsteg for te message a costat amout of tme, t wat, earler tat t expects te message. I ts way we allow odes to be out of sycrozato by as muc as t wat wtout terferg wt te protocol. Secod, loose sycrozato s aceved wt a perodc sycrozato message. Te sycrozato message, m syc, s added to te set of messages M. As we sow below te overead of sycrozato s mmal; o te order of 1% of etwork badwdt. Te perod of te sycrozato message s determed by te amout of sycrozato overead cluded te tme ut, t wat, ad mum clock crystal ( 1 ε ) ( 1 ε ) f = f + + f = f 1 1 1 2ε 2ε T = T T = + 2 f 1 ε 1 ε = + f ( 1 ε ) f t = t T f syc t = t T f t syc 2ε T < t 2ε syc wat Fgure 1: Dervato of Tsyc error, ε. Te perod of te sycrozato message, T syc, ca be derved as follows, summarzed Fgure 1. I te dervato f s te clock frequecy ( MHz) of te odes, ε s te clock error parts per mllo (ppm), f + (f - ) s te fastest (slowest) clock frequecy. T s te mum dfferece clock perods. We ε s small, as s geerally te case, te (1-ε 2 ) s very close to 1, ad we ca approxmate T. Te tme sce last sycrozato, secods, s t syc. Te accumulated clock error, secods, sce te last sycrozato, t, s calculated by multplyg te tme sce last sycrozato, t syc, by te accumulated error per secod, T f. Fally, t wat, te sycrozato overead te tme ut ( secods), s te largest t we allow. Smlarly, T syc s te largest t syc we allow. Substtutg tese, we get te fal result. We llustrate te sycrozato protocol wt a example. Te tme ut, t ut, s 10ms, a coservatve assumpto; we add 100 µs of sycrozato overead, t wat ; ad te clock crystal as a mum error (ε) of ±50 ppm. Our sycrozato perod s T < t 2ε = 1 syc wat secod. Terefore, tme sycrozato costs oly t t *100% = 1% of te tme ut for tgt wat ut sycrozato, ad t T *100% = 1% of te ut syc badwdt for loose sycrozato. 5.2. Coteto-Free Sceduler TDMA MAC Ts secto detals ow we costruct a task set from a gve message set, ad descrbes te mplemetato of te task sceduler. For te perodc task model to produce a vald TDMA scedule o two messages may be sceduled te same tme ut. I oter words, te scedule must be free of coteto. How to costruct ts coteto-free perodc scedule s dscussed secto 5.3. I te followg we ave a wreless sesor / actuator etwork cosstg of a set Ν of odes ad a cotetofree set of messages tat as bee costructed from a gve message set. A subset of messages for eac ode s defed as te messages tat ode seds or receves. We use te perodc ature of our messages to mplemet TDMA wt a task sceduler ad te coteto-free property of te message set to optmally dstrbute te message set. Gve te coteto-free perodc message set, we dstrbute ts message set to eac ode as follows. For eac message a ode eter seds or receves, we create a real-tme task ad add t to te ode s task set Γ. We traslate te attrbutes of a message to task attrbutes by multplyg eac by te etwork tme ut, t ut. Formally we ave eac ode s task set defed by te equato m ( *, *, *, * ) τ Γ τ = ϕ t C t D t T t ut ut ut ut. Te space complexty of te scedule for messages o ode s oly te umber of messages tat eter seds O, wc s ofte costat ad small. or receves, ( )
Te scedulg algortm s mplemeted by smply executg eac task we t s released. We keep te tasks a prorty queue ordered by creasg ext release tme. We a task s released we execute t to completo. Oce te task as completed ts ext release tme s calculated by addg ts perod te prevous release tme. Te task s te placed back te prorty queue. Te complexty of te scedulg algortm for ode s O( Γ ) space ad ( *log ) OU Γ Γ tme averaged over a yperperod. Te dervato of te complextes s smlar to tat dscussed secto 4.2.2. 5.3. Coteto-free Perodc Scedule Ts secto detals ow te coteto-free perodc scedule s obtaed. By coteto-free we mea tat te scedule specfes oe uque message tat may access te medum at ay tme. We ca determe we a message s to be ru depedet of te oter messages sce tey do ot coted for te medum. Ts eables eac ode to scedule oly te messages tat t s cocered wt. We obta a coteto-free scedule by properly assgg message attrbutes of pase ad perod. Gve a set of messages we fd a set of messages wose scedule s coteto-free. Recall tat a = cossts of messages message set { m } m = ( ϕ, C, D, T ). Messages may cosst of multple packets, ad be preempted betwee packets. Te umber of packets (C) of eac message s fxed. To smplfy aalyss we covert mult-packet messages to multple oe packet messages. Messages are set at ter release tme wt o coteto ad complete oe tme ut. Te perod attrbute (T) of te messages created for eac packet a mult-packet message s te same ad may be assged wt te costrat tat t s less ta or equal to te oe provded; formally : T T. We requre tat te pases of te created messages preserve te order amog packets of te same message; formally we ave te equato m j, k = 1... C : j< k ϕ < ϕ. Ts ca be, j, k satsfed by smply sortg te pases assged to packets of te same message. Ts s correct sce te messages ave te same perod so te scedule remas cotetofree. Wtout loss of geeralty te pase (ϕ) of eac message s greater ta or equal to zero ad less ta tat message s perod; formally, j:0 ϕ < T. If ts s, j ot te case we may set te pase as ϕ = ϕ modt. To meet te deadle of te orgal message we must prove tat te assged pases of te messages created for ts packets to ave a mum dfferece less ta or equal to te deadle; formally m : ϕ ϕ D., C,1 For smplcty we assume tat a message deadle s equal to ts perod, formally m : D = T. Ts s a realstc assumpto sce we ofte just requre tat a message stace completes before ts ext release. We combe ts assumpto wt te assumpto o pase assgmet,, j:0 ϕ < T, to prove tat te above pase, j dfferece costrat, ad terefore te deadle, s always satsfed. I cotradcto suppose : ϕ ϕ > D. C,,1 Sce D = T we ave : ϕ ϕ > T, equvaletly C,,1 : ϕ > T + ϕ. Sce ϕ 0 te T + ϕ T. C,,1,1,1 Terefore we ave : ϕ > T + ϕ T, equvaletly C,,1 : ϕ T, wc s a cotradcto of te pase C, costrat j = 1... C : 0 ϕ < T., j Terefore, we ave a coteto-free scedule so log as we ave o commo releases of messages. I te followg subsectos we preset tree metods for fdg a coteto-free message set usg perod ad pase assgmet. Te frst metod, dscussed secto 5.3.1, uses umber teory to costruct a optmal but effcet assgmet algortm. Te secod metod, dscussed secto 5.3.2, uses te propertes of armoc message sets to costruct a effcet cetralzed suboptmal eurstc algortm wc we ave a upper boud o te qualty of te soluto. Te trd metod, dscussed secto 5.3.3, also uses te propertes of armoc message sets to costruct a eve more effcet dstrbuted sub-optmal eurstc algortm tat also as a upper boud o te qualty of te soluto. 5.3.1. Optmal Attrbute Assgmet I ts secto we use umber teory to fd a coteto-free perod ad pase assgmet of te message set derved from a message set te prevous secto. Ts algortm s optmal te sese tat t mmzes te utlzato crease due to perod reducto attrbute assgmet. I te prevous secto we determed tat we ave a coteto-free scedule of a perodc message set f tere are o commo release tmes of ts messages. Ts meas tat o two messages are released at te same tme. Formally te codto for to be coteto-free s, :, : m m m m k l r = r, were r j j, k j, l k, s te k t release of message m. Te codto r k, = rjl, s equvalet to ϕ + kt = ϕ + lt wc s equvalet to j j ϕ gcd (, ) = ϕ + T T for some teger. By j j defto of cogruece ts s equvalet to ϕ ϕ mod gcd T, T [13]. It s tutve to tk j ( ( j )) of te cogruece a b( mod m) as amod m= bmod m. At ts pot we ca defe a test for weter ay proposed message set s truly coteto-free. Te sets follows from te prevous paragrap, ad s stated Defto 1. Testg ts codto as a tme complexty ( ) 2 of O log( T ). Defto 1: Coteto-Free Test m, m : m m ϕ ϕ mod gcd T, T ( ( )) j j j j
Next, we boud te searc space of message pase ad perod assgmet. Frst, pase assgmet. Te researc [7] addresses te problem of pase assgmet of perodc task sets wc pases are ot kow ad ave o costrats mposed by te applcato. Te umber of possble pase assgmets for a task set Γ s te product Γ of te task perods = 1T sce te pases are costraed by :0 ϕ < T. Te autors of [7] prove tat te umber of o-equvalet pase assgmets s te product of te task perods dvded by te yperperod, Γ ˆ = 1T T, wc s stll expoetal. Terefore, assumg Γ tere s a coteto-free soluto wt te gve perods, wc s ot guarateed, our searc space for pase assgmet s ˆ = 1 T T. At ts tme we do ot kow of a optmal pase assgmet algortm for ts problem tat s ot exaustve, toug eter ave we prove t NP-complete. If tere s o soluto wt te gve perods, we must try to assg message perods to fd a soluto. We ext defe te searc space for perod assgmet. Usg results from [9] o pweel scedulg we ca coclude tat a message set wose perods are armoc always as a coteto-free pase assgmet so log as t s utlzato s less ta or equal to oe. Furter, we ca coclude from [9] tat a message set ca be made armoc by reducg message perods by at most alf. From tese results we derve tat te searc space for perod assgmet s = 1T 2. Combg pase ad perod assgmet, our searc space for bot pase ad perod assgmet s ( ) 2 ˆ 1T 2 = T. Now tat we ave te searc space for attrbute assgmet we ca defe te tme complexty of a optmal algortm. Te complexty of a exaustve searc of pase ad perod assgmets s ( ( )( ) ) 2 O log T ˆ 1T 2 = T.We do ot kow of a algortm for optmally assgg pase ad perod to obta a coteto-free message set tat s ot exaustve, ad terefore expoetal. However, we ave ot prove tat oe does ot exst. Te ext two subsectos dscuss eurstc attrbute assgmet algortms tat use propertes of armoc message sets to boud te qualty of solutos. 5.3.2. Cetralzed Sub-Optmal Attrbute Assgmet I ts secto we preset a effcet bouded suboptmal cetralzed algortm for pase ad perod assgmet to obta a coteto-free message set. Ts algortm s bouded sub-optmal te sese tat te utlzato of te soluto may be worse ta te optmal soluto, but wt bouds. We use propertes of armoc message sets derved from [9] to sow tat we may costruct a coteto-free message set wt a boud o te crease utlzato. From [9] we ca coclude tat f a message set as U 12 te tere exsts a coteto-free pase ad perod assgmet. Ts s true because we ca make armoc wt a mum factor of two crease utlzato. Ts results a armoc message set wt utlzato U 1, wc always as a coteto-free pase assgmet. Te utlzato of te soluto wll be o more ta twce tat of te optmal soluto. Next we sow ow to obta a coteto-free assgmet by frst makg te message set armoc. Algortm 1 derves a armoc coteto-free message set pase assgmet so log as 1 from a message set by message perod ad U. Les 1 troug 2 make te message set armoc by reducg perods to te larges smaller power of two. Le 3 talzes a pase varable tat olds te ext avalable tme slot for a pase assgmet. Le 4 talzes a table represetg te message scedule were a true etry represets a tme slot tat s already use. Le 5 terates troug eac message. Le 6 assgs te curret messages pase to te ext avalable slot. Les 7 ad 8 update te scedule accordgly. Les 9 ad 10 update te pase varable to te ext free slot. 1: for = 1.. log 2: 2 2 T T = 3: ϕ = 0 4: S[0.. T 1] = false 5: for = 1.. 6: ϕ = ϕ 7: for j = 0.. T T 8: S[ ϕ + jt ] = true 9: wle ( S[ ϕ] ) 10: ϕ = ϕ+ 1 Algortm 1: Cetralzed sub-optmal attrbute assgmet Te proof of correctess of te algortm follows drectly from te propertes of armoc message sets. Itutvely, assgg te pase to te ext free slot s correct because te message set s armoc. Sce te message set s armoc eac message m as oly oe release te yperperod of te sub-scedule of t ad smaller perod messages, T ˆ = T. It caot terfere wt messages wt smaller perod wose pases ave already bee assged. Tere s always a free slot wc to assg a pase sce U 1. Te space complexty of Algortm 1 s OT ( ). Te tme complexty of Algortm 1 s O( {, U * T }). Les 1 troug 3 accout for te factor. Te oter s derved by otg tat te mum umber of true etres te scedule s U * T ad terefore, les 9 ad 11 are oly executed tat may tmes. Assumg s te smaller factor ts smplfes to OU ( * T ). Sce U 1, ts algortm s lear te mum perod. Ts s muc more effcet ta te optmal soluto dscussed secto 5.3.1. We ave a boud o te eurstc tat te suboptmal soluto ever as utlzato more ta twce tat
of te gve message set. Ts provdes te guaratee tat ay message set wt utlzato U 12 as a coteto-free pase ad perod assgmet. 5.3.3. Dstrbuted Sub-Optmal Attrbute Assgmet I ts secto we descrbe a very effcet sub-optmal dstrbuted attrbute assgmet algortm. For smplcty of presetato we assume tat odes may sese ad cotest for free slots te scedule. Our oly requremet of te cotest s tat exactly oe arbtrary ode ws, oter odes eed oly to kow tat tey lost, ot wc ode wo. Ts ca be mplemeted by a CSMA based electo algortm. We also assume tat odes are sycrozed by a protocol suc as te oe we preseted 5.1. Te algortm s sub-optmal terms of te utlzato of te soluto sce we make te message set armoc. It erts te mum factor of two utlzato crease dscussed te prevous secto. Te algortm detaled Algortm 2 s ru by every ode te etwork, for eac message t seds. Frst, we assg te message s armoc perod. Next, we wat oe perod of tme. We do ts so tat eac message oly cotests free slots wt messages avg te same armoc perod. Ts allows a arbtrary message to w te cotest. As log as te utlzato s less ta or equal to oe, messages wt smaller perods wll be doe wt pase assgmet by te tme ts message s watg tme expres. Smlarly, ts message wll be doe wt pase assgmet by te tme messages wt larger perods beg cotestg free slots. We ca see tat ts algortm as a ( ) // assg armoc perod log 2 2 T T = wat T do { wat for free slot eter cotest for free slot } wle (lose cotest) // wo cotest assg pase ϕ to curret slot Algortm 2: Dstrbuted sub-optmal attrbute assgmet O space complexty for message. For a ode te complexty s OT ( ) tme ad O( ). Te total complexty of te dstrbuted algortm s OT ( ) tme ad O( ) space. Ts s effcet eoug to execute o wreless sesor / actuator odes. Fally, Algortm 1 ad Algortm 2 produce te same armoc coteto-free message set. Te oly dfferece s tat Algortm 1 s cetralzed ad Algortm 2 dstrbuted. OT tme complexty ad a ( 1) 6. Aalyss, Expermets & Results I ts secto we aalyze te TDMA MAC protocols dscussed ts paper. We compare our coteto-free sceduler, te EDF sceduler of [4], ad tradtoal table TDMA MAC protocols terms of tme ad space complexty. Table 1 revews te tme ad space complexty of te tree TDMA MAC protocols. Tme complexty represets te ru tme overead of te MAC protocol o te processor of eac ode. Tme complexty s mportat to power cosumpto. A lower tme complexty te MAC protocol allows te use of a lower power processor o eac ode, ad allows te processor to sped more tme low power sleep modes. Space complexty represets te amout of memory eeded by te MAC protocol o eac ode. Space complexty s mportat to cost ad power cosumpto. A lower space complexty allows te use of less memory o eac ode; wc costs less ad cosumes less power. Table 1: TDMA MAC Protocols Tme & Space Complexty Table Tme OU Complexty ( ) ( Space O T ˆ * U ( Complexty ( ) Coteto-Free EDF Sceduler Sceduler OU log ) OU ( log ) O ) O( ) We summarze te table as follows. Table TDMA as te most effcet tme complexty. Te table may be optmzed for eac ode to clude oly te messages tat t s cocered wt. However, te table sze grows wt te legt of te scedule, wc may be as large as te product of all message perods; a expoetally large umber. EDF sceduler TDMA trades off a ger tme complexty for a lower space complexty. However, te scedule ca ot be optmzed for eac ode, ad terefore grows wt te sze of te etre message set. Our coteto-free sceduler makes a smlar trade off, but ca be optmzed for eac ode. Te cost s a worst case factor of two crease message utlzato resultg from perod assgmet. Ts utlzato crease s more ta made up for by te optmzato. Te followg expermets llustrate te results Table 1 ad justfy our clam tat te optmzato of te scedule at eac ode more ta makes up for te crease utlzato. We also sow tat te average crease utlzato s muc less tat te worst case. Our expermetal metodology s to geerate radom etworks ad aalyze te space ad tme complexty of eac TDMA MAC protocol. We perform 1 mllo expermets. For eac expermet we geerate etworks wt 100 odes excagg 100 messages as follows. Message perods are cose radomly ad uformly from 2 to 6000 tme uts. Wt a tme ut of 10ms ts traslates to 20ms to 60s. Te umber of packets eac message s cose radomly from 1 to 10 wt a geometrc dstrbuto tedg toward 1 packet. Eac message s set by oe radomly selected ode. Eac
ode receves every message wt a certa probablty. We vary ts probablty to geerate etworks wt varyg degrees of coectvty. Te followg sould be cosdered we terpretg te results tat follow. Te results for our coteto-free sceduler TDMA MAC are based o te cetralzed suboptmal coteto-free assgmet, Algortm 1. Te results for table TDMA MAC are also based o te armoc message set foud Algortm 1. Te reaso for ts s tat T ˆ s too large to be represeted by a 64 bt teger, so te table sze s too large to eve cosder. Terefore, te space complexty results reported for table TDMA MAC are better ta tey sould be, but suffcet for comparso. Te results for te EDF sceduler TDMA MAC are based o te orgal message set. Fally, te space complexty s terms of umber of messages. Implemetatos of TDMA MAC protocols requre 4 to 8 bytes per message. Terefore, te space complexty of 100 for te EDF sceduler TDMA results a memory utlzato of 400 to 800 bytes. Our results are llustrated Fgure 2 ad Fgure 3. Fgure 2 s a grap of tme complexty versus te probablty varable tat cotrols etwork coectvty. From te grap we coclude tat coteto-free sceduler TDMA as a lower tme complexty ta EDF sceduler TDMA we a ode receves less ta 70% of all messages. Table TDMA as a tme complexty tat smply caot be matced. Fgure 3 s a grap of space complexty versus probablty varable. Table TDMA as a muc ger space complexty ta eter EDF or coteto-free sceduler TDMA. From ts grap we coclude tat coteto-free sceduler TDMA as lower space complexty ta EDF sceduler TDMA we a ode Tme Complexty 3.00 2.50 2.00 1.50 1.00 0.50 Tme Complexty vs. Probablty Table EDF C-F 0.00 0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00 Probablty Fgure 2: Grap - tme complexty vs. probablty Space Complexty 1600 1400 1200 1000 800 600 400 200 0 receves less ta 95% of messages. All of tese graps sow tat coteto-free sceduler TDMA scales learly wt te umber of messages a ode seds or receves wle EDF sceduler TDMA s costat. Ts s due to te optmzato of te message set for eac ode tat s possble coteto-free, but ot EDF, sceduler TDMA. Our expermets also study etwork utlzato crease resultg from our suboptmal coteto-free assgmet algortm. Te mea utlzato crease s 1.32 wt a stadard devato of 0.10. Te mmum utlzato crease s 1.01. Te mum utlzato crease s 1.75. Te result s a observed average utlzato boud to esure a coteto-free assgmet of 76%. Terefore, te worst case utlzato crease ad utlzato boud s very mprobable. 7. Coclusos Space Complexty vs. Probablty Table EDF C-F 0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00 Probablty Fgure 3: Grap - space complexty vs. probablty I ts paper a coteto-free scedulg TDMA MAC protocol for wreless sesor / actuator etworks s preseted. Esurg te message set s coteto-free eables te scedule to be optmzed for eac ode. Ts optmzato results a reduced tme ad space complexty for eac ode tat grows oly wt te umber of messages te ode seds or receves, ad ot te sze of te etre messages set. Terefore, etworks usg ts MAC protocol ca scale to muc larger message sets. Te cost of obtag a coteto-free message set s a worst case factor of two utlzato crease; toug practce t s muc smaller. Te
utlzato crease s acceptable because te lmtg factor large wreless sesor / actuator etworks s te lmted resources of te odes, ot etwork badwdt. Te reducto tme ad space complexty of te coteto-free sceduler TDMA MAC more ta make up for te crease etwork utlzato. 8. Future Work A umber of ssues rema ope for future researc. Oe ssue s te applcato of exstg ybrd TDMA tecques to exted our MAC. Reservato protocols [1][6][11] may be used to recofgure our TDMA sceduler. Mult-op routg [10][14] ad etwork orgazato tecques suc as clusterg [3][5][8][16] ad cell arctectures [4] may be appled to our MAC protocol. Aoter ssue s te ufcato of message ad task sets metoed secto 1. Coteto-free sceduler TDMA eables message ad task sets to be ufed sce t oly scedules messages tat a ode s cocered wt. Ts ufcato eables aalyss to guaratee satsfacto of message ad task tmeless costrats. 9. Ackowledgemets Te researc descrbed ts paper as bee fuded, part, by te Natoal Scece Foudato Award #000439, Embedded Researc Solutos, LLC., ad te Departmet of Electrcal ad Computer Egeerg, Uversty of Marylad. Addtoal support for Tomas Carley as bee provded by Natoal Defese Scece ad Egeerg Graduate Fellowsp Program wc s sposored by te Departmet of Defese. We tak te revews for ter costructve commets. 10. Refereces [1] M. Adamou, I. Lee, I. S, A Eergy Effcet Real- Tme Medum Access Cotrol Protocol for Wreless Ad- Hoc Networks, Work Progress, 22d IEEE Real-Tme Systems Symposum, December 2001. [2] I.F. Akyldz, W. Su, Y. Sakarasubramaam, E. Cayrc, Wreless Sesor Networks: a Survey, Computer Networks 38 (2002) 393-422. [3] D.J. Baker, A. Epremdes, Te Arctectural Orgazato of a Moble Rado Network va a Dstrbuted Algortm, IEEE Trasactos o Commucatos, vol 29, o 11, November 1981. [4] M. Caccamo, L.Y. Zag, L. Sa, G. Buttazzo, A Implct Prortzed Access Protocol for Wreless Sesor Networks, Proceedgs of te 23rd IEEE Iteratoal Real-Tme Systems Symposum, December 2002, Aust, TX. (USA), p39. [5] M. Gerla, J. Tsa, Multcluster, Moble, Multmeda Rado Network, ACM-Baltzer J. Wreless Networks, vol. 1, o. 3, 1995. [6] D.J. Goodma, R.A. Valezuela, K.T. Gaylard, B. Ramamurt, Packet Reservato Multple Access for Local Wreless Commucatos, IEEE Trasactos o Commucatos, vol 37, o 8, August 1989. [7] Joel Goosses, Scedulg of Offset Free Systems, Real- Tme Systems, 5 (1997) 1-26. [8] W.R. Hezelma, A. Cadrakasa, H. Balakrsa, Eergy-Effcet Commucato Protocol for Wreless Mcrosesor Networks, Proceedgs of te 33 rd Hawa Iteratoal Coferece o Systems Sceces, 2000. [9] R. Holte, L. Roser, I. Tulcsky, D. Varvel, Te Pweel: A Real-Tme Scedulg Problem, Proceedgs of te 22 d Hawa Iteratoal Coferece o Systems Sceces, pp. 693-702, Jauary 1989. [10] X. Hog, K. Xu, M. Gerla, Scalable Routg Protocols for Moble Ad Hoc Networks, IEEE Network Magaze, vol. 16, o. 4, 2002. [11] C.R. L, M. Gerla, Real-Tme Support Multop Wreless Networks, Wreless Networks 5 (1999) 125-135. [12] C. Lu, B.M. Blum, T.F. Abdelzaer, J.A. Stakovc, T. He, RAP: A Real-Tme Commucato Arctecture for Large-Scale Wreless Sesor Networks, IEEE Real-Tme ad Embedded Tecology ad Applcatos Symposum (RTAS 2002), Sa Jose, CA, September 2002. [13] Keet H. Rose, Elemetary Number Teory ad ts Applcatos, fourt edto, Addso Wesley Logma Ic., 2000. [14] E.M. Royer, C-K To, A Revew of Curret Routg Protocols for Ad-Hoc Moble Wreless Networks, IEEE Persoal Commucatos, Aprl 1999. [15] Sures Sg, C.S. Ragavedra, PAMAS Power Aware Mult-Access Protocol wt Sgalg for Ad Hoc Networks, Computer Commucatos Revew Vol. 28, No. 3, July 1998. [16] K. Sorab, J. Gao, V. Alawad, G.J. Potte, Protocols for Self-Orgazato of a Wreless Sesor Network, IEEE Persoal Commucatos, October 2000. [17] J.L. Sobro, A.S. Krsakumar, Qualty-of-Servce Ad Hoc Carrer Sese Multple Access Wreless Networks, IEEE Joural o Selected Areas Commucatos, vol 17, o 8, August 1999. [18] Adrew S. Taebaum, Computer Networks, trd edto, New Jersey: Pretce-Hall PTR, 1996. [19] We Ye, Jo Hedema, Debora Estr, A Eergy- Effcet MAC Protocol for Wreless Sesor Networks, Proceedgs of IEEE Ifocom 2002, volume 2, New York, USA, Jue 2002.