1 INTRODUCTION

The concept of the Internet of Things (IoT) joining devices capable of exchanging data inside a network is integral to our future. Each year, IoT applications are used for more and more variable purposes; however, as the capabilities grow, we have an increasing number and level of requirements imposed on IoT devices, including rapid and energy-efficient data transmissions inside a network containing a large number of smart devices. The existing data transmission technologies cannot always fulfill quality-of-service requirements of apps of the IoT, which is why we need to create novel standards or adapt the old ones. One of examples of the latter is the 802.11ah standard, which is an adaptation of Wi-Fi technologies to the IoT networks the 802.11ah standard, named Wi-Fi HaLow, describes various mechanisms such as the Restricted Access Window (RAW) and the Target Wake Time (TWT), by which a large number of sensors with restricted energy consumption can quickly transmit data. The current paper is devoted to studying the RAW mechanism in conjunction with TWT mechanism that reduce energy consumption.

The RAW mechanism aids to reduce the contention for channel access. For this purpose, an access point divides the stations into M groups and assigns to each group a limited time interval Tslot called the RAW slot during which just the stations from a certain group can transmit their packets. The RAW slots are joined in a continuous RAW time interval, named the Restricted Access Window, which, can be single or periodic (PRAW). In the periodic variant of the mechanism the RAW intervals repeat with a period Tper, which is associated with other parameters via the share of channel time consumed by the PRAW mechanism CTC as MTslot = CTCTper. The share CTC is an important performance metric of the PRAW mechanism, the restrictions on which must be taken into account, because the data transmission frequently occurs in heterogeneous Wi-Fi networks combining sensors with other stations servicing saturated traffic.

Inside an assigned RAW slot the stations transmit data using an Enhanced Distributed Channel Access (EDCA) based on the carrier sense multiple access with collision avoidance (CSMA/CA). One of the peculiarities of using the EDCA in the RAW mechanism is dropping the size of the contention window determining the set of initial states of the backoff counter, up to minimal value W0 in the beginning of each RAW slot. The stations can be allowed and disallowed to begin an attempt of transmitting a packet continuing after the end of the RAW slot. Moreover, when achieving a certain maximally admissible number R of attempts of transmitting a packet, the station rejects it.

The average delay and average energy consumption are often used as the metrics of network performance that allow estimating the efficiency of the data transmission mechanism in various scenarios. The RAW mechanism, along with the TWT mechanism, allows transmitting data quickly and energy efficiently. However, in the 802.11ah standard there are no recommendations on choosing the parameters of the RAW mechanism providing the best performance indices. The existing studies that can be used to provide practical recommendations either (i) consider scenarios of delivering a saturated traffic nonrealistic to IoT networks, (ii) use simplification in constructing analytical models considerably affecting their accuracy, or (iii) consider packet transmissions within a single RAW period.

The contribution of the current paper consists in developing recommendations on choosing the PRAW parameters minimizing the average delay, the average energy consumption per transmitted packet, or the share of channel time consumed by the PRAW mechanism under different load determined by the intensity of packet generation and the number of stations. To give recommendations, we solve the optimization problems (see Section 5) using analytical modeling in which all peculiarities of data transmissions in IoT networks by means of the PRAW mechanism are taken into account.

The rest of the paper is structured as follows: in Section 2 we provide a survey of existing works in which the RAW mechanism was studied; in Section 3 we describe our scenario; Section 4 contains a description of the analytical model applied to solve optimization problems; in Section 5 we discuss the results of solving optimization problems; and in Section 6 we present the main conclusions.

2 LITERATURE SURVEY

To choose the RAW parameters providing the minimal average delay and average energy consumption per transmitted packet, we can use analytical models [1–23] that allow studying the RAW mechanism with a lower computational cost than that in simulation. However, the analytical models apply certain assumptions that can substantially affect the accuracy of the results.

The authors of some works [16–19] consider an earlier version of the RAW mechanism called the Group-Synchronized Distributed Coordination Function (GS-DCF). Furthermore, in works [16‒19], as well as in some of the studies of the current version of the RAW mechanism [8–13], researchers assume scenarios of delivering saturated traffic unrealistic for the IoT networks. In the analytical models of serving unsaturated traffic, researchers often use an assumption about a constant probability of transmitting a packet within the RAW slot [1–4] that significally affects the accuracy.

