A Collision-aware MAC Protocol for Efficient Performance in Wireless Sensor Networks

Both IEEE 802.11 and IEEE 802.15.4 standards adopt the CSMA-CA algorithm to manage contending nodes’ access to the wireless medium. CSMA-CA utilizes the Binary Exponential Backoff (BEB) scheme to reduce the probability of packet collisions over the communication channel. However, BEB suffers from unfairness and degraded channel utilization, as it usually favors the last node that succeeded in capturing the medium to send its packets. Also, BEB updates the size of the contention window in a deterministic fashion, without taking into consideration the level of collisions over the channel. The latter factor has a direct impact on the channel utilization and therefore incorporating it in the computation of the contention window’s size can have positive impacts on the overall performance of the backoff algorithm. In this paper, we propose a new adaptive backoff algorithm that overcomes the shortcomings of BEB and outperforms it in terms of channel utilization, power conservation, and reliability, while preserving the fairness among nodes. We model our algorithm using Markov chain and validate our system through extensive simulations. Our results show a promising performance for an efficient backoff algorithm. Keywords—Wireless sensor networks; beacon-enabled IEEE 802.15.4; binary exponent backoff; adaptive backoff; fairness; power consumption; reliability; channel utilization


I. INTRODUCTION
The Binary Exponent Backoff (BEB) is an ingenious algorithm employed by both IEEE 802.11 and IEEE 802. 15.4 standards to manage the wireless medium access among multiple competing nodes. BEB has been under the scope of extensive studies and have been shown to suffer from several performance pitfalls [1]- [5], [21]- [28], [65], [66] and [67]. Basically, [21], [22], and [23] provided detailed analysis of the MAC protocol, which implements BEB, in IEEE 802.11 to investigate its performance in terms of critical parameters, like throughput. The important conclusion drawn from these studies is that BEB suffers from a major shortcoming in terms of achieving high throughputs. It was proven that the practical performance, in terms of throughput, falls far behind the theoretical one and it is highly dependent on the number of nodes available. This observation motivated important research contributions that targeted enhancing BEB in IEEE 802.11-based networks (for example, see [53], [68], [69] and [70]). The same problem occurs in IEEE 802. 15.4, which adopts a slightly modified version of BEB. IEEE 802.15.4's performance received a strong attention and many studies devised modified versions of BEB to achieve higher throughputs while preserving more power [6], [9][10][11][12][13][14][15], [18][19], [29]- [31], [35], [52], [54], [71], [72], [80]. In this paper we focus on the performance of BEB in IEEE 802.15.4-based wireless sensor networks (WSNs). We introduce changes into BEB that can overcome the limitations it experiences. The changes form a foundation for the new Adaptive Backoff Algorithm (ABA) that we model using Markov chain. We also conduct a simulation study to validate our proposed theoretical model. Our results are promising and pave the way for further improvements in future work. The rest of the paper is organized as follows. Section II overviews the BEB algorithm and highlights the problematic aspects of its functionality. In Section III we review the literature for contributions that targeted improving BEB in IEEE 802. 15.4. In Section IV we describe ABA and model it mathematically using Markov chain. Section V describes the simulations we conducted to validate the developed mathematical model for ABA and compares the performance of ABA with a number of backoff algorithms proposed in the literature. Finally, Section VI concludes our work and envisions future research directions.

II. OVERVIEW OF BEB IN IEEE 802.15.4 STANDARD
The IEEE 802.15.4 standard defines the specifications of the PHY layer and the MAC sub-layer for low-rate personal area networks (LR-WPANs) [7], [8], [11], [13] and [32]. This standard suits the functionality of WSNs as it conforms to their distinguished requirements (like the need to preserve the resources of the sensor nodes [59]). The standard supports both star and peer-to-peer topologies. In the star topology, communications among nodes should go through a designated controller node called the PAN coordinator (or the coordinator for simplicity). In the peer-to-peer topology, however, direct communication between nodes is possible (and a coordinator still exists). The standard can operate in a beacon-enabled or a nonbeacon-enabled mode. The beaconenabled mode utilizes a superframe structure to control the communications over the wireless medium in a manner that reduces packet collisions. In Fig. 1, we depict the general structure of the superframe. As shown in the figure, the superframe is delimited by beacons that the coordinator sends periodically to synchronize the nodes. The superframe is constituted by active and inactive portions. The active portion   [32]. NB Refers to the Number of Backoffs Done by the Node and CW is a Counter for the CCAs.
From the description of the BEB algorithm we can identify the reasons behind the degradation of the throughput in its performance evaluation. Clearly, BEB keeps on choosing the contention window randomly without taking into consideration the number nodes available in the network, the level of communication activity occurring on the medium, and the likelihood of packet collisions. A node increases BE gradually, in steps of 1, in attempts to transmit a packet and then resets BE to its minimum, as explained before, without incorporating any information about its failed trials of transmissions or the intensity of the traffic in the medium. In other words, BEB is "memory-less" [24] as it keeps no information about the network status or conditions. On the other hand, BEB may have a problem of unfairness under saturation conditions [20] [25]. This can be seen from noticing that a node that fails to access the medium tends to backoff for longer periods (because BE keeps increasing as mentioned earlier), reducing its opportunity of sending its packets. However, a node that has just finished its successful transmission will reset its BE to its minimum, which results in shorter backoff periods and thus higher chances of accessing the medium. That is, the last successful node is favored on the account of other nodes [26]. Clearly, under saturation conditions we will face a high rate of packet collisions, which leads to excessive power consumption and degraded throughput [33]. Furthermore, this behavior raises serious security concerns. A selfish node may deliberately tune its BE such that it always achieves the minimum backoff period among the nodes. That way, the selfish node will access the medium much more frequently than the other nodes in the network (for more details on this misbehavior and how to mitigate it, see [55]- [58]). On the other hand, a node may act maliciously by tuning BE to be at its maximum. This way, the node refrains from accessing the medium, which discourages other nodes from using this node as their next hop while forwarding packets. These functionality issues in BEB are far from being acceptable in WSNs. The next section focuses on the efforts proposed in the literature to modify BEB and enhance its performance in IEEE 802.15.4-based WSNs.

