## 4 Simulations
### Impact Analysis of Different Scheduling and Retransmission Techniques on EDETA-e Protocol
#### 4.2.1 Performance Evaluation
(**a**) Lost and duplicate data; (**b**) Delay; (**c**) Leaf nodes energy consumption; (**d**) CH nodes energy consumption. Figure 7: _Cont._  
CSMA comparisonIn these experiments, instead of scheduling a backup data transmission, a CSMA period is scheduled right after the nodes send their data. This allows the nodes that have not received an ACK to send their data again. Figure 8(a) shows how lost data packet ratio behaves given the different CSMA period lengths. With a CSMA period of 2.5 s, the packet lost ratio stays between 1.2% and 1.6%. However, when the CSMA time increases to 5 s, the packet lost ratio drops to less than 0.2%. Finally, increasing the CSMA period to 10 s does not offer much benefit, as it decreases the packet lost ratio to less than 0.1%. Figure 8(b) depicts the percentage of duplicate packets. As expected, the 2.5 s CSMA period has less duplicate data packets than the other alternatives, since there are less retransmissions given the small time scheduled for them. This lesser number of retransmissions also lead to a larger packet lost ratio as explained before. For the 5 and 10 s CSMA period, the percentage of duplicate data packets remains almost the same in all scenarios. Figure 8: CSMA comparison. Lost, Dup and Data delay. (**a**) Lost data; (**b**) Dup data; (**c**) Delay. One notes that the packet delay is heavily influenced by the CSMA period length. As can be seen in Figure 8(c), the larger the period length the bigger the delay is. The energy consumption of the CHs is also heavily influenced by the CSMA period length as shown in Figure 9(b). Although a CH changes to a low power consumption mode when it has received all the data from its nodes, the fact that there are more retransmissions produces lower packet lost but increases the energy consumption. Energy consumption of the normal nodes is also influenced by the CSMA period length although not as heavily as the CHs energy consumption. Figure 9(a) shows that in the scenarios with a 2.5 CSMA period there is less energy consumption than the other ones and there are not significant differences between 5 and 10 s scenarios. **Figure 9.** CSMA energy comparison. (**a**) Leaf nodes energy consumption; (**b**) CH nodes energy consumption. DAck _vs._ DCsma2.5 _vs._ DnoAck2 In this section, we compare the two previously studied alternatives, _i.e._, (i) delay-aware schedule with acknowledgement and delay-aware schedule with a 2.5 s CSMA retransmission period; and (ii) delay-aware schedule with two scheduled transmissions and no acknowledgement (DnoAck2). In terms of packet lost ratio, duplicate packets and packet delay, the DnoAck2 alternative behaves as shown in Figure 10. The lost packet ratio is the same as the DAck alternative since in both cases the data will be lost if both scheduled data transmission fail. However, DnoAck2 has a 100% duplicate data since each packet is sent twice. On the other hand, the delay of the DnoAck2 alternative is the smallest one of the three protocols. Figure 10: DAck _vs._ DCsma2.5 _vs._ DnoAck2. Lost, Dup and Data delay. (**a**) Lost data; (**b**) Dup data; (**c**) Delay. Figure 9: _Cont._  
In terms of energy consumption of the leaf nodes (Figure 11(a)), the DnoAck2 alternative has the biggest overhead since it transmits each packet twice. On the other hand, as shown in Figure 11(b), CH nodes using DnoAck2 have the lowest energy consumption. These nodes also have to transmit their data twice, but this extra energy consumption is compensated by the energy saving from not sending acknowledgements back, which also allows to make the communication faster. Hence, CH nodes can remain in low power state during more time. Figure 10: _Cont._