# Intelligent Hybrid Modeling of Complex Leaching System Based on LSTM Neural Network

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Hydrometallurgical Gold Leaching System

## 3. Chemical Principle of Gold Cyanidation Leaching System

## 4. Mechanism Modeling of Cascade Leaching System

## 5. Parameter Estimation Based on PSO Algorithm

## 6. Compensation Modeling Based on LSTM Neural Network

## 7. Experimental Verification

## 8. Conclusions

## Author Contributions

## Funding

## Data Availability Statement

## Conflicts of Interest

## Nomenclature

Variable | Terminology |

A_{1} | cathode region (negative electrode) |

A_{2} | anode region (positive electrode) |

$\delta $ | Nengst interface layer thickness |

$A$ | total surface area of metal in contact with water |

$v$ | dissolution rate of gold |

${C}_{CN0}$ | initial cyanide-ion concentration in the liquid (mg/kg) |

${C}_{CN}$ | cyanide-ion concentration in the liquid (mg/kg) |

${C}_{l}{}_{0}$ | initial gold concentration in the liquid (mg/kg) |

${C}_{l}$ | gold concentration in the liquid (mg/kg) |

${C}_{o}$ | oxygen concentration in the liquid (mg/kg) |

${C}_{s0}$ | initial gold grade in the ore (mg/kg) |

${C}_{S}$ | gold grade in the ore (mg/kg) |

${C}_{S\infty}$ | residual gold grade in the ore (mg/kg) |

${C}_{w}$ | solid concentration in the pulp (kg/kg) |

$\overline{d}$ | average size of the ore particles ($\mathsf{\mu}\mathrm{m}$) |

${M}_{l}$ | liquid holdup in the tank (kg) |

${M}_{s}$ | ore holdup in the tank (kg) |

${Q}_{CN}$ | cyanide flow rate added into the tank (mg/h) |

${Q}_{l}$ | liquid flow rate into the tank (kg/h) |

${Q}_{s}$ | ore flow rate into the tank (kg/h) |

${r}_{Au}$ | dissolution rate of gold in the tank [mg/(kg h)] |

${r}_{CN}$ | consumption rate of cyanide in the tank [mg/(kg h)] |

$t$ | time (h) |

$V$ | net volume of the tank reactor (${\mathrm{m}}^{3}$) |

$\tau $ | average residence time of chemical reaction |

${\rho}_{s}$ | solid density of ore pulp |

${\rho}_{l}$ | liquid density of ore pulp |

${y}_{l}$ | leaching rate of gold |

$y$ | total leaching rate of the cascade leaching system |

${C}_{sN}$ | solid gold concentration of the $Nth$ leaching tank. |

${v}_{i,j}$ | velocity update formulas of particle |

${x}_{i,j}$ | position update formulas of particle |

$d$ | dimension of the particle |

${c}_{1}$ & ${c}_{2}$ | positive learning factors (or acceleration coefficients) |

$\phi $ | velocity compression factor |

${p}_{i}$ | fitness of particle |

${p}_{g}$ | group optimal solution |

${y}_{error}$ | prediction error |

.${y}_{m}$. | mechanism model output |

$y$ | system output |

${y}_{c}$ | error compensation output |

${y}_{h}$ | hybrid model output |

${X}_{t}$ | batch data with $n$ samples |

$x$ | dimensions at time $t$ |

${h}_{t-1}$ | hidden state at the previous moment |

$W$ | learning weight parameter |

$\odot $ | operation of multiplying by the corresponding element |

$\sigma $ | sigmoid function with a range of [0, 1] |

$tanh$ | hyperbolic tangent function with a range [−1, 1]. |

$N$ | number of modes |

$n$ | number of nodes at the input layer |

$m$ | number of nodes at the output layer |

${w}_{t}$ | weight of neural network |

$\alpha $ | learning rate |

$\epsilon $ | a small constant to increase data stability |

${m}_{t}$ | exponential moving mean of the gradient |

${v}_{t}$ | square gradient |

${g}_{t}$ | gradient of the objective function |

${\beta}_{1}$ & ${\beta}_{2}$ | constants that controls exponential decay |

## References

