1. Introduction
Wastewater treatment has been one of the main objectives of the United Nations (UN) for years to guarantee the sustainability of the natural environment [
1]. To guarantee an effective water treatment, much effort has been made to evaluate and reduce the impact of water treatment plants and to guarantee autonomous operation with the greatest possible energy savings.
One of the most demanding processes in a wastewater treatment plant (WWTP) is the active sludge process (ASP) with nitrification/denitrification stages [
2]. Autonomous operation of WWTPs is based on the control of the values of certain variables for the good performance of the plant. In an ASP process, several variables are manipulated in WWTPs [
3,
4], for example, ammonia concentration or dissolved oxygen concentration (DO), which is one of the most widely used [
5].
Several control strategies have been proposed to control DO concentration: PIDs (Proportional- Integral-Derivative) [
6], Multivariable Control [
7] or Predictive Multivariable Control [
4,
8].
Nevertheless, these methods do not adapt their operation to changes of the quality in load or flow. To adapt to these changes (mainly due to variations in the external weather conditions), plant operators manually operate the settings of these methods.
To provide more intelligent control, several approaches based on artificial intelligence techniques have been described in the literature, such as neural networks [
7], support vector machines [
9], regression [
10], fuzzy logic [
3] or genetic algorithms [
11]. In a previous work [
12], the authors proposed a reinforcement learning approach in a simulation model of the WWTP to reduce costs in the process. The reinforcement learning approach allows a quick and autonomous adaptation of the plant to changes in the environmental conditions with minimal intervention of the plant operator. More recently, the authors proposed [
5] the use of a reinforcement learning agent with the goal of improving the energy and environmental efficiency for the N-ammonia removal process in WWTPs.
A common characteristic of all these control methods is that they require data about the characteristics of the water in the WWTP (temperature, soluble organic matter, oxygen, etc.) to operate efficiently. These data are usually obtained from physical sensors located at the plant.
However, many physical sensors are expensive to acquire and maintain. In addition, few of the physical sensors in WWTPs operate on-line [
13]. Thus, several attributes of the water cannot be monitored on-line by means of physical sensors. In these cases, soft-sensors can provide on-line information that cannot be directly obtained from physical sensors. In fact, a soft-sensor is defined as a
model that is capable of predicting variables that are hard to measure [
14]. This model is built from previous data, called training data, obtained from physical sensors.
The output of a soft-sensor can be used for the on-line prediction of certain variables, process monitoring, process fault detection, or hardware-sensor monitoring [
15]. Soft-sensors can be used to provide signals for a broad range of tasks depending on the available input data [
15]. The prediction of certain output variables from data available in WWTPs is usually done by means of machine learning techniques. For example, artificial neural networks, feedforward neural networks or self-organizing maps have been used in the literature [
15]. In addition, adaptive network-based fuzzy inference systems have been employed to develop models for the prediction of suspended solids [
16]. A comprehensive review of different measures obtained by soft-sensors in WWTPs using machine learning techniques can be found in [
15].
Plants operators are in charge of the process, and have to manage different settings of the plant depending on the different environmental conditions. One of the most relevant operational variables in WWTPs is the weather. However, weather is not an absolute measure. Weather is in some ways a subjective measure. There is an implicit uncertainty in how weather is perceived by different persons. The soft sensor designed in this paper for the prediction of current weather conditions (dry, rain or storm) is not an absolute weather sensor. It must learn from the best practices of plant operators what they consider a sufficient weather change to properly modify the set points. That is, the soft sensor learns the plant operator’s behavior. In other words, from the inflow data labeled by the operator, and using general machine learning techniques, the weather predictor is modeled with the final goal of improving the control of WWTPs.
To construct the soft-sensor, we completed the following steps that are common in a machine learning soft-sensor construction: data acquisition, data pre-processing, variable selection, model design, training and validation [
15].
For the experiments, we used a widely known and common benchmark for the simulation of WWTPs: Benchmark Simulation Model 1 (BSM1) [
17]. This benchmark is composed of an Active Sludge Model (ASM) [
18]; the definition of the particular WWTP (number, dimensions and characteristics of the tanks, dimensions and characteristics of the clarifier, etc.); and, most important for this work, a dataset with most of the relevant characteristics of the influent (inflow wastewater) that arrives at the WWTP.
The rest of the paper is organized as follows. In the next section, we describe the machine learning techniques applied in the experimentation of the weather soft-sensor. Afterwards, we briefly describe BSM1 and its inflow dataset, which is followed by the exploration and pre-processing tasks performed on the dataset. In
Section 3, we describe the results obtained in the experiments. We conclude in
Section 4 with a discussion of the results.
4. Discussion
In this work, we sought a soft-sensor that informs the advanced control system of a WWTP about the current weather condition by means of the inflow characteristics. The current weather signal is really important to improve the advanced control system in a WWTP. To this end, we wanted the inflow variables to be measured by as few widely applied sensors as possible. As discussed in
Section 2, we ended up with just three widely used sensors: Q, COD and N-ammonia.
We applied machine learning techniques to predict the current weather conditions from these three sensors. However, the current weather conditions experienced by the WWTP is not an absolute measure and it depends on the perception and the previous experiences of the operator in the plant. In fact, the plant operator perception of weather conditions is focused on the control of the plant so the characteristics for a dry, rainy or stormy weather may differ from a traditional weather forecast. Thus, the weather soft-sensor must
learn what the WWTP plant operator considers dry, rainy or stormy weather for an efficient control of the plant. In our opinion, this is the main reason we can see similar measures of Q, COD and N-ammonia under different weather conditions (see
Figure 2). The last implies that a raw consideration of sensors output makes this problem a really difficult task for machine learning predictors (see
Section 3 and
Table 3 and
Table 5).
To break this similarity of measures, in the pre-processing phase, we applied a first-order lag filter. However, if the filter were too strong, this breaking would be too high, which would overfit the machine learning model. Therefore, as shown in
Section 3 (
Table 3), we obtained high accuracy measures when applying a strong filter that had to be discarded when assessing an experiment with a more realistic validation dataset (see
Table 5).
Finally, we obtained an approximately 85% accuracy in the weather soft-sensor with two machine learning algorithms: KNN(1) and Random Forests. These results are encouraging, thus, as future work, it is intended to demonstrate the performance of the more accurate soft sensors to tackle advanced control tasks in WWTPs process. For instance, our previous results [
5,
43] could be improved by using these sensors. The real plant where we will test these sensors are the raceways reactors located at the IFAPA Research Center (Almería, Spain). This pilot plant belongs to the project that financed this work.