*Article* **Modeling the Biosorption Process of Heavy Metal Ions on Soybean-Based Low-Cost Biosorbents Using Artificial Neural Networks**

**Daniela Ionela Fertu 1,2, Elena Niculina Dragoi 3,\* , Laura Bulgariu 1,\* , Silvia Curteanu <sup>3</sup> and Maria Gavrilescu 1,4,\***


**Abstract:** Pollution of the environment with heavy metals requires finding solutions to eliminate them from aqueous flows. The current trends aim at exploiting the advantages of the adsorption operation, by using some low-cost sorbents from agricultural waste biomass, and with good retention capacity of some heavy metal ions. In this context, it is important to provide tools that allow the modeling and optimization of the process, in order to transpose the process to a higher operating scale of the biosorption process. This paper capitalizes on the results of previous research on the biosorption of heavy metal ions, namely Pb(II), Cd(II), and Zn(II) on soybean biomass and soybean waste biomass resulting from biofuels extraction process. The data were processed by applying a methodology based on Artificial Neural Networks (ANNs) and evolutionary algorithms (EAs) capable of evolving ANN parameters. EAs are represented in this paper by the Differential Evolution (DE) algorithm, and a simultaneous training and determination of the topology is performed. The resulting hybrid algorithm, hSADE-NN was applied to obtain optimal models for the biosorption process. The expected response of the system addresses biosorption capacity of the biosorbent (*q*, mg/g), the biosorption efficiency (*E*, %), as functions of input parameters: pH, biosorbent dose (*DS*, mg/g), the initial concentration of metal in the solution (*c*0, mg/L), contact time (*tc*, h), and temperature (*T*, ◦C). Models were developed for the two output variables, for each metal ion, finding a high degree of accuracy. Furthermore, the combinations of input parameters were found which can lead to an optimal output in terms of biosorption capacity and biosorption efficiency.

**Keywords:** Artificial Neural Networks; biosorption; Differential Evolution; heavy metals; optimization; soybean waste

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

### **1. Introduction**

Pollution of the environment with heavy metals has been and remains a problem, since they are toxic, non-biodegradable, persistent in the environment, and have the ability to bioaccumulate in the food chain, disrupting it and posing risks to human health. Their presence in the environment is the consequence of anthropogenic activities such as mining, steel, metallurgy, the metal coating industry, pesticide industry, chemical fertilizers, animal skin processing, etc. [1–4].

The presence of heavy metals in the environment generates a significant pressure on it, because a large part of these pollutants (e.g., arsenic (As), chromium (CrVI), cadmium

**Citation:** Fertu, D.I.; Dragoi, E.N.; Bulgariu, L.; Curteanu, S.; Gavrilescu, M. Modeling the Biosorption Process of Heavy Metal Ions on Soybean-Based Low-Cost Biosorbents Using Artificial Neural Networks. *Processes* **2022**, *10*, 603. https://doi.org/ 10.3390/pr10030603

Academic Editors: Andrea Petrella, Marco Race and Danilo Spasiano

Received: 15 February 2022 Accepted: 17 March 2022 Published: 20 March 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

(Cd), mercury (Hg), lead (Pb), etc.) are very toxic and dangerous for any form of life, even at low concentrations. Therefore, heavy metals can generate serious impacts and risks in the environment, and, furthermore, for human health, because they do not degrade and are able to accumulate in the food chain [5–7]. That is why the elimination of heavy metals from the environment has long been the concern of many researchers, as well as environmental managers, who developed technologies for the prevention and control of heavy metal pollution. The technologies for the elimination of these pollutants are based on physical, chemical/electrochemical, biological, single or combined processes, such as: chemical precipitation, flotation, ozonation, (electro)coagulation, ion exchange, membrane processes, etc. The related literature mentions and demonstrates the advantages, but also the disadvantages of these technologies, mainly related to the fairly low efficiency of metal removal, the presence of some waste (sludge), and relatively high operating costs [8–10].

Adsorption is one of the mass transfer operations often agreed upon by operators interested in the removal of heavy metals from polluted aqueous effluents. It has been found that adsorption can treat effluents with low concentrations of heavy metals (1–100 mg/L), it is less expensive, and the adsorbent matrices can be easily regenerated. One of the most effective adsorbent materials, often used as a reference in all adsorption studies, is activated carbon, but it has the disadvantage of high production costs, since the carbonization process involves high energy consumption and working at high temperatures. To overcome this disadvantage, solutions were sought for the use of other categories of effective adsorbents, but cheaper than activated carbon, the so-called low-cost sorbents.

