Keywords

1 Introduction

Wireless technologies are developing swiftly as demand of wireless Sensor Networks (WSN) increases. There are number of WSN applications such as surveillance and monitoring. Wireless nodes in WSN are tiny in size having limited energy, computation, processing and communication capabilities. These limitations are not addressed at once by well known IEEE 802.11 and IEEE 802.16 as they consume more energy during idle listening. ZigBee is the most prominent alliance supporting low-power embedded systems and facilitates multiple applications. It uses IEEE 802.15.4 standard at its physical and MAC (Medium Access Control) layer. IEEE 802.15.4 standard is suitable for energy efficient and low data rate applications. Some of these applications are environmental monitoring, light control systems, agricultural monitoring, automatic metering, industrial and security alarm system [1]. The standard suits well for static and low cost mobile wireless nodes having limited battery power with high reliability, as discussed in [24].

IEEE 802.15.4 runs at 868 MHz, 915 MHz and 2.4 GHz frequency bands. The standard operates in Beacon as well as in Non-Beacon enabled modes. Beacon mode comprises of Contention Access Period (CAP) and optional TDMA based Contention Free Period (CFP). During CAP, nodes follow slotted CSMA/CA mechanism. CSMA/CA depends upon multiple parameters, however, the most prominent one is the backoff period length. This paper contributes in analyzing the impact of varying backoff periods to determine the IEEE 802.15.4 performance. A comprehensive study of different backoff period lengths and their impact in slotted CSMA/CA, where all wireless nodes contend to access the medium and chances of collision are maximum, is also done in this work. The analysis is performed with fixed number of nodes and similar load variations.

Rest of the paper is organized as follows: In Sect. 2, the performance analysis of different authors in this field is discussed. Next Sect. 3 discusses the brief overview of IEEE 802.15.4 standard. Sections 4 and 5 illustrates slotted CSMA/CA algorithm and markov chain model respectively. Section 6, evaluates the effect of different parameters against varying backoff period and conclusion is described in Sect. 7.

2 Related Work

Contention access period of IEEE 802.15.4 is quite similar to IEEE 802.11. The only differences are that IEEE 802.15.4 starts sensing the availability of medium at the end of the backoff period and also it confirms the channel availability twice before transmitting its packets. Authors in [57] analyzed the performance of heterogeneous traffic under non saturated mode of IEEE 802.11 Distributed Coordination Function (DCF). In [5], authors presented an extended Bianchi model [8] for unsaturated heterogeneous data traffic of IEEE 802.11 DCF. Authors in [6] used discrete Markov chain model to find out the probability of utilization factor, throughput and delay for diverse traffic in a wireless LAN of IEEE 802.11e. Tickoo et al. in [7], considered homogeneous as well as heterogeneous data traffic to analyze the service time distribution of IEEE 802.11.

Many authors have analyzed IEEE 802.15.4 in different scenarios by highlighting its duty cycle and less energy consumption. Performance analysis of un-slotted CSMA/CA in different prospects of the standard is analyzed by authors in [9, 10]. In [1113], many simulation based studies are discussed to evaluate the performance of the standard in different prospects. Pollin et al. in [14], used Markov chain model to determine the performance of slotted CSMA/CA of the standard with saturated traffic load. In [15], authors have analyzed the throughput of slotted CSMA/CA by applying enhanced Markov Chain model during un-saturated region. In this work we have explored the importance of backoff period in CSMA/CA operation of IEEE 802.15.4 and analyzed the effect of varying backoff period in novel way by following discrete Markov channel model described in [16].

3 IEEE 802.15.4 Overview

The standard is designed for both Physical and MAC layers by offering duty cycle even less than 0.1 %. The standard operates in three different frequency bands. Detail of all these frequency bands is shown in Table 1.

Table 1. Frequency Bands with Data Rate

IEEE 802.15.4 uses un-slotted CSMA/CA algorithm during non beacon enabled mode. However, superframe structure is applied in beacon enabled mode. Superframe structure comprises of active and inactive period. Beacon frame, Contention Access Period (CAP) and optional Contention Free Period (CFP) are part of active period as shown in Fig. 1, whereas the node remains in sleep mode during inactive period. Active period consists of 16 slots, out of these 16 slots, maximum 7 slots may be allocated for CFP and the rest consists of Beacon frame and CAP. All beacon enabled nodes contend to access the medium in transmitting data to its coordinator during CAP by following slotted CSMA/CA algorithm as shown in Fig. 3.

Fig. 1.
figure 1

Superframe structure with CAP and CFP

