# Wireless Sensor Network Energy Model and Its Use in the Optimization of Routing Protocols
## 3 Analysis and Results under the Simulation Tool  
One of the objectives of this work is to assess critical metrics in WSNs. In this section, the performance of the MPH routing protocol is compared against three sensor network protocols: AODV, DSR, and ZTR. The performance metrics used for comparison are the total energy consumption, delay, overload, resilience, valid routes, and number of jumps. This analysis is performed to analyze the influence of these parameters on energy consumption. This is used to assess possible anomalies in a network or an area at risk of attack. The delay and energy consumption in a network are directly related to the complexity of the routing algorithms. When a routing protocol uses many algorithms and processes to send a packet, the sensor nodes will introduce long delays and incur in high-energy consumption. The MPH routing protocol is not only characterized by its hierarchical topology, but also by the origin touting and fast reconfiguration of its topology when faced to an unexpected change. This has to do with the resilience of the network (the network's ability to recover from unexpected changes). A routing protocol provides reliability when nodes exhibit in their tables (either routing or neighbor tables) valid routes, i.e., routes that have not expired or that have not been invalidated by a node disconnection. Overloading the routing protocol will affect the channel's occupation because it is constituted by the control packets that a routing protocol needs for the reliable delivery of information. The lower the overload, the lower the probability of collisions and, in turn, the lower the number of packet retransmissions. A small overhead ensures that the information will be delivered more quickly and reliably. For simulations, a grid layout with 22 nodes described in Figure 3 is considered. The nodes are located randomly in an area of 300 m \(\times\) 300 m and nodes have a coverage range of 15 m. A data rate of 250 kbps and a packet length of 22 bytes were taken. Table 3 shows the simulation parameters. Each node contributes a traffic of 10 packets per second. There are two coordinator nodes marked in red color. All network nodes can send packets to the coordinator nodes directly (one hop) or indirectly (multiple hops that form a route). There are nodes near to the coordinator and all other nodes must send packets through these nodes, causing them to drain their batteries faster because they constitute the network bottlenecks. Figures 4-9 show, for some well-known protocols in the literature, the energy types per crown for the distribution shown in Figure 3. These graphs show the numerical analysis for each type of energy described in the proposed energy model. A 24 h/7 day execution of 22 sensors was carried out in an area of 300 \(\times\) 300 m\({}^{2}\) of the university campus of Universidad Panamericana in Guadalajara, Mexico. A set of high-level wireless communication nodes CC2650 and CC2530, based on the IEEE 802.15.4 standard, were used. The space covered by the sensors is an area with trees, buildings, traffic of people and vehicles with both indoor and outdoor spaces. The distribution structure of the sensors is the one shown in Figure 3. We aimed at taking six representative protocols in WSN such as: AODV, DSR, LEACH, PEGASIS, MPH (proposed protocol), and ZTR. Crowns were formed by the proximity of the nodes with respect to the coordinating node. A crown has the characteristic that the nodes belonging to it have similarity with respect to their performance parameters, i.e., with approximately the same distance to the coordinating node, the nodes have more or less the same traffic and forwarding packets