Kinetics of Impurity Removal in Zinc Hydrometallurgy Based on Parameter Estimation

Impurity removal is a momentous part of zinc hydrometallurgy process. In this paper, a hybrid modeling method of mechanism modeling and parameter estimation modeling was proposed on the basis of not changing the actual production process of lead-zinc smeltery. Firstly, the overall nonlinear dynamic mechanism model was established, and then the deviation between the theoretical value and the actual detected outlet ion concentration was taken as the objective function to establish the parameter estimation optimization model. The gradient vector and Hessian matrix of the objective function with respect to the parameter vector were derived, and the algorithm based on the steepest descent and Newton method was given. Finally, using the production data of a lead-zinc smeltery in China, the model parameters were inversed. An intensive simulation validation and analysis of the dynamic characteristics shows the accuracy and the potential of the model, also in the perspective of practical implementation, which provides the basis for the optimal control of system output and the guidance for zinc powder addition.


Introduction
Zinc hydrometallurgy has been developed rapidly due to its advantages of high metal recovery, low air pollution, low energy consumption, good working conditions, easy realization of mechanization and automation [1]. In the leaching process of zinc hydrometallurgy, the impurities in zinc sulfate leaching solution have great harm to the zinc electrolysis process. Therefore, the main impurity ions such as cadmium, cobalt, nickel and copper must be removed to the allowable content range of electrolysis process through solution purification [2].
Zinc powder is a quite significant control condition. Based on experience, excessive zinc powder is usually used to acquire the qualified solution by the operators.
Although the purification quality of zinc sulfate solution is ensured by this method, the production cost and energy consumption are greatly increased [3]. Therefore, on the premise of ensuring the continuous production of qualified electrolytic solution, reducing the consumption of zinc powder, decreasing the production cost and improving the economic benefit has become a problem to be solved in zinc hydrometallurgy production.
Sun B et al. established a data-driven model based on support vector machine to solve the problem of insufficient description ability and adaptive ability of the kinetic model, and combined it with the kinetic model [4]. Using the online measurement characteristics of the oxidation-reduction potential, an online estimation method of impurity ion concentration was proposed, which simultaneously utilized domain knowledge, offline daily production data and online data [5]. A spectrophotometric method combining continuous wavelet transform with zero-crossing technology was developed to determine cobalt and copper in zinc hydrometallurgy by Ultraviolet-visible spectroscopy without any separation steps by Zhou F et al. [6]. A collaborative optimization method of operation parameters based on fuzzy operation mode was proposed by Wu T, which solved the problem of difficult optimization of operation parameters [7]. Wang X used statistical method to analyze the distribution characteristics of uncertain parameters, introduced the idea of chance constraint, and modeled the optimization problem of copper removal process under uncertain conditions as a chance constrained optimization problem [8]. In addition, the problem of impurity removal in zinc hydrometallurgy is also studied in literature [8][9][10].
Among the current achievements, either the method requires too high accuracy of process historical data; or the method is highly dependent on expert experience, which is difficult to be applied to practice; or the coupling relationships of impurity ions in removal process are not been considered. In view of the problems existing in the research on the optimization control of the impurity removal process in the above literature, combined with the current actual process of a lead-zinc smeltery in China, the mechanism modeling for stage II purification process of zinc hydrometallurgy is carried out, and then the deviation between the theoretical value and the actual detected outlet ion concentration is taken as the objective function to establish the parameter estimation optimization model. Because the mechanism model cannot be divided into linear form, the gradient vector and Hessian matrix of the objective function with respect to the parameter vector are derived, and the optimization algorithm based on the steepest descent method and Newton method is given. The unknown parameters in the mechanism model are inversed by using the parameter estimation model, and then the nonlinear dynamic behavior characteristics of the purification process are analyzed. The corresponding simulation diagrams are obtained to verify the effectiveness of the model and realize the prediction of the outlet ion concentration for the stage II purification process, which is of great significance for the in-depth study in the actual solution purification process of zinc hydrometallurgy.

Description of stage II purification process
The target of purification process is zinc sulfate leaching solution from zinc concentrate [11]. At the solution temperature of 80°C ~ 90°C, zinc powder and antimony salt are continuously added to the reaction solution in the first reaction tank to achieve the purpose of impurity removal. The average time of the purification reaction in impurity removal process in stage II is about 2 hours, and the reactions that occur mainly include: 3 The purification effect of stage II is affected by many factors, which affect the rate of displacement reaction in varying degrees, and then affect the reaction process of removing cobalt ion and cadmium ion [12].

