# Clustering-Based Energy-Efficient Self-Healing Strategy for WSNs under Jamming Attacks
## 3 System Model
### Energy Consumption Model  
We consider the network lifetime as the operation time from when the batteries of the devices (\(B_{i}\)) are full until the battery of any of the nodes is completely depleted. Since our research focuses on countering jamming attacks, for simplicity we assume that at the beginning of the attack, all devices had the same energy charge, equal to the total battery capacity, i.e., \(B_{i}=B_{C}\,\forall\,i\in\{1,2,\cdots,N\}\).  
IoT nodes consume energy in information acquisition and processing, reception and transmission of information, as well as other scheduling and synchronization functions [34; 35; 49]. However, we abstract in this research from all functions not related to communication, to compare the impact of different transmission control and/or cooperative communication strategies. The consumed energy for each process is calculated considering the meantime of the process and the components involved [34; 35].  
The energy consumed during transmission (\(e_{t_{i}}\)) by node \(i\) can be estimated by considering its transmit power \(P_{i}\), the power amplifier efficiency \(\eta\), the transmission circuit operating power \(P_{ct}\), and the transmission time, which is determined by the length of the message \(L\) and the transmission rate \(R\),  
\[e_{t_{i}}=\frac{(P_{i}/\eta+P_{ct})L}{R}. \tag{4}\]  
Similarly, for the reception, we calculate the energy consumption as  
\[e_{r_{i}}=\frac{P_{cr}L}{R}, \tag{5}\]  
where \(P_{cr}\) is the energy consumed by the circuitry in the reception process. Therefore, the energy consumption of node \(i\) after transmitting \(t_{i}\) messages is \[E_{T_{i}}=\sum_{j=1}^{t_{i}}e_{t_{i}}=t_{i}e_{t_{i}}. \tag{6}\]  
The implementation of the self-healing strategies proposed in the following section implies that some nodes, designated as cluster heads, perform the function of information sinks, so their energy consumption depend on the number \(r_{i}\) of messages received  
\[E_{R_{i}}=\sum_{j=1}^{r_{i}}e_{r_{i}}=r_{i}e_{r_{i}}. \tag{7}\]  
Moreover, some of the proposed strategies are based on cooperative communication between nodes, so the energy consumption associated with the cooperation of these nodes depends on the number \(c_{i}\) of messages in which they act as relays, receiving and re-transmitting the information,  
\[E_{C_{i}}=\sum_{j=1}^{c_{i}}(e_{r_{i}}+e_{t_{i}})=c_{i}(e_{r_{i}}+e_{t_{i}}). \tag{8}\]  
Therefore, the residual energy of node \(i\) depends on the self-healing strategy used, the role that the \(i\)-th node plays in its cluster, as well as the number of messages it receives (if it is a sink) or the number of messages it sends and those in which it cooperates (if it is a relay too). However, it should be noted that when transmit power control techniques are also used, the cost associated with forwarding the information will also depend on the relative distance of the node to which the information will be sent. Therefore, in such cases, if the relays of the next level change, the energy cost of sending the information to them changes as well.