• Aucun résultat trouvé

LEAD-MAC: The LEAD Medium Access Control

Once the optimal actuators are decided for each sensor in the network and optimal ow

routing is formulated, then the sensors can be scheduled using a TDMA like MAC protocol

thatcorrespondsto the owsolution. The actuatorsexplicitly schedule all thesensorsbased

ontheir knowledge of thecluster. Ifa random accessscheme isusedat theMAClayer,then

theexperienced network lifetimecannot correspond totheoptimal routingsolution (4.23)as

the optimal routing solution is only based on the ow coming into-and-out of a sensor node

subjecttoenergy-constraints. Thisschemedoesnottakeintoaccounttheaccessenergywasted

due to collisions and successive retransmissions. The detailed power consumption model at

the MAC layer can be seen in [C-5]. For the considered model, we optimize the system

performance using a TDMA-MAC protocol by minimizing the awake periods and powerloss

due to interference. LEAD-MAC has three operational phases: (i) network learning phase,

(ii)schedulingphase, and(iii)adjustment phase. Thefollowing discussioncoversthedierent

protocolphases indetail.

4.9.1 Network Learning Phase

A sensornode nds an optimal actuator using theproposed ADP (Actuator Discovery

Pro-tocol, a controlled ooding mechanism in Section 4.7), during the initial deployment phase.

The sensors start the learning phase by transmitting a one hop broadcast search_request.

When a broadcast reaches an actuator, it is replied with the actuator identity. A random

access scheme is used in the topology learning phase, because the sensors do not yet have

a transmission schedule. The scheme is designed so that, at the end of this phase, almost

all nodes are attached (based on the outcome of an objective function) to an actuator and

correctly determine their neighbors andinterferers withhighprobability. We adopt a carrier

sense multiple access(CSMA) mechanismsimilar to IEEE802.11 [95]. The sensorslisten for

a random time before transmitting, and transmit if the channel is idle. A random delay is

addedbeforecarriersensingtofurtherreducecollisions. However,becauseacollisionwilllead

to incompleteclusterinformation attheactuators, theCSMAschemeitselfcannotguarantee

thatan actuatorwillreceivethefullclusterinformation. Therefore,anacknowledgment from

the actuator issent whena sensortransmitsa packetto joina particular cluster.

4.9.2 Scheduling Phase

The actuator explicitly schedules all the sensors, based on its knowledge of the cluster. An

actuator schedulesthesensorsinthedepth-rstorderfor end-to-endroutes,andina

breadth-rst order for any given parent node

i

, to capture forwarded data from all of its downlink

sensors. At the end of thenetwork learning phase, the network may be represented by

G = (V, E) ,

inwhich

V

is thesetofnodes, includingthe actuator node

A i

. The undirectededges

E ∈ V × V

are the (transmission) links to be scheduled. The graph forms a tree, rooted at actuator

A i .

All the trac fromanygiven tree is destinedfor theactuator, soevery data

packetatanodeisforwardedtothenode'sparent. Anodemayinterferewithanothernode,so

thesenodesshouldnottransmitsimultaneously. Theinterferencegraph

C = (V, I)

isassumed

known at the end of network learning phase. Here

I ∈ V × V

is theset of edges such that

(u, v) ∈ I

ifeither

u

or

v

can heareach otherorone caninterferewiththesignaloftheother.

The conict graph corresponding to

G = (V, E)

and

C = (V, I )

is the graph

GC = (V, EC )

inwhich

EC

comprises the edges between node pairs that should not transmit at the same

time.

The Scheduling Problem: Each node of

G

(except the actuator) generates packets.

Given the interference graph

C

, the scheduling problem is to nd a minimum length frame

during which all nodes can send their packets to the actuator using minimum energy. The

problem isNP-complete [101]. We reducethe NP-complete problemof ndingthechromatic

number ofa graphto the scheduling problem 3

. Iftheoriginal treenetworkhasdepth

N

,the

linearnetwork

GL = (V L, EL)

has nodes

V L = { A i , v 1 , . . . , v N }

withnode

v l

corresponding to level

l

in the original network. The interference graph

CL = (V L, IL)

includes edges

(v j , v l )

ifthereisaninterference between anodeat level

j

andanodeatlevel

l

intheoriginal

network. We can nowcolor the linear network usingthesame approach usedin[101 ]. Then,