Biomass waste from industry and agriculture is proving to be a viable alternative for removing heavy metals from polluted effluents because they have functional groups on their porous surface capable of retaining metals by predominantly ionic bonds, but also hydrogen bonding and the coordination bond in metal ion complexation [11–13]. Some studies have used agricultural waste (fruit kernels, wood waste, plant waste, shells or shells from some vegetables or seeds) due to low procurement costs and their abundance, even if they have a lower biosorption capacity than some synthetic adsorbents [14–16]. These wastes may contain major constituents such as cellulose, hemicellulose and lignin, which provide the pollutant with adequate functional groups (aldehyde, carbonyl, hydroxyl, carboxyl, phenolic, ether) able to retain various metals. As a consequence of the specific composition and structure, their use as biosorbents is advantageous for that they can interact with pollutants from various aqueous effluents. Other advantages of these categories of biosorbents lie in the fact that they have a wide bioavailability and involve low costs [17–23]. For example, the sorption capacity of biosorbents prepared from seeds (e.g., *Litchi chinensis*, *Allium cepa*, *Artocarpus heterophyllus*, *Syzygium cumini*, deoiled karanja or soy seed cake) has been tested for the elimination of metals such as Ni(II), Cr(VI), Cd(II), Zn(II), Cu(II), Pb(II) from the environment with good results [12,24–27].

The selection of high-performance biosorbents based on agro-industrial waste and the choice of the conditions under which an efficient process can be ensured makes it necessary to establish the interactions among the factors on which the biosorption process would depend. One of the reliable tools that can be successfully applied for this purpose is represented by Artificial Neural Networks (ANNs). Some research groups applied ANNs successfully for modelling, simulation, optimization of biosorption processes applied for the removal of heavy metals, dyes and other pollutants from aqueous effluents [28–33].

ANNs are a series of semi-parametric models inspired from the mammalian brain in the manner in which knowledge is acquired (learning) and stored (synaptic weights) [34,35]. The history of ANN concept began in 1943 [36], whereas the first practical network, the perceptron, was developed almost ten years after. A neural model is represented by a set of inter-connected neurons, with definite organization and specific connections, which define the ANN structure [37]. Feedforward multilayer perceptron (MLP) can be considered the best-known type of ANN. In a MLP, the neurons are fully interconnected and arranged in layers (at least two: input and output). They are very popular due to their ability to

model almost any type of problem, the inner layer introducing non-linearity, as an internal procedure, which lead to the ability to capture non-linear and non-stationary behavior [38].

Since their development, the practical applications in the area of ANNs increased, this approach being efficiently applied to solve a multitude of problems. The main advantages of ANNs that make them suitable for difficult to solve problems, where the use of phenomenological or conventional modes is impractical or cumbersome, consisting of: the ability of modelling non-normal class distribution, being able to work with continuous forms of data, no requirement for inner knowledge about the problem being solved, robustness in the presence of noise, and a high degree of accuracy [39,40].

In the chemical and environmental engineering areas, the fact that ANNs do not require the existence of phenomenological models is an advantage that allowed the construction of good models for complex processes and the chemical and physical laws governing the system are not fully known. Some examples of successful application of ANNs in chemical and environmental engineering areas are: modelling of polymerization process [41–43], food and fermentation technology [44], freeze drying modelling control, monitoring and optimization [45,46], modelling the electrodeposition state of a polymersupported ultrafiltration–ultradeposition process for heavy metal recovery [47], and the depollution processes of gaseous fluxes [48].

ANNs are applied more and more to experimental data processing, being able to perform the extrapolation to untested data sets with a special preparation step and to identify causal relationships after an efficient training process [49,50]. Moreover, the simplicity of ANNs set-up and use is deceivable because the optimal parameters (topology and internal parameters) are dependent on the properties of the problem being solved. A too large network tends to overfit the training data, and thus leading to generalization problems, whereas a small network has problems in learning the training data [51]. The search for optimal topology is usually performed by a trial-and-error approach [38], but this has a series of disadvantages such as high computational time, dependence on the researcher knowledge, and inability to ensure optimal results.

To elude these difficulties, it is possible to apply evolutionary algorithms (EAs) that are able to evolve ANN parameters. This is termed neuro-evolution and provides a successful platform for simultaneous optimization of performance and architecture [52]. The use of EAs combined with ANNs has the advantage that several of their features can be coded and co-evolved, provided that more flexible performance criteria are considered compared with the error function [53]. Three levels of evolution can be used: connection weights (training), architecture (topology determination), and learning rules.

The EAs applied in this paper are represented by the Differential Evolution (DE) algorithm [54], and a simultaneous training and determination of the topology is performed. DE characterizes a population based on stochastic metaheuristics for global optimization on continuous spaces, its main advantages being efficiency, flexibility and fundamentality [55]. Due to its low number of control parameters, simple structure and easiness of use, it was successfully applied for solving a multitude of problems, this being one of the main reasons for choosing it in detriment of other EAs. DE has been applied, for example, in chemical engineering: to ensure an optimal temperature profile in the naphtha reforming process, so as to improve the simultaneous elimination of hydrogen and aromatics [56]; appraisal of GTL technology from maximum gasoline yield viewpoint of Fischer-Tropsch synthesis [57]; optimization of a thermally coupled dual membrane reactor to ensure concurrent dimethyl ether synthesis and decalin dehydrogenation [58]; optimization of feed-batch fermentation process [59], etc.

In this framework, we have considered a neural network-based approach to analyze, model and compare the performance of soybean seed waste biomass as a biosorbent for the elimination of heavy metal ions from water and wastewater, as well as to optimize the process in view to generating the scientific basis for scaling-up. The inputs include: pH, sorbent dose, initial concentration of metal ion in solution, contact time, temperature, whereas biosorption efficiency of the metal ions by biosorbents, biosorption capacity of

