A Fuzzy Logic Model to Predict the Bioleaching Efficiency of Copper Concentrates in Stirred Tank Reactors

Multiplicity of the chemical, biological, electrochemical and operational variables and nonlinear behavior of metal extraction in bioleaching environments complicate the mathematical modeling of these systems. This research was done to predict copper and iron recovery from a copper flotation concentrate in a stirred tank bioreactor using a fuzzy logic model. Experiments were carried out in the presence of a mixed culture of mesophilic bacteria at 35 ̊C, and a mixed culture of moderately thermophilic bacteria at 50 ̊C. Input variables were method of operation (bioleaching or electrobioleaching), the type of bacteria and time (day), while the recoveries of copper and iron were the outputs. A relationship was developed between stated inputs and the outputs by means of “if-then” rules. The resulting fuzzy model showed a satisfactory prediction of the copper and iron extraction and had a good correlation of experimental data with R-squared more than 0.97. The results of this study suggested that fuzzy logic provided a powerful and reliable tool for predicting the nonlinear and time variant bioleaching processes.


Introduction
Conventional or electrochemical bioleaching of copper from concentrates in stirred tank reactors is one of the most complex and difficult processes in hydrometallurgy.It not only is nonlinear and time variant, but also is hardly defined.The bioleaching process has been constituted of two interacting subsystems: an abiotic system, which is a mineral suspension in a solution of chemical and electrochemical compounds and gases as well as a biological system, composed of a singular or mixed culture of microorganisms.For mathematical modeling of this process, mass transfer between three different phases that is too complicated, must be taken into account [1].On the other hand, the presence of several species of acidophilic bacteria, which have different mechanisms to dissolve minerals (contacting and non-contacting mechanisms), has complicated the nature of the biological subsystem.So the system not only is difficult to formulate mathematically, but also is even more difficult to validate experimentally due to oversimplifications of the conditions, as a consequence, the process cannot be programmed in a precise way.
The use of fuzzy logic, which reflects the qualitative and inaccurate nature of human reasoning, can enable expert systems to be more flexible [2].It was initiated in 1965 by Lotfi A. Zadeh [3].In a fuzzy logic model, language terms (linguistic variables) are used to convey concepts relating to the system's components and language instruments (linguistic operators) are used to convey concepts relating to the interrelationship and dynamics of these components.Fuzzy logic systems are widely used for control, system identification, and pattern recognition problems.The main advantage of fuzzy interference with respect to traditional mathematical models lies in the fact that the relationship between inputs and outputs is not determined by complex equations, but by a set of logical rules, reflecting an expert's knowledge [4].In complicated process control systems, fuzzy logic is integrated with conventional PID (proportional-integral-derivative) systems and is a very useful approach in process automation [5].Fuzzy logic can be used in order to conveniently incorporate the practical in-house operating knowledge into the control solution [6].During the last decade, researchers have attempted to predict both physical and chemical processing of ores and concentrates using fuzzy logic systems [5] [7]- [10].Bioleaching process has also been modeled by different methods [11]- [15].Pazuki et al. [16] used Artificial Neural Network to optimize the bioleaching of iron from a Kaolin ore, and a good agreement was obtained between the model and experimental data.A reaction-based kinetic model for conventional and electrochemical bioleaching of copper concentrates was previously published [13].
Considering, the multiplicity of various chemical, biological, electrochemical and operational parameters, nonlinear behavior of metal extraction in bioleaching processes, and the high ability of knowledge based systems in such complex media, in this research, a multi input-multi output fuzzy logic model was defined to predict copper and iron recovery from a flotation copper concentrate in a stirred electro-bioreactor.The proposed model predicts the nonlinear behavior of conventional and electrochemical bioleaching processes successfully.

Experimental Data
Data used in this fuzzy logic modeling was obtained from an experimental work performed previously by the author and his coworkers [17].In that research, a chalcopyrite copper concentrate from the Sarcheshmeh Copper Mine (Kerman, Iran) was used to perform conventional and electrochemical bioleaching processes.X-ray fluorescence (XRF) and X-ray diffraction (XRD) analyses of the sample showed 27.7% Cu, 24.6% Fe, 14.8% S, and chalcopyrite (CuFeS 2 ) as the major mineral and pyrite (FeS 2 ) as the minor one.Experiments were carried out in a three compartment electro-bioreactor at 10% (w/v) solid content.A mixed culture of mesophilic bacteria and a mixed culture of moderately thermophilic bacteria were used at 35˚C and 50˚C, respectively.Experiments were conducted in nutrient medium, 9 K; stirring rate, 450 rpm; applied potential, 420 mV (in electrobioleaching tests); initial pH, 1.8; and aeration rate, 1.3 L•min −1 .The potential of the working electrode was controlled with respect to the reference electrode using a Solartron Sl 1287 potentiostat.The details of apparatus and techniques used have been previously described [17].

Modeling Structure
A fuzzy logic system is a nonlinear mapping of an input data (feature) vector into a scalar output [18].It contains four components: fuzzifier, rules, inference engine, and defuzzifier.In this research, the fuzzy modeling process was supported by Fuzzy Logic Toolbox of the Matlab software (version 7.4.0).The standard method of creating the model can be seen in Figure 1.

