Improving total nitrogen removal using a neural network ammonia-based aeration control in activated sludge process

## Publications

/ Export Citation / / / Text size:

#### International Journal on Smart Sensing and Intelligent Systems

Exeley Inc. (New York)

Subject: Computational Science & Engineering, Engineering, Electrical & Electronic

eISSN: 1178-5608

26
28
Visit(s)
0
Comment(s)
0
Share(s)

SEARCH WITHIN CONTENT

FIND ARTICLE

Volume / Issue / page

Archive
Volume 14 (2021)
Volume 13 (2020)
Volume 12 (2019)
Volume 11 (2018)
Volume 10 (2017)
Volume 9 (2016)
Volume 8 (2015)
Volume 7 (2014)
Volume 6 (2013)
Volume 5 (2012)
Volume 4 (2011)
Volume 3 (2010)
Volume 2 (2009)
Volume 1 (2008)
Related articles

VOLUME 14 , ISSUE 1 (Feb 2021) > List of articles

### Improving total nitrogen removal using a neural network ammonia-based aeration control in activated sludge process

Citation Information : International Journal on Smart Sensing and Intelligent Systems. Volume 14, Issue 1, Pages 1-16, DOI: https://doi.org/10.21307/ijssis-2021-016

Received Date : 25-May-2021 / Accepted: 26-August-2021 / Published Online: 23-September-2021

### ARTICLE

#### ABSTRACT

Aeration control is a way to have a wastewater treatment plant (WWTP) that uses less energy and produces higher effluent quality to meet state and federal regulations. The goal of this research is to develop a neural network (NN) ammonia-based aeration control (ABAC) that focuses on reducing total nitrogen and ammonia concentration violations by regulating dissolved oxygen (DO) concentration based on the ammonia concentration in the final tank, rather than maintaining the DO concentration at a set elevated value, as most studies do. Simulation platform used in this study is Benchmark Simulation Model No. 1, and the NN ABAC is compared to the Proportional-Integral (PI) ABAC and PI controller. In comparison to the PI controller, the simulation results showed that the proposed controller has a significant improvement in reducing the AECI up to 23.86%, improving the EQCI up to 1.94%, and reducing the overall OCI up to 4.61%. The results of the study show that the NN ABAC can be utilized to improve the performance of a WWTP’s activated sludge system.

## Introduction

Wastewater treatment plant (WWTP) is a topic of pivotal importance in providing a sanitary water which is a vital resource for everyone. Protecting water sources and safeguarding the ecosystem is a long-standing challenge for the WWTP industry. WWTP are facing more stringent effluent standards which were formed for a safer ecosystem (Åmand and Carlsson, 2013; Han and Qiao, 2014; Olsson et al., 2014). The WWTP industry must come up with a solution that abide the stringent effluent requirements and is also economical.

Studies have shown that the energy consumption in the biological system such as activated sludge process, biological trickling filters, and membrane bioreactors can be curbed through good control of the aeration system. The issue of energy consumption has been investigated by various researchers and the findings suggest that the aeration section which is needed in the WWTP to detract nitrogen and natural or inorganic carbon in the biological process, contributes to 50–90% of the overall energy requirement of the WWTP (Åmand et al., 2013; Cristea et al., 2011; Ghoneim et al., 2016; Vrečko and Hvala, 2013).

In the last decade, there have been various studies investigating the effectiveness of various controller design utilizing dissolved oxygen (DO) control in lowering the aeration cost. This control configuration is the highlight during that time due to the availability of DO sensor probe that can continuously measure the DO concentration in the tank. The fundamental of using the DO sensor probe is to control the DO supply according to the oxygen demand of the microorganism in the tank. However, this solution has a weakness due to the difficulty in getting the exact value of the actual oxygen demand by the microorganism at a specific time; thus, most of the proposed DO control strategies implemented an elevated DO set point to avoid nitrification failure (Arnell, 2016; Ellis et al., 2009; Medinilla et al., 2020; Uprety et al., 2015). The DO control strategy has been extensively studied and many viable solutions have been developed and proposed, for example model predictive control (MPC) (Cristea et al., 2011; Han et al., 2012; Holenda et al., 2008; Martín et al., 2012; Yang et al., 2013), PID (Du et al., 2018; Husin et al., 2020b; Samsudin et al., 2013), fuzzy and neural network (NN) control (Han et al., 2020).

However, even with the DO control strategy, the aeration cost issues persist as DO control requires aerators and turbines which are operated by electrically powered motors that add extra cost to the system. This calls for a paradigm shift in the choice of methodology to solve the problems of energy consumption and cost of aeration control. This issue was explored in the publication by Åmand and Carlsson (2014) which has suggested that the aeration process can be regulated either using the aeration concentration control or tweaking the DO set point level corresponding to the ammonium (S NH ) concentration in the effluent (Åmand and Carlsson, 2014). During the last ten years, the ion selective electrodes (ISEs) S NH sensor probe has become available for online process. This is a developing technology and has led to the introduction of ABAC.

ABAC is a control strategy which uses S NH as response variable in addition to or in place of DO. ABAC has been introduced to overcome some of the inherent limitations of DO control strategy and it is used mainly for two reasons, which are to restrict aeration and to shrink effluent S NH peaks. Several techniques have been recently proposed regarding ABAC, ranging from a conventional PI-ABAC control (Åmand and Carlsson, 2014; Husin et al., 2020a, 2021a; Várhelyi et al., 2018; Uprety et al., 2015), to advanced MPC ABAC (Santin et al., 2015a, b, 2016). Some of the recent proposals are summarized in Table 1.

##### Table 1.

Summary of recent research trend using ABAC control.

