Next Article in Journal
When Reality Kicks In: Exploring the Influence of Local Context on Community-Based Design
Next Article in Special Issue
Capacity of Marine Microalga Tetraselmis suecica to Biodegrade Phenols in Aqueous Media
Previous Article in Journal
Classification of Driver Injury Severity for Accidents Involving Heavy Vehicles with Decision Tree and Random Forest
Previous Article in Special Issue
Biogas Production from Concentrated Municipal Sewage by Forward Osmosis, Micro and Ultrafiltration
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Application of Neural Networks and Regression Modelling to Enable Environmental Regulatory Compliance and Energy Optimisation in a Sequencing Batch Reactor

1
School of Engineering, National University of Ireland Galway, H91TK33 Galway, Ireland
2
Molloy Environmental Systems, Clara Rd, Coleraine, R35D956 Tullamore, Ireland
3
School of Computer Science, National University of Ireland Galway, H91TK33 Galway, Ireland
4
Ryan Institute, National University of Ireland Galway, H91TK33 Galway, Ireland
*
Author to whom correspondence should be addressed.
Sustainability 2022, 14(7), 4098; https://doi.org/10.3390/su14074098
Submission received: 13 December 2021 / Revised: 4 March 2022 / Accepted: 7 March 2022 / Published: 30 March 2022
(This article belongs to the Special Issue Sustainable Wastewater Management and Treatment)

Abstract

:
Real-time control of wastewater treatment plants (WWTPs) can have significant environmental and cost advantages. However, its application to small and decentralised WWTPs, which typically have highly varying influent characteristics, remains limited to date due to cost, reliability and technical restrictions. In this study, a methodology was developed using numerical models that can improve sustainability, in real time, by enhancing wastewater treatment whilst also optimising operational and energy efficiency. The methodology leverages neural network and regression modelling to determine a suitable soft sensor for the prediction of ammonium-nitrogen trends. This study is based on a case-study decentralised WWTP employing sequencing batch reactor (SBR) treatment and uses pH and oxidation-reduction potential sensors as proxies for ammonium-nitrogen sensors. In the proposed method, data were pre-processed into 15 input variables and analysed using multi-layer neural network (MLNN) and regression models, creating 176 soft sensors. Each soft sensor was then analysed and ranked to determine the most suitable soft sensor for the WWTP. It was determined that the most suitable soft sensor for this WWTP would achieve a 67% cycle-time saving and 51% electricity saving for each treatment cycle while meeting the criteria set for ammonium discharges. This proposed soft sensor selection methodology can be applied, in full or in part, to existing or new WWTPs, potentially increasing the adoption of real-time control technologies, thus enhancing their overall effluent quality and energy performance.

1. Introduction

Advances in instrumentation, control and automation are aiding the development of intelligent real-time control (RTC) systems that can be used to predict, analyse and judge the real-time state of a system and self-adapt/organise based on input signals from sensors [1,2,3,4,5]. RTC systems can improve decision making and optimise system performance and are well suited to the control of complex and dynamic processes. However, sensors and detectors can produce large quantities of data that can be challenging to store, process and analyse. Thus, advances in analytic, decision-making, and process optimisation tools are required to enable the development of RTC systems. This has driven research into the use of numerical modelling techniques in a variety of engineering applications such as water fault detection, aquaculture and vaccine development [1,3,6,7,8,9].
An area where RTC can disruptively innovate and increase process efficiencies is in wastewater treatment. Protection of water resources and water quality is a key sustainable development goal [10], and the effective and sustainable treatment of wastewater is essential to this. Untreated wastewater results in water pollution, which affects both environmental quality and public health [11,12]. Therefore, environmental regulatory compliance in the wastewater treatment sector is vital. However, in the process of meeting regulatory compliance, wastewater treatment plants (WWTPs) can often inefficiently consume energy and be operated inefficiently due to a lack of suitable control processes.

1.1. RTC in Wastewater Treatment Facilities

Wastewater hydraulic flow rates and organic concentrations fluctuate over time; however, wastewater treatment plants are typically rigidly designed and operated to process worst-case scenarios (e.g., maximum hydraulic and design mass loading rates) [13,14,15]. This, in addition to stringent regulatory requirements, can result in inefficiencies in treatment capacity and energy consumption [13]. It has been noted that providing effective and efficient operation requires advanced or RTC solutions that can increase process control and efficiencies [5,16]. This is particularly true for small-scale WWTPs commonly located in towns and villages which have the additional challenges of (i) a lack of permanent operators and local expertise, (ii) relatively high energy costs, (iii) sludge handling, (iv) variable influent hydraulic or organic loads, and (v) inflexible operating regimes [17,18]. Despite these challenges, small WWTP operators are required to comply with tight regulations, which are proving difficult to meet. In Europe, the Urban Wastewater Treatment Directive (UWWTD) (91/271/EEC) specifies the standards for effluent discharged from WWTPs with population equivalents (Pes) exceeding 2000. These regulated parameters include biochemical oxygen demand (BOD), chemical oxygen demand (COD), ammonium-nitrogen (NH4-N) and total suspended solids (TSS). In sensitive locations, additional parameters can include the monitoring of total phosphorus (TP) and total nitrogen (TN). The implementation of the Water Framework Directive (2000/60/EC) means more stringent limits can be attached to smaller WWTPs depending on status of the receiving waters.
RTC presents a viable means of advanced and targeted control which has significant potential to improve energy efficiency and environmental performance [19], this can lead to improved sustainability [20] in both large- and small-scale WWTPs. Despite considerable developments in sensor technology, real-time analysis of key parameters such as NH4-N remains a challenge in terms of robustness, accuracy and affordability [4,20,21,22]. Therefore, the use of cost-efficient and reliable soft sensors as surrogates to predict certain parameters holds significant potential for disruptive innovation [23,24]. Several studies have demonstrated that sensors measuring parameters such as oxidation-reduction potential (ORP) and pH can act as surrogates for NH4-N sensors [15,25,26,27,28,29,30] (Table 1). However, the implementation of these results at small-scale WWTPs is limited. Much of this research is limited to raw and differentiated pH and ORP sensor data as input variables. To the knowledge of the authors, no research has been conducted using a suite of pH and ORP variables (i.e., variables identified from the pH and ORP profile characteristics).
RTC using surrogate sensors requires developing relationships between the primary variable(s) of interest and the surrogate variables being measured. For example, an operator may wish to employ the following rule for controlling a wastewater treatment plant: “when y < t, stop processing”, where y is the concentration of the chemical of interest and t is a threshold for safe discharge. When using surrogate sensors, the task then reduces to a non-linear modelling problem since “y” is not measured directly. Instead, a number of variables (xn) are analysed to develop functions, whereby y = f(x1, x2, … xn). Several authors have taken this type of approach (Table 1), focusing particularly on fuzzy modelling and advanced neural network (NN) approaches, including recurrent networks [23], cascade networks [43], self-organising network structures [42,43] and fuzzy-neural network hybrids [24,41,45]. There has also been work in developing NN-based soft sensors, using principal component analysis (PCA) to select the optimal number of input vectors [30,47]. These PCA-based NNs were applied to a large-scale municipal wastewater plant, where they predicted concentrations of COD, TN and TSS (among others) using measurements of oxygen and nitrogen concentrations with influent flow rate and alkalinity. However, to the authors’ knowledge, no work has been reported on using a standard feed-forward NN for regression. Standard feed-forward NNs often perform well in non-linear system modelling, so this is an important research gap.
The current study proposes a range of soft sensors, which can be selected according to weights assigned to criteria that might vary with site-specific requirements. There is an abundance of labelled data collected in real-world conditions (which reflect the application of the methodology in practice); hence, there is no need for a self-organising structure. The appropriate network structure can be investigated by comparing the performance of alternative structures directly.
Finally, this study takes a different approach to dealing with non-linear time-varying system dynamics, by using a recurrent or other dynamic network for this aspect. The data are pre-processed to produce a large selection of input variables, which encode information about time-varying aspects of the data. This approach makes the choice of input variables crucial. To address this, this study compares several variable sets (combinations of input variables)—each of which is assessed using a set of criteria describing key, usable features for performance optimisation. In contrast to [45] this study employs regularisation for feature reduction where needed, and leverages manually investigated feature subsets, rather than using PCA. This study presents a methodology capable of identifying the most suitable soft sensor, utilising surrogate probes and inferential estimating models, for RTC of small and decentralised WWTPs. This methodology can cater for the dynamic nature of small and decentralised WWTPs as well as ensuring key onsite goals which can be prioritised in soft sensor selection.

1.2. Numerical Modelling Methods

Regression is the task of modelling a real dependent variable y as a function of independent variables f(xn), minimising the errors between y and f(xn). A training set, a dataset of known values for xn and y, is required to develop the model with the goal of accurate out-of-sample prediction, which is typically measured using a hold-out or test set. A common regression technique is multiple linear regression (MLR), a linear least-squares approximation of the data. MLR provides equations linking a number of input variables (xn) to a target variable (y) using Equation (1) [48].
y = w 0 + w 1 x 1 + + w n x n
where w0 is the intercept, wn is a coefficient (or slope) for xn and n is the number of input variables. Out-of-sample accuracy can be improved by using regularisation methods which add a penalty term to the model input variables, shrinking the freedom of the input variable during learning [48]. A popular regularisation method is the least absolute shrinkage and selection operator (LASSO) [22,49].
In contrast, NNs are non-linear models with many more degrees of freedom, hence they can be used to model more complex systems. They do not require a priori knowledge about the systems’ structure. They are trained using various gradient descent algorithms [32,50]. A typical NN structure can have one input layer, one or more hidden layers, and one output layer, as illustrated in Figure 1 [39]. Each layer has several nodes. Within a layer, the jth node computes a linear combination of its input variables (x1, x2, x3, …,xn), coming from the previous layer, with each signal having an associated weight (w1j, w2j, w3j,, wnj) [51]. A second input to the node is the bias (bj), a constant that governs the node’s net input. Weights are multiplied by corresponding inputs to create a weighted input using Equation (2).
y j = b j + i = 1 n w i j × x i  
where i represents the inputs and j represents each node.
The node then applies a transfer function to give its output. Several transfer functions are commonly used including logistic sigmoid, hyperbolic tangent sigmoid and linear functions.
Beginning with the independent variables, values are fed into each successive layer, with outputs from one layer becoming inputs to the next. At the output layer, a single value is output, which is the predicted value of y for the current inputs xn. Training proceeds by adjusting weights and biases using gradient descent algorithms, such as Levenberg–Marquardt back-propagation [52,53,54,55,56] and Levenberg–Marquardt back-propagation with Bayesian regularisation [57,58,59,60], to minimise error at the output.
The specific goal, in this study, was to create a model to accurately predict current NH4-N concentration (output) given current and previous ORP and pH values (inputs). This study investigated two types of regression methods, (i) multiple linear regression (MLR) (Rlin) and (ii) MLR with LASSO regularisation (Rreg), and two types of NN training algorithms, (i) Levenberg–Marquardt back-propagation (NNlm) and (ii) Levenberg–Marquardt back-propagation with Bayesian regularisation (NNbr). Results were analysed in two ways, (i) prediction of the general NH4-N trend and (ii) performance when predicting a specific NH4-N concentration—for example a regulatory discharge limit (performance was assessed in terms of accuracy of prediction, and time and energy savings achieved in the treatment cycle). Furthermore, a weighting and ranking system was used to determine the overall best setup that can enable optimal operational, environmental and energy performance.

