## 4 Hierarchical Energy Balancing Protocol (HEBP) Design
### Performance Evaluation of Each WS Based on Its Harvesting Capacity
\begin{array}{c}E_{\text{acqui}}(b)=b\cdot V_{\text{sup}}\cdot I_{ \text{sens}}\cdot T_{\text{sens}}+\frac{b\cdot V_{\text{sup}}}{8}(I_{\text{ read}}\cdot T_{\text{read}}+I_{\text{write}}\cdot T_{\text{write}})\\ E_{rx}(b)=b\cdot E_{\text{elec}}\\ E_{\text{pro}}\big{(}b,\ N_{\text{cyc}}\big{)}=b\cdot\bigg{(}N_{\text{cyc}} \cdot C_{\text{avg}}\cdot V_{\text{sup}}^{2}+V_{\text{sup}}\Big{(}\frac{N_{ \text{cyc}}}{f}\Big{)}\bigg{(}I_{0}\cdot e^{(\frac{V_{\text{sup}}}{f_{EP}T})} \bigg{)}\bigg{)}\\ E_{\text{tx}}(b,d)=\Big{(}\frac{4\pi f_{\text{LoRa}}}{c}\Big{)}^{2}\Bigg{(}14.25+ \text{ceil}\ \Bigg{(}\frac{\text{max}\big{(}b+16-4\cdot\text{SF}\quad 0\big{)}}{4 \cdot\text{SF}}\Bigg{)}\Bigg{)}\frac{S_{R}d^{4}2^{\text{SF}}}{\text{BW}}\end{array} \right. \tag{14}\]  
The descriptions and the values of the different estimation parameters used in these equations are provided in Table 3. These values were extracted from the datasheets of the real components and have been used in several previous research works [7; 31; 52; 55]. Assuming as in [7] that each WS transmits its data directly to the BS, the energy cost associated with the transmission of \(b\) bit of data is then defined as follows:  
\[E_{WS}(b,d)=E_{\text{acqui}}(b)+E_{pro}(b)+E_{tx}(b,d) \tag{15}\]  
where \(E_{\text{acqui}}(b),\ E_{pro}(b)\) and \(E_{tx}(b,d)\), are defined as in the set of Equation (14). A comparison of the achieved performance as a function of the required QoS is shown in Figure 12. In these figures, \(B_{i}\) represents the quantity of data transmitted by node \(i\). Table A1 of Appendix A also provides the terminology for the different positions. The minimum QoS is defined as the size \(b_{min}\) of the transmissible data. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Symbol** & **Description** & **Value** \\ \hline \(V_{\text{sup}}\) & Supply Voltage to sensor & 2.7 V \\ \(I_{\text{sens}}\) & Current sensing activity & 25 mA \\ \(T_{\text{sens}}\) & Time duration: sensor node sensing & 0.5 ms \\ \(I_{\text{read}}\) & Current: flash reading 1 byte data & 6.2 mA \\ \(T_{\text{read}}\) & Time duration: flash reading & 565 \(\upmu\)s \\ \(I_{\text{write}}\) & Current: flash writing 1 byte data & 18.4 mA \\ \(T_{\text{write}}\) & Time duration: flash writing & 12.9 mS \\ \(E_{\text{elec}}\) & Energy dissipation electronics & 50 nJ/bit \\ \(N_{\text{cyc}}\) & Number of clock cycles per task & \(0.97\times 10^{6}\) \\ \(C_{\text{avg}}\) & Avg. capacitance switch per cycle & 22 pF \\ \(I_{0}\) & Leakage Current & 1.196 mA \\ \(np\) & Constant: depending on the processor & 21.26 \\ \(f\) & Sensor frequency & 191.42 MHz \\ \(V_{t}\) & Thermal voltage & 0.2 V \\ \(f_{\text{LoRa}}\) & LoRa transmitter/receiver frequency & 2.4 GHz \\ \(S_{R}\) & LoRa SX1280 transceiver sensitivity & \(-\)99 dBm \\ SF & Spreading factor & 5 \\ BW & Bandwidth & 1625 kHz \\ \(d\) & Distance from WS to Base station & 500 m \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Description and parameter values for assessing the energy cost of the WS [31; 52; 55; 56]. * Figure 12a shows the evolution of each node's quantity of transmitted data during 31 days when the data size is set to 512 bits. It was observed that some WSs cannot transmit information on the state of the system because of the QoS requirement. This would make decision-making difficult, particularly for predictive maintenance operations in which the interventions consider the simultaneous observation of several data about the controlled system. * Figure 12b shows the total amount of data transmitted by each WS during the month. It can be observed that the hierarchy observed in the harvest rate is respected. The node with the highest harvest rate transmits up to 10 kbits of data during the month. * For Figure 12c,d, the QoS was set to 4096 bits of data, and it is observed that only 8 WS out of the 12 deployed are capable of transmitting data on the state of the system.