A BP Neural Network Based on GA for Optimizing Energy Consumption of Copper Electrowinning

In this paper, achieving minimum energy consumption in the copper electrowinning process is taken as the research objective. In the traditional production process, sulfate ion concentration, copper ion concentration, and current density are carried out according to the empirical value, which cannot ensure the energy consumption reaching the optimal level. Therefore, this paper proposes a BP neural network model to optimize energy consumption according to the relationship between current density, sulfate ion concentration, copper ion concentration, electrolytic tank voltage, and current eﬃciency, and the established BP neural network model is trained by using real data from the enterprise. The simulation results show that there is a deﬁnite error between the predicted electrolytic tank voltage and current eﬃciency and corresponding to predict electrolytic tank voltage and current eﬃciency measured at the production site. The BP neural network improved by GA is proposed to further improve the prediction accuracy of the BP neural network. Simulation results indicate that the prediction error of electrolytic tank voltage and current eﬃciency is greatly reduced that meets the accuracy requirements, and then the minimum energy consumption can be calculated. On the premise of guaranteeing the quality of copper electrowinning, the current density, sulfate ion concentration, and copper ion concentration corresponding to the minimum energy consumption accurately predicted by this method can be respectively adjusted in real time, which realizes the optimization of energy consumption in the process of copper electrowinning under the background of low carbon and environmental protection.


Introduction
e copper electrowinning process refers to the electrochemical process in which copper sulfate electrowinning solution is precipitated on the cathode under the action of direct current using an insoluble anode. Energy consumption is an important economic and technical index. e production of copper electrowinning is one of the important processes in the Cu hydrometallurgy. Using the lexis extraction electrowinning process has the characteristics of short flow and low cost [1]. Due to the complexity of the process, there are numerous process parameters that affect energy consumption, serious coupling between each parameter, and are strongly nonlinear. It is not easy to establish an accurate energy consumption model. Due to the harsh production environment with strong acid and high current, it is difficult to detect the key process parameters that affect energy consumption online [2]. In addition, weak technical management of the electrowinning process results in decreasing in current efficiency and increasing of electricity consumption and cost of copper electrowinning. In recent years, with the development of technological transformation and innovation, the efficiency of energy utilization in copper smelting in China has been greatly improved [3]. In the future, reducing energy consumption, improving the quality of cathode products, and automating production are the significant research fields in the copper electrowinning process.
Literature [4] proposed an improved multiobjective quantum-behaved particle swarm optimization (IMQPSO) algorithm to solve competing objectives of current efficiency and electrolytic tank voltage. However, this paper proposes a neural network optimized by a genetic algorithm (GA) to accurately predict the optimal combination of current efficiency and electrolytic tank voltage further to obtain the minimum energy consumption. A study [5] separately uses one three-layer BP neural network to predict the electrolytic tank voltage and current efficiency, which only realized single-objective optimization. erefore, this paper uses GA to optimize the BP neural network algorithm to predict electrolytic tank voltage and current efficiency, which can simultaneously achieve multiobjective optimization. In [6], the main problem concerned in the copper electrowinning process is the effect of copper ion concentration and sulfate ion concentration on energy consumption. In this process paper, not only sulfate ion concentration and copper ion concentration but also the influence of current density on energy consumption are taken into account. e traditional energy consumption optimization methods are strict to the optimization objectives, complex calculations, and slow convergence speed, and it is difficult to realize solving some complex problems effectively. e BP neural network has the advantages of simple structure, strong operability, and the ability to simulate arbitrary nonlinear input and output relations. Besides, it is also considered that the BP neural network has a slow convergence rate and is easy to fall into local optimization, which leads to low prediction accuracy. Based on the above, in this paper, the application of BP neural network based on GA optimization is proposed to realize energy consumption optimization. e BP neural network model is constructed and simulated in MATLAB. It is found that the prediction accuracy of the basic BP neural network results is lower. erefore, this paper chooses GA to optimize BP neural network to obtain more ideal prediction results to achieve the purpose of high energy conservation.

Technical Index Analysis of Copper
Electrowinning Process

