License: arXiv.org perpetual non-exclusive license
arXiv:2310.20331v2 [eess.SY] 21 Dec 2023

Energy-Aware Adaptive Sampling for Self-Sustainability in Resource-Constrained IoT Devices

Marco Giordano 0000-0003-1106-3472 [email protected] D-ITET, ETH ZürichZürichSwitzerland Silvano Cortesi 0000-0002-2642-0797 [email protected] D-ITET, ETH ZürichZürichSwitzerland Prodromos-Vasileios Mekikis 0000-0003-0616-0657 [email protected] Hilti CorporationSchaanLiechtenstein Michele Crabolu 0000-0003-4308-2432 [email protected] Hilti CorporationSchaanLiechtenstein Giovanni Bellusci 0000-0002-5514-2503 [email protected] Hilti CorporationSchaanLiechtenstein  and  Michele Magno 0000-0003-0368-8923 [email protected] D-ITET, ETH ZürichZürichSwitzerland
(2023)
Abstract.

In the ever-growing Internet of Things (IoT) landscape, smart power management algorithms combined with energy harvesting solutions are crucial to obtain self-sustainability. This paper presents an energy-aware adaptive sampling rate algorithm designed for embedded deployment in resource-constrained, battery-powered IoT devices. The algorithm, based on a finite state machine (FSM) and inspired by Transmission Control Protocol (TCP) Reno’s additive increase and multiplicative decrease, maximizes sensor sampling rates, ensuring power self-sustainability without risking battery depletion. Moreover, we characterized our solar cell with data acquired over 48 days and used the model created to obtain energy data from an open-source world-wide dataset.

To validate our approach, we introduce the EcoTrack device, a versatile device with global navigation satellite system (GNSS) capabilities and Long-Term Evolution Machine Type Communication (LTE-M) connectivity, supporting MQTT protocol for cloud data relay. This multi-purpose device can be used, for instance, as a health and safety wearable, remote hazard monitoring system, or as a global asset tracker.

The results, validated on data from three different European cities, show that the proposed algorithm enables self-sustainability while maximizing sampled locations per day. In experiments conducted with a \qty3000\milli battery capacity, the algorithm consistently maintained a minimum of 24 localizations per day and achieved peaks of up to 3000.

sensor network, embedded systems, low-power, sustainability,energy harvesting, adaptive sampling rate, GNSS, LTE, tracking, bluetooth low energy
journalyear: 2023copyright: acmlicensedconference: 11th International Workshop on Energy Harvesting & Energy-Neutral Sensing Systems; November 12, 2023; Istanbul, Turkiyebooktitle: 11th International Workshop on Energy Harvesting & Energy-Neutral Sensing Systems (ENSsys’ 23), November 12, 2023, Istanbul, Turkiyeprice: 15.00doi: 10.1145/3628353.3628545isbn: 979-8-4007-0438-3/23/11ccs: Hardware Power estimation and optimizationccs: Computing methodologies Optimization algorithmsccs: Hardware Sensors and actuatorsccs: Networks Location based services

1. Introduction

Estimates suggest that there will be a deployment of approximately 30 billion IoT devices by the year 2025 (Rawat and Pandey, 2022; Islam et al., 2023). Such a number of connected devices poses a significant problem regarding energy sourcing: if all these devices were battery-powered, it would require a tremendous effort to recharge/change batteries, and it would impose a serious toll on emissions, cost, and overall sustainability (Weddell et al., 2013; Mileiko et al., 2023).

Energy harvesting presents a promising solution to this problem, as it offers the potential to extract electrical power from various environmental sources(Murphy et al., 2015). These include solar irradiation, thermal gradients, radio frequency, tribology, and kinetic energy, among others. However, scavenging ambient power is unreliable and inconsistent in nature (Bader and Oelmann, 2010): sources like solar energy vary with the period of the year, time of the day, and geographical location. Rechargeable batteries and super-capacitors serve as storage elements to cope with such fluctuations, but are often limited in capacity by size and cost constraints, potentially leading to system failure. Therefore, meticulous energy resource management is required, and smart energy-aware algorithms are a very promising avenue(Magno et al., 2009; Giordano et al., 2023).

Smart energy-aware algorithms can contribute to ensuring system operation is adapted according to the available energy (Srbinovski et al., 2015; Mayer et al., 2022; Balsamo et al., 2016). Literature provides several potential solutions in this field, such as dynamic voltage and frequency scaling (DVFS), energy-aware scheduling algorithms (Sabovic et al., 2021), and wireless sensor networks protocols (Mittal and Iwendi, 2019). However, oftentimes the activity with the highest power consumption is sensing, and therefore a low-power self-sustaining IoT sensor node must adapt its sampling frequency to accommodate energy requirements (Giouroukis et al., 2020). Adaptive sampling is a well-known technique, which found use also in energy harvesting systems (Heo et al., 2022; Buchli et al., 2015). However, many of the currently proposed implementation requires complex algorithm, with hefty computational and power requirements.

This paper proposes a FSM based algorithm that aims at maximizing a certain utility function, i.e. the sampling rate of a sensing system, given a specific battery size. In particular, our algorithm uses only the battery state of charge, as a proxy for the harvested energy, and is, therefore, agnostic to the energy source and eventual seasonality. We compare our algorithm to the state-of-the-art Finite Horizon Control (FHC), showing that the simplistic design of the algorithm minimizes computational cost and memory footprint while marginally losing on performance.

To validate the proposed algorithm, this paper introduces EcoTrack, a platform designed with low power and energy efficiency in mind. It can provide worldwide localization in an energy-neutral fashion, featuring GNSS and LTE-M connectivity to enable localization and long-range gateway-less communication. Being always connected to the internet, the system is also continuously listening to alarms sent by the cloud to signal, for example, a hazardous condition on the work site.

Moreover, the device has a flexible nature: it can be repurposed as an asset tracking device with just a firmware change, as further analyzed and reported in this work, or deployed in potentially harmful environments to track forest fires, requiring no human intervention for sustained operation.

