# Energy Storage Overflow-Aware Data Delivery Scheme for Energy Harvesting Wireless Sensor Networks
## 3 ESO-Aware Data Delivering Scheme
### The EAMP
\begin{table}
\begin{tabular}{c c} \hline \hline
**Notation** & **Definition** \\ \hline \(R_{i}\) & The set of the nodes on the \(i\)-th path \\ \(|R_{i}|\) & The number of the elements in \(R_{i}\) \\ \((i,j)\) & The \(j\)-th node on the \(i\)-th path \\ \(P_{b(i,j)}\) & Residual energy before data delivery for \((i,j)\) \\ \(P_{a(i,j)}\) & Residual energy after data delivery for \((i,j)\) \\ \(H_{(i,j)}\) & Incoming energy during the period of data delivery for \((i,j)\) \\ \(d_{(i,j)}\) & The distance between nodes \((i,j)\) and \((i,j+1)\) \\ \(S\) & The source node \\ \(u\) & The minimum transmission unit \\ \(B\) & The energy storage capacity \\ \(\varepsilon_{0}\) & Energy consumption in digital coding, modulation, filtering, and spreading of the signal, etc. \\ \(\varepsilon_{1}\) & Energy consumption of the transmitter power amplifier \\ \(\gamma\) & Path loss exponent \\ \(M\) & The number of chromosomes in a population in GA \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Definitions of notations used. where \(B\) is the energy storage capacity and notation \"[. ]+\" is a rectifier function defined by  
\[[x]^{+}=\left\{ \begin{array}{l}x,x\geq 0;\\ 0,x<0.\end{array} \right. \tag{7}\]  
Thus, the residual energy of node \((i,j)\) after data delivery is  
\[P_{a(i,j)}=P_{b(i,j)}+H_{(i,j)}-E_{(i,j)}(\varphi)-\hat{E}_{(i,j)}. \tag{8}\]  
Similarly, after completion of the DDD \(\varphi\), the ESO at node \(S\) is  
\[\hat{E}_{(S)}=\left[P_{b(S)}+H_{(S)}-\sum\limits_{i=1}^{k}E_{i}(\varphi)-B \right]^{+}, \tag{9}\]  
where \(P_{b(S)}\) and \(H_{(S)}\) represent the residual energy of node \(S\) before data delivery and the incoming energy during the period of data transmission at node \(S\), respectively. The residual energy of node \(S\) after data delivery is  
\[P_{a(S)}=P_{b(S)}+H_{(S)}-\sum\limits_{i=1}^{k}E_{i}(\varphi)-\hat{E}_{(s)}. \tag{10}\]  
It is required that a node is permitted to transmit packets only when its residual energy after data delivery is positive, i.e.,  
\[P_{a(i,j)}>0, \tag{11}\]  
and  
\[P_{a(S)}>0, \tag{12}\]  
which leads to the prerequisite condition of successful forwarding data packets from node \((i,j)\) to the sink under the DDD \(\varphi\) as follows:  
\[P_{b(i,j)}+H_{(i,j)}-E_{(i,j)}(\varphi)>\hat{E}_{(i,j)}, \tag{13}\]  
and meanwhile the source node \(S\) is required to satisfy  
\[P_{b(S)}+H_{(S)}-\sum\limits_{i=1}^{k}E_{i}(\varphi)>\hat{E}_{(s)}. \tag{14}\]  
Substituting (4), (5), (6), and (9) into (8) and (10), we obtain  
\[\left\{ \begin{array}{l}P_{b(S)}+H_{(S)}-u\sum\limits_{i=1}^{k}\varphi_{i}[ \varepsilon_{0}+\varepsilon_{1}(d_{(S,i)})^{\gamma}]>\left[P_{b(i,j)}+H_{(i,j) }-E_{(i,j)}(\varphi)-B\right]^{+};\\ P_{b(i,j)}+H_{(i,j)}-\varphi_{i}u[2\varepsilon_{0}+\varepsilon_{1}(d_{(i,j) })^{\gamma}]>\left[P_{b(S)}+H_{(S)}-\sum\limits_{i=1}^{k}E_{i}(\varphi)-B \right]^{+}.\end{array} \right. \tag{15}\]From (4), (5), (8), and (10), we obtain the total residual energy after data delivery of all the nodes taking part in forwarding the data packets under the DDD \(\varphi\) as follows:  
\[ \begin{split}& P_{tot}(\varphi)=P_{a(S)}+\sum\limits_{i=1}^{k} \sum\limits_{j=1}^{|R_{i}|}P_{a(i,j)}\\ &=P_{b(S)}+H_{(S)}-\sum\limits_{i=1}^{k}E_{i}(\varphi)-\hat{E}_{ (S)}+\sum\limits_{i=1}^{k}\sum\limits_{j=1}^{|R_{i}|}[P_{b(i,j)}+H_{(i,j)}-E_{ (i,j)}(\varphi)-\hat{E}_{(i,j)}]\\ &=P_{b(S)}+H_{(S)}+\sum\limits_{i=1}^{k}\sum\limits_{j=1}^{|R_{i }|}[P_{b(i,j)}+H_{(i,j)}]-\left\{\sum\limits_{i=1}^{k}\varphi_{i}u[\varepsilon _{0}+\varepsilon_{1}(d_{(S,i)})^{\gamma}]+\sum\limits_{i=1}^{k}\sum\limits_{j =1}^{|R_{i}|}\varphi_{i}u[2\varepsilon_{0}+\varepsilon_{1}(d_{(i,j)})^{\gamma} ]\right\}\\ &-\{\left[P_{b(S)}+H_{(S)}-B-\sum\limits_{i=1}^{k}\varphi_{i}u[ \varepsilon_{0}+\varepsilon_{1}(d_{(S,i)})^{\gamma}]\right]^{+}+\sum\limits_ {i=1}^{|R_{i}|}\sum\limits_{j=1}^{|R_{i}|}\left[P_{b(i,j)}+H_{(i,j)}-B-\varphi _{i}u[2\varepsilon_{0}+\varepsilon_{1}(d_{(i,j)})^{\gamma}]\right]^{+}\}. \end{split}