# Optimal Routing for Time-Driven EH-WSN under Regular Energy Sources
## 2 Energy Consumption Model
### Approximate Energy Consumption Model
RX and TX denote, respectively, the reception and transmission modes of operation. Figure 3: Relative error between exact and approximate energy consumption models for TinyOS sensor nodes. \[E_{trigger}(X)=\left\{ \begin{array}{ll}\varepsilon[n]E_{txtpt}+E_{extra},&\text{ {case 1}}\\ \varepsilon[n]E_{txtpt}+E_{extra},&\text{ {case 2}}\\ \varepsilon\left[E_{fp}\right]+E_{extra},&\text{ {case 3}}\end{array} \right.. \tag{7}\]  
Here, cases 1, 2 and 3 correspond, respectively, to using a repetitive sequence of the data packet (LPL in TinyOS), a repetitive sequence of an advertisement packet or a long preamble. Moreover, \(\varepsilon[n]\) denotes the expected number of times that the data packet or the advertisement packet is transmitted before the data packet is fully received, \(\varepsilon\left[E_{fp}\right]\) is the expected value of energy wasted in transmitting a fragment of preamble and \(E_{extra}\) stands for any extra fixed-component of energy consumption that may be introduced by the particular MAC protocol (for instance, \(E_{l}^{DAR}\) in TinyOS). In the case of LPP-based protocols, where typically a probe packet is repetitively transmitted by the node acting as receiver, the formulation is slightly different:  
\[\varepsilon[E_{round}(X)]\cong\sigma(X)\cdot E_{rxpt}+(\sigma(X)+1)\cdot E_{ txpt}+E_{l}\frac{T_{rdd}\,DC(X)}{T_{l}}+\sigma(X)\cdot E_{trigger}(X), \tag{8}\]  
\[E_{trigger}(X)=\sum_{i=1}^{CH(X)}\frac{1+\sigma(c_{i}(X))}{\sigma(X)}\cdot E_{ trigger,i}(X),=\sum_{i=1}^{CH(X)}\frac{1+\sigma(c_{i}(X))}{\sigma(X)}\cdot( \varepsilon_{i}[n]E_{txprobe}+E_{extra}). \tag{9}\]  
The term \(c_{i}(X)\) represents a child node of node \(X\), with \(i\) varying between 1 and \(CH(X)\), the total number of children of node \(X\), and \(\varepsilon_{i}[n]\) is the expected number of transmissions of the probe packet from node \(X\) to node \(c_{i}(X)\). The term \(E_{trigger,i}(X)\) denotes the energy wasted by node \(X\) to trigger the communication of every packet from its child node \(c_{i}(X)\). Also note that \(\sigma(X)=\sum_{i=1}^{CH(X)}(1+\sigma(c_{i}(X)))\), with \(\sigma(c_{i}(X))\) the traffic load of node \(c_{i}(X)\). Hence, Equation (9) can be viewed as a weighted average. Equations (5) and (8) can be assimilated into the following equation, since the reporting time is always much larger than the duration of duty periods (\(\frac{T_{rdd}}{T_{l}}\gg 1\)):  
\[\varepsilon[E_{round}(X)]\cong\sigma(X)\cdot(E_{rxpt}+E_{txpt}+E_{trigger}(X))+ E_{l}\frac{T_{rdd}\,DC(X)}{T_{l}}. \tag{10}\]  
In summary, Equation (10) characterizes, in an approximate way, the energy consumption (per round) of nodes in time-driven WSN implementing LPL-based or LPP-based duty-cycled MAC protocols. Whereas the specificity of the MAC protocol is embedded into the term \(E_{trigger}(X)\), the important fact regarding the subsequent analysis is the dependence of the energy consumption per round on the traffic load, represented by \(\sigma(X)\). Next, based on Equation (10), the condition for energy neutral operation is formulated.