A thorough evaluation of power requirements and a breakdown of power consumption is reported, as well as a simulation of self-sustainability at different latitudes, which showed failure-free operation over the time span of two years. Finally, the implementation of the developed algorithm, both in C and Python, has been made publicly available111https://github.com/ETH-PBL/EcoTrack.

The main contributions of this paper are listed as follows:

  • The design and implementation of an energy-aware adaptive sampling rate algorithm based on an FSM in order to achieve energy-neutrality in resource-constrained battery-powered systems.

  • The design of a low power GNSS, LTE-M and Bluetooth Low Energy (BLE) enabled sensor node.

  • The creation of a global solar irradiation model based on real-world data.

  • The evaluation of the proposed algorithm on the prototype system introduced in this paper with a comparison to the state of the art.

The paper is organized as follows: Section 2 surveys related work in adaptive algorithms, with a focus on energy harvesting, worker safety, and asset tracking devices. Section 3 explains the proposed energy harvesting solution to achieve zero-energy operation. Section 4 provides an overview of the system and each building block is explained thoroughly, motivating the choices in terms of performance and power consumption. Section 5 gives a detailed power analysis performed on the developed EcoTrack, showcasing our developed adaptive sampling algorithm in three cities at different latitudes. Section 6 draws conclusions from this work and future work is laid down.

2. Related Work

Previous works have demonstrated the key role of energy-aware algorithms in achieving self-sustainability (Mayer et al., 2022).

In (Mekikis et al., 2018), the authors investigate the connectivity performance of a large-scale sensor network, i.e., the ability of all sensors to deliver their data, that harvests solar energy to achieve a self-sustainable zero-energy network. Specifically, they propose an energy-aware algorithm that utilizes a solar radiation and cloud-cover model of a specific location, to adjust the frequency and power of the sensor transmissions. Their analytical framework provides closed-form solutions for the sensor transmission probability and the end-to-end connectivity probability, which can be employed to determine the parameters and conditions that ensure a self-sustainable network operation throughout the year.

In (Moser et al., 2007), Moser et al. implemented an optimal model predictive control (MPC) based algorithm, which adaptively manages the power of a self-sustaining system. Their system model captures the incoming energy, the storage capacity as well as tasks of various system components. As the incoming energy is unknown a priori, a predictor estimates it on a finite horizon in the first phase. Although more complex predictors can be used, for their evaluation they rely on the periodicity of the solar power (i.e. over each day) and knowledge of the already harvested energy over the past days. Using a cost function that maximizes the execution rate of the tasks, an MPC is then used to estimate the future execution rates over an entire horizon. By limiting the horizon and optimizing the memory footprint it was possible to implement the algorithm online on an ATmega128L. The execution time of the algorithm itself is around \qty2\milli, which corresponds to \qty32\kilo operations on their platform, over 40×40\times40 × more than our implementation (architecture compensated).

Instead of relying on an MPC, Thiele et al. employed a Finite Horizon Control (FHC) in (Buchli et al., 2015; Ahmed et al., 2019) and (Draskovic and Thiele, 2021), respectively. By assuming that the annual harvestable energy does not change much, the sampling rate over the horizon of a whole year is optimized using knowledge of the incoming energy, usually obtained from a predictor. Using the boundary condition that the battery state must be the same at the beginning and the end of the horizon and that the battery never runs out, an optimal strategy can be planned. However, it should be emphasized that this algorithm needs perfect knowledge of the incoming energy of the coming year to achieve optimality. For online implementations, this results in requiring a predictor of the future incoming energy and thus will not lead to an optimal control. The error with respect to the optimal control highly depends on the used predictor. In (Draskovic and Thiele, 2021), Draskovic et al. implemented the FHC on a TI MSP432 microcontroller unit (MCU) using a simple exponentially weighted moving average (EWMA) on past data as predictor. Due to the iterative solver that such an algorithm requires, solving the optimization problem over a horizon of \qty8 took \qty0.2, about \qty25\kilo\qty25\kilo\qty{25}{\kilo}25 times slower than our implementation.

In (Heo et al., 2022), Heo et al. implement a predictive energy-aware adaptive sampling method for wireless sensor networks. Based on historic recordings of the harvested energy as well as the current battery level, a deep actor-critic reinforcement learning implementation is used to adapt the sampling rate accordingly. The implementation consists of three states: Up, Stay, and Down. Based on two different agents, one being feed-forward and the other recurrent, probabilities for the next actions are evaluated. The implementation itself is built on OpenAI Gym (Brockman et al., 2016) and is therefore not (yet) suited for a low-power embedded application.

Although these algorithms often achieve optimality, they have several limitations. While all of them are computationally expensive, MPC- and FHC-based approaches rely on a predictor of the incoming power, which adds another layer of complexity to the algorithm. In contrast, the approach proposed in this paper is inspired by the congestion control used in the networking communication field, and relies on a simple FSM-based approach building on the core concepts of TCP congestion control, thus resulting in a simpler and more suited solution for IoT devices. Congestion has been identified as a networking problem in 1984 (Nagle, 1984), and congestion control has ever since been researched, with the most prominent algorithm being TCP Reno (Blanton et al., 2009). Although TCP Reno has already been applied for adaptive sampling in (Al-Hoqani and Yang, 2015; Monteiro et al., 2017), to the best of our knowledge there is no existing energy-aware algorithm exploiting TCP Reno that maximizes the sampling rate with respect to available energy.

3. Algorithm Design

To optimally use the harvested energy and avoid failure states, the sampling rate of power-hungry sensors needs to be adapted: if the rate is too high, the battery will empty during the weakest days of the year (or it requires to be much larger), while if the rate is too low, localizations are lost during days with more energy available. In our use case, the localization rate of the GNSS module has to be adapted in order to achieve the highest possible localization rate without running out of power. Therefore, in the following, we present a low-complexity and energy-aware algorithm to change the localization rate online, depending on the available energy in order to have the optimal trade-off performance vs lifetime.

3.1. Adaptive Sampling Algorithm