The analytical models based on the theory of Markov chains [13–15] allows taking into account the time variation in the probability of packet transmission. One of the earliest works using Markov chains for studying the RAW mechanism is [13], in which the authors found the duration of the RAW slot that allows transmitting a packet from an arbitrarily chosen station or packets from all stations with a probability not less than a given one. Work [13] became a foundation for further studies: [14] expanded [13] to the case of an arbitrary number of packets occurring in a queue of each station, and Bankov et al. [15], adapted the model of [13] to data transmissions scenarios by devices with a constrained energy consumption. However, in all works [13–15], consideration of the RAW was limited by a single period.

Packet transmissions within several RAW periods in scenarios of servicing unsaturated traffic was considered in [20–23]. However, Khorov et al. [20, 21], found the probability of transmitting just the first packet from a group of sensors, whereas Zazhigina et al. [22], concentrated on estimating the performance of the PRAW mechanism with short RAW slots including just a single transmission attempt. Consideration of only short RAW slots reduces the complexity of the analytical model, because, in the computation of transmission probabilities in a RAW slot, one use combinatorial formulas instead of Markov processes; however, such simplification also limits its range of applicability. RAW slots of arbitrary duration were considered by Krotov and Khorov [23], which, in conjunction with the periodic RAW, delivery of unsaturated traffic, and taking into account the time variation in the packet transmission probability provides the analytical model with a high accuracy [23] and its applicability for solving diverse problems associated with optimization of the RAW mechanism.

Efficiency of the RAW mechanism was estimated from the point of view of various metrics of the network performance. In works devoted to nonperiodic RAW, the main metric was the probability of delivering a packet per RAW interval, whereas for PRAW, researchers studied the average delivery delay. Efficiency of RAW and PRAW was also investigated from the point of view of energy consumption and throughput. Some authors proposed algorithms for optimizing one of the RAW parameters (for instance, the transmission interval for a station [24], the number of groups [25], or the size of the contention window [26]). However, there still are no works devoted to a joint optimization of the PRAW mechanism parameters (such as M, W0, Tslot, and Tper) and providing recommendations on adjusting these parameters depending on the intensity, number of stations, and target metric.

In this paper we first give recommendations on the choice of PRAW parameters optimizing the average delay and average energy consumption per transmitted packet depending on the traffic load and the number of stations. The performance estimation of the PRAW mechanism is carried out by means of an analytical model based on [23] and taking into account the possibility of packet generation during a RAW slot.

3 SCENARIO

Consider a wireless local network based on the 802.11ah standard, in which there are N sensor stations and an access point. Sensors are quite simple and cheap; therefore, their queues contain no more than a single packet. A new packet is generated on a sensor terminating the service of the previous packet after a time interval being a random variable distributed exponentially with parameter λ.

To reduce contention for channel access, the access point uses the PRAW mechanism dividing N sensors into M groups (there are Nm stations in a group with number m, 1 ≤ mM) and assigning a RAW slot with duration Tslot to each group. All RAW slots are joined in continuous time interval Traw = MTslot repeating with period Tper (Fig. 1).

Fig. 1.
figure 1

PRAW configuration.

Data are transmitted in an ideal channel, that is, an unsuccessful packet transmission attempt is just a consequence of collision, which is understood as simultaneous packet transmissions by two or more sensors. All sensors hear each other, that is, there are no hidden stations, which can be achieved by using the methods of [27–31]. Packet transmission occurs strictly inside a RAW slot; therefore, the sensors transmit a packet only if they discover that the time until the end of the RAW slot is enough for this transmission.

To reduce the energy consumption, the sensors outside the RAW slot assigned to it, the sensors having no packets for transmission in a RAW slots assigned to them, as well as the sensors finding out that there is not enough time for transmission within the RAW slot assigned to them, enter sleep mode and save energy by using the TWT mechanism.

4 ANALYTICAL MODEL

