Duty Cycle Management in Sensor Networks Based ...

2 downloads 0 Views 178KB Size Report
Jul 29, 2004 - duration of sleep/vacation cycle, and duration of busy period per node. .... When the LSTs of the packet service time and vacation time are ...
Duty Cycle Management in Sensor Networks Based on 802.15.4 Beacon Enabled MAC Jelena Miˇsi´c and Vojislav B. Miˇsi´c ∗† July 29, 2004

Abstract The recent IEEE 802.15.4 standard offers a promising platform for wireless sensor networks. Among the main problems in many sensor network applications is the problem of ensuring the desired quality of service, expressed as the mean data rate obtained from a specific spatial area, while simultaneously maximizing the lifetime of the network. In this work we consider the feasibility of duty cycle management as the vehicle to achieve these goals. We consider the IEEE 802.15.4 network in beacon enabled mode, and analyze its performance under two duty cycle management algorithms. Both algorithms are fully distributed, i.e., the nodes autonomously control their sleep period according to local information only. In the first algorithm, the sleep period is a geometrically distributed random variable with a given mean value; in the second, the sleep period is inversely proportional to the most recent duration of the packet service time. We model and evaluate both policies using the theory of discrete time Markov chains and M/G/1/K queues with vacations, where geometrically distributed sleep periods are modeled as server vacations. We found that both policies are capable of achieving almost 100% reliability and less than 1% utilization under a wide range of packet arrival rates and network size.

Keywords: sensor networks, energy management, IEEE Std 802.15.4 (ZigBee), CSMA-CA

1

Introduction

Recently adopted IEEE 802.15.4 standard is poised to become the key enabler for low complexity, ultra low power consumption, low data rate wireless connectivity among inexpensive devices such as sensors [3]. Two network topologies are allowed by the standard, but both of them rely on the presence of a central controller device known as the PAN coordinator. In the peer-to-peer topology, devices can communicate with one another directly, as long as they are within the physical range. In the star-shaped topology, the devices must communicate through the PAN coordinator. The network uses two types of channel access mechanism, one based on slotted CSMA-CA algorithm in which the slots are aligned with the beacon ∗ Department of Computer Science, University of Manitoba, Winnipeg, Manitoba, Canada. † This research is partly supported by the University of Manitoba URGP grant no. 431-1725-23 and the NSERC Discovery

Grant.

1

frames sent periodically by the PAN coordinator, and another based on unslotted CSMA-CA similar to IEEE 802.11, in which case there are no beacon frames. The beacon enabled mode and the start-based hierarchical topology appear to be better suited to sensor network implementation then their unslotted or peer-to-peer counterparts because the PAN coordinator can act as both the network controller and the sink to collect the data from the sensor nodes. Among the most important requirements for sensor networks is the maximization of their lifetime due to high costs (and sometimes even infeasibility) of maintenance activities. Sensor lifetime can be extended by adjusting the frequency and ratio of active and inactive periods of sensor nodes [5]. This approach is supported by the 802.15.4 standard in its beacon enabled mode with slotted CSMA-CA, where the interval between the two beacons is divided into active and inactive parts, and the sensors can switch to low-power mode during the inactive period. However, many sensor applications (such as surveillance, health care, and structural health monitoring) require continuous monitoring of relevant variables and events, and letting the network sleep for some time is simply out of the question. In such cases, duty cycle management can be applied at the level of individual sensor nodes, provided the number of sensors covering a given physical area is larger than the minimum number based on the required data rate. (As both cost and physical dimensions of wireless sensors are steadily decreasing, such a scheme is becoming increasingly attractive.) The desired data rate received at the sink (called event reliability in [5]) can then be achieved by adjusting the number of sensors that are active at any given time (this number is referred to as the sensor network QoS [4]). When redundant sensors are used, their duty cycle can be reduced to increase the lifetime of the network while maintaining the desired QoS. In this manner, the costly maintenance and human intervention can be reduced, which may well offset the increased initial cost of deployment. As an added bonus, the failure of individual sensors will not affect network performance since the duty cycle of the remaining ones can be increased to compensate for loss. Only a few proposals to manage the number of active sensors in such networks have been reported to date. In [4], the authors propose a centralized approach in which the base station periodically collects packets from all sensors. It then determines whether the number of active sensors is sufficient to achieve the desired QoS and forwards this information over the broadcast channel to all sensors. The sensors independently determine, using the probabilistic Gur game automaton, whether to stay active or go to sleep. However, the number of active sensors is limited to one-half of the total number, due to the structure of the Gur automata. In addition, the energy efficiency is jeopardized by the fact that all sensors need to periodically report to the base station, regardless of their state, and they all need to listen to the transmissions from the base station even while in the low power state. (The energy consumption of the receiver is often nearly equivalent to that of the transmitter.) In an alternative approach, each sensor transmits its data packets to the base station, which acknowledges it and provides a simple feedback on whether the actual QoS is higher than the desired one or not. The sensor then uses this information, through a simple probabilistic automaton, to independently determine whether to stay active or go to sleep [1]. Inactive nodes need not listen to transmissions from the base station and can go to sleep for prolonged periods. The energy consumption is thus reduced, and the overall network lifetime is increased compared to the approach from [4]. Unfortunately, neither of these approaches consider the real world environment in which the packets 2