To optimize the adaptive sampling rate depending on the incoming energy, using the battery’s state of charge as a proxy, the paper proposes an FSM-based algorithm. Inspired by congestion control in network protocols, we identified the network throughput is equivalent to the localization samples per day, and the congestion of the network is equivalent to the battery state - which in turn depends on external influences, in our case on the total net income of energy. We, therefore, decided to implement its additive-increase/multiplicative-decrease (AIMD) algorithm, with a decrease factor of 2 as in TCP Reno and an increase rate of one measurement per hour (see Fig. 1). The state change between increasing or decreasing the rate is determined by an FSM (Section 3.1.1) and a metric function (Section 3.1.2).

3.1.1. finite state machine (FSM)

The FSM of the algorithm is represented in Fig. 1 with k𝑘kitalic_k being the number of sensor samplings per day.

ptk/2𝑘2k/2italic_k / 2ptk𝑘kitalic_kptstartptk++k{\scriptstyle++}italic_k + +ptmβ1𝑚subscript𝛽1m\leq\beta_{1}italic_m ≤ italic_β start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPTptβ1mβ2subscript𝛽1𝑚subscript𝛽2\beta_{1}\leq m\leq\beta_{2}italic_β start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ≤ italic_m ≤ italic_β start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPTptmβ2𝑚subscript𝛽2m\geq\beta_{2}italic_m ≥ italic_β start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPTptm>β1𝑚subscript𝛽1m>\beta_{1}italic_m > italic_β start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPTptm<β1𝑚subscript𝛽1m<\beta_{1}italic_m < italic_β start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPTptm>β2𝑚subscript𝛽2m>\beta_{2}italic_m > italic_β start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPTptm<β2𝑚subscript𝛽2m<\beta_{2}italic_m < italic_β start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT
Figure 1. State diagram of the FSM-based adaptive sampling algorithm: k/2𝑘2k/2italic_k / 2 means that k𝑘kitalic_k halves in the next step; k++k++italic_k + + means that k𝑘kitalic_k increases by a fixed rate in the next step, in our case 24; k𝑘kitalic_k means that k𝑘kitalic_k stays the same in the next step.

Each state shows whether the number of samplings per day, k𝑘kitalic_k, remains constant or is altered with respect to its old value. The parameters β1subscript𝛽1\beta_{1}italic_β start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT and β2subscript𝛽2\beta_{2}italic_β start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT determine together with the metric function m𝑚mitalic_m the threshold levels for state changes. Together with γ𝛾\gammaitalic_γ, the battery level threshold always leads to a multiplicative increase, they are the three parameters that need to be tuned.

To ensure feasibility under all circumstances, the optimization of the algorithm must be done under the worst-case conditions. This is for the reason that the algorithm does not rely on a predictor of the incoming energy and thus can not react to conditions worse than it was optimized on.

3.1.2. Metric Function

In Eq. 1, we outline the metric function m𝑚mitalic_m. Based on this function, which considers the change in battery capacity over the previous day, the algorithm adjusts the number of daily samplings, performing more or fewer as needed.

