# Analytical Model for the Duty Cycle in Solar-Based EH-WSN for Environmental Monitoring
## 4 Analytical Energy Consumption Model
### Analytical Model
#### 4.2.2 Packet Forwarding  
Figure 3 also describes the temporal breakdown of the process of receiving and forwarding a packet (by node B). In general, upon waking up, node B detects a fragment of the transmitted packet before its complete reception. Of course, this fragment may not exist if the wake up takes place during the gap between two consecutive tries. As stated in Section 3, once the packet is completely received, the node issues an acknowledgement, forwards the packet, and enters a DELAY_AFTER_RECEIVE period before switching to sleep mode. Let us start by calculating the energy wasted by node B to complete the reception of the packet from A (that is, until it transmits the acknowledgement packet): \begin{table}
\begin{tabular}{c c c} \hline \hline
**Time Intervals (for the Backend)** & \(k\) & **Probability** \\ \hline
[0,\(T_{CCA}\)] U [\(T_{CCA}+T_{slp}\), \(T_{l}+T_{slp}\)] & 1 & \(\frac{T_{l}}{T_{l}+T_{slp}}\) \\
[\(T_{CCA}\), \(T_{CCA}+T_{c}\)] & 2 & \(\frac{T_{c}}{T_{l}+T_{slp}}\) \\
[\(T_{CCA}+T_{c}\), \(T_{CCA}+2T_{c}\)] & 3 & \(\frac{T_{c}}{T_{l}+T_{slp}}\) \\
[\(T_{CCA}+2T_{c}\), \(T_{CCA}+3T_{c}\)] & 4 & \(\frac{T_{c}}{T_{l}+T_{slp}}\) \\
[\(T_{CCA}+3T_{c}\), \(T_{CCA}+4T_{c}\)] & 5 & \(\frac{T_{c}}{T_{l}+T_{slp}}\) \\... &... &... \\
[\(T_{CCA}+(\alpha-1)T_{c}\), \(T_{CCA}+\alpha T_{c}\)] & \(\alpha+1\) & \(\frac{T_{c}}{T_{l}+T_{slp}}\) \\
[\(T_{CCA}+\alpha T_{c}\), \(T_{CCA}+T_{slp}\)] & \(\alpha+2\) & \(\frac{T_{slp}-\alpha T_{c}}{T_{l}+T_{slp}}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Characterization of the number of tries (\(k\)) in the process of sending a packet. \[E_{R}(\mathrm{B})=E_{fd}+E_{rx}^{pkt}+E_{tx}^{ack}(d_{b}(\mathrm{B})) \tag{5}\]  
Here, \(E_{fd}\) denotes the energy cost of the fraction of duty period that precedes the full packet reception; in other words, it is the energy wasted during the time elapsed between the wakeup of the receiver and the start of the successful packet reception. Additionally, \(E_{rx}^{pkt}\) and \(E_{tx}^{ack}(d_{b}(\mathrm{B}))\) are, respectively, the energy costs experienced by node B to receive and confirm the packet from A. Among all such energy components, the only one that is subject to randomness is \(E_{fd}\), as it depends on the asynchrony between the two nodes. For the characterization of this component, we set up another time origin at the beginning of the last non-successful packet transmitted by node A. Accordingly, \(t^{\prime}\) represents the shift of the backend of the duty period of node B with regard to the new reference; this shift may vary from \(0^{+}\) to \(T_{c}^{-}\) (see again Figure 3). More specifically, \(t\) and \(t^{\prime}\) are related through the following equation:  
\[t=T_{CCA}+(k-2)T_{c}+t^{\prime},k=2\ldots\alpha+1 \tag{6}\]  
Based on this equation, Table 2 provides a characterization of \(E_{fd}\) in terms of the transmitter-receiver asynchrony. A new magnitude appears, namely \(E_{l}\), which is the total energy wasted in idle listening during a radio activation with no ongoing packets, the duration of which is precisely DUTY_ON_TIME. For illustration purposes, Figures 4 and 5 plot the information contained in Table 2. In particular, Figure 4 corresponds to \(T_{slp}\leq\alpha T_{c}+T_{pkt}\), whereas Figure 5 describes the opposite case (note that these two cases are distinguished in Table 2). Note also that the two graphs exhibit a similar sawtooth-like profile, only differing in the interval \([T_{CCA}+\alpha T_{c},T_{CCA}+T_{slp})\). The change of slope that takes place in most subdomains of the two representations reflects the general case where power consumption in idle listening differs from that in packet reception. Otherwise, a single straight line would have been drawn. For the evaluation of the distribution of \(E_{fd}\), some reference values have been indicated in Figures 4 and 5:  
Figure 4: Evolution of \(E_{fd}\) in terms of the transmitter-receiver asynchrony, for \(T_{slp}\leq\alpha T_{c}+T_{pkt}\).