Textile wastewater heavy metal removal using Luffa cylindrica activated carbon: an ANN and ANFIS predictive model evaluation

This study investigated the application of soft computing models [Artificial neural network (ANN) and Adaptive neuro-fuzzy inference system (ANFIS)] in removing heavy metals [chromium (VI), vanadium (V) and iron (II)] from textile wastewater using Luffacylindrica activated carbon (LAC). The effect of pH, contact time and adsorbent dosage on the adsorptive potential of the prepared LAC were determined using a batch mode experiment. Fourier Transform Infrared Spectroscopy and scanning electron micrograph assessed the potential of the adsorbent in this study. ANN and ANFIS were evaluated using the coefficient of determination (R2) and mean square error (MSE). The result showed that the models demonstrated significant predictive behavior with R2 (9.9999E−1), MSE (5.985E−14) for chromium(VI) removal, R2 (9.9999E−1), MSE (2.33856E−13) for iron(II) removal and R2 (9.9999E−1), MSE (7.22197E−12) for vanadium(V) removal for ANN, while ANFIS predicted R2 (0.76305), MSE (0.037105) for chromium(VI) removal, R2 (0.67652), MSE (0.846) for iron(II) removal, R2 (0.22673), MSE (0.65925) for vanadium(V) removal. Sensitivity analysis carried out with ANFIS (exhaustive search) indicated that the parameters (time, pH and adsorbent dosage) significantly impact the heavy metal removal. Thus, this study shows that ANN and ANFIS are reliable tools for modelling heavy metal removal using LAC. The parameter results obtained are relevant in process design and control.


