A predictive model based on artificial neural networks (ANNs) for modeling primary settling tanks' (PSTs) behavior in wastewater treatment plants was developed in this study. Two separate ANNs were built using input data, raw wastewater characteristics, and operating conditions. The output data from the ANNs consisted of the total suspended solids (TSS) concentration and chemical oxygen demand (COD) as predictions of PSTs’ typical effluent parameters. Data from a large-scale wastewater treatment plant was used to illustrate the applicability of the predictive model proposal. The ANNs model showed a high prediction accuracy during the training phase. Comparisons with available empirical and statistical models suggested that the ANNs model provides accurate estimations. Also, the ANNs were tested using new experimental data to verify their reproducibility under actual operating conditions. The predicted values were calculated with satisfactory results, having an average absolute deviation of <20%. The model could be adapted to any large-scale wastewater plant to monitor and control the operation of primary settling tanks, taking advantage of the ANNs' learning capacity.

  • A predictive model of the PSTs behavior using ANNs was developed.

  • The proposed model accurately predicts the TSS concentration and COD in the effluent.

  • The wastewater treatment plant (WWTP) in Ibarra, Ecuador, was considered a case study to show the applicability and reproducibility of the model.

  • A reliable predictive model would improve the monitoring of WWTPs.

Graphical Abstract

Graphical Abstract
AAD

average absolute deviation (%)

ANNs

artificial neural networks

BOD

biochemical oxygen demand (mg/L)

COD

chemical oxygen demand (mg/L)

COD-09

COD model architecture using nine hidden nodes

COD-10

COD model architecture using 10 hidden nodes

f(x)

activation function in the output layer

MLP

multilayer perceptron

MSE

mean square error

PSTs

primary settling tanks

purelin

linear function

R2

coefficient of determination

tansig

hyperbolic tangent function

TSS

total suspended solids (mg/L)

TSS-07

TSS model architecture using seven hidden nodes

x

original value(s)

xmax

maximum value(s)

xmin

minimum value(s)

xnorm

normalized value(s)

WWTP

wastewater treatment plant

Greek letters

ϕ(x)

activation function in the hidden layer

Primary settling tanks (PSTs) are one of the principal controlling equipment in the performance and removal efficiency of wastewater treatment processes (Baki & Aras 2018). Therefore, modeling the performance of PSTs is essential for improving the whole process control at a wastewater treatment plant (WWTP). However, modeling the PSTs is difficult because of the intricacy of the treatment processes (Hamed et al. 2004; Bozkurt et al. 2016; Behera et al. 2020). They involve several complex and non-linear mechanisms, which are difficult to predict or explain by linear statistical or empirical mathematical models (Abba & Elkiran 2017). This complexity is further enhanced by the chemical, physical, and biological processes occurring during the raw sewage collection, transport, and treatment, making WWTP operations and control a complicated task (Raha 2007; Nasr et al. 2012). Hydraulic efficiency models utilizing tracer studies and deterministic models based on mathematical formulation have been applied to describe the dynamic behavior of full-scale settling tanks with limited success (Martínez-González et al. 2009; Zamanikherad et al. 2022). In practice, modeling the performance of full-scale primary settling tanks has been frequently done using regression-based models. These are empirical relationships derived strictly from daily average influent and effluent data, which better work under steady-state conditions (Jover-Smet et al. 2017; Al Bazedi & Abdel-Fatah 2020).

Many attempts to model the PSTs' performance have been developed using computational tools that describe their behavior in recent years. Models based on artificial intelligence – especially artificial neural networks (ANNs) – have been increasingly applied for modeling effluent quality in wastewater treatment processes (Raha 2007; Bagheri et al. 2015; Guo et al. 2015). Few studies on developing models based on ANNs applied to modeling primary settling tanks are reported (Zeng et al. 2003; Shahrokhi et al. 2011; Gamal & Smith 2002a).

This study aimed to develop a predictive model based on ANNs to describe the behavior of full-scale primary settling tanks to simplify and optimize the wastewater treatment and monitoring process. The proposed ANNs model consisted of two independent neural networks, using influent data of raw sewage and WWTP operating conditions to predict the characteristics of the clarified effluent. The first network determined the total suspended solids (TSS) concentration, and the second estimated the effluent's chemical oxygen demand (COD). The Ibarra wastewater treatment plant in Ecuador was considered a case study to illustrate the applicability of the proposed model.

