Machine Learning at the Edge to optimise chemical usage in water plants

The monitoring and operation processes of a water network have traditionally been carried out using sensors and SCADAs, but they are largely operator-dependent. Given the criticality and the volumes of data handled, infrastructure managers are now running advanced algorithms at the edge. In this article, we explore the real case of deploying Machine Learning at the Edge to optimise chemical control processes in real time.

Water management
Written by:
Miren Zabaleta

Why Machine Learning at the Edge?

The reagent dosing control loops target variable elements or chemical compounds in the water that cannot be detected continuously with a probe. Instead, water samples need to be analysed at a laboratory to detect the levels of these elements and, since the results can take a day or more, by the time they come back they are no longer valid.

Before the introduction of advanced ML algorithms in the industry, the control loops used variables indirectly related to the element in question or even discrete manual actuation; these processes were not very precise and the processes inefficient, sometimes even requiring manual intervention.

However, now with Machine Learning based models, it is possible to predict the levels of chemical elements in the water, once only detectable through a laboratory analysis.

AI deployment and orchestration at the Edge. Acciona´s case study

Barbara’s proposed solution provides the necessary software infrastructure to deploy and orchestrate AI at the Edge.

The project consisted of the development of a system for monitoring communication with water management plant OPC-UA servers and the deployment of intelligence algorithms at the edge, involving:

1. Connectivity and data processing with alarms in case of an incident.

2. Running, updating and configuring “dockerized” applications remotely and securely.  

3. Edge nodes monitoring and management of their entire lifecycle (upgrades, reconfigurations, etc).

4. A graphic interface to view measurements in real-time

Acciona’s main goal with the integration of advanced algorithms at the Edge is to optimise the reagent dosing control loops for a more precise control of the variables being monitored and at the same time reduce the costs costs associated with chemical usage.


The main technological challenge was related to the connectivity OPC-UA protocol, and the authentication requirements to connect to the server and read parameters simply and separately, so that it would not affect the normal running of the plant.

The data exchanged between the edge node (gateway edge) and by extension, the OPC-UA server/client and Acciona’s remote servers are controlled by the application both, on the Edge gateway and on local servers. At each water plant there is a local OPC-UA server/client with which, via an Edge node loaded with Barbara OS (Secure Operating System), Acciona can access all information related to that specific plant.

With Barbara Management Panel, ACCIONA can run “dockerized” applications, and upgrade, update and configure them remotely and securely. Acciona can also control the edge node and manage its entire lifecycle.

The data exchanged between the edge node, the OPC-UA server/client and Acciona’s remote servers are controlled by the applications deployed by Acciona both, on the Edge Node and on local servers.

The monitoring of all installations is carried out in real time and on the same display platform. The use of IoT gateways using Barbara OS, overcomes the equipment fragmentation issues at each site. Regardless of the type or manufacturer of the data reporting devices, all the information collected is received and managed in the same format. Once installed, all tasks are performed remotely. Configuration changes and software adjustments are made remotely during the data collection and review phase.

Furthermore,device and data security is never compromised. Data is stored and transmitted in an encrypted format. Access to any software or hardware is secure. The chances of data leakage or device hacking are minimal. Barbara OS allows these security measures to apply across all gateways.

Discover more on how did Acciona manage to deploy, managed and maintained its algorithms at the Edge and:

1. Reduce the deployment time of its Edge applications by 86%.

2. Optimize its chemical control processes in real-time and in a cybersecure way.

3. Save 250.000 Euros per plant in its first year.

Download it now!

Barbara, the Cybsersecure Edge Platform for Water Plants

Edge Computing is becoming an essential technology for organizations looking to take full advantage of the Internet of Things (IoT) and other edge-oriented technologies. With the explosion of connected devices and the need for real-time data processing, it is no longer practical to send all data to a centralized data centre.

An Edge Platform is necessary to orchestrate this infrastructure as it provides the ability to manage and control the edge devices, applications, and data, while also providing security, scalability and flexibility. 

Barbara Industrial Edge Platform is a powerful tool that can help organizations simplify and accelerate their Edge App deployments, building, orchestrating and maintaining easily container-based or native applications across thousands of distributed edge nodes:

  1. Real-time data processing: Barbara allows for real-time data processing at the edge, which can lead to improved operational efficiency and cost savings. By processing data at the edge, organizations can reduce the amount of data that needs to be transmitted to the cloud, resulting in faster response times and reduced latency.
  2. Improved scalability: Barbara provides the ability to scale up or down depending on the organization´s needs which can be beneficial for industrial processes that have varying levels of demand.
  3. Enhanced security: Barbara offers robust security features to ensure that data is protected at all times. This is especially important for industrial processes that deal with sensitive information.
  4. Flexibility: Barbara is a flexible platform that can be customized to meet the specific needs of an organization. This allows organizations to tailor the platform to their specific use case, which can lead to improved efficiency and cost savings.
  5. Remote management: Barbara allows for remote management and control of edge devices, applications and data, enabling organizations to manage their infrastructure from a centralized location.
  6. Integration: Barbara can integrate with existing systems and platforms, allowing organizations to leverage their existing investments and improve efficiency.
The most important data of the Industry starts ‘at the edge’ across thousands of IoT devices, industrial plants and equipment machines. Discover how to turn data into real-time insight and actions, with the most efficient, zero-touch and economic platform.