Abstract

This study was aimed at evaluating the artificial neural network (ANN), genetic algorithm (GA), adaptive neurofuzzy interference (ANFIS), and the response surface methodology (RSM) approaches for modeling and optimizing the simultaneous adsorptive removal of chemical oxygen demand (COD) and total organic carbon (TOC) in produced water (PW) using tea waste biochar (TWBC). Comparative analysis of RSM, ANN, and ANFIS models showed mean square error (MSE) as 5.29809, 1.49937, and 0.24164 for adsorption of COD and MSE of 0.11726, 0.10241, and 0.08747 for prediction of TOC adsorption, respectively. The study showed that ANFIS outperformed the ANN and RSM in terms of fast convergence, minimum MSE, and sum of square error for prediction of adsorption data. The adsorption parameters were optimized using ANFIS-surface plots, ANN-GA hybrid, RSM-GA hybrid, and RSM optimization tool in design expert (DE) software. Maximum COD (88.9%) and TOC (98.8%) removal were predicted at pH of 7, a dosage of 300 mg/L, and contact time of 60 mins using ANFIS-surface plots. The optimization approaches showed the performance in the following order: ANFIS-surface plots>ANN-GA>RSM-GA>RSM.

1. Introduction

With an increase in the world population, industrialization, and urbanization, the evaluation of water resources and monitoring of their quality have become a significant concern in hydroenvironmental science. Various contaminants are being released continuously into water resources and causing the degradation of aquatic animals’ habitat and freshwater quality up to a greater extent [1, 2]. Attempts have been made to establish strategies for the safe removal of contaminants in wastewaters, e.g., coagulation-flocculation, photocatalytic treatment, electrocoagulation, adsorption, and oxidation [3, 4]. However, in comparison to other methods, adsorption has gained prominence due to its high operating speed, design stability, cost-effectiveness, and robustness [5, 6].

The adsorption process is influenced by various operating variables, including contact time between adsorbent and adsorbate, adsorbent particle size, pollutant concentration, and pH of the solution. It has been noted that building an automated and optimized adsorption treatment process is complex in wastewater treatment plants (WWTP) due to the following reasons: (i) complex nature of adsorption process, (ii) nonlinear interactions between the operating variables, and (iii) drastic changes in pollutant’s concentrations [7]. Therefore, mathematical models are needed to understand, optimize, and quantify the interactions between the operating variables. Modeling and simulation can save time, reagents, and delayed analysis by avoiding multiple time-consuming experimental runs of the process. Classical and linear mathematical models can not completely model and simulate the adsorption results. Recently, response surface methodology (RSM) has been used to model a wide variety of adsorption processes, but it has been found to have limited application when the data is minimum. Therefore, to interrelate the adsorption operating variables with output removal efficiencies of the pollutants and automate the WWTP, advanced computer-simulated models are necessary. Automation and optimization of the adsorption process can help in saving workforce, cost, and resources [8].

Artificial Intelligence (AI) is an advanced computer-based simulation technology. It was first implemented in the mid-1950s in the world of computer science. After that, many more robust and realistic AI-based techniques were developed in engineering to solve challenging problems and provide real-world implementations, whereas traditional or conventional methods were inadequate or unsuccessful [7, 9]. The application of AI techniques in the water treatment sector and optimization process has recently gained attention [10]. AI-based methods, such as knowledge-based structures and fuzzy logics (FIS), including adaptive neurofuzzy interface systems (ANFIS) [11], particle swarm optimization (PSO) [12, 13], genetic algorithm (GA) [14, 15], and artificial neural network (ANN) [16, 17], have been applied recently in water treatment and adsorption optimization systems. Such as optimization of the adsorption process of various dyes [1824], metals [8, 14, 25, 26], and organic matter [27] has been reported in the literature using ANN, ANFIS, and RSM methods. However, limited studies have been found for the application of ANN, GA, and ANFIS for modeling and optimization of chemical oxygen demand (COD) and total organic carbon (TOC) adsorptive removal in produced water (PW).

The PW is one of the largest wastewater streams obtained during oil and gas exploration. Contaminants in PW change significantly depending on the source of their disposal. However, recently organic contaminants in PW have become the highest priority pollutants and need to be treated on a priority basis [28]. The COD and TOC are significant parameters for analyzing organic contaminants in PW and have been commonly used to represent the effluent water quality (WQ) [29, 30]. Hence, for the safe disposal of PW, these parameters need to be reduced significantly.