from different sensors can experience significant delays due to collisions and collision avoidance. As a consequence, the dependency between the number of sensors and arrival rates of sensor data, as independent variables, and the resulting reliability and lifetime, as dependent ones, will be much more complicated, and detailed analyses are needed to assess the feasibility of the duty cycle management approach. In this paper, we analyze the performance of a redundant, duty-cycle-limited sensor network operating under IEEE 802.15.4 standard [3]. We assume that the network operates in a beacon-enabled slotted CSMA-CA mode, and that each sensor has a small buffer for data packets obtained by sensing the target physical variable. When the sensor becomes active after a sleep period, it will try to send the data from its buffer to the base station – i.e., the PAN coordinator. After emptying the buffer, the sensor node goes to sleep for a random time which is geometrically distributed. If the buffer is empty when the sensor wakes up, it will immediately go to sleep again. Two distributed policies for managing the sleep periods of individual sensor nodes are analyzed. In the first policy, the mean value of this period is fixed; in the second, it is obtained as a function of the total processing time per packet, including random backoffs, packet transmission time, waiting for acknowledgment, and the acknowledgment packet. In order to evaluate the performance of these schemes, we model the network adapter of the sensor device as a M/G/1/K system with vacations. The server is, in fact, the MAC protocol which executes backoff procedures, does clear channel assessments, waits for and receives acknowledgements, and handles packet retransmissions in the case of collisions. The MAC protocol is modeled as a discrete time Markov chain with state transitions at the edges of backoff period boundaries. The model is, then, used to derive the expression for the mean number of packets received by the network coordinator; this variable is called “network reliability” in [5]. We show that the network reliability is a function of different MAC parameters, packet size, buffer size, network size (i.e., number of nodes) and of duty cycle management discipline. Furthermore, we derive expressions for the sensor utilization, mean number of active nodes, duration of sleep/vacation cycle, and duration of busy period per node. On the side of the MAC, we derive the channel access probability, the probability that the medium is idle on both clear channel assessments, and the probability distribution of the packet queue size. The paper is organized as follows. In Section 2, we present the queueing model for the sensor node with duty cycle management. In Section 3, we model the behaviour of the MAC algorithm, using a discrete time Markov chain and the queueing model derived earlier. The probability distribution for the packet service time is calculated in Section 4. Section 5 presents and discusses the results of our analysis, and Section 6 concludes the paper. The Appendix explains some basic features of physical (PHY) and MAC layers of the devices compliant with IEEE 802.15.4 standard.

2

Determining the sensor utilization

In the discussion that follows we consider the management of sensor activity in the 802.15.4 network with beacon enabled, slotted CSMA-CA channel access mechanism. The probability distribution of the packet service time in the MAC sublayer may be described by the Probability Generating Function (PGF) Tt (z). The Laplace-Stieltjes Transform (LST) of this probability distribution Tt∗ (s) can be obtained by substituting the variable z with e−s in the expression for Tt (z). Also, let the probability distribution function of the 3

queue size L Poisson packet arrivals

MAC+PHY server awake

packets rejected when the queue is full

server sleeps

Figure 1: M/G/1/K Queuing/vacation model for sensor node packet service time be denoted with Tdt (x) = Pr ob[X ≤ x], while the corresponding probability density function is denoted with tdt (x). Mean duration of the packet service time is, then, Tt = Tt0 (1). We will also use the probability to access the medium, τ , as well as the probabilities that the medium is idle on the first and second Clear Channel Assessment (CCA). For the time being, we will assume that all the parameters of MAC sublayer are known; their values will be calculated in Sections 3 and 4. Let n sensors be associated with the network coordinator. The buffer at the network interface of the device has the capacity to store L packets. The packet arrival process to sensor i is modeled as the Poisson process with arrival rate λi . The MAC sublayer will serve all packets in the queue in FCFS and exhaustive fashion, i.e., it will be active as long as there are packets in the device buffer according to the queueing model given in Fig. 1. When the buffer is emptied, the server (MAC) takes a vacation and the sensor goes to sleep. During the vacation period, packets continue to arrive to the buffer, but due to the small size of the buffer some of them will be discarded. If the buffer is empty upon returning from vacation, the server immediately takes a new vacation in order to prevent idle waiting (and reduce overall energy consumption). The duration of the vacation period is geometrically distributed with the parameter Psleep : V (z) =

∞ X

k−1 k (1 − Psleep )Psleep z =

k=1

(1 − Psleep )z 1 − z Psleep

(1)

We will now analyze the system, starting from Markov points which include moments of packet departure and moments when sensor wakes up from the vacation. We will make use of the Laplace-Stieltjes transform of the vacation time, V ∗ (s), and the corresponding probability distribution function, V (x), and probability density function, v(x). Mean duration of the vacation is V = V 0 (1) = 1/Psleep . The probabilities of k packet arrivals to the sensor buffer during the packet service time and during the sleep time are denoted as ak and f k , respectively, and they amount to Z ∞ (λi x)k −λi x e tdt (x)d x (2) ak = k! 0 Z ∞ (λi x)k −λi x fk = e v(x)d x (3) k! 0

4

We also note [6] that the PGF for the number of packet arrivals to the sensor buffer during the packet service time and sleep time, respectively, are A(z) = F(z) =

∞ X k=0 ∞ X

Z



k

ak z =

e−xλi (1−z) dtt (x) = Tt∗ (λi − zλi )

(4)

e−xλi (1−z) v(x) = V ∗ (λi − zλi )

(5)

0

Z



fk zk = 0

k=0

When the LSTs of the packet service time and vacation time are known, the probabilities ak and f k can be obtained as 1 d k A(z) ak = (6) k! dz k z=0 1 d k F(z) fk = (7) k! dz k z=0 Let πk and qk denote the steady state probabilities that there are k packets in the device buffer immediately upon the departure of a packet and after returning from vacation, respectively. Then, the steady state equations for state transitions are πk

k+1 X (q j + π j )ak− j+1 =

for 0 ≤ k ≤ L − 2

j=1

π L−1

∞ L−1 X X (q j + π j ) ak = qL + j=1

(8)

k=L− j

qk = (q0 + π0 ) f k P q L = (q0 + π0 ) ∞ k=L f k PL P L−1 1 = k=0 qk + k=0 πk

for 0 ≤ k ≤ L − 1