Ibarra is a city located in the north of Ecuador, and it is the capital of the Imbabura province. The Ibarra WWTP has been operating since September 2018, and it processes an average sewage flow of 43,200 m3 per day from municipal effluents. The process consists of four steps: (1) pretreatment, (2) primary treatment by settling, (3) secondary treatment using biological means, and (4) sludge treatment based on anaerobic digestion. The treated effluent is finally discharged into the Tahuando river, where the natural purification process continues to reduce the levels of pollutant concentration. Two circular settling tanks operate in the plant, and they function as primary or secondary settling tanks. Both tanks have a diameter of 34 m and an effective volume capacity of 2,902.32 m3. The settling tanks operate with a hydraulic retention time of 2.3 hours. A surface skimmer system is fitted in each settling tank to remove the floating material. Chemical flocculants are not used during the settling process. More technical details about the Ibarra WWTP can be found in González et al. (2017).

The methodology (Figure 1) developed in this study consists of three main sections: (1) process analysis, (2) ANNs configuration, and (3) performance analysis.

Figure 1

Methodology proposal: outline.

Figure 1

Methodology proposal: outline.

Close modal

Process analysis

Selection of input and output parameters

Daily records of chemical, biological, and physical parameters related to the wastewater at the inlet and outlet of the primary settling tanks were carried out for one month (August 2019). The analyses were accomplished in the laboratory located in the installations of the Ibarra WWTP. The timing difference between the upstream and downstream measurements was approximately two hours. It was established based on the hydraulic retention time of the primary settling tanks at design operating conditions.

The operational variables and wastewater characteristics measured were classified to obtain the most representative information about the performance of the primary settling unit. The objective was to acquire more accurate predictions of the clarified effluent characteristics from the PSTs using a simplified ANNs model with fewer input parameters. Many input parameters would complicate the ANNs learning process, and unnecessary input parameters could reduce the prediction ability of ANNs models (Raha 2007; Snieder et al. 2020).

A four-week technical stay was carried out in the Ibarra WWTP to analyze and identify the critical variables related to the settling unit processes. The operational experience of the technical department staff was used to determine the selection of the critical variables, appealing to expert opinions (Ayyildiz et al. 2021). The input parameters selected for the proposed ANNs model were (1) inlet flow rate, (2) influent COD, (3) influent TSS concentration, and (4) influent turbidity. The output parameters were effluent COD and effluent TSS concentration. These output parameters were essential for monitoring the removal efficiency of the PSTs and controlling the operating conditions of subsequent process units (Bozkurt et al. 2016; Behera et al. 2020). Furthermore, parameters such as TSS, COD, and turbidity are significant factors in determining water quality (Kiron et al. 2021; Carreres-Prieto et al. 2022).

Data processing

Figure 2 shows the value range for the above input and output variables (see Table A.1). The proposed model is intended to be applicable under a typical range of wastewater characteristics and operating conditions in the treatment process.

Figure 2

Overall data set distribution: input and output data range.

Figure 2

Overall data set distribution: input and output data range.

Close modal
The overall data set was used to establish a suitable data set for the ANNs training phase. Before being introduced to the networks, the data set was scaled linearly (normalized) into the range [−1,1] using Equation (1):
(1)
where is the normalized value, x is the original value, and are the maximum and minimum values of the concerned variable, respectively. Normalization performs data smoothing and data normalization preparatory to modeling, and it is helpful for training algorithms used in ANNs (Guo et al. 2015; Asami et al. 2021).

ANNs configuration

The proposed ANNs model consisted of two separate ANNs. The first network was trained to predict effluent TSS concentration (labeled the TSS model), and the second one estimates effluent COD (labeled the COD model). The configuration was designed for each network to predict only one effluent parameter. This facilitated the training phase because each network would adjust the internal network parameters to only one output. A multi-layer perceptron (MLP) feedforward network was used in both cases. Figure 3 shows the multilayer-neural network architecture proposed for the TSS model and COD model. The input data for both networks consisted of the selected influent parameters, i.e., inlet flow rate, COD, TSS, and turbidity. In both cases, one hidden layer and one output node were used in the MLP neural network architecture. The hyperbolic tangent function and a linear function were used as activation functions in the hidden and the output layer, respectively. The number of hidden nodes ranged from 5 to 10 to determine the optimum number of neurons in the ANNs architecture. Finally, the output node provided the estimated value, which must be returned to the initial range to obtain the actual value. Similar configurations of layers and activation functions have been used with successful results (Nasr et al. 2012; Ruben et al. 2018; Gamal & Smith 2002a). A detailed mathematical description of internal network functions can be found elsewhere (Hamed et al. 2004; Sakiewicz et al. 2020). The Neural Network Toolbox of MATLAB R2019a software was employed to design the architecture and the ANNs model's training phase.

Figure 3

ANNs model proposal: MLP feedforward network architecture.

Figure 3

ANNs model proposal: MLP feedforward network architecture.

Close modal