According to the literature, most pilot or real plants use the PI control in their ABAC designs. The PI controllers utilized are configured in a decentralized configuration. This configuration is favorable because there is no need to deal with the coupling problem in a multi-input multi-output (MIMO) system. A PI controller, on the other hand, is known for being susceptible to disruptions and/or changes in the condition of the operation. Although advanced control schemes such as MPC have been shown to yield better results than PI controllers, MPC is known to be computationally complex and difficult to apply in a real plant. All the studies in the literature indicated that the MPC is implemented in simulation platform only, e.g., BSM1 and BSM2. Another observation into the recent research trend is the emphasis on aeration energy cost problem but less toward the pragmatic benefits brought by ABAC control strategy on effluent quality which has not been extensively explored by researchers.

Considering the advantages and disadvantages levied by these publications, an alternative control strategy that is more streamlined with lower complexity is desirable especially if the aim is to apply the controller in the real or pilot plant. Prior work in this area has been limited to the use of traditional control methods such as PI/PID control. Traditional approaches, such as PI/PID, have various drawbacks, including performance loss when applied to a highly nonlinear process (Aguilar-López et al., 2016) and the inability to meet the demand for high performance control as operating conditions vary (Samsudin et al., 2014). In light of these drawbacks, this research proposes a NN ABAC. The suggested NN ABAC’s main advantages are its simplicity and ability to effectively decouple. Interestingly, to the author’s knowledge and based on the literature research conducted, there have been no previous publications in the literature on the deployment of NN ABAC control to date. Unlike previous systems that relied on cascade configuration, this concept combines many cascaded controllers into a single NN ABAC controller. As a result, the objective of this study is to develop a NN ABAC controller which could be used in the BSM1 to improve the effluent quality especially the N tot and S NH concentration, which are considered as the two most important effluent pollutants of the activated sludge system.

The paper is divided into five sections: the first is an introduction, which includes some earlier and related publications. The simulation model is introduced in the second section. In addition to the typical PI ABAC as a comparison, the third section describes the design and implementation of the proposed NN ABAC. The fourth section summarizes the simulation findings and assesses the proposed NN ABAC’s performance, while the fifth section wraps up the work with some recommendations.

## Simulation model

The proposed NN ABAC control is implemented using the MATLAB™/Simulink™ software, and the assessment for this study are established on BSM1. BSM1 is a benchmark simulation plant that consists of a model, a control system, a benchmarking procedure, and evaluation processes. Figure 1 illustrates the BSM1, which is based on the activated sludge model no. 1 (ASM1) and consists of five reactors and a clarifier. Many studies in this field have used this plant as a standard benchmark of comparison.

##### Figure 1:

BSM1.

The simulation of BSM1 arrangement begins with initialization using 150 days of stabilization in a closed-loop state. Then, it follows by simulation using the dry weather file, and lastly, it progresses with weather files to be validated. The system turns out to be stable if the steady state is reached.

Various control procedures are measured corresponding to a guideline defines for the plant performance, which entails the Effluent Quality Index (EQI) and the Overall Cost Index (OCI) to evaluate the operating cost. The evaluation also includes the computation of the operating time that the intensity of the effluent is exceeding the limit, as shown in Table 2.

##### Table 2.

Concentration thresholds of pollutants in the effluent.

## Ammonium-based aeration control

### Feedback PI ABAC

For reference and comparison purposes, a feedback PI ABAC configuration is developed with the PI S NH controller cascaded with the existing PI DO controller as shown in Figure 2. This configuration is a common setting applied in most of the existing real/pilot plant utilizing ABAC control method.

##### Figure 2:

Feedback PI ABAC configuration.

Both PI controllers for S NH and DO concentrations are using the following equation:

##### (1)
$u(t)=K(e(t)+1Ti∫0te(τ)dτ)$
where u(t) is the set points for either S NH or DO, e(t) is the error, K is the controller gain, and T i is the integration time. In the simulation, it has been identified that the optimal settings for the PI S NH controller gains, K is ‒0.3 and the integral time, T i is 0.0001d, and S NH set point is set to 3. For the DO PI controller, the K is fixed at 25 while the T i is set to 0.001d. All these parameters are critical in determining the best control action for the plant.

### NN ABAC

In this study, a two-input single-output (TISO) NN architecture is used. NN is highly valuable and perform various critical tasks like classification (Sarabu and Santra, 2021), prediction (Fazelabdolabadi et al., 2021), clustering, and associations. A strong coupling problem might arise as the S NH and DO concentration are applied as separate inputs for the system, but the proposed NN method will function as a decoupling control of the MIMO system because it has a commendable nonlinear approximation ability. As illustrated in Figure 3, the proposed NN ABAC control setup used in this study employs direct feedback, with airflow control determined directly utilizing both S NH and DO measurements. The NN model is utilized as the controller in this arrangement, and the measured values of S NH and DO concentrations are used to adjust the airflow.

##### Figure 3:

Direct feedback NN ABAC.

The goal of this research is to create an NN ABAC controller that can be used in the BSM1 to improve effluent quality. As a result, the ABAC controller will be designed first, according to the flowchart shown in Figure 4. It is vital to identify the manipulated variables and control variables for the system during the designing phase. After that, the NN ABAC modelling takes place where the regression (R) and mean square error (MSE) are two criteria that are considered for the model. The implementation, which took place in the BSM1 simulation platform, took place only after the all the criteria were reached. This is a critical component because, even if the model is excellent, it does not always result in high plant performance due to overfitting problems.

##### Figure 4:

Flowchart of the proposed NN ABAC methodology.

The NN model for the proposed TISO system is constructed using standard NN modelling procedures. Data pre-processing and data loading are the first two steps, with data pre-processing being crucial for better NN convergence. The model design came next, with the number of hidden neurons considered as a significant factor. Overfitting can occur when there are too many hidden neurons. Several researchers have proposed their methods to fix the number of hidden neurons as listed in Table 3.

##### Table 3.

Number of neurons suggested by the researcher and the corresponding MSE value