To solve the optimization problems on choosing the PRAW parameters providing the best efficiency of the PRAW mechanism from the point of view of average delay or average energy consumption, we use model [23] in which we additionally take into account the possibility of packet generation inside the RAW slot.

The stations perform attempts of packet transmission strictly inside the assigned RAW slots not intersecting the boundary; therefore, the processes of packet transmission by the sensors being in different groups and transmitting in different slots are independent of each other. In [23], Krotov and Khorov develop a model for delivering an unsaturated traffic for the case of single periodic RAW slot (M = 1, Traw = Tslot) and then generalize the results to the case of several RAW slots. When constructing the model in [23], they assume that all packets are transmitted for a small number of attempts; therefore, the sensors have no limitation on the number R of repeated attempts of packet transmission significantly affecting the accuracy of the results.

Model [23] is based on two processes each of which is a Markov chain with discrete time. Firstly, a process of packet transmission inside RAW slot m is considered [13], from which the probabilities of successful transmission of a fixed number of packets per RAW slot are determined. Here, it was assumed that at beginning of a RAW slot (and, correspondingly, at the beginning of the considered process) exactly 0 ≤ nNm sensors had packets for transmissions. Then, the authors of [23] consider the process of changing the number of active sensors, that is, those having a packet for transmission, at the beginning of RAW slots m of two adjacent periods. During the RAW slot, the sensors can transmit their packets with some probability found from the first process, and the new packets may generate either on the sensors inactive at the beginning of the RAW slot during the period with duration Tper or on the sensors transmitting their packets during the RAW slot of Tslot, starting from time instance \(\frac{{{{T}_{s}} + {{T}_{{{\text{slot}}}}}}}{2}\) after its beginning (we assume that the time of end of a successful transmission of a packet is distributed uniformly between Ts (duration of successful transmission) and Tslot). The model considered in the paper differs from the model [23] in taking into account the possibility of packet generation during the RAW slot at the sensor which packet was just transmitted during this slot. Using the methods described in [32], for a supplemented model we find the stationary distribution of the number of sensors active at the beginning of the RAW slot. It allows determining average number \({{{\bar {v}}}_{m}}\) of packets transmitted per one RAW period, which also is equal to the average number of packets generated per one RAW period. By summing \({{{\bar {v}}}_{m}}\) over all groups M, we can find the average number of packets transmitted per one RAW period \({\bar {v}}\) for the general case with an arbitrary number of groups M.

Using the average number of packets transmitted per RAW period \({\bar {v}}\), we determine average delay of transmitting a packet \(\bar {D}\): we subtract the average time of packet generation from the average time between two successful attempts of transmitting a packet found using the Little formula [33].

The process of transmitting packets inside a RAW slot is described by means of states (t, c, s) [13] showing that there have occurred s successful, c collisional, and tcs empty virtual slots from the beginning of the RAW slot; the virtual slots are understood as the time interval between two successive changes in the backoff counter [34, 35]. In addition to that, as in [23], we compute the average amount of energy \({{\bar {Q}}_{m}}\) consumed by Nm sensors per RAW slot equal to the average energy consumption during the entire RAW period due to the fact that stations enter sleep mode outside the RAW slots assigned to them. The value of \({{\bar {Q}}_{m}}\) is the average energy consumed by active stations during a transition from the state (t, c, s), which is weghted over the probabilities of occuring in each of the states (t, c, s) and averaged over the stationary distribution of the number of sensors active at the beginning of a RAW slot. For the general case with an arbitrary number of groups M, we determine the average energy consumption by station \({{\bar {Q}}_{s}}\) per RAW period counted per one transmitted packet by summing \({{\bar {Q}}_{m}}\) over all groups and subsequent division by the average number of packets transmitted per RAW period \({\bar {v}}\).

5 NUMERICAL RESULTS

Suppose that 100-B packets are transmitted using the MCS8 in a 2-MHz channel, which corresponds to transmission duration Ts = 1064 μs, computed according to [36]. The RTS/CTS (request to send/clear to send) mechanism is not used; therefore, durations of successful and collisional attempts of transmission are identical. The maximum size of a contention window is 1024 and is taken from [36]. The energy values spent by a sensor to listen to an empty virtual slot Qidle, transmission attempt Qbusy, or its own transmission attempt QTX are 2.9, 91, or 160 μJ, respectively, and are taken from [37].