The probability distribution of the device queue length at the time of packet departure can be found by k solving the system in a recursive manner. If we introduce the substitution πk0 = qqk0 +π , we obtain +π0 π00 = 1   k X 1  0 0 πk+1 = πk − π 0j ak− j+1 − f k  , for 0 ≤ k ≤ L − 2 a0 j=1

(9)

From system (9), we obtain the probability that the buffer is empty either after packet transmission, or upon returning from sleep, i.e., the probability that the vacation follows the arbitrary Markov point. q 0 + π0 =

1 L−1 X k=0

5

πk0 +

(10)

∞ X

fk k=L

Consequently, the probability that the packet service follows the arbitrary Markov point is 1 − q0 − π0 , and the mean distance between two Markov points is η = (q0 + π0 )V + (1 − q0 − π0 )Tt

(11)

Then the probability that the sensor is active is ρ0 =

(1 − q0 − π0 )Tt η

(12)

We will utilize this parameter in the analysis of the operation of the MAC sublayer in Section 3. Offered load to the system is ρ = λi Tt , while the probability that the packet will not be admitted to the sensor buffer due to insufficient space, is PB = 1 −

ρ0 , ρ

(13)

Given that total number of sensors is n, the mean number of active sensors is n on

  n X n 0k k ρ (1 − ρ 0 )n−k = k k=0

(14)

The sensor network reliability per node – i.e., the number of packets that each sensor delivers to the coordinator per time unit – is equal to one over mean time between packet departures from the sensor. This time can be found by noting that the time between the start of two consecutive vacations (i.e., the vacation cycle) is η Cv = (15) q0 + π0 Of course, the vacation cycle is equal to the sum of the durations of busy period and subsequent vacation. Therefore, the duration of busy period is equal to 2v =

η −V q0 + π0

(16)

The number of packets sent during the busy period is n a = 2v /Tt

(17)

Then, the mean period between two packet transmissions is Cv /n a = Tt tbo f f /ρ 0 , and the number of packets received by the coordinator is ρ0 r= = λi (1 − PB ) (18) Tt tbo f f where tbo f f denotes the duration of basic backoff period from MAC algorithm. Note that r corresponds to the network reliability as defined in [5], although it is, in fact, the throughput of the coordinator node in packets.

6

Assuming that the total length of physical layer headers and MAC headers and trailer is M bytes, and that the mean packet length at the MAC sublayer is G backoff periods, the throughput can be calculated as S = nr (G − M/10)

(19)

This analysis brings up the challenging question: how to tune the sleep (vacation) time of the node in order to achieve required reliability at the coordinator. Mathematically speaking we need to solve the equation 1 − q 0 − π0 nr = n =K (20) (q0 + π0 )V + (1 − q0 − π0 )Tt for Psleep , given the desired network reliability K . As mentioned above, the packet service time in the MAC sublayer depends on the packet arrival rate, packet length, and the number of nodes. As individual nodes do not know the total number of nodes, they cannot know the total number of packets received by the network coordinator. In Section 5, we will model and evaluate few policies which can control reliability per node.

3

Analysis of the MAC sublayer

Let us now determine the values of different parameters of the MAC layer. (A detailed description of the 802.15.4 protocol is given in the Appendix.) The time needed to transmit a packet from the head of the queue includes the time from the moment when the CSMA-CA algorithm has started (i.e., from the start of the backoff countdown procedure) to the moment when the receipt of the packet has been acknowledged by the destination device. We assume that the MAC sublayer will retry the transmission of the packet until a positive acknowledgment is received. The MAC can be modeled with discrete time Markov chain with the inclusion of vacation (sleep) states and transition probabilities from the energy management system, as shown in Fig. 2. The system enters the vacation state with the probability π0 – which is the probability that the device buffer is empty upon packet departure. The probability to stay in the vacation state (which means that the sensor remain inactive) is 1 − ρ 0 (the value of ρ 0 has been calculated earlier). Let us now introduce the following random variables: 1. b(t) represents the value of the backoff time counter which, at the beginning of the backoff period, can take any value in the range 0 . . 2BE − 1. When the counting starts, it decrements at the boundary of each backoff unit period. The value b(t) will be frozen during the inactive portion of the beacon interval, and countdown will resume after the end of the beacon in the next superframe. 2. n(t) represents the value of NB at time t; it belongs to the range 0 . . macMaxCSMABackoffs − 1. 3. c(t) represents the value of CW at time t; it may be 0, 1, or 2. 4. d(t) represents the current value of the ”delay line counter”, which is started if the transmission can’t be finished within the current superframe. Assuming a fixed packet size equal to G p backoff 7

periods (including MAC and PHY headers), the period between the packet and its acknowledgement equal to tack backoff periods, and the duration of the acknowledgement packet G ack , the number of backoff periods necessary to complete the transmission within the current superframe is Dd = 2 + G p + tack + G ack (we neglect the beacon frame size here). The probability that the remaining time within the superframe will not suffice to complete the transmission, i.e., that the MAC will have to go through the delay line, is Pd = Dd /S D, where S D denotes the superframe size. The process {n(t), c(t), b(t), d(t)} which defines the state of the device at backoff unit boundaries, is shown schematically in Figs. 2 and 3. To reduce the notational complexity, we have shown the last tuple member d(t) only within the ”delay line” and omit it in other cases where its value is zero. Also, the idle state with no packets to transmit is denoted only as state x0 . Also, the probabilities P{n(t + 1) = i, c(t + 1) = j, b(t + 1) = k − 1, d(t + 1) = l − 1 | n(t) = i, c(t) = j, b(t) = k, d(t) = l} are written simply as P{i, j, k − 1, l − 1 | 0, j, k, l}. Finally, the constant macMaxCSMABackoffs which represents the maximum value of the variable NB is denoted with m. For convenience, let W0 stand for 2macMinBE , and let i represents the current value of NB during the execution of the algorithm (i = 0 . . m). Then, the maximum value of the random waiting time (expressed in units of backoff periods) that corresponds to i will be Wi = W0 2min(i,5−macMinBE) . The probabilities that the medium is idle on first and second CCA are denoted as α and β, respectively; they have to be distinguished because their values differ. Namely, at first CCA, the medium is busy if there is a transmission in progress (originating from another device), and this may be the start, middle, or end of that particular packet. At second CCA, however, the medium is busy only if some other device has just started its transmission (i.e., this must be the first backoff period of that packet). The non-null transition probabilities can be described with the following: P{0, 2, k | i, 0, 0} = P{0, 2, k | 0} = P{0 | i, 0, 0} = P{0, 2, k | m + 1, 0, 0} = P{i, 2, k − 1 | i, 2, k} = P{i, 1, 0 | i, 2, 0} = P{i, 0, 0 | i, 1, 0} = P{i + 1, 2, k | i, 2, 0} = P{i + 1, 2, k | i, 1, 0} = P{i, 2, 0, l | i, 2, 0} = P{i, 2, 0, l − 1 | i, 2, 0, l} = P{i, 0, 0 | i, 2, 0, 0} =