sorbents, and residual concentration of metal ions in solution at the final of biosorption are considered as outputs.

The Differential Evolution algorithm, in variant h-SADE-NN, was applied to obtain optimal models. This DE-based hybrid approach includes the opposition-based principle for initialization, and local search algorithms, Backpropagation and Random Search, which have the role of refining the search for the optimal solution. The obtained results prove the efficiency and utility of this study conducted by simulation.

#### **2. Materials and Methods**

#### *2.1. Experimental Context*

The experimental protocol is described in detail in a previous paper [60], both in terms of the preparation of biosorbent represented by SB and SWB, carrying out experiments and examining the influence of process parameters such as: pH; sorbent dose, *DS* (g/L); initial concentration of metal ion in solution, *c*<sup>0</sup> (mg/L); contact time, *tc* (min); temperature, *T* ( ◦C), on the biosorption capacity, *q* (mg/g), and biosorption efficiency *E* (%) a considering three metal ions: Pb(II), Cd(II), Zn(II), respectively, in batch single ion system. The calculation method of these quantities is presented by Bulgariu et al. [12].

The experimental studies aimed a comparison between the biosorption capacity and the biosorption efficiency of the two biosorbents, besides examining the influence of the mentioned parameters and finding correlations between them.

#### 2.1.1. Biosorbents

The soybeans used to obtain the biosorbent needed for experimental studies were washed with distilled water (5–6 times) to remove macroscopic impurities, dried in air at room temperature (22 ± 0.5 ◦C) for 5 days and then ground. The ground soybeans were then used to obtain the two biosorbents by (i) drying at 65 ◦C for 6 h and then grinding; (ii) by extraction with n-hexane, for 30 h in a Soxhlet extractor, followed by washing with distilled water and drying at 65 ◦C for 6 h, and then grinding. The materials obtained from these preparation steps (soybean and soybean waste biomasses) were then mechanically sieved so that the particle size was less than 1.5 mm, and stored in the desiccator to maintain a constant humidity.

The characterization of the two materials obtained (soybean biomass and soybean waste) was performed using the following methods of analysis: X-ray dispersion spectrometry (EDX) (with EDAX-TSL 32 spectrometer); IR spectrometry (with Fourier transform Bio-Rad spectrometer); scanning electron microscopy (SEM) (with SIT 3000 N HITACHI microscope with 15 UV). With the help of these methods of analysis, it was possible to identify the functional groups on the surface of the two biosorbents (soybean and soybean waste biomasses) and the existing non-uniformities that represent the binding centers of the metal ions existing in the aqueous solution. Details on the results of these analyzes are provided by Fertu et al. [60].

#### 2.1.2. Metal Solutions

Aqueous solutions of the studied metal ions, Pb(II), Cd(II) and Zn(II) considered as polluting species in this study, of exact known concentration, were used for the experimental studies. These solutions were freshly prepared for each experiment by diluting a given volume of the corresponding stock solution with distilled water [60]. The aqueous solutions of the metal ions were analyzed using an appropriate spectrophotometric analysis method to ensure the selectivity and accuracy of the determinations (Digital Spectrophotometer S 104 D, glass cuvettes thickness = 1 cm). The concentration of metal ions in the analyzed solutions was calculated from the regression equation of the corresponding calibration curve.

#### 2.1.3. Experimental Conditions

Biosorption experiments were performed in batch system to determine the effect of the initial pH of the aqueous solution, biosorbent dose, initial concentration of metal ions, contacting time, working temperature on the process performance (biosorption capacity, biosorption efficiency) of the two biosorbents used in this study. Establishing the experimental conditions and parameter variation ranges was carried out experimentally for each type of metal ion separately, both for biosorption on soybean biomass and soybean waste, using several sets of experiments that followed the influence of the most important experimental parameters. Therefore, there were used various adsorbent dosages ranging between 4–40 g/L, a pH range between 1 and 6.5, different initial concentration of metals (11.66–416.45 mg Pb(II)/L; 9.22–230.54 mg Cd(II)/L; 13.08–209.25 mg Zn(II)/L, respectively), contact time between 0.1–3 h, working temperature of 5; 25; 50 ◦C.

The experimental data obtained were collected and used to model and optimize the biosorption process of heavy metal ions Pb(II), Cd(II), Zn(II) based on Artificial Neural Networks.

#### *2.2. Modelling*

#### 2.2.1. DE Application

A methodology based on ANNs and DE was applied in order to model and optimize the considered biosorption process. The ANN represented the model, whereas DE was the optimizer used to determine the optimal characteristics of the neural network that lead to an acceptable difference between predictions and the experimental data. DE is a population-based metaheuristic inspired by the Darwinian principle of evolution.

DE, similar to all algorithms of its kind, starts with a pool of solutions (that in this work are represented by coded neural networks). The individuals evolve by mutation, crossover, and selection until a stop criterion is reached. The population's initialization is correlated the problem's upper and lower bounds.