Most of the studies in the literature are performed on synthetic waters, which cannot be used efficiently for automation of oil and gas reservoirs’ effluent treatment plants. Hence, there is a gap in the literature regarding the application of ANN, GA, and ANFIS in the adsorption field utilising PW. This research work was aimed at designing, implementing, comparing, and evaluating the ANN, GA, and ANFIS approach to remove COD and TOC in PW. Tea waste biochar (TWBC) had been used as an adsorbent in batch studies under the control of three factors, i.e., pH, adsorbent dosage, and contact time. The ANN and ANFIS results were compared with RSM results. It is expected that this study would help to scale up the industrial application of the adsorption process for COD and TOC removal in PW.

2. Materials and Methods

2.1. Materials

Tea leaves waste was used for the preparation of biochar (BC). The waste was collected from local Malaysian restaurants. High range (HR) COD vials were obtained from Avanti’s laboratory items supplier in Malaysia. The water sample was taken from a South-East Asian oil and gas company.

2.2. Characterization of PW

The PW was filtered to remove suspended solids using a suction filtration unit. The filtered water was characterized for initial COD and TOC concentration. COD was measured using the USEPA reactor digestion method. Briefly, 2 mL of filtered PW sample was added to the high range COD vial. The vial was capped, mixed, and kept in a preheated digester at 150°C for 2 hrs. An empty vial prepared using 2 mL pure water was also observed in the digester. After 2 hrs, the concentration of COD (mg/L) was measured using USEPA method 800 under program 430, using HACH DR 2800 spectrophotometer. TOC in PW was measured using the Shimadzu TOC-L/SSM-5000A analyzer. The pH value of PW was found out using the OHAUS pH meter, and it was about .

2.3. Preparation and Characterization of Biochar

The TWBC was prepared using our previously reported method [31]. Briefly, the tea leaves were washed and all impurities were removed. Before pyrolysis, the leaves were soaked overnight in phosphoric acid. The soaked leaves were dried and pyrolyzed at 700°C for 2 hrs in the presence of N2 gas. The obtained TWBC was washed, dried in an oven for 24 hrs, and stored in a desiccator. The surface characteristics of the TWBC were determined using a ZEISS scanning electron microscope with energy-dispersive X-ray spectroscopy (SEM-EDX) mapping and a 15 kV accelerating voltage.

2.4. Design of Experiments Using RSM

The RSM-based polynomial Box–Behnken Design (BBD) in design expert (DE) software (Stat-Ease, version 12) was used for the design of adsorption batch experiments. Three independent variables were taken as inputs, including initial pH of PW, contact time, and dosage of TWBC. Adsorptive removal efficiencies of COD and TOC were taken as outputs. The design was chosen at three stages of low (-1), center (0), and high (1) points (Table 1), giving a total of 13 experimental runs.

2.5. Adsorption Batch Experiments

According to the design of experiments obtained through BBD, 13 batch experiments were conducted to investigate the effects of initial solution pH, adsorbent dosage, and contact time on COD and TOC removal in PW. The adsorbent was applied in varying amounts (25−300 mg/L) for 100 mL of PW at varying initial pH (3 − 10) and contact times (10−60 mins). The water was stirred at 220 rpm at a temperature of using a magnetic stirrer. The initial and final COD and TOC concentrations were measured before and after each experiment. All data were measured in three replicates, and the average value was recorded. The removal efficiencies were determined using the formula given as follows:

where initial and final concentrations refer to COD and TOC amounts in mg/L before and after the adsorption experiment, respectively.

2.6. Modelling of Artificial Neural Network (ANN)

Artificial neural networks (ANNs) are well known for their ability to research and organize large amounts of data. It is influenced by the brain, neurological system, neuronal learning, and reaction mechanism [18].

MATLAB R2021a was used to create a three-layer feed-forward neural network (FFNN). A FFNN network has no loops or cycles because all data is solely delivered forward [32]. For training the network, three inputs in the input layer, 2–20 neurons in the hidden layer, and two outputs in the output layer were taken. The input layer was given pH, TWBC dosage (mg/L), and contact time (min) as independent variables. The output layer had two dependent variables showing the removal efficiency of COD (%) and TOC (%), as shown in Figure 1. The neurons in the hidden layer were connected to the inputs and outputs through weights (w) and biases (b). In Figure 1, the symbol represents the th input in the input layer (1≤i≤3), represents the th neuron in the hidden layer (1≤j≤n), and represents the th output in the output layer (1≤k≤2). represents the weights from the input layer to the hidden layer, and represents the hidden layer to output layer weights, where represents the total number of neurons in the hidden layer.

