Artificial intelligence has emerged as a powerful tool for solving real-world problems in various fields. This study investigates the simulation and prediction of nitrate adsorption from an aqueous solution using modified hydrochar prepared from sugarcane bagasse using an artificial neural network (ANN), support vector machine (SVR), and gene expression programming (GEP). Different parameters, such as the solution pH, adsorbent dosage, contact time, and initial nitrate concentration, were introduced to the models as input variables, and adsorption capacity was the predicted variable. The comparison of artificial intelligence models demonstrated that an ANN with a lower root mean square error (0.001) and higher R2 (0.99) value can predict nitrate adsorption onto modified hydrochar of sugarcane bagasse better than other models. In addition, the contact time and initial nitrate concentration revealed a higher correlation between input variables with the adsorption capacity.

  • The use of adsorption to remove nitrate from contaminated water is highly efficient.

  • Hydrochar is one of the environmentally friendly adsorbents.

  • Artificial intelligence tools were highly capable of predicting nitrate adsorption.

  • Among soft computing techniques, artificial neural networks had higher efficiency.

Graphical Abstract

Graphical Abstract
Graphical Abstract

Due to the ongoing growth of the global population and agricultural activities, the consumption of fertilizers that include nitrogen has significantly expanded in recent years (Moradzadeh et al. 2014; Nguyen et al. 2021b). However, excessive fertilizer use is associated with the increased of the nitrate concentrations in the water bodies, causing serious environmental problems (Valiente et al. 2020). The negatively charged nitrate ions cannot bind with soil particles and are released from agricultural land drainage into main water supplies (Hafshejani et al. 2016a; Goeller et al. 2019). The increased nitrate concentration causes eutrophication and adverse health effects on pregnant women and infants (Long et al. 2019). Therefore, nitrate must be removed from agricultural runoff before entering natural water bodies.

The removal of nitrate has been studied using several techniques including chemical denitrification, biological denitrification, ion exchange, reverse osmosis, and adsorption (Bhatnagar & Sillanpää 2011). Adsorption is one of them and has been strongly advised as a remediation technique that employs affordable technology and has great decontamination qualities (Divband Hafshejani & Naseri 2020; Salam et al. 2020). Such variables such as initial solution pH, adsorbent amount, adsorbate concentration, contact time and presence of competing ions. Significantly affect adsorption capacity and removal efficiency. Therefore, mathematical and experimental models are required to interpret the interactive effects of these variables and predict adsorption performance. Conventional process optimization and data collection can be time-consuming and costly. In this regard, adsorption performance may be enhanced by utilizing advanced tools like artificial intelligence, which has a great capacity for solving complex issues.

One of the artificial intelligence models is the artificial neural networks (ANN) that is inspired by the structure of the human brain. Each ANN consists of three types of layers: input, hidden, and output layers. The number of neurons in the input layer is equal to the number of input variables, and the number of neurons in the output layer is equal to the number of output variables (Zhu et al. 2019). The input and output layers act as independent and dependent variables, respectively. In adsorption studies, the input and output layers are the independent variables and adsorption capacity, respectively. The hidden layers are the main part of neural network processing, which can include several different layers and neurons. The number of nodes, the number of hidden neurons, and subsequently the best network structure with the lowest deviations is achieved based on the trial and error method (Ding et al. 2021; Wei et al. 2021).

A support vector machine (SVM) is a common forecasting technique in data mining. This method discovers the patterns in the data and makes predictions using those patterns. The support vector machine makes its predictions using linear and non-linear combinations on a set of training data called support vectors. The construction process consists of two steps training and testing. In the training stage, the model learns the relationships between the data set and it can then estimate new data from the detected pattern. Gene expression programming (GEP) is also one of the soft computing techniques and a branch of evolutionary algorithms based on Darwin's theory of evolution. This algorithm has a high ability in modeling non-linear and dynamic processes (Amar et al. 2022). Artificial intelligence models are trained to perform using existing laboratory data. When the difference between laboratory and computational values by the model is acceptable, the learning process is achieved (Ding et al. 2021; Maurya et al. 2022). Research has shown that artificial intelligence models successfully predict the ability of different adsorbents to remove contaminants from water sources. Zhu et al. (2019), used artificial intelligence models (artificial neural network (ANN) and random forest (RF)) to simulate the adsorption of zinc, lead, cadmium, nickel, arsenic, and copper on 44 types of biochar. The models used to predict the adsorption capacity were trained and optimized according to the characteristics of biochar, temperature, pH and initial concentration of pollutants. The results showed that the random forest model (R2 = 0.973) is more accurate for predicting absorption performance than the artificial neural network model (R2 = 0.948). The researchers believed that the use of artificial intelligence models in predicting the ability of adsorbents can significantly reduce the workload of testing. Wang et al. (2021), predicted the ability of graphitic-C3N4 to absorb lead, cadmium, and mercury using artificial intelligence models (deep neural network and transfer learning). The results showed that these models are well able to evaluate the adsorbent's ability to remove the studied heavy metals well with only one-tenth of the experimental data (Mahmoud et al. 2019). Adsorption of phosphate on nanoscale zero-valent iron was simulated using artificial neural network models. The results showed that the artificial neural network with the structure of 5-7-1 predicted phosphate removal well (R2: 97.6%). The results of sensitivity analysis showed that among the five input variables to the model (phosphate concentration, adsorbent dose, stirring rate, initial pH reaction time), pH was the most influential input. Ullah et al. (2020a), predicted that the adsorption of lead ion on rice husk using artificial intelligence modeling (feed forward back-propagation neural network (FFBPNN) and Levenberg–Marquardt (L–M) training algorithm). The results showed that the artificial neural network model used has high reliability in predicting the absorption capacity of rice husk for lead removal. Ullah et al. (2020b), developed artificial intelligence models to predict the Zn (II) absorption of biochar derived from rambutan (Nephelium lappaceum) peel. The results showed that all models had high efficiency, but the ANFIS model had the best performance with an accuracy of 90.24% compared to the ANN (88.27%) and MLR (59.14%) models. Chakraborty & Das (2020), established an ANN model to predict the adsorption efficiency of chromium (VI) on nanocomposite sawdust biochar. The ANN model helped them to develop the appropriate adsorption mechanism and the best possible equation for adsorption of chromium (VI) by modified biochar. Nguyen et al. (2021a), showed that the GEP model can successfully describe the process of cesium adsorption by Prussian blue as a function of adsorbent particle size, pH, contact time, initial dye concentration, and temperature. This study looked into the ideal circumstances for removing nitrate from aqueous solutions. Then, with the purpose of minimizing expensive, time-consuming, dangerous, and laborious laboratory work, several models of soft computing techniques such as artificial neural network (ANN) and support vector machine (SVM), and gene expression programming (GEP) were applied for describing the relationship between the affecting factors on nitrate adsorption by hydrochar modified by magnesium chloride and adsorption capacity. As mentioned, various studies have shown the successful applications of artificial intelligence models for absorbing various pollutants, but the type of pollutants and adsorbents affects the efficiency of the mentioned models which needs to be discussed. In other words, according to the type and amount of speed input variables, the prediction accuracy of each of these methods is different, which should be evaluated and the most successful model should be selected according to the conditions of the problem.

