## 4 Results
### Results Comparison  
Three tests are evaluated, the two previous ones and one additional one, in which nodes 7 and 8 have a higher voltage level. The time it takes for a frame generated by a node to reach the controlling node was analyzed. In the column diagrams in Figure 23, you can see how the sending time of a frame varies when no algorithm is applied, when the Kruskal algorithm is used, and when the Dijkstra algorithm is applied. In all the tests, it is evident that the sending time from node 1 to node 7 decreases when no algorithm is applied, and the communication between the nodes and the controller is carried out using the initial default route. The decrease in time is due to the lower number of hops. In the first test, as seen in Figure 23a, when implementing the Kruskal algorithm, a decrease in time is observed for nodes 1, 2, 3, and 5 compared to when no algorithm is applied. However, the times of nodes 4 and 6 increase considerably. This change is because, in this test, the nodes have similar voltage values, which causes them to send information along a path further away from the controller than the initial path. This increases the number of hops and, therefore, the sending time of a frame. Applying [PERSON]'s algorithm shows a decrease in the sending time for all nodes, except node 7, compared to the times obtained without applying any algorithm. When comparing these times with those obtained using the Kruskal algorithm, it is observed that lower or similar values are obtained. For node 7, it is noted that the sending time is identical in the three cases because this node is the closest to the controller and only makes one hop to reach it. In the second test, as seen in Figure 23b, implementing [PERSON]'s algorithm channels the nodes' traffic to nodes 3 and 4, which have a higher voltage. Because of this, it takes more time for other nodes to send a frame to the controller. Regarding [PERSON]'s algorithm, the results are consistent with the first test. In the third test, as seen in Figure 23c, node 7 and the controller node have the highest voltage. With the application of the Kruskal algorithm, it is observed that the times used by each node are similar to when no algorithm is applied. As in the previous test, the algorithm directs traffic to the nodes with the highest voltage. In this case, almost all generated frames must pass through node 7, closest to the controller. In this test, when using the Dijkstra algorithm, the same time values are observed as in the previous tests. In  
Figure 22: Sequence diagram 6: Test 2.2 Default route generated by the Dijkstra algorithm where nodes three and four have higher battery levels. general, this algorithm provides the best results because, in most cases, the nodes require less time to send a frame to the controller. Finally, the sum of the transmission times of each node is made, obtained in each test and with each algorithm. In this way, it can be analyzed more precisely if there is a decrease in transmission time with the application of each algorithm. Figure 23d shows how implementing both algorithms reduces the total sending time. In general terms, it stands out that the algorithm that yields the best results is [PERSON]'s because it presents lower sending times individually, node by node, and as a whole. This is because, in this scenario, the nodes communicate directly with the controller, so the delay time is the same. In addition to evaluating the sending time, comparisons are made regarding the number of hops a frame takes to reach the controller. This hop count is carried out for the three tests reviewed previously, as shown in Figure 24. When the [PERSON] algorithm is implemented in the first test, as shown in Figure 24a, it is observed that nodes 4 and 6 present the most significant number of hops, with similar values between them. In contrast, nodes 5 and 7 make only one hop to reach the controller. Applying [PERSON]'s algorithm in this test results in all nodes needing a single hop to reach the controller.