In a two hidden layers feedforward network, Huang (2003) proposed a new approach for calculating the number of hidden neurons $(Nh)$ . The basic premise is that the first hidden layer has a large number of hidden neurons, whereas the second hidden layer has a limited number of hidden neurons. Because just one hidden layer is employed in this study, the comparison is based on the method for determining the first hidden layer. The calculation used $Np$ , which stands for the number of input samples, and $No$ , which stands for the number of output neurons.

The second method selected was proposed by Jinchuan and Xinzhe (2008) who stated that the optimum number of hidden neurons is determined by the network architecture’s complexity. As a result, they recommended that the number of hidden neurons be determined using three key components of network architecture: $Np$ , $Ni$ which is the number of input neuron, and $L$ which is the number of hidden layers. The last method chosen was proposed by Shibata and Ikeda (2009), while researching the influence of learning stability and hidden neurons in NN. Their findings suggested that hidden neurons are estimated using $Ni$ and $No$ .

The lowest MSE was found using the stated equation presented by Jinchuan and Xinzhe (2008) which calculated the number of hidden neurons based on three main components of network architecture, which are $Np$ , $Ni$ and $L$ . Based on this result, the proposed NN structure is using Jinchuan and Xinzhe (2008) and the calculated number of hidden neurons is 28 hidden neurons based on the equation provided.

Determining the training method is another crucial phase in the NN modelling process. After modelling, the NN model must be trained. The Backpropagation (BP) algorithm is used to train the model in this study. In NN training, however, a few BP algorithms are available. An examination of five different BP algorithms is performed before determining which method is best for the study. The following settings are used in this evaluation: the hidden layer has five hidden neurons, the tangent sigmoid transfer function (tansig) is used as the hidden layer’s activation function, and the linear transfer function (purelin) is used as the output layer’s activation function.

The flowchart of the NN training is shown in Figure 5. Assuming that the samples to be trained are ${xi,ri}∈{X,R}$ , where xi represents the input of the network, $X=[x1(k),x2(k),⋯,xn(k)]T$ is the input vector, $ri$ represents the anticipated output of the network, and $R=[r1(k),r2(k),⋯,rn(k)]T$ is the anticipated output vector. A sigmoid function is used in the hidden network layer, while a linear function is used in the output layer. The weight connecting the ith input layer neuron to the jth hidden layer neuron is $wi,jL1∈WL1$ , and the weight connecting the ith hidden layer neuron to the jth neuron of the output layer is $wi,jL2∈WL2$ . A two-layer network is chosen and $X=[y1(k),y2(k),⋯,yn(k)]$ as the actual output of the network Y shown in Equation (2) where the f function is sigmoid function as shown in Equation (3) and transcendental number, e = 2.71828 (Qiao et al., 2014). The training index is shown in Equation (4):

##### (2)
$Y=WL2f(X⋅WL1)$
##### (3)
$f(x)=11+e‒x$
##### (4)
$J(k)=12(e(k))2$

##### Figure 5:

Flowchart of the NN training process.

The five selected BP algorithms are Levenberg–Marquardt (LM), Scaled Conjugate Gradient, Broyden–Fletcher–Goldfarb–Shanno (BFGS) Quasi-Newton, Batch Gradient Descent, and Batch Gradient Descent with Momentum. The LM algorithm combines the steepest gradient descent and the Gauss–Newton algorithms, inheriting the Gauss–Newton methodology’s speed and the steepest gradient descent method’s stability (Yu and Wilamowski, 2011). The Scaled Conjugate Gradient algorithm combines the LM algorithm with the Conjugate Gradient technique, which employs a step size scaling mechanism to skip a time-consuming line search learning cycle, making it faster than the BFGS algorithm (Møller, 1993).

Table 4 shows the comparison findings of the five BP algorithms. LM had the lowest mean square error (MSE) of 0.0057795 and the highest R of 0.99019 of all the BP algorithms tested. The Scaled Conjugate Gradient and the BFGS Quasi-Newton yield nearly identical results. The MSE values for Batch Gradient Descent and Batch Gradient Descent with momentum are both poor. As a result, the LM algorithm is the BP training technique of choice for the NN model.

##### Table 4.

Comparison of five backpropagation algorithms.

Because the LM method was chosen to train the network in this study, a detailed explanation of the algorithm is required to fully comprehend it. LM algorithm is a combination of the steepest descent algorithm and the Gauss–Newton algorithm. The Gauss–Newton algorithm faces convergence problems like the Newton algorithm for complex error space optimization (Yu and Wilamowski, 2011). The problem can be interpreted as the matrix $JTJ$ may not be invertible, where $J$ is Jacobian matrix. To make sure that the approximated Hessian matrix, $JTJ$ is invertible, the LM algorithm introduces another approximation to Hessian matrix as shown in Equation (5), where µ is called combination coefficient and must always have positive value, and $I$ is the identity matrix. With this approximation, it can be sure that the Hessian matrix (H) is always invertible.

The LM algorithm employs the approximation of the Hessian matrix as in Equation (6). During the training process, the LM algorithm shifts between the two approaches. When the combination coefficient is very tiny or almost zero, it employs the Gauss–Newton approach, which employs the approximate Hessian matrix as indicated in Equation (7). When the value of the combination coefficient is quite large, the steepest descent method as in Equation (6) is utilized. When reaching an error minimum, it is vital to switch to the Gauss–Newton strategy as soon as possible because it is substantially faster and more exact. The combination coefficient is reduced after each successful step and is only raised if a tentative step improves the performance function. As a result, the performance function decreases with each iteration of the algorithm:

##### (5)
$Η≈JTJ+μI$
##### (6)
$wk+1=wk‒(JkTJk+μI)‒1Jkek$
##### (7)
$wk+1=wk‒(JkTJk)‒1Jkek$

