# Analytical Model for the Duty Cycle in Solar-Based EH-WSN for Environmental Monitoring
## 5 Simulations
### Basic Validation  
We start the validation of the analytical energy model by considering the simple scenario depicted in Figure 2. Our goal is to proof that the models developed for packet transmission and packet forwarding are consistent with the results provided by Avrora, as a prior step to deal with more complex configurations. We assume that node A executes the application that was previously described with a duty cycle \(DC=3\%\). We also set the duty cycles of node B and its parent node to \(3\%\). The rest of parameters used in the evaluation are listed in Table 3. With these settings (\(DC=3\%\) and \(T_{l}=5\) ms), the nodes activate their radios approximately every \(T_{l}+T_{slp}=166.7\) ms. This is the duration of a cycle with no communication activity, also called LPL interval in TinyOS context. These values are consistent with the two-state description used in the analytical model. In contrast, Table 4 shows the duration of each state in Figure 1 as measured by Avrora. As it can be noticed, there are differences between the theoretical model and the real system, but they are sufficiently small so as to accept the former with the advantage of simplification. In general, we also observed that state durations were approximately fixed, with the exception of the Power Off state. The radio remained in this state for the time until completing the nominal LPL interval, that is, \(T_{LPL}\) (166.7 ms in our case). For example, upon a single radio activation with no packets to transmit or receive, the duration of the Power Off state is \(T_{off}=T_{LPL}-(T_{down1}+T_{idle}+T_{rx}+T_{down2})\), with \(T_{rx}=T_{l}\). Otherwise, the remaining time depends on the number of tries that are required to successfully send/forward a packet. In this case, the term \(T_{rx}\) in the previous formula would be replaced by the total duration of the duty period dedicated to receive and forward the packet, including the DELAY_AFTER_RECEIVE interval. Accordingly, the resulting value for \(T_{off}\) would be lower for the same nominal \(T_{LPL}\). Since the reporting period is typically much larger than the LPL interval (\(T_{rnd}\gg T_{LPL}\)), most of the times a radio activation does not entail any packet transmission or reception (see Figure 1 on the left). For the scenario under consideration, node A generates a packet only once every \(T_{rnd}\), and generally it uses several tries to send this packet to node B. In turn, node B forwards the packet to its parent node, for which it also requires a certain number of tries, completely independent of those required by node A. Specifically, we performed two experiments as part of this basic validation. In the first experiment, we varied the level of asynchrony between nodes A and B, in such a way that the number of tries required by node A also varied. According to the model described in Section 4, the number of transmissions \(k\) ranges between 1 and \(\alpha+2\). For the parameter setting considered here, \(\alpha=59\) and hence the number of tries could vary between 1 and 61. However, in order to simplify the evaluation, we consider \(k\in[1,20]\) and, for each \(k\), we compare the energy consumption provided by Avrora with the energy consumption calculated by our model. During the experiment, we realized that Avrora was not able to meet the exact duration of the DELAY_AFTER_RECEIVE (\(DAR\)) parameter, fixed \begin{table}
\begin{tabular}{c c c} \hline \hline
**State** & **Notation** & **Duration (ms)** \\ \hline Power Down 1 & \(T_{down1}\) & 1.680750 \\ Idle & \(T_{idle}\) & 0.146625 \\ RX & \(T_{rx}\) & 4.742875 \\ Power Down 2 & \(T_{down2}\) & 0.000250 \\ Power Off & \(T_{off}\) & To be adjusted \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Duration of each CC2420 radio state on a radio activation with no incoming packets.