Hydrochar production and characterization

The sugarcane bagasse (SB) was provided by a local farm in Khuzestan, Iran. To remove dust and other contaminants, the sample was washed multiple times using tap water, and then distilled water. The washed samples were dried at 80 °C before incorporation into the synthesis processes. Ten grams of sugarcane bagasse was mixed with deionized water (60 mL) in a stainless-steel autoclave (100 mL maximum capacity). The mixture was hydrothermally treated at a fixed temperature of 220 °C for 4 h to prepare the SB hydrochar. The autoclave was then cooled to room temperature. The hydrochar was collected and washed with deionized water until the pH was lowered to a constant value. The resulting hydrochar was dried in an oven for 24 h at 50 °C and the SB hydrochar was labeled HCSB (Silva et al. 2017; Bento et al. 2019).

The HCSB was modified using magnesium (Mg) by adding MgCl2 solution at an adjusted ratio of 1:1 (MgCl2: HCSB) for 24 h at room temperature. After separating the solid-liquid phase of the mixture, the solid product was washed with deionized water to remove excess chemicals. Finally, the MgCl2 modified hydrochar was dried in an oven for 24 h at 100 °C and the sample was labeled as Mg-HCSB (Qian et al. 2018). The carbon (C), hydrogen (H), nitrogen (N), and sulfur (S) concentrations of the samples (SB, HCSB, and Mg-HCSB) were determined using an elemental analyzer (Vario ELIII, Elementary, made in Germany). The oxygen (O) content was calculated using Equation (1):
(1)

The functional groups of samples were determined using Fourier transform infrared (FTIR) spectroscopy (Spectrum GX, and Perkin- Elmer) with 20 scans and a resolution of 4 in the spectral range of 400–4,000 (Zhang et al. 2019). Scanning electron microscopy (SEM) (Leo 1455 VP model, made in Germany) was applied to determine the surface morphology of the Mg-HCSB.

The pH (pzc) value of Mg-HCSB was determined using 100 mL Erlenmeyer flasks containing 50 mL of 0.01 M of sodium chloride, to which 0.1 g of Mg-HCSB was added. The initial pH (pHi) values were adjusted within the range of 2–11, by adding 0.1 M of hydrochloric acid or 0.1 M of sodium hydroxide. The flasks were agitated at an adjusted temperature of 22 °C ± 2 °C and an agitation speed of 200 rpm. After 24 h, the mixtures were filtered and the final pH values were gauged in the liquid phase. The point of zero charge (pH (pzc)) was estimated from a plotted graph with ΔpH (pHi − pHf) as the vertical axis and the initial pH values (pHi) as the horizontal axis. In the graph, the point of zero charge of the Mg-HCSB is which ΔpH = 0.

Nitrate adsorption studies

Batch experiments were conducted to study the nitrate adsorption from water by Mg-HCSB at room temperature (22 °C ± 2 °C). The effects of different pH values (2–11) on nitrate adsorption by Mg-HCSB were studied using an agitation speed of 200 rpm, an adsorbent dosage of 1 , and 24 h of contact time. Adsorption experiments were conducted with a contact time from 5 min to 24 h, an agitation speed of 200 rpm, a dosage of 1, and natural pH to find the equilibrium time for the nitrate adsorption process using Mg-HCSB. The adsorption experiments were conducted using an agitation speed of 200 rpm, a natural pH, and 24 h of contact time to evaluate the effect of adsorbent dosage (0.5–20) on the nitrate adsorption by Mg-HCSB. The ability of Mg-HCSB to adsorb the nitrate ions at different temperatures (20 and 40 °C) was evaluated by considering operating conditions at a natural pH, equilibrium time, a best adsorbent dosage, and an agitation speed of 200 rpm. After each set of experiments, the solid and liquid phases were separated. The residual nitrate concentration was analyzed in the liquid phase using ion chromatography (model 93 Compact IC Flex-Metrohm). The removal percentage (R%) of the nitrate ions from the water samples by Mg-HCSB and its uptake capacity (qe []) were calculated using Equations (2) and (3), respectively (Hafshejani et al. 2016b; Rahdar et al. 2021):
(2)
(3)
where Ce and C0 (), are the equilibrium and initial concentrations of nitrate respectively, m (g) is the mass of Mg-HCSB, and V (L) is the solution volume.

Artificial intelligence

This study used artificial intelligence methods to simulate the nitrate adsorption process using Mg-HCSB. The variables of initial solution pH, contact time, temperature, initial nitrate concentration, and adsorbent dosage were selected as input data and adsorption capacity was the output data (target parameter). Then the data were divided 70% training and 30% testing, and the training was performed with the experimental data. All data of variables (input and output) were normalized into the range of 0 and 1 using Equation (4):
(4)
where is normalized value of initial variable of xi, and xmin and xmax are minimum and maximum value of xi, respectively.
The correlation between pairwise inputs (variables), and between individual inputs and the target variable (adsorption capacity) were measured using the Pearson correlation coefficient (Equation (5)):
(5)
where is correlation coefficient between two variables (x and y), and are average of xi and yi, respectively.

Artificial neural network (ANN)

