# Time Management in Wireless Sensor Networks for Industrial Process Control
## 3 Results
### Time Synchronization  
The IEEE 802.15.4 standard defines a timing template (macTimeslotTemplate) that must be followed by every transmission and reception over wireless. Figure 5 illustrates a two-way communication between two wireless devices, the first being the initiator of the communication. A timeslot is defined as the interval between T\({}_{0}\) and T\({}_{9}\), with a standard duration of 10 milliseconds. Assuming both devices are time-synchronized, according to the transmission template, the actual data frame transmission commences at T\({}_{2}\), which, as per the standard, is exactly 2120 microseconds from the start of the timeslot (T\({}_{2}-\)T\({}_{0}\)). To ensure a correct reception, the second wireless device will enter the reception mode earlier, specifically at T\({}_{1}\), which is exactly 1020 microseconds from the beginning of the timeslot (T\({}_{1}-\)T\({}_{0}\)). The device will then be in reception mode between T\({}_{1}\) and T\({}_{3}\), waiting for a transmission to begin. This interval is fixed at 2200 microseconds. If no transmission begins in this interval, the receiving device will enter the idle mode. T\({}_{4}\) signals the completion of the data frame's transmission/ reception if a transmission begins in the T\({}_{3}\rightarrow\)T\({}_{1}\) interval. Subsequently, the receiving device will send an acknowledgment frame to the transmitting device exactly after T\({}_{6}-\)T\({}_{4}\), which is set at 1000 microseconds. The first device will enter  
Figure 4: TSCH CCA operation mode following the proposed slotframe structure. the reception mode at T\({}_{5}\) and wait for the acknowledgment frame's transmission until T\({}_{7}\). The end of the transmit/receive process for the acknowledgment frame and the conclusion of bidirectional communication are marked by T\({}_{8}\). Both devices have an additional T\({}_{9}\)\(\rightarrow\) T\({}_{8}\) time until the end of the timeslot for processing and other operations, if needed. Strict adherence to the transmission and reception pattern is essential for the proper functioning of the wireless network, particularly in the time synchronization between wireless nodes. Time synchronization occurs between the network coordinator, which acts as the time source, and each wireless node associated with the network. For this purpose, the enhanced beacon frame is used, which the coordinator transmits in the first timeslot of the group of 50 timeslots. Figure 6 illustrates a synchronization procedure between two wireless nodes, with the top one being the network coordinator and the bottom one being a wireless node that is associated with or joining the network. At T\({}_{1}\), the wireless device enters the reception mode and awaits the transmission of the beacon data frame. At time T\({}_{2}\), in accordance with the timeslot template, the coordinator initiates the transmission of the enhanced beacon frame. By time T\({}_{3}\), the coordinator has completed the transmission and concurrently, the wireless device completes its reception of the frame. Subsequently, the device processes the frame by extracting time-related information from the enhanced beacon frame, including the slot frame, the time, and the specific fraction of time when the transmission started. At time T\({}_{4}\), the wireless device updates its timeslot and timeslot group timers. Consequently, at time T\({}_{5}\), the wireless device will generate an interruption to indicate the commencement of the next timeslot, thereby maintaining synchronization with the network coordinator. Synchronization precision remains a key challenge in WSNs. Ref. [20] demonstrated how hardware-assisted timestamp and drift correction can enhance accuracy with inex  
Figure 5: The timeslot template. Figure 6: The synchronization procedure. pensive hardware. Similarly, the LPSS protocol [21] achieves energy-efficient scheduling and synchronization by minimizing communication overhead and allocating distinct sync slots to reference nodes.