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

Authors: Jing Wu; Yanming Cheng; Cheng Liu; Ilkyoo Lee; Wenlin Huang
Journal: Mathematical Problems in Engineering
 (2020)

---

## Abstract

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 efficiency, and the established BP neural network model is trained by using real data from the enterprise. The simulation results show that there is a definite error between the predicted electrolytic tank voltage and current efficiency and corresponding to predict electrolytic tank voltage and current efficiency 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 efficiency 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.


---

## Body

## 1. Introduction

The 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. The 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. Therefore, 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.The 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. The 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. The 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. Therefore, this paper chooses GA to optimize BP neural network to obtain more ideal prediction results to achieve the purpose of high energy conservation.


## 2. Technical Index Analysis of Copper Electrowinning Process

### 2.1. 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.The copper sulfate solutionCuSO4 is decomposed into a copper ion Cu2+ and sulfate ion SO42− in the applied electric field; the process is expressed as(1)CuSO4⟶Cu2++SO42−.The copper ion obtains electrons on the cathode and is reduced to copper which is deposited on the cathode; the process can be expressed as(2)Cu2++2e⟶Cu.


### 2.2. Analysis of Technical Indicators

The 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. The influence factors of current efficiency, electrolytic tank voltage, and DC power consumption are analyzed, respectively.


#### 2.2.1. Current Efficiency

According to Faraday’s law, the theory is that copper of1.1864×10−3kg 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(3)η=Gq⋅I⋅t⋅n×100%,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−3kg/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.


#### 2.2.2. Electrolytic Tank Voltage