The ANN is a data-driven model of the artificial intelligence family that has attracted tremendous attention due to its capabilities in various fields. This model has been used to predict of the wastewater treatment processes in the last decade (Netto et al. 2021; Maurya et al. 2022).

In this study, ANN modeling was carried out to predict nitrate adsorption on Mg-HCSB by a multilayer perceptron (MLP) neural network, which is one of the best common neural networks (Karam et al. 2020). ANN model generation was done using the STATISTICA software package. The training algorithms in this research were BFGS (Broyden-Fletcher-Goldfarb-Shanno) type, which performs better than traditional algorithms due to their fast convergence rate and smarter search criteria. The initialization of the weights in the neural network training algorithm was done using the normal distribution method (the weights were initialized using normally distributed values, in a range where the mean is zero and the standard deviation is equal to one). After the structure of the algorithm in each step, using the error function, the performance of the algorithm was checked to measure the accuracy and precision of the predicted results compared to the experimental data. Continuous adjustment and change in the network structure, the number of layers, and hidden neurons were done until the lowest values of the error function were obtained in the construction of the optimal network. Since it is important to choose a type of activation function for the neurons of a neural network, activation functions for the output neuron are set to identity and for hidden neurons to tanh, which is one of the most ideal functions for hidden layers of multilayer perceptron models. The applied neural network consists of an input layer, an output layer, and a hidden layer (Figure 1(a)). The input layer contains five parameters of pH, contact time, initial concentration, temperature, and adsorbent dose (experimental data), the hidden layer contains eight neurons.
Figure 1

Schematic of the process of the models: artificial neural network (a), gene expression programming (b), support vector machine (c).

Figure 1

Schematic of the process of the models: artificial neural network (a), gene expression programming (b), support vector machine (c).

Close modal

Gene expression programming (GEP)

The GEP method combines algorithms and genetic programming where genes or chromosomes are encoded as linear strands of a constant length. In solving problems using GEP, the algorithm determines the main model variables, such as the gene length and population size. The primary chromosomes are identified randomly or by considering the input information of the problem. Chromosomes are evaluated using fitting functions. Evolution stops if the desired solution is reached or a certain number of generations are reached and the best solution is provided. If the stopping conditions are not found, elitism is selected, and the rest of the solutions are left to the selection process. This process is repeated for several generations and the population quality also relatively improves as the generation progresses (Hemmat-Sarapardeh et al. 2020). In the present study, GenXproTools 4.0 Advanced Edition software was used for the GEP model, and the main arithmetic function (addition-subtraction-multiplication-division-trigonometry and other mathematical functions) were applied to predict the adsorption capacity. The maximum number of generations for model training in this software was between 5,000 and 10,000, and the other parameters used in the GEP model are presented in Table 1. These parameters have been selected through trial and error to obtain the least amount of error is obtained between the actual results and the forecast. The schematic of the process of the GEP model is presented in Figure 1(b).

Table 1

Parameters of GEP model for prediction of nitrate adsorption onto Mg-HCSB

ParametersValue
Number of chromosomes 30 
Head size 
Number of genes 
Linking function 
Fitness function R2 
Function set + − * / 
ParametersValue
Number of chromosomes 30 
Head size 
Number of genes 
Linking function 
Fitness function R2 
Function set + − * / 

Support vector machine (SVR)

A support vector machine is one of the most common forecasting techniques in data mining. This model makes its predictions using linear and non-linear combinations on a set of training data called support vectors. The construction process consists of two stages of training and testing, which in the training stage learns the model and the relationships between the data. It can then estimate new data from the detected pattern. Unlike classical statistical methods, this method does not require special assumptions about the data. A very strong assumption in the support vector machine is that the data is linearly separable. Therefore, a dividing line is drawn using special algorithms. Then the two parallel borderlines become the official dividing line. These lines are equidistant from the dividing line enough to collide with the data. The data that collide with this line are called support vectors. For the production of the SVR model in this study, the software package STATISTICA was used. According to the shape of the error function, the SVM models are divided into four types, and in this study, Regression SVM Type 1, which is also known as epsilon-SVM regression, was used. Also, Radial Basis Function kernels were chosen for the SVM model because it has a finite response in the entire X-axis range. Also, it has worked well in times when there was no knowledge of data prediction. to obtain the final model of SVM, the combination of stop at error (accuracy) options and the number of iterations or accuracy (whichever is reached first) was used. Other parameters used in the SVM model are shown in Table 2. Also, the schematic of the SVM model showed in Figure 1(c).

Table 2

Parameters of SVM model for prediction of nitrate adsorption onto Mg-HCSB

ParametersValue
Regression SVM Type 1 
Capacity 10 
Epsilon 0.1 
Gamma 0.2 
Function set + − * / 
Number of support vectors 19 (11 bounded) 
ParametersValue
Regression SVM Type 1 
Capacity 10 
Epsilon 0.1 
Gamma 0.2 
Function set + − * / 
Number of support vectors 19 (11 bounded) 

Dataset preparation

The dataset is considered an important feature in determining the performance of soft computing techniques. Typically, large datasets lead to better classification performance, and small datasets may cause overfitting (Althnian et al. 2021). No one can say exactly how much data is needed for predictive modeling, and this is an intractable problem whose answer is to be discovered through empirical research. For example, the amount of data for machine learning depends on many factors such as the complexity of the problem and the complexity of the learning algorithm. One of the cited sources to determine the required amount of data is to refer to the results of similar studies. Studies tell us how much data is needed to use a particular technique. In many cases, the results of several studies can be averaged. In the research work by (Ullah et al. 2020a), a data set with 48 experimental data was used for modeling purposes by ANN to estimate the Pb (II) adsorption on rice husks. Ullah et al. (2020b), used the data set with 24 data to predict the adsorption of Zn (II) on rice husks digested with nitric acid by ANN. In this study, the characteristics of the experimental data used in the artificial intelligence models are shown in Table 3.

Table 3

The characteristics of the experimental data used in present study