- Le, M.N.; Lee, M.S. A review on hydrometallurgical processes for the recovery of valuable metals from spent catalysts and life cycle analysis perspective. Miner. Process. Extr. Metall. Rev.
**2021**, 42, 335–354. [Google Scholar] [CrossRef] - Feketa, P.; Schaum, A.; Meurer, T. Distributed Parameter State Estimation for the Gray–Scott Reaction-Diffusion Model. Systems
**2021**, 9, 71. [Google Scholar] [CrossRef] - Jia, R.; You, F. Multi-stage economic model predictive control for a gold cyanidation leaching process under uncertainty. AIChE J.
**2021**, 67, e17043. [Google Scholar] [CrossRef] - Marzoughi, O.; Li, L.; Pickles, C.; Ghahreman, A. Regeneration and sulfur recovery of Lanxess Lewatit AF 5 catalyst from the acidic Albion leaching process using toluene and tetrachloroethylene as organic solvents. J. Ind. Eng. Chem.
**2022**, 107, 291–301. [Google Scholar] [CrossRef] - Panda, R.; Dinkar, O.S.; Kumari, A.; Gupta, R.; Jha, M.K.; Pathak, D.D. Hydrometallurgical processing of waste integrated circuits (ICs) to recover Ag and generate mix concentrate of Au, Pd and Pt. J. Ind. Eng. Chem.
**2021**, 93, 315–321. [Google Scholar] [CrossRef] - Zhang, J.; Tan, Y.; Li, S.; Wang, Y.; Jia, R. Comparison of alternative strategies estimating the kinetic reaction rate of the gold cyanidation leaching process. ACS Omega
**2019**, 4, 19880–19894. [Google Scholar] [CrossRef] - Niu, D.; Liu, X.; Liu, Y.; Jia, M. Optimization control of hydrometallurgical leaching process based on IDE-MPC. Miner. Eng.
**2022**, 176, 107341. [Google Scholar] [CrossRef] - Abdelbari, H.; Shafi, K. A System Dynamics Modeling Support System Based on Computational Intelligence. Systems
**2019**, 7, 47. [Google Scholar] [CrossRef] - Wang, J.; Faraji, F.; Ghahreman, A. Evaluation of ozone as an efficient and sustainable reagent for chalcopyrite leaching: Process optimization and oxidative mechanism. J. Ind. Eng. Chem.
**2021**, 104, 333–344. [Google Scholar] [CrossRef] - Bi, K.; Qiu, T. An intelligent SVM modeling process for crude oil properties prediction based on a hybrid GA-PSO method. Chin. J. Chem. Eng.
**2019**, 27, 1888–1894. [Google Scholar] [CrossRef] - Sansana, J.; Joswiak, M.N.; Castillo, I.; Wang, Z.; Rendall, R.; Chiang, L.H.; Reis, M.S. Recent trends on hybrid modeling for Industry 4.0. Comput. Chem. Eng.
**2021**, 151, 107365. [Google Scholar] [CrossRef] - Ordoukhanian, E.; Madni, A.M. Model-based approach to engineering resilience in multi-UAV systems. Systems
**2019**, 7, 11. [Google Scholar] [CrossRef] - Zhang, J.; Mao, Z.Z.; He, D.K. Real time optimization based on a serial hybrid model for gold cyanidation leaching process. Miner. Eng.
**2015**, 70, 250–263. [Google Scholar] [CrossRef] - Hua, F.; Fang, Z.; Qiu, T. Application of convolutional neural networks to large-scale naphtha pyrolysis kinetic modeling. Chin. J. Chem. Eng.
**2018**, 26, 2562–2572. [Google Scholar] [CrossRef] - Sun, B.; Yang, C.; Wang, Y.; Gui, W.; Craig, I.; Olivier, L. A comprehensive hybrid first principles/machine learning modeling framework for complex industrial processes. J. Process Control
**2020**, 86, 30–43. [Google Scholar] [CrossRef] - Cai, W.; Zhang, W.; Hu, X.; Liu, Y. A hybrid information model based on long short-term memory network for tool condition monitoring. J. Intell. Manuf.
**2020**, 31, 1497–1510. [Google Scholar] [CrossRef] - Aguiar, H.C.; Maciel Filho, R. Neural network and hybrid model: A discussion about different modeling techniques to predict pulping degree with industrial data. Chem. Eng. Sci.
**2001**, 56, 565–570. [Google Scholar] [CrossRef] - Lahiri, S.K.; Ghanta, K.C. Prediction of pressure drop of slurry flow in pipeline by hybrid support vector regression and genetic algorithm model. Chin. J. Chem. Eng.
**2008**, 16, 841–848. [Google Scholar] [CrossRef] - Dai, J.; Chen, N.; Yuan, X.; Gui, W.; Luo, L. Temperature prediction for roller kiln based on hybrid first-principle model and data-driven MW-DLWKPCR model. ISA Trans.
**2020**, 98, 403–417. [Google Scholar] [CrossRef] [PubMed] - Liu, Y.; Chang, Y.; Wang, F.; Niu, D.; Zhao, L. Real-time optimization compensation method based on a novel two-level multi-block hybrid model for the hydrometallurgy process. Chem. Eng. Res. Des.
**2022**, 177, 136–156. [Google Scholar] [CrossRef] - Yuan, X.; Li, L.; Wang, Y. Nonlinear dynamic soft sensor modeling with supervised long short-term memory network. IEEE Trans. Ind. Inform.
**2019**, 16, 3168–3176. [Google Scholar] [CrossRef] - Guo, Y.; Wang, F.; Jia, M.; Zhang, S. Parallel hybrid model for mechanical draft counter flow wet-cooling tower. Appl. Therm. Eng.
**2017**, 125, 1379–1388. [Google Scholar] [CrossRef] - Yu, F.; Mao, Z.; Yuan, P.; He, D.; Jia, M. Recursive parameter estimation for Hammerstein-Wiener systems using modified EKF algorithm. ISA Trans.
**2017**, 70, 104–115. [Google Scholar] [CrossRef] [PubMed] - Yan, H.; Wang, F.; He, D.; Wang, Q. An operational adjustment framework for a complex industrial process based on hybrid Bayesian network. IEEE Trans. Autom. Sci. Eng.
**2020**, 17, 1699–1710. [Google Scholar] [CrossRef] - Guo, Z.H.; Wu, J.; Lu, H.Y.; Wang, J.Z. A case study on a hybrid wind speed forecasting method using BP neural network. Knowl.-Based Syst.
**2011**, 24, 1048–1056. [Google Scholar] [CrossRef] - Chen, J.; Gui, W.; Dai, J.; Jiang, Z.; Chen, N.; Li, X. A hybrid model combining mechanism with semi-supervised learning and its application for temperature prediction in roller hearth kiln. J. Process Control
**2021**, 98, 18–29. [Google Scholar] [CrossRef] - Hadid, B.; Duviella, E.; Lecoeuche, S. Data-driven modeling for river flood forecasting based on a piecewise linear ARX system identification. J. Process Control
**2020**, 86, 44–56. [Google Scholar] [CrossRef] - Zhou, T.; Gani, R.; Sundmacher, K. Hybrid data-driven and mechanistic modeling approaches for multiscale material and process design. Engineering
**2021**, 7, 1231–1238. [Google Scholar] [CrossRef] - Hinchliffe, M.; Montague, G.; Willis, M.; Burke, A. Hybrid approach to modeling an industrial polyethylene process. AIChE J.
**2003**, 49, 3127–3137. [Google Scholar] [CrossRef] - Liu, S.; Xu, L.; Li, D. Multi-scale prediction of water temperature using empirical mode decomposition with back-propagation neural networks. Comput. Electr. Eng.
**2016**, 49, 1–8. [Google Scholar] [CrossRef] - Narayanan, H.; Sokolov, M.; Morbidelli, M.; Butté, A. A new generation of predictive models: The added value of hybrid models for manufacturing processes of therapeutic proteins. Biotechnol. Bioeng.
**2019**, 116, 2540–2549. [Google Scholar] [CrossRef] [PubMed] - Ye, L.; Miao, A.; Zhang, H. Real-time optimization of gold cyanidation leaching process in a two-layer control architecture integrating self-optimizing control and modifier adaptation. Ind. Eng. Chem. Res.
**2017**, 56, 4002–4016. [Google Scholar] [CrossRef] - Wang, Z.; Wang, L.; Yuan, Z.; Chen, B. Data-driven optimal operation of the industrial methanol to olefin process based on relevance vector machine. Chin. J. Chem. Eng.
**2021**, 34, 106–115. [Google Scholar] [CrossRef] - Bijan, M.G.; Pillay, P. Efficiency estimation of the induction machine by particle swarm optimization using rapid test data with range constraints. IEEE Trans. Ind. Electron.
**2018**, 66, 5883–5894. [Google Scholar] [CrossRef] - Yan, Z.C.; Luo, Y.S. A particle swarm optimization algorithm based on simulated annealing. Adv. Mater. Res.
**2014**, 989, 2301–2305. [Google Scholar] [CrossRef] - Chang, Z.; Zhang, Y.; Chen, W. Electricity price prediction based on hybrid model of adam optimized LSTM neural network and wavelet transform. Energy
**2019**, 187, 115804. [Google Scholar] [CrossRef] - Bai, B.; Zhang, J.; Wu, X.; Zhu, G.W.; Li, X. Reliability prediction-based improved dynamic weight particle swarm optimization and back propagation neural network in engineering systems. Expert Syst. Appl.
**2021**, 177, 114952. [Google Scholar] [CrossRef] - Ke, K.; Hongbin, S.; Chengkang, Z.; Brown, C. Short-term electrical load forecasting method based on stacked auto-encoding and GRU neural network. Evol. Intell.
**2019**, 12, 385–394. [Google Scholar] [CrossRef]

