## 2 Related Work  
Currently, communications make individuals take part of a whole world. The Internet of Things (IoT) is a concept that includes people, communications protocols and devices for the purpose of easy interaction and countless applications. Due to the complexity of this type of scenario, WSNs are suitable for deployment and implementation. This is where control parameters, such as the management of resources and energy, traffic congestion, automation, device independence and quality of service, become relevant [14]. WSNs have a dynamically changing nature, because nodes operate in a wireless medium, and connections and disconnection are present. The nodes belonging to the WSNs have limited resources, are prone to failure, have limited memory and processing capacity and usually run on batteries. These features make the network performance a very important aspect when we need to compare different routing protocols. The work in [15] presents and analyzes key performance metrics that adequately evaluate WSNs in real time. The networks are deployed in different scenarios, most of them in extreme or demanding conditions. As a consequence, the quality of service, QoS, must be maintained over time, and the performance metrics are critical parameters in assessing the network. The authors propose a taxonomy performance where parameters, such as delay tolerance, capacity, reliability, energy efficiency and fault tolerance, are established. These metrics are monitored in order to measure and maintain controlled levels of performance parameters. Previous works show the IEEE 802.15.4 standard as a suitable solution to bottlenecks problems in WSNs, specifically at the MAC layer level. The authors in [16], for example, conducted a study of performance metrics, such as throughput, packet delivery rate and end-to-end delay under a static scenario. The influence of these parameters on energy consumption is investigated. Two commonly used performance parameters in WSNs are energy and delay [17]. The end-to-end delay is an important metric that depends on media access techniques; thus, collisions and retransmissions directly affect delay and, therefore, network performance. A specific technique presented in [18] analyzes metrics, such as packet loss, delay and energy consumption, to quantify the quality of service with the aim of improving the capacity of the network. They explain a traffic control scheme effective at achieving an adequate topology management. Maintaining reliable and optimal routes will decrease packet loss. Here, energy consumption in the network plays an important role, because if the batteries of some nodes are depleted, the network topology will change, and the remaining nodes must be able to reconfigure the links rapidly in order to avoid packet loss. In [19], cost metrics are measured based on link quality for various link configurations that influence energy and topology efficiency. The authors analyze metrics, such as packet success rate, signal-to-noise ratio and power, in order to propose an efficient combined metric. A reliable routing protocol in WSNs is essential due to the versatility of these networks. In [20], the authors analyze metrics, such as end-to-end path reliability and the number of hops. Their work analyzes different routing algorithms based on link reliability models for each type of node. In [21], a routing protocol that guarantees the route with the shortest path while maintaining quality of service is designed. The route optimization is related to the ideal relay node position, and metrics, such as mean end-to-end delay and packet rate, under random scenarios are considered. A scenario with a single collector node is considered in [22]. For this topology, the authors calculate the delay and the probability to form routes in the routing tables. This allows costs to be assigned to the links depending on energy consumption, so that they achieve the network topology adaptations dynamically according to the energy of the nodes with reliable packet transmission.