2. Materials and Methods

The case-study site comprised a sequencing batch reactor (SBR), receiving wastewater from a residential development. The influent wastewater to the SBR comprised domestic wastewater that had undergone primary clarification. The SBR comprised a two-chamber precast concrete tank (a primary settlement chamber and a reaction chamber), with working volumes of 2.42 m3 (hydraulic retention time (HRT) of 4 days) and 1.56 m3 (HRT of 2.6 days), respectively (Figure 2). Influent raw wastewater fed into the primary tank using a pump. This pump was operated using a programme that mimicked the typical diurnal domestic house flow pattern (Table 2) according to the European Standards for evaluation of domestic wastewater treatment systems (CEN 12566-3 2006) [61]. The system was aerated mechanically as required.

2.1. Cycle Control

A Siemens LOGO! PLC controlled a 464 min cycle comprising the following phases: 2 min fill phase, 400 min aeration phase, 60 min settlement phase and 2 min discharge phase (Figure 3). The aerated phase comprised 20 min blocks, each of which had a 5 min period during which the aeration system was turned on, followed by a 15 min quiescent period.
A feed pump installed in the reactor chamber (switched on for 5 s, to create a siphon) moved liquid from the primary settlement chamber into the reaction chamber as required. Siphoning was terminated when the liquid level in the primary chamber went below (i) the inlet level of the feed pipe, (ii) the liquid level, or (iii) once the two chambers had equalised. As only the volume available over the feed pipe was transferred for treatment, this technique resulted in a dynamic feed volume. Table 3 details the operations in each phase.

2.2. Monitoring

Influent and effluent wastewater samples were taken from the primary tank and from a collection vessel placed on the discharge line of the SBR, respectively. Filtered COD and TSS were tested in accordance with standard methods [62] whereby samples were passed through 1.2 μm Whatman GF/C microfiber filters. Total nitrogen (TN) was measured using a Biotector TOC TN TP Analyser (BioTector Analytical Limited, Cork, Ireland). Filtered NH4-N and NO3-N were measured using a Thermo Clinical Labsystem, Konelab 20 Nutrient Analyser (Fisher Scientific, Waltham, MA, USA). Hach sc1000 multi-meters monitored data collected from pH, ORP and NH4-N sensors, in the reactor chamber. pH and ORP were measured at 1 min intervals while NH4-N was measured at 5 min intervals on a 24 h basis (to match the pH and ORP data, NH4-N data were linearly interpolated to create a data point every 1 min). All sensors were fitted approximately 500 mm below the lowest liquid level within the reaction chamber and above any potential sludge blanket that might be formed during settlement. All instruments were calibrated, maintained and operated in accordance with manufacturers’ instructions.

2.3. Overview of NH4-N, pH and ORP Profiles

A typical profile for NH4-N saw an increase in concentrations as influent was mixed with the treated wastewater remaining in the reactor from the previous cycle. NH4-N concentrations peaked soon after the fill phase. The time and magnitude of this peak varied depending on influent hydraulic volumes, organic carbon and NH4-N concentrations. Following this peak, NH4-N concentrations decreased due to organic carbon oxidation and subsequent nitrification. At approximately 225 min, the rate of decrease in NH4-N concentrations reduced/levelled off and continued thus for the remainder of the cycle.
A cyclical rise and fall in both pH’ (Figure 4a) and ORP (Figure 4c) profiles during the aeration phase occurred, as the aerator switched on and off, resulting in a peak (or apex) and trough (nadir) in each aeration period in both pH (Figure 4b) and ORP (Figure 4d) profiles. The increase in pH, corresponding to the aeration-on period, was likely, in this case, to be due to CO2 stripping [28]. The decreases in pH and ORP profiles during the 15 min quiescent period were likely due to a reduction in microbial activity over the course of the aerobic phase [63]. pH reduction was greatest and tailed off following the apex before a subsequent nadir was reached. A similar pattern was observed in the ORP profile. In general, pH decreases as alkalinity is consumed during the nitrification progresses [25]. The trend in pH decreased in response to aeration-on periods as a result of CO2 stripping (Figure 4b). ORP generally increased during aeration; on completion of nitrification, ORP change accelerated; this acceleration was caused by an abundance of DO [64].

3. Application

The methodology consisted of four main steps, namely, (i) data collection and pre-processing, (ii) experimental setup, (iii) soft sensor analyses and (iv) weighting and ranking application (Figure 5).

3.1. Assessed Input Variables

A number of unprocessed (pH and ORP) and processed input variables were constructed and added to the set of independent variables (Table 4). The selected processed input variables were constructed using the profile features identified in Section 2.3. For example, the change in pHapex values (pH∆apex) was observed to decrease with NH4-N reduction and was considered useful in identifying the end of NH4-N removal. The set of independent variables was then analysed in 22 variable sets encompassing a broad range of combinations. Each variable set included a unique collection of input variables (Table 5).
Within each 464 min cycle, data collected between 0 and 45 min and 402 and 464 min were excluded to eliminate the effects of filling and settlement periods (as these phases were not part of the biological reaction phases of the treatment cycle). Between 0 and 45 min, the effects of the filling stage were still apparent in terms of raw influent mixing with existing wastewater in the system. The settlement and discharge phase was between 402 and 464 min. Data from 41 treatment cycles (each 464 min in duration) were collected, 12 of which (approximately 30%) were randomly separated for use as a test dataset, and the remainder were used as a training dataset.

3.2. Models

Two types of inferential estimation models were examined, namely regression and NNs. Two regression models were assessed, MLR without regularisation (Rlin) and MLR with LASSO regularisation (Rreg). Levenberg–Marquardt back-propagation (NNlm) and Levenberg–Marquardt back-propagation with Bayesian regularisation (NNbr) were the two NN training models used. Within the NN training models, a hyperbolic tangent sigmoid hidden layer transfer function and a linear output layer transfer function were used. Each model contained one hidden layer of X neurons, notated as NNlm[X] and NNbr[X] (X being the number of input variables in the variable set under investigation). Additional NNlm and NNbr models were created by adjusting the number of neurons in the hidden layer to half the number of input variables, i.e., X/2 (NNlm[0.5X] and NNbr[0.5X]) and twice the number of input variables, i.e., 2X (NNlm[2X] and NNbr[2X]).
The feed-forward neural network architecture we have chosen is suitable for non-linear system modelling. As the input data are structured, not spatial, we do not need weight-sharing schemes such as convolution. Since we aim to produce an instantaneous soft sensor (i.e., its output reflects the current state of the system), we do not need a stateful network such as a recurrent network. Our choices for (i) transfer function and regularisation, (ii) the number of hidden nodes tested as a hyperparameter and (iii) values chosen, relative to the number of input variables (≤15), are long-standing best practice [58,65]. The main advantages of our design are that it is simple, robust, easy to train, and not demanding to run even on low-power devices in the field. More sophisticated designs are possible and could have potential performance advantages but were considered out of scope.
In total, 176 soft sensors (i.e., a model applied to a variable set) were analysed. These soft sensors consisted of eight models with 22 identified variable sets using 15 input variables (Table 5, Figure 6). MATLAB was used as the computing environment to apply each of the models.

3.3. Analyses

The effectiveness of the models was assessed across six criteria, split between two categories. Category A assessed the accuracy of the general NH4-N trend prediction; and Category B the accuracy of the predicted trend at a selected NH4-N concentration, known as the “cut-off threshold value”. This value was set at 2 mg NH4-N/l for the purposes of this study; site-specific values can vary due to local regulations. The assessment criteria are listed in Table 6.

3.4. Ranking System

A ranking and weighting system was developed to compare the overall impact of each soft sensor. This was necessary as soft sensors may differ in their impact on the overall performance and efficiency of the SBR. For example, a soft sensor may achieve good R2 performance, but also return a poor RMSE result. This example scenario would produce results in line with the actual NH4-N trend but not necessarily close to the actual concentration, thus the overall result would not be acceptable. In consultation with WWTP operators, weights were applied to each of the criteria (Table 7). In general, the overriding concern in WWTPs is to meet environmental regulation, thus Aberror would be considered vital. For indicative purposes, the weights outlined in Table 7 were applied to this study. It should be noted that weightings may vary depending on site-specific requirements and demands. In addition, these weights can be adjusted to promote site-specific goals. For example, increasing Tsave would promote the selection of a soft sensor with good energy saving characteristics, but this may result in poor effluent quality.
Soft sensor results were ranked against each other for each criterion, with better results receiving a higher rank value (ranked values are 1 to n, where n is the number of soft sensors in question). The ranked value was then multiplied by the corresponding criterion weight to acquire the weighted value. Weighted values were then added together and compared to determine the most appropriate soft sensor as follows:
Step 1, determine the best soft sensor (highest weighted value) for each model using the system described above (Equation (3));
Step 2, determine the best soft sensor (highest weighted value) (and thus the overall best soft sensor) from Step 1 results using the system described above.
W e i g h t e d   V a l u e S o f t s e n s o r = n = 1 n = i ( R a n k n   ×   W e i g h t n )
where n = each   criterion   detailed   in Table 7.

3.5. Further Analyses