III. RELATED WORK
Research efforts proposed various methodologies to improve BEB. In the following we review some of these proposals.
Minooei and Nojumi studied improving BEB in the context of IEEE 802.11 [34]. Lee et al. investigated the performance of the algorithm in [34], which they call the Non-Overlapping BEB (NO-BEB), in IEEE 802.15.4 networks [29]. NO-BEB modifies the way BEB selects the length of the contention window after an access failure. Basically, in order to reduce the level of contention over the medium, the contention window (W) is randomly selected from the range is the contention window of the ith backoff stage [34]. This change guarantees that no overlapping with the previous range (that is, [0, ]) occurs. As a result, nodes experiencing different number of medium access failures have better chances of acquiring different contention windows from the non-overlapped regions. NO-BEB is modeled using Markov chain in [29] and shown to outperform BEB in terms of throughput, probability of collisions and average access delay. While NO-BEB introduces a creative methodology to incorporate the communication medium's status in the computation and selection of W, it still resets the latter to its minimum after each successful packet transmission. We mentioned in Section II that this behavior is problematic.
Woo et al. proposed the Knowledge-based Exponential Backoff (KEB) algorithm in [30]. The main target of KEB is to improve the throughput depending on the channel state information as collected by each node. Each node uses the Exponential Weighted Moving Average (EWMA), with a smoothing factor β, to compute locally the collision rate after each successful transmission. Based on that computation, the value of BE is adjusted to achieve higher throughput. In other words, as the collision rate increases beyond a predefined collision threshold α, BE will be increased and thus nodes backoff for longer periods of time (in order to reduce the level of communications over the medium, which reduces the collisions). In contrast, as the collision rate remains below α, nodes backoff for shorter periods of time, which improves the utilization of the communication channel. KEB has been modeled using Markov chain and then simulated to validate the analytical model. The provided results show that KEB outperforms BEB in terms of throughput. The main drawback of KEB is that its performance is mainly dependent on the value of α. The authors provide a simulation study to find out the optimal values of these parameters that achieve the best throughput performance. However, this indicates that KEB cannot operate in an adaptive fashion and its performance will be governed by the targeted application.
Khan et al. introduce the Improved BEB (IBEB) algorithm in [31]. In IBEB each node, after specifying its BE, randomly selects an Interim Backoff (IB), which is restricted to be 10% to 40% of the specified backoff delay. The authors argue that this approach tends to reduce packet collisions since the probability of having two nodes randomly selecting the same BE and IB is quite low. The authors provided a simulation study to examine IBEB's performance in terms of latency, channel utilization, goodput, and average number of collisions. The results showed that IBEB outperforms BEB in terms of these parameters. We highlight that IBEB may suffer from major degradation as the number of nodes increases in the network. This is because the pool of IBs is so narrow that many nodes will happen to select the same IB, which contributes to higher packet rates of collisions.
Zhu et al. in [39] modify the CSMA-CA algorithm and propose the Linear Increase Backoff (LIB) scheme to enhance the performance in term of packet delay. The idea of LIB is that the backoff counter, upon sensing any of the two CCAs busy, increases linearly instead of exponentially (which is the case in BEB). The authors analyze the behavior of LIB using a comprehensive Markov model. Using this model, they extract formulas to describe the packet delay, energy consumption and throughput of unsaturated, unacknowledged traffic. Simulations of LIB show that it achieves a superior performance in terms of delay, throughput, and energy conservation. LIB is mainly designed for time-critical monitoring and detection applications, and therefore, minimization of the delay is the main target of this scheme.
In [73], the authors have proposed a backoff algorithm, named Waiting Backoff Algorithm (WBA), in order to enhance both the delay and the throughput performance of IEEE 802.11 MAC protocol. The main idea behind this algorithm is to observe the waiting time of each station during the backoff stage and then estimate the size of the contention window in the network. The authors have conducted some simulation experiences to show WBA enhances the basic backoff algorithm for some specific number of stations.
J. Sartthong and S. Sittichivapak have employed the mathematical optimization function theory to propose another backoff algorithm called Contending Stations Backoff Algorithm (CSBA) [74]. This paper includes a comparison results with BEB and other backoff algorithms and shows some improvements in term of saturation throughput efficiency. The same authors have extended this work to achieve more performance by this time by introducing [75] both a Binary Exponential Increment Half Decrement backoff algorithm and a discrete Markov chain model called the Fixed Backoff stages and Fixed Contention windows, named BEIHD and FBFC respectively.
In [68], Q. Liu and A. Czylwik have tackled the collision problems in WSN by proposing a collision-aware backoff mechanism (CABEB). Their main idea consists of involving a collision aware module that captures the channel state and adapts the MAC layer based on the collision probability to control the length of backoff period. 349 | P a g e www.ijacsa.thesai.org (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 12, No. 3, 2021 In [76], R. TejaChekka et al. have proposed an Adaptive Binary Exponential Backoff algorithm to handle multiple channel access issue by avoiding the collision at the sender side and the buffer overflow at receiver side without degrading channel utilization and throughput efficiency.
In [69], M. Shurman et al. have analyzed the three backoff algorithms BEB, I-BEB and E-BEB and highlighted their limitations. Then, they proposed the New Binary Exponential Backoff (N-BEB) algorithm to improve channel access fairness while preserving the channel throughput. It consists of improving contention window configuration, based on the number of successful and unsuccessful transmissions.
In [77], the authors have tackled the BEB problems by providing two main contributions. First, they proposed an adaptive backoff mechanism through which nodes can dynamically adjust the backoff period according to the actual status of the network. Second, they proposed a priority-based service-differentiation mechanism to provide multi-levels differentiated services in order to meet different QoS requirements.
In [78], the authors have tackled the 802.15.4 performance issues by proposing a backoff mechanism in which the backoff duration is adaptively chosen, when WiFi transmissions are detected during the clear channel assessment. They also consider erroneous decisions regarding the type of packet detected during the CCA and prove that the proposed algorithm remains efficient. Some simulation experiences have been conducted with 10 nodes to demonstrate the feasibility of such technique.
In [70], X. Liu et al. have addressed BEB drawbacks by using a different approach. They proposed a backoff algorithm, which adopts a retransmission counter to measure the network congestion situation. The proposed algorithm also divides the contention window interval into small intervals, and in different intervals, it leverages different backoff strategies. They measured the performance of this approach that showed slight improvements in throughput rate for some specific cases.
In [79], Y. Huang et al. have proposed a Synchronized Contention Window-based backoff algorithm, named SCW. In SCW algorithm, each station actively tracks the transmissions and when the channel state is changed, resetting the CW value synchronizes the CW of each station, which participates in the competition. This way, it makes each station get the medium access grant with the same probability in next channel contention. The experimental results of this technique show some improvement in the case o large number of stations.

IV. ADAPTIVE BACKOFF ALGORITHM
Based on the discussions outlined in Sections II and III, we now introduce the new Adaptive Backoff Algorithm (ABA). The pivotal objective behind ABA is to improve the channel utilization (U) in the WSN. ABA achieves higher levels of channel utilization than is possible with BEB while keeps the power consumption at the lowest possible level (which is a primary requirement to prolong the lifetime of the WSN). Preliminary to designing/modifying any backoff algorithm, it is essential to understand the factors that play the role of degrading U. From one side, whenever the nodes select long backoff periods, the wireless medium is forcibly kept idle for a long duration of time and thus U is affected. From another side, as the rate of packet collisions rises, the useful communication activities over the medium are affected and U is reduced as a result. Failing to consider these two factors results in partially effective backoff algorithms.
The problem with BEB is that it provides a deterministic solution that keeps on updating the length of the contention window based on predefined steps. This is the main shortcoming of BEB. We need a probabilistic solution that can involve the status over the wireless medium in the computation of the contention window. Based on that, ABA proposes that the probability of collision (P c) be used in updating the value of the contention window. This approach guarantees that the contention window will be adapted to conditions over the communication channel. Stated differently, the value of the contention window will be updated as follows: where, ( ) is the selected contention window at time t ( ( ) and will be used interchangeably in the rest of the paper), is IEEE 802.15.4's maximum contention window (set to 2 macMaxBE ), and ( ) is the probability of collisions at time t (In the rest of the paper, ( ) and will be used interchangeably). is computed locally at each node by knowing the proportion of packets that suffered from collisions. This proportion is computed as and are, as observed by any node, the total number of collided packets and the total number of successfully transmitted packets, respectively (note that in case of unacknowledged traffic, we assume that a mechanism at higher layers is available to advise the MAC of a collision after a certain timeout). According to (1), upon having a packet to send, the node backs off for a duration that cannot exceed . In case that CCA1 or CCA2 reveal that the medium is busy, the backoff process is repeated macMaxCSMABackoffs times before discarding the packet. On the other hand, upon experiencing an idle medium after the two CCAs, the packet is sent. In case of a packet collision, the node updates its ( ) based on the number of collisions it faces and resends the packet. If the packet continues to collide more than macMaxFrameRetries times, the packet will be discarded. Equation (1) indicates that, as the rate of collisions increases (decreases), the node utilizes an extended (a shortened) backoff period. This is anticipated to significantly reduce (increase) the contention among nodes, and also allows them better chances of successful transmission.
The overall result is enhanced channel utilization in the network. ABA requires no hardware upgrades and requires simplified computations that requires low power consumption (as we demonstrate in Section V) and can be easily implemented in sensor nodes' platform. In Fig. 3 we show the flow diagram of ABA.
We now develop the mathematical model for ABA based on Markov chain (see [41]- [51] for extensive studies on how to model IEEE 802.15.4's BEB using Markov chain). The model covers saturated traffic under both acknowledged and unacknowledged traffic conditions. We should mention that saturation conditions are typical in important research areas, like Wireless Body Area Networks (WBAN) (see [63] and [64] for examples).
In Fig. 4 we illustrate a two-dimensional Markov chain that covers all the states a node goes through to access the medium, using ABA, while working under saturated traffic conditions. The latter means that the node has always a packet to send. Each state in our Markov model is distinguished by a pair (i, j), where i can be 0, -1, or -2, to refer to the backoff/CCA states, successful transmission states, or collision states, respectively. The j index will be clarified in the following. States (0, j), where j∈ [1, − 1], refer to the duration of backoff during which the node is involved in no activity, waiting for its backoff counter to expire. States (0, 0) and (0,-1) correspond to CCA1 and CCA2, respectively. States (-1, j), where j∈ [0, Ls-1], correspond to the duration spent to successfully transmit a packet. Finally, States (-2, j), where j∈ [0, Lc-1], correspond to the time wasted due to a packet collision. The probability of finding the medium busy during CCA1 (CCA2) is denoted as α (β) (an explanation on the difference between α and β is detailed in [38]).
The state transition probabilities of our Markov chain are as follows: Equation (2) captures how the backoff counter decrements before attempting any packet transmission. Equation (3) describes the probability of backing off given that the medium was found busy during CCA1 or CCA2. Note that W in this equation will be updated according to (1). It is important to point out that deriving (3) is attained by summing all the transition probabilities starting from state (0, 0) and ending at any of the states (0,0), ... , (0, W-1). The summation includes the probabilities: to transit from state (0,0) to any of the backoff states, after a successful transmission), (1 − )(1 − ) (to transit from state (0,0) to any of the backoff states, after a packet collision), and the probability of being at the state preceding the selected backoff state (so, if backoff state (0, 1) was randomly selected, we should include the probability of being at backoff state (0, 2) in our summation, and so on). Equation (4) states the probability of initiating CCA2 given that CCA1 was successful. Equation (5) is the probability of successfully sending a packet after two successful CCAs while Equation (6) is the probability of having a packet collision after those CCAs. Finally, Equation (7) describes the even probability of choosing a contention window after packet transmission/collision. Assuming that s(t) and c(t) are the stochastic processes representing the backoff stage and the state of the backoff counter, respectively, we now write the stationary distribution of our Markov chain to be , = lim →∞ ( ( ) = , ( ) = ), . We now derive the closed form expressions for this distribution.  351 | P a g e www.ijacsa.thesai.org By the normalization condition, we have the following formula: The first term in (8) refers to the backoff states, the second term refers to the packet transmission states, the third term refers to the packet collision states, and the fourth and the fifth terms refer to the CCA1 and CCA2 states, respectively. We depend on the Equations (2)-(7) to find the mathematical expression for each of these terms. The latter will be expressed in terms of b0,0, for which a closed form expression will be derived later. Based on (2), (3), and (7) we can write: Next, based on (5) and (6) we have: Finally, based on (4) we obtain the following formula: The probability of collision, Pc , is formulated in [16] and [17] as follows: Equation (13) is formulated based on the observation that a collision will not happen if, out of N nodes, only one node is at CCA1, while the remaining N-1 nodes are at any state other than CCA1. Assuming that the probability that a node initiates CCA1 is , the probability of having no collisions in the network will be (1 − ) −1 . Therefore, Pc will be the complement of the latter term, which gives Equation (13). We point out, however, that when a certain node is initiating its CCA1, it is not quite accurate to assume that the remaining N-1 nodes can be at any state other than CCA1. These nodes can only be in the backoff states. They cannot be, for example, in the state (-2, 0). Otherwise, the original node, at the CCA1 state, cannot send out its packet in the first place. Therefore, we accept that Equation (13) provides a reasonable approximation of Pc in the network, but we expect that it may cause some deviations from the actual behaviour, as we demonstrate later in Section V.
The abovementioned definition of indicates that it is equal to 0,0 . Therefore, we can now substitute Equations (9)-(13) into (8) and solve for . The substitution results in the following formula: Both and are defined in the IEEE 802.15.4 standard (see [32]). W and Pc has already been defined in (1) and (13), respectively. Therefore, we need to find mathematical expressions for and to solve for . These expressions strongly depend on whether the communicated traffic is acknowledged or not. Pollin et al. have provided in [37] (also, see [39]) a detailed study in this direction and we adopt their findings in this paper. In case of unacknowledged traffic, we have the following expressions: where, L in (15) refers to the length of the packet to be sent. On the other hand, for acknowledged traffic we have the following expressions: where, Lack in (17) refers to the length of the ACK packet.
Equation (14) along with Equations (15)-(16) (or Equations (17)-(18)) for unacknowledged (or acknowledged) traffic form a nonlinear equation system of three variables, namely, , , and . This system of equations can be solved using numerical methods to find the operating point of the network.
It is worth mentioning that the Markov model depicted in Fig. 4 is much simpler than the one provided in [36], [37], [38], and [39]. In these studies, the authors show all the backoff and packet transmission retries stages to study the functionality of the MAC layer in IEEE 802.15.4. However, although our model shows these stages augmented as one stage, yet, as we show later, we are able to capture the main characteristics of the MAC layer and derive all the formulas that describe its functionality. We will see in the next section that showing the backoff and retries stages is just needed for the sake of computing the reliability of the system. We will follow a methodology that helps in deriving a mathematical formula for the reliability without undermining the validity of the model in Fig. 4.

A. Channel Utilization Under ABA
The Channel Utilization (U) parameter measures how efficiently we are utilizing the wireless medium to successfully transmit packets. In an unacknowledged traffic situation, U refers to the probability that a node sends a packet successfully. However, in an acknowledged traffic situation, the node should receive back the ACK packet in order to consider the transmission successful. By examining the model in Fig. 4, we notice that channel utilization is defined as follows: which reduces to: where, N is included in the computation in order to find the total U achieved from the successful transmissions of all the nodes in the network. 352 | P a g e www.ijacsa.thesai.org (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 12, No. 3, 2021 B. Power Consumption Under ABA It is essential to study the performance of ABA in terms of power consumption. This is because sensor nodes are batterypowered and any proposed algorithm for WSNs should not deplete the nodes' power resources at a high pace.
Under ABA, a node can be in any of the following states: backoff states, CCA states, packet transmission (with either success or collision) states. The power consumed at a node, denoted Etotal, is the total summation of the power consumed at each of these states: Eidle is the total power consumed during the backoff states: ECCA is the total power consumed during the two CCA states: where, Pidle and PCCA to refer to the average power consumed during a backoff state and a CCA state, respectively.
We should pay a careful attention to Etx, the total power consumed during packet transmission. The value of Etx depends on the type of traffic assumed, whether it is acknowledged on not. According to IEEE 802.15.4 [32], if the traffic is acknowledged, the node, after sending a packet (thus, Ptx is considered), becomes idle for a period of one time slot (thus, Pidle is considered) before it starts sensing the ACK packet. If the ACK packet is sensed, we should consider the average power consumed during reception (Prx). If the ACK packet is not sensed after a period of Lack, or in case of having a collision, the node becomes idle for an extra time slot (thus, Pidle is considered) before proceeding to sending the next packet. Therefore, as already noted in [36], to compute the total power consumed while sending acknowledged traffic, we have the following formula: The first term in Equation (23) considers the transmission of the packet, whether it is successful or not. The second term corresponds to the additional time slot in waiting for the ACK packet. The third term evaluates the average power consumed while receiving the ACK packet. Therefore, the summation starts at Ls + 1 which takes into consideration that we wait for Ls time slots and then one extra time slot before receiving the ACK. Finally, the fourth term corresponds to the time slot waited in the cases of having a collision or losing the ACK packet.
In case of unacknowledged traffic, only the first term of Equation (23) is considered.
Finally, Erx, the average power consumed during reception of packets, for both acknowledged and unacknowledged traffics, is expressed as follows: C. Reliability Under ABA Reliability (R) is defined in [36] as the probability of achieving a successful packet reception. In other words, R provides us a measure of how efficient ABA is in improving the possibility of transferring a packet to its destination. Under ABA, a packet is dismissed if we exceed either macMaxCSMABackoffs or macMaxFrameRetries. That is, a node goes through multiple backoff stages, in case of busy CCAs, and/or multiple transmission retries, in case of repeated collisions, before dismissing a packet. Therefore, formulating R depends on finding the probability of avoiding the dismissal of a packet. As the likelihood of dismissing a packet diminishes, it means that the system is more reliable. Therefore, the reliability is defined as follows: Where, is the probability of having successful transmissions and is the probability of having failed transmissions. Note that failed transmissions include both collided packets and discarded packets. While is known from Equation (5), special attention is needed to formulate . We develop the finite-state machines (FSMs) shown in Fig. 5 and use them to accomplish that. The FSM in Fig. 5(a) shows that a node, as it goes from state (0, 0) and ends back at it, may encounter a successful transmission (S), a packet collision (C), or a busy channel (B). Fig. 5(a), however, does not show the multiple bakoff stages and packet transmission retries a node may experience while attempting to send a packet. In other words, the B and C states are in fact constituted by multiple stages. These stages are shown in Fig. 5(b) and 5(c). Note that these two FSMs can be merged to show the complete system, but we avoid that to simplify our derivations. Based on Equations (3)-(6), we can directly see that = + (1 − ) , = (1 − )(1 − ) , and = (1 − )(1 − )(1 − ). These equations can be also inferred by noticing the transitions in Fig. 5(a). The FSM in this figure is interpreted as follows. As a node finds the channel busy, it has a probability of x to find the channel busy again. On the other hand, it may succeed to send its packet or face a packet collision with probabilities z and y, respectively. After succeeding in sending a packet, a node may be successful in sending the next packet with a probability of z. Otherwise, the node may find the channel busy with probability x or suffer from a collision with probability y. Finally, as the node experiences a collision, it may encounter another collision with probability y, succeed in sending the packet with probability z, or find the channel busy with probability x.
In Fig. 5(b) and 5(c) we capture the fact that, during a single cycle, a node may go through macMaxCSMABackoffs (denote as m in Fig. 5(b)) backoff stages and macMaxFrameRetries (denote as n in Fig. 5(c)) collisions before discarding a packet (note that denote the probabilities to suffer from a collision after finding the 353 | P a g e www.ijacsa.thesai.org channel busy for i times). Therefore, in order to find R, we need to find the probability that the system backs off for m+1 times or experiences a collision for n+1 time. If we assume A to be a random variable that denotes the number of backoff stages the node has gone through, and B to be a random variable that denotes the number of collisions occurred, then Equation (25) can be rewritten as follows: ( = + 1) and ( = + 1) can be found using the FSMs in Fig. 5(b) and 5(c), respectively. Towards that end, if we have the transition matrices 1 (for Fig. 5(b)) and 1 (for Fig. 5(c)), then there exist the stationary distributions 1 and 2 , such that 1 × 1 = 1 and 2 × 2 = 2 . The latter relationships are expanded, respectively, as follows: In (27)  Based on (27) and (28), we can write the following formulas (see Appendix A for the detailed derivations): Finally, with the knowledge of Equations (26), (28), and (29), we can now formulate the reliability as follows:

D. Channel Collision Time Under ABA
An efficient backoff algorithm should prove effectiveness in reducing the rate of collisions in the wireless medium. This is essential because not only it improves the utilization of the communication channel, but also reduces the consumption of power due to useless activities.
We aim in this subsection at investigating the percentage of time the channel is getting busy due to collisions. This is different from what Equation (13) reflects. Equation (13) describes the probability of collision from each node's perspective. In other words, this equation describes the average probability of collision that any node will face when communicating over the medium. However, that equation does not consider the channel's perspective. The latter recognizes the fact that a collision involves at least two nodes, and therefore, even if three or more nodes send their packets at the same instant, the channel will experience a busy period of only L c time units. Stated differently, by examining Fig. 4, we notice that the proportion of time a node spends in the collision state is (1 − )(1 − ) (recall Equation (11)). Then, if Nc nodes (out of N) have collided at the same instant, the channel collision time, TCC, is the non-overlapping period of time during which the channel is busy with a collision situation. The latter is defined as follows: where, Nc is the expected number of collided nodes. To determine the value of Nc, we should calculate the expected 354 | P a g e www.ijacsa.thesai.org number of collided nodes, given that a collision has happened. This is a conditional probability that we compute as follows. The probability of having k nodes involved in a collision requires that while a node is at CCA1, k-1 nodes should also be at CCA1 while the remaining N-k nodes should be in any state other than CCA1. This probability is expressed as −1 (1 − ) − . The problem of selecting k-1 nodes out of N-1 nodes under the conditions just mentioned is a typical binomial distribution. Given all of these facts, and by noticing that we may have from 2 to N nodes that are colliding at the same time, we can formulate Nc as follows: Note that we divide by Pc because we have a condition that a collision has already happened.
Equations (32) and (33) imply that if k nodes have collided at the same time, the channel will be busy for only L c time units and not kLc.
An effective backoff algorithm should be able to achieve reductions in TCC.

V. SIMULATIONS AND MODEL VALIDATION
In this section we conduct extensive simulations in order to validate the mathematical model developed in Section IV. Our simulations also provide a comparative study between ABA, from one side, and both BEB and NO-BEB from the other side. In this comparison, we evaluate the performance of ABA in terms of channel utilization, power consumption, reliability, and channel collision time. Furthermore, the fairness of ABA is studied to ensure that the nodes in the network are sharing the communication medium equally.
We wrote a C-based simulator to simulate ABA and the other three algorithms mentioned above. The network under study is of a peer-to-peer topology. The network operates in the beacon-enabled IEEE 802.15.4 mode. We omit both the CFP and the inactive periods from the superframe and assume that it is constituted only by the CAP in the active period.
We use the average power consumption of different wireless network interface cards (NICs) [60], [61], and [62]. The parameters considered in our simulations are summarized in Table I 1 . Also, we always assume, except when stated differently, that = = . In the following sub-sections, we present our simulations results along with discussions and comments.

A. Model Validation
In this subsection we validate our theoretical Markov model by comparing the behavior it predicts to the behavior extracted from simulations. For each parameter studied, we compute the coefficient of variation of the root-mean-square deviation RSMD (CV(RMSD)), which is a measure of the accuracy of our mathematical model. In other words, CV(RMSD) measures the differences between the mathematical model and the simulations. CV(RSMD) is defined as follows: where, ℎ is the predicted theoretical value, is the simulated value, � is the average of the observed values, and is the total number of the sample values used. An accurate theoretical model should achieve low values for CV (RMSD).

1) Channel utilization:
We validate the mathematical expression that we derived for U in Equation (19). Fig. 6 compares the theoretical behavior with the simulated behavior under unacknowledged traffic conditions while Fig. 7 shows the comparison under acknowledged traffic conditions. We can clearly see that Equation (19) is very accurate in predicting the behavior U of as the network's size increases. We do see, however, a discrepancy for small networks (N ≤ 20). In fact, we explain this discrepancy by recalling that Equations (16) and (18) are approximated for large N (see Section IV), and therefore, as the network gets smaller the model, we provided, may become less accurate.  2) Power consumption: Fig. 8, for unacknowledged traffic, and Fig. 9, for acknowledged traffic, show a perfect match between our mathematical expressions and the simulations for the total power consumption under ABA.  3) Power wasted in collisions: Fig. 10, for unacknowledged traffic, and Fig. 11, for acknowledged traffic, depict the theoretical and simulated performance in terms of the power wasted due to packet collisions. These figures illustrate an accurate matching between our Markov model and the simulations.   Fig. 12, for unacknowledged traffic, show a perfect match between our mathematical expression and the simulations for the reliability of ABA. The same observation is seen in Fig. 13 for the acknowledged traffic.

5) Channel collision TimeL:
ABA's theoretical and simulated behavior in terms of the achieved channel collision time, under different traffic conditions, is depicted in Fig. 14  and 15. Although we observe a deviation between the theoretical curves and the simulation ones in all of these figures, the deviation is minor and does not undermine the accuracy of our model. We argue, however, that this deviation is occurring as a result of the term Nc in Equation (32). Nc is computed using Equation (33), which includes the term (1 − ) − . We discussed in Section IV that this term, originally used in Equation (13), is formed based on the assumption that a node that is not at the CCA1 state can be at any other state in the Markov chain of Fig. 4. This assumption provides a reasonable approximation of the probability of collision in the network, and the deviations we see in Fig   In general, by examining Fig. 6 to 15, and by noticing the values of that we achieved, we can conclude that our Markovbased theoretical model of ABA is accurate and successful in predicting the simulated performance.

