# Multihop Latency Model for Industrial Wireless Sensor Networks Based on Interfering Nodes
## 2 TSCH and RPL Network Deployment  
The TSCH medium access method has advantages in industrial environments, thanks to its deterministic operation and frequency hopping mechanism. To achieve this determinism, TSCH networks need to maintain precise time synchronization, and thanks to the scheduling shared by the entire network, the equipment can transmit information without the probability of collision with other messages. The resources to be managed through this planning are the timeslots, a series of slots into which the time space is divided, giving enough time to transmit a message of the maximum size defined in the standard and to receive an acknowledgement confirming that the message has been received correctly. To maintain this synchronization throughout the lifetime of the network, all nodes periodically send beacon messages, called Enhanced Beacons (EBs). The parameter sent in the EBs to perform the synchronization is known as Absolute Slot Number (ASN) and represents the absolute value of the slots that have passed since the network was initiated. In this way, all nodes that are synchronized with the TSCH network share the same time source, obtained thanks to the ASN parameter. To maintain this time synchronization, each time a node receives a new EB message, it compares its ASN value with the one it has received and compares the possible deviations that may occur. According to the operation defined in the IEEE 802.15.4 standard, BS messages are transmitted with a period fixed in the configuration of the devices. Due to the frequency hopping mechanism and the fact that the size of the slotframes has a prime value, each time a BS message is sent, a different channel will be used, following a frequency hopping pattern defined in the device configuration. To calculate the frequency used in each channel, from the ASN value, the following function is proposed by the standard:  
\[f=F\Big{\{}\Big{(}ASN+ch_{offset}\Big{)}\cdot mod(C)\Big{\}} \tag{1}\]  
On the other hand, the nodes waiting to synchronize start the scanning process. Since the BS messages are transmitted on different frequencies following a certain hopping pattern, the scanning process is also performed on different frequencies, but the scanning frequency is changed randomly. Figure 1 depicts the slotframes of two nodes during the TSCH synchronization phase using a total of four channels, both for normal operation and for the scan phase. As can be seen, the duration of scanning is much longer than the time in which a message is transmitted by the already connected nodes. The diagram also shows different cases where synchronization may fail. These failed synchronization attempts may be due to the fact that during the time the node is listening to a channel there is no message being transmitted or because the message is transmitted on a different frequency from the one the node is listening to. It is also interesting to note that, during the scanning process, the node keeps the radio always active on different channels until it receives the beacon, while nodes already synchronized can turn off their radio in the inactive slots to reduce energy consumption. The configuration of the devices involves several parameters that affect this synchronization process, such as the total number of channels used, the number of channels being scanned, and the scan time of each channel or the frequency hopping pattern. In the 2.4 GHz band, a maximum of 16 channels can be used, which may be different from the channels being scanned. The configuration of these parameters is not detailed in the standard, so a wrong configuration can lead to a very long synchronization time or even an inability to synchronize at all. Once the new devices have been synchronized in TSCH, the nodes will follow the same pattern of active and inactive slots within the slotframe, thus reducing their work cycle with respect to the scanning phase. However, the nodes do not yet know the network topology, so it is necessary for them to receive a DIO message from RPL.