Copper Electrowinning Process.
In copper electrowinning production, cathode copper is produced through Leaching-Extraction-Electrowinning process; in the electrolyte, the insoluble lead-alloy plate (Pb-Ca-Sn) is used as the anode and the thin copper starting sheet is used as the cathode. In essence, copper electrowinning is the process that copper ion is reduced by DC and deposited on the cathode. Main reactions are as follows. e copper sulfate solution CuSO 4 is decomposed into a copper ion Cu 2+ and sulfate ion SO 4 2− in the applied electric field; the process is expressed as e copper ion obtains electrons on the cathode and is reduced to copper which is deposited on the cathode; the process can be expressed as

Analysis of Technical Indicators.
e main economic and technical indexes of the copper electrowinning process are current efficiency, electrolytic tank voltage, and DC power consumption. Factors that affect energy consumption are current density, sulfate ion concentration, copper ion concentration, the temperature of electrolyte, electrolyte impurity, type and quantity of additives, electrowinning cycle, and slot spacing. In production, the increase of one economic and technical index is accompanied by the decrease of another economic and technological indicator, which affect and interact with each other.
e influence factors of current efficiency, electrolytic tank voltage, and DC power consumption are analyzed, respectively.

Current Efficiency.
According to Faraday's law, the theory is that copper of 1.1864 × 10 − 3 kg should be deposited on the cathode by DC of 1 Ampere-hour. In fact, there are impurities, oxidation and dissolution of cathode sediment, electrode short circuit, and leakage loss, which results in the actual amount of copper produced that is decreased by comparing with the theoretical value [6]. In production practice, current efficiency is proposed to evaluate effective utilization of current; it is the percentage ratio between the actual production of copper and theoretical production of the copper and expressed by where η represents current efficiency in %, G represents actual production of copper in kg during t, q represents electrochemical equivalent of copper in 1.1864 × 10 − 3 kg/Ah, I represents current intensity in A, t represents the time of electrowinning in hour, and n represents the number of electrowinning electrolytic tanks. Current efficiency is an important technical and economic index of electrowinning copper production. In production practice, due to different specific conditions, the current efficiency of copper electroproduction is different, and effective measures should be taken to improve current efficiency.

Electrolytic Tank Voltage.
e electrolytic tank voltage is defined as the voltage drop between two adjacent anode and cathode in the electrolytic tank during electrowinning. e electrolytic tank voltage is approximately 1.8 ∼ 2.4 V . It can be obtained directly by measuring the voltage between each pair of anode and cathode. In actual industrial production, due to the large number of series electrolytic tanks, the direct measurement method is generally not adopted. As an alternative, the total voltage supplied to all series electrolytic tanks is subtracted by the voltage drop of the conductive plate, and the result is divided by the total number of series electrolytic tanks to obtain electrolytic tank voltage. Electrolytic tank voltage is an important technical and economic indicator, which directly affects the electrical energy consumption of copper electrowinning [6].
e main composition of electrolytic tank voltage in copper electrowinning process is as follows: (1) Decomposition Voltage of Copper Sulfate. Decomposition potential or decomposition voltage refers to the minimum voltage (difference in electrode potential) between anode and cathode of an electrolytic tank that is needed for copper electrowinning to occur. Normally, the decomposition voltage is approximately 0.083 V.

(2) Voltage Drop across Electrowinning Solution Resistance.
Voltage drop across electrowinning solution resistance is calculated by where I represents current density in A · cm 2 , R represents the resistance of electrowinning solution in Ω cm, and L represents the distance between anode and cathode in cm . According to formula (4), the increase of the distance between anode and cathode or the resistance of electrowinning solution will result in a higher electrowinning solution voltage drop and energy consumption.

(3) Voltage Drops across Anode Resistance and Cathode
Resistance. e lead-alloy plate (Pb-Ca-Sn), the thin copper starting sheet, conductive rods, and conductive heads have resistances; therefore voltage drops are present across these resistances. Under normal conditions, the voltage drop across anode is approximately 0.02 V ∼ 0.03 V and the voltage drop across cathode is approximately 0.01 V ∼ 0.02 V.
(4) Voltage Drop across Anode Slime. With the electrowinning process proceeding, anode slime is generated on the surface of the anode and deposited at the bottom of electrolytic tanks. Consequently, a voltage drop across anode slime is generated. With the increase of anode slime, the electrolytic tank voltage must be increased to keep electrowinning process proceeding. Under normal conditions, the voltage drop across anode slime is approximately 0.15 V ∼ 0.20 V.