B. Comparing ABA with other Algorithms
In this subsection we study the performance of ABA compared to that of NO-BEB and the standard BEB. Fig. 16 ABA's performance in terms of channel utilization, under unacknowledged traffic conditions, compared to BEB and NO-BEB. The comparison under acknowledged traffic conditions is shown in Fig. 17. We can see in these figures that ABA achieves a superior performance compared to BEB and NO-BEB. The enhancements over thesse algorithms become significant as the network's size increases (especially beyond a size of 20 nodes). For example, in Fig. 16, at 35 nodes, ABA achieves a U of 59.84%, while BEB and NO-BEB achieve 19.63% and 35.63%, respectively. This means that as ABA enables nodes to update the size of their contention windows in an adaptive manner, a better utilization of the communication channel is achieved.  2) Power consumption: In Fig. 18 and 19 we show the performance of ABA in terms of power consumption. It is evident in all these figures that ABA is consuming the least amount of power among all the algorithms. Compared to BEB (Fig. 18), ABA is able to achieve another 10.3% (at N = 5) to 36.7% (at N = 50) of power savings. The savings compared to NO-BEB range from 3.5% to 21.8%. Comparable results can be drawn from Fig. 19. The power savings achieved with ABA do not reflect a strong performance boost, and therefore, we need to investigate the portion of the total power that is wasted in useless activities, that is, collisions. In Fig. 20 and 21 we show the amount of power lost due to collisions under each algorithm. It its quite evident that ABA is capable of lowering the percentage of collisions, and therefore, the power lost during these situations is the lowest compared to the other algorithms. In Fig. 20, compared to BEB, ABA manages to reduce the power wasted due to collisions significantly. At N = 5, ABA wastes 39% less in power than BEB. At N= 50, the power wasted is 69.3% less than BEB. That is, ABA is able is to utilize the power resources of the sensor nodes in useful activities. Compared to NO-BEB, ABA loses less in power by 16.7% due to collisions (At N =5). The savings in power jump to 50.6% at N = 50. Comparable conclusions can be observed in Fig. 21. In conclusion, we can see that ABA is proving to be more conservative in depleting the power resources of the nodes.   3) Reliability: In Fig. 22 and 23 we depict the performance of ABA in terms of the reliability. These figures demonstrate the superiority of ABA over all the other algorithms in terms of reliability. A significant improvement can be observed over BEB and NO-BEB. In particular, in Fig. 22, ABA manages to achieve a boost in reliability that starts from 39% (at N = 5) and keeps increasing till 69.3% (at N = 50) compared to BEB. Compared to NO-BEB, the increase in reliability goes from 8.32% (at N = 10) and continues to 61.8% (at N = 50). In Fig. 23, we can observe a similar performance.

