Enhancement of IEEE 802.15.4 MAC protocol

download Enhancement of IEEE 802.15.4 MAC protocol

of 12

Transcript of Enhancement of IEEE 802.15.4 MAC protocol

  • 8/6/2019 Enhancement of IEEE 802.15.4 MAC protocol

    1/12

    Enhancement of the IEEE 802.15.4 MAC Protocolfor Scalable Data Collection in Dense Sensor Networks

    USC Technical Report CENG-2006-14

    Kiran YedavalliUniversity of Southern California

    Los Angeles, California

    [email protected]

    Bhaskar KrishanmachariUniversity of Southern California

    Los Angeles, California

    [email protected]

    ABSTRACTWe nd that the IEEE 802.15.4 MAC protocol performspoorly for one-hop data collection in dense sensor networks,showing a steep deterioration in both throughput and energyconsumption with increasing number of transmitters. Wepropose a channel feedback-based enhancement to the pro-tocol that is signicantly more scalable, showing a relatively

    at, slow-changing total system throughput and energy con-sumption as the network size increases. A key feature of theenhancement is that the back-off windows are updated aftersuccessful transmissions instead of collisions. The windowupdates are based on an optimality criterion we derive frommathematical modeling of p-persistent CSMA.

    1. INTRODUCTIONIEEE 802.15.4 is an important standard for low-rate low-power wireless personal area networks that is in increasingcommercial use for a diverse range of embedded wirelesssensing and control applications. The standard providesspecications for both the physical layer and the mediumaccess control (MAC) protocol.

    We characterize the performance of the IEEE 802.15.4 MACfor one-hop data collection in a star topology where there aremultiple transmitters and a single receiver. Our primary fo-cus is on settings where the number of transmitters is large.Because 802.15.4-enabled devices are meant to be low-costand operate at relatively low rates, such dense deploymentsare of interest in many sensing applications involving thesedevices.

    We model the IEEE 802.15.4 as a p-persistent CSMA withchanging transmission probability p. We derive the opti-mal transmission probabilities to maximize the throughputand minimize energy consumption in p-persistent CSMA.We show that, particularly for large number of transmitters,the ratio of the expected idle time between successful recep-

    tions to the expected time between successful receptions isa constant for a given packet size when the transmissionprobabilities are optimal. Further, we nd that when thetransmission probability is lower (higher) than the optimal,the ratio is higher (lower) than this constant. This yields adistributed channel feedback-based control mechanism thatchanges the transmission probabilities of nodes dynamically

    towards the optimal. We develop an enhanced version of theIEEE 802.15.4 MAC protocol using this feedback scheme.

    In our modeling and evaluation, we consider two extremesof the one-hop data collection spectrum in dense sensor net-works: one-shot and continuous data collection. In one-shotdata collection, each node sends only a single packet (thiscould be the response to a one-shot query) and once thatpacket is transmitted the node is no longer in contentionfor the channel. In continuous data collection, we assumethat each node is backlogged, i.e. always has a packet totransmit.

    In both cases, we nd that the IEEE 802.15.4 protocol per-forms poorly in dense settings, showing a steep reduction in

    throughput and increase in energy with network size. In con-trast, the enhanced protocol that we propose is signicantlymore scalable, showing a relatively at, slow-changing totalsystem throughput and energy as the number of transmit-ters is increased. This is illustrated in gure 1.

    The rest of this paper is organized as follows. In Section 2we present an overview of IEEE 802.15.4 and model it as a p-persistent CSMA with changing p. In Section 3 we presentthe modeling and optimization of p-persistent CSMA andcharacterize the performance of the IEEE 802.15.4 MAC inSection 4. In Section 5 we present a channel feedback-basedmedium access control technique and adapt it to present theenhanced IEEE 802.15.4 MAC. In the same section we dis-cuss directions of our future work. We conclude in Section 6.

    2. IEEE 802.15.4In this section we present an overview of the IEEE 802.15.4MAC and model it as a p-persistent CSMA MAC with chang-ing p.

    2.1 Overview & Related WorkThe IEEE 802.15.4 standard ([6]) allows different networktopologies such as one-hop star and multi-hop. We considerthe one-hop star topology with multiple data sources and a

  • 8/6/2019 Enhancement of IEEE 802.15.4 MAC protocol

    2/12

    Figure 1: Performance of Proposed Enhancementcompared to IEEE 802.15.4 for Continuous DataCollection

    single sink. In the star topology, a global synchronizationof nodes is assumed and the time is separated by beaconstransmitted by a network coordinator. The beacon-intervalconsists of a superframe and an optional energy saving timein which the nodes switch off their radio and go to sleep. Thesuperframe is divided into 16 time slots of = 320 secs du-ration each. The superframe consists of a contention accessperiod (CAP) and a period of guaranteed time slots (GTS).The GTS is dedicated for low latency applications. In thispaper we consider only the CAP mode (without the energysaving mode, GTS, and beacons) where medium access isthrough slotted CSMA/CA.

    In slotted CSMA/CA, a node can transmit its packet onlyafter it senses the channel free for a contention window (CW)of 2 time slots. The main purpose of the CW is to avoidcollisions between acknowledgement packets (ACKs) fromthe sink and data packets from the sources as the protocoldoes not specically provision time slots for ACKs [16]. Anode chooses a time slot uniformly at random from an initialwindow of [0, 2BE 1], where BE is the back-off exponentwith an initial value of 3. The node transmits its packet if the channel is sensed to be free in that and the next timeslots; if the channel is sensed to be busy the node backs off to a bigger window with BE = 4. On a second busy channelsensing or a collision the node backs off to a window withaMaxBE = 5 and remains constant. If a node is unableto transmit its packet within 5 back-offs the transmission isassumed to be a failure and the packet is dropped. We relaxthis condition in this paper and allow a node to retransmit

    its packet until it is successful. Figure 2 shows the owchart for a node using the IEEE 802.15.4 MAC. The IEEE802.15.4 standard species a data rate of 250 kbps and amaximum MAC protocol data unit (MPDU) of 127 Bytes.Given this data rate, the transmission time for a typicalpacket of 50 Bytes is 5 time slots and for the MPDU it is 13time slots.

    In [10] the the performance of the IEEE 802.15.4 MAC isevaluated in terms of throughput and energy efficiency usingns 2 simulations for a maximum of 49 nodes. In [14] the

    Figure 2: Flow chart for IEEE 802.15.4 operation ata node.

    performance of the standard MAC is evaluated for medicalapplications where the IEEE 802.15.4 devices interface withthe traditional MAC technologies such as Ethernet. [15]analyzes the performance in the context of medical body

    area networks (BAN) where the energy efficiency of bodyimplanted sensors is the focus given that their required lifetime is in the order of 10-15 years in these applications.In [12] a queuing analysis is presented for the sleep modewith possible nite buffers. In [13] the performance of thestandard MAC is evaluated in the presence of both uplinkand downlink traffic in the one-hop star topology network.

    2.2 Application SpaceWe consider the two extremes of the spectrum of one-hopdata collection applications in dense sensor networks. Atone extreme of this spectrum is continuous data collectionand the other extreme is one-shot data collection.

    Continuous Data (CD) : In this scenario the sourcescontinuously send data to the sink. We assume thatour observation time is such that all nodes always havea packet to send, i.e., their queues are back-logged.This implies that the network reaches steady stateand operates at the saturation throughput. Perfor-mance metrics of interest in this scenario are the sys-tem throughput 1 and energy consumption. Let CDand CD be the expected throughput in bps and ex-pected energy consumption per node per successfulpacket transmission in Joules respectively.

    One-Shot Data (OSD) : In this scenario the sinkis interested in one-shot data queries such as Whichnodes have observed the event? or Which nodeshave recorded temperatures above 50F?, etc. The re-sponse to such one-shot queries is a single packet fromeach sensor node that contains the location of the nodeor a similar identication. Once the packet has beensuccessfully transmitted from a node it is not in con-tention for the channel anymore, implying that the

    1 Please note that we are considering the total systemthroughput and not per node throughput. Per nodethroughput can be calculated by dividing the systemthroughput by the number of nodes.

  • 8/6/2019 Enhancement of IEEE 802.15.4 MAC protocol

    3/12

    system does not attain steady state. The performancemetrics of interest in this scenario are the delay in ob-taining packets from all sensor nodes as a performancemetric and energy consumption incurred by the sensornetwork in this operation. Let OSD and OSD be theexpected delay in seconds and the amortized expectedenergy consumption per node in Joules respectively forsuccessfully transmitting packets from all sources.

    In this paper we mainly focus on dense sensor networks inwhich at-least 50 nodes contend for the channel in either sce-nario. We assume that the packet lengths are deterministicand constant.

    2.3 ModelNow, we model the IEEE 802.15.4 MAC as a p-persistentCSMA MAC with changing p. Before we present the MACmodel, we describe the assumptions made and the energymodel used.

    Assumptions : Let the number of sensor nodes in theradio range of the sink be N . All sensor nodes are syn-chronized to a global time which is divided into slotsof equal length and each node transmits at the begin-ning of a time slot. Let the packet length be L timeslots. A sensor node is informed of its packets suc-cessful transmission through acknowledgement pack-ets (ACKs) from the sink. Failure to receive an ACKfrom the sink implies a collision. The ACK is sent bythe sink as soon as the packet reception is completed.Table 1 summarizes the notations used.

    Energy Model : According to the IEEE 802.15.4 stan-dard a node can exist in any one of the following fourstates - Shutdown, Idle, Transmit, Receive. For CD,we assume that the nodes are either in the Trasmit orthe Recieve state and are not concerned with the Shut-down or Idle states. For OSD, again each node is eitherin the Transmit or the Recieve state until its packet istransmitted, after which the node moves to the Shut-down state permanently. Let the power consumed inthe Transmit state be T and the power consumed inthe Recieve state be R . According to [1], R = 35mW and T = 31 mW for the highest transmissionpower. The power consumed in the Shutdown state isnegligible .

    MAC Model : In [16] the authors model the IEEE802.15.4 MAC in the contention access period (CAP)as a non-persistent CSMA with back-off. They ap-proximate the three original uniform-random back-off windows to geometrically distributed back-off windowswith parameters p1 , p2 and p3 such that pi = 2BO i +1 ,(1 i 3) where BO i is the original uniform-randomback-off window size. With BO 1 = 8, BO 2 = 16 andBO 3 = 32, the respective values of p1 , p2 and p3 are

    14 . 5 ,

    18 . 5 and

    116 . 5 .

    In this paper we further simplify this model to a p-persistent CSMA in which the probability of transmis-sion changes from p1 to p2 to p3 with each collision andremains constant after two collisions at p3 . The keydifference in our model from the non-persistent CSMA

    N Number of nodes in the network p Transmission probabilityL Length of packet in time slots Time slot length (320 secs)

    R Power consumption in Receive stateT Power consumption in Transmit staten Number of nodes in an epoch

    T n Delay in an epoch with n nodesE n Energy consumption in an epoch with n nodes

    CD (N ) Throughput in bps in CD CD (N ) Energy consumption per node per successful

    packet transmission in CD OSD (N ) Delay in secs to obtain packets from

    N nodes in OSD OSD (N ) Energy consumption in Joules to obtain

    packets from N nodes in OSD pT opt (n, L ) Transmission probability that minimizes

    epoch delay pEopt (n, L ) Transmission probability that minimizes

    epoch energy consumption

    Table 1: Notation

    model is that in our case the transmission probabilitychanges with a packet collision instead of a busy car-rier sense. Thus in our model, a node starts out withan initial transmission probability of p1 . The nodesenses the channel at the beginning of each time slotand if the channel is found to be free for two consecu-tive time slots, it transmits its packet with probability p1 . If the channel is busy, the node tries to transmitthe packet with the same probability the next timeit nds two consecutive free time slots. If more thanone node transmits in the same time slot it results ina collision and if a node is involved in a collision forthe rst time it changes its transmission probability to p2 . On a second collision its transmission probability

    is changed to p3 and it remains constant beyond thesecond collision.

    We evaluate the accuracy of our model using simulations 2 .The results are averaged over 1000 random trials with 100different random seeds. For the CD scenario, we simulatedthe protocol for 10000 time slots for a packet length of 50Bytes (or 5 time slots).

    Figure 3 plots the simulation results comparing the IEEE802.15.4 and our p-persistent CSMA model and shows thatour model is reasonably accurate. Next, we determine theoptimal performance of a generic p-persistent CSMA MACwith a similar time slot structure and characterize the per-formance of IEEE 802.15.4 MAC in comparison to that.

    3. P-PERSISTENT CSMA MACIn this section we model and analyze a generic p-persistentCSMA MAC and determine the transmission probabilitiesthat optimize its performance.2 We have written our own simulators in C forthe IEEE 802.15.4 and p-persistent CSMA MACprotocols. They are available for download athttp://ceng.usc.edu/anrg/downloads.html.

  • 8/6/2019 Enhancement of IEEE 802.15.4 MAC protocol

    4/12

    (a) Continuous Data (b) One-shot Data

    Figure 3: IEEE 802.15.4 standard is modeled as a p-persistent CSMA with probability of transmissionreducing in three steps p1 = 14 . 5 , p2 =

    18 . 5 , p3 =

    116 . 5 with each new collision.

    3.1 OverviewIn a slotted p-persistent CSMA ([2]), each node senses thechannel at the beginning of each time slot and if the channelis found to be free of any transmissions, it transmits itspacket with a probability p. If the channel is not free, thenode attempts to transmits its packet in the next free timeslot. If more than one node transmits in the same time slotit results in a collision.

    Traditionally, system dynamics due to the p-persistent CSMAprotocol have been modeled using renewal theory (example[8], [9], [5], [4]). The key assumption that makes the useof renewal or regenerative models feasible is that the sys-tem attains stationarity and that the models capture thesystem behavior at the state. While this assumption is stilltrue for the CD scenario, it is not true for the one-shotdata scenario. Nevertheless, we observe the system at everysuccessful packet transmission like in [9] and [5], for bothscenarios and derive expressions for throughput, delay andenergy consumption.

    3.2 ModelWe observe the system at every successful packet transmis-sion. The time interval between two consecutive successfultransmissions is dened as an epoch . An epoch is made up of idle time, in which the channel is free of any transmissions,collision time, in which more than one node is transmitting

    and a single successful transmission time which marks theend of the epoch, as illustrated in Figure 4.

    It is important to note that, for CD, the number of nodesremain constant in all epochs. However, for OSD the num-ber of nodes decreases by one with each passing epoch. LetT n be the epoch delay the time interval between two con-secutive successful packet transmissions in seconds andE n be the energy consumption the total energy consumedby all contending nodes in Joules, for the epoch with ncontending nodes. Then

    Figure 4: An epoch illustrating the time intervalbetween consecutive successful transmissions.

    CD (N ) =1

    E [T N ] (80L) bps (1)

    CD (N ) =E [E N ]

    N Joules (2)

    OSD (N ) =N

    n =1

    E [T n ] seconds (3)

    OSD (N ) = 1N

    N

    n =1

    E [E n ] Joules (4)

    where 80 L in Equation 1 is the packet length in bits. Clearly,the above metrics are optimized when E [T n ] and E [E n ] areminimized. First we determine expressions for E [T n ] andE [E n ].

    Proposition 1. For a constant packet length L, the ex-

  • 8/6/2019 Enhancement of IEEE 802.15.4 MAC protocol

    5/12

    pected epoch delay for n contending nodes is given by

    E [T n ] =L (L 1)(1 p)n

    np(1 p)n 1 (5)

    Proof. As illustrated in Figure 4 the delay in an epochis due to idle time, collision time and successful transmissiontime. Therefore, the expected delay in epoch n , is given by

    E [T n ] = E [T Idle,n ] + E [T Collision,n ] + E [T Success ] (6)

    where E [T Idle,n ] is the expected number of idle time slots,E [T Collision,n ] is the expected number of collision time slotsand E [T Success ] is the expected number of time slots of suc-cessful transmission. Since the packet length L is a constantE [T Success ] is equal to L and independent of n .

    If E [N coll,n ] is the expected number of collisions in an epochwith n nodes, then

    E [T Idle,n ] = ( E [N coll,n ] + 1) E [T IdlePeriod,n ] (7)E [T Collision,n ] = E [N coll,n ] E [T CollisionPeriod,n ] (8)

    where E [T IdlePeriod,n ] is the expected number of idle timeslots between two consecutive packet transmissions (colli-sion or successful) and E [T CollisionPeriod,n ] is the expectednumber of collision time slots at each collision. Owing to theconstant probability of transmission p within an epoch, theIdlePeriod s between any two consecutive packet transmis-sions are i.i.d random variables with the same mean value.Also, since the decision to transmit in a time slot after a freechannel sense is independent of the number of previous freechannel senses, the number of collisions is independent of the

    length of IdlePeriod s. This holds true for CollisionPeriod salso, thus justifying the above two equations.

    E [N coll,n ] and E [T IdlePeriod,n ] are given by [5]:

    E [N coll,n ] =1 (1 p)nnp(1 p)n 1

    1 (9)

    E [T IdlePeriod,n ] =(1 p)n

    1 (1 p)n (10)

    We use the above two equations to derive the expected de-lay in the epoch n . Since the packet length is constant

    E [T CollisionPeriod,n ] = L. Therefore,

    E [T Idle,n ] =1 p

    np (11)

    E [T Collision,n ] =L(1 (1 p)n np (1 p)n 1 )

    np (1 p)n 1(12)

    Substituting the above equations in Equation 6, we get Equa-tion 5.

    Proposition 2. For a constant packet length of L, theexpected epoch energy consumption for n contending nodesis given by

    E [E n ] = R L (L 1)(1 p)n 1

    p(1 p)n 2+ T

    L(1 p)n 1(13)

    Proof.Similar to Equation 6, the energy consumptionin the epoch n is equal to the sum of the energy consumption

    in idle time, the energy consumption in collision time andthe energy consumption in a successful transmission.

    E [E n ] = E [E Idle,n ] + E [E Collision,n ] + E [E Success ] (14)

    Using equations from Proposition 1, E [E Idle,n ] can be cal-culated as

    E [E Idle,n ] = ( E [N coll,n ] + 1)

    n R

    E [T IdlePeriod,n ](15)

    = n R 1 p

    np= R

    1 p p

    (16)

    Surprisingly, for a constant p, the idle time energy consump-tion is independent of the number of contending nodes in anepoch, and depends only on p. Similarly, the collision timeenergy consumption is given by

    E [E Collision,n ] = E [N coll,n ] E [E CollisionPeriod,n ] (17)

    The expected energy consumption in a CollisionPeriod ,

    E [E CollisionPeriod,n ], is equal to the sum of the expectedenergy consumption by nodes involved in packet transmis-sions and the expected energy consumption by nodes in idlestate during the CollisionPeriod . Therefore,

    E [E CollisionPeroid,n ] = LT n

    i =2

    iP {Trans. = i|Collision }+ LR

    n

    i =2

    (n i)P {Trans. = i|Collision }(18)

    where P

    {Trans. = i

    |Collision

    }is the probability that i

    (2) nodes transmit their packets given that a collision hasoccurred, and it is given by

    P {Trans. = i|Collision }= P {Trans. = i|Trans. 2}=

    ni p

    i (1 p)n i1 (1 p)n np(1 p)n 1

    (19)

    Substituting the above equation in Equation 18, we get

  • 8/6/2019 Enhancement of IEEE 802.15.4 MAC protocol

    6/12

    E [E CollisionPeriod,n ] =L(T R ) np(1 (1 p)n 1 )

    1 (1 p)n np(1 p)n 1+ nL R (20)

    Substituting the above equation in Equation 17, we get

    E [E Collision,n ] =L(T R ) (1 (1 p)n 1 )

    (1 p)n 1+ LR (1 (1 p)

    n np(1 p)n 1 ) p(1 p)n 1

    (21)

    And nally, the expected energy consumption during a suc-cessful transmission is give by

    E [E Success ] = T L + R L (n 1) (22)

    Substituting the above equations in Equation 14 we getEquation 13.

    3.3 OptimalityLet pT opt (n, L ) and pEopt (n, L ) respectively be the transmis-sion probabilities at which E [T n ] and E [E n ] are minimized.

    Proposition 3. For n > 1, the transmission probability that minimizes the expected epoch delay E [T n ] is given by

    pT opt (n, L ) =1n

    , L = 1 (23)

    pT opt (n, L )

    n 2 + 2 n(n 1)(L 1) n

    n(n 1)( L 1), L > 1(24)

    Proof. The value of p that minimizes E [T n ] is obtainedby equating its rst derivative with respect to p to zero.

    dE [T n ]dp

    = 0 (25)

    For L = 1,

    E [T n ] =

    np(1 p)n 1(26)

    Taking the derivative and equating it to zero results in p =1n . Similarly, for L > 1, equating the derivative of E [T n ]from Equation 5 to zero yields the following equation.

    (1 p)n = L

    L 1 (1 np) (27)

    For np < 1, (1 p)n can be approximated to 1 np n ( n 1)2 p2 . Using this approximation and further simplica-tion, Equation 27 reduces to Equation 24 as an unique root

    to a quadratic equation. It can be veried that d2 E [T n ]

    dp 2 > 0for p = pT opt (n, L ), thus minimizing E [T n ].

    Proposition 4. For n > 1 and = T R the transmis-sion probability that minimizes the expected epoch energy consumption E [E n ] is given by

    pE

    opt (n, L ) n 2 + 2 n(n

    1)(L

    1) + 4 L(n

    1)(

    1)

    n

    n(n 1)( L 1) + 2 L(n 1)( 1) (28)Proof. Similar to the previous Proposition equating dE [E n ]dp

    to zero yields

    (1 p)n = L

    L 1 (1 np p2 (n 1)( 1)) (29)

    The same approximation as in the previous proposition andfurther simplication of the above equation results in Equa-tion 28. It can be veried, as in the previous Proposition,

    that the second derivative of E [E n ] with respect to p is pos-itive for p = pEopt (n, L ), thus minimizing E [E n ].

    Numerical calculations show that the approximations arevery close to the actual values. For n = 1, the optimumtransmission probability is equal 1, i.e., when there is a sin-gle sensor node left, delay and energy are minimized whenit transmits its packet with probability 1. Figure 5 plots pT opt (n, L ) and pEopt (n, L ) as a function of the number of con-tending nodes from n = 100 to n = 2 for different values of . As the gure shows, for optimal performance the proba-bility of transmission should increase with decreasing num-ber of nodes in an epoch in order to avoid excessive idletime slots. We can also see that the transmission probabil-

    ities are higher for lower values of . This is because if thenode spends more energy in the Receive state than in theTransmit state, energy is saved if it transmits more than itreceives.

    Figure 5: The optimal probability of transmission.

    Corollary 1. If T = R , then pT opt (n, L ) = pEopt (n, L ),i.e., the delay and energy consumption are jointly optimized with a single probability of transmission for T = R .

  • 8/6/2019 Enhancement of IEEE 802.15.4 MAC protocol

    7/12

    Proof. For = 1 Equations 24 and 28 are equal, whichproves the corollary.

    3.4 Optimality CriteriaNow, we discuss some interesting optimality criteria for theepoch delay and energy consumption.

    Proposition 5. Let (L) =( L

    1) 2

    L 2L 1 . If L > 1and n is large such that n 1n 1 then for optimal transmission probability the average epoch delay is a constant equal to (L).

    p = pT opt (n, L )E [T n ] (L) (30)Proof. For optimal transmission probability, sub-

    stituting Equation 27 into Equation 5 we get

    E [T n ] =(L 1)(1 pT opt (n, L ))

    1 np T opt (n, L )(31)

    For n large such that n 1n 1, from Equation 24 pT opt (n, L )

    0 (32)

    np T opt (n, L ) 2L 1 1

    L 1(33)

    Substituting the above equations into Equation 31 provesthe proposition.

    Corollary 2. For optimal transmission probability and for large number of nodes such that n 1n 1 thethroughput of p-persistent CSMA MAC protocol is a constant independent of n and depends only the length of the packet.

    OptimalThrougput L 2L 1

    (L 1)2packets / timeslot

    (34)

    Proof. Throughput is calculated as the inverse of the epoch delay. Equation 34 is a direct result fromProposition 5.

    Proposition 6. Let R (L) = L 2L 1( L 1)( 2L 1 1)

    . If L > 1 and n is large such that n 1n 1, then for op-timal transmission probability the ratio of average idletime in an epoch to the average epoch delay is a con-stant equal to R (L). Also, if the transmission prob-ability is greater than optimal then the ratio is lower than R (L) and vice versa.

    p = pT opt (n, L )

    E [T Idle,n ]

    E [T n ] R (L) (35)

    p pT opt (n, L )E [T Idle,n ]

    E [T n ]R (L) (36)

    Proof. Using Equations 9, 5 and 27 for optimal p,

    E [T Idle,n ]E [T n ]

    = 1L 1

    1np T opt (n, L ) 1 (37)

    For n 1n 1, using Equation 24

    np T opt (n, L ) 2L 1 1

    L 1(38)

    Substituting the above equation into the previous equa-tion the rst part of the proposition is proved.Similarly, for p pT opt (n, L )

    np2L

    1

    1

    L 1 (39)

    E [T Idle,n ]E [T n ]

    R (L) (40)

    Hence the proposition is proved.

    Figure 6 illustrates Proposition 6 for L = 5. The ap-proximation of the ratio to R (L) is primarily due theapproximation in Equation 24. As the gure shows, forlow values of n the ratio deviates away from R (L).

    Figure 6: Ratio of expected idle time to expectedepoch delay.

    Figure 7 plots the expected delay and energy consump-tion for an epoch with n = 50 nodes as a functionof the transmission probability p for different valuesof the packet length L. The gure can be explainedthrough the following question:

    In p-persistent CSMA, if the length of thepacket is increased from L to L + l ( l > 0),should the value of transmission probability p be increased or decreased to maintain thedelay and energy consumption constant?

    Figure 7 shows us that the answer to the above ques-tion is that it depends on the value of p. If p < pT opt (n, L ), then for the same delay, p should be in-creased and if p > p T opt (n, L ) then p should be de-creased. The same answer holds true for energy if pT opt (n, L ) is replaced by pEopt (n, L ). The gure alsoshows that the optimal transmission probability val-ues pT opt (n, L ) and pEopt (n, L ) decrease with increasingL.

    Figure 8 plots ratios of consecutive epoch delays andenergy consumptions as functions of n . In this gure,if the ratio is greater than 1 it implies that the delay

  • 8/6/2019 Enhancement of IEEE 802.15.4 MAC protocol

    8/12

    Figure 7: Expected delay and energy consumptionin an epoch with n nodes as a function of trans-mission probability, p, for different values of packetlength L.

    or energy value increases with decreasing n and viceversa . Greater the difference from 1 higher the rate of increase or decrease. The following observations canbe made from the gure:

    For p = pT opt (n, L ), E [T n ] is almost constant overall n . For p > p T opt (n, L ), E [T n ] shoots up forhigher values of n due to higher number of col-lisions. For p < p T opt (n, L ), E [T n ] shoots up forlower values of n due to higher number of idletime slots.

    For p = pEopt (n, L ), E [E n ] increases monotonicallywith increasing n . For p > p Eopt (n, L ), E [E n ]

    shoots up for higher values of n due to highernumber of collisions. For p < p Eopt (n, L ), E [E n ] ishigher than the optimal energy consumption val-ues for lower values of n due to higher number of idle time slots.

    Figure 8: Ratio of expected delays and energy con-sumptions for consecutive epochs.

    For CD the implication of this criterion is that the delaybetween two successful packet transmissions is independentof the number of nodes in the network as long as the nodesare transmitting at optimal transmission probabilities. ForOSD, the implication is the following proposition.

    Proposition 7. For OSD, if n is large such that n 1n 1, then the transmission probability is optimal if and only if the epoch of delay of two consecutive epochs are equal.

    p = pT opt (n, L ) E [T n 1 ] = E [T n ] (41)

    Proof. (i) To prove that

    p = pT opt (n, L )E [T n ] = E [T n 1 ] (42)

    From Equation 27 p is optimal when

    (1 p)n = L

    L 1 (1 np) (43)

    For optimal value of p,

    E [T n ]E [T n 1 ]

    =(1 pT opt (n, L ))(1 (n 1) pT opt (n 1, L ))

    (1 pT opt (n 1, L ))(1 np T opt (n, L )) 1 for

    n 1n 1 (44)

    We have used Equation 24 in the above simplication.

    (ii) To prove that

    E [T n ] = E [T n 1 ] p = pT opt (n, L ) (45)

    Using equation 5, E [T n ] = E [T n

    1 ] implies

    L (L 1)(1 p)nnp(1 p)n 1

    = L (L 1)(1 p)n 1

    (n 1) p(1 p)n 2(46)

    Algebraic manipulations reduce the above equation to

    (1 p)n = L

    L 1 (1 np) (47)

    which is the same as equation 27, which implies p = pT opt (n, L ).

    Hence proved.

    4. CHARACTERIZATION OFIEEE 802.15.4Having determined the performance of optimal p-persistentCSMA, we characterize the performance of IEEE 802.15.4MAC in this section.

    Figure 9 plots the average transmission probabilities for theIEEE 802.15.4 MAC (obtained using the p-persistent CSMAmodel) in comparison to the transmission probabilities foroptimal p-persistent CSMA for both CD and OSD. The

  • 8/6/2019 Enhancement of IEEE 802.15.4 MAC protocol

    9/12

    transmission probabilities shown for IEEE 802.15.4 are ob-tained using the default values specied in the standardincluding the two required sensing slots, which is not re-quired for the generic p-persistent CSMA MAC. For OSD,the transmission probability for IEEE 802.15.4 quickly sta-bilizes at 116 . 5 = 0 .0606 and for CD, close to that value. Thisbehavior is in contrast to the trend shown by optimal prob-abilities. This implies that the back-off mechanism of IEEE802.15.4 protocol can be modied for optimal performanceas follows:

    The change of back-off window sizes should happen atsuccessful transmissions instead of at collisions or busychannel senses. Further, for OSD, successful packettransmissions are a better indicator for future conges-tion than collisions or busy channel senses.

    For CD, the average transmission probability for IEEE802.15.4 MAC remains almost constant irrespective of the number of contending nodes, while for optimal p-persistent CSMA it reduces with N . For optimal per-formance the window sizes should be reective of thenumber of contending nodes.

    For OSD, the back-off window size should actuallydecrease with every successful transmission as the op-timal transmission probability increases.

    Figure 9: Comparison of transmission probabilitiesfor IEEE 802.15.4 and optimal p-persistent CSMAfor CD and OSD.

    In the next section, we present a channel feedback enhancedIEEE 802.15.4 MAC that incorporates the above features.

    5. ENHANCED IEEE 802.15.4The key idea in enhancing the performance of the IEEE802.15.4 is to use the optimality criteria for p-persistentCSMA derived in Section 3. In particular, we consider thecriterion described in Proposition 6 which requires measure-ment of the idle time as well as the delay between two con-secutive successful transmissions. These measurements canbe construed as feedback from the channel. Before we de-scribe how this feedback can be used, we review the relatedwork in channel feedback-based medium access control tech-niques.

    5.1 Related WorkThe idea of using feedback from the channel to control thetransmission probabilities of contending nodes has been usedfor a long time. Rivest in [17] has proposed a ternary feed-back model in which each node has to monitor three chan-nel conditions - absence of transmissions, successful trans-missions and, collisions. Rivest has shown that estimatingthe true value for the number of nodes n and setting thetransmission probability to 1n maximizes the throughput inslotted-Aloha type protocols (in which the packet length isequal to a single time slot). If the packet length is of mul-tiple time slots, this results does not hold true as we haveshown in Proposition 3 in Section 3. In [4] a control mech-anism has been presented that uses the energy consumedby a tagged node in the network in the above three chan-nel conditions between two successful packet transmissions.This mechanism is not applicable in the case of OSD be-cause each node has a single successful packet transmission.Similar strategies based on the estimation of the three chan-nel conditions have been proposed ([11], [3], [7]) all of whichare more suitable for steady state conditions (like in CD) inwhich the number of contending nodes remain constant.

    A good control mechanism should depend on the networkand traffic conditions as well as the application require-ments. Our objective is to present a feed-back control mech-anism that is suitable for both CD and OSD scenarios. Onemajor challenge presented in OSD is to estimate the truesystem state using channel conditions in the face of con-stantly changing state of the system (decreasing number of contending nodes). Nevertheless, the analysis presented inSection 3 presents us with unique opportunities to efficientlycontrol the transmission probabilities in real time.

    5.2 Our ApproachOur approach for channel feedback-based control of trans-mission probabilities is mainly based on Proposition 6. Ac-cording to the proposition, if the transmission probabilityis optimal then the ratio of idle time to the delay betweentwo consecutive successful packet transmissions is R (L). If the transmission probability if higher than the optimal valuethen the ratio is lower than R (L) and vice versa .

    First we describe how this optimality criterion can be usedfor an enhanced p-persistent CSMA and then adapt it todesign an enhanced IEEE 802.15.4 MAC protocol.

    5.2.1 Enhanced p-Persistent CSMA MAC Each contending node can start by choosing a transmissionprobability uniformly at random in a small interval of say

    (0, 0.05). Each node in the network measures the currentepochs idle time and delay and uses these measurements todetermine the transmission probability for the next epoch.If the ratio of idle time to the delay is lower than R (L) thenit means that the transmission probability would have beengreater than the optimal value. Therefore the transmissionprobability of the next epoch should be lower than the cur-rent epochs to bring the delay closer to optimal. Similarly,if the ratio if higher than R (L) the next epochs transmis-sion probability should be increased for optimal delay. Thus,the transmission probability update rule is given by

  • 8/6/2019 Enhancement of IEEE 802.15.4 MAC protocol

    10/12

    pnext = pcurrent

    R (L)(48)

    where = T Idle,currentT current . In this update rule the increase ordecrease in the transmission probability is directly propor-tional to the value of the ratio .

    5.2.2 Enhanced IEEE 802.15.4The IEEE 802.15.4 MAC protocol uses different windowsizes to control the transmission of packets. In order to usethe above optimality criterion the transmission probabilityupdate rule should be converted into a window size updaterule. For this we make use of the approximation we used inSection 2 to model the IEEE 802.15.4 MAC as a p-persistentCSMA MAC with changing p. In this, if a uniform-randomback-off window has a size of W time slots then it can beclosely modeled as a geometric-random choice of time slotwith parameter p as long as p = 2W +1 . Thus a transmis-sion probability can be converted into window size by usingthe inverse relationship, i.e., W = 2 pp . Based on this andthe transmission probability update rule given above, the

    window update rule for the Enhanced IEEE 802.15.4 MACis:

    W next =(W current + 1) R (L)

    (49)

    A key aspect of this update rule is that, all nodes in thenetwork should updated their windows at every successfulpacket transmission. Figure 10 shows the ow chart for theEnhanced IEEE 802.15.4 MAC operation at a node.

    Figure 10: Flow chart for Enhanced IEEE 802.15.4

    operation at a node.It should be noted that all aspects of the original IEEE802.15.4 MAC have been preserved except for when the win-dow is changed and how it is changed.

    5.2.3 EvaluationFigure 11 shows the performance gains for the EnhancedIEEE 802.15.4 MAC in comparison to the original. Thegure also shows the performance of the optimal p-persistentCSMA and enhanced p-persistent CSMA. It should be noted

    that the performance of the enhanced IEEE 802.15.4 MACmatches that of the enhanced p-persistent CSMA MAC forCW = 0, i.e., if the nodes do not sense the channel fortwo consecutive free slots but transmit their packet oncetheir chosen time slot occurs. Thus, for the enhancement weuse, the performance of the enhanced p-persistent CSMA isan upper-bound on the performance of the enhanced IEEE802.15.4 MAC.

    An important observation from the gure is that the systemthroughput reduces drastically with increasing number of contending nodes for the original IEEE 802.15.4 MAC. Butfor the enhanced version, the system throughput is almostconstant with the number of nodes. Implying that it is muchmore scalable than the original. This holds for energy also.These signicant gains in performance are observed for bothCD and OSD scenarios.

    5.2.4 DiscussionIn actual implementation the measurement of idle time andthe delay between two consecutive successful packet trans-missions can be achieved easily at each node by observingACKs from the sink. If all nodes in the network are in theradio range of each other then all nodes see the same idletime between two consecutive successful packet transmis-sions. If on the other hand, all nodes are in the radio rangeof the sink but not in the radio range of each other theneach node sees an idle time that is based on the numberof nodes in its neighborhood. Thus, the above update ruletries to optimize the transmission probability for the num-ber of nodes in the neighborhood of each node and not forthe entire network. However, the sink can measure the idletime for the entire network and piggy back this value in theACKs to the sensor nodes. The sensor nodes measure theepoch delay as the interval between the ACKs. Thus, in thiscase, the channel feedback is via the sink.

    The performance difference in terms of degradation or im-provement, if any, between the local feedback and globalfeedback based mechanisms needs to be investigated. Thiswill be one of the directions for our future work.

    An important aspect of the Enhanced IEEE 802.15.4 MACprotocol is that all nodes should change their window sizesand choose a new time slot (or start a new counter) at everysuccessful packet transmission. Otherwise, only a few nodesoptimize their window sizes and this could lead to unfairnessin the CD scenario.

    Another important aspect to consider is the effect of channelerrors. The current standard MAC assumes channel errorsbased packet losses to be collisions and backs-off accord-

    ingly, thus misconstruing channel errors as congestion. Butthe enhanced MAC protocol does not change any protocolparameters due to channel errors based packet losses, as suc-cessful packet transmissions are taken as the only indicatorsof channel congestion. Nevertheless, a thorough investiga-tion of the effect of channel errors will be an important partof our future work.

    In this paper we have focused on dense sensor networks. Thefollowing table shows the throughput performance compar-ison of the original and enhanced IEEE 802.15.4 MAC pro-

  • 8/6/2019 Enhancement of IEEE 802.15.4 MAC protocol

    11/12

  • 8/6/2019 Enhancement of IEEE 802.15.4 MAC protocol

    12/12