According to the rule of the LM algorithm in Equation (6), if the error goes down, meaning it is smaller than the previous error, the quadratic approximation on the total error function is working, and the combination coefficient could be changed to a smaller value to reduce the influence of the gradient descent part. If, on the other hand, the error increases, indicating that it is higher than the previous error, it implies that it is necessary to follow the gradient more to find an appropriate curvature for quadratic approximation, and the value of the combination coefficient is increased. The flowchart of NN training utilizing the LM algorithm is shown in Figure 6 (Yu and Wilamowski, 2011).

##### Figure 6:

Flowchart of the LM algorithm.

The training process using LM algorithm starts can be explained as follows:

1. The total error is calculated using initial weights that are created at random.

2. The computation of the Jacobian matrix is carried out. The weight is then updated using Equation (6).

3. The total error is calculated using the new weight.

4. If the current total error increases as a result of the update, the step is retracted, with the weight being reset to the prior value and the combination coefficient being increased by a factor of 10 or some other factor. The step then repeats from Step (1).

5. If the update reduces the current total error, the step is approved, and the combination coefficient is reduced by a factor of 10 or some other factor.

6. Step (2) is repeated with the new weight until the current total error is less than the required value.

The training parameters are given in Table 5. The NN training comes to an end when either of these conditions is met: the maximum number of epochs is reached, or the maximum amount of time is exceeded, or the performance is minimized to the goal, or the performance gradient falls below the minimum performance gradient, or the µu exceeds maximum µu, or validation performance has increased more than maximum validation failures times since the last time it decreased when using validation was used.

##### Table 5.

Parameter used for LM training algorithm.

To summarize, 28 sigmoid hidden neurons consist of a two-layer NN model, and a linear output neuron is developed. The graphic representation of the NN model is shown in Figure 7, with DO and S NH values as inputs and oxygen transfer coefficient (K La ) as the output layer.

##### Figure 7:

The topological formation of the NN.

The proposed NN ABAC model is used as the controller to control the K La5 in the BSM1 utilizing the gauged value of DO and S NH intensity as illustrated in Figure 8.

##### Figure 8:

The implementation of NN ABAC control architecture in BSM1.

## Results and discussions

The results obtained from the proposed NN ABAC control are compared with the results from PI ABAC, and benchmark PI to ensure its validity. The study focuses on improving effluent quality while maintaining and/or reducing the aeration costs. There are several methods to analyze the data outline in the BSM1. For this study, the NN ABAC control configuration is evaluated using the second level of performance assessment. In this level, the performances are evaluated using three separate categories.

The first category is the average effluent concentration obtained after a 7-day evaluation utilizing dry/rain/storm weather. The result obtained is compared to benchmark PI and PI ABAC which highlighting five key process variables (S NH , TSS, N tot , CODt, and BOD5). The maximum value for each effluent is set based on the criteria described in Alex et al. (2008) and the findings are presented in Table 6. Overall, the proposed method marginally outperforms the other methods in TSS and N tot effluents in all weather. However, the proposed method underperforms in S NH effluent in all weather conditions, CODt and BOD5 in dry and storm weather. Increases in average S NH are expected and it may be caused by insufficient DO level supply to the microorganism in the sludge. However, this result alone is not enough to evaluate the performance of the NN ABAC control configuration.

##### Table 6.

The effluent quality limit.

The number of times the effluent criteria were not exceeded over the latest 7 days simulation is the second category in the performance evaluation provided by the BSM1. The observation is carried out for N tot and S NH in all three weathers, as well as T SS during storms, and the results are shown in Table 7. This is the study’s focus, the N tot and S NH violations must be kept to a minimum.

##### Table 7.

The effluent violations under dry, rain, and storm influent.

The NN ABAC control configuration has demonstrated a marked improvement in the number of effluent violations for N tot and S NH in all-weather except once in dry weather for S NH violation where the result is inferior to PI ABAC by 0.91%. The proposed control configuration exhibits excellent performance in all cases when compared to benchmark PI, as N tot violation is decreased by 34.99% while S NH is decreased by 0.89% (dry weather), N tot violation is decreased by 48.68% while S NH is decreased by 15.70% (rain weather), and finally, in storm weather, N tot violation is decreased by 30.81% while S NH is decreased by 4.52%. The results showed that the proposed controller enhanced the two key effluent performance measures.

To fully understand the results, the performances of N tot and S NH over the last 7 days simulation using all-weather file is shown in Figures 9–11. The red dotted line represents the PI ABAC, the black line represents the PI, the blue line represents the NN ABAC. It can be observed that both PI ABAC and NN ABAC show a reduction of N tot , however, utilizing the NN ABAC control configuration, a further reduction can be achieved. The most captivating finding is that the number of violations is reduced by 28.57%, which is from 7 to 5 violations in dry and storm weather, and in rain weather is reduced from 5 to 3 violations which is about a 40% reduction.

##### Figure 9:

Performances of the last 7 days of simulation using dry weather with the PI (black line), PI-ABAC (red dotted line), and NN-ABAC (blue line).

##### Figure 10:

Performances of the last 7 days of simulation using rain weather with the PI (black line), PI-ABAC (red dotted line), and NN-ABAC (blue line).

##### Figure 11:

Performances of the last 7 days of simulation using storm weather with the PI (black line), PI-ABAC (red dotted line), and NN-ABAC (blue line).

It was found that only a small decrease of S NH peaks is attained using the NN ABAC control in the BSM1. The improvement was not as obvious as compared to N tot violation. This finding is expected since there will be a trade-off between one and another. It is difficult to obtain a good result for both S NH and N tot without additional control strategies to supply the external carbon flow rate (q EC ) and internal recirculation flow rate (Q rin ).

It is well known that the contaminants S NH and N tot are the pollutants that ought to be held below the permitted limits. The suggested NN ABAC will not be able to keep N tot below the limit, implying that no violation would occur. A potential solution to this difficult problem could involve injecting the q EC in the first tank which can facilitate in reducing the N tot peak. This may be explained by the increase of the anoxic growth of XBH once carbon dosage is added up to the tank. In general, the S NH violation can be tackled well if the Q rin is accurately controlled, which perfects the nitrification process of the bacteria in the sludge.

