## 4 Performance Evaluation
### Hidden-Terminal Topology
**(b)** Twelve devices. **(c)** Twenty devices. **(d)** Fifty devices. in RI-MAC, the sink is awake for long time intervals, allowing the backlogged devices to transmit to it. However, under these high loads, due to the high contention, the devices spend much more time resolving collisions. The figures indeed confirm the supposition that, in RI-MAC, under heavy and moderate loads, the sink stays awake for longer time intervals. Note that for the 50-device topology, under a high load (inter-arrival times below 2 packet/s), the sink in RI-MAC is awake most of the time, while for MAR-RiMAC, even for the highest depicted load (0.9 packet/s, which is more than one packet per cycle per device), the sink is awake only slightly more than 10% of the time (11%). We further examine the protocol behavior under a high load, and for each successfully transmitted packet, we record how many unsuccessful tries (collisions) it has experienced. Specifically, Figure 13 depicts the probability density function (PDF) of the number of transmission attempts that each packet has experienced before being transmitted successfully for the 50-device topology and for an inter-arrival time of 0.9 packet/s. Recall that in MAR-RiMAC, each packet is transmitted only once when the sink polls the device for transmission, and in case of contention, the resolution is performed on the \"Ready to Receive\" (RtR) beacons, which are very short (i.e., their transmission time is significantly shorter than that of packet transmission). Accordingly, in the figure, we show the number of \"Ready to Receive\" (RtR) beacons sent before the sink polls the device for transmission. Figure 12: Hidden-terminal topology: (**a**) The sink’s mean duty cycle for four devices. (**b**) The sink’s mean duty cycle for 50 devices. (**c**) The mean duty cycle excluding the sink for four devices. (**d**) The mean duty cycle excluding the sink for 50 devices. Surprisingly, in Figure 13, it is evident that the packets in RI-MAC experience fewer transmission attempts than in MAR-RiMAC, which seems counterintuitive because of the fact that the duty cycle of the latter is much shorter for the depicted load. However, two important properties need be recalled. First, as previously mentioned, the transmission duration of RftR in MAR-RiMAC is much shorter than the packet transmission duration in RI-MAC. In addition, their transmission attempts are back to back with no gaps or contention intervals (recall that if more than \(K\) devices have attempted to transmit a reservation, the sink sends an RftR at the following slot, which immediately invites the colliding devices to randomly select whether to attempt again in the following slot). Consequently, the time duration required to resolve multiple collisions between the RftRs in MAR-RiMAC is significantly shorter than a packet transmission, all the more so when considering the contention intervals incurred by the RI-MAC contention mechanism. Second, in RI-MAC, after each collision, the sink increases the window size until successful transmission or up to the maximal contention window size (256 in the simulations, which provides good results). Since the sink cannot know how many backlogged devices there are at any time instance, the window is reset only when the sink goes to sleep. Accordingly, on each cycle, the window in RI-MAC is set to a size that balances between too short, resulting in repeated collisions, and too long, eliciting long idle intervals. Respectively, on each cycle, after several collisions, the contention window stabilizes on a large enough length that allows low collision probability at the expense of longer contention intervals (longer idle intervals). Accordingly, the sink is awake for long time intervals such that not all backlogged devices are transmitting their RftRs concurrently while they are waiting for the sink to wake up. Many of them wake up while the sink is already awake, and the announced window size in the sink's Rft is sufficiently large to reduce the number of collisions.