The mutation operator is performed after initialization. Depending on the strategy, a base vector and one or more sets of difference vectors are selected. Choosing mutation vectors is usually a random process that ensures that all vectors are statistically threaded equally [61]. The only constraint in this step is the uniqueness of the used vectors, each representing a specific generation vector solution. In the initial DE algorithm proposed by Price et al., the mutation vector is determined by adding to a base vector a single, scaled, differential term [61].

The next step of the method consists of applying the crossover operator, a trial population being obtained by combining the current population with the mutant one. Because the trial population may contain data from mutation vectors outside the accepted value range, a control value method is required. Boundary constraints are enforced by resetting schemes and penalizing methods. If the trial vector does not meet all constraints, a resetting scheme is used to change the parameters. Penalty methods include techniques such as the Brick Wall Penalty, Adaptive Penalty, and Random Re-initialization [61].

After recombination, the best individuals from the current and trial populations are selected for a new generation. The algorithm is repeated until the current generation's index equals the number of generations initialized at the start. This is a stop condition, and, depending on the problem, the evolutionary algorithms can use improvement-based, movement-based, or distributed-based termination criteria [61,62].

To identify the various combinations of steps, a notation DE/base/num/cross is used. 'base' represents the method of selecting the base vector, 'num' is the number of differential terms, and 'cross' is the crossover mechanism [63]. Examples of strategies include DE/rand/1/exp, DE/best/1/exp, DE/rand-to-best/1/exp, DE/best/2/exp, DE/rand/2/exp [64,65].

#### 2.2.2. hSADE-NN

Finding the optimal topology and internal parameters of neural networks is still difficult, especially when there are many parameters, many possible combinations, multiple training algorithms, or no consistent rules [66]. To overcome these issues, we used a neuroevolutionary approach that involves a hybrid auto-adaptive Differential Evolution with neural networks (hSADE-NN), which is based on simultaneous optimization of topology and training [46,67–69]. In this new context, optimization requires a large search space and a large number of parameters, affecting DE performance. Despite its attractive features and power, the DE algorithm can be inefficient due to slow convergence and low accuracy, especially in noisy environments or when the solution space is difficult to explore [70]. In order to reduce or eliminate these disadvantages, DE was combined with other optimization algorithms [71–73]. This hybridization can be performed at [55]: (i) an individual level; (ii) at the population level; (iii) an external level; (iv) at the meta-level.

This paper used a hybridized DE with two algorithms: Random Search and Backpropagation (BK). This choice increases the optimizer's performance and the likelihood of finding the optimal ANN through individual hybridization. This process, which uses one of the two algorithms selected on the basis of randomly generated numbers, can only improve the best solution obtained for each generation. Therefore, the core DE is also modified: (1) by introducing opposition-based learning (OBL) as a way to improve initialization [74,75]; (2) by a simple self-adaptive principle (the control parameters are included and developed in the algorithm, applying the same mathematical equation as for the individuals they contain); and (3) by reorganizing individuals who participate in the mutation phase based on fitness [45,46,69,73,74]. The simplified schema of the hSADE-NN algorithm is presented in Figure 1.

To encode the ANN models, the present study uses a direct mapping between genotype, i.e., network representation, and phenotype, i.e., current neural network. As this requires a large number of parameters some limitations were considered: (1) the number of hidden layers was limited to two, given that a two-layer ANN can model almost any process with sufficient precision; (2) the maximum number of neurons allowed in the first and second hidden layers of 40 and 20, respectively, was taken into account.

Network performance was determined using the *Fitness* function (Equation (1)) which is based on the mean square error of traning (*MSEtraining*), where *err\_correction* is a constant value (equal to 10<sup>−</sup>10) used to eliminate the unlikely event when *MSEtraining* is equal to 0.

$$Fitness = \frac{1}{MSE\_{training} + err\\_correction} \tag{1}$$

**Figure 1.** Scheme of the hSADE-NN algorithm: Ibest represents the best individual in the population and Nbest is the neural network corresponding to the Ibest (from [48], with Springer Nature permission, License 5250080341971 of 15 February 2022).

#### **3. Results and Discussions**

#### *3.1. Factors Affecting the Biosorption Process*

The experimental results acquired from the study addressing the use of soybean biomass and soybean waste biomass to eliminate Pb(II), Cd(II) and Zn(II) ions from aqueous solutions by biosorption were largely discussed and analyzed in a previous paper [60]. It was found that both SB and SWB contain in their structure large amounts of organogenic elements (C, O, P, S), but also a series of ions of alkali and alkaline earth metals (K, Mg, Al) which, due to their high mobility they can easily participate in metal ion exchange processes. Moreover, both biosorbents have in their structure numerous and varied functional groups (such as hydroxyl, carbonyl, carboxyl, phosphate, etc.), which may have an important role in the retention processes of the studied metal ions. Additionally, the morphological non-uniformity of the surfaces of the two materials recommends the use of soybean biomass and soybean waste as biosorbents in the processes of decontamination of environmental components.