SamplespHContact timeInitial concentrationAdsorbent dosageTemperatureAdsorption capacity
Minimum (Train) 0.01 20 
Maximum (Train) 11 1,440 100 0.5 40 62.04 
Mean (Train) 6.15 692.75 88.75 0.07 21.5 38.50 
Standard deviation (Train) 3.67 531.56 26.52 0.09 25.33 18.42 
Minimum (Test) 25 0.01 20 6.87 
Maximum (Test) 1,440 100 0.5 40 65.9 
Mean (Test) 516.88 78.13 0.08 26.25 34.44 
Standard deviation (Test) 437.62 31.47 0.12 29.57 18.87 
Minimum (Overall) 0.01 20 
Maximum (Overall) 11 1,440 100 0.5 40 65.9 
Mean (Overall) 6.11 642.50 85.71 0.07 22.86 37.34 
Standard deviation (Overall) 3.41 508.94 28.15 0.1 27.06 18.47 
SamplespHContact timeInitial concentrationAdsorbent dosageTemperatureAdsorption capacity
Minimum (Train) 0.01 20 
Maximum (Train) 11 1,440 100 0.5 40 62.04 
Mean (Train) 6.15 692.75 88.75 0.07 21.5 38.50 
Standard deviation (Train) 3.67 531.56 26.52 0.09 25.33 18.42 
Minimum (Test) 25 0.01 20 6.87 
Maximum (Test) 1,440 100 0.5 40 65.9 
Mean (Test) 516.88 78.13 0.08 26.25 34.44 
Standard deviation (Test) 437.62 31.47 0.12 29.57 18.87 
Minimum (Overall) 0.01 20 
Maximum (Overall) 11 1,440 100 0.5 40 65.9 
Mean (Overall) 6.11 642.50 85.71 0.07 22.86 37.34 
Standard deviation (Overall) 3.41 508.94 28.15 0.1 27.06 18.47 

Evaluation of models

The coefficient of determination (R2), (Equation (6)) and root mean square error (RMSE), (Equation (7)) were calculated to compare the model performance and validity:
(6)
(7)
where and are the ith experimental and predicted values, respectively. is the average of the experimental values, and n is the number of measurements.

Characteristics of the modified hydrochar

The elemental compositions of the samples are summarized in Table 4. The carbon content increased from 44.4% (in the SB) to 49.54% (in the HCSB) and 47.48% (in the Mg-HCSB). In the hydrochars, the H and O concentrations and atomic ratios of O/C and H/C are lower than those values detected in SB. These results might be attributed to the complex reaction network (dehydration, decarboxylation, and dehydrogenation) of the SB during hydrothermal carbonization (Qian et al. 2018; Zhang et al. 2020).

Table 4

Elemental contents and atomic ratio of sugarcane bagasse (SB), sugarcane bagasse hydrochar (HCSB) and engineered sugarcane bagasse hydrochar (Mg-HCSB)

SampleElemental contents
Atomic ratio
CHNSOO/CH/C
SB 44.40 5.98 0.95 0.24 44.44 0.751 1.606 
HCSB 49.54 5.78 1.13 0.47 38.88 0.589 1.390 
Mg-HCSB 49.25 5.99 0.92 0.19 39.05 0.595 1.449 
SampleElemental contents
Atomic ratio
CHNSOO/CH/C
SB 44.40 5.98 0.95 0.24 44.44 0.751 1.606 
HCSB 49.54 5.78 1.13 0.47 38.88 0.589 1.390 
Mg-HCSB 49.25 5.99 0.92 0.19 39.05 0.595 1.449 

The SEM analysis of the samples is displayed in Figure 2(a)–2(d). The surface of SB is almost smooth with small pores (Figure 2(a)). Following the transformation into hydrochar, longitudinal porous structures were observed, confirming the pyrolysis of SB at low temperatures (Figure 2(b)). Following the MgCl2 modification, previously detected impurities that blocked the main pores in the synthetic hydrochar were removed. The surface became clearer, with a porous honeycomb structure (Figure 2(c) and 2(d)). The porous structure increases the contact surface between the hydrochar and nitrate ions possibly increasing removal efficiency and adsorption capacity. The same results have been reported in previous literature (Viglašová et al. 2018; Penido et al. 2019).
Figure 2

SEM images of sugarcane bagasse (a), sugarcane bagasse hydrochar (b), engineered sugarcane bagasse hydrochar (Mg-HCSB) before nitrate adsorption (c), and engineered sugarcane bagasse hydrochar after nitrate adsorption (d).

Figure 2

SEM images of sugarcane bagasse (a), sugarcane bagasse hydrochar (b), engineered sugarcane bagasse hydrochar (Mg-HCSB) before nitrate adsorption (c), and engineered sugarcane bagasse hydrochar after nitrate adsorption (d).

Close modal
The hydrochar surface contains different functional groups that are vital role in nitrate adsorption. Figure 3 presents the FTIR spectra for the SB, as a precursor, and the modified Mg-HCSB before and after the nitrate adsorption experiments. In all the samples, the adsorption broad bands were detected around at 3,400 and allocated primarily to the O-H bonds in the hydroxyl groups of the cellulose (Son et al. 2018; Yan et al. 2018). The broad bands identified around 2,900 signified the C-H bonds in the alkane groups (Li et al. 2016; Yan et al. 2018). The bands observed within the range of 1,050–1,180 were allocated to C-O stretching, which is related to existing alcohols, esters, ethers, and phenols (Figure 3). The bands observable within the wave range of 1,550–1,600 correspond to the present aromatic C = C in ring carbon (Li et al. 2016; Son et al. 2018; Danso-Boateng et al. 2020). The FTIR spectrum of Mg-HCSB after the adsorption experiments confirmed the effective role of the C = C, C-O, O-H, and C-H groups in the uptake of nitrate ions (Figure 3). The X-ray fluorescence (XRF) chemical analyses of the hydrochar and the modified hydrochar are presented in Table 5. The results demonstrate an increase in MgO content equal to 1.28% and an increase in Cl content of 3.1%, confirming the successful modification of the hydrochar sample. Additionally, the adsorbent pH (PZC) value of Mg-HCSB was 5.59 in this study.
Table 5

XRF chemical analysis of sugarcane based on hydrochar and the Mg modified hydrochar

