**4. Conclusions**

Unlike other types of wireless networks, Wireless Sensor Networks (WSNs) involve low-cost and low-processing devices, which send information to a collector node or base station (coordinator node). Due to the small size of nodes, the saving of energy consumption is vital since it is very difficult to recharge batteries and these networks aim to achieve maximum efficiency in the delivery of information in the harshest environments.

This paper has proposed the design and implementation of a simple and easy to develop energy model, which aim is to observe locally and globally the energy of the nodes in a network under almost any routing protocol. It has been verified that this model yields clear and concrete results for the main tasks performed by a node in the network. Based on this analysis, it could detect some anomalous behavior and know exactly in which phase of execution a problem is happening.

Another fundamental contribution is the analysis of performance metrics, not so common or obvious, because during the transmission of information, the processing of routes, and the observation of the means of communication, the nodes present valuable information when some strange behavior is occurring and this is immediately reflected in metrics such as: retransmissions of packets, listener retries to the communication channel, delays, overload of control packets, hop numbers, valid routes to a destination, among others. These metrics are directly related to energy and to the application of the proposed model. Changes or different behaviors are clearly observed in specific areas of the network.

The MPH protocol works very well in terms of processing, efficient information delivery, and low energy consumption, maintaining route redundancy. The detailed energy model shows that AODV and DSR have route backups and extensive routing tables, therefore a node can reach almost any point in the network. The model also shows that ZTR has low redundancy, is prone to failures, and has a small number of valid routes. However, it is simple, fast, and consumes a small amount of energy. The combination of a hierarchical topology with auto-configuration mechanisms and maintenance of the MPH protocol makes the nodes capable of optimizing network processes, reduce delays by up to 25%, take short routes to the destination, and reduce network overload even in a 30%. All this is reflected in the successful delivery of information. In addition, the proposed model allows us to understand that between MPH and LEACH and PEGASIS there is only a difference of 3% and 2% energy savings for the last two protocols. Thus, the model analyzes the energy impact of each type of energy for optimization of the algorithm in various protocols of the literature [5–10]

**Author Contributions:** C.D.-V.-S. developed the energy algorithm, built the simulator, prepared and executed the simulations, interpreted and analyzed the results, designed the methodology and drafted the manuscript. C.M.-P. supervised the research methodology and the approach of this work, he performed the formal analysis. J.A.N.-F. reviewed, interpreted and drafted the simulation results, he also strongly contributed to the design of the energy scheme. R.V. was involved in the analysis of the energy model under routing protocols and he run validation, he reviewed the methodology and the manuscript. A.R.-S. worked in the formal analysis and the manuscript. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Conflicts of Interest:** The authors declare no conflict of interest.