(1) m=B(b[t]b[t1])batt. state difference(1b[t]1)low batt. penalty+{,if b[t]γ0,otherwisehigh batt. reward𝑚subscript𝐵𝑏delimited-[]𝑡𝑏delimited-[]𝑡1batt. state differencesubscript1𝑏delimited-[]𝑡1low batt. penaltysubscriptcasesif 𝑏delimited-[]𝑡𝛾0otherwisehigh batt. rewardm=\underbrace{\vphantom{\begin{cases}0\\ 0\end{cases}}B\cdot(b[t]-b[t-1])}_{\text{batt. state difference}}-\underbrace{% \vphantom{\begin{cases}0\\ 0\end{cases}}\left(\frac{1}{b[t]}-1\right)}_{\text{low batt. penalty}}+% \underbrace{\begin{cases}\infty,&\text{if }b[t]\geq\gamma\\ 0,&\text{otherwise}\end{cases}}_{\text{high batt. reward}}italic_m = under⏟ start_ARG italic_B ⋅ ( italic_b [ italic_t ] - italic_b [ italic_t - 1 ] ) end_ARG start_POSTSUBSCRIPT batt. state difference end_POSTSUBSCRIPT - under⏟ start_ARG ( divide start_ARG 1 end_ARG start_ARG italic_b [ italic_t ] end_ARG - 1 ) end_ARG start_POSTSUBSCRIPT low batt. penalty end_POSTSUBSCRIPT + under⏟ start_ARG { start_ROW start_CELL ∞ , end_CELL start_CELL if italic_b [ italic_t ] ≥ italic_γ end_CELL end_ROW start_ROW start_CELL 0 , end_CELL start_CELL otherwise end_CELL end_ROW end_ARG start_POSTSUBSCRIPT high batt. reward end_POSTSUBSCRIPT

where b[t]𝑏delimited-[]𝑡b[t]italic_b [ italic_t ] is the battery charge in percentage at a time t𝑡titalic_t (t𝑡titalic_t in days), B𝐵Bitalic_B the total capacity of the battery, and γ𝛾\gammaitalic_γ is the boundary for the battery charge, above which the algorithm increases the localization rate. In general, the metric m𝑚mitalic_m gets rewarded when (i) the battery’s charge is high; (ii) the battery’s charge increased; and punished when (i) the battery’s charge is low; (ii) the battery’s charge decreased.

3.1.3. Algorithm Tuning

To find the optimal parameters for (β1,β2,γ)subscript𝛽1subscript𝛽2𝛾(\beta_{1},\,\beta_{2},\gamma)( italic_β start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_β start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , italic_γ ) of the state-machine and the metric function, the three parameters have to be found by solving the optimization problem Eq. 3 under the following inequality constraints:

(2) b[]5%b[]100%k24𝑏delimited-[]percent5𝑏delimited-[]percent100𝑘24\displaystyle\begin{split}b[\cdot]&\geq 5\%\\ b[\cdot]&\leq 100\%\\ k&\geq 24\\ \end{split}start_ROW start_CELL italic_b [ ⋅ ] end_CELL start_CELL ≥ 5 % end_CELL end_ROW start_ROW start_CELL italic_b [ ⋅ ] end_CELL start_CELL ≤ 100 % end_CELL end_ROW start_ROW start_CELL italic_k end_CELL start_CELL ≥ 24 end_CELL end_ROW

The overall goal of the parameter search is the maximization of k𝑘kitalic_k over the course of a full year (Eq. 3) while ensuring at least one positioning per hour.

(3) J=maxk+(t=0Tk[t])subj. to Eq. 2𝐽subscript𝑘superscriptsuperscriptsubscript𝑡0𝑇𝑘delimited-[]𝑡subj. to Eq. 2J=\max_{k\in\mathbb{N}^{+}}\left(\sum\limits_{t=0}^{T}k[t]\right)\ \text{subj.% to \lx@cref{creftype~refnum}{eq:constraints}}italic_J = roman_max start_POSTSUBSCRIPT italic_k ∈ blackboard_N start_POSTSUPERSCRIPT + end_POSTSUPERSCRIPT end_POSTSUBSCRIPT ( ∑ start_POSTSUBSCRIPT italic_t = 0 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT italic_k [ italic_t ] ) subj. to

with T𝑇Titalic_T being a full year and k𝑘kitalic_k evolving as described in Section 3.1.1.

4. Materials and Methods

In this section, we introduce the platform employed to test the algorithm, including the system design choices for optimal power management and a detailed power consumption breakdown of the prototype. The setup and data collection used to validate the algorithm are also reported.

4.1. Validation Platform

Figure 2. Overview of the developed EcoTrack

4.1.1. Hardware

The components of the EcoTrack were carefully selected as a trade-off between performance and availability of low-power states, targeting an online-adaptable duty-cycled application.

At the heart of the badge, there is the GNSS and LTE-M module. The SARA R510M8S from u-blox has been selected as it combines the SARA R510S LTE-M module with the M8 GNSS receiver, which can be run simultaneously and independently, offering a sweet spot design in terms of physical space and power. The module also hosts a hardware-based root of trust, which is essential for providing security features. In our application, it has been exploited to provide a secure MQTT connection to Amazon Web Services (AWS) cloud, asynchronously encrypting every message exchanged by the badge and the servers. Moreover, the LTE-M module allows to download GNSS assistance packets to improve energy efficiency and time to fix. In particular, these packets include: (i) ephemeris, giving up-to-date information about the satellites’ health; (ii) clock correction coefficients and orbital information (valid for few hours); and (iii) almanac data, providing satellites’ orbits (up to 90 days).

The MCU of choice is the nRF52833, a Cortex-M4 from Nordic Semiconductor operating at a frequency of \qty64\mega and offering \qty512\kilo of flash and \qty128\kilo of RAM. It features a power consumption as low as \qty52\micro/\mega and provides a low-power state with full RAM retention at just \qty1.8\micro.

The badge also features a 6-DoF inertial measurement unit (IMU) from STMicroelectronics, the LSM6DSLTR. It offers a high sample rate of up to \qty6664 for both accelerometer and gyroscope, with a full scale of ±\qty8Gplus-or-minus\qty8𝐺\pm\qty{8}{G}± 8 italic_G and ±\qty2000dpsplus-or-minus\qty2000𝑑𝑝𝑠\pm\qty{2000}{dps}± 2000 italic_d italic_p italic_s respectively. It can achieve low power operation down to \qty9\micro for accelerometer-only continuous sampling at \qty12.5, which allows for motion and drop detection using the chip’s built-in functions.

Finally, the badge hosts the SHTC3, a temperature and humidity sensor from Sensirion, and a series of accessory electronics, such as a fuel gauge, a battery charger, different power converters, and load switches for optimal power management and minimal leakage.

4.1.2. Firmware

Given the complexity of the firmware and all the subsystems involved, the firmware framework was designed based on Zephyr, an open-source and cross-platform real-time operating system (RTOS).

An overview of the firmware structure is provided in Fig. 3. The application starts initializing the drivers for the sensors and the SARA, proceeds then to start advertising the BLE, and then the init thread goes indefinitely into sleep. One of the threads checks whether the module is connected, and, in case it is not, tries to register again to the network. Another thread handles the localization and can either run periodically or on-demand if signaled with a semaphore.

The last two logically important threads are the alarm and IMU wake-up thread. Those threads can be woken up by one of the following active interrupts on the badge: (i) an SOS button; (ii) the free fall interrupt from the IMU, or (iii) an MQTT RX message on the Evacuation topic. The first can be triggered by the user in case they witness a dangerous situation, the fall alarm is triggered by the IMU in case a fall is detected, and the last is a message sent to all the workers in a particular zone to evacuate after the danger has been reported.

4.1.3. Power Estimation

Table 1. Power consumption breakdown of the different EcoTrack status. The system voltage is \qty3.8
Component Power state Power consumption
Baseline Switched-off \qty0.296\micro
Baseline - MCU BLE adv. (UART on) \qty4.94\milli
BLE adv. \qty885.0\micro
SARA GPS \qty258.40\milli
Idle Connected \qty9.12\milli
LTE connecting \qty456.00\milli
Idle \qty2.66\milli
Deep sleep \qty266.0\micro
Energy per localization \qty4.7
IMU Free fall / wake \qty760.00\micro
Temperature Measure \qty1.90\milli
Sleep \qty190.00\micro
Summary Localization \qty5.1
Low power idling \qty19\milli
Refer to caption
Figure 3. RTOS task overview. The lightning represents an interrupt-enabled thread.

A thorough power profiling was performed on the developed smart node, with special attention towards the Global Positioning System (GPS) and LTE-M modules. In Table 1, we report a power consumption breakdown for each component in the EcoTrack in different power states. Starting with EcoTrack connected to a battery but still in a powered-off state, the system switch has a sub-\unit\micro leakage from the system switch. The MCU has two different baselines depending on whether the UART is always listening (necessary to receive messages from the SARA module), or in an OFF state. In both cases, the MCU is in low power when not active and advertising BLE with a period of \qty7. The most power-hungry component in active mode, as expected, is the SARA module, with the peak power during the LTE-M connection and GPS tracking. Staying always connected consumes significantly more power

Complementing the power profiling, there are two more sensors, the IMU and the temperature and humidity. The former is continuously sampling at \qty12.5 with onboard always-on fall detection activated, while the second is wakened up in a configurable interval to collect a temperature and humidity sample.

Having both GNSS and Long-Term Evolution (LTE) in the same package allows for enhancing the GNSS performance by downloading the location information from an online server rather than directly from the satellite. Assisted GNSS can obtain fixes in seconds, up by two orders of magnitude faster than GNSS-only, especially with first position fixes. In this work, we choose to use only the GNSS (without any aid) because it does not require any subscription and represents the worst case in terms of energy consumption.

4.2. Solar Harvesting and Dataset

To guarantee the necessary average power, as well as the resulting energy costs per localization, the device was equipped with two SM141K08TFV solar cells from AnySolar connected in parallel with a total surface of \qtyproduct45 x 58\milli, and a BQ25570 Energy Harvester from TI. As the solar cells’ datasheet does not provide the power-vs-irradiance characteristic, in a first step the harvesting circuit including the solar cells had to be characterized. Then, in order to prove that our adaptive sampling algorithm is robust to different latitudes, i.e., places with different solar irradiation potential, solar irradiance datasets from different latitudes were fed to our model to compute the harvested power.

Refer to caption
Figure 4. FSM-based adaptive sampling algorithm applied on the validation data from Barcelona, Munich, and London.
(a) Harvested energy per day. (b) Localizations k𝑘kitalic_k per day. (c) Evolution of the battery’s charge.

4.2.1. Solar Cell Model

Using a source measurement unit (SMU) (Keysight B2902A) and an ambient light sensor (TI OPT3002) the solar cells and harvester were exposed to daylight for 48 days and the solar irradiance and harvested power were measured. Thereby, the SMU simulated a battery with a voltage of \qty3.7 as variable load.

As the OPT3002 saturates at an irradiance of \qty100\per\squared, the linear relation between harvested power and solar irradiance (Miozzo et al., 2014; Gianfreda et al., 2014; Politaki and Alouf, 2017) has been exploited to obtain a model between harvested power and solar irradiance: A Ridge Regression as in Eq. 4 has been applied to a randomly sampled train-test split of our (non-saturated) dataset (80%/20%percent80percent2080\%/20\%80 % / 20 %).

(4) f:EeP,α=0.1:𝑓formulae-sequencesubscript𝐸𝑒𝑃𝛼0.1f:\ E_{e}\to P,\ \alpha=0.1italic_f : italic_E start_POSTSUBSCRIPT italic_e end_POSTSUBSCRIPT → italic_P , italic_α = 0.1

with Eesubscript𝐸𝑒E_{e}italic_E start_POSTSUBSCRIPT italic_e end_POSTSUBSCRIPT being the irradiance (\unit\per\squared) and P𝑃Pitalic_P the harvested power (\unit). The root-mean-square error (RMSE) of the obtained model when predicting the harvested power using the solar irradiance of the test set was \qty4.81\milli, while the mean-absolute error (MAE) was \qty2.20\milli which corresponds to an error of less than 0.5% with respect to the maximum peak power of the solar cell.

4.2.2. Dataset Application

The next step was to apply the model of our characterized system to the historical data from the SARAH-2 dataset (Gracio Amillo et al., 2021) to determine the harvestable energy at different locations around the world over an entire year. The irradiance data of the vertical axis at a 0°0 ⁢ ° slope of the three European cities Berlin, Rome, and Zurich, which are located at different latitudes, were taken for tuning of the algorithm’s parameters, those of London, Munich, and Barcelona for validating its functionality.

When looking at the statistical measures of the estimated harvested power of the three cities, we find that the maximal harvested power, especially when considering only single days, is approximately \qty183\milli\qty183\milli\qty{183}{\milli}183, which is similar across the three cities. On the other hand, the minimal harvested power differs greatly across those cities: while all of the cities had their weakest days in December or January, it can be seen that the further north a city is located, the less solar irradiance it receives, resulting in a decrease in the amount of power that can be harvested. The minimal average power over one day with \qty3.73\milli is collected in Berlin, whereas the least sunny day in Rome gave an average power of \qty9.94\milli.

Using the data of the training cities together with the device’s power consumption as in Table 1 (highlighted in bold), the algorithm’s parameters have been determined as described in Section 3.1.3. Specifically, the final parameters have to be valid individually for all the locations. To that end, the optimal parameters have been determined to be β1=0.203subscript𝛽10.203\beta_{1}=-0.203italic_β start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT = - 0.203, β2=0.468subscript𝛽20.468\beta_{2}=0.468italic_β start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT = 0.468 and γ=0.67𝛾0.67\gamma=0.67italic_γ = 0.67.

Refer to caption
Figure 5. Comparison in total locations per year of the FHC algorithm, our algorithm, and a constant sampling rate.

5. Results

In this section, we validate the results of the determined parameters using the solar data of three new locations: London (northern Europe), Munich (central Europe), and Barcelona (southern Europe). Fig. 4 illustrates the data collected from the validation set of cities. More specifically, Fig. 4(a) shows the harvested energy, accumulated per day. As expected, Barcelona is the city with the highest harvested energy, while London has the least, and Munich is a middle-ground among the three. This trend is also noticeable in Figure 4(b), where the algorithms’ results are reported in terms of localizations per day. The well-known ”TCP sawtooth” pattern is recognizable in the plot. Lastly, in Figure 4(c), the battery state of charge is plotted. Even though the parameters were obtained in other locations, we can observe that the battery charge of the devices never drops below 10%. Notable is, that for London, where there is substantially less energy during winter than in the other cities, the battery drops close to 10%. This is expected, as its harvested energy is close to the one that determined the tuning parameters. Moreover, the algorithm manages to successfully adapt the rate of localization when more energy is available, i.e., as the amount of harvested energy rises or falls, there is a corresponding increase or decrease in the localization rate, respectively.

To underline the efficiency of our algorithm, we compared it to the FHC algorithm from (Ahmed et al., 2019) as well as a constant sampling rate. The constant rate of localizations was optimized individually on the historical data for each of the three cities London, Munich, and Barcelona, so that the battery charge never falls below 5%. The FHC algorithm was run with the same boundary conditions as our algorithm, except that it was given the full history data as a predictor, in a clairvoyant setting. It optimizes mathematically the number of localizations per hour and represents the maximum possible with the given boundary conditions and the condition b[0]=b[T]𝑏delimited-[]0𝑏delimited-[]𝑇b[0]=b[T]italic_b [ 0 ] = italic_b [ italic_T ], in a horizon of 365 days. As it is clairvoyant by knowing already the incoming energy, it is in reality not implementable and its result shows how close one can come to the optimum.

A comparison of the two algorithms together with a constant localization rate (tuned to each city individually) can be seen in Fig. 5. The total number of locations per year is reported, and, as expected, the constant rate of localizations performs the poorest because many more measurements would be possible in summer, whereas the optimal FHC performs the best. Our algorithm performs too conservatively in London (0.88×0.88\times0.88 × of FHC) and Munich (0.85×0.85\times0.85 × of FHC) and is closer to optimality in Barcelona, where there is more energy available (0.95×0.95\times0.95 × of FHC). However, compared with the constant localization rate, we achieved an increase of 2.06×2.06\times2.06 × and 8.68×8.68\times8.68 × more localization per year in Barcelona and London, respectively. For fairness, we kept the same tuning on the different cities to evaluate it in fair condition, on the other hand, knowing the energy expectation according to the reference city our algorithm can be tuned to reach a higher localization rate when needed. Moreover, this evaluation does not include the energy overhead due to the adaptive algorithm as we wanted to show the theoretical limits of the 3 algorithms without the platform-dependent energy overhead, which is analyzed below.

To evaluate the energy and computational overhead of both our algorithm and the FHC we proceed as follows: we implemented and profiled our adaptive sampling algorithm on the MCU of the EcoTrack (ARM Cortex-M4F-based nRF52833, clocked at \qty64\mega), resulting in only 527 cycles per execution. Regarding the FHC, the authors in (Draskovic and Thiele, 2021) did not state the clock frequency of their MCU, therefore we evaluated numbers from \qty3\mega (default clock frequency (Instruments, 2018, p. 14)) up to \qty48\mega (maximum frequency) to be the MCU clock speed, making their embedded implementation requiring \qty0.6\mega cycles in the best case, as shown in Table 2. It is important to notice that both MCUs, the MSP432 and the nRF52833, use the same ARM Cortex-M4F-based core, so the comparison is done in fair conditions and using the default clock frequency leads to the best possible clock count and energy consumption for the FHC. Additionally, our implementation needs to be executed only once per day and requires just knowledge of the current battery state and the one of the day before. On the other hand, the embedded FHC implementation has to be executed every hour and needs additional hardware to sense the harvested energy and more memory to store recorded data over a full horizon of \qty8. Its memory footprint scales therefore with a complexity of 𝒪(n)𝒪𝑛\mathcal{O}(n)caligraphic_O ( italic_n ), since it has to store past values over a full horizon to run a prediction. Ours needs only the previous state of the battery, therefore presenting a memory complexity of 𝒪(1)𝒪1\mathcal{O}(1)caligraphic_O ( 1 ).

Table 2. Computational cost comparison between state-of-the-art adaptive sampling algorithms. The cycle cost of (Draskovic and Thiele, 2021) is estimated using frequency from [\qty3\mega, \qty48\mega] of the MCU.

Algorithm Duration Computational cost FHC (Draskovic and Thiele, 2021) MSP432 \qty200\milli \qty0.6\mega\qty9.6\megaabsent\qty0.6\mega\qty9.6\mega\approx\qty{0.6}{\mega}-\qty{9.6}{\mega}≈ 0.6 - 9.6 cycles static rate nRF52833 \qty0\micro 00 cycles this work nRF52833 \qty8.24\micro 527527527527 cycles

One of the goals of the proposed algorithm is to have a flexible and lightweight algorithm for adaptive sampling which we demonstrated in this evaluation. Moreover, we target ultra-low power embedded hardware, where the on-time of each component has to be minimized, including the MCU itself. We demonstrated that in parity of conditions, the computational overhead is orders of magnitude lower than the FHC when run in the same processors. A complete iteration from the sampling of the battery voltage using the analog-digital converter (ADC) (16×16\times16 × oversampling, \qty40\micro acquisition time) until the adjustment of k𝑘kitalic_k, the algorithm requires just \qty706.24\micro222code optimized with -O2 in average, and consuming about \qty2.70\micro per day. More detailed results can be found in Table 3.

Table 3. Duration and energy consumption over one day of the adaptive sampling algorithm
Task Duration E per day
Sampling the ADC \qty698\micro \qty2.57\micro
Estimating charge level \qty4.08\micro (261 cycles) \qty61.99\nano
Metric and FSM \qty4.16\micro (266 cycles) \qty63.18\nano
TOTAL \qty706.24\micro \qty2.70\micro

6. Conclusion

This paper presented the design and implementation of a low-complexity energy-aware algorithm for adaptive sampling under constrained energy conditions. The algorithm was compared to the state-of-the-art algorithms for adaptive sampling and evaluated on a real-world application use case. Our proposed algorithm has a performance gap from an optimal clairvoyant FHC algorithm between 0.95×0.95\times0.95 × and 0.85×0.85\times0.85 × while being between 2.06×2.06\times2.06 × and 8.68×8.68\times8.68 × better than a constant sampling rate algorithm tuned on history data. On the other hand, it has an order of magnitude lower computational cost leading to a smaller energy overhead for the algorithm. The proposed algorithm has been ported on EcoTrack, demonstrating the self-sustainability of a GNSS-enabled IoT device over different latitudes, thanks to a solar cell model validated from collected harvesting data.

Future work will involve further evaluation of the effective localization rate when considering the energy overhead in the estimation of the localization rate. We intend to expand the comparison with other adaptive algorithms and incorporate a look-up table (LUT) containing various parameters tailored to the geolocation of the device. This approach aims to develop an energy-and-location-aware algorithm, potentially enhancing the performance of the proposed algorithm.

IoT
Internet of Things
MCU
microcontroller unit
RF
radio frequency
SoC
system-on-chip
BLE
Bluetooth Low Energy
IMU
inertial measurement unit
GPS
Global Positioning System
GNSS
global navigation satellite system
UART
universal asynchronous receiver transmitter
LTE
Long-Term Evolution
LTE-M
Long-Term Evolution Machine Type Communication
NB-IoT
Narrowband IoT
A-GPS
assisted GPS
A-GNSS
assisted GNSS
LPWAN
low-power wide-area network
AWS
Amazon Web Services
RTOS
real-time operating system
MQTT
MQTT
RAM
random-access memory
RSSI
received signal strength indicator
RFID
radio frequency (RF) identification
SiP
system-in-package
IC
integrated circuit
SMU
source measurement unit
RMSE
root-mean-square error
MAE
mean-absolute error
TCP
Transmission Control Protocol
FHC
Finite Horizon Control
ADC
analog-digital converter
FSM
finite state machine
AIMD
additive-increase/multiplicative-decrease
MPC
model predictive control
LUT
look-up table
WSN
wireless sensor network
EWMA
exponentially weighted moving average
LED
light-emitting diode
DVFS
dynamic voltage and frequency scaling

References

  • (1)
  • Ahmed et al. (2019) Rehan Ahmed, Bernhard Buchli, Stefan Draskovic, Lukas Sigrist, Pratyush Kumar, and Lothar Thiele. 2019. Optimal Power Management with Guaranteed Minimum Energy Utilization for Solar Energy Harvesting Systems. ACM Trans. Embed. Comput. Syst. 18, 4, Article 30 (jun 2019), 26 pages. https://doi.org/10.1145/3317679
  • Al-Hoqani and Yang (2015) Noura Al-Hoqani and Shuang-Hua Yang. 2015. Adaptive Sampling for Wireless Household Water Consumption Monitoring. Procedia Engineering 119 (2015), 1356–1365. https://doi.org/10.1016/j.proeng.2015.08.980 Computing and Control for the Water Industry (CCWI2015) Sharing the best practice in water management.
  • Bader and Oelmann (2010) Sebastian Bader and Bengt Oelmann. 2010. Enabling Battery-Less Wireless Sensor Operation Using Solar Energy Harvesting at Locations with Limited Solar Radiation. In 2010 Fourth International Conference on Sensor Technologies and Applications. IEEE, Venice, Italy, 7 pages. https://doi.org/10.1109/sensorcomm.2010.95
  • Balsamo et al. (2016) Domenico Balsamo, Alex S. Weddell, Anup Das, Alberto Rodriguez Arreola, Davide Brunelli, Bashir M. Al-Hashimi, Geoff V. Merrett, and Luca Benini. 2016. Hibernus++: A Self-Calibrating and Adaptive System for Transiently-Powered Embedded Devices. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems 35, 12 (2016), 1968–1980. https://doi.org/10.1109/TCAD.2016.2547919
  • Blanton et al. (2009) Ethan Blanton, Dr. Vern Paxson, and Mark Allman. 2009. TCP Congestion Control. RFC 5681. https://doi.org/10.17487/RFC5681
  • Brockman et al. (2016) Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. 2016. OpenAI Gym. arXiv:arXiv:1606.01540
  • Buchli et al. (2015) Bernhard Buchli, Pratyush Kumar, and Lothar Thiele. 2015. Optimal Power Management with Guaranteed Minimum Energy Utilization for Solar Energy Harvesting Systems. In 2015 International Conference on Distributed Computing in Sensor Systems. IEEE, Fortaleza, Brazil, 147–158. https://doi.org/10.1109/DCOSS.2015.9
  • Draskovic and Thiele (2021) Stefan Draskovic and Lothar Thiele. 2021. Optimal Power Management for Energy Harvesting Systems with A Backup Power Source. In 2021 10th Mediterranean Conference on Embedded Computing (MECO). IEEE, Budva, Montenegro, 1–9. https://doi.org/10.1109/MECO52532.2021.9460139
  • Gianfreda et al. (2014) Marco Gianfreda, Marco Miozzo, and Michele Rossi. 2014. SolarStat: modeling photovoltaic sources through stochastic Markov processes. https://www.dei.unipd.it/~rossi/Software/Sensors/SolarStat.zip
  • Giordano et al. (2023) Marco Giordano, Silvano Cortesi, Michele Crabolu, Lavinia Pedrollo, Giovanni Bellusci, Tommaso Bendinelli, Engin Türetken, Andrea Dunbar, and Michele Magno. 2023. Optimizing Iot-Based Asset and Utilization Tracking: Efficient Activity Classification With Minirocket on Resource-Constrained Devices. https://doi.org/10.48550/ARXIV.2310.14758 arXiv:2310.14758 [eess.SP]
  • Giouroukis et al. (2020) Dimitrios Giouroukis, Alexander Dadiani, Jonas Traub, Steffen Zeuch, and Volker Markl. 2020. A Survey of Adaptive Sampling and Filtering Algorithms for the Internet of Things. In Proceedings of the 14th ACM International Conference on Distributed and Event-Based Systems (Montreal, Quebec, Canada) (DEBS ’20). Association for Computing Machinery, New York, NY, USA, 27–38. https://doi.org/10.1145/3401025.3403777
  • Gracio Amillo et al. (2021) A.M. Gracio Amillo, N. Taylor, A.M. Martinez, E.D. Dunlop, P. Mavrogiorgios, F. Fahl, G. Arcaro, and I. Pinedo. 2021. Adapting PVGIS to trends in climate, technology and user needs. In 38th European Photovoltaic Solar Energy Conference and Exhibition (PVSEC). EU PVSEC, Online, EU, 907–911.
  • Heo et al. (2022) Seonyeong Heo, Philipp Mayer, and Michele Magno. 2022. Predictive Energy-Aware Adaptive Sampling with Deep Reinforcement Learning. In 2022 29th IEEE International Conference on Electronics, Circuits and Systems (ICECS). IEEE, Glasgow, United Kingdom, 1–4. https://doi.org/10.1109/ICECS202256217.2022.9971120
  • Instruments (2018) Texas Instruments. 2018. https://docs.rs-online.com/3934/A700000006811369.pdf. https://docs.rs-online.com/3934/A700000006811369.pdf
  • Islam et al. (2023) Bashima Islam, Yubo Luo, and Shahriar Nirjon. 2023. Amalgamated Intermittent Computing Systems. In Proceedings of the 8th ACM/IEEE Conference on Internet of Things Design and Implementation. Association for Computing Machinery, New York, NY, USA, 13 pages. https://doi.org/10.1145/3576842.3582388
  • Magno et al. (2009) Michele Magno, Davide Brunelli, Lothar Thiele, and Luca Benini. 2009. Adaptive power control for solar harvesting multimodal wireless smart camera. In 2009 Third ACM/IEEE International Conference on Distributed Smart Cameras (ICDSC). IEEE, Como, Italy, 7. https://doi.org/10.1109/icdsc.2009.5289358
  • Mayer et al. (2022) Philipp Mayer, Michele Magno, and Luca Benini. 2022. Model-based design for self-sustainable sensor nodes. Energy Conversion and Management 272 (2022), 116335. https://doi.org/10.1016/j.enconman.2022.116335
  • Mekikis et al. (2018) Prodromos-Vasileios Mekikis, Elli Kartsakli, Angelos Antonopoulos, Luis Alonso, and Christos Verikoukis. 2018. Connectivity Analysis in Clustered Wireless Sensor Networks Powered by Solar Energy. IEEE Transactions on Wireless Communications 17, 4 (2018), 2389–2401. https://doi.org/10.1109/TWC.2018.2794963
  • Mileiko et al. (2023) Sergey Mileiko, Oktay Cetinkaya, Rishad Shafik, and Domenico Balsamo. 2023. Stateful Energy Management for Multi-Source Energy Harvesting Transient Computing Systems. In 2023 Design, Automation & Test in Europe Conference & Exhibition (DATE). IEEE, Antwerp, Belgium, 6 pages. https://doi.org/10.23919/date56975.2023.10137108
  • Miozzo et al. (2014) Marco Miozzo, Davide Zordan, Paolo Dini, and Michele Rossi. 2014. SolarStat: Modeling photovoltaic sources through stochastic Markov processes. In 2014 IEEE International Energy Conference (ENERGYCON). IEEE, Cavtat, Croatia, 688–695. https://doi.org/10.1109/ENERGYCON.2014.6850501
  • Mittal and Iwendi (2019) Mohit Mittal and Celestine Iwendi. 2019. A Survey on Energy-Aware Wireless Sensor Routing Protocols. EAI Endorsed Transactions on Energy Web 6, 24 (10 2019), 16 pages. https://doi.org/10.4108/eai.11-6-2019.160835
  • Monteiro et al. (2017) Leonardo C. Monteiro, Flavia C. Delicato, Luci Pirmez, Paulo F. Pires, and Claudio Miceli. 2017. DPCAS: Data Prediction with Cubic Adaptive Sampling for Wireless Sensor Networks. In Green, Pervasive, and Cloud Computing, Man Ho Allen Au, Arcangelo Castiglione, Kim-Kwang Raymond Choo, Francesco Palmieri, and Kuan-Ching Li (Eds.). Springer International Publishing, Cham, 353–368.
  • Moser et al. (2007) Clemens Moser, Lothar Thiele, Davide Brunelli, and Luca Benini. 2007. Adaptive Power Management in Energy Harvesting Systems. In 2007 Design, Automation & Test in Europe Conference & Exhibition. IEEE, Nice, France, 1–6. https://doi.org/10.1109/DATE.2007.364689
  • Murphy et al. (2015) Fiona Edwards Murphy, Michele Magno, Liam O’Leary, Killian Troy, Padraig Whelan, and Emanuel M. Popovici. 2015. Big brother for bees (3B) – Energy neutral platform for remote monitoring of beehive imagery and sound. In 2015 6th International Workshop on Advances in Sensors and Interfaces (IWASI). IEEE, Gallipoli, Italy, 6. https://doi.org/10.1109/iwasi.2015.7184943
  • Nagle (1984) John Nagle. 1984. Congestion Control in IP/TCP Internetworks. RFC 896. https://doi.org/10.17487/RFC0896
  • Politaki and Alouf (2017) Dimitra Politaki and Sara Alouf. 2017. Stochastic Models for Solar Power. In Computer Performance Engineering, Philipp Reinecke and Antinisca Di Marco (Eds.). Springer International Publishing, Cham, 282–297.
  • Rawat and Pandey (2022) Anshika Rawat and Amit Pandey. 2022. Recent Trends in IoT: A review. Journal of Management and Service Science (JMSS) 2, 2 (2022), 1–12.
  • Sabovic et al. (2021) Adnan Sabovic, Ashish Kumar Sultania, and Jeroen Famaey. 2021. Demonstration of an Energy-Aware Task Scheduler for Battery-Less IoT Devices. In Proceedings of the 19th ACM Conference on Embedded Networked Sensor Systems (Coimbra, Portugal) (SenSys ’21). Association for Computing Machinery, New York, NY, USA, 586–587. https://doi.org/10.1145/3485730.3493358
  • Srbinovski et al. (2015) Bruno Srbinovski, Michele Magno, Brendan O’Flynn, Vikram Pakrashi, and Emanuel Popovici. 2015. Energy aware adaptive sampling algorithm for energy harvesting wireless sensor networks. In 2015 IEEE Sensors Applications Symposium (SAS). IEEE, Zadar, Croatia, 6 pages. https://doi.org/10.1109/sas.2015.7133582
  • Weddell et al. (2013) Alex S. Weddell, Michele Magno, Geoff V. Merrett, Davide Brunelli, Bashir M. Al-Hashimi, and Luca Benini. 2013. A Survy of Multi-Source Energy Harvesting Systems. In Design, Automation & Test in Europe Conference & Exhibition (DATE), 2013. IEEE, Grenoble, France, 4 pages. https://doi.org/10.7873/date.2013.190