# Depletion-of-Battery Attack: Specificity, Modelling and Analysis
## 4 DoB Analysis
### System Model  
Let us consider a node in a WSN that transmits its own generated data and retransmits data of other sensors. We first discuss the sensor behavior under normal conditions, i.e., any attacks are absent. Next, the proposed model will be easily modified for intrusion cases. The transmitted packet stream is assumed to be Poisson with an average transmission rate of \(\lambda\) packets per time unit. Let \(e_{0}\) be the energy needed to handle one packet. Assume the energy consumption for packet transmitting is much higher than the energy consumption for other activities (packet receiving, idle listening, monitoring, data collection). Thus, without loss of generality, \(e_{0}\) is the energy consumption for transmitting one packet. If the current capacity of sensor battery is less than \(e_{0}\) then the packet transmission has failed. Thus, it makes no sense to consider the energy consumption per bit in this work. Figure 1: Venn diagram representation of the denial-of-service (DoS) and depletion-of-battery (DoB) attacks interrelation. Let \(C\) be the charge capacity of a sensor battery. The total number of packets transmitted by a sensor, \(N_{0}\), can be estimated as follows:  
\[N_{0}=C/e_{0}. \tag{1}\]  
After further consideration, \(N_{0}\) is rounded to the nearest integer. Let the discrete random variable \(N(t)\) be the sensor lifetime at time \(t\) in terms of a number of transmissions. In other words, the residual battery charge at time \(t\) is enough for transmission of \(N(t)\) packets, but not enough for transmission of \(N(t)+1\) packets. For our purposes, it is convenient to model the sensor behavior by the following Markov process:  
\[\{N(t),\;t\geq 0\},\]  
where \(N(0)=N_{0}\). The process takes non-negative integer values. If \(N(t)=0\), then the sensor battery is completely depleted, and the sensor is faulty. Here, \(\lambda\) is the rate at which packet transmission occurs. Let us denote the state probabilities as follows:  
\[P_{k}(t)=P[N(t)=k],k=0,\;1,\;\ldots,\;N_{0}.\]  
It is clear that for a given \(t\)  
\[\sum_{k}P_{k}(t)=1.\]  
This process is known as the pure death process. The state probabilities are described by the following differential equations (for example, see [43])  
\[\frac{dP_{k}(t)}{dt}=-\lambda\;P_{k}(t)+\lambda\;P_{k+1}(t),0<k<N_{0},\]  
\[\frac{dP_{N_{0}}(t)}{dt}=-\lambda\;P_{N_{0}}(t),\]  
\[\frac{dP_{0}(t)}{dt}=\lambda\;P_{0}(t),\]  
with known solution  
\[P_{k}(t)=\frac{\left(\lambda t\right)^{N_{0}-k}}{\left(N_{0}-k\right)!}\;e^{- \lambda t},0<k\leq N_{0}.\]  
Therefore,  
\[P_{0}(t)=1-e^{-\lambda t}\sum_{k=1}^{N_{0}}\frac{\left(\lambda t\right)^{N_{0 }-k}}{\left(N_{0}-k\right)!}=1-e^{-\lambda t}\sum_{k=0}^{N_{0}-1}\frac{\left( \lambda t\right)^{k}}{k!}.\]  
The function \(P_{0}(t)\) is the probability of the sensor being faulty at time \(t\). This function is useful for sensor survivability estimation. Let \(T\) be the sensor lifetime. It is a random variable with the cumulative distribution function (CDF) \(F_{T}(t)\). By CDF definition, \(F_{T}(t)\) equals the probability of the event \(T\leq t\). Hence,  
\[N_{0}=C/e_{0}. \tag{1}\]0  
Thus, \(T\) is an \(N_{0}\)-stage Erlang random variable. Hence, the expected sensor lifetime (also known as _mean time to failure_ or MTTF) can be estimated as follows:  
\[N_{0}=C/e_{0}. \tag{1}\]1  
It is a commonly used survivability metric [42; 44]. MTTF provides the mean time it takes for the sensor to reach the failure state for a given initial state of the sensor. This result can also be derived from the fact that process \(N(t)\) spends an exponentially distributed time in each of its states. In WSNs investigations, researchers often consider the lifetime of the whole system. At that point, the WSN lifetime is generally defined as the time duration until the first sensor node is out of battery power [45; 46; 47; 48; 49; 50; 51; 52]. The corresponding authors remark that the loss of a sensor quickly adds extra loadsto its neighboring sensors. It leads to a rapid collapse of the network.