1 − π0 , for i = 0 . . m; k = 0 . . 2BE − 1 W0 ρ0 , for i = 0 . . m; k = 0 . . 2BE − 1 W0 π0 , for i = 0 . . m 1 , for k = 0 . . 2BE − 1 W0 1, for i = 1 . . m; k = 1 . . 2BE − 1; α(1 − Pd ), for i = 0 . . m; β, for i = 0 . . m; (1 − α)(1 − Pd ) , for i = 0 . . m; k = 0 . . 2BE − 1 Wi+1 1−β , for i = 0 . . m; k = 0 . . 2BE − 1 Wi+1 Pd , for i = 0. .m; l = 0. . Dd − 1 Dd 1, for i = 0 . . m; l = 0 . . Dd − 1; 1 for i = 0 . . m;

(21)

Let the stationary distribution of the chain be xi, j,k,l = lim P{n(t) = i, c(t) = j, b(t) = k, d(t) = l}, t→∞

8

1-ρ' ρ', uniformly distributed among the W 0 states

0

uniformly distributed among the W 0 states

0,2,W 0-1

1

0,2,W 0-2

0,2,1

1

Pd

0,2,0

(1-Pd)(1-α)

(1-Pd)α "delay line" 0

0,1,0 1-β β

uniformly distributed among the W 1 states

1 π0

0,0,0 1-π0

1,2,W 1-1

1

1,2,W 1-2

1,2,1

1

Pd

1,2,0

(1-Pd)(1-α)

(1-Pd)α "delay line" 1

1,1,0 1-β β

1 π0

1,0,0 1-π0

uniformly distributed among the W m states

m,2,W m-1

1

m,2,W m-2

m,2,1

1

Pd

m,2,0

(1-Pd)(1-α)

(1-Pd)α "delay line" m

m,1,0 1-β β

1 π0

m,0,0 m+1,0,0

1-π0

Figure 2: Markov chain model of slotted CSMA-CA algorithm in non-saturation regime with finite buffer.

9

Pd

Pd/Dd

i,2,0,Dd-1 1

Pd/Dd

i,2,0,Dd-2 1 1

Pd/Dd

i,2,0,1 1

Pd/Dd

i,2,0,0 1

Figure 3: Delay line for Fig. 2 for i = 0 . . m; j = 0, 1, 2; k = 0 . . 2BE − 1; l = 0 . . Dd − 1. For brevity, we will omit l whenever it is zero, and introduce the auxiliary variables C1 , C2 , and C3 : x0,1,0 = x0,2,0 (1 − Pd )α = x0,2,0 C1

(22)

x1,2,0 = x0,2,0 (1 − Pd )(1 − αβ) = x0,2,0 C2

(23)

x0,0,0 = x0,2,0 ((1 − Pd )αβ + Pd ) = x0,2,0 C3

(24)

Then, we obtain the following relations: x0 = xi,0,0 = xi,2,k = xi,1,0 = x0,2,k = xm+1,0,0 = P Dd −1 l=0

xi,2,0,l

=

 π0 1 − C2m+1 x0,0,0 ρ 0 (1 − C2 ) i x0,0,0 C2 , Wi − k C2i x0,0,0 · , Wi C3 C1 C2i x0,0,0 C3 W0 − k x0,0,0 W0 C 3 C2m+1 x0,0,0 C3 x0,0,0 C2i Pd (Dd − 1) 2C3

for i = 0 . . m for i = 1 . . m; k = 0 . . Wi − 1 for i = 0 . . m

(25)

for k = 1 . . W0 − 1

Since the sum of all probabilities in the Markov chain must be equal to one, we obtain: x0 +

m W i −1 X X i=0 k=0

xi,2,k +

m X i=0

xi,0,0 +

m X

xi,1,0 + xm+1,0,0 +

i=0

m D d −1 X X i=0 l=0

10

xi,2,0,l = 1

(26)

which gives the value for x0,0,0 as x0,0,0 =

1  m m+1  i X Pd (Dd − 1) C2 (Wi + 1) 1 − C2 C1 π0 C m+1 + 1+ + 0 + + 2 2C3 1 − C2 C3 ρ 2C3 C3 i=0

(27)

The total probability to access the medium is τ=

m X

xi,0,0 = x0,0,0

i=0

1 − C2m+1 1 − C2

(28)

However, we should distinguish between the probability τ1 to access the medium when the transmission is deferred to the next superframe due to lack of space, and the probability τ2 to access the medium in the current superframe: Pd τ C 3  Pd = 1− τ C3

τ1 =

(29)

τ2

(30)