PAN coordinator is responsible for generating beacon frames in the network after regular intervals. These beacon frames are used to synchronize all the associated nodes in that WPAN. Information about active Superframe duration and arrival of next Beacon frame can be calculated from different parameters highlighted in the superframe specification field present in beacon frame. Superframe Duration (SD) and Beacon Interval (BI) is calculated as:

Fig. 2.
figure 2

Beacon frame with superframe specification field description

$$\begin{aligned} SD=48 \times 2^{SO} \times aUnitBackoffPeriod \end{aligned}$$
(1)
$$\begin{aligned} BI=48 \times 2^{BO} \times aUnitBackoffPeriod \end{aligned}$$
(2)

Expressions (1) and (2) show that the Superframe duration and Beacon Intervals mainly depend on aUnitBackoffPeriod length. Varying the length of aUnitBackoffPeriod highly affect the performance of CSMA/CA operation during active period of Superframe. That’s why, the impact of varying backoff period is evaluated in this work (Fig. 2).

4 Slotted CSMA/CA Mechanism

During CAP of IEEE 802.15.4, slotted CSMA/CA mechanism is used that mainly comprises of three parameters as NB,BE and CW. NB is number of times, node should wait for backoff periods. Value of NB ranges from 0 to 4. This allows a node to attempt for maximum of 5 times in order to access the channel. If a node fails to find the channel idle for maximum allowed attempts, then it reports failure to its upper layer.

Parameter BE stands for Backoff Exponent and it describes the random range of backoff periods, a node should wait before assessing the channel availability. It ranges from 0 to \(2^{BE} - 1\) and default value of BE ranges from 3 to 5 by following the parameters of macMinBE and aMaxBE, respectively. This results in backoff period initial range from 0 to 7 and last backoff period range from 0 to 31.

Contention Window (CW) is related to idle channel availability by using Clear Channel Assessment (CCA). Initial value of CW is 2, that is node needs to pass the channel availability for two successive times before declaring the channel idle. Detailed flow diagram of CSMA/CA is shown in Fig. 3.

Fig. 3.
figure 3

Flow diagram of slotted CSMA/CA

Packets are transmitted only if computed frame’s length along with its acknowledgment and inter-frame spacing can be completed within same active period.

A complete frame duration (CFD) consists of time required to transmit data with acknowledgment and is calculated as:

$$\begin{aligned} CFD = T_{BO} + T_{D} + 2T_{P} +T_{TA} + T_{Ack} + T_{IFS} \end{aligned}$$

where,

  • \(T_{BO}\) = Waiting time during Backoff Periods,

  • \(T_{D}\) = Frame’s transmitting time,

  • \(T_P\) = Propagation delay from source to destination,

  • \(T_{TA}\) = Turn around time,

  • \(T_{Ack}\) = Time for Acknowledgment frame, and

  • \(T_{IFS}\) = Time for Inter frame space.

5 Markov Chain Model for Slotted CSMA/CA of IEEE 802.15.4

The operation of slotted CSMA/CA is analyzed with the help of discrete Markov chain model. The model is implemented by considering such states where changes occur. Slotted CSMA/CA algorithm based on three basic parameters, NB, BE and CW as mentioned in Sect. 4. Similarly in this model, each state (A) defines NB(t), BC(t) and CW(t). Here NB(t) is the value of NB at time t and it ranges from 0 to m, where m = macMaxCSMABackoff. BC(t) indicates backoff counters in each state and its value ranges from 0 to \(W_{i-1}\), where \(W_i=2^{BE}\) and can be computed as shown in Eq. 3. CW(t)[0, 2] represents contention windows. The state k, b, 2 represents that node is in its (k+1)th backoff period, where b represents backoff counter and 2 means node requires to perform CCA for two times. A discrete Markov chain model is shown in Fig. 4.

Fig. 4.
figure 4

Discrete time Markov chain model.

$$\begin{aligned} W_i = 2^{macMinBE}\times 2^{min\{aMaxBE-macMinBE,i\}} \end{aligned}$$
(3)

Some of the states mentioned in the model are described as under.

{-1, 0, 0} idle state {k, 0, 2} node is going to perofrm CCA1 during (k+1)th time {k, 0, 1} node is about to perform CCA2 during (k+1)th time {k, 0, 0} node successfully passed the CCA1 and CCA2 {k, b, 2} node needs to wait for b backoff counter before performing CCA1 \(\alpha \) busy medium probabilty during CCA1 \(\beta \) busy medium probabilty during CCA2 \(\gamma \) probability of node having no data to send

Suppose stationary probabilities of Markov chain is: \(b_{k,b,c}\) = P{NB(t) = k, BC(t) = b, CW(t) = c} \(\forall \) k,b,c

From the markov chain model, we obtain