A supervised learning algorithm was used for the training phase of both artificial neural networks to teach them how to relate input data patterns with output data, given by the treatment process, obtained downstream of the PSTs (Gamal & Smith 2002a). This training minimized the error between the MLP network output and the target output on the training data set. It was carried out using the Levenberg-Marquardt algorithm, a more powerful technique than the conventional gradient descent methods. This algorithm is more accurate (Kim 2017). The mean square error (MSE) was selected as the cost function for the training algorithm because of its simplicity and easy implementation. Initial random values were assigned to all internal ANNs parameters (commonly labeled weights). Batch mode processing for adjusting weights (updates were done after each epoch and not after each training pattern) was used during the training phase to minimize the mean square error function. In addition, a value of 1,000 was established as the maximum number of epochs (Aggarwal 2018).

The data set used in the learning process was randomly distributed in 70, 15, and 15% into training, validation, and testing steps. The data set distribution was required for implementing the algorithm employed in the training phase. de Menezes et al. (2018) successfully used this distribution in the water treatment process from Camaçari WWTP (Brazil). The prediction capability of the ANNs model was evaluated by considering the following statistical criteria: coefficient of determination (R2), MSE, and average absolute deviation (AAD).

Performance analysis

Comparison with available methods

Once the best ANN structure was obtained for each case, the proposed model was compared with methods for modeling the PSTs reported in the literature. For the comparison, the following methods were used: (i) an empirical relationship reported by Jover-Smet et al. (2017) to determine TSS removal efficiency, and (ii) a dynamic model proposed by Gamal & Smith (2002b) based on a combination of stochastic and transfer-function components. Since the model proposed by Jover-Smet et al. (2017) is applicable only for TSS removal estimations, an additional correlation reported by Christoulas et al. (1998) was considered to approximate the COD removal efficiency from the TSS removal estimations. These methods were evaluated with the same data set used for the ANNs model training stage. The performance analysis was based on the AAD.

ANNs model verification

To evaluate the applicability and reproducibility of the proposed model under actual operating conditions, the ANNs model was tested using new experimental data collected from the Ibarra WWTP two months (October 2019) after the training phase. This new data set corresponded to a continuous sampling program of two weeks. It was used to assess the prediction capability of the ANNs model under the actual operating conditions of the Ibarra WWTP. The verification process is essential to analyze the future incorporation of the proposed model in the monitoring system and process control of primary settling tanks in WWTPs. The difference between ANNs model estimations and experimental measurements was evaluated using AAD criteria. Average absolute deviations of ±20 and ±40% were considered to analyze the model's accuracy (Korkerd et al. 2021).

ANNs architecture establishment

Figure 4 presents the R2, MSE, and AAD values obtained during the training phase for different numbers of hidden nodes in MLP networks for both the TSS model and COD model. Figure 4(a) shows the variation of the coefficient of determination with the number of hidden nodes for the ANNs model. The R2 value ranges from 0 to 1 (from no correlation to a perfect fit), indicating how the variance of the measured data could be explained by the model (Guo et al. 2015). Typically, values of R2 greater than 0.5 are considered acceptable (Kim 2017; Aggarwal 2018). Thereby, the possible structures of the ANNs model that did not obtain an R2≥0.5 were discarded. R2 values ranged from 0.44 to 0.60 for the TSS model and 0.47 to 0.60 for the COD model. The best performance for the TSS model was achieved using seven hidden nodes (TSS-07), which corresponded to the maximum R2 value. The best performance was obtained using 10 nodes in the hidden layer (COD-10) in the COD model. The relatively low R2 values obtained were probably the result of data noise in both cases (Hamed et al. 2004). Guo et al. (2015) and Gamal & Smith (2002a) got similar results of R2 values for modeling effluent pollution concentration in WWTPs and primary settling tanks using machine learning models, respectively. Figure 4(b) shows the variation of MSE as a function of the number of hidden nodes for both the TSS model and COD model. The lower MSE values represented better network performance (zero value means no error). Therefore, the TSS model reached the best performance using seven hidden nodes, and this configuration obtained the minimum MSE value. In the case of the COD model, the minimum MSE value was achieved using 10 nodes in the hidden layer.

Figure 4

ANNs architecture establishment – main performance parameters: (a) R2; (b) MSE; (c) AAD.

Figure 4

ANNs architecture establishment – main performance parameters: (a) R2; (b) MSE; (c) AAD.

Close modal