4) Channel collision time:
We examine the performance in terms of the channel collision time in Fig. 24 and 25. Again, ABA is showing superiority in terms of its ability to keep the channel collision time at its lowest level compared to the other algorithms. In particular, in Fig. 24, ABA can achieve a channel collision time that is 38.5% less than BEB at N = 5. This percentage jumps to 58.8% at N = 50. Compared to NO-BEB, ABA's improvements in channel collision time range from 16.5% (at N = 5) and 43.74% (at N = 50). Again, comparable observations can be seen in Fig. 25. ABA's ability to adapt the contention window's size in accordance with the collisions level allows for an efficient utilization of the network's resources. 5) Fairness: Finally, we examine the fairness of ABA in order to see whether it allows nodes an equal opportunity to access the wireless medium or not. We adopt Jain's fairness index [40] to measure ABA's fairness: where, x i denotes the ith node's share of the medium. An algorithm is achieving better sharing of the medium among the nodes if its fairness index is closer to 1.    Fig. 27 shows the fairness under acknowledged traffic conditions. We can clearly see that, for different packet lengths, ABA, BEB, and NO-BEB achieve a fair sharing of the medium among the nodes (the three curves are overlapping, and therefore, only one curve is apparent in the figures).

C. Discussions
In the previous subsection we found that the ABA algorithm is achieving a promising performance in terms of enhancing channel utilization, conserving power resources, improving reliability, reducing the level of collisions, while preserving the fairness among the nodes in the network. The superiority of ABA over the other algorithms, especially BEB, comes from the fact that it indirectly relates the contention window (W) to the number of nodes in the network. This can be understood by recalling Equation (13) in which we have a direct relation between the probability of collision (Pc) and the number of nodes in the network (N). Pc increases with the increase of N, and therefore, the value of the W should be changed taking into consideration the size of the network. Thus, the main strength of ABA is that it is controlling W probabilistically, in such a way it self-adapts to the network's size and the activity over the communication channel. Depending on a deterministic methodology, as in BEB, to change W without any consideration for the network's size gives a poor performance as we demonstrated. The same problem is found with NO-BEB which adopts from BEB the idea of resetting W to a predefined minimum. Although NO-BEB shows a considerable improvement over BEB's performance, resetting W to its minimum without taking into consideration the current status over the medium will degrade the performance.