Training a network aims to reduce the error between the network’s outputs and the target values. The training procedure reduces the error by modifying the weights and biases of the network. The ANN architecture was repeatedly trained to select the best suitable number of neurons, training algorithm, weights, and biases to predict COD and TOC removal efficiencies. A total of 13 data sets were taken through batch experiments for COD and TOC removal efficiencies, respectively. 70% data was used to train the model and 15% for validation and testing, respectively. For all data sets in ANN, the symmetric sigmoid transfer function (tansig) was used in the hidden layer. The linear transfer function (purelin) was used at the output node for the simulation and prediction of COD and TOC elimination.

The suitable number of neurons in the hidden layer was selected based on the hit and trial method using 2−20 neurons. As for performance criteria, minimum mean square error (MSE) and simulation time were taken.

After selecting the no. of neurons, the network was evaluated for various algorithms. The backpropagation (BP) algorithms were chosen for the network’s training. It is a first-order gradient descent technique to model the experimental data [33]. The three BP algorithms named Elman BP (EBP), Cascade Forward BP (CFBP), and Levenberg Marquardt BP (LMBP) were evaluated for their performance, and the best algorithm was taken for the training purpose.

In order to train the ANN model, input values are multiplied by connection weights, followed by bias addition. The same procedure is used for the output layer, with the hidden layer’s output acting as the input. After training the ANN model, it was tested and validated. The goal was to achieve an overall correlation coefficient (R) of nearly 1. The relationship between inputs and outputs can be expressed through Equation (2) [34].

where shows the output variable and denotes the input variable, and represents the number of neurons in the hidden layer and is the number of input variables. and are the weights and biases between the layers. , , and represent the input order number, hidden neuron order number, and output order number, respectively.

2.7. Modelling of Adaptive Neurofuzzy Interference System (ANFIS)

Fuzzy systems have some advantages over traditional approaches, particularly where ambiguous data is involved. Recently, fuzzy systems have gained popularity as alternative methods for information processing [35].

As illustrated in Figure 2, the fuzzy inference system (FIS) used in ANFIS was created in MATLAB R2021a using a neurofuzzy designer. The Sugeno-type ANFIS design consisted of four hidden layers: fuzzification layer, inference layer, defuzzification layer, and output layer [36]. For each output, a total of 13 data sets were used to train the model. Data were randomly divided into training (70%), testing, and checking data (30%). Three variables (pH, TWBC dosage, and contact time) were selected as inputs and removal efficiency of COD, and TOC were taken as targets. Minimum numbers of membership functions (mf) were selected based on minimum MSE. Optimization of the model was done based on backpropagation and least square estimation. FIS and optimization methods were selected based on error minimization.

2.8. Modelling of Response Surface Methodology (RSM)

The experimental data collected through batch tests were subjected to the second-order polynomial regression model. As a polynomial model based on the quadratic equation, the response can be connected to the independent variables. At the middle of the pattern, one center point was used to approximate the total error. The quadratic regression equation used to extract the expected response results is given as follows:

The output is expressed here by , while variables are written in the form of and . shows the number of variables examined. , , , and , are classified as a constant coefficient, linear coefficient of interaction, coefficient of quadratic interaction, and the interaction coefficient of the 2nd order terms, respectively. Furthermore, the F-test and values were used to determine the validity of each element.

To determine the adequacy of the established model and the statistical importance of the constant regression coefficients, the analysis of variance (ANOVA) was applied [37]. ANOVA analyzed the interactive, individual, and quadratic effects of input variables using TWBC on the removal efficiency of COD and TOC. Using the value with a 95% trust rating, the model terms were evaluated. The -value was used to analyze the sensitivity of the coefficients in regression. Also, to verify the adequacy of the formula, the coefficient of determination () value was compared to the adjusted value.

2.9. Performance Evaluation of the Models

The performance of the AI techniques (ANN and ANFIS) and RSM for prediction of adsorption data were evaluated using statistical equations, i.e., (i) the coefficient of determination () Equation (4), (ii) the sum of squared error (SSE) Equation (5), and (iii) mean squared error (MSE) Equation (6) [32, 38]. The value of should lie between 0 and 1. A value near 1 shows a good correlation between the experimental and model-simulated data sets. The SSE has values ranging from 0 to 1, while the best value is closer to 0 [39]. The minimum value of MSE is taken as the best value [40]. Following equations were used to measure the errors:

