# A TDMA-Based Access Protocol for Dense Networks with Moving Nodes for IoT Applications
## 4 Simulation Results  
In this section, the performance of the proposed protocol is evaluated for different simulation scenarios. In that context, a LoRa network simulator has been implemented using Python 3.7 on Spyder running macOS 12.1 Monteray with 2.2-GHz Intel Core i7 Processor. The simulator models the MAC operation of the proposed protocol in detail, while using only the absolutely necessary elements to represent the physical layer. Feeding the model with the values from Tables 1-3, and setting the number of simulation iterations to \(10^{4}\), we analyze the mean data latency in these life-like scenarios as the primary metric for the network performance. This metric measures the time that elapses from the initial  
Figure 3: Possible dead slots. LoRa message of the sink to the CH until the last node transmits its data. More specifically, the mean data latency (MDL) is calculated over all the numbers of simulation runs. For every case, we set the load and we store for every run the data latency. As the data latency is related to the ID of the last node that has data to transmit, we opted to run every case for \(10^{4}\) runs in order to smooth out any discrepancies. \[MDL=\sum_{1}^{NumberOf\Runs}\Data\Latency\ForEveryRun/NumberOf\Runs\]  
Before we delve into the results and in order to enhance the readership of this work, we analyze the parameters used in the simulation testbed. The moving speed value was set to 25 m/s to cover the higher segment of mobile devices from automobiles to drones. Under the same rationale, the frequency of direction changes was also selective to be indicative for the number of times per second the processing unit of the object may end up changing the direction. While the most recent WuR transmitters have data rates well beyond 1 kb/s, we opted for this value so as to be consistent with the values from the work that we compare to the proposed protocol. All the sizes of the WuR messages are the minimum in order to transfer the required information of the protocol to the nodes. Finally, as stated above, the maximum range of the WuR was set to 9 km and for that reason every SF ring zone has a width of 1.5 km. In the following scenarios we compare the suggested algorithm with a direct transfer of the work in [6], amended appropriately to encompass moving nodes (TDMA-PL). In detail, the sink initiates the data transmission and requests data from the EDs by sending a LoRa message to the CH. The latter notifies the EDs with a WuB message \begin{table}
\begin{tabular}{c c} \hline \hline
**Wake Up Radio Settings** & \\ \hline WuR data rate (kb/s) [6] & 1 \\ \hline WuB packet size (B) & 2 \\ CH \(\rightarrow\) ED & \\ Time on Air (ms) [6] & 17 \\ \hline WuB packet size (B) & 3 \\ ED \(\rightarrow\) CH (broadcast) & \\ Time on Air (ms) & 24 \\ \hline Wake up radio data rate & 1 kb/s \\ \hline
**Other Parameters** & \\ \hline SF zone change (km) & every 1.5 \\ Guard Time (GT) (ms) [6] & 6 \\ Number of EDs & 9, 99, 999 \\ Number of CHs & 1 \\ Number of SNs & 1 \\ Number of Clusters & 1 \\ \hline
**ED moving parameters** & \\ \hline Moving Speed (m/s) & 25 \\ Direction change Frequency (times/s) & 8 \\ \hline
**Power measurement of an ED in various states at 3.3 V [6]** & \\ \hline SX1276 transmitting at +14 dBm (LoRa mode) & 250 mW \\ Wake-up receiver listening & 1.83 μW \\ Wake-up receiver (receiving + address decoding) & 284 μW \\ GPS tracking & 125.4 mW \\ GPS signal acquisition & 85 ms \\ \hline Lithium polymer battery & 1200 mAh \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Variables and parameters. for the scheduling of LoRa messages (TDMA). Using GPS, each ED calculates its position and sends LoRa messages back to the sink using the time slot corresponding to its id and the SF according to its calculated geographic position (e.g., ED with ID = 5 and SF 7 sends its LoRa packet in ToA(7) \(\times\) 5 ms). In case the ED has changed its position to a higher S, then it faces a packet loss.