Figure 4(c) illustrates the variation of the AAD value as a function of the number of hidden nodes in the ANNs model. For the TSS model, the values of AAD varied in the range from 22.87 to 28.97%. The minimum AAD value was achieved using the TSS-07 architecture. After this point, the AAD increased as the number of hidden nodes incremented. This suggests that the difference between the estimated value and experimental measurement will increase if more than seven nodes in the hidden layer are used. Therefore, employing more than seven hidden nodes for the TSS model would decrease the accuracy of model predictions. On the other hand, similar values of AAD were obtained using different numbers of nodes for the COD model. The AAD values range from 11.12 to 13.74%. The minimum AAD value was reached using nine nodes in the hidden layer (COD-09). The best performance in terms of AAD was obtained using the COD-09 network for the COD model. There was no clear tendency between the number of hidden nodes and the AAD value for the COD model. However, the value of AAD remained constant through all the ranges in general terms.

Shahin (2013) and Rezazadeh et al. (2019) established that the best measure for the performance of neural network models should be based on the highest values of R2 and the lowest MSE values. The TSS-07 and COD-10 architecture achieved the best performance according to these criteria. Nevertheless, simplicity is an essential factor that should be considered in the model selection. It is crucial to preserve the parsimony principle to improve the generalization capacity of ANNs models; it states that using simpler models is usually preferable to more complicated ones (Kim 2017; Aggarwal 2018). For the TSS model, the network architecture of seven hidden nodes showed a significant difference from the other options.

The TSS-07 structure represented the optimum structure for the TSS model based on performance and simplicity. Also, it preserved the simplicity principle according to the Kolmogorov theory (Thomas et al. 2015), which establishes that the optimum number of hidden nodes must be less than two times that of node numbers used for the input layer. Using more nodes in the hidden layer leads to overfitting problems and weak performance of network estimations (Bashipour & Hojjati 2019). Then, the TSS-07 architecture was selected as the best option to predict the effluent TSS concentration.

The simplicity factor was also considered in selecting the optimum structure for the COD model. Both the COD-09 and COD-10 networks obtained similar results in terms of R2, MSE, and AAD parameters. The COD-10 architecture showed a slight improvement in comparison to the COD-09 architecture. However, the COD-09 network obtained similar results with fewer nodes, which indicates that the model would achieve optimum performance with simpler network architecture. Kolay et al. (2008) highlighted that using more than 10 nodes in the hidden layer will cause saturation of the neural network, which results in lesser-quality simulated results because of undesirable feedback to the network. The COD-09 architecture was selected as the best option to predict the effluent COD to avoid saturation problems and preserve the principle of simplicity.

Performance analysis

Comparison of models (ANNs model vs. available models)

The prediction ability of the ANNs model developed in this work was compared with both the empirical model reported by Jover-Smet et al. (2017) and the dynamic model proposed by Gamal & Smith (2002b). The comparison of estimated values obtained by the ANNs model and the other models is shown in Figure 5.

Figure 5

Comparison of ANNs model vs. available models in the literature: (a) TSS concentration; (b) COD.

Figure 5

Comparison of ANNs model vs. available models in the literature: (a) TSS concentration; (b) COD.

Close modal

If there is a perfect agreement between the model estimations and experimental measurements, all the points will lie along the 45° line (y=x). It can be seen that the values simulated by models spread around the 45° line, which implies neither overestimation nor underestimation (Naderpour et al. 2010). The difference between the estimated value and experimental measurement was considered in terms of AAD because this better illustrates the error of the models’ estimations. Hence, an estimation error range of ±20 and ±40% was established to analyze the models’ accuracy. In Figure 5(a), it is observed that the TSS model estimations were mainly concentrated within the ±20% error range. However, few estimated values were within the error range from 20 to 40%, which was related to the ANNs model's variability and precision of estimations. In contrast, the other models provided less accurate predictions than the TSS model. A significant amount of the estimated values generated by the Jover-Smet et al. (2017) and Gamal & Smith (2002b) models were outside the established ±40% error range.

The comparison between the ANNs model and other models based on COD measurements is shown in Figure 5(b). It suggests that the COD model reached a better performance in predicting experimental values than the previously reported models. The COD model predictions were mainly concentrated in the ±20% error range. There were no values outside the ±40% error range. On the other hand, many of the predicted values generated by the other models were outside the ±20 and ±40% error range. Furthermore, in both cases, the available models in the literature reached lower R2 values (R2<0.1) than the proposed model (R2>0.5).

There were few estimations of the ANNs model outside the ±40% error range, but these were unusual cases related to random fluctuations of wastewater parameters. These cases did not align with the proposed model during the ANNs training phase. A sudden change in the wastewater characteristics will produce incorrect predictions. In the case of temporary shock loads and dilutions in the influent, it is inevitable to experience fluctuations through the overall process units (Yel & Yalpir 2011). In particular, effluent discharged to the PSTs is often variable because of stormwater and intermittent discharges from an industrial process (Flynn 2018). Consequently, these extreme cases will be associated with a higher concentration of pollutants in stormwater and industrial discharges, affecting raw wastewater's COD and TSS concentration. However, the ANNs model obtained more accurate estimations than the literature reports in these particular cases.