The analytical model described in Section 4 is used to solve the following optimization problems:

A. For given intensity λ, number of sensors N, and restrictions on the share of channel time consumed by the PRAW mechanism CTClim, find PRAW configuration (M, W0, Tslot) providing the minimum average packet delivery delay \({{\bar {D}}^{{\min }}}\).

B. For given intensity λ, number of sensors N, and restrictions on the channel time consumed by PRAW mechanism CTClim and the average packet delivery delay Dlim, find PRAW configuration (M, W0, Tslot) providing the minimum average energy consumption per transmitted packet \(Q_{s}^{{\min }}\).

C. For given intensity λ, number of sensors N, and restrictions on the average packet delivery delay Dlim and the average energy consumption per transmitted packet \(Q_{s}^{{\lim }}\), find the minimum channel time consumed by the PRAW mechanism at which these restrictions are fulfilled.

The channel time consumed by the PRAW mechanism is calculated by formula CTC = \(\frac{{M{{T}_{{{\text{slot}}}}}}}{{{{T}_{{{\text{per}}}}}}}\). When solving optimization problems, we discretize the continious value Tslot with a step Tc = 52 μs equal to the duration of an empty virtual slot. Thus, all three parameters (M, W0, Tslot) vary discretely.

On the basis of optimization results, we develop strategies of choosing the PRAW parameters minimizing the average delay or the average energy consumption per transmitted packet at different load determined by the intensity of packet generation and the number of sensors.

5.1 5.1. Optimization Problem A: Minimization of Average Delay

Using the full exhaustive search, we find PRAW configuration (M, W0, Tslot) minimizing the average delay under given intensity λ and number of sensors N and under restriction on the share of channel time consumed by PRAW mechanism CTClim:

$$\mathop {\min }\limits_{(M,{{W}_{0}},{{T}_{{{\text{slot}}}}})} \bar {D},\,\,\,\,{\text{s}}{\text{.t}}.\,\,CTC \leqslant CT{{C}^{{\lim }}}.$$

Figures 2a and 2b show the results of solving optimization problem A for N = 12 stations and different intensities λ: Fig. 2a demonstrates the dependence of the minimums of average delay \({{\bar {D}}^{{\min }}}\) on the restrictions on the share of channel time consumed by the PRAW mechanism, and Fig. 2b provides the average energy consumption per transmitted packet \({{\bar {Q}}_{s}}\). Analysis of the results shows that one solution to optimization problem A is PRAW configuration (MW0, Tslot) = (N, 1, Ts) corresponding to assigning a RAW slot with duration Ts equal to the packet transmission duration to each sensor. It is optimal for strict constraints on the share of channel time consumed by PRAW mechanism CTClim and high intensities λ. Another solution is some PRAW configuration with M = 1 and nontrivial values of W0 and Tslot. Such configuration is optimal for nonstrict constraints CTClim and/or small λ. There also exists transition value CTC* of allowed share CTClim increasing as the intensity λ increases where the optimal value of parameter M changes from M = N to M = 1.

Fig. 2.
figure 2

(a) Minimums of average packet delivery delay, (b) average energy consumption per transmitted packet, and (c) number of groups M corresponding to minimums of average delay over CTClim for N = 12 sensors and different values of intensity λ.