Oxides (W/W %)HCSBMg-HCSBOxides (W/W %)HCSBMg-HCSB
K20.264 0.071 SiO2 6.73 2.92 
Na20.260 — CaO 2.27 0.367 
TiO2 0.104 0.028 Al2O3 0.971 0.315 
P2O5 0.090 — Fe2O3 0.676 0.190 
CuO 0.021 — SO3 0.601 0.113 
ZnO 0.010 — Cl 0.490 3.01 
LOI* 87.11 92.29 MgO 0.425 1.28 
Total 100.02 100.58    
Oxides (W/W %)HCSBMg-HCSBOxides (W/W %)HCSBMg-HCSB
K20.264 0.071 SiO2 6.73 2.92 
Na20.260 — CaO 2.27 0.367 
TiO2 0.104 0.028 Al2O3 0.971 0.315 
P2O5 0.090 — Fe2O3 0.676 0.190 
CuO 0.021 — SO3 0.601 0.113 
ZnO 0.010 — Cl 0.490 3.01 
LOI* 87.11 92.29 MgO 0.425 1.28 
Total 100.02 100.58    
Figure 3

FTIR spectra of sugarcane bagasse and Mg-HCSB before and after nitrate adsorption.

Figure 3

FTIR spectra of sugarcane bagasse and Mg-HCSB before and after nitrate adsorption.

Close modal

Adsorption experiments

Figure 4(a) presents the results of the nitrate adsorption by SB, HCSB, and Mg-HCSB under identical conditions. As revealed in Figure 4(a), nitrate removal from the water was faster and more efficient using Mg-HCSB than SB and HCSB. The difference in nitrate adsorption capacity could be due to the adsorbents' physical structure and chemical properties. The adsorption capacity of Mg-HCSB was greater than the other studied adsorbents; thus, it was selected for further experiments. The effect of the solution pH on nitrate adsorption by Mg-HCSB was evaluated in the range of 2–11, while the contact time, adsorbent dosage, and nitrate concentration were kept constant at 24 h, 1 g L−1, and 100 mg L−1, respectively. The results are provided in Figure 4(b). The maximum (60.35 mg g−1) and minimum (35.78 mg g−1) adsorption capacity values of Mg-HCSB were observed at an initial pH of 2 and 9, respectively, reflecting effective uptake affinities in acidic environments. This finding can be explained by the adsorbent pHPZC value of 5.59 in this study. At a lower pH, the Mg-HCSB surface consists of a positive charge. Conversely, the Mg-HCSB surface is negatively charged during experiments at a higher pH value. Therefore, a decrease in adsorption capacity at a basic pH could be related to the repulsive force between the negatively charged adsorbent surface and negatively charged nitrate ions. Another reason might be the competition between nitrate ions and hydroxyl ions to occupy the same active sites on Mg-HCSB (Viglašová et al. 2018; Alsewaileh et al. 2019). The nitrate adsorption capacity of Mg-HCSB at different time intervals was investigated to determine the equilibration time. Figure 4(c) indicates that Mg-HCSB rapidly removed nitrate from the water rapidly within the first 20 min. Then, the adsorption rate gradually decreased until 480 min. Afterward, the nitrate adsorption reached equilibrium. According to the previous literature, the saturation of Mg-HCSB active sites by nitrate ions occurs until all vacant sites are fully occupied (equilibration stage) (Ghadikolaei et al. 2019; Karthikeyan & Meenakshi 2020; Karthikeyan et al. 2020). In addition, nitrate removal could be due to the exchange of nitrate ions with OH ions on the Mg-HCSB surface. An equilibrium time of 480 min was noted, and the equilibrium uptake capacity at this time was 58.6 mg g−1.
Figure 4

Effect of type of adsorbent (a), effect of initial pH (b), effect of contact time (c), effect of adsorbent dosage on nitrate adsorption by Mg-HCSB (d).

Figure 4

Effect of type of adsorbent (a), effect of initial pH (b), effect of contact time (c), effect of adsorbent dosage on nitrate adsorption by Mg-HCSB (d).

Close modal

Figure 4(d) presents the changes in nitrate decontamination percentages due to varying the adsorbent Mg-HCSB dosage. As demonstrated in Figure 4(d), increasing the Mg-HCSB dosage from 0.2 to 10 g L−1 resulted in a noticeable increase in nitrate removal efficiency (from 13.18% to 76.51%). The improved removal percentages might be related to increased sites in Mg-HCSB and the total surface area associated with higher dosages (He et al. 2020). Conversely, the adsorption capacity declined with higher Mg-HCSB dosages, achieving the lowest rate at 10 g L−1. Based on these results, an optimum adsorbent dosage was 1 g L−1 (Mg-HCSB), balancing the adsorption capacity and efficiency. As a function of temperature, nitrate adsorption by Mg-HCSB noticeably decreased as temperature increased. For the studied concentration of 100 mg L−1, increasing the temperature from 20 °C to 40 °C decreased the nitrate removal percentage from 56.48% to 43.20%. This outcome indicates exothermic properties in nitrate uptake by Mg-HCSB, in agreement with the results reported in previous literature (Katal et al. 2012; Wu et al. 2016).

Comparison of the artificial intelligence models

In this study, the correlations between pairwise input variables and between individual input variables and the target variable are given in Figure 5. As illustrated in Figure 5, the adsorption capacity was positively correlated with the contact time and the initial and equilibrium concentration and negatively correlated with the pH, adsorbent dosage, and temperature. The negative correlation between temperature and adsorption capacity, indicates the exothermic nature of the nitrate adsorption process by Mg-HCSB. The findings agree with the results reported by other researchers (Katal et al. 2012; Wu et al. 2016).
Figure 5

Pearson correlation matrix between pairwise inputs, and between individual inputs and the output (adsorption capacity).

Figure 5

Pearson correlation matrix between pairwise inputs, and between individual inputs and the output (adsorption capacity).

Close modal

The negative correlation between adsorption capacity and the Mg-HCSB dosage could be related to unsaturated sites, which are more available at higher adsorbent doses. Increasing the adsorbent dosage provides more adsorption sites, whereas the nitrate concentration is constant. Therefore, the adsorption proportion for each gram of adsorbent is decreased at a higher Mg-HCSB dosage. In addition, a decrease in adsorption capacity might be due to an overlap of adsorption sites that increase the diffusion path length and consequently decrease the adsorption capacity. The negative correlation of the pH with the adsorption capacity of Mg-HCSB for nitrate is approved based on the results and reasons stated in Section 3.2. The statistical parameters of the models are presented in Table 6. The results indicate that ANN model provides a better fit as demonstrated by a lower RMSE and higher R2 value.