$$\begin{aligned} b_{k, 0, 2} = \alpha b_{k-1, 0, 2} + \beta b_{k-1, 0, 1} k\varepsilon [1,m] \end{aligned}$$
(4)

From the Markov chain, we know that:

$$\begin{aligned} b_{-1, 0, 0} = p_{cf} + b_{-1, t, 0} + \gamma b_{-1, 0, 0} \end{aligned}$$
(5)

Here, \(p_{cf}\) is probability of channel access failure,

$$\begin{aligned} p_{cf} = \alpha b_{m, 0, 2} + \beta b_{m, 0, 1} \end{aligned}$$
(6)

All these states are determined by following Eqs. 7 to 14

$$\begin{aligned} b_{k, 0, 0} = (1 - \beta ) b_{0, 0, 1} \end{aligned}$$
(7)
$$\begin{aligned} b_{k, 0, 2} = b_{0, 0, 2} (\alpha + \beta -\alpha \beta )^k \end{aligned}$$
(8)
$$\begin{aligned} b_{k, 0, 1} = b_{0, 0, 2}(1 - \alpha ) (\alpha + \beta -\alpha \beta )^k \end{aligned}$$
(9)

Similarly \(b_{k, 0, 0}\) is calculated as:

$$\begin{aligned} b_{k, 0, 0} = b_{0, 0, 2}(1 - \beta )(1 - \alpha ) (\alpha + \beta -\alpha \beta )^k \end{aligned}$$
(10)
$$\begin{aligned} b_{k, 0, 0} = b_{0, 0, 2}(1 - (\alpha + \beta -\alpha \beta )^{k+1}), k\varepsilon [0,m] \end{aligned}$$
(11)
$$\begin{aligned} b_{k, 0, 0} = b_{-1, t, 0} = b_{-1, t-1, 0}, t\epsilon [2,T] \end{aligned}$$
(12)
$$\begin{aligned} b_{0, 0, 2} = b_{-1, 0, 0} (1 - \gamma ) \end{aligned}$$
(13)
$$\begin{aligned} b_{-1, 0, 0} = (b_{0, 0, 2}) /(1 - \gamma ) \end{aligned}$$
(14)

\(b_{k, p, 2}\) can be represented with \(b_{0, 0, 2}\) as:

$$\begin{aligned} b_{k, p, 2} = b_{0, 0, 2}(\alpha + \beta - \alpha \beta )^k(W_k-p)/(W_k), \, k\varepsilon [1,m],p\varepsilon [1,W_k-1] \end{aligned}$$
(15)

Similarly \(b_{0, p, 2}\) can be represented with \(b_{0, 0, 2}\) as:

$$\begin{aligned} b_{0, p, 2} = b_{-1, 0, 0}(W_0-p)(1-\gamma )/(W_0) \end{aligned}$$
(16)

By simultaneously solving 13 and 16, we get:

$$\begin{aligned} b_{0, p, 2} = b_{0, 0, 2}(W_0-p)/(W_0),\, Here p\,\varepsilon [1,W_0-1] \end{aligned}$$
(17)

As sum of all the probabilities of the states is always one, we have:

$$\begin{aligned}&b_{-1, 0, 0} + \sum _{k=0}^{m} b_{k, 0, 1} + \sum _{k=1}^{m}b_{k, 0, 2} + \sum _{k=1}^{m}\sum _{p=1}^{W_k-1}b_{k, p, 2} \\&\qquad + \sum _{p=1}^{W_0-1}b_{0, p, 2} + \sum _{t=1}^{T}b_{-1, t, 0} = 1 \nonumber \end{aligned}$$
(18)

By replacing values of each state mentioned in Eq. 18 and by simplifying, we get:

$$\begin{aligned} b_{0, 0, 2}&= \frac{1}{\frac{1}{1-\gamma } + (1 - (\alpha + \beta - \alpha \beta )^{m+1})T + \frac{(2-\alpha )(1-(\alpha + \beta - \alpha \beta )^{m+1})}{(1-(\alpha + \beta - \alpha \beta ))}} \\&\;\quad + \sum _{k=0}^m (\frac{W_{k-1}}{2})(\alpha + \beta - \alpha \beta )^{k} \nonumber \end{aligned}$$
(19)

6 Analysis with Results

It is evident from (1) and (2) that SD and BI depend on aUnitBackoffPeriod. As per CSMA/CA flow chart in Fig. 3, each transmitting node has to wait for random number of backoff period. Due to the significance of backoff period length, the performance of CSMA/CA is analyzed by varying the backoff period’s length. The simulation analysis includes node’s average wait time before transmitting, probability of channel access busy during CCA1 and CCA2. Analysis also comrises of throughput, reliability and transmission failure probability. All these results are analyzed by increasing load. The simulation parameters are briefly summarized in Table 2.