Let us turn to Fig. 2b demonstrating the dependence of the average energy consumption per transmitted packet on the restriction on the share of channel time consumed by PRAW mechanism CTClim. First of all, we note that all curves corresponding to moderate and high intensities (λ ≥ 1 s–1) at strict constraints CTClim occurs at level \({{\bar {Q}}_{s}}\) = QTX corresponding to the minimum energy value needed to transmit a packet. The minimum energy consumption is achieved at PRAW configuration (M, W0, Tslot) = (N, 1, Ts), because each sensor, to which its own RAW slot is assigned, spends no energy on listening to the channel and immediately performs a packet transmission attempt, which appears to be successful due to absence of contention. During transition through the CTC*, the duration of the RAW slot increases, and within it there occur attempts of transmissions from all active sensors, because the number of groups changes from M = N to M = 1. Sensors begin to spend a significant amount of energy on listening to other sensor’s transmissions and on collision; therefore, near CTC* we observe a sharp jump in the curves of average energy consumption per transmitted packet. As CTClim increases further, we see a decline, because allocation of a larger share of channel resources promotes a decrease in the period and, therefore, a decrease in the probability of packet generation for the period; therefore, sensors probably listen less to other sensor’s transmissions and spend less energy on collisions.

Let us find out why configurations with M = N and M = 1 turn out to be optimal from the point of view of average delay. For this purpose we study Fig. 3, which shows the solutions to optimization problem \(\mathop {\min }\limits_{{{W}_{0}}} \bar {D}\) obtained for each fixed pair of values (M, Tslot) by varying parameter W0 for N = 12 stations, intensity λ = 10 s–1, and CTC = 0.1 close to the transition one. Because Tper and Tslot are associated through MTslot = CTCTper, all curves begin with Tper corresponding to a RAW slot of minimal duration sufficient to transmit a packet, Tslot = Ts. The values of the system throughput Th = \(\frac{{{\bar {v}}}}{{{{T}_{{{\text{per}}}}}}}\) (Fig. 3a) is in inverse proportion to the average delay, because by the Little formula, \(\bar {D}\) = \(\frac{{{{T}_{{{\text{per}}}}}N}}{{{\bar {v}}}}\)\(\frac{1}{\lambda }\). In Fig. 3a, as Tper increases, curves Th either fluctuate in the case when M < N or decrease in the case when M = N. The latter is caused by the fact that each sensor transmit a packet for one RAW period for sure; therefore, the average number of transmitted packets \({\bar {v}}\) depends only on the probability of packet generation for the period, and the variation in \({\bar {v}}\) turns out to be far less than the variation in the value of Tper in the denominator of Th. To analyze the oscillations of the throughput, we go to Fig. 3b demonstrating the dependence of the average number of packets transmitted per RAW period on period duration Tper. Curves \({\bar {v}}\) have a stepwise shape: the average number of transmitted packets increases sharply when the duration of a RAW slot increases so that it includes one more packet transmission attempt and remains almost unchanged in the opposite case. At points of sharp increase in \({\bar {v}}\), there are local maximums in Th = \(\frac{{{\bar {v}}}}{{{{T}_{{{\text{per}}}}}}}\): a sharp growth in the numerator is accompanied by a slow increase in the denominator.

Fig. 3.
figure 3

(a) Throughput and (b) average number of packets transmitted per RAW period corresponding to minimums of delay over duration Tper of RAW period for N = 12 sensors, intensity λ = 10 s–1 and share of channel time consumed by PRAW mechanism CTC = 0.1. The average delay is minimized by varying the parameter W0 at fixed M and Tslot.

Figure 3b shows that division of the RAW interval into M < N RAW slots leads to a decrease in the average number of packets transmitted per RAW period: the smaller M, the higher the corresponding curve at any Tper. One of the reasons for such behavior is the channel downtime at the end of each RAW slot, because sensors do not perform packet transmission attempts passing its boundary. Here, for any configuration with M < N there exists a nonzero probability of not transmitting all available packets for a RAW period, for instance, because each RAW slot is assigned more than one sensor the packets from which may get into collisions at transmission. At a configuration with M = N, per one RAW period all available packets are transmitted for sure; therefore, the curves with M = N appear to be higher than the other curves with M < N in Fig. 3b. However, if at the beginning of a RAW slot the sensor has no packet to transmit, in the case of configuration with M = N, the channel has a downtime during each of the RAW slots assigned to that station. Thus, a larger number of groups M corresponds to a larger time of channel downtime possible at low intensities. Therefore, at low intensities λ and short periods Tper at which the probability of packet generation for the period is small, the minimum of delay is at the configuration with M = 1. At high intensities λ and long periods Tper (corresponding to strict constraints CTClim), almost all sensors turn out to be active with a high probability; therefore, the configuration with M = N is optimal.