The last category in the performance assessment of the BSM1 is the evaluation of the effluent, aeration, and cost. The results are divided into average EQI, aeration energy cost index (AECI), and the total OCI as per Table 8. As can be seen from the results, the PI ABAC strategy produces the best EQI, while the proposed NN ABAC approach performs just slightly below it, with a deficit of 0.29–0.67%. However, the PI ABAC excess comes at a significant price, as evidenced by the AECI value, which is the highest among the other controllers. The proposed controller, on the other hand, has much lower AECI values, resulting in a reduction of 26.04%. Furthermore, the suggested NN ABAC outperforms the PI ABAC in terms of total OCI reduction by up to 5.15%. In comparison to the PI controller, the NN ABAC consistently outperforms the PI controller across all assessments.

##### Table 8.

The comparison of EQ, AECI, and Total OCI in dry/rain/storm weather.

Table 9 shows the comparison results in terms of AECI, EQI, OCI and percentage of time over limits of two highlighted effluents, S NH and N tot with other similar studies. The suggested controller has the lowest AECI and total OCI, as stated in the table. When compared to other similar research, the AECI achieved by the proposed controller is lowered by 22%, which is a significant achievement. Aside from that, the proposed controller has the lowest percentage of N tot breaches. The S NH violation is not the lowest, but it is not the worst.

##### Table 9.

The comparison of AECI, EQI, OCI, and S NH and N tot violations in similar studies.

### Conclusion

In summary, the study’s goal was accomplished satisfactorily. The NN ABAC controller was designed and applied effectively in the BSM1, yielding considerable results, particularly in terms of effluent violations. In dry and storm weather, the number of N tot violations is reduced by 28.57%, down to five occasions, and in rainy weather, the number of violations is reduced by almost 40%, down to three occasions. When compared to PI, the NN ABAC control configuration showed a significant improvement in AE reduction, with a reduction of up to 23.86%. In all-weather, the NN ABAC control setup obtained up to 4.61% lower total OCI than PI. AECI is being reduced too. The NN ABAC control configuration achieves the greatest reduction in AECI, surpassing PI ABAC by up to 26.04%. The results demonstrated in this study suggest that the NN ABAC controller is a feasible design philosophy and has the potential to address the shortcomings of the existing control configuration in the activated sludge process.

The NN ABAC control configuration could be enhanced more in the future by taking into account the design constraints. Aside from that, injecting qEC in the first tank might be deemed to entirely suppress Ntot breaches below the authorized limit. However, the results produced using this method cannot be compared to those obtained without augmenting the qEC.

## Acknowledgments

This research is supported by Universiti Teknologi Malaysia and Universiti Malaysia Sarawak through the UTM Transdisciplinary Research Grant number Q.J130000.3551.06G18 and Q.J130000.3551.06G80. Authors are grateful to the Ministry of Higher Education Malaysia, Universiti Teknologi Malaysia and Universiti Malaysia Sarawak for supporting the present work.

## References

