# Clustering-Based Energy-Efficient Self-Healing Strategy for WSNs under Jamming Attacks
## 6 Simulation Results
### First Scenario
CP provides coverage to all nodes even when the maximum transmit power preset is half of the preset in FP and PA. Now, the E4 node is assisted by the E2 node and does not need to reach the CH directly. When the CP algorithm is used, the first nodes that exhaust their batteries are E2, F3, and G4, which attend to the communications of the nodes isolated in Figure 6a. The results show that the nodes that provide cooperation deploy their batteries first. Specifically, the nodes (E2, F3, G4) cooperate with the isolated nodes to retransmit their  
Figure 5: First scenario: the clustered network is represented with the CHs of each cluster, the jammer at Position 1, and the assisted communications when using cooperation-based strategies. Figure 6: Residual Energy for (**a**) the FP algorithm with 14 dBm of fixed transmit power and (**b**) the PA algorithm with 17 dBm of maximum transmit power. messages. Therefore, these nodes are under heavy load and are the first that exhaust their batteries. Next, the isolated nodes waste more energy than the CH because they require more power to transmit their message. Because of this, isolated nodes are the second nodes that exhaust their batteries, followed by CH. Finally, the nodes that reach CH in one hop are the last nodes that survive in positions (F1, G1, H1, H2, H3). The scenario that combines cooperation and power allocation has similar behavior. The cooperation algorithm finds the same routes to retransmit the messages. However, in each link between the rerouting chain, the power allocation reduces the energy consumption in the transmission process. Therefore, the cooperating nodes are under a heavy load in contrast with the rest of the nodes in the cluster. Consequently, they can retransmit more information but exhaust their batteries first. The FCPA algorithm takes advantage of the weakness of the previous protocols. Therefore, it provides relief to the nodes under heavy loads. To this end, the algorithm distributes the retransmission of messages to different routes. As a result, the number of nodes that cooperates increases, reducing the load for the nodes determined by the cooperation algorithm. In Figure 8, the routes and the relative load are represented by arrows and markers. The FCPA algorithm significantly improves energy efficiency in the network. As presented in Figure 8, isolated transmitters and cooperating nodes distribute their loads equally. Consequently, the CH node is the first to exhaust its battery. This phenomenon is exclusive to this strategy and shows the robustness of the solution. Then, the cooperating nodes and isolated nodes keep relative residual energy, respectively. In Figure 9, we present the results of the residual energy and information transmitted for the FP, PA, CP, PAC, and the proposed FCPA protocol. The results show that the tradeoff between the residual energy and the information transmitted in the FP is poor. The PA and CP protocols have a better performance than FP with 18.60 and 22.40 times more energy, respectively. However, the CP protocol has less information transmitted with 118,192 kb transmitted since, when operating all nodes with the same transmit power, the relay nodes deplete their batteries first. On the other hand, the PA strategy achieves the same amount of information transmitted as the FP, since the most distant nodes use the maximum transmit power. Therefore, the PA and CP protocols overpass the performance of the FP protocol in residual energy terms. Then, the combination of these two protocols named PAC improves the residual energy left in the network by 7% from the CP. Additionally, the amount of information transmitted increases to 139,158 kb from CP. Figure 7: Residual Energy for the cooperative strategies, (**a**) the CP algorithm with fixed transmit power and (**b**) the PAC algorithm, where the power allocation is possible. The width of the arrows indicates when the power is fixed (**a**) and when it can be reduced to the value required by the link (**b**).