## 5 Results
### Energy Consumption Analysis  
With the lithium-ion battery we used for our test cases (3.6 V, 1000 mAh), the total energy budget available is: \(E_{\mathit{battery}}\) = 3.6 V \(\times\) 1000 mAh = 3600 mWh.  
ESP32 supports several power saving modes [49], enabling our device to achieve current consumption as low as 10 \(\upmu\)A in deep sleep mode. That way, the daily energy consumption of a sleeping device is \(E_{0}\) = 3.6 V \(\times\) 10 \(\upmu\)A \(\times\) 24 h = 864 \(\upmu\)Wh. We measured the energy costs during two critical operations, using an Otii Arc Pro Power profiler device:  
* Image collection and processing
* Data transmission over NB-IoT link  
The typical values for the energy consumption during different operations are shown in Table 6. The first measurement (Figure 12) was for the operation when the edge node wakes up, captures the image from the camera, executes the preprocessing and inference, and goes back to sleep. In such a case, the total energy spent for the operation is \(E_{1}\) = 64 \(\upmu\)Wh + 149 \(\upmu\)Wh + 36 \(\upmu\)Wh = 249 \(\upmu\)Wh.  
The other operation (Figure 13), which serves for the estimation of the communication costs, assumes that the edge node wakes up, connects to the network, transmits a data packet, and goes back to sleep. The NB-IoT module that goes to power save mode (PSM) upon each transmission skips the network registration phase on all subsequent transmissions after the initial one [50]; therefore, the cost of the network registration is here omitted from the calculation: \(E_{2}\) = 123 \(\upmu\)Wh + 570 \(\upmu\)Wh = 693 \(\upmu\)Wh.  
As expected, the data transmission operation turns out to be more expensive than the image capture + processing operation by the factor of \(E_{2}/E_{1}\) = 2.78. This increases to a factor of 8.24 when network registration is necessary, which must be carried out every time when the NB-IoT service is not available. This clearly justifies our approach to try to detect whether the digits were updated and to transmit data only if necessary.  
In a hypothetical use case when measurements are taken once every hour, the data are transmitted once a day, and the rest of the time is spent in deep sleep mode, the daily energy consumption is \(E_{daily}\) = \(E_{0}\) + 24 \(E_{1}\) + \(E_{2}\) = 7533 \(\upmu\)Wh. The total battery lifetime can be calculated as \(E_{\mathit{battery}}/E_{daily}\) = 477 days. This is a fairly intensive usage scenario, while in practice, the number of processing/transmission operations can be significantly reduced, thereby prolonging the battery lifetime to several years.  
To enable comparison with other solutions available in the literature, we calculated the average current consumption as \(I_{average}\) = \(E_{daily}/24\) h/3.6 V = 87 \(\upmu\)A. This is by at least  
\begin{table}
\begin{tabular}{l c} \hline \hline
**Operation** & **Energy [\(\upmu\)Wh]** \\ \hline MCU init & 64 \\ Image capture & 149 \\ Preprocessing + inference & 36 \\ \hline MCU init & 123 \\ Network connection & 1360 \\ Data transmission & 570 \\ \hline \hline \end{tabular}
\end{table}
Table 6: Energy consumption during different operations.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Average** & **B = 1, T = D2** & **B = 1, T = F2** & **B = 2, T = D2** & **B = 1,2, T = D2** & **B = 1,2, T = F4** \\ \hline
**Accuracy** & 94.21 & 93.88 & 96.75 & 95.48 & **97.01** \\ \hline \hline \end{tabular}
\end{table}
Table 5: Average accuracy for second test case.  
an order of magnitude more energy-efficient in comparison with other solutions, as shown in the following subsection.