## 4 Discussion
The HPAR protocol divides the network into groups of sensor nodes geographically close, configured as a zonal cluster, and treated as an entity, autonomous in hierarchical routing through the other zones. In this way, a reduction in energy consumption is achieved. The chosen route between nodes is the lowest energy cost and the best among several routes with minimum consumption. The rationale for this idea is that those paths including nodes with high residual energy values can be more expensive than paths with minimal power consumption. However, this protocol presents high latency and an energy increase of 12% concerning PEGASIS, of 10% to TEEN and 9.5% to LEACH. This increase is evident in Figure 10.  
PEGASIS has two main objectives. First, increase the lifespan of each of the nodes by using collaborative techniques. Second, to allow only local coordination between adjacent nodes, the bandwidth consumed in communication is reduced. In order to find the closest neighbor node, each node uses the signal strength to measure the distance to all neighboring nodes and then adjust the signal strength so that only one node can be heard. This reduces the problem of excessive redundancy of information in the nodes, and, therefore, the increase of overhead in the network will increase the power consumption. PEGASIS is capable of increasing the useful life of the network to twice that under the LEACH protocol. This gain is achieved by eliminating the overhead caused by dynamic group formation in LEACH and decreasing data transmissions and receptions through data aggregation. Figures 11-13 clearly show the good performance of the PEGASIS protocol, showing an energetic performance of 15% on HPAR, 11% on LEACH, and 8% on TEEN. The affected area defined in PEGASIS, thanks to the alteration of these performance metrics, is more focused and is mostly concentrated in the nodes presenting bottlenecks. The algorithm can  
Figure 6: LEACH resilience under normal conditions and jamming. Figure 7: LEACH energy under normal conditions and jamming. identify nodes with an increase of more than 50% of their normal conditions, and these practically surround the nodes that may be suspicious. In this case, they would be the coordinator node (it could be discarded by knowing that it is a hierarchical route towards it) and the jammer node (which is the attacking node). The results indicate that PEGASIS targets affected areas with 92% accuracy, while TEEN targets these areas with 86% accuracy. LEACH focuses these areas on 70%. In addition, finally, HPAR focuses on these areas by 61%. Figure 8: HPAR retransmissions under normal conditions and jamming. Figure 10: HPAR energy under normal conditions and jamming. Figure 9: HPAR resilience under normal conditions and jamming. The protocols that present the best performance are TEEN and PEGASIS. In the TEEN protocol, the sensors continuously signal the medium, transmitting at a lower frequency only when the sensed measurement is within a range of interest, maintaining a balance between energy efficiency and information accuracy, working under the concept of clusters. There is a deficiency in LEACH and TEEN that makes them somewhat vulnerable. They do not rotate roles but instead use other mechanisms to reduce consumption, so its viability concerning consumption is low. This constitutes an aspect against scalability  
Figure 4:0 PEGASIS retransmissions under normal conditions and jamming. Figure 4:1 PEGASIS resilience under normal conditions and jamming. Figure 4:2 PEGASIS energy under normal conditions and jamming. as the number of nodes increases. With PEGASIS, the aim is to maximize the network's life through collaboration techniques that allow local coordination between nodes, thus reducing the necessary bandwidth. The generation of the chains becomes more complicated as the number of nodes increases. When this number is large, it causes latency problems. PEGASIS is a chain-based protocol, and such chains may be lengthy; scalability is an issue when this increase occurs.