Table 2. Simulation Parameters

6.1 Busy Channel Probability During CCA1

Each data transmitting node senses the medium availability after completing its random backoff count. If \(\tau \) is the probability of transmitting a packet which is computed by markov chain as:

$$\begin{aligned} \tau =\sum _{t=1}^T b_{-1, t, 0} (1-(\alpha +\beta -\alpha \beta )^{m+1})\times T\times b_{0, 0, 2} \end{aligned}$$
(20)

then busy channel probability during first attempt (\(\alpha \)) is computed as:

\(\alpha =[L(1-(1-\tau )^{N-1})(1-\alpha )(1-\beta )]+. . . \)

$$\begin{aligned} L_{ack}\frac{N_{\tau }(1-\tau )^{N-1}(1-(1-\tau )^{N-1})(1-\alpha )(1-\beta )}{1-(1-\tau )^N} \end{aligned}$$
(21)

\(\alpha =(1-\alpha )(1-\beta )(1-(1-\tau )^{N-1}). . . \)

$$\begin{aligned}{}[L+\frac{L_{ack}(N_{\tau }(1-\tau )^{N-1})}{1-(1-\tau )^N}] \end{aligned}$$
(22)

where L is data frame length in slots, \(L_{ack}\) is length of Acknowledgment frame and \([1-(1-\tau )^{N-1}]\) is collision probability. It happens when one of the remaining nodes also transmit data in same backoff slot.

Fig. 5.
figure 5

Busy channel probability during CCA1

Results shown in Fig. 5 illustrates that increase in traffic load increases the \(\alpha \) probability. This is because of busy channel for most of the time. The results further show that reduced backoff period length increases the busy channel probability during CCA1 and vice versa.

6.2 Channel Assess Busy Probability During CCA2

CSMA/CA algorithm describes that value of CW is decremented by 1 when a node finds the channel idle during CCA1. At the start of next backoff period, node senses the medium availability for the second successive time. CCA2 is computed as:

$$\begin{aligned} \beta =\frac{1- (1-\tau )^{N-1}+ N\tau (1-\tau )^{N-1}}{2- (1- \tau )^N +N\tau (1-\tau )^{N-1}} \end{aligned}$$
(23)

Here \(\beta \) is probability to find medium busy during CCA2.

Figure 6 illustrates that there is comparably less probability of finding channel busy during CCA2 as of CCA1. This happens because CCA2 sensed the medium in very next slot instead of waiting for backoff period. Here probability of finding channel busy are similar for different backoff period lengths however it rises more with applied load where backoff period length is higher.

Fig. 6.
figure 6

Busy channel probability during CCA2

6.3 Wait Time

Average wait time of a network is the time for which networking nodes have to wait before transmitting the data packets due to busy medium. It is noted that node’s waiting time is more when backoff period length is higher as shown in Fig. 7. This is due to the fact that nodes have to wait for longer time due to longer backoff period as of the shorter backoff period length.

Fig. 7.
figure 7

Average wait time before transmitting

6.4 Reliability

Reliability of a network is based on the successful transmission of data packets from source towards destination. Following are the two reasons of data packet failure.

  1. 1.

    A node could not transmit its data packet as medium remains busy for such time when NB>macmaxcsmabackoff.

  2. 2.

    A node transmits the data packet again and again until the retry limits (Pcr) exceeds aMaxFrameRetries and no acknowledgment frame is received.

Reliability of a network is calculated as:

$$\begin{aligned} Reliability = 1- P_{cf} - P_{cr} \end{aligned}$$
(24)
Fig. 8.
figure 8

Network Reliability

Results in Fig. 8 show that a network is more reliable with reduced load and less reliable with increased load. Longer Backoff Period length increases the reliability of successful transmission.

Fig. 9.
figure 9

Network Throughput

6.5 Average Throughput

Average throughput is defined as number of successful data over total time through a medium. Figure 9 shows that the larger backoff period length achieves higher throughput compared to the smaller backoff period length.

7 Conclusion

The paper analyzed the effect of varying backoff period on the performance of slotted csma/ca. Discrete Markov chain model is used to determine different probabilities of slotted CSMA/CA. Effect of same load variation has been analyzed by finding the probability during CCA1, CCA2. In addition failure probability along with reliability and throughput are also analyzed. Results show that the reliability of successful transmission increases with the increase in backoff period length due to less probability of collisions. However, it increases the node’s waiting time before transmitting its frame in the medium. Therefore, reduction in chances of collision increases the power efficiency of nodes, which results in longer network life-time at the cost of longer waiting time.