Testing residuals also analyzed the difference between experimental values and estimated values provided by each model in terms of AAD criteria. Normal distribution was employed to analyze and compare the estimation error associated with each model. Figure 6 shows the distribution of estimation errors associated with each model. The statistical parameters related to each model's error distribution are detailed in Table 1.

Table 1

Comparison of distribution errors: statistical parameters

ModelDescriptionMean error (%)
Standard deviation (%)
TSSCODTSSCOD
ANNs model (this work) ANNs 22.87 11.12 22.98 9.43 
Gamal & Smith (2002b)  Stochastic model 38.49 26.58 43.64 27.65 
Jover-Smet et al. (2017)  Empirical correlation 100.15 75.84 99.57 86.17 
ModelDescriptionMean error (%)
Standard deviation (%)
TSSCODTSSCOD
ANNs model (this work) ANNs 22.87 11.12 22.98 9.43 
Gamal & Smith (2002b)  Stochastic model 38.49 26.58 43.64 27.65 
Jover-Smet et al. (2017)  Empirical correlation 100.15 75.84 99.57 86.17 
Figure 6

Normal distribution errors: (a) TSS concentration; (b) COD.

Figure 6

Normal distribution errors: (a) TSS concentration; (b) COD.

Close modal

Figure 6(a) illustrates the distribution of estimation errors related to the TSS concentration measurements. It is observed that the distribution associated with the estimations of the TSS model obtained the lowest mean AAD value. A significant reduction of mean error was obtained using the TSS model (22.87%) in comparison to the other models. Moreover, the distribution described by the TSS model estimations presented the lowest standard deviation value (22.98%), which indicated that the TSS model provides estimates with less error variability. Despite the TSS model showing a relatively high value of standard deviation, it was considerably lower than the values obtained with the Jover-Smet et al. (2017) and Gamal & Smith (2002b) models (99.57 and 43.64%, respectively). Therefore, the dispersion of errors associated with the TSS model estimations mainly concentrated on the mean value within a smaller variation range than the other models. These results indicated that the TSS model provided more accurate estimates with less variability than the Jover-Smet et al. (2017) and Gamal & Smith (2002b) models.

Figure 6(b) shows the distribution of estimation errors associated with the COD measurements. The distribution of the errors related to the COD model obtained the lowest mean AAD% value (11.12%) in comparison to the Jover-Smet et al. (2017) and Gamal & Smith (2002b) models (75.84 and 26.58%, respectively). A significant reduction in mean estimation error was observed using the COD model, and in addition, the dispersion and variability of error estimation were also reduced through the COD model. The distribution of errors associated with the COD model estimations had the lowest standard deviation value (9.43%) compared to the other models considered in the analysis. In particular, the proposed model generated assessments with an error variability of less than 10%. The proposed ANNs model obtained a better performance estimating TSS concentration and COD measurements than the models reported by Jover-Smet et al. (2017) and Gamal & Smith (2002b). The narrow range of error measures obtained using the ANNs model indicated the model's robustness (Hamed et al. 2004). Therefore, the robustness of the proposed ANNs model was also shown to be superior to the statistical model and the empirical model considered in this study.

ANNs model verification

A new experimental data set (10 sample data, see Table A.2) was used to verify the reproducibility and practical application of the ANNs model under the actual operating conditions of the Ibarra WWTP. Figure 7 corresponds to the relationship between the estimated values by the ANNs model and the experimental measurements of the new data set. Based on the error range observed in the training stage, average absolute deviations of ±20 and ±40% were considered as the error ranges to analyze the performance of the ANNs model.

Figure 7

ANNs model verification: (a) TSS concentration; (b) COD.

Figure 7

ANNs model verification: (a) TSS concentration; (b) COD.

Close modal

The relationship between TSS model estimations and TSS experimental measurements is exposed in Figure 7(a). Few sample patterns lay along the 45° line, implying a perfect agreement between the TSS model predictions and experimental data. Some points were within the ±20% error range, indicating reasonable estimations with a slight deviation of the measured value. Few estimated values were outside the ±20% error range, but they were inside the ±40% error range. Only one point had an estimation error higher than ±40%, which would be related to several factors’ variability and fluctuations of the sewage. Therefore, the TSS model had satisfactory results in predicting the TSS concentration of the clarified effluent in general terms.

Figure 7(b) corresponds to the relationship between estimated values by the COD model and COD experimental data. Some points lay along the 45° line; the COD model provided high accurate estimations for these cases. Some of the estimated values were outside the ±20% error range. However, the error associated with these estimations outside the expected error range was slightly higher than ±20%. In these cases, the COD model at least supplied a good approximation of the COD of the clarified effluent. The COD model was suitable for estimating COD measurements under actual operation conditions after the training phase.