Although determining the best soft sensor was the main objective of this study, a number of other studies, using the same criteria and weights, were also executed including (i) whether MLR and NN regularisation improved results, (ii) a comparison between MLR and NN methods, (iii) how adjusting the number of neurons in the NN hidden layers affected results, and (iv) an examination of which variable sets, which variables and which models were best. It should be noted that the model, variable set, etc., identified for the best soft sensor may differ from that for the best identified model, variable set, etc. The aim of this study was not just to identify the best soft sensor (combination of model and variable set), but also the best overall model and variable set.

4. Results

The overall influent and effluent results for the SBR are summarised in Table 8.

4.1. Regression Results

Two regression models were assessed, Rlin and Rreg. Detailed results for each model are displayed in Table A1 and Table A2, respectively. For NH4rem, results varied between 20% and 97% for Rlin (average value of 66%) and between 75% and 93% for Rreg (average value of 84%). Average Tsave and aberror results were 51% and 0.98 mg NH4-N/l for Rlin and 51% and 0.73 mg NH4-N/l Rreg. An overview of these results shows that Rreg was better than Rlin, as it, on average, achieved better NH4rem and aberror results while maintaining a similar Tsave result, thus resulting in better and more reliable effluent concentration predictions.

4.2. Neural Network Results

NNs were assessed using two algorithms, namely NNlm and NNbr. Overall results for NNlm[X] are displayed in Table A3. The average NH4rem result for NNlm[X] was 65% with corresponding Tsave and aberror results of 60% and 1.52 mg NH4-N/l, respectively. The application of NNlm[0.5X] (Table A4) returned an average NH4rem result of 72% and average Tsave and aberror results of 59% and 0.84 mg NH4-N/l, respectively. Average results for NNlm[2X] (Table A5) were 59%, 65% and 1.52 mg NH4-N/l for NH4rem, Tsave and aberror, respectively.
NNbr[X] returned average Tsave, aberror and NH4rem results of 60%, 1.35 mg NH4-N/l and 67%, respectively (Table A6). NNbr[X] was further assessed using NNbr[0.5X] and NNbr[2X]. NNbr[0.5X] returning average Tsave, aberror and NH4rem results of 60%, 1.03 mg NH4-N/l and 69%, respectively, while NNbr[2X] results for Tsave, aberror and NH4rem were 64%, 1.33 mg NH4-N/l and 61%, respectively. Overall results for NNbr[0.5X] and NNbr[2X] are displayed in Table A7 and Table A8, respectively.
NNlm[0.5X] was the best soft sensor in terms of NH4rem and aberror results, while NNlm[2X] had the best Tsave result. It should be noted that these average results are only indicative of the overall performance of the soft sensor and do not represent the ability of individual soft sensors at predicting NH4-N trends during the cycle itself.

4.3. Weighting and Ranking Results

To decide the best soft sensor a weighting and ranking system was applied. Table 9 summarises the overall results from this study (full details are available in Table A9). The first step determined the best variable set (i.e., combination of independent input variables) for each model and the second step determined the best soft sensor.
Overall, NNbr[2X]U was determined to be the most efficient soft sensor based on the weighting system. Variable set U used a combination of moving averages with nadir-apex values for both pH and ORP. This soft sensor achieved an average NH4rem result of 88% over the 12 test cycles with corresponding Tsave and aberror results of 67%, 0.57 mg NH4-N/l, respectively (Figure 7). This equated to a 51% reduction in electricity costs for the SB system due to the time savings during the treatment cycle (which in commercial settings may reduce aeration costs).

4.4. Comparison between Methodologies Applied

Using the weighting and ranking method and comparing Rlin to Rreg for each variable set, it was observed that Rlin was marginally better than Rreg (in this comparison Rlin performed better for 54.5% of the model/variable set combinations). A similar comparison was carried out comparing individual variable sets for the three sets of hidden layer neuron models for NNlm (NNlm[X], NNlm[0.5X] and NNlm[2X]) and NNbr (NNbr[X], NNbr[0.5X] and NNbr[2X]). For both NNlm (77.3% of total number of variable sets) and NNbr (45.5%), 0.5X was most efficient, while 2X was least efficient (performed best for only 4.5% and 18.2% model/variable set combinations), for NNlm and NNbr, respectively. Bearing this in mind, and comparing NNlm against NNbr for 0.5X, the non-regularised model, NNlm (68.2%), was the better performing NN model. A further comparison was carried out to compare the leading NN (NNlm[0.5X]) and regression (Rlin) models for individual input variables. This showed that Rlin performed better in 54.5% of variable sets. Alternatively, a study of the final ranked results (Table 9) shows that three of the top four ranked soft sensors use the NNbr model; therefore, for future applications, it may be possible to use this model only. This result suggests that regularisation has indeed helped to avoid some over-fitting suffered by the unregularised NN_lm models. Table 10 compares each variable set for each soft sensor. The aggregate of variable set rank gives an indication of overall variable set performance (when compared to other models).
A similar study comparing variable sets (Table A9) identified the top three variable sets as T (pHnadir-apex and ORPnadir-apex), V (pHma20 and pHnadir-apex) and M (ORPcum and ORPnadir-apex)—each of these used only two input variables, suggesting that simpler variable sets can lead to better models. The nadir-apex input variable seems particularly useful, and more generally the processed input variables were clearly providing added value to the numerical modelling.

5. Discussion

As detailed in the results, soft sensors selected using NNs and regression models, in this case the NNbr[2X]U soft sensor, have the potential to generate large operational savings such as reduced treatment cycle duration and reduced electricity usage, whilst also meeting discharge requirements. This study was conducted in a small-scale WWTP, using a suite of pH and ORP variables (i.e., variables identified from both pH and ORP profile characteristics in the SBR). Several studies have demonstrated that ORP and pH sensors can act as surrogates for NH4-N sensors [15,25,26,27,28,29,31]; however, the implementation of these results at small-scale WWTPs is limited, and many of these studies did not look at pH and ORP sensors in a combined manner.
For the task at hand, the use of the NN training (optimisation) method was quite standard. The main advantage of the linear regression model was interpretability. The effect of each variable on the output of the model was easy to understand. Neural network models are often able to fit data better at the cost of interpretability. However, neural network models can be interrogated and visualised to give a good understanding of their effect. The motivation for using Bayesian regularisation was to help avoid over-fitting. Over-fitting is the scenario where the model fits the training data well but fails to generalise to unseen data. Regularisation pushes the model towards a simpler form which may fit the training data slightly less but is more likely to generalise.
Wastewater pollutant concentration datasets are suitable for application in NNs as they have a large number of inputs, each of which can vary significantly. In addition, given the 24/7 nature of wastewater treatment, large datasets can be collected from wastewater sensors, which can improve NN suitability even further. However, as discussed in Section 3 of this paper, NNs must be carefully designed and trained to ensure that the outputs are suitable for use in real-time control applications. Given the black box nature of NNs, careful attention is required when assessing input variables, selecting models and assign rankings.
The methodology proposed in this paper creates an opportunity for WWTPs utilising SBRs (and indeed any WWTP utilising other batch treatment processes) to select their own custom soft sensor to optimise on-site treatment processes. In addition, the methodology can be repeated over time in WWTPs to adapt to any significant on-site changes such as, substantial changes in influent wastewater constitution due to the connection of new wastewater sources, etc. However, it can be labour intensive to apply the methodology in a new site, particularly if it is difficult to source the database of parameters required to train the model. To assist with this, further research on this topic would include the application of the best sensor across a larger number of site-based systems, and further adaptation to enable control of biological nitrogen and phosphorous removal where required. Recent work investigated the prediction of N and P removal in municipal wastewater using microalgae modelling response surface methodology, multilayer perceptron artificial neural network and support vector regression [66]. However, despite this and other recent work there is a need to focus on robust methods for system control.
RTC using soft sensors offers many benefits from a managerial perspective. Improved treatment efficacy (in terms of discharge compliance) can be achieved in a more consistent manner without the need for manual intervention by WWTP operatives, whilst electrical energy savings can ease the burden in terms of financial management and assist with meeting targets such as the EU Energy Efficiency Directive (EED). As the equipment required for this methodology is economical, readily available, and easy to use, highly skilled operators are not required to apply the technology, the capital and operating costs are low which enhances sustainability of the technology in smaller WWTPs.
RTC may also be particularly advantageous in WWTPs which are subject to changing loadings due to seasonal changes in tourism, which can lead to seasonal, weekly or daily fluctuations, both hydraulically and organically, which can be difficult to manage. The technology could also be used to extend the duration of treatment cycles to ensure discharge compliance in the instance where a WWTP may be over-loaded in terms of pollutant load (dependent on site-specific conditions such as upstream wastewater storage provisions and other operational considerations allowing for extended cycle times), or reduce the treatment cycle duration to the minimum time required to meet discharge regulations, which can allow a WWTP to treat additional hydraulic load, if required.

6. Conclusions and Outlook

This research presents a methodology for enabling real-time control of NH4-N removal in wastewater treatment systems. The methodology was developed using a case-study SBR system treating residential wastewater. MLR and NN techniques were used and compared to develop suitable soft sensors that could enable RTC of wastewater treatment systems. This study also presented a method for selecting the optimal soft sensor based on the specific outcomes required at any site.
The estimating models’ studies included linear regression (Rlin) and regularised linear regression (Rreg) and NN models leveraging Levenberg–Marquardt back-propagation (NNlm) and Levenberg–Marquardt back-propagation with Bayesian regularisation (NNbr). The impact of neuron numbers in each NN model was also analysed. It was determined that for a typical treatment cycle, the best preforming soft sensor, using the site-specific criteria at this site (which heavily weighted accuracy in effluent NH4-N concentration prediction) used Bayesian regularisation and would achieve an average treatment time saving of 67%, resulting in an average energy saving of 51% of electricity costs. The controlled treatment cycle would achieve 88% NH4-N removal when compared to the fixed time treatment cycle but, significantly, ensured discharges remained within the threshold discharge concentration set. These results highlight how the methodology can provide a level of targeted control, which can significantly improve the sustainability of wastewater treatment by balancing the needs of safe discharge and efficient energy usage.
The methodology proposed to determine the most efficient soft sensor for any given site can allow a more targeted approach to enable a site to adapt as on-site considerations change. The models studied can be implemented on basic programmable logic controllers typically used for small-scale SBR systems, making the methodology suitable even in small WWTPs with limited resources. The methodology also has the potential to be applied to existing SBRs, making it a cost-effective option for process upgrade works in existing WWTPs.
One limitation of this research is that the methodology is focused specifically on SBRs. There is additional potential for the procedure to be modified to suit other technologies; in particular, systems that treat wastewater in batches. Further research on this topic would include the application of the best sensor across a larger number of site-based systems and further adaptation to enable control of biological nitrogen and phosphorous removal where required.

