# Analytical Model for the Duty Cycle in Solar-Based EH-WSN for Environmental Monitoring
## 5 Simulations
### Tree-Based Topologies Validation  
In this subsection we proceed with the assessment of our analytical energy model by using realistic network topologies. Figure 8 shows the two networks under evaluation: (1) a 10-node tree-based topology deployed into a square of side \(L=100\) m (on the left); and (2) a 20-node tree-based topology on a square of side \(L=200\) m (on the right). Both networks use an outdoor radio range of \(R~{}=~{}75\) m. We consider two values for the duty-cycle, namely \(DC=\{3,10\}\%\). Each simulation with Avrora assumes that the application described before is run by all nodes; moreover, all of them use the same DC with the exception of the base station (node 0), as it generally lacks energy restrictions. The results provided by Avrora, namely the energy consumed by each node for a given number of communication rounds, are then compared with those obtained from the proposed energy model in order to determine the accuracy of the latter. Figure 7: Energy consumption in \(\mu\) Joules for \(k\) tries of a transmitter node (**left**) and a receiver and forwarding node (**right**). A key parameter in our analysis is \(\sigma\), which is determined for each node by network topology (recall that, in fact, \(\sigma=\sigma(X)\), with \(X\) representing an arbitrary node). In TinyOS-based sensor networks, the default routing protocol is CTP. CTP progressively builds a connected network by means of frequent exchanges of beacon messages between nodes, until a tree-based topology is achieved. Subsequently, the exchange of beacon messages is modulated by the temporal and spatial variation of the traffic load, as this determines the frequency of topology updates. Remind that CTP, which is responsible for collecting data from the network and sending them to a small number of sinks, was designed to achieve the objectives of agility and efficiency [33]. This means that network topology can dynamically change in response to changing traffic conditions, though this was not the case in our simulation experiments once an initial transient regime was completed. This is due to the regularity of the traffic pattern generated by the monitoring application being executed. Therefore, despite beacon messages were very frequent during an initial transient period, their impact on energy consumption became marginal as long as the simulation was evolving. As an example, Figure 9 depicts the final topologies obtained after simulating the 10-node network; one of these topologies corresponds to \(DC=3\%\) (left) and the other one to \(DC=10\%\) (right). In both experiments the simulation time was set large enough to allow CTP to complete the initial period of topology construction, after which we observed that the data-gathering tree remained practically constant. At the end of each simulation experiment, Avrora reports several parameters on a per-node basis: total number of packets transmitted and received, and energy consumption. Accordingly, the results for the 10-node network are shown in Figure 10, which plots the energy consumed by every node with  
Figure 8: Network deployments used in the simulation tests. Figure 9: 10-node topologies after simulation with \(DC=3\%\) (**left**) and \(DC=10\%\) (**right**). the exception of node 0 (base station). Only the consumption of the radio component is taken into account, both for \(DC=3\%\) (on the left) and \(DC=10\%\) (on the right). The \(X\)-axis corresponds to the number of rounds executed (1, 2, 3, 10, 20 and 30), while the \(Y\)-axis provides the corresponding energy consumption in Joules. As observed, the energy consumed by each node grows approximately linearly with the number of rounds, fact that is consistent with the observation that topology was almost static. We also noticed that the differences between nodes were mainly due to the combination of the parameters \(k\) and \(\sigma\). The value of \(\sigma\) was very stable for each node, as the topology hardly experienced any change.