The electrolytic tank voltage is defined as the voltage drop between two adjacent anode and cathode in the electrolytic tank during electrowinning. The electrolytic tank voltage is approximately1.8∼2.4V. 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].The 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.083V.(2) Voltage Drop across Electrowinning Solution Resistance. Voltage drop across electrowinning solution resistance is calculated by(4)EFluid=I⋅R⋅L,where I represents current density in A⋅cm2, 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. The 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.02V∼0.03V and the voltage drop across cathode is approximately 0.01V∼0.02V.(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.15V∼0.20V.(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.18V∼0.30V.


### 2.3. DC Power Consumption

In copper electrowinning production, DC power consumption inkWh/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(5)W=vη⋅q,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−3kg/Ah.


### 2.4. The 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 (SO42−), copper ion concentration (Cu2+), current density (Dk), and η, v is determined to train the model of copper electrowinning process. The model of copper electrowinning process is as follows:(6)fSO42−,Cu2+,Dk⟶η,v,where η represents current efficiency in %, v represents electrolytic tank voltage in V, SO42− represents sulfate ion concentration in g/l, Cu2+ represents copper ion concentration in g/l, and Dk represents current density in A/m2.


### 2.5. The 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). The model of DC power consumption is expressed in(7)fSO42−,Cu2+,Dk⟶W,where SO42− represents sulfate ion concentration in g/l, Cu2+ represents copper ion concentration in g/l, Dk represents current density in A/m2, and W represents DC power consumption in kWh/kg.


## 2.1. 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.The copper sulfate solutionCuSO4 is decomposed into a copper ion Cu2+ and sulfate ion SO42− in the applied electric field; the process is expressed as(1)CuSO4⟶Cu2++SO42−.The copper ion obtains electrons on the cathode and is reduced to copper which is deposited on the cathode; the process can be expressed as(2)Cu2++2e⟶Cu.


## 2.2. Analysis of Technical Indicators

The 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. The influence factors of current efficiency, electrolytic tank voltage, and DC power consumption are analyzed, respectively.


### 2.2.1. Current Efficiency

According to Faraday’s law, the theory is that copper of1.1864×10−3kg 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(3)η=Gq⋅I⋅t⋅n×100%,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−3kg/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.


### 2.2.2. Electrolytic Tank Voltage

The electrolytic tank voltage is defined as the voltage drop between two adjacent anode and cathode in the electrolytic tank during electrowinning. The electrolytic tank voltage is approximately1.8∼2.4V. 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].The 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.083V.(2) Voltage Drop across Electrowinning Solution Resistance. Voltage drop across electrowinning solution resistance is calculated by(4)EFluid=I⋅R⋅L,where I represents current density in A⋅cm2, 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. The 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.02V∼0.03V and the voltage drop across cathode is approximately 0.01V∼0.02V.(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.15V∼0.20V.(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.18V∼0.30V.


## 2.2.1. Current Efficiency

According to Faraday’s law, the theory is that copper of1.1864×10−3kg 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(3)η=Gq⋅I⋅t⋅n×100%,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−3kg/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.


## 2.2.2. Electrolytic Tank Voltage

The electrolytic tank voltage is defined as the voltage drop between two adjacent anode and cathode in the electrolytic tank during electrowinning. The electrolytic tank voltage is approximately1.8∼2.4V. 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].The 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.083V.(2) Voltage Drop across Electrowinning Solution Resistance. Voltage drop across electrowinning solution resistance is calculated by(4)EFluid=I⋅R⋅L,where I represents current density in A⋅cm2, 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. The 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.02V∼0.03V and the voltage drop across cathode is approximately 0.01V∼0.02V.(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.15V∼0.20V.(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.18V∼0.30V.


## 2.3. DC Power Consumption

In copper electrowinning production, DC power consumption inkWh/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(5)W=vη⋅q,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−3kg/Ah.


## 2.4. The 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 (SO42−), copper ion concentration (Cu2+), current density (Dk), and η, v is determined to train the model of copper electrowinning process. The model of copper electrowinning process is as follows:(6)fSO42−,Cu2+,Dk⟶η,v,where η represents current efficiency in %, v represents electrolytic tank voltage in V, SO42− represents sulfate ion concentration in g/l, Cu2+ represents copper ion concentration in g/l, and Dk represents current density in A/m2.


## 2.5. The 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). The model of DC power consumption is expressed in(7)fSO42−,Cu2+,Dk⟶W,where SO42− represents sulfate ion concentration in g/l, Cu2+ represents copper ion concentration in g/l, Dk represents current density in A/m2, and W represents DC power consumption in kWh/kg.


## 3. 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. The weight and threshold of the network are continuously adjusted through the back-propagation process to realize the solution of nonlinear problems. The pattern structure includes an input layer, a hidden layer, and an output layer. The 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. The number of hidden layers and the number of neurons in each hidden layer are difficult to determine, which results in different output [8]. The structure diagram of the neural network is shown in Figure 1.Figure 1
Neural network structure.During signal propagating, thexi=x1,…,xnT 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.The output value of the neuronj in the hidden layer hj is expressed as(8)hj=f1∑i=1nwjixi−θj,where f1 represents the excitation functions of the hidden layer, wji represents the connection weight of the input layer neuron i to the hidden layer neuron j, xi represents input signal i, i=1,...,n, and θj represents the threshold of hidden layer neuron j.The output value of the neuronk in the output layer ok is expressed as(9)ok=f2∑j=1svkjhj−φk,where f2 represents the excitation functions of the output layer, vkj 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. The function of sigmoid is expressed by(10)fx=11+e−x.The definition of error function is calculated by(11)E=12∑k=1mok−yk2,where yk=y1,…,ymT is the output of the network.


### 3.2. 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. This 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. The detailed training process of the BP neural network is depicted in Figure2.Figure 2
Flowchart of training BP neural network.


### 3.3. 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. Table1 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 SO42− in g/l, copper ion concentration Cu2+ in g/l, current density Dk in A/m2, 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.Table 1
Subset of 6060 sets of data.
Group numberSO42− (g/l)Cu2+ (g/l)Dk (A/m2)η (%)v (V)W (kWh/kg)1182.846.6199.210.8450.74741.7392178.5848.71950.7910.85906.8903184.947.17199.40.880.74706.9144172.3252.3197.80.7871.011083.3725169.550.78198.80.9911.01857.954⋮⋮⋮⋮⋮⋮⋮6056175.8346.6195.390.7710.76825.3056057167.453.52196.60.8180.94963.9226058177.8950.49195.570.7380.891017.4226059180.6947.51980.8730.75723.7086060167.446.29199.40.8610.85830.30


### 3.4. BP Neural Network Simulation and Result Analysis

According to the data in Table1, the input parameters are SO42−, Cu2+, and Dk, respectively. And the number of input layer neurons is 3. The output parameters, respectively, are η and v, and the number of output layer neurons is 2. The number of hidden layers is set to 1. The number of hidden layer neurons is set to 5.(i)
Setting main parameters of BP neural network in MATLAB as follows:(ii)
Normalization of input data of training samples: [inputn, inputps] = mapminmax (input_train);(iii)
Normalization of output data of training samples: [outputn, outputps] = mapminmax (output_train);(iv)
Training method of neural network: LM (Levenberg–Marquardt);(v)
The maximum number of training sessions: net.trainParam.epochs = 100;(vi)
Learning rate of neural network: net.trainParam.lr = 0.1;(vii)
Training accuracy of neural network: net.trainParam.goal = 0.000001.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. When the number of hidden layer neurons is set to 5, the test results are shown in Figure 3.Figure 3
Prediction results of BP neural network.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 finally achieve the purpose of optimizing energy consumption.


## 3.1. Structure of BP Neural Network

BP neural network is a kind of multilayer feedforward neural network which is widely used. The weight and threshold of the network are continuously adjusted through the back-propagation process to realize the solution of nonlinear problems. The pattern structure includes an input layer, a hidden layer, and an output layer. The 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. The number of hidden layers and the number of neurons in each hidden layer are difficult to determine, which results in different output [8]. The structure diagram of the neural network is shown in Figure 1.Figure 1
Neural network structure.During signal propagating, thexi=x1,…,xnT 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.The output value of the neuronj in the hidden layer hj is expressed as(8)hj=f1∑i=1nwjixi−θj,where f1 represents the excitation functions of the hidden layer, wji represents the connection weight of the input layer neuron i to the hidden layer neuron j, xi represents input signal i, i=1,...,n, and θj represents the threshold of hidden layer neuron j.The output value of the neuronk in the output layer ok is expressed as(9)ok=f2∑j=1svkjhj−φk,where f2 represents the excitation functions of the output layer, vkj 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. The function of sigmoid is expressed by(10)fx=11+e−x.The definition of error function is calculated by(11)E=12∑k=1mok−yk2,where yk=y1,…,ymT is the output of the network.


## 3.2. 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. This 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. The detailed training process of the BP neural network is depicted in Figure2.Figure 2
Flowchart of training BP neural network.


## 3.3. 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. Table1 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 SO42− in g/l, copper ion concentration Cu2+ in g/l, current density Dk in A/m2, 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.Table 1
Subset of 6060 sets of data.
Group numberSO42− (g/l)Cu2+ (g/l)Dk (A/m2)η (%)v (V)W (kWh/kg)1182.846.6199.210.8450.74741.7392178.5848.71950.7910.85906.8903184.947.17199.40.880.74706.9144172.3252.3197.80.7871.011083.3725169.550.78198.80.9911.01857.954⋮⋮⋮⋮⋮⋮⋮6056175.8346.6195.390.7710.76825.3056057167.453.52196.60.8180.94963.9226058177.8950.49195.570.7380.891017.4226059180.6947.51980.8730.75723.7086060167.446.29199.40.8610.85830.30


## 3.4. BP Neural Network Simulation and Result Analysis

According to the data in Table1, the input parameters are SO42−, Cu2+, and Dk, respectively. And the number of input layer neurons is 3. The output parameters, respectively, are η and v, and the number of output layer neurons is 2. The number of hidden layers is set to 1. The number of hidden layer neurons is set to 5.(i)
Setting main parameters of BP neural network in MATLAB as follows:(ii)
Normalization of input data of training samples: [inputn, inputps] = mapminmax (input_train);(iii)
Normalization of output data of training samples: [outputn, outputps] = mapminmax (output_train);(iv)
Training method of neural network: LM (Levenberg–Marquardt);(v)
The maximum number of training sessions: net.trainParam.epochs = 100;(vi)
Learning rate of neural network: net.trainParam.lr = 0.1;(vii)
Training accuracy of neural network: net.trainParam.goal = 0.000001.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. When the number of hidden layer neurons is set to 5, the test results are shown in Figure 3.Figure 3
Prediction results of BP neural network.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 finally achieve the purpose of optimizing energy consumption.


## 4. Realization of BP Neural Network Model Optimized by GA

### 4.1. Selection of Optimization Algorithm

There 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. The 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).


### 4.2. 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. The 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. Figure4 describes the flowchart of the BP neural network optimized by GA [9].Figure 4
Flowchart for BP neural network optimized by GA.The main processes are as follows.


#### 4.2.1. Population Initialization

This 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.


#### 4.2.2. 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(12)Fiti=k∑i=1nabsEi−Oi,where k is the coefficient; i=1,…,n is the number of network output neuron; Ei is the actual output of the ith neuron of BP neural network; and Oi is the prediction output of the ith neuron of BP neural network.


#### 4.2.3. Selection Operation

The selection operation of GA has two methods including roulette and tournament. This paper selects the roulette based on the selection strategy as a selection operation. The selection probabilitypi of each individual can be calculated by(13)pi=fi∑j=1Nfj,(14)fi=kFiti,where fi 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.


#### 4.2.4. Crossover Operation

Because individual is coded by using real number coding, the method of real number crossover is applied in the crossover operation. The crossover operation method ofkth chromosome xk and jth chromosome xl in jth place gets a new individual, calculated through(15)xkj=xkj1−y+xljy,xlj=xlj1−y+xkjy,where y is a random number within [0, 1].


#### 4.2.5. Mutation Operation

The mutation operation looks for chromosomes randomly and produces new individuals according to a certain mutation rate. The variation method of thejth gene xij in the ith individual is expressed by formula (16).(16)xij=xij+fg×xmax−xij,r>0.5,xij−fg×xij−xmin,r≤0.5,(17)fg=r′1−gGmax2,where xmax is the upper bound of genes, xmin is the lower bound of genes, g is the current number of iterations, Gmax is the maximum number of evolutions, and r′ is a random number within [0, 1].


### 4.3. Simulation and Result Analysis of BP Neural Network Optimized by GA

The 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.1The predicted results are shown in Figure5.Figure 5
Prediction results of BP neural network optimized by GA.As can be seen from Figure5, the electrolytic tank voltage and current efficiency predicted by means of using a BP neural network model optimized by GA are very close to their actual values. The MMSE is 0.00341, which is far lower than the MMSE of 0.027529 of the BP neural network without GA. Thereby, the BP neural network model optimized by GA can be used to accurately predict energy consumption.


## 4.1. Selection of Optimization Algorithm

There 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. The 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).


## 4.2. 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. The 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. Figure4 describes the flowchart of the BP neural network optimized by GA [9].Figure 4
Flowchart for BP neural network optimized by GA.The main processes are as follows.


### 4.2.1. Population Initialization

This 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.


### 4.2.2. 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(12)Fiti=k∑i=1nabsEi−Oi,where k is the coefficient; i=1,…,n is the number of network output neuron; Ei is the actual output of the ith neuron of BP neural network; and Oi is the prediction output of the ith neuron of BP neural network.


### 4.2.3. Selection Operation

The selection operation of GA has two methods including roulette and tournament. This paper selects the roulette based on the selection strategy as a selection operation. The selection probabilitypi of each individual can be calculated by(13)pi=fi∑j=1Nfj,(14)fi=kFiti,where fi 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.


### 4.2.4. Crossover Operation

Because individual is coded by using real number coding, the method of real number crossover is applied in the crossover operation. The crossover operation method ofkth chromosome xk and jth chromosome xl in jth place gets a new individual, calculated through(15)xkj=xkj1−y+xljy,xlj=xlj1−y+xkjy,where y is a random number within [0, 1].


### 4.2.5. Mutation Operation

The mutation operation looks for chromosomes randomly and produces new individuals according to a certain mutation rate. The variation method of thejth gene xij in the ith individual is expressed by formula (16).(16)xij=xij+fg×xmax−xij,r>0.5,xij−fg×xij−xmin,r≤0.5,(17)fg=r′1−gGmax2,where xmax is the upper bound of genes, xmin is the lower bound of genes, g is the current number of iterations, Gmax is the maximum number of evolutions, and r′ is a random number within [0, 1].


## 4.2.1. Population Initialization

This 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.


## 4.2.2. 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(12)Fiti=k∑i=1nabsEi−Oi,where k is the coefficient; i=1,…,n is the number of network output neuron; Ei is the actual output of the ith neuron of BP neural network; and Oi is the prediction output of the ith neuron of BP neural network.


## 4.2.3. Selection Operation

The selection operation of GA has two methods including roulette and tournament. This paper selects the roulette based on the selection strategy as a selection operation. The selection probabilitypi of each individual can be calculated by(13)pi=fi∑j=1Nfj,(14)fi=kFiti,where fi 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.


## 4.2.4. Crossover Operation

Because individual is coded by using real number coding, the method of real number crossover is applied in the crossover operation. The crossover operation method ofkth chromosome xk and jth chromosome xl in jth place gets a new individual, calculated through(15)xkj=xkj1−y+xljy,xlj=xlj1−y+xkjy,where y is a random number within [0, 1].


## 4.2.5. Mutation Operation

The mutation operation looks for chromosomes randomly and produces new individuals according to a certain mutation rate. The variation method of thejth gene xij in the ith individual is expressed by formula (16).(16)xij=xij+fg×xmax−xij,r>0.5,xij−fg×xij−xmin,r≤0.5,(17)fg=r′1−gGmax2,where xmax is the upper bound of genes, xmin is the lower bound of genes, g is the current number of iterations, Gmax is the maximum number of evolutions, and r′ is a random number within [0, 1].


## 4.3. Simulation and Result Analysis of BP Neural Network Optimized by GA

The 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.1The predicted results are shown in Figure5.Figure 5
Prediction results of BP neural network optimized by GA.As can be seen from Figure5, the electrolytic tank voltage and current efficiency predicted by means of using a BP neural network model optimized by GA are very close to their actual values. The MMSE is 0.00341, which is far lower than the MMSE of 0.027529 of the BP neural network without GA. Thereby, the BP neural network model optimized by GA can be used to accurately predict energy consumption.


## 5. Prediction of Energy Consumption after BP Optimization by GA

According to the practical production process, the three input quantities are as follows: sulfate ion concentrationSO42− is in the range of 166g/l∼186g/l; copper ion concentration Cu2+ is in the range of 46g/l∼56g/l; current density Dk is in the range of 195A/m2∼200A/m2. 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 SO42−, Cu2+, and Dk are performed. Finally, 19656 groups are synthesized and then randomly sorted. Table 2 summarizes partial and random combinations of 19656 groups. The 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.Table 2
Subset of 19656 groups (SO42−, Cu2+, Dk).
Group numberSO42−Cu2+ (g/l)Dk (A/m2)1182.149.9198.62175.148.1197.23182.149.61974176.546.9196.85173.750.5199.8⋮⋮⋮⋮1965217352199.819653182.146197.819654169.548.7197.819655168.846198.619656181.448.1196.6In 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.Figure 6
The relationship between DC power consumption and electrolytic tank voltage and current efficiency.The relationship between DC power consumption and group (SO42−, Cu2+, Dk) can be obtained indirectly via formula (7) as fSO42−,Cu2+,Dk⟶W, which is shown in Figure 7.Figure 7
The relationship between DC power consumption and group (SO42−, Cu2+, Dk).GA is used to obtain the minimum DC power consumption of694.9388kWh/kg within ranges of SO42−, Cu2+, and Dk. The corresponding sulfate ion concentration is 166g/l, the copper concentration is 47.8g/l, and the current density is 198.8A/m2. Within the same value range of SO42−, Cu2+, and Dk, the minimum energy consumption calculated based on the actual field data of the workshop was 810.47kWh/kg. Therefore, in the production of copper electrowinning, it is according to values of SO42−, Cu2+, and Dk corresponding to the minimum energy consumption to carry on copper electrowinning production, which will greatly improve the energy utilization efficiency.


## 6. Conclusion

This 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. Therefore, this paper proposes to use GA to optimize the BP neural network. The 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. The 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.



---

*Source: 1026128-2020-05-15.xml*