BODOQUE: An Energy-Efficient Flow Monitoring System for Ephemeral Streams
Effective environmental monitoring is crucial for managing global environmental challenges and providing the necessary data for Environmental Intelligence (EI). This discipline involves the integration of data from various sources to gain a comprehensive understanding of specific regions or processes. In this post, we introduce BODOQUE, a hardware-software infrastructure to monitor water flows in ephemeral streams where the water rarely flows with great force. BODOQUE uses a low-power TinyML-based camera to detect the presence of water, activating a more complex system to measure flow only when the water flows, thereby optimizing energy consumption. This device is being deployed in the Segura basin, Murcia, Spain. This work focuses on the power-saving capabilities of BODOQUE, comparing the energy consumption of different edge devices running the code that measures water flow in the streams. Our goal is to determine the optimal hardware setup for the system based on our experiments, which involve performance and energy consumption tests. The results provide valuable information for future environmental monitoring systems, considering the best balance among the device’s cost, performance, and energy consumption.
Our prior solution for monitoring ephemeral streams in the Segura Basin employed a system that combined an outdoor high-performance network camera and a small single-board computer (SBCs). The system was designed to transmit videos to a server only upon detecting rainfall in the surroundings, a determination made by consulting weather stations. While this approach was practical, it was burdened by several limitations. The system’s continuous operation led to high power consumption, with the SBC requiring, on average, 2.53 W and the network camera around 12 W. Moreover, the system’s dependence on transferring large volumes of data to a remote server for processing posed efficiency challenges.
The conception of BODOQUE was led by the need to develop a more efficient and sustainable solution for monitoring ephemeral streams. The system now operates bimodally, leveraging a low-power sensing module and a high-performance edge module, a design that allows for significant energy savings and increased operational efficiency. This bimodal operation allows the system to conserve energy by keeping the more complex and power-consuming part of the system inactive when not needed. The Edge Device, as a single-board computer, provides the necessary computational power for processing the video data, while the high-resolution camera captures high-quality video of the ephemeral streams. Combining these components in the high-performance edge module enables the BODOQUE system to perform its monitoring tasks effectively while optimizing energy consumption.
Low-Power Sensing Module
The low-power sensing module of the BODOQUE system consists of a low-power TinyML-based camera, a coordination unit, and a relay. This module is designed to be energy efficient and primarily serves to detect the presence of water in the streams and control the activation of the high-performance module. The low-power TinyML-based camera is the primary sensor in this module. Upon detecting the presence of water, it sends a signal to the coordination unit. The coordination unit plays a crucial role in the system. It is connected to a relay that controls the power supply to the components of the High-Performance Edge Module. When the coordination unit receives the signal from the low-power TinyML-based camera, it activates the relay, powering on the Camera and the Edge Device.
The coordination unit is also connected to the Edge Device. This connection allows the Edge Device to provide the coordination unit with the processing results, which the coordination unit then sends using a low-power, long-range and mesh-capable communication protocol based on LoRa (namely, AlLoRa protocol) which is another result of the SMARTLAGOON project, to a gateway for further processing and analysis. Moreover, the coordination unit receives a signal from the Edge Device when the processing is complete, and no more water is left to measure the streamflow. Upon receiving this signal, the coordination unit waits until the Edge Device is off and then deactivates the relay, powering off the High-Performance Edge Module’s components. This action restarts the process, with the low-power TinyML-based camera resuming its monitoring for the presence of water.
While the high-performance edge module is off, the coordination unit continues to send the results. It can store them, eliminating the need to keep the more power-consuming part of the system active while the results are being transmitted. This bimodal operation allows the system to conserve energy by keeping the more complex and power-consuming part inactive when not needed.
High-performance Edge Module
BODOQUE’s high-performance edge module is a more complex subsystem that includes a high-resolution camera and a single-board computer (SBC) serving as the Edge Device. This module is activated only when the low-power sensing module detects the presence of water.
The Edge Device runs a discharge measurement code (see below) that measures water flow in the streams. The data collected is then transmitted to the coordination unit, which sends it over LoRa using the AlLoRa protocol to a gateway for further processing and analysis.
When the system detects no more water flowing in the ephemeral stream, it stops requesting videos from the camera. After finishing the transfer of all the results to the coordination unit (for it to store them and transmit them later using the AlLoRa protocol), the Edge Device signals the coordination unit that it can be deactivated. The coordination unit waits for the Edge Device to turn itself off before shutting down the relay, halting the high-performance edge module.
Discharge measurement code
The discharge measurement code, central to our system, is based on the principles of image-based methodologies for discharge measurements. Over the past two decades, various methods have been developed, e.g., Large-Scale Particle Image Velocimetry (LSPIV), Particle Tracking Velocimetry (PTV), Space Time Image Velocimetry (STIV), among others. Herein we used a system which is based on a cross-correlation image velocimetry technique but overcomes some of the known factors that compromise LSPIV performance, such as glare, shadows, and lack of traceable features in the flow.
First, a short video must be acquired, captured by the High-performance Edge module’s camera. The frames are subdivided into interrogation windows, and the cross-correlation algorithm is applied to each window, yielding a displacement field. Erroneous vectors due to wrong matching patterns are filtered out, and a surface velocity profile is fitted to the stream-wise components of the velocity vectors. The discharge is then calculated by estimating the bulk velocity based on the surface velocity.
Initially developed for traditional computing architectures, the code has been successfully adapted in this study to run on devices powered by ARM processors, enabling the system’s deployment at the edge. This adaptation opens up new possibilities for using energy-efficient and cost-effective appliances in environmental monitoring systems.
The experiments, results, and discussion can be found in the work presented at the MobiHoc ’23 Twenty-fourth International Symposium on Theory, Algorithmic Foundations, and Protocol Design for Mobile Networks and Mobile Computing in Washington in October 2023.
Benjamín Arratia, Javier Prades, Salvador Peña-Haro, José Maria Cecilia, and Pietro Manzoni. 2023. BODOQUE: An Energy-Efficient Flow Monitoring System for Ephemeral Streams. In Proceedings of the Twenty-fourth International Symposium on Theory, Algorithmic Foundations, and Protocol Design for Mobile Networks and Mobile Computing (MobiHoc ’23). Association for Computing Machinery, New York, NY, USA, 358–363. https://doi.org/10.1145/3565287.3616526