The biosorption capacity (*q*, mg/g) of the two materials depends significantly on the initial pH value of the solution, although the variation is not uniform. The highest values of the biosorption parameters are obtained at a pH of the initial solution of 3.39 where more than 50% of Pb(II), 60% of Cd(II) and 45% of Zn(II), respectively, can be removed from the aqueous solution using these two biosorbents. This behavior is largely determined by the high buffering capacity of the biosorbents, as the pH values measured in the solutions obtained after the completion of the biosorption process are considerably higher than the initial ones. The significant increase in the pH of the final solution (by 2–3 units of pH) causes, in turn, a change in the speciation of metal ions in the aqueous solution, which also influences the efficiency of the biosorption process.

The biosorption efficiency (*E*, %) of Pb(II), Cd(II) and Zn(II) ions, respectively, in aqueous solutions on SB and SWB also depends on the amount of biosorbent used. The values of the dependent variables *q* and *E* calculated for each case showed that a minimum dose of biosorbent of 5 g/L is sufficient for the quantitative retention of the considered metal ions. Additionally, the close values of the biosorption parameters obtained for SB and SWB showed that SWB has about the same efficiency of the biosorption processes as SB, although from an economic point of view their cost is much lower.

The biosorption capacities of SB and SWB increase with the initial concentration of metal ions in the aqueous solution in the studied concentration range. The experimental results showed that the biosorption of Pb(II), Cd(II) and Zn(II) ions by biosorption on SB and SWB, respectively, takes place predominantly through electrostatic interactions. This makes the retention rates moderate for all the cases studied. Therefore, in order to efficiently remove them using the two biosorbents, it is necessary either to perform several successive biosorption steps or to improve the biosorption capacity of the two biosorbents.

As the contact time between phases increases, so does the biosorption capacity for both biosorbents. The close values of the biosorption efficiency obtained for the three metal ions for both SB and SWB are another argument in favor of the hypothesis that the biosorption process is performed by non-selective electrostatic interactions, which makes the speed of these processes not depend on the nature of the metal ion in the aqueous solution. Thus, the time required to reach equilibrium was found of 60 min for Pb(II) and Zn(II) ions, and 30 min for Cd(II) ions, respectively, for both biosorbents.

Temperature has a rather small influence on the biosorption capacity, for both biosorbents and for all metal ions studied. Increasing the temperature at 45 ◦C causes a rather small increase in the biosorption capacity of the two biosorbents, which was especially visible at high values of the initial concentration of metal ions. Although this variation suggests the endothermic nature of biosorption processes, the retention of Pb(II), Cd(II) and Zn(II) ions on SB and SWB can be successfully achieved at ambient temperature, and these conditions are advantageous both from an economic point of view and from the efficiency of the biosorption process.

From this concise analysis of the biosorption process carried out in an experimental program aiming at removing Pb(II), Cd(II), Zn(II) ions from aqueous solutions using soybean biomass and soybean waste biomass as biosorbents and described in detail in a previous paper [60], it results that both the biosorption capacity (*q*, mg/g) and the biosorption efficiency (*E*, %) are in a complex dependence on a series of process parameters such as pH; sorbent dose (*DS*, g/L); initial concentration of metal ion in solution (*c*0, mg/L); contact time (*tc*, h); temperature (*T*, ◦C). This is why it is very important to examine this process by means of models that can correlate well the dependent and independent variables, and can predict the biosorption capacity and efficiency of Pb(II), Cd(II), Zn(II) ions from aqueous system using SB and SWB, considering the complexity of the process and the interactions between the variables. In this context, a neural network approach was adopted.

#### *3.2. Prediction of Biosorption Capacity and Efficiency Using ANN*

As discussed above, the modeling procedure consisted of a hybrid approach that combines an evolutionary algorithm (Differential Evolution—DE) with ANNs. The role of DE is to simultaneously achieve a topological and structural optimization of ANN, whereas ANN acts as a model for the process. Once the optimal ANN model is determined, the same DE-based hybrid approach is applied, which also includes the opposition-based principle for initialization and, further backpropagation and Random Search algorithms for local search, to optimize the process. The aim was to identify the parameters—pH, sorbent

dose, *DS* (g/L), initial concentration of metal ion in solution, *c*<sup>0</sup> (mg/L), contact time, *tc* (h) and temperature, *T* ( ◦C)—which would lead to an optimal output signal in terms of biosorption capacity, *q* (mg/g) and biosorption efficiency, *E* (%).

We applied a modified DE version hybridized with two local search algorithms, Random Search and BK, in order to improve the optimization performance and increase the probability of determining an optimal ANN. This hybridization is carried out individually, in a highly selective approach, so that only the best solution found in each generation is improved, using one of the two algorithms chosen based on randomly generated numbers. When applying the BK algorithm for local search, it was noticed that sometimes BK is not able to improve the local network, without clear reasons, although it is applied several times. However, this problem rarely occurred, which is why we did not change the algorithm, but added a second algorithm to improve local search through Random Search. The software used to determine the considered models was implemented in C#, .Net 4.0, Visual Studio. The implementation is freely and openly available at https://elenadragoi. ro/CV/Documents/AITB-%20ANN\_DE.7z (accessed on 10 February 2022).

#### *3.3. ANN-Based Modeling*

