# Leveraging Energy Harvesting and Wake-Up Receivers for Long-Term Wireless Sensor Networks
## 3 Energy Management for an Energy-Harvesting Sensor Node
### EBC Design  
Most of the EMs presented in the literature assume the availability of the harvested and consumed energy values [2; 24; 25; 30]. However, precise tracking of these values is difficult, and their implementation incurs high overhead [34]. Therefore, an EM that only requires the current amount of residual energy is proposed in this work. The aim of the EBC is to keep the device in the ENO-MAX state, i.e., the amount of consumed energy equals the amount of harvested energy over a long period of time [27], by dynamically adapting the energy budget. Four residual energy levels of the energy storage device are defined and shown in Figure 2a. \(E_{R}^{max}\) is the energy storage capacity, and \(E_{R}^{fail}\) is the hardware failure threshold, which identify the minimal energy level ensuring the correct supply of the device. \(E_{R}^{fail}\) and \(E_{R}^{max}\) are hardware dependent. An Energy Neutral Interval (ENI) is defined by two energy thresholds \(E_{ENI}^{up}\) and \(E_{ENI}^{down}\) such that \(E_{R}^{fail}<E_{ENI}^{down}<E_{ENI}^{up}<E_{R}^{max}\), as illustrated by Figure 2a. If the stored energy falls below \(E_{R}^{fail}\), a power outage is incurred. On the other hand, if the energy storage device is full, i.e., the amount of stored energy is \(E_{R}^{max}\), then the excess of harvested energy is wasted, as it cannot be stored. This situation is called a saturation of the energy storage device. To avoid saturation, the risk of saturation interval \([E_{ENI}^{up},E_{R}^{max}]\) is defined. It allows the EBC to avoid the waste of energy by overflow of the storage device, serving as a buffer when an increase of the harvested energy occurs. Moreover, the energy stock \(E_{S}=E_{ENI}^{down}-E_{R}^{fail}\) is defined as the amount of energy required to ensure the operating of the device during periods without intake energy from the harvester and depends on the application and the energy source characteristics. Therefore, \(E_{S}\) is the amount of energy that should be stored in the energy storage device to avoid power outage in the case of energy scarcity periods. The aim of the EBC is therefore to keep the state of charge of the energy storage device in the ENI \([E_{ENI}^{down},E_{ENI}^{up}]\) when environmental energy is available,  
Figure 1: Software architecture with a detailed view of the proposed Energy Management (EM) structure. The design of the proposed Star Network Wake-up Receiver (WuRx) (SNW)-MAC protocol is detailed Section 4.  
thus avoiding the waste of energy by saturation of the storage device, while storing enough energy to survive periods during which no energy is harvested. We call \"quality of service\" the application requirements regarding the sensing period, bit error rate, etc. Ensuring the minimum quality of service required by the application necessitates a minimum energy budget per slot denoted by \(E_{B}^{min}\). At each execution of the EBC, the energy budget of the next slot \(k\) is computed as follows:  
\[e_{B}[k]=max\left\{E_{B}^{min},e_{B}[k-1]+\delta e_{B}[k]\right\}. \tag{2}\]  
where \(\delta e_{B}[k]\) is the energy budget correction, which is calculated according to the current values of \(e_{R}\) and \(\Delta e_{R}\). The objective of the EM is two-fold: (i) to find an energy budget that achieves an adequate compromise between the discharging rate and quality of service when little environmental energy is available; and (ii) when environmental energy is available, to avoid saturation or to find a good compromise between the charging rate and quality of service. This is done by adjusting the value of the energy budget by an amount that depends on both the residual energy and its variation. The rule base shown in Figure 2 presents the EBC strategy. In this table, \(\Delta e_{B}\) is a positive parameter of the EM and corresponds to the energy budget correction when the amount of stored energy is either in the ENI interval or in the risk of saturation interval.