where and denote the predicted and experimental values, respectively. denotes the total number of values in data. The mean value of the response is denoted by .

2.10. Optimization of the Adsorption Process
2.10.1. Development of ANN-GA

ANN and genetic algorithm (GA) hybrid were used for the optimization purpose using MATLAB optimization tool. Multiobjective optimization using GA (gamultobj) was taken as solver, and the ANN output equation (Equation (2)) was taken as an objective function. The algorithm had the following attributes: (i) population type of double vector; (ii) population size of 50; (iii) creation and mutation functions were constraint dependent; and (iv) crossover fraction of 0.8. The algorithm was run for optimization further. The goal was to maximize the COD and TOC removal efficiency.

2.10.2. Development of ANFIS Surface Plots

For the optimization of adsorption data through ANFIS, 2D surface plots were generated for pH range 3−10, dosage 25−300 mg/L, and contact time 10−60 min. Optimal values of the input variables were obtained through the surface plots.

2.10.3. Development of RSM Surface Plots and RSM-GA

Using the DE software, three-dimensional surface and two-dimensional contour plots were created to visualize the relationship between the process factors and their corresponding effect on the output response. Optimal conditions were calculated after the model was completely analyzed. The numerical method was used under the optimization option in the Design Export software. For all independent variables “in range” options were chosen (e.g., pH 3−10, biochar dosage 25−300 mg/L, and contact time 10−60 min) while the “maximize” alternative was chosen for COD and TOC elimination.

RSM was also hybridized with GA in MATLAB R2021a using the response equations as the objective function. Response equation was obtained through the RSM model. GA parameters were the same as stated above. The optimized input values were obtained.

3. Results and Discussion

3.1. Characteristics of BC

The SEM-EDX images of TWBC are presented in Figure 3. Figures 3(a) and 3(b) showed that TWBC had many open pores available for adsorption of COD and TOC. The activating agent (phosphoric acid) seems to create an etched texture, as well as volatile matter decomposition [41]. The AC surfaces are uneven due to the etching, with significant porosity and roughness, indicating a desirable textural property of AC [42]. The mesopores available at the surface seem to cause capillary condensation as well as transferring adsorptive into the micropores, hence increasing the AC’s adsorption capacity. The elemental composition in Figure 3(c) showed that TWBC had 80.8% of carbon and 16.2% oxygen content. The high carbon content showed good carbonization of TWBC. Small impurities of Ca and K were also observed in the TWBC.

3.2. Characterization of PW

The concentration of COD in the PW was about 1400 mg/L, which was much higher than the safe discharge limit of COD in effluents reported as 150 mg/L. The initial concentration of TOC in PW was 433.9 mg/L. It was also higher than the safe discharge limit of TOC in effluents, e.g., 30 mg/L. The COD>TOC indicated that the PW sample contained a substantial amount of chemically oxidizable organic and inorganic molecules. Oil and grease content can be found to attribute to the higher COD and TOC in PW, followed by suspended solids, organic acids, aromatic compounds, carbonyl compounds, anions, phenols, and metals [43].

3.3. Experimental Results

The experimental results of removal efficiencies for COD and TOC are presented in Table 2. A total of 13 batch experiments were conducted, and 26 data points were obtained. The results were used for the modeling of ANN, ANFIS, and RSM models.

3.4. Modelling and Training of ANN

The neural network tool (nntool) was used in MATLAB R2021a for training of the ANN model. Among 26 data points collected from batch experiments, 18 points were selected for the training purpose and the remaining points were used for the testing and validation of the model.

12 no. of neurons, LMBP algorithm with trainlm training function, and tan sigmoid (tansig) transfer function were found most suitable to fit the experimental data. The no. of neurons and algorithm were selected based on the best performance measured as minimum MSE and highest regression analysis coefficient () as shown in Table 3.

After the selection of ANN architecture parameters, the model was applied for experimental data prediction. The trained model had a correlation coefficient of 0.985 with the experimental data as shown in Figure 4. The MSE value was 0.0001 which showed that the model had a minimum error and was significant. For the validation of the model, the remaining 15% points were tested and removal efficiency was found out, which had an -value of 0.999. It showed that the model was well trained and could be used effectively for the prediction of COD and TOC adsorption on biochar. The model was further applied for the 15% data set for the prediction of COD and TOC adsorption, and an -value of 1 was obtained for the predicted data. The overall efficiency of ANN model was 0.989 (Figure 4).