(5) Voltage Drop across the Contact Point.
Voltage drop across the contact point is related to the size of the contact area, the cleanliness of the contact surface, the number of contact points, and the pressure between two contact surfaces [7]. Under normal conditions, the voltage drop across the contact point is approximately 0.18 V ∼ 0.30 V.

DC Power Consumption.
In copper electrowinning production, DC power consumption in kWh/kg is defined as the electricity used to produce copper of 1 kg in 1 hour, which is an important economic and technical index. DC power consumption is calculated by where W represents DC power consumption in kWh/kg, v represents electrolytic tank voltage in V, η represents current efficiency in %, and q represents the electrochemical equivalent of copper in 1.1864 × 10 − 3 kg/Ah.

e Model of Copper Electrowinning Process.
In the process of copper electrowinning, the minimum DC power consumption is a very important economic index. According to formula (5), DC power consumption can be decreased by controlling electrolytic tank voltage and current efficiency. However, there is not a related process model in this respect in previous research. In this paper, based on analyzing the field data, the relationship between sulfate ion concentration (SO 2− 4 ), copper ion concentration (C 2+ u ), current density (D k ), and η, v is determined to train the model of copper electrowinning process. e model of copper electrowinning process is as follows: where η represents current efficiency in %, v represents electrolytic tank voltage in V, SO 2− 4 represents sulfate ion concentration in g/l, C 2+ u represents copper ion concentration in g/l, and D k represents current density in A/m 2 .

e Model of the DC Power Consumption Process.
On the basis of η and v having been predicted by using the model of copper electrowinning process expressed in formula (6), DC power consumption can be obtained via η and v according to formula (5). e model of DC power consumption is expressed in where SO 2− 4 represents sulfate ion concentration in g/l, C 2+ u represents copper ion concentration in g/l, D k represents current density in A/m 2 , and W represents DC power consumption in kWh/kg.

Construction of BP Neural Network Model
3.1. Structure of BP Neural Network. BP neural network is a kind of multilayer feedforward neural network which is widely used. e weight and threshold of the network are continuously adjusted through the back-propagation process to realize the solution of nonlinear problems. e pattern structure includes an input layer, a hidden layer, and an output layer. e input layers are used for data input, the hidden layer is used for data processing, and the output layer is used for network output. An input signal received in the input layer is transmitted to the hidden layer neuron at first and then transmitted to the next hidden layer, until being transmitted to the output layer neuron. In this process, the transmission of the input signal is transmitted layer by layer, and each time it passes through a layer, it is processed by the corresponding property function. BP neural network is a parallel and multilayer feedforward network and it has at least one hidden layer. e number of hidden layers and the number of neurons in each hidden layer are difficult to determine, which results in different output [8]. e structure diagram of the neural network is shown in Figure 1. During signal propagating, the x i � (x 1 , . . . , x n ) T from input layer enter the hidden layer, and the output values of the hidden layer neuron are obtained by the threshold and excitation function of the hidden layer neuron. e output value of the neuron j in the hidden layer h j is expressed as

Mathematical Problems in Engineering
where f 1 represents the excitation functions of the hidden layer, w ji represents the connection weight of the input layer neuron i to the hidden layer neuron j, x i represents input signal i, i � 1, ..., n, and θ j represents the threshold of hidden layer neuron j. e output value of the neuron k in the output layer o k is expressed as where f 2 represents the excitation functions of the output layer, v kj represents the connection weight of hidden layer neuron j to the output layer neuron k , j � 1, ..., s, and φ k represents the threshold of output layer neuron k. e function of sigmoi d is expressed by e definition of error function is calculated by where y k � (y 1 , . . . , y m ) T is the output of the network.

Algorithm Implementation for BP Neural Network.
Standardization of training and test data is necessary in order to reduce errors due to big different data orders of magnitude. is paper uses the normalization function to make the data fall between −1 and 1. Major processes of training BP neural network include initialization of network, adjusting weights and thresholds, prediction output, etc. e detailed training process of the BP neural network is depicted in Figure 2.

Data.
Influencing factors of copper electrowinning process have been investigated; current efficiency and electrolytic tank voltage are selected as predicted parameters under a set of different conditions mainly including sulfate ion concentration, copper ion concentration, and current density. Table 1 shows a portion of 6060 sets of data recorded at production site from a copper company in Shandong province; parameters are, respectively, sulfate ion concentration SO 2− 4 in g/l, copper ion concentration C 2+ u in g/l, current density D k in A/m 2 , current efficiency η in %, electrolytic tank voltage v in V, and DC power consumption W in kWh/kg. In order to test the prediction accuracy of the BP neural network model trained, the data in Table 1 are randomly arranged, the first 5560 groups of data are taken out for the BP neural network training, and the remaining 500 groups of data are used for testing the trained model.