Fuzzification of Variables
Fuzzification is the process of finding the membership degrees.A membership function (MF) is a curve that defines how each point in the input space is mapped to a membership value (or degree of membership) between 0 and 1 (Fuzzy Logic Toolbox).The value 0 represents a complete non-membership, the value 1 represents a complete membership function and values in between are used to represent partial membership.The input and output variables have been fuzzified according to the linguistic sets shown in Table 1.Experimental results and expert knowledge was used to obtain the numbers of the input membership functions and base widths.As can be seen from Figures 2-4 triangular membership functions (Equation ( 1)) was used to make the input variable time and output variables copper and iron recovery.Each membership function has 30% -60% overlap with the adjacent ones.
Ordinary (crisp) sets are a special case of fuzzy sets, in which the membership function only takes two values: 0 (non-membership) and 1 (membership) [19].By considering this note, the input variables of "Method" and type of bacteria or "TOB" was defined as crisp sets which then was fuzzified in accordance with Equations ( 2) and (3).For "Method" variable, when the membership function is between 0 and 0.5, the bioleaching method (BL) is chosen and when it is between 0.5 and 1, the electrobioleaching method (EBL) is chosen.For "TOB" variable when the membership function is between 0 and 0.5, the mesophilic bacteria (M) are chosen and when it is between 0.5 and 1, the moderately thermophilic bacteria are chosen.
is the membership function of a fuzzy set; a, b, c are the constant.

Fuzzy Rule Base and Logical Operators
Fuzzy rules could be derived from both expert's reasoning and linguistic expressions and from the relationships between the system variables.To model the process, a fuzzy rule-based system was constructed with the 34 fuzzy if-then rules (Table 2).The relationships show some of the defined rules of the Mamdani fuzzy rule based system.Rules in the base contain fuzzy AND in antecedent part.To model the logical operator AND, one can use the main operator which gives the minimum membership degrees between two fuzzy sets of elements.Interpreting fuzzy AND as the minimum, one can rewrite rules as the form that is more concise: where x  contains input variables as ( ) and y Y ∈ is the output variable, and: Each rule corresponds to a fuzzy relation given by Equation (6): ( ) ( ) ( )

Fuzzy Inference
The fuzzy inference engine is the core of a fuzzy system.It is used to simulate the thinking and decision-making modes of human beings to solve problems [4].
Having translated each rule j R into x j C , the next step is to fuse all rules together.Indeed, each rule pro- duces a fuzzy set in output space as 1 , , and thus there is a need for aggregation all outputs to obtain a single fuzzy set in Y .The overall output can be calculated by means of Larson synthesis as [20]:

Defuzzification
The process of reducing final obtained fuzzy set is termed defuzzification that converts the output fuzzy set that is inferred from the fuzzy inference engine to an ordinary value in Y space.The most common defuzzification method is the centroid that gives the center of gravity of the respective output fuzzy set as follows [21]: where ( ) is the center of gravity of the area covered by function.

Model Validation
Modeling of complex and nonlinear copper bioleaching behavior (conventional and electrochemical) was done by a fuzzy logic model.A knowledge base containing if-then rules was developed in a natural language to store a human expert's experience.Variation of copper and iron recovery during electrobioleaching and bioleaching processes using both mixed mesophilic bacteria and mixed moderately thermophilic bacteria have been shown in Figure 5 and Figure 6.The figures show that the fuzzy logic model developed can predict the values of copper and iron recovery when proper input data (Method, TOB and Time) were entered.They clearly indicate that the recovery can be predicted very well with the fuzzy model in which R-squared of the model is more than 0.99 in all cases.
From Figure 5 and Figure 6, it can be seen that the fuzzy logic model can predict the recoveries at very small and very large values and the model considers the well nonlinear behavior of copper and iron extraction in different conditions.The fuzzy model could also be as a powerful tool for using in a control system on a stirred electro-bioreactor, provided a complete fuzzy knowledge base is formed on the basis of human experts' experiences and real data obtained from experiments.

Conclusion
A fuzzy logic model was obtained to predict the recoveries of copper and iron from a chalcopyrite copper  concentrate by conventional and electrochemical bioleaching processes.The recoveries of these metals are targeted functions for hydrometallurgical extraction of copper from copper flotation concentrates.The input variables were the method of process (bioleaching or electrobioleaching), the type of bacteria (mesophilic and moderately thermophilic bacteria) and time (day).A fuzzy relationship was developed between stated inputs and the outputs by means of "if-then" rules.The comparison of the experimental data and predicted values of the model showed a good match between them, in which the R-squared of the model was more than 0.97 in each series of data.The results showed the capability of the fuzzy model to flexibly predict complex and nonlinear bioleaching processes and it is a powerful tool for metal extraction in such a complicated system.

Figure 1 .
Figure 1.The fuzzy logic modeling process.

Figure 2 .
Figure 2. Fuzzy logic membership functions for time variable (input).

Figure 3 .
Figure 3. Fuzzy logic membership functions for Cu recovery (response variable).

Figure 4 .
Figure 4. Fuzzy logic membership functions for Fe recovery (response variable).

Figure 5 .
Figure 5.Comparison of copper recovery data obtained from the experiments and the fuzzy model during bioleaching and electrobioleaching in a stirred bioreactor (BL: bioleaching; ELB: electrobioleaching).

Figure 6 .
Figure 6.Comparison of iron recovery data obtained from the experiments and the fuzzy model during bioleaching and electrobioleaching in a stirred bioreactor (BL: bioleaching; ELB: electrobioleaching).

Table 1 .
Linguistic expressions used in input and output variables.