Optimized Energy Consumption for Slotted Aloha and CSMA/CA Multihop Ad Hoc Networks

—Ad hoc and wireless sensor networks are character- ized by their ability to monitor phenomena in the most adverse scenarios. However, to perform well, these networks need to be self-adjusting and save energy. In general, these networks operate without human interference and require strategies to provide longer operating life. This paper investigates the energy consumption in a random multihop ad hoc network, comparing the slotted Aloha with the CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance) implemented in the IEEE 802.11 Distributed Coordination Function (DCF) as medium access control (MAC) protocols. We obtain the optimal transmission power as a function of physical and link layers parameters which results the optimized energy consumption per successfully transmitted bit. In this paper, we ﬁnd that there are values of these parameters that can be used to extend the battery life of wireless communication devices comparing the Aloha and CSMA/CA performance.


I. INTRODUCTION
In wireless ad hoc and sensor networks, one of the big challenges is the energy resources management. The devices in these networks perform tasks, in general, without human interference, using batteries as a source of energy [2]. When the battery discharge, the device becomes inoperable and may decrease the network performance. For this reason, optimization techniques has been developed to improve the network lifetime [3].
The interest in obtaining reduction in energy consumption in devices operating on these networks comes from the most varied contexts. The concern with preserving the energy resources of these devices can be seen in Internet of Things (IoT) networks, whose application can be, for example, in a smart home [4], or in a more remote context, as is the case of a static sensor network to monitor volcanic activity [5].
In ad hoc and sensor networks, it is desired that the devices can self-adjust [6] because of its various operation conditions. It is widely known that most of the energy consumption in wireless networks is related to transmission and reception of data. Accordingly, energy consumption is correlated with physical layer, link layer and routing strategies for communication. Therefore, improved MAC protocols and routing schemes can be used to obtain better performance and save energy [2], [7].
The slotted Aloha and CSMA/CA are MAC protocols widely studied and considered for wireless ad hoc networks performance analysis. Although the slotted Aloha protocol has low throughput performance, its low complexity and unbiased fairness has been considered as an alternative combined with physical layer techniques, like Non-Orthogonal Multiple Access (NOMA) and Successive Interference Cancellation (SIC), which can substantially improve wireless network performance [8], [9].
On the other hand, the CSMA/CA employed in IEEE 802.11 DCF is an important MAC protocol for wireless ad hoc networks since it copes with collisions and the hidden terminal problem. In addition, it is the MAC protocol for the WiFi technology which makes it widely used for wireless networks [10].
We propose in this paper a comparison between two approaches that use as MAC protocols the slotted Aloha [11] and the CSMA/CA employed in IEEE 802.11 DCF [10]. Our main goal is to analyze the energy consumption to perform communication through multiple hops as a function of packet size and transmission rate, employing a routing scheme in which each hop along the path on the direction to the destination has the smallest possible length [12].
In this paper we show that it is possible to attain optimum (lowest) energy consumption as a function of the packet size, the transmission rate and the number of hops to destination, which helps to extend the battery life of wireless communication devices in wireless networks. Therefore, our study integrates physical, link and network layers analysis to obtain a broader modeling of energy consumption comparing two important benchmark protocols (slotted Aloha and CSMA/CA) for wireless ad hoc networks.
The rest of the paper is organized as follows. Section II describes the related work. Section III revises the formulations of [12]- [16], and extends them to include the effect of the slotted Aloha and CSMA/CA communication protocols in a random network, now focusing on energy consumption as a function of number of hops, data transmission rate, and packet size. The results and discussions are presented in Section IV and Section V concludes the paper.