In general, the proposed ANNs model achieved satisfactory performance in both the TSS concentration and COD estimations. It should be mentioned that the ANNs model has been trained on a minimal data set; however, it still was able to provide reasonable estimates. The calculated errors fell within the acceptable limits as the analytical error intervals were much higher in the measurements of these parameters (usually around ±20% error range) (Yel & Yalpir 2011). Furthermore, predictive models based on ANNs are flexible. Adaptive models that can be continuously adjusted to new scenarios. This flexibility is essential because ANNs models can be retrained and adapted to variations in wastewater characteristics or operating conditions using actual data. The development of predictive models is not only relevant for improving the process control system and operation of the treatment process. It also reduces economic costs and time associated with the regular laboratory analysis of wastewater to monitor effluent quality.

The ANN model developed to predict the TSS concentration and COD of the clarified effluent from a primary settling tank obtained satisfactory and accurate results during the training phase. Moreover, it showed a better performance and more accurate estimation than the available models reported in the literature. Something novel about this study was the verification process, which was carried out as a second test two months after the modeling phase to evaluate the proposed model's applicability and reproducibility over time. It turned out that the ANNs model achieved a satisfactory performance during the verification process, estimating the TSS concentration and COD of the effluent wastewater under actual operating conditions. It provided estimated values with high accuracy (±20% error range), which could be valuable information for operating the wastewater treatment process. Therefore, these results would represent a significant advantage to the applicability of this type of model in developing process control systems in the future. However, future studies are necessary for improving the modeling approach to the dynamic response of settling tanks.

The proposed ANNs model could be used for two main potential applications. First, ANNs can be used to simulate the response of PSTs. This could be a suitable strategy for operating the primary treatment unit. Then, this information about PSTs' responses can then be used as input data to develop control systems or operational plans for the downstream biological process. Moreover, settling tanks can also be improved using information obtained from simulations. In addition, this type of model could be adapted to the online monitoring and control system of PSTs. It would be a useful operational tool for monitoring the PSTs operation in real-time.

Predictive models based on artificial neural networks can be used to determine other analytical parameters in the treated effluent, such as biochemical oxygen demand (BOD), nitrates, phosphates, and ammoniacal nitrogen. Some studies could be planned to expand the ANNs model developed in this study, according to the operational needs or technical requests of WWTPs.

The authors acknowledge the support of the School of Chemical Sciences and Engineering at Yachay Tech University (project number CHEM21-10). The authors are grateful to the technical staff of the Ibarra wastewater treatment plant (Ecuador) for their active participation in this research project. The support of Andrew Nelson (English instructor at Yachay Tech University) is also appreciated.

All relevant data are included in the paper or its Supplementary Information.

The authors declare there is no conflict.