VI. CONCLUSION AND FUTURE DIRECTIONS
In this paper we studied IEEE 802.15.4's BEB algorithm and highlighted its major limitations that degrade the overall performance of the wireless sensor network. We pointed out that BEB's methodology of updating the size of the contention window is highly deterministic and cannot cope with the changing levels of activity over the communication channel. Based on these observations, we introduced a novel backoff algorithm, the Adaptive Backoff Algorithm (ABA), which introduces an adaptive, probabilistic methodology to control the size of the contention window. ABA depends on including the probability of collisions, as computed locally by each sensor node, in the computation of the size of the contention window. In this way, the number of nodes competing to access the medium is involved indirectly in the process of updating the contention window. Therefore, we end up with a backoff algorithm that self-adapts to the size of the network, and therefore, manages the medium access in a way that improves the overall performance. We modeled ABA using Markov chain and validated our model using a C-based simulator. Our simulations prove the accuracy of our theoretical model of ABA. Also, they demonstrated a superior performance over BEB, as well as two other backoff algorithms, in terms of channel utilization, power consumption, reliability, and channel collision time. The simulations also proved that ABA is fair in terms of allowing the competing nodes an equal opportunity to access the medium.
As future research directions, we will work on elaborating the concept of probabilistic backoff algorithms such that more effective MAC protocols are designed for wireless sensor networks. In fact, the methodology of exploiting the probability of collision to gain information about the size of the network and the status over the communication medium can prove usefulness in prioritizing nodes' access to the access the medium. We plan to explore the latter topic in our future research.

APPENDIX A
In Section IV, Equations (27) and (28) are used to formulate the reliability (R) for a WSN operating the Adaptive Backoff Algorithm (ABA). In this appendix we show the detailed derivations of the probabilities of having m+1backoffs and/or n+1 transmission retries [60].
Based on Equation (27), we can write the following set of equations: (A.5) The summation + 1 + ⋯ + +1 + is equal to 1 because it includes all the states that a node can encounter while attempting to send a packet. Therefore The summation + 1 + ⋯ + +1 + is equal to 1 because it includes all the states that a node can encounter while attempting to send a packet. Therefore, Equation  (26) from Section IV, and by noticing that = 1 − − , we can formulate R as follows: 363 | P a g e www.ijacsa.thesai.org