Modeling of stage II impurity removal process
The 8-hour temperature profile of stage II solution purification in a lead-zinc smeltery is showed in Figure 1. It can be seen from the figure that in the stage II purification process, the temperature fluctuates between 87 ℃ and 89 ℃. Consequently, in the process of modeling, it can be considered that the temperature remains unchanged and its impact on the system is ignored.
The CSTR model is a typical mechanism model of nonlinear reaction kinetics, which is used to describe the critical processes of hydrometallurgical reaction and metal ion purification in metallurgical process [13].
The solution and solid particles in the series-combined reactor model can be completely mixed. Therefore, the original chemical reaction process can still be simulated by taking the five series reactors as a whole CSTR when the mathematical model is established, as shown in Figure  2. The solution starts from the inlet of 1# reaction tank of stage II purification and needs to stay in the reaction tank for an average of 2 hours before it flows to the outlet of the 5# reaction tank. Consequently, after considering the 5 reaction tanks as a whole CSTR, the ion concentration of the outlet solution actually reflects the change of the ion concentration 2 hours ago. The CSTR model.
Using zinc powder to replace different impurity ions, the whole replacement process is coupled and interfered with each other. The degree of this mutual influence is positively related to its concentration in the solution. The greater the concentration of interfering ions is, the greater the impact on other ions is [14].
According to the above principle analysis, the nonlinear mechanism model by zinc powder replacement to remove cobalt and cadmium ion in stage II purification process can be established, as shown in formula (1).
Where, a ( ) x t and b ( ) x t represent the concentration of cobalt ion and cadmium ion at the outlet of reaction tank respectively; a0 x and b0 x are the concentration of cobalt ion and cadmium ion at the inlet of reaction tank respectively; a ( 2) x t  and b ( 2) x t  mean the concentration of cobalt ion and cadmium ion at the outlet before 2 hours respectively; a ( ) u t and b ( ) u t represent the weight of zinc powder used to remove cobalt ion and cadmium ion respectively; Q and V are the flow rate and volume of solution respectively; p means the coefficient between reaction surface area and weight of zinc powder (assuming that zinc powder particles are tiny spheres); a k and b k represent chemical reaction coefficients respectively;  and  are ion coupling coefficients respectively.
3 Parameter estimation optimization model

Parameter estimation modeling
In Section 2, the overall nonlinear dynamic mechanism model of stage II purification process is established, and the basic structure of the model is determined. However, there are still four unknown parameters to be identified in the model. Accordingly, the parameters in the model will be optimized in this section to obtain a complete hybrid dynamic model.
The basic idea of parameter estimation is to minimize the deviation between theoretical calculation and actual measurement by modifying the nominal value of parameters [15]. Here, the theoretical value is expressed as the function of the state vector S and the parameter vector , and the deviation function as shown in formula (2) can be defined to transform the estimation problem into the minimum problem of the objective function.
Where, j S is the S vector measured at the jth sampling point; aj x and bj x are the concentration of cobalt ion and cadmium ion at the outlet measured at the jth sampling point respectively; N is the total number of sampling points in the process of parameter estimation. The optimization model of parameter estimation can be expressed as: Where * χ is the optimal parameter vector.

Solving algorithm of parameter estimation optimization model
Consider using the following iterative method to solve the optimization model in formula (3): Where, the superscript (k) represents the number of iterations; χ is the parameter increment vector of each iteration.
Generally, the increment χ is determined by Newton iteration method: Where G and H are the gradient vector and Hessian matrix of the error function e respectively. The steepest descent method shown in formula (6) is used to solve χ when the Hessian matrix H is singular.
Where α is the learning rate ( ＞0 ). The convergence condition of the above iterative process is: Where 1  is the preset error limit. The formula (4) ~ (7) is synthesized, and the specific calculation flow of the algorithm for solving the above optimization model is shown in Figure 3.
Flow chart of solution algorithm for parameter estimation model.
The Hessian matrix H and gradient vector G in the above algorithm are respectively Where, a a ( , )

Results and discussion
The part to be identified in this paper is the stage II purification process of zinc hydrometallurgy in a leadzinc smeltery in China. Some actual photos are shown in Figure 4. The relevant parameters of the reaction process are shown in Table 1. Stage II purification reaction tank of zinc hydrometallurgy in a lead-zinc smeltery.