Introduction
Over the years, the increase in industrialization has adversely affected the environment. For example, excessive heavy metal levels get discharged into the atmosphere by releasing effluents from industries, leading to underground and open water bodies (Nwosu-obieogu et al. , 2020a. Toxic metals such as vanadium (V), chromium (Cr) depict as extremely dangerous even at trace levels on human health, animal, and plants. Furthermore, heavy metals pose a significant threat attributed to their capability of accumulating in human systems and their non-biodegradability; hence, developing activated carbon from agro-wastes for wastewater adsorption has proven to be an attractive and reliable method due to high efficiency, more economical, easy handling, cost-effectiveness and availability of biomass (Gebriesadik et al. 2017;Mojiri et al. 2017).
Luffa cylindrica belongs to the family Curcurbitaceae, grown across Asia, Latin America, Africa, an inedible plant, and cellulosic, hence a good choice for the adsorbent. (Saueprasea et al. 2010;Demir et al.2008).
Several researchers have reported adsorption using LAC to be effective in heavy metals removal from industrial effluents; thus, the removal of Pb 2+ in water, removal of divalent metals, methylene blue dye, cyanide ions, cadmium ions, common laboratory dye and adsorption of brilliant green from aqueous solutions have been reported by Adewuyi and Pereira (2017), Oboh et al. (2011), Demir et al. (2008), Arana et al. (2017), Lindino et al. (2014), Calciedo et al.  (2018) and Segun et al. (2014). Furthermore, Nwosu-obieogu et al. (2021) reported iron (II) adsorption from textile wastewater using LAC. Therefore, applying modelling in the adsorption process will enhance the relationship between parameters and responses, also, it can evaluate and forecast system behaviours (Oke et al. 2021).
Electro-Fenton technique, an advanced oxidation process, was applied in the removal of dimethyl phthalate from landfills leachate and the removal of 2,4-Dichlorophenoxyacetic acid (2,4-DPAA) from agricultural wastewater; response surface methodology (RSM) was employed to model and optimize the developed process for landfill leachate, the removal efficiency of 99.1% was obtained with optimal values of 4 mg/l of initial dimethyl phthalate concentration, 50 mM, Na 2 SO 4 , 600uL/l H 2 O 2 , 8 min electrolytic time, solution pH 3 and 6 mA cm −2 current density for the process variables. In another study, the removal rate of 99.2% was achieved at a solution pH of 3, the initial 2,4-DPAA concentration of 2.6 mg/l, H 2 O 2 dosage of 470 μL/l, current density of 3.5 mA cm −2 and reaction time of 7.5 min for agricultural wastewater (Dolatabadi et al. 2021a(Dolatabadi et al. , 2021b. Dolatabadi et al. 2021c et al. successfully removed acetamiprid from groundwater samples using pistachio shell-based modified activated carbon, the maximum removal efficiency of 98.6% was obtained at the optimal condition of the ATP concentration of 10 mg/l, solution pH of 6.5, the contact time of 23 min, and adsorbent dosage of 300 mg/l. The use of soft computing techniques such as ANN and ANFIS is applied in modelling the relationship between the dependent and independent variables (Nwosu-Obieogu et al. 2020b;Ojediran et al.2020). ANN is a modelling approach based on the brain's neural structure; they are generally used to model and optimize a complex process. (Onoji et al. 2017;Sirohi et al. 2020;Rivera et al. 2010). Thus, it analyses complex variables to form deterministic equations (Kose 2008).
ANFIS combines ANN and fuzzy logic to predict the behaviour of variables, improve error tolerance, adaptiveness and speed of the process (Roy et al. 2019;Uzuner and Cekmecelloglu 2016;Nwosu-Obieogu et al. 2020b;Oke et al. 2020). Nevertheless, the determination of the optimum size of the model and the permanence in local minima has been the significant disadvantage of the ANN and ANFIS approach (Mehrabpour et al.2018;Onu et al.2021;Yaqub et al. 2020). Previous researchers have investigated the use of ANN and ANFIS in predicting the adsorption process: Dolatabadi et al. (2020) successfully indicated the removal efficiency of tetracycline from an aqueous solution using ANN and ANFIS. Souza et al. (2018) compared ANN and ANFIS in modelling nickel adsorption using agrowastes, and the models predicted the process efficiently. Nasir et al. 2017 modelled cadmium(II) biosorption using rice straw using ANN and ANFIS, and the models had an outstanding performance in predicting the removal efficiency.
Nevertheless, the literature has not reported soft computing prediction or a comparative study of ANN and ANFIS models for predicting heavy metal removal using LAC. Luffa cylindrica was chosen for the activated carbon preparation because it is an underutilized material that constitutes a menace to the environment; hence this work will add value to LAC; also, there has been sparse reports on the removal of vanadium(V) from textile wastewater. Therefore, this work bridges the existing gap in the literature by applying ANN and ANFIS in predicting chromium (VI), vanadium (V) and iron (II) removal from textile wastewater using LAC.

Preparation of activated carbon
Luffa sponge was obtained from nearby bushes, washed with distilled water to remove the dust particles, sun-dried and further oven-dried at 100 °C for 24 h. After that, grounded and impregnated with sodium hydroxide solution (60%) and stirred vigorously using a magnetic stirrer at room temperature for 4 h. The mixture was filtered and oven-dried at 110 °C for 24 h. The dried sample was carbonized in a furnace for 4 h at 700 °C in the presence of nitrogen gas flowing at a heating rate of 10 °C/min. The activated carbon developed was screened to 100 µm micrometres, washed by pouring distilled water on the LAC until the pH of the filtrate reached 7. The activated carbon was dried in an oven at 110 °C for 4 h and cooled to room temperature.

Adsorbent characterization
For functional group determination, LAC was characterized using FTIR (PerkinElmer Spectrum one v3.02 FT-IR Spectrometer, India). The surface morphology was determined using scanning electron microscope SEM (HITACHI S-5500, Japan).

Batch adsorption studies
0.2 g of LAC was poured into 100 ml of the effluent in 250 cm 3 Erlenmeyer flask, agitated at 100 rpm using a mechanical shaker for 10 min to attain equilibrium, then 10 ml of the solution was further centrifuged for 5 min at 4500 rpm; the filtrate was analysed to determine the concentrations of heavy metal using an Atomic Absorption Spectrophotometer (MODEL: AA-700).

ANN model development
Artificial neural network (ANN) modelling of the adsorption process was developed using the neural fitting toolbox of Page 3 of 11 52 MATLAB R2014b (Mathworks Inc., Natick, MA, USA) as shown in Fig. 1. The architecture consists of an input layer (pH, time and adsorbent's dosage), an output layer (percentage removal efficiency) and a hidden layer. The data set obtained from the adsorption process was divided into (training, validation and testing) with 70%, 15% and 15%. To determine the best algorithm for the prediction, MSE and R 2 were used as the statistical criteria to assess the algorithm's performance (Uzuner and Cekmecelloglu 2016;Masoudi et al. 2018;Nwosu-Obieogu et al. 2020b).

ANFIS model development
A multi-input single-output (MISO) fuzzy model was developed for percentage removal efficiency prediction for adsorption of heavy metal from textile wastewater using LAC by considering three input variables (pH, time and adsorbent's dosage) and one output variable (percentage removal efficiency). The model's architecture is given in Fig. 2, which comprises five layers: fuzzification, product, rule, defuzzification and output summation layers using the Takagi

Performance evaluation of the developed models
The assessment of the model for the adsorption process prediction was determined using the statistical parameters presented as follows: d p and o p represent the desired and calculated outputs, respectively. The closeness of the MSE value to zero and the R 2 value to one depicts the models' efficiency (Oke et al. 2018;Li et al. 2013).

FTIR analysis
FT-IR spectrum of the LAC (before adsorption) in Fig. 3 shows that the broad peak at 3652.8 cm −1 is ascribed to the O−H group's stretching due to hydrogen bonding of alcohols or phenols. The peak at 1994.1 cm −1 is assigned to carbonyl stretching of the aldehydes. The peak at 2896.1 cm −1 was attributed to CH bond vibration stretching. The peaks at 1215.1 cm −1 are associated with the C=C stretching, which occurred due to aromatic bands. The intense peak at 879.7 cm −1 is attributed to the C−O stretching of alcohol, the band at 674.6 cm −1 indicates the C-I aromatic ring formation, the FT-IR spectrum suggests that the surface functional groups containing O 2 , which include the carboxyl groups and hydroxyl groups, influences the adsorption characteristics of LAC; the FT-IR spectra of the adsorbent after adsorption are presented in Fig. 4, the adsorption of the heavy metal ions caused the intensity of the broad bands at 2985 cm −1 for CH bond vibration stretching, 1379.1 cm −1 for C=C stretching and 1006.4 cm −1 for C−O stretching of alcohol to increase, this proves that the heavy metal ions bonded with oxygen-containing functionalities on the adsorbent surface of LAC (Eletta et al.2019;Ullah et al. 2020).
A similar result was also reported for adsorption of lead(II) from aqueous solution using Africa elemi seed, mucuna shell and oyster shell as adsorbents ) and

SEM analysis
The SEM image of LAC before adsorption in Fig. 5 shows that LAC's surface is relatively smooth with a dense fibrous structure; the surface morphology results from the developed LAC. Figure 6 shows the SEM image of LAC after adsorption; it is evidenced that the formation of a layer results from the heavy metal ions adsorbed on the surface and occupying the cavities of LAC (Ullah et al. 2020). Similar surface morphologies were observed by  for adsorption of iron(II) from textile wastewater by LAC.

ANFIS exhaustive search results
The (ANFIS) exhaustive search function in Matlab used root mean square error (RMSE) as the parameter for assessing the effect of single and interaction effects on the output.
(Nwosu-Obieogu et al. 2020). The value of RMSE close to zero ascertains the degree of predictability and reliability of the model . Tables 1, 2, 3, 4, 5, and 6 show the impact of one and combined input variables in the minimal training error. Table 1 shows that time had the most significant effect with an RMSE of 0.0491 for chromium (VI) removal; in contrast, an interaction effect between time and mass had the most impact on removing chromium (VI) from textile wastewater with an RMSE of 0.0470, as shown in Table 2. For Table 3, the mass is the most effective as a single variable for iron(II) removal with an RMSE of 1.3132.  In contrast, a combined variable of time and mass had the most effect with the least RMSE of 1.2981 on iron (II) removal from textile wastewater in Table 4. On the other hand, time impacted vanadium (V) removal in Table 5 with an RMSE of 1.0271. At the same time, the best input combination for vanadium (V) removal from textile wastewater in Table 6 is a combination of pH and mass with an RMSE of 1.0038 these results confirm that the parameters (time, pH and mass) have a significant impact on the removal of heavy metals (chromium (VI), vanadium (V) and iron (II)) from textile wastewater using LAC. This observation is similar and followed the claim of previous investigations from Oke et al. (2020) and Nwosu-obieogu et al. (2021).

ANN simulation results
The ANN-based model was developed based on the feed-forward, back-propagation (BP) algorithms to predict the removal efficiency of chromium(VI), iron(II) and vanadium(V) ions from textile wastewater using three inputs: time, pH and adsorbent's dosage. One hundred and eighty-one data sets used for ANN modelling were divided randomly into three sets (training the network, validation of the results and testing the network) with a ratio of 70%, 15% and 15%. The hidden layer comprises ten neurons; As shown in Tables 7, 8 and 9, the Bayesian regularization was the best of the algorithms, having the smallest MSE of 5.9857E−14, 2.33856E−13 and 7.22197E−12 for chromium (VI), iron (II) and vanadium(V), respectively. The variation of the MSE with the number of training cycles (epochs) was presented in Fig. 7, 8 and 9 below the minimal MSE shown in Tables 7, 8, and 9 were obtained at epoch 13 for chromium (VI), 684 for iron (II) and 156 for vanadium (V), after the maximum cycles were attained, the training process was stopped (Razmi-Rad et al. 2007;Uzuner and Cekmecelloglu 2016;Oke et al. 2020

ANFIS simulation results
One hundred and eighty-one data set were used for ANFIS modelling, best ANFIS prediction for heavy metal adsorption using LAC was simulated at various input and output membership functions (mf). The correlation coefficient (R 2 ) and the mean square error (MSE) were used to validate the model's predictiveness. Tables 10, 11 and 12 summarize the ANFIS results of different input   Table 11, gaussmf gave a prediction of R 2 (0.67652) and MSE(0.846) for iron(II) removal as shown in Table 12, while an R 2 (0.22673) and MSE(0.65925) was obtained at trimf and gaussmf, respectively, for vanadium(V) removal in Table 12; hence, the best prediction was obtained at chromium(VI) removal, this shows that the ANFIS model is capable of predicting adsorption capacity of chromium(VI) with high precision (Souza et al., 2018). The results in Tables 11, 12 and 13 are validated in Figs. 10, 11, and 12. The obtained result is similar to previous research of Ojediran et al. (2020), Oke et al. (2020) and Nwosu-Obieogu et al. (2020b). and ANFIS (0.037105) were less than one. These results showed the capability of the models in predicting heavy metal removal from textile wastewater. Moreover, they provided an excellent measurement scale to assess the goodness of the adjustment and ascertain the efficacy of progressive approaches. However, the R 2 of ANN is higher than ANFIS; also the MSE of ANN is lower than ANFIS; demonstrating that ANN estimated the process better than ANFIS; this is similar to the studies of Nwosu-Obieogu et al. (2020b), Oke et al. (2020) and Uzuner and Cekmecelloglu (2016).

Conclusion
A batch experimental study was used to investigate the effect of three parameters, time, pH and adsorbent's dosage, on the adsorption of chromium (VI), vanadium (V) and iron (II) using LAC as adsorbent. A proposed ANN and ANFIS model predicted the removal of heavy metals successfully. The properties of LAC before and after adsorption were studied by various techniques such as FTIR and SEM. The FT-IR confirmed the functional groups, while the SEM presented the surface morphology of the LAC. ANFIS (sensitivity analysis) showed that the process parameters (time, pH and mass) significantly affect removing the heavy metals. From the results, the ANFIS and ANN models relatively predicted Cr(VI), Fe(II) and Vanadium(V) removal with Bayesian regularization BP that gave MSE of (5.9857E−14), (2.33856E−13) and (7.22197E−12) for ANN, psigmf showed MSE of (0.037105), gaussmf (0.67652) and trimf (0.22673), respectively, for ANFIS. This study proved that LAC is a low-cost alternative material for removing heavy metals from textile wastewater. Hence, it is evidenced that ANN and ANFIS are promising predicting technique that can be used effectively to predict heavy metal removal from textile wastewater using LAC.
Authors' contribution Conceptualization and design of this study was carried out by KN-O, material preparation, data collection and analysis was done by GWD, and Precious Ehimogue, writing, review and editing of the manuscript was carried out by KN-O, UC and CL.
Funding The author(s) received no specific funding for this work.

Availability of data and material None.
Code availability None.

Conflict of interest
The author declares that they have no conflict of interest statement.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.