Let us find the optimal durations of RAW slot Tslot corresponding to the configuration with M = 1. For this purpose, we go to Fig. 4 demonstrating the dependence of durations of RAW intervals Traw = MTslot corresponding to parameters M and Tslot providing the minimum average packet delivery delay \({{\bar {D}}^{{\min }}}\) on the restriction on the share of channel time consumed by the PRAW mechanism. Note that at restrictions CTClim less than CTC*, the PRAW configuration with M = N is optimal; therefore, all curves Traw corresponding to moderate and high intensities (λ ≥ 1 s–1) appear at level Traw = NTs under strict constraints. Near CTC* we observe a sharp decline in curves Traw corresponding to transition from the optimal configuration with M = 1 for moderate and high intensities: as the value of CTC* is reached, period Tper, along with the probability of packet generation during the period, decreases so much that the packet transmission within a single (M = 1) RAW slot becomes optimal in terms of delay; in this case interval Traw = Tslot reduces approximately twice for intensities λ = 10 and 20 s–1.

Fig. 4.
figure 4

(a) Durations of RAW intervals Traw over CTClim and (b) minimums of average delay of delivering packet \({{\bar {D}}^{{\min }}}\) over Tslot for N = 12 sensors and different intensities λ.

As the value of CTClim increases further, curves Traw have a stepwise shape: the regions of rapid decline are substituted for the regions of constant values. To explain this dependence, we fix configuration (1, W0, Tslot) optimal for some restriction CTClim lying in the region of constant values Traw and for an intensity λ and see how assignment of a larger share of channel time affect the values related with it. Two values contribute to the variation in the average number of packets transmitted per period \({\bar {v}}\): the probability of packet generation during the period, responsible for the average number of sensors active at the beginning of the RAW slot and for the channel access, and the probability of packet transmission during the RAW slot. As CTClim increases for fixed configuration (1, W0, Tslot), we have a decreasing duration of period Tper, which reduces the probability of packet generation during the RAW period, but not the probability of their transmission, because the duration of RAW slot remains unchanged. Thus, a variation in the average number of packets transmitted during RAW period \({\bar {v}}\) appears to be far less than the variations in period duration Tper; therefore, as CTClim increases, the delay minimums are still reached with the same configuration (1, W0, Tslot). However, for an even larger increase in CTClim, period duration Tper and, correspondingly, the probability of packet generation per RAW period decrease so much that the RAW slot of duration Tslot contains, with a high probability, a larger number of potential attempts of packet transmission equal to Ts in their duration than the number of sensors active at the beginning of the RAW slot. To avoid extra consumption of channel resources, duration of the RAW slot decreases by a value equal to the duration of packet transmission Ts.

Thus, after the transition value of CTC*, as CTClim increases, the regions of constant values Traw in Fig. 4a are substituted for a sharp decrease by a value approximately equal to Ts. Here, the durations of RAW slot Tslot given in Fig. 4a are quasioptimal from the point of view of average delay, because, as we show in Fig. 4b, the values of average delay close to the minimal one are reached for a rather broad range of values of Tslot.

5.2 5.2. Optimization Problem B: Minimization of Average Energy Consumption under Restrictions on Average Delay

Using the full exhaustive search, we find PRAW configuration (M, W0, Tslot) minimizing the average energy consumption per transmitted packet under given intensity λ, number of sensors N, and restrictions on the share of channel time consumed by the PRAW mechanism CTClim and average packet delivery delay Dlim:

$$\mathop {\min }\limits_{(M,{{W}_{0}},{{T}_{{{\text{slot}}}}})} {{\bar {Q}}_{s}},\,\,\,\,{\text{s}}{\text{.t}}{\text{.}}\,\,\bar {D} \leqslant {{D}^{{\lim }}},\,\,\,\,CTC \leqslant CT{{C}^{{\lim }}}.$$