Table1. Values of relevant parameters in the reaction
process. Using the historical data of the lead-zinc smeltery in October 2020, 200 samples are selected to calculate the optimal parameters according to the parameter estimation algorithm given in Section 3.

Parameter Symbol Value
In the process of solving, the learning rate α is determined by the trial and error process. The initial value is set to 1, that is, the adjustment of parameter vector χ is determined according to 100% gradient vector, and then the value of α is gradually reduced until the three consecutive calculations can converge to the same result. At this time, it is considered that the parameter estimation algorithm has achieved stable convergence. In this paper, the value of α corresponding to the stable convergence of the algorithm is 0.03, and the value of 1  is set to

Analysis of model dynamic behaviour
According to the above description of the mathematical model in stage II purification process of zinc hydrometallurgy, the given differential equations and the identified parameters are used in this section to build the stage II purification process model in Matlab / Simulink. The inlet ion concentration values are shown in Table 2.
According to the actual production data, the ratio of zinc powder consumed in the process of removing cobalt ion and cadmium ion in the stage II purification process is about 1:5, so in the simulation model, set a b : 1:5 u u  . Figure 5 shows the response profiles of cobalt ion and cadmium ion concentration at the outlet of stage II purification process when the amount of zinc powder (control variable) changes stepwise under the condition of inlet solution flow of 160 3 m /h . It can be seen from Figure 5(a) that when the amount of zinc powder is given, the outlet cobalt ion concentration increases continuously for about 10s, and the final cobalt ion concentration value tends to be stable. Given different amount of zinc powder, the profiles of cobalt ion concentration at the outlet have a similar trend, but the final stable values are different. It can be seen that the stable value of cobalt ion concentration at the outlet is not positively correlated with the amount of zinc powder. It is not that the larger the amount of zinc powder, the smaller the concentration of cobalt ion at the outlet. The same conclusion can be drawn from Figure 5 (b).

Inlet ion Symbol Value
Cobalt ion / ( g/L ) Concentration of impurity ions at the outlet It can also be seen from Figure 5 (a) and Figure 5 (b) that with the change of a u , the concentration of cobalt ion at the outlet is constantly changing. Due to the mutual coupling between ions, the concentration of cadmium ion at the outlet is affected, and this change is almost simultaneous. In a certain range, the larger the a u is, the smaller the cobalt ion concentration at the outlet is, and the smaller effect on the cadmium ion concentration at the outlet is. Similarly, with the constant change of b u , the concentration of cadmium ion at the outlet changes, which affects the concentration of cobalt ion at the outlet, and the larger the b u is, the smaller effect of cadmium ion concentration on the concentration of cobalt ion is. It shows that different impurity ions are coupled and interfered with each other in the whole replacement process. Figure 6 shows the influence of the inlet flow rate of stage II purification process on the concentration of cobalt ion and cadmium ion in the outlet solution under the same operating conditions and input conditions. It can be seen from Figure 6(a) that when the inlet flow rate of stage II is 0.8Q, Q and 1.2Q respectively, the rising trend of cobalt ion concentration at the outlet of stage II is different, and finally the stable output state of the system is reached. The greater the inlet flow rate is, the smaller the outlet ion concentration tends to equilibrium. The outlet ion concentration has a downward trend at 6s when the inlet flow rate is 1.2Q. The reason is that under the condition of constant control variable of zinc powder, with the increase of inlet flow rate, the time to reach the reaction volume is shortened, the reaction area between zinc powder and impurity ions is increased, the decreasing time of outlet ion concentration is advanced, and the steady-state value is also decreased. The change trend in Figure 6(b) has the same situation as the change trend of the cobalt ion concentration. The influence of inlet flow Q on impurity ions concentration According to the above analysis of the principle, structure and related performance simulation for solution purification process of zinc hydrometallurgy, it can be found that solution purification process of zinc hydrometallurgy involves many complex processes, which is a nonlinear system with multiple inputs, multiple outputs and easily disturbed.

Analysis of model validity
Using the collected data, the real production process is simulated, and 80 samples are selected to test the estimation results. The test results are shown in Figure 7.

Model test results
The accuracy of the model can be verified by comparing the calculated data with the measured data. Accordingly, the average relative deviation between the calculated results of the model and the measured data is defined as the simulation error of the model in this paper [16], and the expression is shown in formula (10).