II. RELATED WORK
The energy consumption in ad hoc and sensor networks is of great importance to improve the performance and longevity of these networks. In this context, this section reviews related studies to our work.
In [17], a multihop approach considers physical layer parameters like the number of nodes, the distance between the nodes and the energy required to transmit a certain number of bits. However, the authors do not explore the link layer impact on energy consumption.
In [18], Xiao et al. find through extensive simulations that the MAC protocol consumes a substantial amount of energy and cannot be ignored in wireless network analysis.
On the other hand, in [19], an energy consumption model is presented as a function of physical layer and link layer parameters. In their study, the authors optimize the transmission power for communication over additive white gaussian noise (AWGN) channels. However, it was not presented a study about the number of nodes, number of hops and about the data transmission rate.
A study about energy consumption employing the CSMA/CA protocol was developed in [20]. In a random network, the authors analyzed the number of nodes as a physical aspect. Other parameters as transmission rate, transmission power and packet size were not considered to obtain reduction in energy consumption.
In [6], we employ a linear network topology presenting a model to optimize the energy consumption in slotted Aloha ad hoc networks in which the communication is given through multiple equidistant hops. Accordingly, the focus on that work was a simple linear topology considering only the Aloha protocol. On the other hand, a random network topology approach is presented in [1]. However, only the slotted Aloha MAC protocol was investigated.
In [13], [14] and [15] a robust model of energy consumption for ad hoc and sensor networks was presented where they considered real parameters of the physical layer. The energy efficiency expressed on the proposed metrics by the authors allows the analysis of parameters such as the optimal transmission radius, whose definition represents the ideal energy consumption distance at which a node can successfully send information.
In [21], a study is done considering a hybrid approach. In this context, a static sensor network detects events and sends notifications to a mobile network that, in turn, approaches the notified location to verify the occurrence detected by the static devices. An analysis of energy consumption is made and the importance of the static network to preserve the energy of the devices that operate on the mobile network is highlighted.
Similarly, the work developed in [22] also highlights that many applications in sensor networks make use of static devices. In this context, it emphasizes that preserving the device energy is the most important problem, and that deserves greater attention in sensor networks.
In [12], a random network ad hoc network is considered in order to make BER (bit error rate) analysis using the concepts obtained from [16]. In the present work, we start from [12] to represent the random network topology and its routing scheme in which the average distance among nodes is given as a function of the maximum routing deviation angle. From [13], [14] and [15], we develop a study of the effect of data transmission rate and packet size, among other physical, link and network layers parameters, employing the optimal transmission power to attain energy consumption reduction.
We chose as MAC protocols the slotted Aloha [11], because of its simplicity of modeling and growing recent interest for new applications [8], [9], and the CSMA/CA [10] due to its medium access mechanisms that improve performance in terms of data transmission. Furthermore, slotted Aloha and CSMA/CA are benchmark MAC protocols for wireless networks.
Accordingly, regarding the presented related work, our analysis extends the energy consumption modeling by integrating physical, link and network layers in order to attain optimum energy consumption for two important protocols for wireless networks. Our study allows to simultaneously adjust key parameters from the three lower layers of wireless networks and evaluate their impact on energy consumption of the nodes.

III. ENERGY CONSUMPTION ANALYSIS
We employ a top-down approach to integrate routing modeling, the medium access protocol, and the physical layer to achieve reduced power consumption. That is, the modeling presented here includes layers 1, 2 and part of 3 of the layered network architecture.

