# Bell-X, An Opportunistic Time Synchronization Mechanism for Scheduled Wireless Sensor Networks
## 5 Simulations and Testbeds  
Different simulations have been carried out to achieve the performance analysis in comparison with the state of the art beacon advertising methods in order to evaluate the proposal method. To be able to assess the viability of a transmission mechanism, it is important to consider different performance aspects, such as the probability of success for both TSCH synchronization and RPL connection, the energy consumption, related to the traffic generated, or the time that a new node takes in obtain the synchronization when compared to other approaches. All of the different protocol stack variations have been implemented based on the Contiki OS, using TSCH as the proposed medium access solution. Contiki includes the Cooja simulator, which allows for the behaviour of different types of WSN platforms to be simulated in order to evaluate the Contiki protocol stack. The result that was obtained in [6] showed that a dynamic mechanism could improve the scanning process during the phases of network deployment, reducing the connection times and improving energy consumption. For this reason, these simulations are focused on demonstrating the correct functioning of the proposed mechanism during the steady state phase of the network, when the RPL Trickle Timer has reached its maximum value and all of the nodes of the topology maintain a stable connection. The chosen topology is formed by a meshed network of 16 nodes, in which the upper left node is the coordinator that starts the network. This type of regular topology has been chosen so that the results are not affected by variations in the number of neighbours, since with more nodes transmitting beacons, synchronization is achieved faster. If random topologies were used, the results would be influenced by different external factors that would not allow for the different simulated configurations to be compared on equal terms. Figure 8 shows a capture of the simulated topology in Cooja for each of the configurations under study. Table 3 summarizes those physical parameters that control the simulation. The nodes are 40 m apart from each other to favour multi-hop communications. For each configuration, 15 simulations have been carried out, with a maximum duration of one hour. Figure 8: Physical topology for all simulations. Table 4 shows all of the parameters that are involved in the synchronization and connection process. For the TSCH scheduling, the Orchestra mechanism has been chosen, since it allows for creating a dedicated slotframe for different traffic planes. Regarding the RPL protocol, during the simulations that were carried out in [6], it was observed that the Trickle Timer reached very high values that hindered the process of discovering the RPL topology, for this reason, a Doublings value has been chosen that allows the maximum value of the RPL Trickle timer for each of the configurations to be reduced. Eight different types of simulations have been carried out, each with a different configuration and repeated 15 times with different seeds, in order to compare the behaviour of the proposed mechanism with the state of the art procedures. Performing a total of 15 repetitions allows for obtaining an average value of the results to be able to compare the different configuration proposed. The simulations consist of two differentiated phases. In the first phase, the 16 nodes of the network must be synchronized and correctly connected. Since this phase corresponds to the initial deployment of the network, a fixed beacon transmission period has been configured during the first four minutes, so that all of the nodes connect quickly, but consume a lot of energy. After these four minutes, the beacon transmission period will function normally depending on the configuration being simulated. This first phase will not be considered in the analysis of results and it is only used to leave the network in a stationary state. During the second phase, simulations run until minute 20, when all of the nodes have reached the steady state.