Analysis of the results of solving problem A showed that the minimums of average delay are reached when we use PRAW configuration with M = N or M = 1. Because PRAW configuration (N, 1, Ts) provides the minimum energy consumption per transmitted packet, it makes sense to pose in problem B only such restrictions on Dlim under which PRAW configuration (N, 1, Ts) does not provide \(\bar {D}\)Dlim, because in the opposite case the solution to problem B is trivial: (MW0, Tslot) = (N, 1, Ts). Figure 5 demonstrates the results of optimization problem B for restrictions on the average delay of 10 and 20 ms, insufficient for transition to solution M = N under strict CTClim.

Fig. 5.
figure 5

(a, b) Minimums of average energy consumption per transmitted packet and (c, d) number of groups M corresponding to these minimums over CTClim for N = 12 sensors, restrictions on the packet delivery delay Dlim = (a, c) 10 and (b, d) 20 ms and different intensities λ.

Let us fix configuration (M, W0, Tslot) optimal for some restriction CTClim and intensity λ and see how allocation of a larger share of channel resources affect its variation. As CTClim increases for fixed configuration (M, W0, Tslot), period duration Tper decreases, which leads to a decrease in the probability of packet generation per RAW period and, correspondingly, to a decrease in average number of packets \({\bar {v}}\) transmitted per RAW period. However, such a decrease in the duration of Tper does not decrease the probability of packet transmission, because the duration of RAW slot Tslot and the number of groups M remains unchanged and the contention for the channel access inside the RAW slot can only decrease. Thus, allocation of a larger share of channel resources, that is, an increase in CTClim reduces the average delay putting it away from restriction Dlim to the smaller side, because period duration Tper entering the numerator in average delay formula \(\bar {D} = \frac{{{{T}_{{{\text{per}}}}}N}}{{{\bar {v}}}} - \frac{1}{\lambda }\) decreases more sharply than average number of transmitted packets \({\bar {v}}\).

On the other side, the goal of optimization problem B is in minimizing the energy consumption per transmitted packet under restriction on average delay; therefore, a deviation from Dlim obtained as CTClim increases allows changing the parameters decreasing \({{\bar {Q}}_{s}}\) but capable of increasing \(\bar {D}\). M is such a parameter: when we use the RAW mechanism with a large number of RAW slots with constant duration Tslot of each of them, the energy consumption decreases, because each RAW slot is assigned less sensors, and the sensors themselves are in sleep mode for a larger part of the period and listen to less other sensor’s transmissions. However, an increase in M, as is shown by the analysis of the results of problem A, increases the average delay. Thus, less strict constraints CTClim under a fixed constraint on average delay Dlim allow using more RAW slots: an increase in CTClim in the optimization problem B increases M, which is shown in Figs. 5c and 5d. Moreover, less strict constraints Dlim that also allow using the RAW mechanism with a larger number of RAW slots correspond to less energy consumption and the constraints themselves may be fulfilled at smaller CTClim, which can be seen in comparison of the corresponding curves for Dlim = 10 ms and Dlim = 20 ms in Fig. 5.

Note also that the curves of the average energy consumption per transmitted packet \({{\bar {Q}}_{s}}\) at further increase in CTClim get to \({{\bar {Q}}_{s}}\) = QTX corresponding to PRAW configuration (N, 1, Ts) providing the minimum energy consumption per transmitted packet.

5.3 5.3. Optimization Problem C: Minimization of Channel Time Consumed by the PRAW Mechanism under Restrictions on Both Metrics

Using the full exhaustive search over configurations (M, W0, Tslot) and binary search over CTC, we find the minimal channel time consumed by the PRAW mechanism sufficient for servicing packets generated in each of the inactive sensors with intensity λ with average packet delivery delay not exceeding Dlim, and average energy consumption per transmitted packet not exceeding \(Q_{s}^{{\lim }}\):

$$\mathop {\min }\limits_{(M,{{W}_{0}},{{T}_{{{\text{slot}}}}})} CTC,\,\,\,\,{\text{s}}{\text{.t}}{\text{.}}\,\,\bar {D} \leqslant {{D}^{{\lim }}},\,\,\,\,{{\bar {Q}}_{s}} \leqslant Q_{s}^{{\lim }}.$$