The weights and biases of the trained ANN model at 12 neurons and LMBP algorithm are given in Table 4. represents the weights from the input layer to hidden layer, represents the weights from hidden layer to the output layer, represents the biases added at hidden layer, and represents the biases added at the output layer of ANN model.

3.5. Modelling and Training of ANFIS

Sugeno-type subclustering FIS was generated for three inputs (26 data points) and two outputs (COD and TOC removal efficiency). 70% data was used for the training of the model. Membership functions were taken as 13 in numbers for each input variable and guassmf type. The range of influence was tested from 0 to 1 value. A minimum error was obtained at the value of 0.00001. Whereas, squash factor, accept ratio, and rejection ratio were 1.25, 0.5, and 0.15, respectively. The backpropagation method was taken as the optimization method due to the minimum RMSE of training data as compared to the backpropagation method. The optimized schematic diagram of ANFIS generated is shown in Figure 5.

A total of 1000 no. of epochs were taken, and the model was trained several times for each output. The ANFIS training parameters were as follows: (i) ; (ii) ; (iii) ; (iv) ; (v) number of training data pairs: 13; (vi) number of checking data pairs: 6; and (vii) . The model was well trained after 10000 epochs for COD and 5000 epochs for TOC output. The minimum MSEs obtained for COD and TOC are given in Table 5. The model was tested and checked for the remaining 30% of experimental data.

Minimum MSE was obtained for both COD and TOC removal efficiencies after repeated training (Figure 6). It showed that model was well trained and could be used for prediction or optimization of adsorption data. The performance of the model was better in understanding the behavior of TOC removal as compared to COD removal. The reason can be low variance in TOC data as compared to COD.

3.6. Modelling of RSM Using BBD and Statistical Analysis

In the BBD design, three variables (pH, dosage, and contact time) were given as inputs. COD and TOC removal efficiencies were given as a response for analyzing the experimental data in design expert software. The generated runs and their experimental outputs are given in Table 2. The results of analysis of variance (ANOVA) are given in Table 6. It predicts the reliability of the applied design and correlation between various variables and their significance. A value shows the significance of the results if it is less than 0.05. A higher value shows that the data is insignificant to predict the behavior of variables. It can be seen in Table 6 that the overall model was significant for the removal of COD and TOC using biochar. The model -values of 10.87 and 44.12 for COD and TOC removal efficiencies, respectively, implied that the model was significant, and there were only 3.74% and 0.50% chances that an -value this large could occur due to noise. Adequate precision measures the signal to noise ratio. A ratio greater than 4 is desirable. Here, the ratio of 11.51 and 25.046 indicated an adequate signal and indicated that the model could be used to navigate the design space. The terms A, B, C, AB, AC, BC, and A2 were significant model terms. The results of COD and TOC were fitted by a quadratic equation given in Equations (7) and (8), respectively:

In terms of coded factors, Equations (7) and (8) can be used to predict responses for various ranges of each factor.

The three-dimensional surface plots of variables and their interaction are shown in Figure 7. Figure 7(a) shows that higher removal of COD can be achieved at higher values of dosages and pH within the selected range of parameters. Whereas for TOC adsorption, the removal efficiency decreased after pH 7 (Figure 7(d)). A similar trend has been observed in Figures 7(b) and 7(e) that higher contact times and higher pH was suitable to achieve the maximum removal of COD whereas TOC removal was maximum at middle points of the data range. The interaction plots of dosage and contact time (Figures 7(c) and 7(f)) suggested that higher dosage and contact time were suitable for the maximum removal of COD and TOC onto TWBC.

The correlation between COD and TOC removal efficiencies predicted and real values using RSM was quite strong. The values of the COD and TOC correlation plots were 0.999 and 0.999, respectively. Figures 8(a) and 8(b) represent the correlation plots of predicted and actual data whereas normal plots of residuals are represented in Figures 8(c) and 8(d). It showed that the model could be used satisfactorily for the prediction and optimization of the actual data set.

3.7. Optimization of Adsorption Process Using Trained ANN, ANFIS, and RSM

For optimizing process parameters, the GA approach was combined with the ANN model to maximize COD and TOC removal efficiency. The optimum conditions for the COD and TOC removal process were as follows: 6.5 pH, 298.5 mg/L dosage of biochar, and 60 min contact time. The relationship between removal efficiency and iteration showed that the removal efficiency achieved the maximal value after 121 iterations and remained constant. The COD and TOC removal performance obtained under optimum conditions was 89.80% and 98.9%. The values were confirmed in the lab and obtained as and .