We now estimate probabilities that medium is idle on the first and second CCA. At any moment, kon stations out of n can be active (0 ≤ kon ≤ n). The number of active stations follows the binomial  distribution, i.e. P(kon ) = knon ρ 0kon (1 − ρ 0 )n−kon . Exactly q active stations (where q = 0 . . kon ) will have transmissions delayed to the beginning of the next superframe. We assume that the variables q and kon − 1 − q, which denote non-delayed and delayed  packet transmissions, respectively, follow a binomial distribution with probability Pq (kon ) = konq−1 (1 − k −1−q

Pd )q Pd on . The probability α that the medium is idle at the first CCA is obtained as the ratio of the mean number of busy backoff periods within the superframe and the total number of backoff periods in the superframe, S D. The probability that any or more delayed packets will be transmitted in one superframe will take place is n 1 (kon ) = (1 − (1 − τ1 )(kon −1−q) ) (31) and the number of busy backoff periods due to these transmissions is n 1 (kon )(G p + tack + G ack ). As the mean period between two transmissions of non-delayed packets is 1/(qτ2 ), the mean number of non-delayed packet transmissions within the superframe is n 2 (kon ) = (1 − (1 − τ1 )(kon −1−q) )(S D − Dd) qτ2 + (1 − τ1 )(kon −1−q) S D q τ2

(32)

Then, the probability that the medium is idle at the first CCA is  n  n−1 X X n (n 1 (kon ) + n 2 (kon ))(G p + tack + G ack ) 0kon 0 n−kon α =1− ρ (1 − ρ ) Pq (kon ) kon SD k =1 q=0 on

11

(33)

and the probability that medium is idle at the second CCA is   n−1 β = (1 − ρ 0 )n−1 + 0   kX n  on −1 X n 1 1 0kon 0 n−kon ρ (1 − ρ ) Pq (kon ) + ((1 − τ )(kon −1) )+ k S D S D on kon =1 q=0  (Dd − 2) (kon −1−q) q q (1 − τ1 ) (1 − τ2 ) + (1 − Pd )(1 − τ2 ) SD

4

(34)

Determining the probability distribution for the packet service time

We will assume that every transmitted packet has to be acknowledged, otherwise packets have to be retransmitted. Let us denote the PGF of the packet length as G p (z) and the mean packet size as G = G 0p (1) backoff periods. Let the PGF of the interval between the end of the packet and the arrival of the corresponding acknowledgement (macMaxAckWait) be Sack (z), and let G pa (z) stand for the PGF of the acknowledgement duration. The PGF of the duration of the beacon frame is denoted as Bea (z). We will also use the MAC parameter BO (which stands for macBeaconOrder) that regulates the period between the beacons as B I = 2BO aBaseSuperframeDuration (35) The duration of the superframe depends on the energy management policy of the network. For simplicity, we assume that BO has a constant value of zero, in which case the superframe duration is S D = aBaseSuperframeDuration

(36)

We will need the probability distribution of the packet service time at the MAC sublayer, which is equal to the service time for the packet queue at the network node. In order to derive this distribution, we begin by modeling the effect of freezing the backoff counter during the inactive period of the superframe. The probability that a backoff period is the last one within the active superframe is 1 (37) SD The PGF for the effective duration of the backoff period, including the duration of the beacon frame, Plast =

is Bo f f (z) = (1 − Plast )z + Plast z (BI−SD+1) Bea (z)

(38)

The PGF for the duration of i-th backoff attempt is Bi (z) =

W i −1 X k=0

BoWf if (z) − 1 1 k B (z) = Wi o f f Wi (Bo f f (z) − 1)

(39)

The transmission procedure will not start unless it can be finished within the current superframe, as explained above. The probability that the remaining number of backoff periods will not suffice for the transmission has been defined in Section 3 as Dd (40) Pd = SD 12

0 (1) + G 0pa (1) is the number of backoff periods needed for an acknowledged where Dd = 2 + G 0p (1) + Sack transmission. The PGF for the number of backoff periods that are wasted due to the insufficient space in the current superframe is

B p (z) =

Dd −1 1 X zk Dd k=0

(41)

The PGF of the packet transmission time is Tran (z) = (1 − Pd )G p (z)Sack (z)G pa (z) +

Pd B p (z)z (BI−SD) Bea (z)G p (z)Sack (z)G pa (z)

(42)

Then, the PGF of the packet service time Tt (z), accounting for the effects of backoffs, unsuccessful CCAs, transmission, carry-over to the next superframe, and re-transmission, satisfies the equation Tt (z) =

m Y i+1 X

B j−1 (z) (1 − αβ)i αβ 2 Tran (z)

i=0 j=1

+

i+1 m Y X

B j−1 (z) (1 − αβ)i αβ(1 − β)Tran (z)Tt (z)

i=0 j=1

+

1 − αβ

m X

! i

(1 − αβ)

i=0

m Y

B j (z)Tt (z)

(43)

j=0

This equation has been derived under the assumption that the MAC sublayer will retry packet transmission until the acknowledgement is received. As the standard currently allows a maximum of three retries, our calculations will tend to overestimate the packet service time under high loads. As the 802.15.4 PAN is much more likely to operate under low to moderate loads, the error due to this difference will be negligible in practice. The last equation can be rearranged to give the PGF for the packet service time as i+1 m Y X

B j−1 (z)(1 − αβ)i αβ 2 Tran (z)

i=0 j=1

Tt (z) =

m Y i+1 X

1−

i

B j−1 (z)(1 − αβ) αβ(1 − β)Tran (z) − 1 − αβ

i=0 j=1

m X i=0

! i

(1 − αβ)

m Y

(44) B j (z)

j=0

The first two moments of the packet service time can be obtained as Tt = Tt0 (1) and Tt(2) = Tt00 (1) + Tt0 (1).

5

Analytical results for traffic performance in PAN

To demonstrate the feasibility of our analytical approach, we have evaluated the network reliability and QoS (using the definitions in [5] and [4], respectively) under varying values of different network and traffic 13