1. Aguilar-López, R. , López-Pérez, P. A. and Neria-González, M. I. 2016. Improvement of activated sludge process using a nonlinear pi controller design via adaptive gain. International Journal of Chemical Reactor Engineering 14(1): 407–416.
2. Alex, J. , Benedetti, L. , Copp, J. , Gernaey, K. V. , Jeppsson, U. , Nopens, I. and Winkler, S. 2008. Benchmark Simulation Model No. 1 (BSM1) .
3. Åmand, L. and Carlsson, B. 2013. The optimal dissolved oxygen profile in a nitrifying activated sludge process – comparisons with ammonium feedback control. Water Science and Technology 68(3): 641–649.
4. Åmand, L. , Olsson, G. and Carlsson, B. 2013. Aeration control – a review. Water Science and Technology: A Journal of the International Association on Water Pollution Research 67(11): 2374–2398.
5. Åmand, L. and Carlsson, B. 2014. Aeration control with gain scheduling in a full-scale wastewater treatment plant. IFAC Proceedings Volumes (IFAC-PapersOnline) (Vol. 19), IFAC, available at: http://dx.doi.org/10.3182/20140824-6-ZA-1003.01892.
6. Arnell, M. 2016. Performance assessment of wastewater treatment plants multi-objective analysis using plant-wide models.
7. Cristea, S. , de Prada, C. , Sarabia, D. and Gutiérrez, G. 2011. Aeration control of a wastewater treatment plant using hybrid NMPC. Computers & Chemical Engineering 35(4): 638–650.
8. Du, X. , Wang, J. , Jegatheesan, V. and Shi, G. 2018. Dissolved oxygen control in activated sludge process using a neural network-based adaptive PID algorithm. Applied Sciences 8(2): 261.
9. Ellis, T. G. , Eliosov, B. , Schmit, C. G. , Jahan, K. and Park, K. Y. 2009. Activated Sludge and other Aerobic Suspended Culture Processes. Water Environment Research: a Research Publication of the Water Environment Federation, Vol. 74, available at: http://www.ncbi.nlm.nih.gov/pubmed/12413140.
10. Fazelabdolabadi, B. , Montazeri, M. and Pourafshary, P. 2021. HighTech and innovation a data mining perspective on the confluent ions. Effect for Target Functionality 2(3): 202–215.
11. Ghoneim, W. A. M. , Helal, A. A. and Wahab, M. G. A. 2016. Minimizing energy consumption in Wastewater Treatment Plants. 2016 3rd International Conference on Renewable Energies for Developing Countries, REDEC 2016, Institute of Electrical and Electronics Engineers Inc, available at: https://doi.org/10.1109/REDEC.2016.7577507
12. Han, H. and Qiao, J. 2014. Nonlinear model-predictive control for industrial processes: an application to wastewater treatment process. IEEE Transactions on Industrial Electronics 61(4): 1970–1982.
13. Han, H. -G. , Qiao, J. -F. and Chen, Q. -L. 2012. Model predictive control of dissolved oxygen concentration based on a self-organizing RBF neural network. Control Engineering Practice 20(4): 465–476.
14. Han, H. , Liu, Z. , Hou, Y. and Qiao, J. 2020. Data-driven multiobjective predictive control for wastewater treatment process, IEEE Transactions on Industrial Informatics 16(4): 1.
15. Holenda, B. , Domokos, E. and Fazakas, J. 2008. Dissolved oxygen control of the activated sludge wastewater treatment process using model predictive control. Computer and Chemical Engineering 32: 1270–1278.
16. Huang, G. B. 2003. Learning capability and storage capacity of two-hidden-layer feedforward networks. IEEE Transactions on Neural Networks 14(2): 274–281.
17. Husin, M. H. , Rahmat, M. F. and Wahab, N. A. 2020a. Decentralized proportional-integral control with carbon addition for wastewater treatment plant. Bulletin of Electrical Engineering and Informatics 9(6): 2278–2285.
18. Husin, M. H. , Rahmat, M. F. , Wahab, N. A. , Sabri, M. F. M. and Suhaili, S. 2020b. Proportional-integral ammonium-based aeration control for activated sludge process. 2020 13th International UNIMAS Engineering Conference (EnCon), IEEE, pp. 1–5, available at: https://ieeexplore.ieee.org/document/9299339/.
19. Husin, M. H. , Rahmat, M. F. , Wahab, N. A. and Sabri, M. F. M. 2021a. Neural network ammonia-based aeration control for activated sludge process wastewater treatment plant. Lecture Notes in Electrical Engineering 666: 471–487.
20. Husin, M. H. , Rahmat, M. F. , Wahab, N. A. , Sabri, M. F. M. and Md Zain, Z. 2021b. Neural network ammonia-based aeration control for activated sludge process wastewater treatment plant. In Md Zain, Z. et al. (ed.), Proceedings of the 11th National Technical Seminar on Unmanned System Technology 2019. Lecture Notes in Electrical Engineering Vol. 666: 471–487, available at: http://link.springer.com/10.1007/978-981-15-5281-6_32.
21. Jinchuan, K. and Xinzhe, L. 2008. Empirical analysis of optimal hidden neurons in neural network modeling for stock prediction. Proceedings – 2008 Pacific-Asia Workshop on Computational Intelligence and Industrial Application, PACIIA 2008, 2: 828–832.
22. Martín, J. M. , Vega, P. , Informática, D. and Revollar, S. 2012. Set-point Optimization for Enhancing the MPC Control of the N-Removal Process in WWTP’s, pp. 1–6.
23. Medinilla, V. R. , Sprague, T. , Marseilles, J. , Burke, J. , Deshmukh, S. , Delagah, S. and Sharbatmaleki, M. 2020. Impact of Ammonia-Based Aeration Control (ABAC) on energy consumption. Applied Sciences 10(15): 5227.
24. Møller, M. F. 1993. A scaled conjugate gradient algorithm for fast supervised learning. Neural Networks 6(4): 525–533.
25. Olsson, G. , Carlsson, B. , Comas, J. , Copp, J. , Gernaey, K. V. , Ingildsen, P. and Amand, L. 2014. Instrumentation, control and automation in wastewater – from London 1973 to Narbonne 2013. Water Science and Technology: A Journal of the International Association on Water Pollution Research 69(7): 1373–1385.
26. Qiao, J. F. , Han, G. and Han, H. G. 2014. Neural network on-line modeling and controlling method for multi-variable control of wastewater treatment processes. Asian Journal of Control 16(4): 1213–1223.
27. Samsudin, S. I. , Rahmat, M. F. , Wahab, N. A. , Gaya, M. S. and Razali, M. C. 2013. Application of adaptive decentralized PI controller for activated sludge process. Proceedings of the 2013 IEEE 8th Conference on Industrial Electronics and Applications, ICIEA 2013, 1792–1797.
28. Samsudin, S. I. , Rahmat, M. F. , Wahab, N. A. , Razali, M. C. , Gaya, M. S. and Salim, S. N. S. 2014. Improvement of Activated Sludge Process Using Enhanced Nonlinear PI Controller. Arabian Journal for Science and Engineering 39: 6575–6586.
29. Santin, I. , Pedret, C. , Meneses, M. and Vilanova, R. 2015b. Process based control architecture for avoiding effluent pollutants quality limits violations in wastewater treatment plants. 2015 19th International Conference on System Theory, Control and Computing (ICSTCC), IEEE, pp. 396–402, available at: http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=7321326.
30. Santín, I. , Pedret, C. and Vilanova, R. 2015a. Fuzzy control and model predictive control configurations for effluent violations removal in wastewater treatment plants. Industrial and Engineering Chemistry Research 54(10): 2763–2775.
31. Santín, I. , Pedret, C. , Vilanova, R. and Meneses, M. 2016. Advanced decision control system for effluent violations removal in wastewater treatment plants. Control Engineering Practice 49(January): 60–75.
32. Sarabu, A. and Santra, A. K. 2021. Human action recognition in videos using convolution long short-term memory network with spatio-temporal networks. Emerging Science Journal 5(1): 25–33.
33. Shibata, K. and Ikeda, Y. 2009. Effect of number of hidden neurons on learning in large-scale layered neural networks. ICCAS-SICE 2009 – ICROS-SICE International Joint Conference 2009, Proceedings, pp. 5008–5013.
34. Uprety, K. , Kennedy, A. , Balzer, W. , Baumler, R. , Duke, R. and Bott, C. 2015. Implementation of ammonia-based aeration control (ABAC) at full-scale wastewater treatment plants. Proceedings of the Water Environment Federation 2015(3): 1–10.
35. Várhelyi, M. , Brehar, M. and Cristea, V. M. 2018. Control strategies for wastewater treatment plants aimed to improve nutrient removal and to reduce aeration costs. 2018 IEEE International Conference on Automation, Quality and Testing, Robotics, AQTR 2018 - THETA 21st Edition, Proceedings, pp. 1–6, available at: https://doi.org/10.1109/AQTR.2018.8402750.
36. Vrečko, D. and Hvala, N. 2013. Model-based control of the ammonia nitrogen removal process in a wastewater treatment plant. S. Strmčnik & Đ. Juričić (Eds), London: Springer London, p. 417, available at: http://link.springer.com/10.1007/978-1-4471-5176-0.
37. Yang, T. , Zhang, L. , Wang, A. and Gao, H. 2013. Fuzzy modeling approach to predictions of chemical oxygen demand in activated sludge processes. Information Sciences 235: 55–64.
38. Yu, H. and Wilamowski, B. M. 2011. Levenberg–Marquardt training. Industrial Electronics Handbook Intelligent Systems. CRC Press, Boca Raton, pp. 12–15, available at: https://doi.org/10.1201/9781315218427.