Table 6

Statistical performance values of ANN, SVM, and GEP models

Statistical valuesANNGEPSVM
RMSE 0.001 0.017 0.010 
R2 0.996 0.956 0.919 
Statistical valuesANNGEPSVM
RMSE 0.001 0.017 0.010 
R2 0.996 0.956 0.919 

The simulation results of the adsorption capacity using the ANN, SVM, and GEP models are presented in Figure 6(a)–6(c). The best ANN architecture was determined by trial and error so that the best performance with the least possible deviations was determined to be 5-8-1.
Figure 6

Comparison of adsorption capacity calculated by experimental data and predicted using the ANN (a), SVM (b) and GEP (c) models.

Figure 6

Comparison of adsorption capacity calculated by experimental data and predicted using the ANN (a), SVM (b) and GEP (c) models.

Close modal

Isotherm studies

The adsorption isotherms of nitrate uptake by Mg-HCSB were assessed using the non-linear forms of Freundlich (Equation (8)), Langmuir (Equation (9)), and Redlich-Peterson (Equation (10)):
(8)
(9)
(10)
where qe (mg g−1) is the nitrate adsorbed by Mg-HCSB at equilibrium time. The qm (mg g−1) is the maximum amount of nitrate adsorption. The nitrate concentration in the liquid phase at equilibrium time is Ce. Freundlich's constant of equilibrium adsorption is KF (mg g−1)(L mg)1/n and 1/n is the heterogeneity factor. The Langmuir constant is KL (L mg−1), and the rate constants of the Redlich-Peterson model are KR (g L−1) and aR (L mg−1). The activity coefficient related to the mean adsorption energy per mole is β. In addition, to estimate whether nitrate adsorption by Mg-HCSB is favorable, the dimensionless parameter of the separation factor (RL) was calculated:
(11)
where KL and C0 are the Langmuir constant and initial nitrate concentration, respectively. Based on the value of the separation factor, RL value between 0 and 1 indicates favorable adsorption reactions, In addition, an RL equal to 1 indicates that the non-linear conditions are suitable, and an RL greater than 1 signifies unfavorable adsorption.
The fitted isotherm models and their mathematical parameters are presented in Table 7 and Figure 7. The results indicate that the Langmuir model provides a better fit demonstrated by a lower RMSE and higher R2 value that the Langmuir model suggests a homogeneous, monolayer nitrate uptake by Mg-HCSB without interaction between the adsorbed nitrate ions (Xia et al. 2019). Considering the theoretical factors governing this model, a maximum nitrate uptake of 68.296 is expected of Mg-HCSB. Moreover, the separation factor values were within the range of 0–1, reflecting a favorable nitrate uptake by Mg-HCSB.
Table 7

Estimated parameters by different isotherm models to experimental data for nitrate adsorption by Mg-HCSB