parameters. The packet size has been fixed at G = 9 backoff periods, while the device buffer had a fixed size of L = 3 packets. We have assumed exhaustive service discipline, i.e., the device will deliver all the packets from its buffer before going to sleep. Moreover, the new packets that arrive during the active period, will also be serviced (i.e., sent to the coordinator) before going to sleep. In all calculations we have considered networks that operate in the ISM band at 2.4GHz, with raw data rate 250kbps and SO,BO= 0. In that case, one modulation symbol corresponds to four data bits, aUnitBackoffPeriod has 10 bytes, while aBaseSlotDuration has 30 bytes; as aNumSuperframeSlots is 16, the aBaseSuperframeDuration is exactly 480 bytes. Furthermore, we have assumed the following values for the parameters of the CSMA-CA MAC algorithm: 1. The minimum value of backoff exponent macMinBE is set to three. 2. The maximum value of backoff exponent aMaxBE is set to five. 3. The maximum number of backoff attempts is set to five, macMaxCSMABackoffs = 4. The packet size includes all physical layer and MAC sublayer headers, and is expressed as the multiple of the backoff period [3]. We also assume that the physical layer header has 6 bytes, and that the MAC sublayer header and Frame Check Sequence fields have a total of 9 bytes. Such a short MAC header implies that the destination addressing mode subfield (bits 10-11) within frame control field is set to 0, and source addressing mode field (bits 14-15) is set to short address mode. This means that packet is directed to the PAN coordinator with the PAN identifier as specified in the source PAN identifier field. Our first set of experiments considers the network in which the arrival rate at each sensor has been fixed at one packet per second, while the probability of going to sleep Psleep was variable. The number of sensor nodes has been varied in the range of 10 to 100. The resulting performance data is shown in Fig. 4. As can be seen, the reliability per node is close to one, except at very high values of the probability Psleep , in which case the vacation periods last too long, as shown in Fig. 4(f), the device buffer fills up, and packets are not even accepted at the device. At the same time, server utilization remains below 1% in a wide range of values for n and Psleep , which means that the network is fairly energy-efficient. (Note that a single AAA battery can power an off-the-shelf radio transceiver at 10m A for two years if duty cycle below 0.5% is maintained [2].) From Fig. 4(e) we observe that the busy period increases with the number of nodes because of higher probability of collisions. It also increases with Psleep because longer sleep increases the probability that the device will have a full buffer to deliver. Steep increase in the far end of the diagram is due to the increase in number of packets to deliver – namely, the packets that are in the buffer at wake-up take longer to be serviced, which means there is more time for new ones to arrive while the server is active, in which case they have to be serviced. Then, we have fixed the variable Psleep to the value of 0.999, and let the packet arrival rate and the number of nodes vary; other parameters had the same values as before. The resulting diagrams are shown in Fig. 5. As can be seen, reliability per node and, by extension, the total network reliability, are almost linear functions of the packet arrival rate. Similar observation holds for server utilization and server busy period. It may be interesting to note that the access probability has a minimum for a certain packet arrival 14

Reliability for one node

Average num. of active devices

1

2.5 2 1.5 numon 1 0.5

0.996 rel0.992 0.988 100 80 60 n

40

0.998

20

0.992 0.994 0.996 Psleep

100

0.998 0.996 Psleep 0.994

(a) Mean number of transmitted packets (reliability) per node.

80 40

0.992

60 n

20

(b) Mean number of active nodes (QoS). probability of access

server utilization

0.08 0.07 tau0.06 0.05

0.012 rhopri

0.01 0.008

0.04

0.006 100

0.998 0.996 Psleep 0.994

100

80 40

0.992

60 n

20

(c) Server utilization.

80

60 n 40

0.994

20

0.998

0.992

0.996 Psleep

(d) Access probability at each node. vacation cycle

busy period

1000 800 cv 600 400 200

12 10 8 theta 6 4 2 100

0.998 0.996 0.994 Psleep 0.992

40 0.99

100

0.998 0.996 0.994 Psleep 0.992

80 60 n

20

80 40 0.99

(e) Mean duration of the busy period of a node.

60 n

20

(f) Mean duration of the vacation cycle for each node.

Figure 4: Network performance under variable Psleep (periods are shown as multiples of backoff periods).

15

Reliability for one node Average num. of active devices

1.6 1.2 rel 0.8 0.4 0 2

1.2 numon

0.8 0.4 0 2

100 80

1.5 lambda_i

1

40

0.5

lambda_i

20

0

100 80

1.5

60 n

1

40

0.5

20

0

(a) Reliability for Psleep = 0.999.

60 n

(b) Average number of active stations for Psleep = 0.999. probability of access

server utilization

0.09 0.08 0.07 tau0.06 0.05 0.04 0.03

0.012 0.008 rhopri 0.004 0 2

100

0.4

80

1.5 1

lambda_i

40

0.5

60 n

1.2 lambda_i 1.6

20

0

0.8

(c) Server utilization for Psleep = 0.999.

1010 1008 cv1006 1004 1002 1000 1.6

8 4 0 2

100 80

1.5 1

40

0.5 0

20

vacation cycle

12

lambda_i

80

40

(d) Access probability for Psleep = 0.999.

busy period

theta

100

60 n

100 80

1.2

60 n

lambda_i

20

0.8

40

0.4 0

(e) Average duration of node busy period for Psleep = 0.999.

60 n

20

(f) Average duration of node vacation cycle for Psleep = 0.999.

Figure 5: Network performance with fixed Psleep = 0.999 (periods are shown as multiples of backoff periods).

16