### FIGURES & TABLES

Figure 1:

BSM1.

Figure 2:

Feedback PI ABAC configuration.

Figure 3:

Direct feedback NN ABAC.

Figure 4:

Flowchart of the proposed NN ABAC methodology.

Figure 5:

Flowchart of the NN training process.

Figure 6:

Flowchart of the LM algorithm.

Figure 7:

The topological formation of the NN.

Figure 8:

The implementation of NN ABAC control architecture in BSM1.

Figure 9:

Performances of the last 7 days of simulation using dry weather with the PI (black line), PI-ABAC (red dotted line), and NN-ABAC (blue line).

Figure 10:

Performances of the last 7 days of simulation using rain weather with the PI (black line), PI-ABAC (red dotted line), and NN-ABAC (blue line).

Figure 11:

Performances of the last 7 days of simulation using storm weather with the PI (black line), PI-ABAC (red dotted line), and NN-ABAC (blue line).

### REFERENCES

1. Aguilar-López, R. , López-Pérez, P. A. and Neria-González, M. I. 2016. Improvement of activated sludge process using a nonlinear pi controller design via adaptive gain. International Journal of Chemical Reactor Engineering 14(1): 407–416.
2. Alex, J. , Benedetti, L. , Copp, J. , Gernaey, K. V. , Jeppsson, U. , Nopens, I. and Winkler, S. 2008. Benchmark Simulation Model No. 1 (BSM1) .
3. Åmand, L. and Carlsson, B. 2013. The optimal dissolved oxygen profile in a nitrifying activated sludge process – comparisons with ammonium feedback control. Water Science and Technology 68(3): 641–649.
4. Åmand, L. , Olsson, G. and Carlsson, B. 2013. Aeration control – a review. Water Science and Technology: A Journal of the International Association on Water Pollution Research 67(11): 2374–2398.
5. Åmand, L. and Carlsson, B. 2014. Aeration control with gain scheduling in a full-scale wastewater treatment plant. IFAC Proceedings Volumes (IFAC-PapersOnline) (Vol. 19), IFAC, available at: http://dx.doi.org/10.3182/20140824-6-ZA-1003.01892.
6. Arnell, M. 2016. Performance assessment of wastewater treatment plants multi-objective analysis using plant-wide models.
7. Cristea, S. , de Prada, C. , Sarabia, D. and Gutiérrez, G. 2011. Aeration control of a wastewater treatment plant using hybrid NMPC. Computers & Chemical Engineering 35(4): 638–650.
8. Du, X. , Wang, J. , Jegatheesan, V. and Shi, G. 2018. Dissolved oxygen control in activated sludge process using a neural network-based adaptive PID algorithm. Applied Sciences 8(2): 261.
9. Ellis, T. G. , Eliosov, B. , Schmit, C. G. , Jahan, K. and Park, K. Y. 2009. Activated Sludge and other Aerobic Suspended Culture Processes. Water Environment Research: a Research Publication of the Water Environment Federation, Vol. 74, available at: http://www.ncbi.nlm.nih.gov/pubmed/12413140.
10. Fazelabdolabadi, B. , Montazeri, M. and Pourafshary, P. 2021. HighTech and innovation a data mining perspective on the confluent ions. Effect for Target Functionality 2(3): 202–215.
11. Ghoneim, W. A. M. , Helal, A. A. and Wahab, M. G. A. 2016. Minimizing energy consumption in Wastewater Treatment Plants. 2016 3rd International Conference on Renewable Energies for Developing Countries, REDEC 2016, Institute of Electrical and Electronics Engineers Inc, available at: https://doi.org/10.1109/REDEC.2016.7577507
12. Han, H. and Qiao, J. 2014. Nonlinear model-predictive control for industrial processes: an application to wastewater treatment process. IEEE Transactions on Industrial Electronics 61(4): 1970–1982.
13. Han, H. -G. , Qiao, J. -F. and Chen, Q. -L. 2012. Model predictive control of dissolved oxygen concentration based on a self-organizing RBF neural network. Control Engineering Practice 20(4): 465–476.
14. Han, H. , Liu, Z. , Hou, Y. and Qiao, J. 2020. Data-driven multiobjective predictive control for wastewater treatment process, IEEE Transactions on Industrial Informatics 16(4): 1.
15. Holenda, B. , Domokos, E. and Fazakas, J. 2008. Dissolved oxygen control of the activated sludge wastewater treatment process using model predictive control. Computer and Chemical Engineering 32: 1270–1278.
16. Huang, G. B. 2003. Learning capability and storage capacity of two-hidden-layer feedforward networks. IEEE Transactions on Neural Networks 14(2): 274–281.
17. Husin, M. H. , Rahmat, M. F. and Wahab, N. A. 2020a. Decentralized proportional-integral control with carbon addition for wastewater treatment plant. Bulletin of Electrical Engineering and Informatics 9(6): 2278–2285.
18. Husin, M. H. , Rahmat, M. F. , Wahab, N. A. , Sabri, M. F. M. and Suhaili, S. 2020b. Proportional-integral ammonium-based aeration control for activated sludge process. 2020 13th International UNIMAS Engineering Conference (EnCon), IEEE, pp. 1–5, available at: https://ieeexplore.ieee.org/document/9299339/.
19. Husin, M. H. , Rahmat, M. F. , Wahab, N. A. and Sabri, M. F. M. 2021a. Neural network ammonia-based aeration control for activated sludge process wastewater treatment plant. Lecture Notes in Electrical Engineering 666: 471–487.
20. Husin, M. H. , Rahmat, M. F. , Wahab, N. A. , Sabri, M. F. M. and Md Zain, Z. 2021b. Neural network ammonia-based aeration control for activated sludge process wastewater treatment plant. In Md Zain, Z. et al. (ed.), Proceedings of the 11th National Technical Seminar on Unmanned System Technology 2019. Lecture Notes in Electrical Engineering Vol. 666: 471–487, available at: http://link.springer.com/10.1007/978-981-15-5281-6_32.
21. Jinchuan, K. and Xinzhe, L. 2008. Empirical analysis of optimal hidden neurons in neural network modeling for stock prediction. Proceedings – 2008 Pacific-Asia Workshop on Computational Intelligence and Industrial Application, PACIIA 2008, 2: 828–832.
22. Martín, J. M. , Vega, P. , Informática, D. and Revollar, S. 2012. Set-point Optimization for Enhancing the MPC Control of the N-Removal Process in WWTP’s, pp. 1–6.
23. Medinilla, V. R. , Sprague, T. , Marseilles, J. , Burke, J. , Deshmukh, S. , Delagah, S. and Sharbatmaleki, M. 2020. Impact of Ammonia-Based Aeration Control (ABAC) on energy consumption. Applied Sciences 10(15): 5227.
24. Møller, M. F. 1993. A scaled conjugate gradient algorithm for fast supervised learning. Neural Networks 6(4): 525–533.
25. Olsson, G. , Carlsson, B. , Comas, J. , Copp, J. , Gernaey, K. V. , Ingildsen, P. and Amand, L. 2014. Instrumentation, control and automation in wastewater – from London 1973 to Narbonne 2013. Water Science and Technology: A Journal of the International Association on Water Pollution Research 69(7): 1373–1385.
26. Qiao, J. F. , Han, G. and Han, H. G. 2014. Neural network on-line modeling and controlling method for multi-variable control of wastewater treatment processes. Asian Journal of Control 16(4): 1213–1223.
27. Samsudin, S. I. , Rahmat, M. F. , Wahab, N. A. , Gaya, M. S. and Razali, M. C. 2013. Application of adaptive decentralized PI controller for activated sludge process. Proceedings of the 2013 IEEE 8th Conference on Industrial Electronics and Applications, ICIEA 2013, 1792–1797.
28. Samsudin, S. I. , Rahmat, M. F. , Wahab, N. A. , Razali, M. C. , Gaya, M. S. and Salim, S. N. S. 2014. Improvement of Activated Sludge Process Using Enhanced Nonlinear PI Controller. Arabian Journal for Science and Engineering 39: 6575–6586.
29. Santin, I. , Pedret, C. , Meneses, M. and Vilanova, R. 2015b. Process based control architecture for avoiding effluent pollutants quality limits violations in wastewater treatment plants. 2015 19th International Conference on System Theory, Control and Computing (ICSTCC), IEEE, pp. 396–402, available at: http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=7321326.
30. Santín, I. , Pedret, C. and Vilanova, R. 2015a. Fuzzy control and model predictive control configurations for effluent violations removal in wastewater treatment plants. Industrial and Engineering Chemistry Research 54(10): 2763–2775.
31. Santín, I. , Pedret, C. , Vilanova, R. and Meneses, M. 2016. Advanced decision control system for effluent violations removal in wastewater treatment plants. Control Engineering Practice 49(January): 60–75.
32. Sarabu, A. and Santra, A. K. 2021. Human action recognition in videos using convolution long short-term memory network with spatio-temporal networks. Emerging Science Journal 5(1): 25–33.
33. Shibata, K. and Ikeda, Y. 2009. Effect of number of hidden neurons on learning in large-scale layered neural networks. ICCAS-SICE 2009 – ICROS-SICE International Joint Conference 2009, Proceedings, pp. 5008–5013.
34. Uprety, K. , Kennedy, A. , Balzer, W. , Baumler, R. , Duke, R. and Bott, C. 2015. Implementation of ammonia-based aeration control (ABAC) at full-scale wastewater treatment plants. Proceedings of the Water Environment Federation 2015(3): 1–10.
35. Várhelyi, M. , Brehar, M. and Cristea, V. M. 2018. Control strategies for wastewater treatment plants aimed to improve nutrient removal and to reduce aeration costs. 2018 IEEE International Conference on Automation, Quality and Testing, Robotics, AQTR 2018 - THETA 21st Edition, Proceedings, pp. 1–6, available at: https://doi.org/10.1109/AQTR.2018.8402750.
36. Vrečko, D. and Hvala, N. 2013. Model-based control of the ammonia nitrogen removal process in a wastewater treatment plant. S. Strmčnik & Đ. Juričić (Eds), London: Springer London, p. 417, available at: http://link.springer.com/10.1007/978-1-4471-5176-0.
37. Yang, T. , Zhang, L. , Wang, A. and Gao, H. 2013. Fuzzy modeling approach to predictions of chemical oxygen demand in activated sludge processes. Information Sciences 235: 55–64.
38. Yu, H. and Wilamowski, B. M. 2011. Levenberg–Marquardt training. Industrial Electronics Handbook Intelligent Systems. CRC Press, Boca Raton, pp. 12–15, available at: https://doi.org/10.1201/9781315218427.