A. Routing
To model the network we used the approximate average hop distance for random nodes distribution as studied in [16]. In such approach, a node randomly chooses another node in the network as a destination. Therefore, the traffic takes place in a uniformly random distributed way among the nodes. This modeling can represent, for example, IoT networks for smart home, in which static devices communicates among each other to attain automated tasks [4].
Thus, it was considered a scenario where the nodes are static and uniformly random distributed on a toroidal surface [12], whose area can be mapped in a D side square as in Fig. 1. A pair of source and destination nodes wish to communicate considering the maximum opening angle of the route, the angle θ, in relation to the straight line connecting each transmitting node along the route and the destination.
Therefore, the routing strategy is to choose as the next hop node the nearest node within the angle θ towards the destination. Accordingly, each hop along the path on the direction to the destination has the smallest possible length so as to reduce the end-to-end bit error rate [12].
Since this is a multihop transmission in a random network, the average number of hops is now calculated as a function of the number of nodes n through [12] i ≈ ( .
In this case, the number of nodes n and the angle θ have been adjusted to obtain the numbers of hops i = 1, 2, 4 and 8, in order to evaluate the behavior of power consumption performance in distinct cases.

B. Link Layer Medium Access
The probability of successful transmission over a link for a packet containing N b bits, for an unreliable channel is is the bit error rate as a function of the signal to noise ratio (γ) [15]. We modified this probability to include the slotted Aloha [11] and CSMA/CA [23], [10], protocols effect, in which the medium access probabilities for successful transmission for n nodes in the network are given, respectively, by and where τ is defined as the probability that a station transmits during a generic slot time for the CSMA/CA protocol [10]. Accordingly, τ is given by [10] in which p is the packet collision probability, Ret is the number of retransmissions needed for successful transmission, W is the backoff window size and j is the jth backoff stage.
Thus, the probability of successful transmission of a packet per hop for slotted Aloha and CSMA/CA protocols are given, respectively, by and

C. Physical Layer and Energy Consumption
We employ the energy consumption analysis for a single hop transmission developed in [13], which updated the description in [24], using the formulations given by [14] and [15]. Therefore, it is a well defined physical layer model which incorporates several other parameters. We modify these formulations to insert the effects of the MAC protocols and the multihop communication.
The energy (E p ) to send a packet over a single hop is obtained by the energy consumed at the transmitter (E T x ) and at the receiver (E Rx ). Therefore, we have that [13] E T x and E Rx are given, respectively, by [24] E T x = T start P start + N b R (P txElec + P amp ) and where N b is the number of bits of the transmitted packet, R is the transmission rate, P txElec is the circuit power of the transmitter, P rxElec is the circuit power of the receiver. T start is the circuit startup time requiring P start power. P amp is the amplifier power of the transmitter and is given by where α amp is a certain constant power level and β amp is a proportionality constant of the transmission power P t .
To obtain the average energy consumption per bit for a successful multihop transmission, we must divide the transmission energy consumption per packet by the number of bits N b per packet and consider the number of hops to reach the destination. For this purpose, the energy consumption per bit E b (in Joules per bit (J/bit)) for a single hop is defined as where K 1 = βamp R and E c is given by The signal to noise ratio (γ) is defined as [25] where α is the path-loss exponent. w indicates the average hop distance described in [16] as in which D 2 is the network area (see Fig. 1). The constant C 2 is given by where G t and G r represents the transmission and reception antenna gains, respectively. N 0 is the noise power spectral density of the communication channel, λ = c fc is the transmitted signal (carrier) wavelength, c is the light speed and f c is the carrier frequency.
It is important to note that the signal to noise ratio does not include the interference caused by another node in the network once it is treated in the medium access control protocol. Thus, due to the MAC protocol, if two or more nodes transmit simultaneously their data packets collide and the information is lost requiring retransmission. Such effect is incorporated in the slotted Aloha and CSMA/CA protocols.
The average energy consumption per data bit (in units of Joules per bit) to perform a single hop is defined as where k is the number of transmission attempts needed to successfully send a data packet over a hop. From Eqs. (11), (5), (6) and (16), the total average energy per bit to send the data packet through i hops from the source to the destination for Slotted Aloha and CSMA/CA is given, respectively, by and .
(18) The communication channel used here employs the Rayleigh fading since it is widely used in cases of ad hoc and sensor networks to model wireless environments. Thus, for a signal to noise ratio greater than 5, which is the case for the parameters employed here, the bit error rate can be approximated by [25] where α m and β m are constants that depends on the type of the employed modulation. We consider Binary Phase Shift Keying (BPSK) modulation because it is commonly found on wireless communication devices. Accordingly, α m = 1 e β m = 2.

for slotted Aloha and
for CSMA/CA. The optimal transmission power (P 0 ) that attains minimum energy consumption is given by P 0 is obtained as a function of the data transmission rate (R) and the data packet size (N b ) along with other parameters. From Eq. (22), and observing that the term involving P t is the same for both Eqs. (20) and (21), it results that the optimum transmission power for Aloha and CSMA/CA is the same and given by C 3 and C 4 constants are derived from Eq. (12) and are given, respectively, by Therefore, R and N b can be varied to reach minimum values of energy consumption by fixing the other parameters which represent the physical characteristics of the employed transceiver and the wireless medium. Here, as example, we employ the µ-AMPS-1 transceiver parameters that are described in Table I [24]. Finally, from Eqs. (20), (21) and (23), the average energy consumed per successfully transmitted data bit from source to destination can be given as a function of R and N b , for i hops, considering the optimal transmission power P 0 (R, N b ). Accordingly, for slotted Aloha and for CSMA/CA. The average total energy consumption (E T OT AL ) of the entire network can be obtained from Eqs. (26) and (27), for a given number of nodes n, by

IV. RESULTS AND DISCUSSION
This section presents the numerical results obtained using Eqs. (26) and (27) in order to explore the behavior of the average energy consumption per bit (in units of dBmJoules per bit (dBmJ/bit)).
Accordingly, the figures illustrates the results for slotted Aloha and MAC CSMA/CA comparing both protocols employing the parameters described in Table I. Two values were considered for the path-loss exponent (α = 2 and 4) resulting in distinct scenarios for wireless communication. The number of retransmissions (Ret) used to calculate τ was obtained from [10]. Figs. 2 and 3 illustrates that varying W has almost no impact over E ihop for single hop and two hops. On the other hand, as the number of hops increases, i.e. i = 4 and i = 8, the impact is perceptible and the higher is the value of W the lower is the energy consumption. For the following results we chose to use W = 32 since the throughput is practically constant for this value, as evidenced in [23].
Another observation is that the CSMA/CA protocol has better performance than the slotted Aloha if we compare the curves with same number of hops in all following figures.
For α = 2 and R = 1M bps, Fig. 4 shows the energy consumption behavior as a function of the packet size. It is observed that the lowest energy consumption is attained for the CSMA/CA protocol employing a single hop. In addition, the single hop slotted Aloha protocol performs better than the other Aloha cases and the four and eight hops curves of the CSMA/CA. The lowest values of energy consumption in all cases for this figure occurs for packet size (N b ) between 1 kbits and 10 kbits.
In Fig. 5, for α = 4 and R = 1M bps, with the increase of path-loss exponent, the SNIR is further reduced at the receiver; therefore, it is advantageous to transmit data using shorter packet sizes (optimum N b between 50 and 2000 bits) in comparison with the case α = 2. Also, from Fig. 5, for reduced energy consumption in the CSMA/CA case, for packet sizes  under 150 bits it is better to send data in one hop. For packet sizes between 150 and 1500 bits it is more advantageous to send data in two hops, while for packet sizes above 1500 bits it is more beneficial to send data in four hops. If we analyze only the slotted Aloha case, for packet size between 10 and 30 kbits it is better to send in a single hop, between 30 kbits and 100 kbits it is more advantageous to send in four hops, while for more than 100 kbits it is better to send in 8 hops.
Figs. 6 and 7 show the average energy consumed per bit, for α = 2 and 4, respectively, and N b = 1000 bits, varying the transmission rate R. It can be observed in all the curves that the lower consumption happen for higher transmission rates and it can be explained by the fact that the greater value of R is, the shorter is the packet transmission time, which reduces its vulnerable interval, decreasing the chances of packet collisions.
In Fig. 6, analogous to Fig. 4, it is observed that the lowest energy consumption is also attained for the CSMA/CA  protocol employing a single hop for the entire investigated range (1 kbps < R < 10 Mbps). Also, the single hop slotted Aloha transmission performs better than the other Aloha cases and the four and eight hops curves of the CSMA/CA. Furthermore, for the slotted Aloha protocol curves, the lowest energy consumption occurs for transmission in single hop.
From Fig. 7, for transmission rate under 70kbps employing CSMA/CA it is better to send data through single hop, while for 70 kbps < R < 2 Mbps it is better to employ two hops, and above 2 Mpbs it is more advantageous to use four hops. Again, for the slotted Aloha protocol, it is better to transmit in single hop for the entire investigated range (1 kbps < R < 10 Mbps).
From Eqs. (5) and (6)  the vulnerable period of a packet increases making it more susceptible to errors in the channel, then decreasing P r s . Its reduction with N b becomes more perceptible for the higher value of the path-loss exponent (α = 4). Analogous behavior is observed for the curves of P r s as a function of R.   12 represents the optimal transmission power as a function of the transmission rate for α = 2. It illustrates that transmitting at high rates increases the optimal transmission power. Accordingly, the employed transmission rate is limited by the allowed hardware transmission power. Fig. 13 shows the optimal transmission power versus packet size for α = 2. P 0 increases with packet size augment because longer packets implies longer vulnerable periods, which requires higher transmission power in order to cope with errors in the wireless channel for the entire transmission period.
Figs. 14 and 15 illustrate the optimal transmission power P 0 and energy consumption E ihop , respectively, as a function of the distance D. It shows that the optimal transmission power to establish successful communication increases with distance, causing augment in energy consumption. It happens because transmitting over longer distances requires higher transmission power to guarantee that the packet will be successfully transmitted.
The results obtained in our study indicate that, for the scenarios and premises here considered, it is possible to adjust parameters like the packet size and transmission rate in order to attain reduced energy consumption for ad hoc networks employing slotted Aloha or CSMA protocols. In addition, the CSMA protocol presents lower energy consumption than slotted Aloha for the same number of hops. However, Aloha single hop energy consumption outperforms CSMA employing 4 and 8 hops depending on the employed network scenario and parameters. The average total energy consumption of the network is shown in Table II for D = 80m, R = 1 Mbps, N b = 1000 bits and α = 2 and α = 4, n = 70 nodes, calculated from Eq. (28). For the presented modeling, the results indicate that, in     general, it is advantageous to keep the number of hops small in order to reduce the total energy consumption of the network due to the energy spent to relay the packet through each hop on the route from source to destination. V. CONCLUSION This work aimed to investigate the behavior of the average energy consumption per bit for a successful transmission in a random wireless ad hoc network, employing multiple hops. One of the contributions of the study was to start from a robust formulation of energy consumption used in the literature and to extend it to consider the medium access protocols slotted Aloha and CSMA/CA comparing them.
Another contribution of this work was to determine the variation range of transmission rate and packet size, for different hops and investigated protocols, and obtain the optimum power transmission to attain average energy reduction. Two values of the path-loss exponent (α = 2 and α = 4) were used which models distinct wireless communication scenarios. It has been found that depending on the case, there is an optimal value for packet size that minimizes power consumption. It has also been observed that the transmission rate resulting the lowest energy consumption is the largest value that can be used on the transceiver hardware.
As future work, we intend to use multi-objective optimization, considering other MAC protocols and other routing schemes. Other models of signal propagation will also be considered.
Another future investigation is to consider the impact of the buffer occupancy through the intermediate nodes along the path from source to destination. As consequence, the delivery delay needs to be evaluated on the trade-off of choosing the number of hops.
ACKNOWLEDGMENT This work was supported in part by Centro de Informática (CIn), by Propesq-UFPE, and by Fundação de Amparo a Ciência e Tecnologia do Estado de Pernambuco (FACEPE).