Author Contributions

Conceptualisation, E.C. and S.F.; methodology, E.C., S.F., J.M., E.D. and R.C.; formal analysis, S.F., E.D., R.C., E.C. and J.M.; investigation, S.F., R.C., E.D., J.M. and E.C.; data curation, S.F., R.C. and E.D.; writing—original draft preparation, S.F., E.D., R.C., E.C. and J.M.; supervision, E.C. and J.M.; funding acquisition, E.C. All authors have read and agreed to the published version of the manuscript.

Funding

The authors wish to acknowledge the support of Molloy Environmental Systems; the Energy Systems Integration Partnership Programme is financially supported by Science Foundation Ireland under the SFI Strategic Partnership Programme (Grant Number SFI/15/SPP/E3125) and the Irish Research Council.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Additional data have been provided (Table A1, Table A2, Table A3, Table A4, Table A5, Table A6, Table A7, Table A8 and Table A9). Other raw data are available on request.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A

Table A1. Rlin results.
Table A1. Rlin results.
Soft Sensor Average R2 in Last 200 Min Average RMSE in Last 200 MinAverages at 2 mg NH4-N/l Trigger
Average R2Average RMSENH4rem
(%)
Tsave
(%)
aberror
(mg/L)
SC
RlinA0.7440.6391.2290.6281590.6612
RlinB0.7790.5151.2730.50686580.6412
RlinC0.7770.4661.3150.49885530.6612
RlinD0.7770.4651.3130.49682570.9911
RlinE0.6470.7091.2460.61476660.8110
RlinF0.7250.5541.2340.5577600.6211
RlinG0.6390.7461.280.58480610.3111
RlinH0.7730.5531.320.586530.5812
RlinI0.7210.5821.3490.6377500.8811
RlinJ0.5980.6411.5150.90787271.4112
RlinK0.7650.8671.4980.62793400.8212
RlinL0.7660.5941.3370.56879561.1911
RlinM0.3640.3971.6340.94997141.3112
RlinN0.3340.6991.6640.9897141.3912
RlinO0.3510.6831.7760.91320863.675
RlinP0.6390.7461.250.58480610.3111
RlinQ0.6960.8341.5090.67693360.7812
RlinR0.7790.6351.320.54480551.1711
RlinS0.7790.6281.3390.58188500.6912
RlinT0.4930.7421.4550.60462691.1710
RlinU0.7390.8661.4630.57789470.6512
RlinV0.780.8681.3990.52891430.7512
Table A2. Rreg results.
Table A2. Rreg results.
Soft Sensor Average R2 in Last 200 Min Average RMSE in Last 200 MinAverages at 2 mg NH4-N/l Trigger
Average R2Average RMSENH4rem
(%)
Tsave
(%)
aberror
(mg/L)
SC
RregA0.7450.6331.1980.58182596112
RregB0.7140.5021.2330.55475617211
RregC0.720.4921.2380.55977606811
RregD0.7270.5071.2320.54777606611
RregE0.7290.5441.2320.54677596511
RregF0.7620.6611.1950.553786110011
RregG0.7480.5211.2540.50483555012
RregH0.790.6651.2260.44878599711
RregI0.7270.5071.2320.54778606111
RregJ0.7320.8721.4710.66491368212
RregK0.7890.8371.3150.52388508412
RregL0.7820.6461.2340.47985555812
RregM0.6980.8531.4950.6492377812
RregN0.670.8541.5330.66591388612
RregO0.6930.8531.4970.64292377712
RregP0.7480.5211.2550.50579564911
RregQ0.7910.8431.3580.69388438412
RregR0.7270.5341.2190.56384555612
RregS0.7410.5671.2630.54685525812
RregT0.7720.8661.4050.52493437412
RregU0.8220.8531.3210.55888468412
RregV0.8170.8691.3360.55187478712
Table A3. NNlm[X] results.
Table A3. NNlm[X] results.
Soft Sensor Average R2 In Last 200 Min Average RMSE in Last 200 MinAverages at 2 mg NH4-N/l Trigger
Average R2Average RMSENH4rem
(%)
Tsave
(%)
aberror
(mg/L)
SC
NNlm[X]A0.5520.5681.2550.54756631.0211
NNlm[X]B0.5460.4411.3470.31450641.6210
NNlm[X]C0.530.441.1390.33655690.8610
NNlm[X]D0.4890.2731.2010.42955651.5511
NNlm[X]E0.2650.3011.050.28860671.2911
NNlm[X]F0.5120.4511.0550.48154621.8011
NNlm[X]G0.6260.4221.0390.39660671.1310
NNlm[X]H0.6390.5551.0270.37256702.5610
NNlm[X]I0.470.4311.330.749671.8710
NNlm[X]J0.420.4361.6980.84553602.8511
NNlm[X]K0.7110.5891.2140.48166652.3110
NNlm[X]L0.6490.6420.1420.54865656.499
NNlm[X]M0.7320.6691.4380.49491380.6612
NNlm[X]N0.7050.7641.3790.66192340.9512
NNlm[X]O0.6580.6751.3020.46491370.6912
NNlm[X]P0.4310.5091.1650.43952621.1311
NNlm[X]Q0.5140.5161.1650.55268561.0811
NNlm[X]R0.5280.5651.0940.51767630.7811
NNlm[X]S0.670.2481.1470.58367650.7812
NNlm[X]T0.7210.6631.3680.48877560.8912
NNlm[X]U0.5390.4011.0840.37463610.6312
NNlm[X]V0.6190.441.3270.53275560.5511
Table A4. NNlm[0.5X] results.
Table A4. NNlm[0.5X] results.
Soft Sensor Average R2 in Last 200 Min Average RMSE in Last 200 MinAverages at 2 mg NH4-N/l Trigger
Average R2Average RMSENH4rem
(%)
Tsave
(%)
aberror
(mg/L)
SC
NNlm[0.5X]A0.6230.6151.1350.53258561.7211.00
NNlm[0.5X]B0.4260.3280.9470.3952671.8811.00
NNlm[0.5X]C0.6350.3930.10930.3955671.5611.00
NNlm[0.5X]D0.570.4390.89650.29445681.2610.00
NNlm[0.5X]E0.6710.3271.050.37459671.0312.00
NNlm[0.5X]F0.6430.5771.3090.52352671.5711.00
NNlm[0.5X]G0.6620.4421.1420.42867650.8511.00
NNlm[0.5X]H0.8180.7171.1070.37965660.8611.00
NNlm[0.5X]I0.680.4441.0250.47654700.9911.00
NNlm[0.5X]J0.710.7791.4450.72754732.6312.00
NNlm[0.5X]K0.7520.6171.0870.49464600.8012.00
NNlm[0.5X]L0.790.681.2330.48966660.6911.00
NNlm[0.5X]M0.7080.6341.3920.45791400.7112.00
NNlm[0.5X]N0.7750.6811.4060.53874551.0311.00
NNlm[0.5X]O0.7720.7641.4980.65354676.3610.00
NNlm[0.5X]P0.6920.4041.20.45356691.1111.00
NNlm[0.5X]Q0.5260.2831.2690.52337741.808.00
NNlm[0.5X]R0.6720.4651.0440.45751681.7310.00
NNlm[0.5X]S0.580.261.1290.61953711.5810.00
NNlm[0.5X]T0.720.7521.3770.49676560.9712.00
NNlm[0.5X]U0.60.5471.0960.4361691.2011.00
NNlm[0.5X]V0.7750.881.1130.48852631.1511.00
Table A5. NNlm[2X] results.
Table A5. NNlm[2X] results.
Soft Sensor Average R2 in Last 200 Min Average RMSE in Last 200 MinAverages at 2 mg NH4-N/l Trigger
Average R2Average RMSENH4rem
(%)
Tsave
(%)
aberror
(mg/L)
SC
NNlm[2X]A0.5570.4381.4970.87758561.7211.00
NNlm[2X]B0.4850.1451.6130.90452671.8811.00
NNlm[2X]C0.4420.4451.4480.61355671.5611.00
NNlm[2X]D0.4470.2451.3690.54245681.2610.00
NNlm[2X]E0.6090.3761.3010.49959671.0312.00
NNlm[2X]F0.5090.3851.2520.5552671.5711.00
NNlm[2X]G0.5710.4911.1450.44667650.8511.00
NNlm[2X]H0.640.5551.0080.41665660.8611.00
NNlm[2X]I0.6710.3871.0160.47854700.9911.00
NNlm[2X]J0.4350.382.1821.354732.6312.00
NNlm[2X]K0.6010.6531.1020.44164600.8012.00
NNlm[2X]L0.640.4331.0620.4766660.6911.00
NNlm[2X]M0.710.7021.3610.6291400.7112.00
NNlm[2X]N0.620.6312.0831.25474551.0311.00
NNlm[2X]O0.4090.5944.093.40554676.3610.00
NNlm[2X]P0.5280.421.1260.38156691.1111.00
NNlm[2X]Q0.4660.4091.40.57637741.808.00
NNlm[2X]R0.5080.3131.4030.81551681.7310.00
NNlm[2X]S0.4930.3421.3080.70353711.5810.00
NNlm[2X]T0.6460.321.3370.47876560.9712.00
NNlm[2X]U0.6070.6491.1810.49861691.2011.00
NNlm[2X]V0.4550.4651.2220.46952631.1511.00
Table A6. NNbr[X] results.
Table A6. NNbr[X] results.
Soft Sensor Average R2 in Last 200 Min Average RMSE in Last 200 MinAverages at 2 mg NH4-N/l Trigger
Average R2Average RMSENH4rem
(%)
Tsave
(%)
aberror
(mg/L)
SC
NNbr[X]A0.460.2881.3680.99650671.3212
NNbr[X]B0.5140.5151.2650.43154642.4011
NNbr[X]C0.590.3781.0780.34161681.2611
NNbr[X]D0.6510.3951.290.41757581.2910
NNbr[X]E0.5290.3290.9990.26861620.8611
NNbr[X]F0.5590.4210.9420.42455690.9310
NNbr[X]G0.6650.6671.0630.40763661.1911
NNbr[X]H0.6980.4571.3630.46561687.5810
NNbr[X]I0.5880.5471.0890.52261641.9610
NNbr[X]J0.5480.5561.8330.79679511.4412
NNbr[X]K0.650.6791.0440.44364660.9211
NNbr[X]L0.6220.6611.1830.50275610.7411
NNbr[X]M0.7620.7211.3920.46190440.7912
NNbr[X]N0.7020.5981.4520.70292391.0312
NNbr[X]O0.6070.2861.3650.57889460.7112
NNbr[X]P0.5590.4690.9920.38960590.7612
NNbr[X]Q0.4990.4621.1820.54170570.9212
NNbr[X]R0.520.4841.180.557670.7411
NNbr[X]S0.5940.2761.0570.5775640.6411
NNbr[X]T0.7150.5841.3270.34673560.6011
NNbr[X]U0.5330.4690.9350.35863570.6711
NNbr[X]V0.720.6381.0240.39568661.0011
Table A7. NNbr[0.5X] results.
Table A7. NNbr[0.5X] results.
Soft Sensor Average R2 in Last 200 Min Average RMSE in Last 200 MinAverages at 2 mg NH4-N/l Trigger
Average R2Average RMSENH4rem
(%)
Tsave
(%)
aberror
(mg/L)
SC
NNbr[0.5X]A0.540.4770.9750.454640.6810
NNbr[0.5X]B0.5420.4241.0090.22547731.179
NNbr[0.5X]C0.5950.5391.1880.46658681.4811
NNbr[0.5X]D0.6820.3741.0420.39672650.8411
NNbr[0.5X]E0.5620.6380.9460.26958691.0411
NNbr[0.5X]F0.590.5511.070.44850691.8510
NNbr[0.5X]G0.6420.5591.0640.43171631.0111
NNbr[0.5X]H0.8150.6751.1240.38269660.8511
NNbr[0.5X]I0.5930.4511.2440.63755652.0310
NNbr[0.5X]J0.7130.6361.5230.72294381.0412
NNbr[0.5X]K0.7780.5541.0920.41879590.8612
NNbr[0.5X]L0.7320.6381.1980.58868641.1811
NNbr[0.5X]M0.7170.6921.3670.5292370.7512
NNbr[0.5X]N0.7870.8431.3560.58993410.7912
NNbr[0.5X]O0.7750.771.450.66290410.9412
NNbr[0.5X]P0.6220.6791.0330.43764611.0211
NNbr[0.5X]Q0.4860.3261.2240.58565661.3412
NNbr[0.5X]R0.5680.4091.1150.50161660.7711
NNbr[0.5X]S0.5460.3151.1490.56466650.6011
NNbr[0.5X]T0.7040.4821.3830.46382520.6212
NNbr[0.5X]U0.6860.6681.0890.39763671.1712
NNbr[0.5X]V0.7390.7231.0940.40275590.5811
Table A8. NNbr[2X] results.
Table A8. NNbr[2X] results.
Soft Sensor Average R2 in Last 200 Min Average RMSE in Last 200 MinAverages at 2 mg NH4-N/l Trigger
Average R2Average RMSENH4rem
(%)
Tsave
(%)
aberror
(mg/L)
SC
NNbr[2X]A0.4580.5132.0831.20261612.0810
NNbr[2X]B0.5370.2741.2750.50256651.5310
NNbr[2X]C0.540.3391.0990.4661611.0811
NNbr[2X]D0.5430.31.2610.44744691.7710
NNbr[2X]E0.5110.4351.0410.34752661.8110
NNbr[2X]F0.4870.5021.5550.99353641.2810
NNbr[2X]G0.5060.4961.0360.39547731.3410
NNbr[2X]H0.6330.4821.0860.36464671.8811
NNbr[2X]I0.5730.4591.2090.49654711.0411
NNbr[2X]J0.3350.5512.0841.0142672.3610
NNbr[2X]K0.6620.5571.1950.47567660.8811
NNbr[2X]L0.6670.5511.2160.4972620.7111
NNbr[2X]M0.710.591.5130.63192421.1012
NNbr[2X]N0.640.5461.3020.60390440.7912
NNbr[2X]O0.5260.4421.4310.56267531.1010
NNbr[2X]P0.4650.4861.1310.42544741.539
NNbr[2X]Q0.4030.4091.6050.92349701.6410
NNbr[2X]R0.4620.3951.4370.51245752.649
NNbr[2X]S0.490.3071.1540.64452690.8410
NNbr[2X]T0.6290.3091.3740.40665580.8611
NNbr[2X]U0.5810.7690.9420.19688670.5711
NNbr[2X]V0.6430.5380.9810.34270590.4911
Table A9. Step 1 ranking results for each model.
Table A9. Step 1 ranking results for each model.
Soft SensorRlinRregNNlin[X]NNlin[0.5X]NNlin[2X]NNbr[X]NNbr[0.5X]NNbr[2X]SumRank
A1316116711537216
B1756213764720
C16416510104147915
D101154851756518
E9151320131413810511
F15141497275919
G19211216201112131244
H22681919221111089
I5142101541156617
J381746613622
K111368221716191128
L62231821195201146
M2102121182019161273
N43151312818189112
O11222931310108014
P19209171615891137
Q12210159344621
R81716212121028813
S14181412616141210610
T7191811172220171311
U21920314219221195
V1871915111822211311

