# A TDMA-Based Access Protocol for Dense Networks with Moving Nodes for IoT Applications
## 4 Simulation Results
We should note here that term \(N12\) does not take part in the calculations as all the nodes that are inside the SF12 zone at phase one do not have the option to migrate to a higher SF zone but they are calculated in the mean value \(m/2\). \[[\text{SF}]=\frac{\sum_{1}^{N7}(ToA_{8}-ToA_{7})+\sum_{1}^{N8}(ToA_{9}-ToA_{8 })+\cdots+\sum_{1}^{N11}(ToA_{12}-ToA_{11})}{m/2} \tag{5}\]  
\[N7+N8+N9+N10+N11+N12=m/2 \tag{6}\]  
Taking into consideration all the above, we expect a higher mean data latency, related to the stationery case, by the factor [SF] which stands for a mean value for all the nodes that will get a higher SF. This factor is not the same as the aToA as contains the nodes that have migrated to a higher SF except those that were already at the SF 12 (we assume that they will not leave the simulation area). Contradictory though it may be, MOTILO manages to mitigate this increment by adding phase one of the protocol. Utilizing the knowledge of intentions for transmitting from phase one, nodes are able to schedule their transmission program eliminating empty time slots, resulting in lower values of mean data latency. Future work will investigate the analytic form of the [SF]. For a network with 9 nodes (Figure 4a) starting from random positions inside the testbed area, the mean data latency is shown in Figure 5a. The nodes move in an endless random pattern subjected to the parameters of Table 2. While the performance of the two TDMA protocols are almost identical (the second GPS measurement for the TDMA-2M as mentioned above helps to avoid lost packets) and at the levels of 1.6 s, the proposed protocol delivers a latency improvement starting from 31% and reaching 62% in case of a single node for transmission. The main advantage of the algorithm is that it spends time listening to the intentions of the nodes and then assigns slots only to the nodes that have data to transmit. Figure 4: Random placing of (**a**) 9, (**b**) 99 and (**c**) 999 EDs. As expected, when we add more nodes to the simulation (Figures 4b and 5b), the performance gap is widening as the MOTILO algorithm is able to achieve up to almost 85% lower latency for the lighter loads, while when all the nodes have data to transmit the gap closes up to 21%. For the same reasons as stated above, both TDMA variations have the same latency but the TDMA-2M avoids lost packets. Finally, in the last simulation we test MOTILO in highly dense network (Figure 4c) formations standing also as another point of segregation from existing protocols. As shown in Figure 5c, MOTILO retains the same performance characteristics versus the TMDA-based protocols. It is interesting though to point out that while in the previous two simulation scenarios the 2M protocol had a minuscule performance advantage versus the PL, in this scenario there is no visible difference between them. This is more probably due to the smaller covariance of the system due to the high enough number of nodes. Moreover, it is meaningful to examine the average packet loss during the implementation of the presented algorithms (TDMA-PL, TDMA-2M and MOTILO). Similarly to the mean data latency average packet loss (APL) is calculated over all the \(10^{4}\) runs in order to minimize any statistical errors. For every run, we calculate the packets that are not delivered due to node migration to higher SF Zones. The sum of all these packets is divided by the total number of runs for this metric. Again the  
\[\text{APL}=\sum_{1}^{Number\;Of\;Runs} Packet\;Loss\;For\;Every\;Run/Number\;Of\;Runs\]  
Figure 5: Mean data latency (s) under variable traffic load for LoRa networks with (**a**) 9, (**b**) 99 and (**c**) 999 EDs. In detail, Figure 6 shows the average number of lost packets per TDMA cycle when the number of network nodes varies from 9 to 999 nodes. We opted for the case of 100% loads (as our worst case scenario) as in all other network load values our algorithm significantly outperforms the other two algorithms.