rate, and then slowly increases, while being nearly independent of the number of nodes. Again, we observe that the reliability is high while the server utilization is low (below 1% for packet arrival rates below two packets per second). These results support the claim that adaptive control of the sensor duty cycle can be utilized to maintain the network reliability and QoS at the desired level while trying to minimize the energy consumption. However, this not an easy task. Namely, the problem of simultaneous control of network reliability and QoS is described by equations (10), (12), (28), (33), (34), (44) (actually first derivative of (44)), and (20). This system can be solved to obtain the unknowns ρ 0 , (q0 + π0 ), τ , α, β, Tt and Psleep . After that, queue distribution at the Markov points can be found, as well as the other quality descriptors. Once the value of Psleep is calculated, the PAN coordinator can broadcast it to sensors within the beacon frame. However, this approach is computationally expensive, and may not be feasible to execute at the coordinator due to its limited computational capabilities. Furthermore, it requires the total number of sensor devices to be known, which may not be possible due to device failures. To avoid these difficulties, we have designed a simple adaptive (but nevertheless fully distributed) approach in which each sensor independently determines the probability of going to sleep as Psleep = 1 , where Tt denotes the mean packet service time at the MAC sublayer (which can be measured by 1− ATt the device itself) and A is a suitable coefficient. In this manner, the sensor node itself controls the duration of the sleep interval. Longer service times mean that there is more contention, which is caused by more nodes that are active, and thus the sleep period should last longer; by the same token, shorter service times will lead to shorter sleep times. Conceptually, this approach is similar to the one proposed in [1], except that the decision rests with the node itself. (Centralized control of the value of A through appropriate measurements performed by the coordinator is currently under development.) In our final set of experiments, we have set the parameter A to the value of 10L, where L = 3 is the device buffer size. The resulting diagrams are shown in Fig. 6. Again, we observe that the reliability is high while the server utilization remains low. In fact, the diagrams in this set are remarkably similar to those in the previous one; however, the feedback effect of the algorithm are demonstrated in Fig. 6(d), where the access probability remains constant regardless of the packet arrival rate.

6

Conclusion

In this work we have modeled the reliability (or network QoS) of the sensor network based on the IEEE 802.15.4 standard, taking the features of the MAC sublayer into account. We have assumed that the duty cycle of each device is managed in such a way that the device goes to sleep for a geometrically distributed random time when its buffer becomes empty. When the device is active, its buffer is serviced in an exhaustive manner, and packets that have arrived are serviced as well. We have shown that the network reliability is a function of the MAC backoff parameters, packet size, buffer size, network size and of the duty cycle management discipline. We have evaluated the network QoS under variable sleep parameters as well as under variable packet arrival rates per node and network size. We have suggested an adaptive

17

Reliability for one node Average num. of active devices

2 1.5 rel

1.2

1

numon 0.8

0.5

0.4

0 2

0 2

100 80

1.5 lambda_i

1

40

0.5

1

lambda_i

20

0

100 80

1.5

60 n

40

0.5

20

0

(a) Reliability for Psleep = 1 − 1 .

60 n

(b) Average number of active stations for Psleep = 1 − 1 .

L Tt

10L Tt

probability of access server utilization

0.11 0.1 0.09 tau0.08 0.07 0.06 0.05 0.04

0.012 rhopri0.008 0.004 0 2

100

0.4

80

1.5 1

lambda_i

60 n

40

0.5

1.2 lambda_i 1.6

20

0

(c) Server utilization for Psleep = 1 −

0.8

1 . 10L Tt

100

80

60 n

(d) Access probability for Psleep = 1 −

40

20

1 . 10L Tt

vacation cycle

busy period

10 8 theta 6 4 2 0 2

700 cv 650 600 550 2

100 80

1.5 lambda_i

1

40

0.5 0

100 80

1.5

60 n

lambda_i

1

40

0.5

20

0

(e) Average duration of node busy period for Psleep = 1− 1 .

60 n

20

(f) Average duration of node vacation cycle for Psleep = 1 − 1 .

10L Tt

10L Tt

Figure 6: Performance of technique with Psleep = 1 − periods).

18

1 10L Tt