References

  1. Baudart, G.; Hirzel, M.; Kate, K.; Ram, P.; Shinnar, A. Lale: Consistent automated machine learning. arXiv 2020, arXiv:2007.01977. [Google Scholar]
  2. Brasil, J.; Macedo, M.; Lago, C.; Oliveira, T.; Júnior, M.; Oliveira, T.; Mendiondo, E. Nature-based solutions and real-time control: Challenges and opportunities. Water 2021, 13, 651. [Google Scholar] [CrossRef]
  3. Hashim, H.; Ryan, P.; Clifford, E. A statistically based fault detection and diagnosis approach for non-residential building water distribution systems. Adv. Eng. Inform. 2020, 46, 101187. [Google Scholar] [CrossRef]
  4. Icke, O.; van Es, D.M.; de Koning, M.F.; Wuister, J.J.; Ng, J.; Phua, K.M.; Koh, Y.K.; Chan, W.J.; Tao, G. Performance improvement of wastewater treatment processes by application of machine learning. Water Sci. Technol. 2020, 82, 2671–2680. [Google Scholar] [CrossRef] [PubMed]
  5. Yang, C.; Zhang, Y.; Huang, M.; Liu, H. Adaptive dynamic prediction of effluent quality in wastewater treatment processes using partial least squares embedded with relevance vector machine. J. Clean. Prod. 2021, 314, 128076. [Google Scholar] [CrossRef]
  6. Keshavarzi Arshadi, A.; Webb, J.; Salem, M.; Cruz, E.; Calad-Thomson, S.; Ghadirian, N.; Collins, J.; Diez-Cecilia, E.; Kelly, B.; Goodarzi, H.; et al. Artificial Intelligence for COVID-19 Drug Discovery and Vaccine Development. Front. Artif. Intell. 2020, 3, 65. [Google Scholar] [CrossRef]
  7. Lapuschkin, S.; Wäldchen, S.; Binder, A.; Montavon, G.; Samek, W.; Müller, K.-R. Unmasking Clever Hans predictors and assessing what machines really learn. Nat. Commun. 2019, 10, 1096. [Google Scholar] [CrossRef] [Green Version]
  8. Ong, E.; Wong, M.U.; Huffman, A.; He, Y. COVID-19 Coronavirus Vaccine Design Using Reverse Vaccinology and Machine Learning. Front. Immunol. 2020, 11, 1581. [Google Scholar] [CrossRef]
  9. Chen, C.L.P.; Zhang, C.-Y. Data-intensive applications, challenges, techniques and technologies: A survey on Big Data. Inf. Sci. 2014, 275, 314–347. [Google Scholar] [CrossRef]
  10. Ridzuan, N.H.A.M.; Marwan, N.F.; Khalid, N.; Ali, M.H.; Tseng, M.L. Effects of Agriculture, Renewable Energy, and Economic Growth on Carbon Dioxide Emissions: Evidence of the Environmental Kuznets Curve. Resour. Conserv. Recycl. 2020, 160, 104879. [Google Scholar] [CrossRef]
  11. Khan, S.A.; Ponce, P.; Yu, Z.; Golpîra, H.; Mathew, M. Environmental Technology and Wastewater Treatment: Strategies to Achieve Environmental Sustainability. Chemosphere 2022, 286, 131532. [Google Scholar] [CrossRef] [PubMed]
  12. Zuccarello, P.; Manganelli, M.; Conti, G.O.; Copat, C.; Grasso, A.; Cristaldi, A.; De Angelis, G.; Testai, E.; Stefanelli, M.; Vichi, S.; et al. Water Quality and Human Health: A Simple Monitoring Model of Toxic Cyanobacteria Growth in Highly Variable Mediterranean Hot Dry Environments. Environ. Res. 2021, 192, 110291. [Google Scholar] [CrossRef]
  13. Luccarini, L.; Bragadin, G.L.; Colombini, G.; Mancini, M.; Mello, P.; Montali, M.; Sottara, D. Formal verification of wastewater treatment processes using events detected from continuous signals by means of artificial neural networks. Case study: SBR plant. Environ. Model. Softw. Environ. Data News 2010, 25, 648–660. [Google Scholar] [CrossRef]
  14. Torregrossa, D.; Castellet-Viciano, L.; Hernández-Sancho, F. A data analysis approach to evaluate the impact of the capacity utilization on the energy consumption of wastewater treatment plants. Sustain. Cities Soc. 2019, 45, 307–313. [Google Scholar] [CrossRef]
  15. Vives Fàbregas, M.T. SBR Technology for Wastewater Treatment: Suitable Operational Conditions for a Nutrient Removal; Universitat de Girona: Girona, Spain, 2004. [Google Scholar]
  16. Bernardelli, A.; Marsili-Libelli, S.; Manzini, A.; Stancari, S.; Tardini, G.; Montanari, D.; Anceschi, G.; Gelli, P.; Venier, S. Real-time model predictive control of a wastewater treatment plant based on machine learning. Water Sci. Technol. 2020, 81, 2391–2400. [Google Scholar] [CrossRef]
  17. Fox, S.; Cahill, M.; O’Reilly, E.; Clifford, E. Decentralized wastewater treatment using ‘pumped flow biofilm reactor’ (PFBR) technology. Water Pract. Technol. 2016, 11, 93–103. [Google Scholar] [CrossRef]
  18. Norton, J.W. Decentralized Systems. Water Environ. Res. 2009, 81, 1440–1450. [Google Scholar] [CrossRef]
  19. Di Cicco, M.R.; Masiello, A.; Spagnuolo, A.; Vetromile, C.; Borea, L.; Giannella, G.; Iovinella, M.; Lubritto, C. Real-Time Monitoring and Static Data Analysis to Assess Energetic and Environmental Performances in the Wastewater Sector: A Case Study. Energies 2021, 14, 6948. [Google Scholar] [CrossRef]
  20. Ashagre, B.B.; Fu, G.; Butler, D. Automation and real-time control of urban wastewater systems: A review of the move towards sustainability: Journal of Water Supply. Res. Technol.-Aqua 2020, 69, 751–768. [Google Scholar]
  21. Aguado, D.; Ribes, J.; Montoya, T.; Ferrer, J.; Seco, A. A methodology for sequencing batch reactor identification with artificial neural networks: A case study. Comput. Chem. Eng. 2009, 33, 465–472. [Google Scholar] [CrossRef]
  22. Haimi, H.; Mulas, M.; Corona, F.; Vahala, R. Data-derived soft-sensors for biological wastewater treatment plants: An overview. Environ. Model. Softw. Environ. Data News 2013, 47, 88–107. [Google Scholar] [CrossRef]
  23. Huang, M.; Ma, Y.; Wan, J.; Chen, X. A sensor-software based on a genetic algorithm-based neural fuzzy system for modeling and simulating a wastewater treatment process. Appl. Soft Comput. 2015, 27, 1–10. [Google Scholar] [CrossRef]
  24. Huang, M.-z.; Wan, J.-q.; Ma, Y.-w.; Li, W.-j.; Sun, X.-f.; Wang, Y. A fast predicting neural fuzzy model for on-line estimation of nutrient dynamics in an anoxic/oxic process. Bioresour. Technol. 2010, 101, 1642–1651. [Google Scholar] [CrossRef] [PubMed]
  25. Akın, B.S.; Ugurlu, A. Monitoring and control of biological nutrient removal in a Sequencing Batch Reactor. Process Biochem. 2005, 40, 2873–2878. [Google Scholar] [CrossRef]
  26. Ga, C.H.; Ra, C.S. Real-time control of oxic phase using pH (mV)-time profile in swine wastewater treatment. J. Hazard. Mater. 2009, 172, 61–67. [Google Scholar] [CrossRef]
  27. Guo, H.J.; Peng, Y.Z.; Wang, S.Y.; Zheng, Y.N.; Huang, H.J.; Ge, S.J. Effective and robust partial nitrification to nitrite by real-time aeration duration control in an SBR treating domestic wastewater. Process Biochem. 2009, 44, 979–985. [Google Scholar] [CrossRef]
  28. Tanwar, P.; Nandy, T.; Ukey, P.; Manekar, P. Correlating on-line monitoring parameters, pH, DO and ORP with nutrient removal in an intermittent cyclic process bioreactor system. Bioresour. Technol. 2008, 99, 7630–7635. [Google Scholar] [CrossRef]
  29. Won, S.G.; Ra, C.S. Biological nitrogen removal with a real-time control strategy using moving slope changes of pH(mV)- and ORP-time profiles. Water Res. 2011, 45, 171–178. [Google Scholar] [CrossRef]
  30. De Canete, J.F.; del Saz-Orozco, P.; Baratti, R.; Mulas, M.; Ruano, A.; Garcia-Cerezo, A. Soft-sensing estimation of plant effluent concentrations in a biological wastewater treatment plant using an optimal neural network. Expert Syst. Appl. 2016, 63, 8–19. [Google Scholar] [CrossRef]
  31. Kim, H.; Hao, O.J. pH and Oxidation-Reduction Potential Control Strategy for Optimization of Nitrogen Removal in an Alternating Aerobic-Anoxic System. Water Environ. Res. 2001, 73, 95–102. [Google Scholar] [CrossRef]
  32. Luccarini, L.; Porrà, E.; Spagni, A.; Ratini, P.; Grilli, S.; Longhi, S.; Bortone, G. Soft sensors for control of nitrogen and phosphorus removal from wastewaters by neural networks. Water Sci. Technol. 2002, 45, 101–107. [Google Scholar] [CrossRef] [PubMed]
  33. Li, J.; Ni, Y.; Peng, Y.; Guowei, G.; Jingen, L.; Su, W.; Guobiao, C.; Changjin, O. On-line controlling system for nitrogen and phosphorus removal of municipal wastewater in a sequencing batch reactor (SBR). Front. Environ. Sci. Eng. 2008, 2, 99–102. [Google Scholar] [CrossRef]
  34. Villez, K.; Sin, G.; Vanrolleghem, P.A.; Ruiz, M.; Colomer, J.; Rosén, C.; Vanrolleghem, P.A. Combining multiway principal component analysis (MPCA) and clustering for efficient data mining of historical data sets of SBR processes. Water Sci Technol. 2008, 57, 1659–1666. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  35. Yang, Q.; Gu, S.; Peng, Y.; Wang, S.; Liu, X. Progress in the Development of Control Strategies for the SBR Process. Clean Soil Air Water 2010, 38, 732–749. [Google Scholar] [CrossRef]
  36. Khataee, A.; Kasiri, M. Modeling of Biological Water and Wastewater Treatment Processes Using Artificial Neural Networks. CLEAN–Soil Air Water 2011, 39, 742–749. [Google Scholar] [CrossRef]
  37. Kocijan, J.; Hvala, N. Sequencing batch-reactor control using Gaussian-process models. Bioresour. Technol. 2013, 137, 340–348. [Google Scholar] [CrossRef]
  38. Puig, S.; Corominas, L.; Adama, T.; Colomer; Balaguer, M.; Colprim, J. An On-line Optimisation of a SBR Cycle for Carbon and Nitrogen Removal Based on On-line pH and OUR: The Role of Dissolved Oxygen Control. Water Sci. Technol. 2006, 53, 171–178. [Google Scholar] [CrossRef] [Green Version]
  39. Hong, S.H.; Lee, M.W.; Lee, D.S.; Park, J.M. Monitoring of sequencing batch reactor for nitrogen and phosphorus removal using neural networks. Biochem. Eng. J. 2007, 35, 365–370. [Google Scholar] [CrossRef]
  40. Casellas, M.; Dagot, C.; Baudu, M. Set up and assessment of a control strategy in a SBR in order to enhance nitrogen and phosphorus removal. Process Biochem. 2006, 41, 1994–2001. [Google Scholar] [CrossRef]
  41. Mingzhi, H.; Jinquan, W.; Yongwen, M.; Yan, W.; Weijiang, L.; Xiaofei, S. Control rules of aeration in a submerged biofilm wastewater treatment process using fuzzy neural networks. Expert Syst. Appl. 2009, 36, 10428–10437. [Google Scholar] [CrossRef]
  42. Han, H.-G.; Li, Y.; Guo, Y.-N.; Qiao, J.-F. A soft computing method to predict sludge volume index based on a recurrent self-organizing neural network. Appl. Soft Comput. 2016, 38, 477–486. [Google Scholar] [CrossRef]
  43. Li, F.; Qiao, J.; Han, H.; Yang, C. A self-organizing cascade neural network with random weights for nonlinear system modeling. Appl. Soft Comput. 2016, 42, 184–193. [Google Scholar] [CrossRef] [Green Version]
  44. Syafiie, S.; Tadeo, F.; Martinez, E.; Alvarez, T. Model-free control based on reinforcement learning for a wastewater treatment problem. Appl. Soft Comput. 2011, 11, 73–82. [Google Scholar] [CrossRef]
  45. Wan, J.; Huang, M.; Ma, Y.; Guo, W.; Wang, Y.; Zhang, H.; Li, W.; Sun, X. Prediction of effluent quality of a paper mill wastewater treatment using an adaptive network-based fuzzy inference system. Appl. Soft Comput. 2011, 11, 3238–3246. [Google Scholar] [CrossRef]
  46. Foscoliano, C.; Del Vigo, S.; Mulas, M.; Tronci, S. Predictive control of an activated sludge process for long term operation. Chem. Eng. J. 2006, 304, 1031–1044. [Google Scholar] [CrossRef] [Green Version]
  47. Mulas, M.; Corona, F.; Sirviö, J.; Hyvönen, S.; Vahala, R. Full-scale implementation of an advanced control system on a biological wastewater treatment plant. IFAC-Pap. 2016, 49, 1163–1168. [Google Scholar] [CrossRef]
  48. James, G.; Witten, D.; Hastie, T.; Tibshirani, R. An Introduction to Statistical Learning; Springer: New York, NY, USA, 2013; Volume 112. [Google Scholar]
  49. Souza, F.A.A.; Araújo, R.; Mendes, J. Review of soft sensor methods for regression applications. Chemom. Intell. Lab. Syst. 2016, 152, 69–79. [Google Scholar] [CrossRef]
  50. Abyaneh, H.Z. Evaluation of multivariate linear regression and artificial neural networks in prediction of water quality parameters. J. Environ. Health Sci. Eng. 2014, 12, 40. [Google Scholar] [CrossRef] [Green Version]
  51. Nasr, M.S.; Moustafa, M.A.E.; Seif, H.A.E.; El Kobrosy, G. Application of Artificial Neural Network (ANN) for the prediction of EL-AGAMY wastewater treatment plant performance-EGYPT. Alex. Eng. J. 2012, 51, 37–43. [Google Scholar] [CrossRef] [Green Version]
  52. Arslan, O.; Yetik, O. ANN based optimization of supercritical ORC-Binary geothermal power plant: Simav case study. Appl. Therm. Eng. 2011, 31, 3922–3928. [Google Scholar] [CrossRef]
  53. Hagan, M.T.; Menhaj, M.B. Training feedforward networks with the Marquardt algorithm. IEEE Trans. Neural Netw. 1994, 5, 989–993. [Google Scholar] [CrossRef] [PubMed]
  54. Nawi, N.M.; Khan, A.; Rehman, M.Z. CSLM: Levenberg marquardt based back propagation algorithm optimized with cuckoo search. J. ICT Res. Appl. 2013, 7, 103–116. [Google Scholar] [CrossRef]
  55. Rahimi-Ajdadi, F.; Abbaspour-Gilandeh, Y. Artificial Neural Network and stepwise multiple range regression methods for prediction of tractor fuel consumption. Meas. J. Int. Meas. Confed. 2011, 44, 2104–2111. [Google Scholar] [CrossRef]
  56. Wagh, V.; Panaskar, D.; Muley, A.; Mukate, S.; Gaikwad, S. Neural network modelling for nitrate concentration in groundwater of Kadava River basin, Nashik, Maharashtra, India. Groundw. Sustain. Dev. 2018, 7, 436–445. [Google Scholar] [CrossRef]
  57. Dan Foresee, F.; Hagan, M.T. Gauss-Newton approximation to Bayesian learning. In Proceedings of the International Conference on Neural Networks (ICNN’97), Houston, TX, USA, 12 June 1997; Volume 3, pp. 1930–1935. [Google Scholar]
  58. MacKay, D.J.C. Bayesian interpolation. Neural Comput. 1992, 4, 415–447. [Google Scholar] [CrossRef]
  59. Sharma, A.K.; Sharma, R.K.; Kasana, H.S. Prediction of first lactation 305-day milk yield in Karan Fries dairy cattle using ANN modeling. Appl. Soft Comput. 2007, 7, 1112–1120. [Google Scholar] [CrossRef]
  60. Tien Bui, D.; Pradhan, B.; Lofman, O.; Revhaug, I.; Dick, O.B. Landslide susceptibility assessment in the Hoa Binh province of Vietnam: A comparison of the Levenberg–Marquardt and Bayesian regularized neural networks. Geomorphology 2012, 171–172, 12–29. [Google Scholar] [CrossRef]
  61. CEN 12566-3; Small Wastewater Treatment Systems for up to 50 PT—Part 3: Packaged and/or Site Assembled Domestic Wastewater Treatment Plants. National Standards Authority of Ireland: Dublin, Ireland, 2006; pp. 1–34.
  62. Federation, Water Environmental; Aph Association. Standard Methods for the Examination of Water and Wastewater; Port City Press: Baltimore, MD, USA, 2005. [Google Scholar]
  63. Chang, C.H.; Hao, O.J. Sequencing Batch Reactor System for Nutrient Removal: ORP and pH Profiles. J. Chem. Technol. Biotechnol. Int. Res. Process Environ. AND Clean Technol. 1996, 67, 27–38. [Google Scholar] [CrossRef]
  64. Holman, J.B. The Application of pH and ORP Process Control Parameters within the Aerobic Denitrification Process. Ph.D. Thesis, University of Canterbury, Christchurch, New Zealand, 2004. [Google Scholar]
  65. Bishop, C.M. Neural Networks for Pattern Recognition; Oxford University Press: Oxford, UK, 1995; ISBN 978-0198538646. [Google Scholar]
  66. Hossain, S.Z.; Sultana, N.; Jassim, M.S.; Coskuner, G.; Hazin, L.M.; Razzak, S.A.; Hossain, M.M. Soft-Computing Modeling and Multiresponse Optimization for Nutrient Removal Process from Municipal Wastewater Using Microalgae. J. Water Process Eng. 2022, 45, 102490. [Google Scholar] [CrossRef]
