# Energy Storage Overflow-Aware Data Delivery Scheme for Energy Harvesting Wireless Sensor Networks
## 3 ESO-Aware Data Delivering Scheme
### The EAMP  
Assume the EH-WSN has one sink and \(N\) sensor nodes. Each node harvests energy from an ambient energy source and the harvested energy is stored in its energy storage with capacity of \(B\) (in Joule). Assume the source node \(S\) has \(k\) disjoint paths to the sink. We use \(R_{i}\) to represent the set of the nodes on the \(i\)-th path, exclusive of \(S\), and \(\mid R_{i}\mid\) stands for the number of the elements in \(R_{i}\). In addition, notation \"\((i,j)\)\" represents the \(j\)-th node on the \(i\)-th path. Thus, \(R_{i}\) = {(\(i\),1), (\(i\),2),..., \((i,\mid R_{i}\mid)\)}, \(i\) = 1, 2,..., \(k\). Moreover, for node \((i,j)\), \(P_{b(i,j)}\) and \(H_{(i,j)}\) stands for its residual energy before data delivery and incoming energy during the period of data delivery, respectively, and \(d_{(i,j)}\) denotes the distance between nodes \((i,j)\) and \((i,j+1)\). \(d_{(S,i)}\) represents the distance between the source node \(S\) and node \((i,1)\) (\(i=1,2,\)..., \(k\)). The scenario with \(k\) disjoint paths is shown in Figure 3 and the notations used are summarized in Table 1.  
Figure 1: Traditional routing. (**a**) Before data delivery; (**b**) After data delivery using route S\(\rightarrow\)B\(\rightarrow\)Sink. Figure 3: Packet delivery over \(k\) disjointed paths. Figure 2: Energy storage overflow (ESO)-reducing routing. Let \(u\) be the minimum Transmission Unit (TU) in bits. Assume node \(S\) intends to deliver \(L\) TUs of data, i.e., \(Lu\) bits, to the sink over the \(k\) paths. We let the source node apply Data Delivering Decision (DDD), denoted by vector \(\varphi=(\varphi_{1},\,\varphi_{2},\,\ldots,\,\varphi_{k})\), in which \(\varphi_{i}\geq 0\) stands for the number of TUs to be delivered over the \(i\)-th path. Thus, we have  
\[\sum_{i=1}^{k}\varphi_{i}=L. \tag{1}\]  
Before moving further, we derive the energy consumption based on the energy model presented in [22]. That is, the energy consumed in transmitting \(u\) bits to the receiver with \(d\) meters away is  
\[E_{Tx}(u,d)=u(\varepsilon_{0}+\varepsilon_{1}d^{\gamma}), \tag{2}\]  
and the energy consumed in receiving \(u\) bits is  
\[E_{Rx}(u)=u\varepsilon_{0}, \tag{3}\]  
here, \(\varepsilon_{0}\) denotes the energy consumption resulting from digital coding, modulation, filtering, and spreading of the signal; \(\varepsilon_{1}\) is the energy consumed by the transmitter power amplifier; and \(\gamma\) is path loss parameter valued in 2 through 4 [22]. As a result, under the DDD \(\varphi\), the energy expended by node \((i,j)\) in forwarding data packets, which contains the energy consumed for receiving the packets from its preceding node and the energy consumed for transmitting to the next node, is  
\[ \begin{array}{ll}E_{(i,j)}(\varphi)&=E_{Rx}(\varphi_{i}u)+E_{Tx}(\varphi_{i }u,d_{(i,j)})\\ &=\varphi_{i}u[2\varepsilon_{0}+\varepsilon_{1}(d_{(i,j)})^{\gamma}],i=1,2, \cdots,k,j=1,2,\cdots,\Big{|}R_{i}\Big{|}.\end{array}  \tag{4}\]  
Additionally, the energy expended by the source node \(S\) for delivering the data with size of \(\varphi_{i}u\) to node \((i,1)\) is as follows:  
\[E_{i}(\varphi)=E_{Tx}(\varphi_{i}u,d_{(S,i)})=\varphi_{i}u[\varepsilon_{0}+ \varepsilon_{1}(d_{(S,i)})^{\gamma}],i=1,2,\cdots,k. \tag{5}\]  
Upon completion of the DDD \(\varphi\), the ESO at node \((i,j)\) is  
\[\hat{E}_{(i,j)}=\Big{[}P_{B(i,j)}+H_{(i,j)}-E_{(i,j)}(\varphi)-B\Big{]}^{+}, \tag{6}\]