**Figure 3.**Electrochemical principle of gold cyanidation leaching system. (A

_{1}: Cathode region (negative electrode) A

_{2}: Anode region (positive electrode). $\delta $: Nengst interface layer thickness).

$\mathit{s}$ | $\mathit{n}$ | $\mathit{m}$ |
---|---|---|

60 | 50 | 40 |

Max Epoch | Gradient Threshold | Initial Learn Rate | Learn Rate Drop Period |
---|---|---|---|

500 | 0.85 | 0.0025 | 250 |

Learn rate drop factor | Adjustment parameter ${\beta}_{1}$ | Adjustment parameter ${\beta}_{2}$ | Small constant $\epsilon $ |

0.1 | 0.9 | 0.999 | 10^{−8} |

Variables | Value | Unit |
---|---|---|

${C}_{w}$ | 39 | % |

${C}_{w0}$ | 0 | mg/kg |

${C}_{s}$ | 5 | mg/kg |

${C}_{l}$ | 0 | mg/kg |

${C}_{O}$ | 7 | mg/kg |

$\overline{d}$ | 80 | μm |

${C}_{CN0}$ | 250 | mg/kg |

${Q}_{s}$ | 2500 | kg/h |

$V$ | 68 | m^{3} |

${\rho}_{s}$ | 2.8 | g/cm^{3} |