BP Neural Network Simulation and Result Analysis.
According to the data in Table 1, the input parameters are SO 4 2− , C u 2+ , and D k , respectively. And the number of input layer neurons is 3. e output parameters, respectively, are η and v, and the number of output layer neurons is 2. e number of hidden layers is set to 1. e number of hidden layer neurons is set to 5. According to formula (5), the factors affecting DC power consumption are current efficiency and electrolytic tank voltage. How can current efficiency and electrolytic tank voltage be matched to achieve minimizing DC power consumption output? In this paper, the current efficiency and electrolytic tank voltage are predicted by BP neural network model. After training, the model is used for testing.
Input layer Hidden layer Output layer When the number of hidden layer neurons is set to 5, the test results are shown in Figure 3. By comparing curves corresponding to the actual values and predicted values of electrolytic tank voltage and current efficiency, the minimum mean square error (MMSE) of the prediction error of the trained model is 0.027529. It can be concluded that the BP neural network has a large error in the prediction of electrolytic tank voltage and current efficiency, and the fitness is poor. In order to reduce the prediction error and achieve error accuracy requirements, this paper proposes using GA to optimize the neural network model to improve the prediction accuracy of BP neural network and

Selection of Optimization Algorithm.
ere are a variety of methods to solve optimization problems, such as mathematical programming method, particle swarm optimization algorithm, simulated annealing method, and genetic algorithm, which are collectively referred to as linear programming or nonlinear programming. Its essence is to solve the extreme value of the function under the constraint condition. e GA is a random search optimization method; the convergence speed and efficiency of obtaining the optimal solution are high. Its advantage lies in the idea of natural selection, which searches for the optimal solution by simulating the process of natural evolution, and regards all possible solutions as chromosomes in a population; therefore, it is not necessary to limit and analyze some mathematical characteristics of the function. By breeding the population from generation to generation, according to the principle of survival of the fittest, the individuals that are the most adaptable (the minimum objective function value) are selected and have the optimal staining (solution).

Algorithm Implementation of BP Neural Network
Optimized by GA. BP neural network optimized by GA can be divided into three parts: the BP neural network algorithm model, GA optimizing the BP neural network, and prediction of the optimized BP neural network. GA is used to optimize the initial weights and thresholds of the BP neural network. e prediction error of the BP neural network is taken as the fitness value of individuals, and then these optimal individuals are found through selection, crossover, and variation process. Consequently, the optimal individuals are selected as the optimal initial weights and thresholds of the BP neural network. Figure 4 describes the flowchart of the BP neural network optimized by GA [9]. e main processes are as follows.

Population Initialization.
is paper chooses real number coding as a separate coding. Each individual represents a real string including the connection weight between the input layer and the hidden layer, the threshold of the hidden layer, the connection weight between the hidden layer and the output layer, and the threshold of the output layer. Under the condition that the network structure is constant, a BP neural network with definite structure, weights, and thresholds can be constructed.

Fitness Function.
According to the initial weights and thresholds of the BP neural network obtained by individuals, predicted output is obtained through training data. Expected output and predicted output are fitted as individual fitness, and the fitness function is calculated by where k is the coefficient; i � 1, . . . , n is the number of network output neuron; E i is the actual output of the i th neuron of BP neural network; and O i is the prediction output of the ith neuron of BP neural network.

Selection Operation.
e selection operation of GA has two methods including roulette and tournament. is paper selects the roulette based on the selection strategy as a selection operation. e selection probability p i of each individual can be calculated by where f i is the fitness of ith individual; k is the coefficient, and we set k � 1 in the analysis; and j � 1, . . . , N is the number of chromosomes.

Crossover Operation.
Because individual is coded by using real number coding, the method of real number crossover is applied in the crossover operation. e crossover operation method of kth chromosome x k and j th chromosome x l in jth place gets a new individual, calculated through x kj � x kj (1 − y) + x lj y, where y is a random number within [0, 1].