Before starting the modeling procedure, all the experimental data collected went through a set of data processing techniques (normalization, randomization and group selection). The purpose of this procedure was to make sure that the determined models generated the smallest possible errors. Standardization is one of the most common tools used to achieve good results in automatic recognition systems [76]. There are different types of standardization procedures, each with specific applications. In this paper, the goal is to constrain the input feature and reschedule it in that range. This procedure is specific to the min-max normalization type, in which a linear interpolation formula is applied (Equation (2)):

$$v\_{norm} = \min\_{l} + (\max\_{l} - \min\_{l}) \frac{\upsilon - \min\_{\upsilon}}{\max\_{\upsilon} - \min\_{\upsilon}} \tag{2}$$

where *vnorm* is the normalized value, *maxt* is the maximum value of the target (in this case 1), *mint* is the minimum value of the target (in this case +1), *minv* is the minimum value of the entire interval in which *v* is gathered, and *maxt* is the maximum value of the entire interval in which *v* is gathered.

Another data processing technique applied to our experimental data is data splitting. The sampling methodology used can have a significant impact on the quality of the determined neural models [77]. In this case, the available data is split into training and testing sets, the training data being used to determine the ANN parameters, and the testing data are used to evaluate the model performance. For training, 75% of the available experimental data are taken into account, the rest being used for testing. To ensure that training and testing are not performed for a specific region, the experimental data is first arranged randomly. Next, a set of 50 simulations was performed in order to determine the best model (Table 1).

The approach involving the application of the hSADE-NN algorithm had a series of fixed settings related to the maximum allowed topology and the maximum number of iterations for which the models evolve on the DE principle. The purpose of these limitations, which are established on the basis of experience and guidance in the literature is to ensure a compromise between performance and resources consumed. Consequently, the maximum number of generations is 1000, and the maximum allowed topology is 7:20:10:2, where 7 indicates the number of inputs, 20 the number of neurons in the first hidden layer, 10 the number of neurons in the second hidden layer and 2 number of outputs (*q*, mg/g; *E*, %). Depending on the situation, the topology varies, including the number of inputs and outputs. Therefore, in this work, various combinations were performed (Table 1), where SB and SWB indicate the types of biosorbent (soybean biomass, SB or soybean waste biomass, SWB) and Me refers to metal ion.


**Table 1.** Cases considered for the hSADE-NN approach.

Table 2 shows the fitness based on the mean square error in the training phase (*MSEtraining*), and the topology indicates the general arrangement of the neurons in the layers of the model. For the best model (7:06:02) resulted in the case that combines all the groups and parameters into a single ANN, C7, the average absolute relative error (AARE) computed in the testing case is 46.28% for *q*; and 15.06% for *E*. As the AARE for *q* is unnceptable high, indicating that the identified ANN was not able to efficiently capture the dynamic of the system in all the possible variants, then individual models were considered in various situations in order to identify the best suitable ANN. The correlations obtained for the best models for all the considered cases are presented in Table 3.

**Table 2.** Modeling results with the hSADE-NN for all the cases considered.



**Table 3.** Correlation for the best models obtained in each case.

As it can be observed from Table 3, in all cases considering both *q* and *E* outputs (C1, C4 and C7), the correlations are lower compared with the other cases where individual models were determined for each output. This indicates that, due to the complexity of the interactions between the parameters, individual models are better suited. A similar situation was found by Fertu et al. who modelled experimental data applying response surface methodology [60]. Regarding the concerns for each of the different datasets, the differences between the predictions for the testing phase are presented in Figure 2 for *q* and Figure 3 for *E*.

The data from Figures 2 and 3 indicate that, whereas in the case of the SB dataset (for both *q* and *E*) the combined models (C8 and respectively C9) are capable of closely following the process dynamic, the differences for some particular examples for the SWB dataset are large, indicating that, for the considered process, the best strategy to model the available system is to use individual datasets and outputs (C2, C3, C5 and C6). The mathematical relations that represent each model and their implementation in C# can be downloaded from https://elenadragoi.ro/CV/Documents/Soybean\_biosoprtion.cs (accessed on 10 February 2022).

**Figure 2.** Comparison between experimental data and predictions for sorption capacity (*q*, mg/g) for datasets: (**a**) soybean biomass; (**b**) soybean waste biomass.

#### *3.4. Analysis of the Influence of Process Parameters on Biosorption Capacity and Biosorption Efficiency*

After the cases that best fit the available experimental data were identified, a series of predictions were performed in order to observe the influence of different inputs on the considered outputs. These predictions were used to generate contour plots for the two datasets considered (biosorption of metal ions on SB and SWB, respectively). These plots were determined by varying two parameters at a time and setting the remaining ones to a fixed value represented by the middle of the experimental interval. Thus, when fixed, the parameters had the following values: *DS* (g/L) = 22.5; *pH* = 3.75; *c*<sup>0</sup> (mg/L) = 117.17; *tc* (h) = 12; *T* ( ◦C) = 27.5.

For example, Figure 4 indicates the simultaneous influence of *DS* and pH on biosorption dependent variables (*q*, *E*) on both SB and SWB, whereas Figure 5 shows the simultaneous influence of *t* and *c*0, respectively, for Pb(II) biosorption. It can be observed that the highest values for *q* (mg/g) are obtained at low *DS* and a pH around 6 for SB and at a pH between 3.5–6 for SWB. On the other hand, a similar trend is observed for *E* (%), for both biosorbents, where the highest efficiency is obtained at higher pH and higher *DS*. Concerning the *t* and *c*<sup>0</sup> influence, Figure 5 shows a distinct behaviour between the SB and SWB.