Figure 1. Typical NN structure with n inputs, j nodes in the hidden layer, a hyperbolic tangent sigmoid transfer function, and a single output layer with a linear transfer function.
Figure 1. Typical NN structure with n inputs, j nodes in the hidden layer, a hyperbolic tangent sigmoid transfer function, and a single output layer with a linear transfer function.
Sustainability 14 04098 g001
Figure 2. Schematic of pilot SBR unit.
Figure 2. Schematic of pilot SBR unit.
Sustainability 14 04098 g002
Figure 3. Illustration of cycle sequence (the on-off aeration pattern is demonstrated using the grey and white sequence in the aeration period).
Figure 3. Illustration of cycle sequence (the on-off aeration pattern is demonstrated using the grey and white sequence in the aeration period).
Sustainability 14 04098 g003
Figure 4. (a) pH and NH4-N plotted against time for a sample cycle. (b) Example of a pH profile within three aeration periods plotted against time for a sample cycle. The black lines indicate “aeration-on” periods. (c) ORP and NH4-N plotted against time for a sample cycle. (d) Example of an ORP profile with three aeration periods plotted against time for a sample cycle. The black lines indicate “aeration-on” periods.
Figure 4. (a) pH and NH4-N plotted against time for a sample cycle. (b) Example of a pH profile within three aeration periods plotted against time for a sample cycle. The black lines indicate “aeration-on” periods. (c) ORP and NH4-N plotted against time for a sample cycle. (d) Example of an ORP profile with three aeration periods plotted against time for a sample cycle. The black lines indicate “aeration-on” periods.
Sustainability 14 04098 g004
Figure 5. Summary of overall procedure.
Figure 5. Summary of overall procedure.
Sustainability 14 04098 g005
Figure 6. Breakdown of methods, models, variable sets, soft sensors and input variables.
Figure 6. Breakdown of methods, models, variable sets, soft sensors and input variables.
Sustainability 14 04098 g006
Figure 7. Comparison of modelled and measured NH4-N concentrations for 4 of the 12 test cycles with the application of NNbr[2X]U soft sensor.
Figure 7. Comparison of modelled and measured NH4-N concentrations for 4 of the 12 test cycles with the application of NNbr[2X]U soft sensor.
Sustainability 14 04098 g007
Table 1. Summary of research on advanced RTC methodologies with surrogate sensors.
Table 1. Summary of research on advanced RTC methodologies with surrogate sensors.
ObjectivesControl MethodologyInfluent TypeStudy TypeReferences
Advanced RTC Methodologies
Strategy proposal for SBR optimisation using pH, ORP and DO profiles and fuzzy clustering algorithms for detecting critical process transitionsFuzzy clustering with wavelet de-noisingSynthetic wastewaterStrategy examined using data collected from a pilot-scale SBR reactor[16]
Investigation into the use of pH, ORP and DO sensors with an advanced control strategy to optimise nitrogen removal in a continuous systemFuzzy logicUrban wastewater with a small industrial inputPilot-scale continuous flow plant[31]
Development of an RTC strategy using artificial NNs with ORP and pH sensors for optimised nitrogen removal and phosphorus uptakeArtificial NNsSynthetic wastewaterLaboratory-scale continuous flow SBR reactor[28]
Examination of using NNs for predicting biological nitrogen and phosphorus removal using ORP and pHNNsSynthetic wastewaterLaboratory-scale SBR reactor[32]
Examination of the establishment of an online controlling system for nitrogen and phosphorus removal.A primary professional intelligent control filtered noise by filtration wave and used NNs, database and deducing machine to identify each breakpoint. Municipal WastewaterLaboratory-scale SBR reactor[33]
Methodology development for process monitoring and process analysis for nitrogen and phosphorus removalUse of multi-way principal component analysis (MPCA) and clustering using historical process dataDomestic strength Synthetic wastewaterPilot-scale SBR reactor[34]
Validation study to assess the ability of an algorithm using networks to detect breakpoints using pH, ORP and DO sensorsNNs, de-noising was achieved using a regularisation algorithmMunicipal wastewaterPilot-scale SBR reactor[13]
Examination of using a software sensor for real-time estimation of nutrient concentration using pH, ORP and DO sensorsFuzzy NN analysisSynthetic wastewaterBench-scale SBR reactor[23]
Examination of using a software sensor for real-time estimation of nutrient concentration using pH, ORP and DO sensorsGenetic algorithm-based neural fuzzy system, using self-adapting fuzzy c-means clustering and genetic algorithms Synthetic wastewaterLaboratory-scale SBR reactor[24]
Examination of an intelligent control system to achieve advanced nitrogen removal using DO, pH and ORP sensors.Three-layer network technology with high-performance PLCs and fuzzy control for break point identificationMunicipal wastewaterPilot-scale SBR reactor[35]
Review article on the general use of artificial NNSAT modelling biological water and wastewater treatment processesArtificial NNsSeveral typesSeveral types[36]
Examination of the use of a Gaussian-process (GP) model for the online optimisation of batch phases using pH, ORP and DO sensors.GP regression was used to smooth the signals and GP classification was used for pattern recognition Not specifiedLaboratory-scale SBR reactor[37]
Examination of the optimisation of a fuzzy logic controlled DO SBR system using pH and OUR trends for carbon and NH4-N removalFuzzy control was used to switch on and off DO input, in order to smooth out pH and OUR profiles. The breaking point was identified using episode representationUrban wastewaterPilot-scale SBR reactor[38]
Examination of a methodology to develop a soft sensor monitoring of an SBR for enhanced biological phosphorus removal. Artificial NNsSynthetic wastewaterLaboratory-scale SBR reactor[21]
Examination of a soft sensor for the optimisation of an SBR for biological nutrient removalNNsSynthetic wastewaterLaboratory-scale SBR reactor[39]
Development of a control strategy to enhance nitrogen and phosphorus removal in an SBR reactor using pH, ORP and OURUse of a data acquisition system with curve fitting and characteristic point detectionMunicipal wastewaterSemi industrial pilot SBR reactor[40]
Development of a reliable RTC and supervision tool for DO control Fuzzy NNsIndustrial wastewaterAerated submerged biofilm wastewater treatment process[41]
Development of a soft computing method to predict sludge volume index (SVI) values in a real WWTPRecurrent self-organising NNMunicipal WWTPModel based on SBR WWTP[42]
Examination applies a self-organising cascade neural network (SCNN) with random weights to a non-linear systemCascade NNsMunicipal WWTPModel based on municipal WWTP[43]
Proposal using a model-free learning control (MFLC) system to control advanced oxidation in the treatment of industrial wastewatersReinforcement learningPhenol wastewaterLaboratory pilot plant[44]
Development of a model for predicting TSS and chemical oxygen demand removalFuzzy inference system with principal control analysisPapermill process wastewaterPapermill WWTP with an anaerobic digester and submerged biofilm biological reactor[45]
Identifying model to predict effluent nitrogen concentrations and assessment of controller efficiency in terms of economic and environmental performancesRecurrent NNs for model identification and dynamic matrix control as predictive control (PC) algorithm and Benchmark Simulation Model 1 to test these PC configurationsBiological wastewaterActivated sludge process of a municipal WWTP[46]
Development of soft sensor to predict effluent concentrations such as COD, TSS and TN contentNN with principal component analysisBiological wastewaterActivated sludge process of large-scale municipal WWTP[30]
Table 2. Diurnal flow pattern used to feed the primary chamber of the SBR pilot unit (CEN, 2006).
Table 2. Diurnal flow pattern used to feed the primary chamber of the SBR pilot unit (CEN, 2006).
Time of Day% of Total VolumeVolume (Litres)Time of Day% of Total VolumeVolume (Litres)
0:00–6:000015:00–16:0000
6:00–7:00106016:00–17:0000
7:00–8:00106017:00–18:0000
8:00–9:00106018:00–19:0020120
9:00–10:0053019:00–20:0020120
10:00–11:0053020:00–21:00530
11:00–12:0053021:00–22:00530
12:00–13:000022:00–23:00530
13:00–14:000023:00–0:0000
14:00–15:0000
Table 3. Overview of the SBR treatment cycle.
Table 3. Overview of the SBR treatment cycle.
Phase (Step)OperationDescriptionIllustration
Fill (1)Pump: A-OnThe pump was switched on for 5 s, subsequently creating a siphon that moved liquid from the primary chamber into the reaction chamber. Siphoning terminated when the liquid level in the primary chamber went below the inlet level of the feed pipe or the liquid level or once the two chambers had equalised. Sustainability 14 04098 i001
Aerobic—Repeated for 400 min (2)(a) Aeration: B-OnThe aeration period consisted of a”repetitive sequence of (a) aeration on for 5 min and (b) off for 15 min. Sustainability 14 04098 i002
(b) Rest Sustainability 14 04098 i003
(3)SettleA settle time allowed an activated sludge settle prior to discharge creating an upper layer of clarified treated wastewater. Sustainability 14 04098 i004
(4)Discharge: C-OnThe discharge pump I is used to remove the clarified treated wastewater from the upper portion of the reactor tank. Sustainability 14 04098 i005
Symbol DefinitionPump On Sustainability 14 04098 i006; Pump Off Sustainability 14 04098 i007
LegendA—transfer pump, B—mechanical aerator, C—discharge pump
Table 4. pH and ORP processed input variables.
Table 4. pH and ORP processed input variables.
Input VariableDescription
pHRaw pH data
pHma20Moving average of pH over the previous 20 min of data (i.e., 1 aeration block; Section 2.1)
pHcumCumulative sum of pH data over the duration of the cycle
pHapexpH apex values during each aeration period
pH∆apexChange in sequential pH apex values over a treatment cycle
pHnadirpH nadir values during each aeration period
pHnadir-apexpH nadir value minus pH apex value for each aeration period
ORPRaw ORP data
ORPma20Moving average of ORP over the previous 20 min of data
ORPcumCumulative sum of ORP data over the duration of the cycle
ORPapexORP apex values during each aeration period
ORP∆apexChange in sequential ORP apex values over a treatment cycle
ORPnadirORP nadir values during each aeration period
ORPnadir-apexORP nadir value minus ORP apex value for each aeration period
pHma20XORPma20pHma20 input variable multiplied by the ORPma20 input variable
Table 5. Input variables to each variable set.
Table 5. Input variables to each variable set.
Variable SetsInput Variables
pHpHma20pHcumpHapexpH∆apexpHnadirpHnadir-apexORPORPma20ORPcumORPapexORP∆apexORPnadirORPnadir-apexpHma20.ORPma20
AXXXXXXXXXXXXXXX
BXX XXXXXX XXXXX
C X XXXX X XXXXX
D X XXXX X XXXX
E X XX X X XX X
F XXXX X X XX X
G XXXX X
H X X X
I XX X X X X
J XXXX X
K X X
L X X
M X X
N X X
O X X X
P X XX X
Q X X X X
R XX XX
S X X X X
T X X
U X X X X
V X X
Table 6. Analyses criteria.
Table 6. Analyses criteria.
CriterionDescriptionPractical Application
Category A
Criterion 1A: R2Referred to as the coefficient of determination, it is an indicator of the strength of the relationship between variables. 0 indicates a poor relationship, while 1 indicates a very close relationship.Measures the strength of the relationship between predicted NH4-N trend and actual NH4-N trend
Criterion 2A: RMSERoot mean square error (RMSE) is a standard statistical metric to measure model performance; it measures the difference between sample and predictor values and is a good measure of accuracy. The lower the RMSE value the more accurate the prediction.Measures the average accuracy of the predicted NH4-N trend against the actual NH4-N trend
Category B
Criterion 1B: Percentage of NH4-N removal (NH4rem(%))This criterion returns the percentage NH4-N removal from the peak NH4-N (NH4 peak) concentration (during any given cycle) from a model controlled cycleto the actual NH4-N concentration achieved on-site in a full (non-controlled) treatment cycle (NH4 final). The higher the NH4rem value the better the soft sensor.
NH 4   rem = ( NH 4   thres NH 4   final NH 4   peak   NH 4   final ) × 100 %
where NH4rem is the percentage of potential NH4-N removal achieved, NH4 thres is the actual NH4-N concentration where the cycle was terminated by the selected cut-off threshold (mg NH4-N/l), NH4 final is the final NH4-N concentration at the end of a full cycle (mg NH4-N/l) and NH4 peak is the highest NH4-N concentration. NH4 thres could be related to an ammonium discharge limit at a given site.
Provides a comparison of the NH4-N concentration at which the cycle would have been ended by the model during a controlled cycle and the actual final NH4-N concentration at the end of a non-controlled cycle
Criterion 2B: Percentage of time saved (Tsave)This criterion returns the time saved (as a percentage of a non-controlled cycle) by the soft sensor in question, at the selected cut-off threshold value, when compared to the full treatment cycle (and expressed as a percentage). The higher the Tsave value, the better the soft sensor.
T save = ( 1 T thres T fixed ) × 100
where Tsave is the time saving (%), Tthres is the time at which the cycle would be ended by the model in a controlled scenario and Tfixed is the fixed time cycle length (min) set in an uncontrolled scenario.
Indicates the time saved with the selected cut-off threshold value. For example, the model might be asked to terminate the treatment cycle when NH4-N concentrations are predicted to reach a certain concentration (e.g., a discharge limit concentration). In general, the greater the time saved, the better, as in practice it increases system capacity
Criterion 3B: Number of successful cycles (SC)During the application of the soft sensors, it was noticed that some soft sensors may end a treatment cycle very early due to the addition and subsequent mixing of influent at the start of a treatment cycle. This can influence pH and ORP trends temporarily and cause cycles to be ended at an early stage (often prior to the new influent beign completely missed with existing wastewater in the system). Where a cycle was ended before NH4 peak occurred, a soft sensor was deemed unsuccessful for that cycle.Allows for elimination of soft sensors that would end cycles too early
Criterion 4B: Absolute error (Aberror)This criterion assessed the accuracy of the soft sensor in meeting a specific threshold concentration for effluent NH4-N discharges. Indicates the accuracy of each soft sensor at the cut-off threshold value
Table 7. Applied weights.
Table 7. Applied weights.
CriterionWeightComments
Aberror10Aberror indicates the accuracy of the soft sensor at the selected cut-off threshold value. Important as facilities must achieve regulatory compliance
RMSE5RMSE indicates the accuracy of the soft sensor when estimating the concentration over a cycle
NH4rem4Provides an indication of the NH4-N removal performance of the soft sensor
R23Indicates how well the predicted NH4-N trend matches the actual trend
Tsave2Indicates the time saving and energy savings of the soft sensor
SC1Least important as low SC values indicate more cycles will finish earlier than they should
Table 8. Average influent and effluent results (average daily hydraulic volume = 0.9 m3).
Table 8. Average influent and effluent results (average daily hydraulic volume = 0.9 m3).
ParameterAverage InfluentInfluent st.dev.Average EffluentInfluent st.dev.% Removaln
Inf/Eff
mg/Lmg/Lmg/Lmg/L
CODf4051261208570.39/14
14
TN87.43616.27.981.512/18
NH4-N49.6201.11.297.817/28
NO3-N--2.54.3--/27
n is number of samples; Inf—influent; Eff—effluent.
Table 9. Step 1 ranking results and Step 2 ranking.
Table 9. Step 1 ranking results and Step 2 ranking.
Soft SensorComparison of the Best Soft Sensor for Each Model against Each Criterion (Step 1)Overall Ranking (Step 2)
Average R2 in Last 200 Min of the CycleAverage RMSE in Last 200 Min of the CycleAverages at 2 mg NH4-N/l TriggerRanking
NH4rem
(%)
Tsave
(%)
aberror
(mg/L)
SC
RlinH0.5530.586530.58126
RregL0.6460.47985550.58124
NNlm[X]O0.6750.46491370.69129
NNlm[0.5X]M0.6340.45792360.59127
NNlm[X]R0.4650.45777630.48113
NNlm[X]K0.6530.44164600.80128
NNbr[X]T0.5840.34673560.60114
NNbr[0.5X]V0.7230.40275590.58112
NNbr[2X]U0.7690.19688670.57111
Table 10. Ranking results for each variable set model for each soft sensor.
Table 10. Ranking results for each variable set model for each soft sensor.
Soft SensorRlinRregNNlin[X]NNlin[0.5X]NNlin[2X]NNbr[X]NNbr[0.5X]NNbr[2X]
A31526748
B13528746
C12428675
D43715628
E42714368
F24615378
G23714658
H45712836
I42713685
J41826537
K23851735
L72813465
M86312547
N74526713
O82137456
P13723568
Q14526378
R63517248
S31657428
T83646125
U36248571
V46536821
Sum87692124471131129864
Rank32716548
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Fox, S.; McDermott, J.; Doherty, E.; Cooney, R.; Clifford, E. Application of Neural Networks and Regression Modelling to Enable Environmental Regulatory Compliance and Energy Optimisation in a Sequencing Batch Reactor. Sustainability 2022, 14, 4098. https://doi.org/10.3390/su14074098

AMA Style

Fox S, McDermott J, Doherty E, Cooney R, Clifford E. Application of Neural Networks and Regression Modelling to Enable Environmental Regulatory Compliance and Energy Optimisation in a Sequencing Batch Reactor. Sustainability. 2022; 14(7):4098. https://doi.org/10.3390/su14074098

Chicago/Turabian Style

Fox, Shane, James McDermott, Edelle Doherty, Ronan Cooney, and Eoghan Clifford. 2022. "Application of Neural Networks and Regression Modelling to Enable Environmental Regulatory Compliance and Energy Optimisation in a Sequencing Batch Reactor" Sustainability 14, no. 7: 4098. https://doi.org/10.3390/su14074098

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop