# Robust Data-Driven Soft Sensors for Online Monitoring of Volatile Fatty Acids in Anaerobic Digestion Processes

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

_{4}(50–60%) and carbon dioxide (30–40%), with some other trace gases such as hydrogen sulfide and water vapors, etc. [1]. The methane gas produced can be used as an energy source for generating electricity and heating the AD reactor. The benefits of the AD process are high organic load treatment, low sludge production, energy is recovered when the biogas produced is used and operating costs are reduced due to the oxygen-free operation [2]. Many operational parameters affect the performance and effluent quality of the AD process; therefore, frequent monitoring of these parameters is crucial to ensure a stable performance. Among these parameters, pH, partial alkalinity and volatile fatty acids (VFAs) are the most important measurements for monitoring the stability and performance of the digesters with low buffering capacity. However, in the highly buffered digester, although the process is extremely under-stressed, the pH may vary very little; in this case, VFAs are the only reliable measurement for process monitoring. VFAs are key intermediate products for the reactions that produce CH

_{4}, while their accumulation inside the reactor inhibits the bacteria and causes a lower methane production rate so that the process fails [3]. The common VFA monitoring approach in a wastewater treatment plant is online and/or offline analysis. However, the measuring procedure is very costly and characterized by time-delayed responses that are often undesirable for real-time monitoring [4]. Moreover, due to the complex media and severe operating conditions in AD processes, the online sensors are not always reliable. This is because solid deposition, slime build-up and precipitation, among others, mean that sensors require regular maintenance and calibration. Therefore, it is imperative to develop cost-effective measuring techniques to provide the necessary information based on easily measured available variables and without installing new instruments [5]. Thanks to recent progress in measurement and instrumentation technologies, many easy to measure parameters, such as pH, temperature, flow rates, pressure and gas composition, can be measured online [6,7]. One alternative for dealing with these issues is using software sensors. Soft sensors are models that estimate a hard-to-measure property by using relatively easy measurements. Soft sensors have been successfully applied in monitoring and controlling wastewater treatment plants [4] and can be classified into three main categories: mechanistic, data-driven and hybrid models, depending on their underlying methods [8]. Hybrid modelling approaches are often preferred over more complex mechanistic approaches, such as the anaerobic digestion model (ADM1). In hybrid modelling, the known linear/non-linear behaviors of the system can be described by a mechanistic approach and the unknown relationships among variables can be defined by data-driven models. Hybrid models can be more precise than mechanistic models because they integrate two approaches [5]. Unlike hybrid models, data-driven models depend solely on a priori knowledge. The algorithm determines connections between input and output variables, and therefore it is a very attractive replacement of mechanistic models when they are not valid or available [9]. Different techniques such as multivariate statistical methods, multiple linear regression (MLR), principal component regression (PCR), partial least squares (PLS) regression, artificial neural networks (ANNs) and fuzzy systems are used to design different soft sensors for wastewater treatment processes [4,10,11].

^{2}correlation for prediction versus actual values was found to be 0.9718, 0.9268 and 0.9796 for different phases of the digester operation. The results show that their model had a good prediction ability for COD removal efficiency. In another work, Güçlü and co-authors [14] implemented back-propagation ANN models for predicting effluent volatile solid (VS) concentration and methane yield. Effluent VS and methane yields were predicted with the ANN using pH, temperature, flowrate, VFA, alkalinity, dry matter and organic matter as model inputs. The gradient descent with an adaptive learning rate algorithm was used. The R

^{2}correlations were 0.89 and 0.71 for VS and methane yield respectively. The authors stated that they only used conventional parameters as model inputs, which is inappropriate because VFA and alkalinity are generally not measured frequently in most real AD plants due to the above issues. Rangasamy et al. [15] studied modelling of an anaerobic tapered fluidized bed reactor for starch wastewater treatment using a multilayer perceptron neural network. ANN with two hidden layers was trained by using the back-propagation algorithm to predict different process responses, including effluent COD, biogas production, VFA, alkalinity and effluent pH. The OLR and Influent pH were considered as model inputs. Briefly, most of the studies in the past were focused on predicting VFA for a laboratory-scale anaerobic digester by using available input parameters without considering the difficulty of measuring them. Furthermore, most of the developed models were trained based on the very limited operational conditions, thus the generalization ability and performance of the models in different situations is ambiguous [14,15].

## 2. Materials and Methods

#### 2.1. Benchmark Simulation Model No. 2

^{3}and three aerobic reactors with a total volume of 9000 m

^{3}, which are used for nitrification and predenitrification, respectively. The plant capacity has been designed for 20648 m

^{3}d

^{−1}of average influent with a dry weather flow rate and 592 mg L

^{−1}of average biodegradable COD in the influent. The Activated Sludge Model No. 1 (ASM1) and the Anaerobic Digestion Model (ADM1) were used to describe the biological phenomena that take place in the activated sludge and AD reactor respectively. The influent characteristics consist of a 609 days dynamic influent data file (sampling frequency equal to a data point every 15 min) that includes rainfall and seasonal temperature variations over the year [18,19]. The first 245 days of influent data are used for plant stabilization under dynamic conditions and the last 364 days are used for the plant performance assessment.

#### 2.2. Data Collection

#### 2.3. Pre-Processing of the Data

_{t}is the smoothed signal occurrence at time t, W

_{i}is the weight to be given to the actual occurrence for the time t − I, A

_{i}is the actual occurrence for the time t − i and n is the total number of window lengths in the prediction. In this work, a window length of 100 sampling times is chosen for all model constructions.

^{2}) were calculated according to Equations (2) and (3) respectively.

_{act}and y

_{prd}are the actual and predicted values, respectively, i is the data record number, y

_{m}is average of the experimental value, and n is the total number of records.

## 3. Data-Driven Methods

#### 3.1. Artificial Neural Network (ANN)

_{1}, z

_{2}, …, z

_{n}) are multiplied by weights (w

_{1,1}, w

_{1,2}, …, w

_{1,n}). Second, the weighted inputs are added together with bias signal b to obtain a value [21]:

#### 3.2. Extreme Learning Machine (ELM)

_{i}, y

_{i}), where x

_{i}= [x

_{i}

_{1}, x

_{i}

_{2}, …, x

_{in}]

^{T}∈ R

^{n}is the input vector and y

_{i}= [y

_{i}

_{1}, y

_{i}

_{2}, …, y

_{im}]

^{T}∈ R

^{m}the output vector, then the output of SLFN with N hidden neurons can be calculated as:

_{j}= [β

_{j}

_{1}, β

_{j}

_{2}, …, β

_{jm}] are the weights of the output layer, which need to be estimated; f(.) is the transfer function; a

_{j}and b

_{j}are the input weights and biases, respectively. Equation (5) can be written in matrix form [28]:

**H**β

_{1}, y

_{2}, …, y

_{M})

^{T}, β = (β

_{1}, β

_{2}, …, β

_{N})

^{T}and

**H**given by:

**H**

^{†}y

**H**

^{†}= (

**H**

^{T}·

**H**)

^{−1}·

**H**

^{T}

_{j}) and biases (b

_{j}) can be randomly initialized; however, the weights of the output layer (β

_{j}) need to be determined with experimental data. Usually, the number of neurons in the hidden layer is higher than in the input layer (N > n). For the grid search, the number of neurons in the hidden layer was varied from 20 to 130.

#### 3.3. Random Forest (RF)

#### 3.4. Support Vector Machine (SVM)

_{i}) is a kernel function for input features, and w

_{i}and b are coefficients. The most famous kernel functions are the polynomial kernel, the radial basis, the exponential radial basis, and the multilayer perceptron kernel function [31,33]. In this work, due to the high prediction ability, the radial basis kernel function was used. The commonly used radial basis kernel has the form:

_{i}are support vectors satisfying the equations of kernel function K(x, x

_{i}) and $\sigma $ is the width of the Gaussian kernel function. More information on SVM can be found in references [31,32]. To find the precise model, the tuning parameters of SVM, mainly the regularization parameter C and the inverse kernel width σ used by the radial basis kernel function, should be determined. The SVM model parameters for the grid search were set as 0.001, 0.01, 0.02, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6 for $\sigma $, and 200 to 800 (with step size 100) for C.

#### 3.5. Genetic Programming (GP)

#### 3.6. Feature Ranking

_{i}is the weighted average of the individual model; rawImp

_{i}is the raw importance of the variable obtained from model i; minError is the minimal error obtained (RMSE or MSE) for all models; and Error

_{i}is error for model i.

## 4. Results and Discussion

#### 4.1. Studying the Relationship between Input and Output Data

_{in}), the composite (X

_{c}), and the carbohydrate (X

_{ch}) as well as the feed flow rate of the reactor. The summary of default and modified values of the parameters are shown in Table 3.

#### 4.2. Choosing the Most Influential Variables Using the Feature Ranking Method

_{4}mole fraction were also removed due to their direct correlation with pressure and CO

_{2}mole fraction respectively. It should be noted that the same results could be obtained by using gas flow and CH

_{4}mole fraction instead of using pressure and CO

_{2}mole fraction; therefore, the decision to eliminate correlated parameters can be made based on the simplicity and availability of measurements. The remaining parameters, listed in Table 1, were used as an input vector for the fscaret method. Figure 4 shows the importance of the variables on a scale from 0 to 100 obtained with the fscaret method for VFA prediction.

#### 4.3. Soft Sensor Design

^{2}are estimated based on the training and validation sets for each model. The results obtained using different techniques are shown in Table 7.

#### 4.4. Evaluation of the Robustness of Soft Sensors

_{hyd,ch}), the maximum uptake rate of acetate (k

_{m,ac}), and the ammonia inhibition constant (k

_{I,NH3}). We then varied them by ±50% around their default values. The default values of k

_{hyd,ch}, k

_{m,ac}and k

_{I,NH3}were 10 d

^{−1}, 8 d

^{−1}and 0.0018 kmol·m

^{−3}respectively. To evaluate the robustness of each model, new data sets were generated by the BSM2 simulation with modified biochemical parameters. Then, each trained model was tested based on the newly obtained data set. Figure 7 shows the results of the robustness evaluation for each model. As the RF soft sensor failed, it is not considered for the robustness evaluation.

_{m,ac}, it can be concluded that GP is the most robust approach, although NRMSE increases at −50%. For k

_{hyd,ch}, the NRMSE is quite constant which shows that all techniques are insensitive to variations of this parameter; nonetheless, GP still has a lower error compared to the other model. For k

_{I,NH3}, again GP is more robust as the error does not change significantly. The least robust model is SVM, which has the highest error compared to the other models. To make comparison easier the average NRMSE for variation of each parameter is also shown in Figure 7.

## 5. Conclusions

_{2}mole fraction was obtained by using the fscaret method along with SVM. After training the models, we obtained the prediction and generalization performances of each model based on a specific validation data set. The results show that all models except RF predict the effluent VFA precisely; however, GP performed slightly better than the other models. The RF model totally failed to predict VFA. This suggests that tree based models are not a very appropriate choice for developing models with an extrapolation capability similar to soft sensors. Assessing the robustness of soft sensors shows that the GP model is more robust and less sensitive to the state changes of the AD process. Last but not least, the other benefit of adopting the GP soft sensor, apart from accuracy and robustness, is its transparency, which makes it easy to integrate into process control systems without any further modifications.

## Author Contributions

## Funding

## Acknowledgments

## Conflicts of Interest

## References

- Abu Qdais, H.; Bani Hani, K.; Shatnawi, N. Modeling and optimization of biogas production from a waste digester using artificial neural network and genetic algorithm. Resour. Conserv. Recycl.
**2010**, 54, 359–363. [Google Scholar] [CrossRef] - Yordanova, S.; Noikova, N.; Petrova, R.; Tzvetkov, P. Neuro-Fuzzy Modelling on Experimental Data in Anaerobic Digestion of Organic Waste in Waters. In Proceedings of the 2005 IEEE Intelligent Data Acquisition and Advanced Computing Systems: Technology and Applications, Sofia, Bulgaria, 5–7 September 2005; IEEE: Piscataway, NJ, USA, 2005; pp. 84–88. [Google Scholar]
- Franke-Whittle, I.H.; Walter, A.; Ebner, C.; Insam, H. Investigation into the effect of high concentrations of volatile fatty acids in anaerobic digestion on methanogenic communities. Waste Manag.
**2014**, 34, 2080–2089. [Google Scholar] [CrossRef] [PubMed][Green Version] - Haimi, H.; Mulas, M.; Corona, F.; Vahala, R. Data-derived soft-sensors for biological wastewater treatment plants: An overview. Environ. Model. Softw.
**2013**, 47, 88–107. [Google Scholar] [CrossRef] - Dürrenmatt, D.J.; Gujer, W. Data-driven modeling approaches to support wastewater treatment plant operation. Environ. Model. Softw.
**2012**, 30, 47–56. [Google Scholar] [CrossRef] - Corona, F.; Mulas, M.; Haimi, H.; Sundell, L.; Heinonen, M.; Vahala, R. Monitoring nitrate concentrations in the denitrifying post-filtration unit of a municipal wastewater treatment plant. J. Process Control
**2013**, 23, 158–170. [Google Scholar] [CrossRef] - Jimenez, J.; Latrille, E.; Harmand, J.; Robles, A.; Ferrer, J.; Gaida, D.; Wolf, C.; Mairet, F.; Bernard, O.; Alcaraz-Gonzalez, V.; et al. Instrumentation and control of anaerobic digestion processes: A review and some research challenges. Rev. Environ. Sci. Bio/Technol.
**2015**, 14, 615–648. [Google Scholar] [CrossRef] - James, S.C.; Legge, R.L.; Budman, H. On-line estimation in bioreactors: A review. Rev. Chem. Eng.
**2000**, 16, 311–340. [Google Scholar] [CrossRef] - Gernaey, K.V.; Van Loosdrecht, M.C.M.; Henze, M.; Lind, M.; Jørgensen, S.B. Activated sludge wastewater treatment plant modelling and simulation: State of the art. Environ. Model. Softw.
**2004**, 19, 763–783. [Google Scholar] [CrossRef] - Newhart, K.B.; Holloway, R.W.; Hering, A.S.; Cath, T.Y. Data-driven performance analyses of wastewater treatment plants: A review. Water Res.
**2019**, 157, 498–513. [Google Scholar] [CrossRef] - Corominas, L.; Garrido-Baserba, M.; Villez, K.; Olsson, G.; Cort Es, U.; Poch, M. Transforming data into knowledge for improved wastewater treatment operation: A critical review of techniques. Environ. Model. Softw.
**2018**, 106, 89–103. [Google Scholar] [CrossRef] - Tay, J.-H.; Zhang, X. A fast predicting neural fuzzy model for high-rate anaerobic wastewater treatment systems. Water Res.
**2000**, 34, 2849–2860. [Google Scholar] [CrossRef] - Mullai, P.; Arulselvi, S.; Ngo, H.-H.; Sabarathinam, P.L. Experiments and ANFIS modelling for the biodegradation of penicillin-G wastewater using anaerobic hybrid reactor. Bioresour. Technol.
**2011**, 102, 5492–5497. [Google Scholar] [CrossRef] [PubMed] - Güçlü, D.; Yılmaz, N.; Ozkan-Yucel, U.G. Application of neural network prediction model to full-scale anaerobic sludge digestion. J. Chem. Technol. Biotechnol.
**2011**, 86, 691–698. [Google Scholar] [CrossRef] - Rangasamy, P.; Pvr, I.; Ganesan, S. Anaerobic tapered fluidized bed reactor for starch wastewater treatment and modeling using multilayer perceptron neural network. J. Environ. Sci.
**2007**, 19, 1416–1423. [Google Scholar] [CrossRef] - Huang, M.; Han, W.; Wan, J.; Ma, Y.; Chen, X. Multi-objective optimisation for design and operation of anaerobic digestion using GA-ANN and NSGA-II. J. Chem. Technol. Biotechnol.
**2016**, 91, 226–233. [Google Scholar] [CrossRef] - Beltramo, T.; Klocke, M.; Hitzmann, B. Prediction of the biogas production using GA and ACO input features selection method for ANN model. Inf. Process. Agric.
**2019**, 6, 349–356. [Google Scholar] [CrossRef] - Jeppsson, U.; Rosen, C.; Alex, J.; Copp, J.; Gernaey, K.V.; Pons, M.-N.; Vanrolleghem, P.A. Towards a benchmark simulation model for plant-wide control strategy performance evaluation of WWTPs. Water Sci. Technol.
**2006**, 53, 287–295. [Google Scholar] [CrossRef] - Nopens, I.; Benedetti, L.; Jeppsson, U.; Pons, M.-N.; Alex, J.; Copp, J.B.; Gernaey, K.V.; Rosen, C.; Steyer, J.-P.; Vanrolleghem, P.A. Benchmark Simulation Model No 2: Finalisation of plant layout and default control strategy. Water Sci. Technol.
**2010**, 62, 1967–1974. [Google Scholar] [CrossRef] - Hota, H.S.; Handa, R.; Shrivas, A.K. Time series data prediction using sliding window based Rbf neural network. Int. J. Comput. Intell. Res.
**2017**, 13, 1145–1156. [Google Scholar] - Gil, J.D.; Ruiz-Aguirre, A.; Roca, L.; Zaragoza, G.; Berenguel, M. Prediction models to analyse the performance of a commercial-scale membrane distillation unit for desalting brines from RO plants. Desalination
**2018**, 445, 15–28. [Google Scholar] [CrossRef][Green Version] - Eskandarian, S.; Bahrami, P.; Kazemi, P. A comprehensive data mining approach to estimate the rate of penetration: Application of neural network, rule based models and feature ranking. J. Pet. Sci. Eng.
**2017**, 156, 605–615. [Google Scholar] [CrossRef] - Stanley, K.O.; Miikkulainen, R. Evolving Neural Networks through Augmenting Topologies. Evol. Comput.
**2002**, 10, 99–127. [Google Scholar] [CrossRef] [PubMed] - R Core Team. R: A Language and Environment for Statistical Computing; R Foundation for Statistical Computing: Vienna, Austria, 2018. [Google Scholar]
- Candel, A.; Ledell, E.; Bartz, A. Deep Learning with H
_{2}O. Available online: https://h2o-release.s3.amazonaws.com/h2o/rel-wright/9/docs-website/h2o-docs/booklets/DeepLearningBooklet.pdf (accessed on 11 November 2019). - Huang, G.B.; Zhu, Q.Y.; Siew, C.K. Extreme learning machine: A new learning scheme of feedforward neural networks. In Proceedings of the 2004 IEEE International Joint Conference on Neural Networks (IEEE Cat. No.04CH37541), Budapest, Hungary, 25–29 July 2004; IEEE: Piscataway, NJ, USA, 2004; Volume 2, pp. 985–990. [Google Scholar]
- Abdullah, S.S.; Malek, M.A.; Abdullah, N.S.; Kisi, O.; Yap, K.S. Extreme Learning Machines: A new approach for prediction of reference evapotranspiration. J. Hydrol.
**2015**, 527, 184–195. [Google Scholar] [CrossRef] - Zhang, C.; Liu, Q.; Wu, Q.; Zheng, Y.; Zhou, J.; Tu, Z.; Chan, S.H. Modelling of solid oxide electrolyser cell using extreme learning machine. Electrochim. Acta
**2017**, 251, 137–144. [Google Scholar] [CrossRef] - Breiman, L. Random Forests. Mach. Learn.
**2001**, 45, 5–32. [Google Scholar] [CrossRef][Green Version] - Cortes, C.; Vapnik, V. Support-Vector Networks. Mach. Learn.
**1995**, 20, 273–297. [Google Scholar] [CrossRef] - Smola, A.J.; Schölkopf, B. A tutorial on support vector regression. Stat. Comput.
**2004**, 14, 199–222. [Google Scholar] [CrossRef][Green Version] - Najafzadeh, M.; Etemad-Shahidi, A.; Lim, S.Y. Scour prediction in long contractions using ANFIS and SVM. Ocean Eng.
**2016**, 111, 128–135. [Google Scholar] [CrossRef] - Liu, L.; Lei, Y. An accurate ecological footprint analysis and prediction for Beijing based on SVM model. Ecol. Inform.
**2018**, 44, 33–42. [Google Scholar] [CrossRef] - Koza, J. Genetic programming as a means for programming computers by natural selection. Stat. Comput.
**1994**, 4, 87–112. [Google Scholar] [CrossRef] - Bahrami, P.; Kazemi, P.; Mahdavi, S.; Ghobadi, H. A novel approach for modeling and optimization of surfactant/polymer flooding based on Genetic Programming evolutionary algorithm. Fuel
**2016**, 179, 289–298. [Google Scholar] [CrossRef] - Sonolikar, R.R.; Patil, M.P.; Mankar, R.B.; Tambe, S.S.; Kulkarni, B.D. Genetic Programming based Drag Model with Improved Prediction Accuracy for Fluidization Systems. Int. J. Chem. React. Eng.
**2017**, 15. [Google Scholar] [CrossRef] - James, G.; Witten, D.; Hastie, T.; Tibshirani, R. An Introduction to Statistical Learning; Springer Texts in Statistics; Springer: New York, NY, USA, 2013; Volume 103, ISBN 978-1-4614-7137-0. [Google Scholar]
- Szlęk, J.; Mendyk, A. Fscaret: Automated Feature Selection from ‘Caret’ [Software]. Available online: https://cran.r-project.org/web/packages/fscaret/index.html (accessed on 10 March 2018).
- Szlęk, J.; Pacławski, A.; Lau, R.; Jachowicz, R.; Kazemi, P.; Mendyk, A. Empirical search for factors affecting mean particle size of PLGA microspheres containing macromolecular drugs. Comput. Methods Programs Biomed.
**2016**, 134, 137–147. [Google Scholar] [CrossRef] [PubMed] - Schmidt, M.; Lipson, H. Distilling Free-Form Natural Laws from Experimental Data. Science
**2009**, 324, 81–85. [Google Scholar] [CrossRef] [PubMed] - Schmidt, M.; Hod, L.; Schmidt, M.; Lipson, H. Eureqa (Version 0.98 Beta) [Software]. 2013. Available online: http://www.eureqa.com/ (accessed on 4 May 2018).

**Figure 6.**Prediction results of different soft sensors; black is the actual values and blue is the predicted volatile fatty acid (VFA) values. GP: genetic programming; SVM: support vector machine; ANN: artificial neural network; ELM: extreme learning machine; RF: random forest.

**Figure 7.**Results of the robustness evaluation for each model: (

**a**) for k

_{m,ac}; (

**b**) for k

_{hyd,ch}; (

**c**) for k

_{I,NH3}. NRMSE: normalized root-mean-squared error; avNRMSE: average normalized root-mean-squared error.

Parameters | Unit | Parameters | Unit |
---|---|---|---|

Effluent COD | g m^{−3} | CH_{4} mol_fraction | - |

Effluent alkalinity | Mol m^{−3} | CO_{2} mol_fraction | - |

Influent TSS | g m^{−3} | H_{2} mol_fraction | - |

Effluent TSS | g m^{−3} | Pressure | bar |

Effluent pH | - | Effluent ammonia | g m^{−3} |

Effluent BOD | g m^{−3} | Influent Flow | m^{3} d^{−1} |

Gas flow | m^{3} d^{−1} |

**Table 2.**Performance of the linear regression (LR) models based on the default influent file and different input vectors.

All_Inputs | All_Input_Except _TSS | All_Input_Except _Ammonia | All_Input_Except _TSS & Ammonia | |
---|---|---|---|---|

Training_NRMSE | 0.028 | 0.029 | 0.028 | 0.029 |

Test_NRMSE | 0.039 | 0.039 | 0.038 | 0.038 |

Training_R^{2} | 0.981 | 0.978 | 0.979 | 0.976 |

Test_R^{2} | 0.967 | 0.966 | 0.967 | 0.968 |

^{2}: coefficient of determination.

**Table 3.**Summary of default and the modified values of inorganic nitrogen (S

_{in}), composite (X

_{c}) and carbohydrate (X

_{ch}).

Default Values | Modified Values | |||||||
---|---|---|---|---|---|---|---|---|

S_{in}(kmol m ^{−3}) | X_{c}(kg m ^{−3}) | X_{ch}(kg m ^{−3}) | Flow (m ^{3} d^{−1}) | S_{in}(kmol m ^{−3}) | X_{c}(kg m ^{−3}) | X_{ch}(kg m ^{−3}) | Flow (m ^{3} d^{−1}) | |

Min. | 0.0006 | 0 | 0.000 | 56.55 | 0.0006 | 0.00 | 0.000 | 1.993 |

1st Qu. | 0.0015 | 0 | 2.941 | 137.07 | 0.0019 | 0.00 | 3.293 | 82.257 |

Median | 0.0019 | 0 | 3.952 | 175.81 | 0.1156 | 22.54 | 4.897 | 138.704 |

Mean | 0.0020 | 0 | 3.830 | 183.57 | 0.0957 | 16.41 | 7.256 | 140.602 |

3rd Qu. | 0.0022 | 0 | 4.833 | 217.90 | 0.1584 | 28.71 | 9.684 | 193.301 |

Max. | 0.0325 | 0 | 8.607 | 479.96 | 0.2718 | 39.52 | 40.464 | 477.957 |

**Table 4.**Performance of the LR models based on the modified anaerobic digestion (AD) variables and different input vectors.

All_Inputs | All_Input_Except _TSS | All_Input_Except _Ammonia | All_Input_Except _TSS & Ammonia | |
---|---|---|---|---|

Training_NRMSE | 0.103 | 0.133 | 0.143 | 0.189 |

Test_NRMSE | 0.197 | 0.213 | 0.122 | 0.304 |

Training_R^{2} | 0.865 | 0.794 | 0.748 | 0.586 |

Test_R^{2} | 0.654 | 0.511 | 0.841 | 0.663 |

Inputs | R^{2} | NRMSE |
---|---|---|

pH + Ammonia_conc + pressure | 0.813 | 0.182 |

pH + Ammonia_conc + pressure + CO_{2}_mol fraction | 0.990 | 0.033 |

pH + Ammonia_conc + pressure + CO_{2}_mol_fraction + TSS_out | 0.972 | 0.058 |

pH + Ammonia_conc + pressure + CO_{2}_mol_fraction + TSS_out+Flow | 0.977 | 0.044 |

pH + Ammonia_conc + pressure + CO_{2}_mol_fraction + TSS_out + Flow + H_{2}_mol_fraction | 0.971 | 0.049 |

Algorithm | Tuning Parameters | ||||
---|---|---|---|---|---|

ANN | Neuron Size | Transfer Function | Number of Hidden Layers | L1 | L2 |

108 | Tanh | 1 | 1 × 10^{−5} | 1 × 10^{−5} | |

RF | mtry | Number of trees | Maximum nodes | ||

4 | 1600 | 20 | |||

ELM | Neuron size | Transfer function | |||

126 | Sigmoid | ||||

SVM | Sigma | C | |||

0.2 | 500 |

Algorithm | NRMSE Training | R^{2} Training | NRMSE Validation | R^{2} Validation |
---|---|---|---|---|

ANN | 0.0089 | 0.9992 | 0.0192 | 0.9969 |

RF | 0.1432 | 0.7533 | 0.3419 | 0.5784 |

ELM | 0.0003 | 0.9999 | 0.0169 | 0.9977 |

SVM | 0.0165 | 0.9966 | 0.0390 | 0.9941 |

GP | 0.0025 | 0.9999 | 0.0037 | 0.9998 |

Term * | Coef | Term * | Coef |
---|---|---|---|

constant | $1132.95$ | $P$ | $-11.28$ |

$[N{H}_{3}]$ | $1469.52$ | $[C{O}_{2}]$ | $-33.72$ |

$\sqrt{[N{H}_{3}]}$ | $3354.73$ | $pH$ | $-295.38\text{}$ |

$p{H}^{2}$ | $19.45$ | $pH\times \sqrt{[N{H}_{3}]}$ | $-441.87$ |

$[C{O}_{2}\left]\text{}\times [N{H}_{3}\right]\times {e}^{\left(1.60\times \left[C{O}_{2}\right]\right)}$ | $20,271.09$ | $[C{O}_{2}\left]\times pH\times \text{}[N{H}_{3}\right]\times {e}^{\left(1.60\times [C{O}_{2}]\right)}$ | $-2670.07$ |

_{2}fraction and pressure, respectively.

© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Kazemi, P.; Steyer, J.-P.; Bengoa, C.; Font, J.; Giralt, J.
Robust Data-Driven Soft Sensors for Online Monitoring of Volatile Fatty Acids in Anaerobic Digestion Processes. *Processes* **2020**, *8*, 67.
https://doi.org/10.3390/pr8010067

**AMA Style**

Kazemi P, Steyer J-P, Bengoa C, Font J, Giralt J.
Robust Data-Driven Soft Sensors for Online Monitoring of Volatile Fatty Acids in Anaerobic Digestion Processes. *Processes*. 2020; 8(1):67.
https://doi.org/10.3390/pr8010067

**Chicago/Turabian Style**

Kazemi, Pezhman, Jean-Philippe Steyer, Christophe Bengoa, Josep Font, and Jaume Giralt.
2020. "Robust Data-Driven Soft Sensors for Online Monitoring of Volatile Fatty Acids in Anaerobic Digestion Processes" *Processes* 8, no. 1: 67.
https://doi.org/10.3390/pr8010067