Figure 6 indicates the simultaneous influence of contact time (*tc*, h) and temperature (*T*, ◦C) on biosorption dependent variables (*q*, *E*) using SB and SWB as biosorbents, whereas Figure 7 shows the simultaneous influence of temperature (*T*, ◦C) and pH, respectively, for Cd(II) biosorption process. As it can be observed, a higher *tc* does not necessarily ensure a high biosorption capacity, *q*. When following the influence of *T*, it can be observed that there are different behaviours in relation with *tc* and pH. For example, analyzing *E* (%) for the soybean waste, the results point out that higher efficiency is obtained at lower *T* and longer *tc,* and at higher *T* and lower pH. This indicates that, in the multi-dimensional space represented by all the considered parameters, the dependence function is non-linear and has a multi-modal characteristic.

**Figure 4.** Contour plots for Pb(II) biosorption on SB (**a1**,**a2**) and SWB (**b1**,**b2**), at different values of pH and *DS* (g/L) when the other parameters are kept constant at the middle of the interval of variation: (**a1**) *q* (mg/g) on SB; (**a2**) *E* (%) on SB; (**b1**) *q* (mg/g) on SWB; (**b2**) *E* (%) on SWB.

**Figure 5.** Contour plots for Pb(II) biosorption on SB (**a1**,**a2**) and SWB (**b1**,**b2**), at different values of contact time (*t*, h) and initial concentration of metal ion in solution (*c*0, mg/L) when the other parameters are kept constant at the middle of the interval of variation: (**a1**) *q* (mg/g) on SB; (**a2**) *E* (%) on SB; (**b1**) *q* (mg/g) on SWB; (**b2**) *E* (%) on SWB.

**Figure 6.** Contour plots for Cd(II) biosorption on SB (**a1**,**a2**) and SWB (**b1**,**b2**), at different values of temperature (*T*, ◦C) and pH when the other parameters are kept constant at the middle of the interval of variation: (**a1**) *q* (mg/g) on SB; (**a2**) *E* (%) on SB; (**b1**) *q* (mg/g) on SWB; (**b2**) *E* (%) on SWB.

**Figure 7.** Contour plots for Cd(II) biosorption on SB (**a1**,**a2**) and SWB (**b1**,**b2**), at different values of temperature (*T*, ◦C) and contact time (*tc*, h) when the other parameters are kept constant at the middle of the interval of variation: (**a1**) *q* (mg/g) on SB; (**a2**) *E* (%) on SB; (b1) *q* (mg/g) on SWB; (**b2**) *E* (%) on SWB.

Figure 8 shows the simultaneous influence of contact time, *tc* and temperature *T* on biosorption capacity and biosorption efficiency of Zn(II). Figure 9 displays the influence of temperature, *T* and biosorbent dosage, *DS* on Zn(II) biosorption, whereas in the case of SB, the highest *q* values can be obtained for a wide range of temperatures in combination with contact time, only higher *T* in combination with lower *DS* indicate a peak. On the other hand, lower *T* values lead to higher efficiency, *E* (%).

**Figure 8.** Contour plots for Zn(II) biosorption on SB (**a1**,**a2**) and SWB (**b1**,**b2**), at different values of temperature (*T*, ◦C) and contact time (*tc*, h) when the other parameters are kept constant at the middle of the interval of variation: (**a1**) *q* (mg/g) on SB; (**a2**) *E* (%) on SB; (**b1**) *q* (mg/g) on SWB; (**b2**) *E* (%) on SWB.

**Figure 9.** Contour plots for Zn(II) biosorption on SB (**a1**,**a2**) and SWB (**b1**,**b2**), at different values of temperature (*T*, ◦C) and biosorbent dosage (*DS*, g/L) with the other parameters kept constant at the middle of the interval of variation: (**a1**) *q* (mg/g) on SB; (**a2**) *E* (%) on SB; (**b1**) *q* (mg/g) on SWB; (**b2**) *E* (%) on SWB.

#### *3.5. Optimization*

Once the best neural models for the two dependent variables, *q* and *E*, have been determined, the next step is to identify the combinations of input parameters (metal ion, biosorbent, pH, initial metal concentration, dosage, contact time, and temperature) which can lead to an optimal output in terms of process efficiency: maximum of *q* and maximum of *E*. In order to perform this task, a series of 50 simulations were performed for each variable (*q*, *E*) and for each dataset.

From the contour plots it was observed that, overall, the conditions that lead to a higher *E* (%) result in average or lower values for *q*. Thus, optimization becomes the process of identifying parameters for which the combination (*q*, *E*) is highest, without necessarily containing the maximum for either *E* or *q*.

Table 4 shows some series of optimal solutions resulted. As it can be observed, for all metals, various combinations of parameters that lead to a high efficiency were identified, indicating the capability of the selected models to efficiently capture the dynamic of the systems, without the need to individually model each metal.