Isotherm models
Redlich-Peterson 
KR (g L−1aR (L mg−1RMSE R2 
15.64 0.46 0.84 2.60 0.99 
Langmuir 
KL (L mg−1qm (mg g−1RL RMSE R2 
0.11 68.30 0.313–1 2.40 0.99 
Freundlich 
KF (mg g−1)(L mg) 1/n n (g L−1RMSE R2 
12.76 2.26 4.68 0.98 
Isotherm models
Redlich-Peterson 
KR (g L−1aR (L mg−1RMSE R2 
15.64 0.46 0.84 2.60 0.99 
Langmuir 
KL (L mg−1qm (mg g−1RL RMSE R2 
0.11 68.30 0.313–1 2.40 0.99 
Freundlich 
KF (mg g−1)(L mg) 1/n n (g L−1RMSE R2 
12.76 2.26 4.68 0.98 
Figure 7

Different isotherm models for nitrate adsorption by Mg-HCSB.

Figure 7

Different isotherm models for nitrate adsorption by Mg-HCSB.

Close modal

In this study, HCSB was modified using MgCl2 to remove nitrate from water. There are several reasons why sugarcane bagasse was chosen for hydrochar production, why hydrochar is a good adsorbent, why adsorption is an effective method, and why artificial intelligence tools were used to predict it. Sugarcane is one of the most significant agricultural products that grow in tropical countries. Moreover, SB is a by-product of the sugar industry generated after water is extracted from sugarcane. Furthermore, SB has been introduced as a solid agricultural waste product and its management is challenging due to excess production (Akiode et al. 2015; Kumar et al. 2021). Therefore, creating valuable products from sugar industry waste is imperative, from an environmental viewpoint and biorefinery perspective (Kumar et al. 2021).

Hydrochar production is among the cost-effective and environmentally friendly methods recently developed to manage agricultural waste (Wang et al. 2020). Hydrochar is popular because it is quickly and easily produced, cheap, and clean. Furthermore, hydro cardiogram is rich in organic matter. Applied as a biofertilizer, it increases soil organic carbon, stabilizes aggregates, and reduces greenhouse gas emissions (Hou et al. 2020).

The increase in agricultural effluents due to the development of agriculture has led to the introduction of a wide range of chemical pollutants, pesticides, and nitrate fertilizers into water sources. The high concentration of these pollutants in human drinking water causes many problems such as cancer, hormonal disorders, heart diseases, and kidney and liver damage, especially in children and pregnant women. Therefore, research on the effective and cost-effective removal of various pollutants from water sources is of great importance for public health. Another issue that should be considered is that the world is under pressure due to the increase in population and the increase in demand for water and food. It should be noted that our drinking water resources are very limited so only 1% of the total water on earth is fresh and usable. Therefore, it is very important to recycle and purify polluted water and reuse it. There are various methods for purifying polluted water, surface absorption has advantages over other methods due to its simple design and can include low investment in terms of initial cost and required land (Rashed 2013). Adsorption is a process that uses porous solid materials (absorbents) to separate contaminants from contaminated water. The amount of adsorption is often predicted using adsorption isotherms, which are mathematical expressions developed to describe equilibrium relationships between adsorbent and pollutant. Before using the adsorption isotherm, its coefficients must be adjusted using experimental data (Mahmoodi et al. 2018). To provide experimental data so that they can be used in adsorption isotherms is very time-consuming and expensive. Because it is necessary to investigate the effect of a wide range of different parameters on the adsorption process. In addition, the adsorption capacity of an adsorbent depends on the active sites (adsorbent properties) and the intensity of the adsorption process, which is difficult to detect (Wang et al. 2021).

The findings show that artificial intelligence tools have provided advantages over conventional mathematical modeling, such as: requiring less time to develop the model, avoiding extensive experimental work to formulate a non-linear relationship, and the ability to learn complex relationships regardless to understand the structure of the model (Alam et al. 2022). The application of artificial intelligence methods in predicting of the capacity of adsorbents, can reduce the cost, effort, and time of the optimization process. In addition to the experimental and molecular modeling, the application of artificial intelligence techniques can simulate the adsorption process to understand the effect of fundamental parameters on the removal efficiency and adsorption capacity. It should be mentioned that despite the several advantages offered by artificial intelligence tools, there are still shortcomings that need to be addressed in order to realize the potential of artificial intelligence tools in practical water treatment applications (Alam et al. 2022).

In this study, HCSB was modified using MgCl2 to obtain a new and unique adsorbent. The effect of temperature, contact time, initial nitrate concentration, adsorbent dose, and solution pH on nitrate uptake by Mg-HCSB were investigated. Laboratory data obtained from adsorption experiments were modeled using artificial intelligence methods. The contact time, initial nitrate concentration, temperature, adsorbent dose, and solution pH were introduced as input variables and adsorption capacity and removal efficiency were introduced as target variables. The results demonstrated that the ANN model is more accurate in predicting the adsorption capacity due to the lower RMSE and higher R2 value. The best conditions for nitrate adsorption by Mg-HCSB occurred at an initial pH of 2, a temperature of 22 °C ± 2 °C, an adsorbent dosage of 1 g L−1, and after 8 h of contact time. The Langmuir isotherm was selected as the best fitting model. Using the Langmuir model, the amount of nitrate adsorbed by Mg-HCSB was 68.296 mg g−1. A neural network needs a suitable amount of quality training data to produce viable results. Sudden fluctuations in input variables due to changes in operational parameters and water quality (concentration of other pollutants), which leads to the development of low-quality data, is one of the concerns of using artificial intelligence models in this research.

The authors of this paper especially thank the Iran National Science Foundation (INSF) for funding this work, through project No. 97013515 and the Shahid Chamran University of Ahvaz, Iran, for the laboratory facilities.

All relevant data are included in the paper or its Supplementary Information.

The authors declare there is no conflict.

Althnian
A.
,
AlSaeed
D.
,
Al-Baity
H.
,
Samha
A.
,
Dris
A. B.
,
Alzakari
N.
,
Abou Elwafa
A.
&
Kurdi
H.
2021
Impact of dataset size on classification performance: an empirical evaluation in the medical domain
.
Appl. Sci.
11
,
796
.
Amar
M. N.
,
Larestani
A.
,
Lv
Q.
,
Zhou
T.
&
Hemmati-Sarapardeh
A.
2022
Modeling of methane adsorption capacity in shale gas formations using white-box supervised machine learning techniques
.
J. Pet. Sci. Eng.
208
,
109226
.
Bento
L. R.
,
Castro
A. J. R.
,
Moreira
A. B.
,
Ferreira
O. P.
,
Bisinoti
M. C.
&
Melo
C. A.
2019
Release of nutrients and organic carbon in different soil types from hydrochar obtained using sugarcane bagasse and vinasse
.
Geoderma
334
,
24
32
.
Bhatnagar
A.
&
Sillanpää
M.
2011
A review of emerging adsorbents for nitrate removal from water
.
Chem. Eng. J.
168
,
493
504
.
Chakraborty
V.
&
Das
P.
2020
Synthesis of nano-silica-coated biochar from thermal conversion of sawdust and its application for Cr removal: kinetic modelling using linear and nonlinear method and modelling using artificial neural network analysis
.
Biomass Convers. Biorefin.
1
11
.
https://doi.org/10.1007/s13399-020-01024-1
Danso-Boateng
E.
,
Nyktari
E.
,
Wheatley
A. D.
,
Holdich
R. G.
&
Mohammed
A. S.
2020
Removal of organic pollutants from effluent of anaerobic digester using hydrochars produced from faecal simulant and sewage sludge
.
Water Air Soil Pollut.
231
,
1
23
.
Divband Hafshejani
L.
&
Naseri
A.
2020
Optimizing the removal of phosphate from agricultural drains water using activated sugarcane bagasse hydrocar
.
Iran. J. Irrig. Drain.
14
,
1853
1865
.
Goeller
B. C.
,
Febria
C. M.
,
Warburton
H. J.
,
Hogsden
K. L.
,
Collins
K. E.
,
Devlin
H. S.
,
Harding
J. S.
&
McIntosh
A. R.
2019
Springs drive downstream nitrate export from artificially-drained agricultural headwater catchments
.
Sci. Total Environ.
671
,
119
128
.
Hafshejani
L. D.
,
Hooshmand
A.
,
Naseri
A. A.
,
Mohammadi
A. S.
,
Abbasi
F.
&
Bhatnagar
A.
2016a
Removal of nitrate from aqueous solution by modified sugarcane bagasse biochar
.
Ecol. Eng.
95
,
101
111
.
Hafshejani
L. D.
,
Nasab
S. B.
,
Moradzadeh
M.
,
Divband
S.
&
Koupai
J. A.
2016b
Cadmium removal from aqueous solution using nano/milli-sized particles of cedar leaf ash
.
Desalin. Water Treat.
57
,
3283
3291
.
Hemmat-Sarapardeh
A.
,
Larestani
A.
,
Menad
N. A.
&
Hajirezaie
S.
2020
Applications of Artificial Intelligence Techniques in the Petroleum Industry
.
Gulf Professional Publishing, Elsevier
,
Oxford, United Kingdom
.
Karthikeyan
P.
&
Meenakshi
S.
2020
Enhanced removal of phosphate and nitrate ions by a novel ZnFe LDHs-activated carbon composite
.
Sustainable Mater. Technol.
e00154
.
https://doi.org/10.1016/j.susmat.2020.e00154
Li
Y.
,
Meas
A.
,
Shan
S.
,
Yang
R.
&
Gai
X.
2016
Production and optimization of bamboo hydrochars for adsorption of Congo red and 2-naphthol
.
Bioresour. Technol.
207
,
379
386
.
Maurya
A.
,
Nagamani
M.
,
Kang
S. W.
,
Yeom
J.-T.
,
Hong
J.-K.
,
Sung
H.
,
Park
C.
,
Reddy
P. U. M.
&
Reddy
N.
2022
Development of artificial neural networks software for arsenic adsorption from an aqueous environment
.
Environ. Res.
203
,
111846
.
Netto
M. S.
,
Oliveira
J. S.
,
Salau
N. P.
&
Dotto
G. L.
2021
Analysis of adsorption isotherms of Ag+, Co+2, and Cu+2 onto zeolites using computational intelligence models
.
J. Environ. Chem. Eng.
9
,
104960
.
Nguyen
T. T.
,
Tran
V. A. K.
,
Tran
L. B.
,
Phan
P. T.
,
Nguyen
M. T.
,
Bach
L. G.
,
Padungthon
S.
,
Ta
C. K.
&
Nguyen
N. H.
2021b
Synthesis of cation exchange resin-supported iron and magnesium oxides/hydroxides composite for nitrate removal in water
.
Chin. J. Chem. Eng.
32
,
378
384
.
Penido
E. S.
,
Melo
L. C. A.
,
Guilherme
L. R. G.
&
Bianchi
M. L.
2019
Cadmium binding mechanisms and adsorption capacity by novel phosphorus/magnesium-engineered biochars
.
Sci. Total Environ.
671
,
1134
1143
.
Qian
W.-C.
,
Luo
X.-P.
,
Wang
X.
,
Guo
M.
&
Li
B.
2018
Removal of methylene blue from aqueous solution by modified bamboo hydrochar
.
Ecotoxicol. Environ. Saf.
157
,
300
306
.
Rahdar
S.
,
Rahdar
A.
,
Sattari
M.
,
Hafshejani
L. D.
,
Tolkou
A. K.
&
Kyzas
G. Z.
2021
Barium/cobalt@ polyethylene glycol nanocomposites for dye removal from aqueous solutions
.
Polymers
13
,
1161
.
Rashed
M. N.
2013
Adsorption technique for the removal of organic pollutants from water and wastewater
.
Org. Pollut.-Monit. Risk Treat.
7
,
167
194
.
Silva
C. C.
,
Melo
C. A.
,
Junior
F. H. S.
,
Moreira
A. B.
,
Ferreira
O. P.
&
Bisinoti
M. C.
2017
Effect of the reaction medium on the immobilization of nutrients in hydrochars obtained using sugarcane industry residues
.
Bioresour. Technol.
237
,
213
221
.
Ullah
S.
,
Assiri
M. A.
,
Al-Sehemi
A. G.
,
Bustam
M. A.
,
Sagir
M.
,
Abdulkareem
F. A.
,
Raza
M. R.
,
Ayoub
M.
&
Irfan
A.
2020a
Characteristically insights, artificial neural network (ANN), equilibrium, and kinetic studies of Pb (II) ion adsorption on rice husks treated with nitric acid
.
Int. J. Environ. Res. Public Health
14
,
43
60
.
Ullah
S.
,
Assiri
M. A.
,
Bustam
M. A.
,
Al-Sehemi
A. G.
,
Abdul Kareem
F. A.
&
Irfan
A.
2020b
Equilibrium, kinetics and artificial intelligence characteristic analysis for Zn (II) ion adsorption on rice husks digested with nitric acid
.
Paddy Water Environ.
18
,
455
468
.
Viglašová
E.
,
Galamboš
M.
,
Danková
Z.
,
Krivosudský
L.
,
Lengauer
C. L.
,
Hood-Nowotny
R.
,
Soja
G.
,
Rompel
A.
,
Matík
M.
&
Briančin
J.
2018
Production, characterization and adsorption studies of bamboo-based biochar/montmorillonite composite for nitrate removal
.
J. Waste Manage.
79
,
385
394
.
Wang
F.
,
Wang
J.
,
Li
Z.
,
Zan
S.
&
Du
M.
2020
Promoting anaerobic digestion by algae-based hydrochars in a continuous reactor
.
Bioresour. Technol.
318
,
124201
.
Wang
Z.
,
Zhang
H.
,
Ren
J.
,
Lin
X.
,
Han
T.
,
Liu
J.
&
Li
J.
2021
Predicting adsorption ability of adsorbents at arbitrary sites for pollutants using deep transfer learning
.
npj Comput. Mater.
7
,
1
9
.
Wu
Y.
,
Wang
Y.
,
Wang
J.
,
Xu
S.
,
Yu
L.
,
Philippe
C.
&
Wintgens
T.
2016
Nitrate removal from water by new polymeric adsorbent modified with amino and quaternary ammonium groups: batch and column adsorption study
.
J. Taiwan Inst. Chem. Eng.
66
,
191
199
.
Xia
Y.
,
Yang
T.
,
Zhu
N.
,
Li
D.
,
Chen
Z.
,
Lang
Q.
,
Liu
Z.
&
Jiao
W.
2019
Enhanced adsorption of Pb (II) onto modified hydrochar: modeling and mechanism analysis
.
Bioresour. Technol.
228
,
121593
.
Zhang
T.
,
Wu
X.
,
Shaheen
S. M.
,
Zhao
Q.
,
Liu
X.
,
Rinklebe
J.
&
Ren
H.
2020
Ammonium nitrogen recovery from digestate by hydrothermal pretreatment followed by activated hydrochar sorption
.
Chem. Eng. J.
379
,
122254
.
This is an Open Access article distributed under the terms of the Creative Commons Attribution Licence (CC BY 4.0), which permits copying, adaptation and redistribution, provided the original work is properly cited (http://creativecommons.org/licenses/by/4.0/).

Supplementary data