Figure 6 demonstrates the results of solving optimization problem C. At low intensities λ the average number of sensors active at the beginning of RAW slot is small; therefore, each sensor, with a high probability, transmits its packet per one RAW period consuming a small amount of energy during this process. Therefore, even for low CTC the restrictions on both metrics are fulfilled. As the intensity λ increases, the average number of sensors active at the beginning of the RAW slot grows; we can reduce this number by decreasing the duration of Tper. This, in its turn, is possible by varying one or several parameters in formula Tper = \(\frac{{M{{T}_{{{\text{slot}}}}}}}{{CTC}}\). In this case we allocated a large share of channel resources CTC, because, as M or Tslot decreases, the probability of packet transmission per RAW slot also decreases.

Fig. 6.
figure 6

Minimums of CTC satisfying restrictions on average delay and average energy consumption per transmitted packet over intensity λ N = (a) 12 and (b) 24 sensors.

Following from the solutions to optimization problem A, the minimums of average delay are reached at configurations with M = N and M = 1. The values of CTC at which, for fixed intensity λ, the optimal configuration is the configuration with M = 1, marked by light vertical regions in Fig. 6, and the values of CTC at which the optimal configuration is the configuration with M = N groups are given in dark. For instance, for intensity λ = 10 s–1, the minimums of average delay are reached at M = N for CTC ≤ 0.1 and at M = 1 for CTC > 0.1. PRAW configuration (M, W0, Tslot) = (N, 1, Ts) provides the minimum energy consumption per transmitted packet and can, depending on CTC and λ, provide the minimum average packet delivery delay. If, furthermore, configuration (N, 1, Ts) at some intensity λ satisfies the restrictions on both performance metrics, then, as we further increase the intensity, the growth in the corresponding curves depends only on the restrictions on the average packet delivery delay and is independent of the restrictions on the average energy consumption (merging of curves for Dlim = 50 ms in Fig. 6). Note also that the CTC minimums for N = 24 sensors in the cases when the packet generation intensity takes moderate and high values (λ ≥ 1 s–1) appear to be approximately two times larger than the minimums for N = 12 sensors, which allows making a conclusion that input parameter N linearly affects CTCmin.

6 CONCLUSIONS

In this paper we studied the PRAW mechanism that allows satisfying the restrictions to the quality of servicing applications of the IoT. We modify the analytical model from [23] for a more accurate estimate of the probability of generating new packets and use it to find the optimal PRAW parameters corresponding to the minimums of average delay or average energy consumption per transmitted packet and the minimum values of the share of channel time consumed by the PRAW mechanism at which the given restrictions on the average delay and average energy consumption are fulfilled.

The analysis of the optimization results allowed providing the following recommendations to the choice of the number of groups M, the minimal size of the contention window W0, and duration of the RAW slot Tslot. When the PRAW mechanism is assigned a small share of channel time CTC, the minimums of average delay are reached at PRAW configuration (MW0, Tslot) = (N, 1, Tslot) optimal for high intensities (λ > 1 s–1) or at PRAW configuration (M, W0, Tslot) = (1, W0, Tslot) with a long RAW slot including several packet transmission attempts optimal for moderate and low intensities (λ ≤ 1 s–1). As the restrictions on CTC is weakened, we have a transition from configuration (N, 1, Ts) to configuration (1, W0, Tslot) for high intensities (λ > 1 s–1), and, moreover, the duration of RAW slot at configuration (1, W0, Tslot) decreases for all intensities.

A lower energy consumption per transmitted packet is achieved at the largest M satisfying the restriction on the average delay, because in this case the largest number of sensors get to sleep mode and save energy during other sensor’s RAW slots, and inside each RAW slot, there is a reduced contention for channel access and packets are transmitted with a higher energy efficiency.

The minimum share of channel resources CTCmin needed for the PRAW to satisfy the restrictions on the delay and energy consumption per transmitted packet increases as the intensity grows. However, at sufficiently large intensity values, configuration (N, 1, Ts) providing minimum energy consumption also corresponds to the minimums of average delays; therefore, at high intensities the restrictions on the energy consumption do not affect determining CTCmin.