(periods are shown as multiples of backoff

Beacon

contention-access period (CAP)

guaranteed time slot (GTS) 0

1

2

3

4

5

6

7

8

Beacon

contention-free period (CFP)

9

10

11

12

13

GTS 14

inactive

15

superframe duration (SD) beacon interval (BI)

Figure 7: The composition of the superframe under IEEE Std 802.15.4 (adapted from [3]). duty cycle management discipline where the probability of going to sleep (and, consequently, the mean sleep time) increases with the increase of the packet service time (i.e., with the network congestion). All suggested policies have node utilization less than 1% and reliability higher than 99% under wide range of network size and packet arrival rate. In our future work we plan to work on sleep disciplines, possibly with centralized control, that will further decrease the node utilization while maintaining reliability at the desired level.

Appendix: Operation of IEEE Std 802.15.4 MAC In beacon enabled networks, the PAN coordinator divides its channel time into superframes [3]. Each superframe begins with the transmission of a network beacon, followed by an active portion and an optional inactive portion, as shown in Fig. 1. The coordinator interacts with its PAN during the active portion of the superframe, and may enter a low power mode (as can other devices) during the inactive portion. The superframe duration, SD, is equivalent to the duration of the active portion of the superframe, which cannot exceed the beacon interval BI. The active portion of each superframe is divided into equally sized slots; the beacon is transmitted at the beginning of slot 0, and the contention access period (CAP) of the active portion starts immediately after the beacon. In each slot, the channel access mechanism is contention based, using the CSMA-CA access mechanism (more details are given below). A device must complete all of its contention based transactions within the contention access period (CAP) of the current superframe. Within the time slots of the active portion of the superframe, the PAN coordinator may reserve slots to allow dedicated access to some devices. These slots are referred to as guaranteed time slots (GTS), and together they comprise the so-called contention-free period (CFP). We do not consider reserved slots in this work. The basic time unit of the MAC protocol is the duration of the so-called backoff period, because channel access can occur only at the boundary of a backoff period. The actual duration of the backoff period depends on the frequency band in which the 802.15.4 WPAN is operating. Namely, the standard allows the PAN to use either one of three frequency bands: 868-868.6MHz, 902-928MHz and 24002483.5MHz. In the two lower frequency bands, BPSK modulation is used, giving the data rate of 20kbps

19

Type of time period Modulation symbol

Unit backoff period Basic superframe slot (SO = 0) Basic superframe length (SO = 0) (Extended) superframe duration SD Beacon interval BI

Duration 1 data bit in 860MHz and 915MHz bands, 4 data bits in 2.4GHz band 20 symbols three unit backoff periods (60 symbols) 16 basic superframe slots (960 symbols) aBaseSuperframeDuration·2SO aBaseSuperframeDuration·2BO

MAC constant N/A

aUnitBackoffPeriod aBaseSlotDuration aBaseSuperframeDuration = NumSuperframeSlots · aBaseSlotDuration macSuperframeOrder, SO macBeaconOrder, BO

Table 1: Timing structure of the slotted mode MAC protocol. (Note that the values of both BO and SO must be less than 15 in the beacon enabled mode.)

and 40kbps, respectively. Each data bit represents one modulation symbol which is further spread with the chipping sequence. In the third band, the O-QPSK modulation is used before spreading; in this case, four data bits comprise one modulation symbol which is further spread with the 32-bit spreading sequence. Table 1 summarizes the basic timing relationships in the MAC sublayer. Note that the constants and attributes of the MAC sublayer, as defined by the standard, are written in italics. Constants have a general prefix of ”a”, e.g. aUnitBackoffPeriod, while attributes have a general prefix of ”mac”, e.g. macMinBE. As in other contention-based access control schemes, transmission will be attempted only when the medium is clear. The flowchart shown in Fig. 8 describes the details of the CSMA-CA protocol, which is invoked when a packet is ready to be transmitted. Three variables are maintained for each packet: 1. NB is the number of times the algorithm was required to backoff due to the unavailability of the medium during channel assessment; 2. CW is the contention window, i.e., the number of backoff periods that need to be clear of channel activity before the packet transmission can begin; and 3. BE is the backoff exponent which is related to the number of backoff periods a device should wait before attempting to assess the channel (see below for a detailed explanation). In step (1), the algorithm begins by setting NB to zero and CW to 2. If the device operates on battery power (as determined by the attribute macBattLifeExt), BE is set to 2 or to the constant macMinBE, whichever is less; otherwise, it is set to macMinBE (the default value of which is 3). The algorithm then locates the boundary of the next backoff period.

20

packet arrives

step (1)

set NB=0, CW=2

Yes macBattLifeExt?

set BE to min(2, macMinBE)

No set BE=macMinBE

locate boundary of the backoff period

step (2)

wait for a random number of backoff periods

step (3)

perform CCA on backoff period boundary

Yes channel idle? No step (4)

set CW=2, NB=NB+1, BE=min(BE+1, aMaxBE)

set CW=CW-1

NB > macMaxCSMABackoffs?

CW=0?

No

step (5)

No

Yes Yes success proceed with transmission

report failure

Figure 8: Operation of the slotted CSMA-CA MAC algorithm in the beacon enabled mode (adapted from [3]).

21

In step (2), the algorithm attempts to avoid collisions by generating a random waiting time in the range 0 . . 2BE − 1 backoff periods. When the wait period is over, the MAC sublayer needs to perform CW clear channel assessment (CCA) procedures, transmit the frame, and optionally wait for acknowledgment. If the remaining time within the CAP area of the current superframe is sufficiently long to accommodate all of these, the MAC sublayer will proceed with step (3) and perform the first CCA to see whether the medium is idle; otherwise, the algorithm will be paused until the next superframe. If the channel is busy, the values of NB and BE are increased by one (but BE cannot exceed macMaxBE, the default value of which is 5), while CW is reset to 2; this is step (4) in the flowchart. If the number of retries is below or equal to macMaxCSMABackoffs (the default value of which is 5), the algorithm returns to step (2), otherwise the algorithm terminates with a channel access failure status. Failure will be reported to the higher protocol layers, which can then decide whether to re-attempt transmission or not. If the channel is idle, step (5), the value of CW is decreased by one, and the channel is assessed again. When CW becomes zero, the transmission of the packet may begin, provided the remaining number of backoff periods in the current superframe suffices to handle both the packet and the subsequent acknowledgment. If this is not the case, the standard requires that the transmission is deferred until the beginning of the next superframe. Note that the backoff unit boundaries of every device should be aligned with the superframe slot boundaries of the PAN coordinator, i.e., the start of first backoff unit of each device is aligned with the start of the beacon transmission. The MAC sublayer should also ensure that the PHY layer starts all of its transmissions on the boundary of a backoff unit.

References [1] J. Frolik. QoS control for random access wireless sensor networks. In Proceedings Wireless Communications and Networking Conference WCNC 2004, Mar. 2004. [2] J. A. Guti´errez, E. H. Callaway, Jr., and R. L. Barrett, Jr. Low-Rate Wireless Personal Area Networks. IEEE Press, New York, NY, 2004. [3] Standard for part 15.4: Wireless medium access control (MAC) and physical layer (PHY) specifications for low rate wireless personal area networks (WPAN). IEEE Std 802.15.4, IEEE, New York, NY, 2003. [4] R. Iyer and L. Kleinrock. QoS control for sensor networks. In Proceedings IEEE International Conference on Communications ICC’03, volume 1, pages 517–521, May 2003. ¨ B. Akan, and I. F. Akyildiz. ESRT: event-to-sink reliable transport in [5] Y. Sankarasubramaniam, O. wireless sensor networks. In Proceedings of the 4th ACM international symposium on Mobile ad hoc networking & computing, pages 177–188. ACM Press, June 2003. [6] H. Takagi. Queueing Analysis, volume 1: Vacation and Priority Systems. North-Holland, Amsterdam, The Netherlands, 1991.

22

Suggest Documents