${\rho}_{l}$ | 1 | g/cm^{3} |

**Table 4.**Estimation of gold dissolution rate and cyanide ion consumption rate (N# means the Nth Reactor).

Parameter | 1# Reactor | 2# Reactor | 3# Reactor | 4# Reactor | 5# Reactor | 6# Reactor | 7# Reactor |
---|---|---|---|---|---|---|---|

${u}_{Au}$ | 3.12 | 3.07 | 3.32 | 3.71 | 3.09 | 3.42 | 4.01 |

${u}_{CN}$ | 1.16 | 1.02 | 1.43 | 2.22 | 2.65 | 1.49 | 2.42 |

Mechanistic Model | Data Model (LSTM) | Data Model (BP) | Data Model (GRU) | |
---|---|---|---|---|

Mean | 0.0021 | 0.0033 | 0.0051 | 0.0013 |

Variance | $2.366\times {10}^{-6}$ | $5.813\times {10}^{-6}$ | $1.804\times {10}^{-5}$ | $5.6\times {10}^{-7}$ |

Hybrid Model (BP) | Hybrid Model (LSTM p = 1) | Hybrid Model (LSTM N = 3 p = 1) | Hybrid Model (LSTM p = 10) | Hybrid Model (LSTM N = 3 p = 5) | |
---|---|---|---|---|---|

Mean | 0.0011 | 0.0029 | 0.0017 | 0.0024 | 0.0005 |

Variance | $5.4\times {10}^{-7}$ | $3.331\times {10}^{-6}$ | $1.452\times {10}^{-6}$ | $2.669\times {10}^{-6}$ | $2.83\times {10}^{-7}$ |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

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

## Share and Cite

**MDPI and ACS Style**

Dong, S.; Zhang, Y.; Zhou, X.
Intelligent Hybrid Modeling of Complex Leaching System Based on LSTM Neural Network. *Systems* **2023**, *11*, 78.
https://doi.org/10.3390/systems11020078

**AMA Style**

Dong S, Zhang Y, Zhou X.
Intelligent Hybrid Modeling of Complex Leaching System Based on LSTM Neural Network. *Systems*. 2023; 11(2):78.
https://doi.org/10.3390/systems11020078

**Chicago/Turabian Style**

Dong, Shijian, Yuzhu Zhang, and Xingxing Zhou.
2023. "Intelligent Hybrid Modeling of Complex Leaching System Based on LSTM Neural Network" *Systems* 11, no. 2: 78.
https://doi.org/10.3390/systems11020078