# Clustering-Based Energy-Efficient Self-Healing Strategy for WSNs under Jamming Attacks
## 6 Simulation Results
### First Scenario  
The first experiment uses a static jammer deployed in the middle of the network, in the same position as the sink node in DE45. Then, we assess the clustering and self-healing algorithms to evaluate the effectiveness of these strategies. Firstly in this scenario, it was determined that four is the optimal number of clusters. These four associated clusters are illustrated with different colors in Figure 5. Next, the CH of each cluster was selected considering the Chebyshev distance. Then, each node associates with the CH that guarantees the highest _SINR_. Figure 5 shows that when the jammer is located in the center of the network, the nodes are clustered into four quadrants of 16 nodes each, while their respective CHs are the nodes located in B2, G2, B7, and G7. It also shows that some nodes are isolated since they cannot communicate directly with their respective CHs, due to transmit power limitations. The symmetry of this first scenario allows a more detailed analysis to be discussed based on a single cluster. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Value** & **References** \\ \hline Carrier Frequency & 2400 MHz & [52] \\ Transmitter Height (\(h_{t}\)) & 5 m & [53] \\ Receiver Height (\(h_{r}\)) & 5 m & [53] \\ Intra Nodes Distance (\(D\) ) & 5 m & [15; 53; 54] \\ Path Loss Exponent (\(\alpha\)) & 2 & [44] \\ Noise Power Spectral Density (\(n_{0}\)) & \(-174\) dBm/Hz & [34; 35] \\ Message Length (\(L\)) & 50 bits & [15; 34; 35] \\ Transmission Rate & 200 kbps & [34; 35] \\ Battery Charge & 10 J & [34; 35] \\ Power Amplifier Efficiency (\(\eta\)) & 0.35 & [34; 35] \\ Circuit Power Consumption & 10 dBm & [35] \\ Maximum Transmit Power (\(P_{max}\)) & 14 dBm & [5] \\ \hline \hline \end{tabular}
\end{table} 
Table 2: System parameters used for the simulations. To keep the clearness and simplicity of the FCPA algorithm analysis, Figure 5, as well as the figures corresponding to the other scenarios, show the rerouting paths of the isolated nodes to the corresponding CH. But, the routing path of nodes associated with the corresponding CH is omitted. Figure 6a shows the result of the FP algorithm from Section 4. Note that when the transmit power of the nodes and the jammer is the same, some nodes cannot communicate directly with the CH. The blue background nodes are associated nodes, while the nodes with the orange background are isolated nodes, which represent a third of the nodes of each cluster. Additionally, the residual energy from each battery is denoted by the gradient color bar. Operating all nodes with 14 dBm of transmit power is very energy inefficient. When all associated nodes have exhausted their batteries, the battery of the sink node remains with a high energy load. On the other hand, when the power control is activated, we verify that transmitting with 17 dBm allows all the nodes to communicate directly with the CH, even the E4 node, which is the most distant from the CH in the analyzed cluster. To ensure that the comparison between all algorithms is fair in terms of providing coverage to all nodes on each cluster, the non-cooperative FP and PA strategies will use 17 dBm as the maximum transmit power. Figure 6b shows the result of the PA algorithm from Section 4. The transmit power allocation significantly favors the nodes closest to the CH, which can operate with low transmit power, so they remain with residual energy. However, it does not obtain benefits over FP in terms of network lifetime since this is determined by the node that operates with the highest transmission power (i.e., E4). Therefore, the network lifetime when FP and PA are used is the same, allowing only the collection of 804,528 bits. Figure 4: Evaluation scenarios: Wireless sensor network with 64 static nodes, and the seven jammer locations considered in the research. In strategies based on cooperation, the maximum transmit power was kept at 14 dBm to allow any node to be assisted by another node, even when it is not adjacent. Figure 7a shows the result of the CP algorithm from Section 4.