the scheduling algorithm is given by 4.3. For all the basic proofs on NP-completeness and

coloringof network,please referto [101], aswe do not repeatthem herein orderto conserve

space.

Algorithm 4.3The Scheduling Algorithm

Input: Graph

G = (V, E)

of the original tree network, withinterference

C = (V, I) ,

color

as-signmentofthecorrespondinglinearnetwork,using

K

colors,suchthateachcolorcorresponds toa maximumnon-conicting set.

Output: Transmission schedule for nodesof

G.

begin

while (atleast onepackethasnot reached theActuator)

for

s = 1

to

K

sets =set oflevels correspondingto color

s

T=0

while(nodesof color

s

hasatleastone packet)

for

j = 1

to

| sets |

T = T ∪ T { maximum non − conf licting set of nodes f rom level j ∈ sets with atleast one packet }

if

T 6 = 0

assignthis slot to set

T

updatetheplace ofpackets

end

end

end

Theschedulingframeduration

T

isdividedintoslots(asingleslot-durationdependsonthe packetsize,availabletransmissionrate,andistypicallyapplicationdependent). Aslotextends

the packet duration by a guard interval to compensate for synchronization errors. At the

beginningofthisphase,anactuatorbroadcaststheschedulingpacket usingmaximumtransmit

power. Sincetheactuatorreachesallthesensorsatthesametime,theerrorinsynchronization

fromthedelaybetweentime-stampingandsendingthepacketatthetransmitteriseliminated.

Since the range of an actuator is on the order of kilometers, the propagation delay is also

negligible(few

µsec

). Basedontheassumptionthatallthenodesrunthesamesoftware,allof

themwilltime-stampthepacketatthesametime. Therefore,theonlyerrorofsynchronization

in this application comes from clockskew, thedierence in theclocktickrates of thenodes.

Typical clock driftsof a sensornode in 1sec is 10

µsec

[97]. If the packet generation period

of eachnodeisaround30sec, the maximumclockdriftwill be0.3mseccompared to approx.

20msec(theduration ofthepackettransmissionof apacketof 50byte at50kbps). The total

time-frame duration of this schedule is given by

T

,which depends on thenumber of sensors

in the cluster. Therefore, the frame duration

T

is dierent for every cluster inthe network.

3

Thechromaticnumberofagraph

G

isthesmallestnumber

k

suchthat

G

is

k − colorable

ifitsvertices

canbecoloredusing

k

dierentcolors insuchawaythatadjacentverticeshavedierentcolors.

Theminimumduration for asensortostayawake

T a

is

T a = T rx + T tx + T g

,where

T rx

isthe

timerequiredtoreceiveapacket,

T tx

isthetimerequiredtotransmitonepackettotheparent

node, and

T g

is the guardinterval for synchronization errors. The interval

T g

is assumed to

be asmall percentage ofthetotal slot duration. Themaximumduration for a sensorto stay

awake depends on its sub-tree and can be calculated as a multiple of

T a

depending on the

application,e.g.,iftheapplication allowsfordata aggregation: asensorcan receiveforwarded

data from its sub-tree, aggregate its own packet and transmit the resultant packet requiring

onlyone time slot.

ThersttransmittedpackettocontaintheCDMAcodeisthecollision-free TDMA

sched-ulebyeachactuatorinthenetwork,sothatthesensorsreceivetheschedulefromtheirattached

actuator only once. Theschedule packetcontains acurrent-time eldinorderfor allthe

sen-sors inone cluster to synchronize to a common clock beforestarting thetransmissions and a

next-time eld, where all thesensors wakeup once in order to resynchronize to thecommon

clock.

4.9.3 Adjustment Phase

Ifanewnodeisaddedtothenetworkoralinklevel failureisdetectedinthenetwork,asensor

will try to attach itselfbytransmitting a one-hop broadcastrequest initsneighborhood. All

the sensorsinthenetworkwakeup atnext-time toresynchronize tothenetwork. Atthistime,

a sensorwhich receives the actuator-search broadcast replies to the sensorwith its actuator

id and cost to reach the actuator. Upon receiving the reply to its broadcast (there can be

multiple replies), a sensor decidesits optimal actuator and transmits an attachment request

to theactuator. The new sensoris added to the transmissionschedule and also acquires the

same CDMA codeasits cluster.