Abba
S.
&
Elkiran
G.
2017
Effluent prediction of chemical oxygen demand from the astewater treatment plant using artificial neural network application
.
Procedia Computer Science
120
,
156
163
.
doi:10.1016/j.procs.2017.11.223
.
Aggarwal
C.
2018
Neural Networks and Deep Learning
, 1st edn.
Springer International Publishing
,
Yorktown Heights
,
USA
.
doi:10.1007/978-3-319-94463-0
.
Al Bazedi
G.
&
Abdel-Fatah
M.
2020
Correlation between operating parameters and removal efficiency for chemically enhanced primary treatment system of wastewater
.
Bulletin of the National Research Centre
44
(
1
),
107
.
doi:10.1186/s42269-020-00368-y
.
Asami
H.
,
Golabi
M.
&
Albaji
M.
2021
Simulation of the biochemical and chemical oxygen demand and total suspended solids in wastewater treatment plants: data-mining approach
.
Journal of Cleaner Production
296
,
126533
.
doi:10.1016/j.jclepro.2021.126533
.
Ayyildiz
E.
,
Yildiz
A.
,
Taskin Gumus
A.
&
Ozkan
C.
2021
An integrated methodology using extended swara and dea for the performance analysis of wastewater treatment plants: Turkey case
.
Environmental Management
67
(
3
),
449
467
.
doi:10.1007/s00267-020-01381-7
.
Bagheri
M.
,
Mirbagheri
S. A.
,
Ehteshami
M.
&
Bagheri
Z.
2015
Modeling of a sequencing batch reactor treating municipal wastewater using multi-layer perceptron and radial basis function artificial neural networks
.
Process Safety and Environmental Protection
93
,
111
123
.
doi:10.1016/j.psep.2014.04.006
.
Baki
O.
&
Aras
E.
2018
Estimation of BOD in wastewater treatment plant by using different ANN algorithms
.
Membrane Water Treatment
9
(
6
),
455
462
.
doi:10.12989/mwt.2018.9.6.455
.
Bashipour
F.
&
Hojjati
B.
2019
Predictive models for density correction factor of natural gas and comparison with standard methods
.
Oil & Gas Science and Technology – Revue d'IFP Energies nouvelles
74
,
31
.
doi:10.2516/ogst/2019006
.
Behera
C.
,
Al
R.
,
Gernaey
K.
&
Sin
G.
2020
A process synthesis tool for WWTP – an application to design sustainable energy recovery facilities
.
Chemical Engineering Research and Design
156
,
353
370
.
doi:10.1016/j.cherd.2020.02.014
.
Bozkurt
H.
,
van Loosdrecht
M.
,
Gernaey
K.
&
Sin
G.
2016
Optimal WWTP process selection for treatment of domestic wastewater – A realistic full-scale retrofitting study
.
Chemical Engineering Journal
286
,
447
458
.
doi:10.1016/j.cej.2015.10.088
.
Carreres-Prieto
D.
,
Ybarra-Moreno
J.
,
García
J. T.
&
Cerdán-Cartagena
F.
2022
Evaluation of genetic models for COD and TSS estimation in wastewater through its spectrophotometric response
.
Water Science and Technology
.
doi:10.2166/wst.2022.138
.
Christoulas
D.
,
Yannakopoulos
P.
&
Andreadakis
A.
1998
An empirical model for primary sedimentation of sewage
.
Environment International
24
(
8
),
925
934
.
doi:10.1016/S0160-4120(98)00076-2
.
de Menezes
F.
,
Fontes
R.
,
Oliveira-Esquerre
K.
&
Kalid
R.
2018
Application of uncertainty analysis of artificial neural networksfor predicting coagulant and alkalizer dosages in a water treatment process
.
Brazilian Journal of Chemical Engineering
35
(
4
),
1369
1381
.
doi:10.1590/0104-6632.20180354s20170039
.
Flynn
D.
2018
The Nalco Water Handbook
, 4th edn.
McGrawHill Education
,
New York
,
USA
.
Gamal
A.
&
Smith
D.
2002a
Modeling a full-scale primary sedimentation tank using artificial neural networks
.
Environmental Technology
23
(
5
),
479
496
.
doi:10.1080/09593332308618384
.
Gamal
A.
&
Smith
D. W.
2002b
A combined transfer-function noise model to predict the dynamic behavior of a full-scale primary sedimentation tank
.
Water Research
36
(
15
),
3747
3764
.
doi:10.1016/S0043-1354(02)00089-1
.
González
A.
,
Xandra
U.
,
López
A.
&
Lopez-Mier
L.
2017
Ibarra WWTP, Ecuador
.
FuturENViRO
43
,
51
69
.
Guo
H.
,
Jeong
K.
,
Lim
J.
,
Jo
J.
,
Kim
Y.
,
Park
J.
,
Kim
J.
&
Cho
K.
2015
Prediction of effluent concentration in a wastewater treatment plant using machine learning models
.
Journal of Environmental Sciences
32
,
90
101
.
doi:10.1016/j.jes.2015.01.007
.
Hamed
M.
,
Khalafallah
M.
&
Hassanien
E.
2004
Prediction of wastewater treatment plant performance using artificial neural networks
.
Environmental Modelling & Software
19
(
10
),
919
928
.
doi:10.1016/j.envsoft.2003.10.005
.
Jover-Smet
M.
,
Martín-Pascual
J.
&
Trapote
A.
2017
Model of suspended solids removal in the primary sedimentation tanks for the treatment of urban wastewater
.
Water
9
(
6
),
448
.
doi:10.3390/w9060448
.
Kim
P.
2017
MATLAB Deep Learning
, 1st edn.
Springer
,
New York
,
USA
.
doi:10.1007/978-1-4842-2845-6
.
Kiron
B.
,
Basack
S.
,
Goswami
G.
&
Bida
H.
2021
Hydrological and environmental study on surface water characterization in a locality in north eastern India
.
WSEAS Transactions on Environment and Development
17
,
1228
1233
.
doi:10.37394/232015.2021.17.112
.
Kolay
P.
,
Rosmina
A.
&
Ling
N.
2008
Settlement prediction of tropical soft soil by Artificial Neural Network (ANN)
. In:
12th International Conference on Computer Methods and Advances in Geomechanics 2008
,
Goa, India
, pp.
1843
1849
.
Korkerd
K.
,
Soanuch
C.
,
Gidaspow
D.
,
Piumsomboon
P.
&
Chalermsinsuwan
B.
2021
Artificial neural network model for predicting minimum fluidization velocity and maximum pressure drop of gas fluidized bed with different particle size distributions
.
South African Journal of Chemical Engineering
37
,
61
73
.
doi:10.1016/j.sajce.2021.04.003
.
Martínez-González
G.
,
Loría-Molina
H.
,
Taboada-López
D.
,
Ramírez-Rodríguez
F.
,
Navarrete-Bolaños
J.
&
Jiménez-Islas
H.
2009
Approximate method for designing a primary settling tank for wastewater treatment
.
Industrial & Engineering Chemistry Research
48
(
16
),
7842
7846
.
doi:10.1021/ie801869b
.
Naderpour
H.
,
Kheyroddin
A.
&
Amiri
G.
2010
Prediction of FRP-confined compressive strength of concrete using artificial neural networks
.
Composite Structures
92
(
12
),
2817
2829
.
doi:10.1016/j.compstruct.2010.04.008
.
Nasr
M. S.
,
Moustafa
M. A. E.
,
Seif
H. A. E.
&
El Kobrosy
G.
2012
Application of artificial neural network (ANN) for the prediction of EL-AGAMY wastewater treatment plant performance-EGYPT
.
Alexandria Engineering Journal
51
(
1
),
37
43
.
doi:10.1016/j.aej.2012.07.005
.
Rezazadeh
D.
,
Haddad
A.
&
Naderpour
H.
2019
Evaluation of shear strength parameters of granulated waste rubber using artificial neural networks and group method of data handling
.
Scientia Iranica
26
,
3233
3244
.
doi:10.24200/sci.2018.5663.1408
.
Ruben
G.
,
Zhang
K.
,
Bao
H.
&
Ma
X.
2018
Application and sensitivity analysis of artificial neural network for prediction of chemical oxygen demand
.
Water Resources Management
32
(
1
),
273
283
.
doi:10.1007/s11269-017-1809-0
.
Sakiewicz
P.
,
Piotrowski
K.
,
Ober
J.
&
Karwot
J.
2020
Innovative artificial neural network approach for integrated biogas – wastewater treatment system modelling: effect of plant operating parameters on process intensification
.
Renewable and Sustainable Energy Reviews
124
,
109784
.
doi:10.1016/j.rser.2020.109784
.
Shahin
M.
2013
Artificial intelligence in geotechnical engineering: applications, modeling aspects, and future directions
. In:
Metaheuristics in Water, Geotechnical and Transport Engineering
(
Yang
X.
,
Gandomi
A.
,
Talatahari
S.
&
Alavi
A.
eds.).
Elsevier Inc.
,
London
,
UK
, pp.
169
204
.
doi:10.1016/B978-0-12-398296-4.00008-8
.
Shahrokhi
M.
,
Akhtarkavan
E.
,
Rostami
F.
,
Azlin Md Said
M.
&
Syafalni
S.
2011
A fuzzy logic to predicting velocities in primary sedimentation tanks
.
World Applied Sciences Journal
15
(
9
),
1279
1286
.
Snieder
E.
,
Shakir
R.
&
Khan
U.
2020
A comprehensive comparison of four input variable selection methods for artificial neural network flow forecasting models
.
Journal of Hydrology
583
,
124299
.
doi:10.1016/j.jhydrol.2019.124299
.
Thomas
A. J.
,
Petridis
M.
,
Walters
S. D.
,
Gheytassi
S. M.
&
Morgan
R. E.
2015
On predicting the optimal number of hidden nodes
. In:
2015 International Conference on Computational Science and Computational Intelligence (CSCI)
.
IEEE
,
Las Vegas
,
USA
, pp.
565
570
.
doi:10.1109/CSCI.2015.33
.
Yel
E.
&
Yalpir
S.
2011
Prediction of primary treatment effluent parameters by Fuzzy Inference System (FIS) approach
.
Procedia Computer Science
3
,
659
665
.
doi:10.1016/j.procs.2010.12.110
.
Zamanikherad
M.
,
Montazeri
A.
,
Gheibi
M.
,
Fathollahi-Fard
A. M.
&
Behzadian
K.
2022
An efficient design of primary sedimentation tanks using a combination of the response surface, metaheuristic, and scenario building methods
.
International Journal of Environmental Science and Technology
.
doi:10.1007/s13762-022-04076-0
.
Zeng
G.
,
Qin
X.
,
He
L.
,
Huang
G.
,
Liu
H.
&
Lin
Y.
2003
A neural network predictive control system for paper mill wastewater treatment
.
Engineering Applications of Artificial Intelligence
16
(
2
),
121
129
.
doi:10.1016/S0952-1976(03)00058-7
.
This is an Open Access article distributed under the terms of the Creative Commons Attribution Licence (CC BY 4.0), which permits copying, adaptation and redistribution, provided the original work is properly cited (http://creativecommons.org/licenses/by/4.0/).

Supplementary data