Mutation
Operation. e mutation operation looks for chromosomes randomly and produces new individuals according to a certain mutation rate. e variation method of the jth gene x ij in the ith individual is expressed by formula (16).
where x max is the upper bound of genes, x min is the lower bound of genes, g is the current number of iterations, G max is the maximum number of evolutions, and r ′ is a random number within [0, 1].

Simulation and Result Analysis of BP Neural Network
Optimized by GA. e current efficiency and electrolytic tank voltage are predicted after training BP neural network optimized by GA. We set the main parameters of BP neural network optimized by GA in MATLAB as follows: (i) Population size of GA population � 10 (ii) Maximum gen of evolutionary algebra gene � 35 (iii) Crossover rate � 0.4 (iv) Mutation probability mutation � 0.1 e predicted results are shown in Figure 5. As can be seen from Figure 5, the electrolytic tank voltage and current efficiency predicted by means of using a

Prediction of Energy Consumption after BP Optimization by GA
According to the practical production process, the three input quantities are as follows: sulfate ion concentration SO 2− 4 is in the range of 166g/l ∼ 186g/l; copper ion concentration C 2+ u is in the range of 46g/l ∼ 56g/l; current density D k is in the range of 195A/m 2 ∼ 200A/m 2 . In order to achieve the optimal energy consumption, the value of each parameter is subdivided. In this paper, each parameter is divided into 40 equal parts in its range, and all possible combinations of SO 2− 4 , C 2+ u , and D k are performed. Finally, 19656 groups are synthesized and then randomly sorted. Table 2 summarizes partial and random combinations of 19656 groups. e current efficiency and electrolytic tank voltage are predicted by GA optimized BP neural network, and then to predict the energy consumption corresponding to these 19656 groups of data.
In the production of copper electrowinning, the purpose is to obtain the minimum DC power consumption in the process of electrowinning. DC power consumption is obtained by minimizing the ratio of electrolytic tank voltage to current efficiency. What affects the electrolytic tank voltage and current efficiency is the values of sulfate ion concentration, copper ion concentration, and current density. After conducting the prediction of the BP neural network model optimized by GA, DC power consumption can be calculated through formula (5); thus, the relationship between DC power consumption and electrolytic tank voltage and current efficiency is obtained in Figure 6. e relationship between DC power consumption and group (SO 2− 4 , C 2+ u , D k ) can be obtained indirectly via formula (7) as f(SO 2− 4 , C 2+ u , D k ) ⟶ W, which is shown in Figure 7. GA is used to obtain the minimum DC power consumption of 694.9388kWh/kg within ranges of SO 2− 4 , C 2+ u , and D k . e corresponding sulfate ion concentration is 166g/l, the copper concentration is 47.8g/l, and the current density is 198.8A/m 2 . Within the same value range of SO 2− 4 , C 2+ u , and D k , the minimum energy consumption calculated based on the actual field data of the workshop was   erefore, in the production of copper electrowinning, it is according to values of SO 2− 4 , C 2+ u , and D k corresponding to the minimum energy consumption to carry on copper electrowinning production, which will greatly improve the energy utilization efficiency.

Conclusion
is paper takes reducing energy consumption in the copper electrowinning process as the research objective. BP neural network model is established according to the relationship between current efficiency and electrolytic tank voltage and current density, sulfate ion concentration, and copper ion concentration. Due to the unsatisfactory results of the BP neural network model in predicting electrolytic tank voltage and current efficiency and the defects of the model itself, such as the inaccuracy of the initial weight and threshold that affect the accuracy of the algorithm prediction, the research found that the prediction result is more accurate after GA optimizes the initial weight and threshold of BP neural network. erefore, this paper proposes to use GA to optimize the BP neural network. e simulation results indicate that, compared with the energy consumption of the traditional production process, the energy consumption optimization rate of the BP neural network based on GA can be increased by 14.25%. In copper electrowinning application production, controlling sulfate ion concentration, copper ion concentration, and current density corresponds to the minimum energy consumption predicted by the BP neural network optimized GA, which can greatly reduce energy consumption and effectively save production costs. e energy consumption optimization method proposed in this paper is applicable for not only copper electrowinning but also energy consumption optimization of other metals produced by electrowinning.

Data Availability
e data used to support the findings of this study are currently under embargo while the research findings are  commercialized. Requests for data, 12 months after publication of this article, will be considered by the corresponding author.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.