For the prediction of adsorption data through ANFIS, surface plots were generated. Optimized value was obtained at pH value of 7, the dosage of 300 mg/L, and contact time 60 mins. The removal achieved at the optimized parameters was 88.9% and 98.8% for COD and TOC, respectively. The experimental value for the found variables was and . It shows that the model well predicted the optimized value.

Optimal conditions using RSM were found after the model was completely analyzed. Optimized values were obtained at pH 6.5, dosage 300 mg/L, and contact time 60 min, with COD and TOC elimination of maximum as 89.859% and 98.390%, respectively. The viability of the model and the existence of ideal conditions were confirmed by a strong agreement between the experimental COD () and the predicted COD (89.859%) performance. The model predicted value was also confirmed for TOC removal efficiency as (experimental) and 98.390% (predicted) values.

The RSM-GA optimization was performed using Equations (7) and (8) as an objective function in GA using MATLAB. GA quickly trained and found the optimum values as pH of 6.6, TWBC dosage as 300 mg/L, and contact time of 60 min with removal efficiencies of COD and TOC as 89.86% and 97.2%, respectively.

3.8. Comparison of ANN, ANFIS, and RSM for Prediction of COD and TOC Adsorption Data

All three models applied for the adsorption data were well trained for COD and TOC removal efficiencies using pH, the dosage of TWBC, and contact time as input variables and COD and TOC as output variables. All models well fitted the adsorption data and were further applied for the prediction of experimental data. It was observed that the model’s predicted values were near to the experimental data (Table 7). Further performance of the models was analyzed using Equations (4)–(6) for error analysis of predicted data. The analysis is given in Table 7. Analysis showed that RSM, ANN, and ANFIS had error values of 2.301, 1.2249, and 0.49157 for SSE and 5.29809, 1.49937, and 0.24164 for MSE, respectively, for the adsorption of COD onto biochar. For prediction of TOC adsorption using three models, the error values were as follows: 0.34243, 0.32001, and 0.29576 for SSE and 0.11726, 0.10241, and 0.08747 for MSE. The run time of ANFIS was only 100 seconds for 100 epochs whereas ANN took 120 seconds for 100 epochs. ANFIS proved to be a highly efficient tool in MATLAB for the modeling and prediction and optimization of adsorption data. The error analysis and coefficient of determination of three models determined that ANFIS>ANN>RSM in performance for the prediction of COD and TOC adsorption on the biochar. Whereas for the optimization of adsorption data, ANN and ANFIS performed better as there were no specific limits for the input and output variables like RSM. Also, for both AI methods, no specific design of experiments was needed. It helped the models to analyze the correlation between inputs and outputs in a broader range. Enhanced efficiency of RSM may be obtained using larger data points. However, AI methods are innovative and include a variety of parameters to understand the nonlinear adsorption data.

4. Conclusions

To obtain the optimized results for COD and TOC adsorption using ANFIS, surface plots were generated. The BC was used in this study to model and optimize the adsorption process using computational techniques. COD and TOC removal efficiencies were taken as the representation of reduction in organic pollutants in the wastewater. Batch tests were performed using pH, dosage, and contact time as input variables. The experimental results were modeled and optimized using RSM, ANN, and ANFIS models. BBD was used for the RSM model, and ANOVA was used to predict the model significance. ANN model was modeled using 3 layered, feed-forward Levenberg-Marquardt backpropagation (LMBP) algorithm and 12 no. of neurons. ANFIS was generated of Sugeno type using subclustering FIS type. The experimental data was successfully optimized using the three models. For optimization of adsorption data, ANN and RSM models were hybridized with GA. Optimized values were well matched with the experimental results. ANFIS showed minimum run time and highest performance as compared to other models. Error analysis and coefficient of determination of three models determine the ANFIS>ANN>RSM in performance for the prediction of COD and TOC adsorption onto the biochar. However, AI methods predicted the optimized values at a broader range of input data which was not possible with RSM. No specific design of experiments was needed for AI methods and once trained can be used for prediction at any range of data. Hence, it can be stated that the AI methods can be used more effectively for the automation of the COD and TOC adsorption process for wastewater treatment.

Data Availability

All the required data are available in the manuscript itself.

Conflicts of Interest

The authors declare that there is no conflict of interest regarding the publication of this article.

Acknowledgments

The authors extend their appreciation to the Deputyship for Reseach & Innovation, Ministry of Education in Saudi Arabia for funding this research work through the project number IFPRC-031-612-2020 and King Abdulaziz University, DSR, Jeddah, Saudi Arabia.