**Table 4.** Results of the optimization with the generated optimal neural networks, for which the solutions were verified experimentally.


An analysis of the data in Table 4 shows that there are differences between the biosorption capacity and the biosorption efficiency of the three metals, regardless of the combination of process parameters. The two biosorbents, SB and SWB have different preferences for the three metal ions, since the highest values of *E* are obtained for Pb(II), followed by Cd(II) and, finally, for Zn(II). This situation was explained by Fertu et al. [60], being placed, first of all, on electronegativity differences of the three ions. Pb(II) with the electronegativity of 1.87, can take part easily in ion exchange than

Cd(II) (1.69) and Zn(II) (1.65). In the same context, an important role in preferential biosorption is played by the hydrated radii of these metal ions, which have different sizes (Pb(II) = 4.01 Å < Cd(II) = 4.26 Å < Zn(II) = 4.30 Å), as well as in hydration energies which are different for the there metallic ions ((Pb(II) = −1481 kJ/mol, Cd (II) = −1807 kJ/mol, Zn(II) = −2046 kJ/mol)) [60,78–80].

The two biosorbents offer similar results in terms of biosorption efficiency, the *E* (%) values being over 95% for Pb(II), over 88% for Cd(II) and over 65% for Zn(II). It turns out that both SB and SWB can remove Pb(II) from aqueous solutions in a single biosorption cycle, under the optimal experimental conditions in Table 4, whereas for Cd(II), but especially for Zn(II), depending on the requirements for effluent quality, two cycles of biosorption may be required, with biosorbent regeneration.

These results show that modeling and optimization of Pb(II), Cd(II), Zn(II) biosorption using soybean-based low-cost biosorbents by applying Artificial Neural Networks (ANNs) and Evolutionary Algorithms (EAs) capable of evolving ANN parameters, it is possible to predict biosorption capacity and biosorption efficiency with high accuracy to ensure the quality of effluents resulting from wastewater treatment, according to specific required regulations. Implementation on an industrial scale can improve cost dynamics and facilitate process monitoring and control.

#### **4. Conclusions**

In this paper, we have applied modeling and optimization algorithms specific to Artificial Neural Networks to find the interactions among the parameters which affect the biosorption capacity, *q* (mg/g) and biosorption efficiency, *E* (%) of heavy metal ions Pb(II), Cd(II), Zn(II), during their elimination from aqueous solutions by biosorption, using soybean biomass and soybean waste biomass as biosorbents. In this context, evolutionary algorithms (EA) were selected at three levels of evolution: training weights, determining the topology (network architecture) and learning, applying the technique represented by Differential Evolution (DE), when simultaneously training and determining the network topology.

To solve the proposed modeling and optimization problem, the modifications made for DE resulted in a new hybrid self-adaptive Differential Evolution with neural network (hSADE-NN) algorithm, by combining a modified DE version with two algorithms such as Random Search and BK. The resulting hybrid algorithm, hSADE-NN, was applied to model the biosorption process, limiting the number of hidden layers to two, by 40 and 20 neurons, respectively.

The experimental data collected for the three metal ions and randomly arranged went through a set of data processing techniques (normalization, randomization and group selection) to generate a model with the smallest possible error. Various configurations for the process modelling were considered. The results showed that the best configurations focus on different models for biosorption capacity (*q*), biosorption efficiency (*E*) and for the two datasets (soybean biomass and soybean waste biomass), cases C2, C3, C5, C6. Biosorption capacity and biosorption efficiency (*q*, *E*) were determined as function of metal ion type, pH, biosorbent dose (*DS*), initial concentration of metal in solution (*c*0), contact time (*tc*) and temperature (*T*). For the best models, the correlations in the testing phase are higher than 0.91, indicating that a single model combining all metal ions is suitable to capture the entire process dynamic. This capability was also indicated through the analysis of the surface plots generated using a series of predictions.

In order to optimize and scale up the biosorption process using soy-based biosorbents, the ANNs models were used to determine the conditions that lead to a maximum *q*, *E*, taking into account the specificity of each metal ion. The resulting optimization data showed that the soybean waste biomass is an effective biosorbent for heavy metal ions, enduring a very good removal efficiency, so it can be unreservedly recommended as a biosorbent, in an efficient, low-cost and sustainable way to capitalize on this waste.

**Author Contributions:** Conceptualization, L.B., S.C. and M.G.; methodology, L.B., E.N.D. and D.I.F.; formal analysis, L.B. and S.C.; investigation, D.I.F., E.N.D. and L.B.; resources, L.B., E.N.D. and D.I.F.; data curation, L.B., E.N.D. and D.I.F.; writing—original draft preparation, L.B., E.N.D. and M.G.; writing—review and editing, L.B., S.C. and M.G.; visualization, D.I.F., E.N.D. and L.B.; supervision, L.B., S.C. and M.G.; project administration M.G.; funding acquisition, M.G. All authors have read and agreed to the published version of the manuscript.

**Funding:** This work was supported by a grant of the Romanian Ministry of Education and Research, CCCDI—UEFISCDI, project number PN-III-P2-2.1-PED-2019-5239, Contract no. 269PED/2020, within PNCDI III.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**

