A mechanism and data collaborative driving-based precise prediction modeling method for copper electrolysis effluent concentration
By combining mechanistic models and machine learning models, a theoretical model was constructed based on the law of conservation of metal ion mass and residual correction was performed. This solved the error and interpretability problems of traditional models in predicting the concentration of electrolyte output, and achieved high-precision and stable prediction results.
Patent Information
- Application Number
- CN202511478831.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-16
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2045-10-16
AI Technical Summary
In existing technologies, the simplification of complex electrolysis processes by traditional mechanistic models leads to large prediction errors, while pure data-driven models lack physical interpretation and generalization ability, making it difficult to stably predict the concentration of metal ions in the electrolyte under small sample conditions, thus affecting electrolysis efficiency and product quality.
By combining mechanistic models and machine learning models, a theoretical model is constructed based on the law of conservation of metal ion mass, and the residuals are corrected using machine learning models, thereby achieving high-precision prediction of the concentration of metal ions in the electrolyte.
It improves the interpretability and accuracy of prediction results, enhances the generalization ability of the model, reduces the impact of outliers, ensures that the prediction results are consistent with the actual trend, and is applicable to the concentration prediction of various metal ions.
Smart Images

Figure CN120954538B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence-enabled clean production technology in non-ferrous metallurgy, and more specifically, to a method for accurate prediction and modeling of copper electrolytic solution concentration based on mechanism and data synergy. Background Technology
[0002] High-purity copper is widely used in important fields such as electronics, power, and machinery manufacturing. Electrolytic refining is the main process for producing high-purity copper. The concentration of metal or metalloid ions (Me) such as copper, arsenic, antimony, bismuth, and nickel in the electrolyte has a significant impact on parameters such as electrolysis efficiency, product quality, and energy consumption. During production, in order to improve resource utilization, companies often mix more than 90% of the effluent from the electrolytic cell with a small portion of purified electrolyte and then pump it back to the electrolytic cell for recycling. Due to the existence of unstable factors such as anode composition, electrolysis conditions, and electrolyte composition, the concentration composition of metal ions in the effluent from the electrolytic cell often varies significantly. Failure to promptly determine the concentration composition of the main metal ions in the effluent will significantly affect the use of the electrolyte in the next cycle, resulting in a deterioration in electrolysis production indicators (power consumption, power efficiency, and product purity) and total pollution generation. Therefore, accurately predicting the concentration of metal ions (Me) in the effluent is of great significance for optimizing electrolysis process parameters, improving production efficiency, and ensuring product quality.
[0003] Traditional mechanistic models based on electrochemical theory (such as the Nernst equation and mass transfer diffusion model) have problems such as oversimplification of complex processes, high sensitivity to parameters, and insufficient fitting accuracy. Meanwhile, pure data-driven models based on machine learning are "black box structures" that are difficult to explain the causal relationship between prediction results and process parameters. They are unstable under small sample conditions, sensitive to outlier data, and have insufficient generalization ability.
[0004] Currently, hybrid modeling, which combines machine learning models with mechanistic models, can leverage the physical interpretability of mechanistic models to build a basic prediction framework and combine it with machine learning models to improve prediction accuracy. This effectively solves the problems of large errors caused by the simplification process in traditional mechanistic models and the lack of physical meaning and insufficient generalization ability of pure data-driven models when data is scarce. It achieves a balance between prediction accuracy and interpretability, thereby providing technical support for industrial decision-making that combines accuracy and reliability. Summary of the Invention
[0005] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a modeling method for accurate prediction of copper electrolyte concentration based on mechanism and data synergy. By constructing a theoretical model based on the law of conservation of metal ion mass and using a machine learning model to learn and correct the theoretical residuals, a high-precision prediction of the metal ion concentration in the electrolyte is achieved, thereby solving the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for accurate prediction and modeling of copper electrolyte concentration based on mechanism and data synergy, comprising:
[0007] Relevant feature variables were extracted from historical data records of the electrolytic cell control system and the electrolytic cell inlet and outlet liquid monitoring system for copper electrolytic refining. The data was exported at fixed time intervals to obtain the input variable dataset.
[0008] The concentration data of effluent metal ions Me are continuously monitored at the same time intervals, and the input variables of the input variable dataset are matched in time series to obtain the output variable dataset. The input and output datasets are then cleaned.
[0009] Based on the correlation coefficients between the input variables, the input variable dataset is filtered to remove redundant variable data.
[0010] The cleaned and filtered output and input variable datasets were normalized to [-1, 1], and 80% of the entire dataset was used as the training set and the remaining 20% as the test set.
[0011] A theoretical model is constructed based on the mass conservation law of metal ions (Me) during copper electrolysis. The parameters of the theoretical model are inverted using the least squares method. Using training data as input, the mean square error between the theoretical model's predicted value and the actual measured value of the effluent metal ion (Me) concentration is minimized to obtain the optimal parameter combination. A machine learning algorithm is used to construct a residual prediction model. The normalized input variables are used as input, and the difference between the theoretical model's predicted value and the actual measured value of the effluent metal ion (Me) concentration is used as output. The residual prediction model is used to correct the theoretical model's predicted value, so that the mean absolute percentage error between the corrected predicted value and the actual measured value of the effluent metal ion (Me) concentration is less than 5%. The corrected model is then saved as a training model.
[0012] The hyperparameters of the initial prediction model are adjusted and trained multiple times to obtain multiple training models. Among the multiple training models, the target training model is selected as the final prediction model based on the screening criteria of the smallest mean absolute percentage error and the largest coefficient of determination. The relevant feature variable parameters at the current time point are input into the final prediction model, and the predicted value of the liquid metal ion Me concentration at the current time point is output. The training model is used in the test set to evaluate the prediction effect on the test set.
[0013] In a preferred embodiment, the relevant characteristic variables include anode plate metal content characteristic variables, electrolyte inlet parameters characteristic variables, and electrolysis operating conditions characteristic variables;
[0014] The characteristic variables of the metal content of the anode plate include the copper content, arsenic content, bismuth content, antimony content, and nickel content of the anode plate;
[0015] The characteristic variables of the electrolyte influent parameters include the concentrations of sulfate ions, chloride ions, copper ions, arsenic ions, antimony ions, bismuth ions, and nickel ions in the influent.
[0016] The characteristic variables of the electrolysis operating conditions include electrolysis time, current density, and number of electrolytic cells.
[0017] In a preferred implementation, dataset cleaning includes removing outliers and imputing missing values. Outliers are removed using the quartile method (IQR). The data is sorted by size, and the lower quartile Q1 (25th quartile) and upper quartile Q3 (75th quartile) are calculated. IQR = Q3 - Q1 is calculated. Outlier thresholds are set: lower limit = Q1 - 1.5 × IQR, upper limit = Q3 + 1.5 × IQR. Samples below the lower limit or above the upper limit are removed.
[0018] The missing values are filled using linear interpolation, and the calculation formula is as follows:
[0019]
[0020] In the formula Indicates the sample number is The new value after interpolation calculation to fill in the gaps; The starting sample number where the missing value appears; The sequence number of the last sample to be found where a missing value appears; The sample number to be processed; This indicates the monitoring value of the known sample preceding the starting position of the missing interval; This represents the monitoring value of a known sample following the end of the missing interval; This indicates the number of intervals between the starting and ending sample numbers; This represents the number of intervals between the current missing sample and the starting sample number; This indicates the range of sample numbers to which the interpolation calculation is applicable.
[0021] In a preferred implementation, the correlation coefficient between the input variables is calculated using the following formula to calculate the Pearson correlation coefficient:
[0022]
[0023] In the formula, x and y represent two variable data points, and Represents the average value of variables; This represents the Pearson correlation coefficient between the input variables; The number of paired samples; , For the first The values of the two input variables for each sample Indicates the input variable in Arithmetic mean of each sample Indicates index arrive An operator that sums all samples; , Indicates the first The deviation of the two input variable values of a sample from its mean
[0024] Input variables with a correlation coefficient greater than 0.9 in the input variable dataset are removed as redundant variables.
[0025] In a preferred implementation, the cleaned and filtered output variable dataset and input variable dataset are normalized to [-1, 1], specifically including:
[0026] The Min-max normalization method is used to transform all variable data into supervised learning data in the interval [-1, 1]. The calculation formula is as follows:
[0027]
[0028] In the formula, Indicates the normalized i-th The value of each data point. For the first in the dataset Data points, and These are the maximum and minimum values in a certain type of data. and These are the upper and lower limits of the interval to be normalized, respectively.
[0029] In a preferred implementation, the theoretical model based on the law of conservation of mass of metal ions Me during copper electrolysis is as follows:
[0030]
[0031] In the formula, This represents the predicted concentration of metal ion Me in the effluent, calculated based on the law of conservation of mass. For current density, The concentration of Me in the influent is... The number of electrolytic cells in use; , , , , , and The model parameters to be determined are those to be inverted; these model parameters are determined by fitting them onto the training dataset using the least squares method.
[0032] The formula for minimizing the mean square error between the theoretical model prediction and the actual measured value of the effluent metal ion (Me) concentration is as follows:
[0033]
[0034] In the formula, Mean square error, For the output variable in the dataset, the first Data points, For the output variable in the dataset, the first Predicted values for each data point This represents the total number of data points.
[0035] In a preferred embodiment, the mean absolute percentage error is calculated as follows:
[0036]
[0037] The formula for calculating the coefficient of determination is:
[0038]
[0039] In the formula, For the output variable in the dataset, the first Data points, For the output variable in the dataset, the first Predicted values for each data point For the total number of data, The concentration of effluent metal ions Me is at The arithmetic mean of the samples; Indicates the mean absolute percentage error; This represents the coefficient of determination.
[0040] In a preferred implementation, the hyperparameters of the final prediction model include: 10-500 base models, 1000 iterations, a learning rate of 0.001-0.1, a tree depth of 0-6, an L2 regularization coefficient of 3, and a random seed of 42.
[0041] In a preferred embodiment, this method is applicable to the prediction of the concentration of various substances during the electrolytic refining of non-ferrous metals, wherein the metal ion Me includes different components such as copper, arsenic, antimony, bismuth, or nickel.
[0042] In a preferred implementation, the machine learning algorithm includes the ExtraTrees algorithm, the CatBoost algorithm, the XGBoost algorithm, or the SVR algorithm.
[0043] The technical effects and advantages of this invention are as follows:
[0044] The method of this invention combines a mechanistic model driven by the law of conservation of mass with a machine learning residual correction model. It uses the mechanistic model to ensure that the prediction process follows physical laws, and uses machine learning to capture complex nonlinear relationships, thereby taking into account both the interpretability and high accuracy of the prediction results.
[0045] The theoretical model based on the law of mass conservation of metal ions Me during copper electrolysis provides a trend constraint for prediction. Even when the inlet and outlet of the dynamic electrolysis unit fluctuate greatly, the predicted trend can be kept consistent with the actual change direction, thus improving the generalization ability of the model.
[0046] By introducing machine learning algorithms to model and correct the residuals of the theoretical model, it is possible to effectively identify and compensate for systematic deviations caused by errors in the online detection system or fluctuations in human operation, thereby reducing the deviation between the predicted and actual values.
[0047] Compared to machine learning models that rely solely on theoretical models or purely data-driven models, the method of this invention exhibits stronger robustness when dealing with outlier data. This is because the trend constraints of the mechanistic model reduce the impact of outliers, while the residual correction model can further weaken the interference of outlier fluctuations.
[0048] This method is applicable to different metal or metalloid ions and can maintain high accuracy in predicting the effluent concentration of various components such as copper, arsenic, antimony, bismuth, and nickel. This is due to the universal structure of the mechanism and the flexible adaptability of the machine learning part.
[0049] The results of the examples show that, in the task of predicting copper ion concentration, the coefficient of determination R on the test set of this method is [value missing]. 2 It improved by 11.3%, and the mean absolute percentage error (MAPE) decreased by 29.2%; in arsenic ion prediction, R 2 The performance was improved by 15% and MAPE decreased by 31.3%, which verified its performance advantages under different target components. Attached Figure Description
[0050] Figure 1 This is a graph showing the concentration of copper ions in the electrolyte solution within one year after data cleaning in this invention.
[0051] Figure 2 This is a thermogram showing the correlation coefficients between the input variables and the concentration of copper ions in the effluent in this invention.
[0052] Figure 3 This is a scatter plot and a zero-error curve comparing the actual and predicted values of the liquid copper ion concentration predicted by the least squares model in this invention.
[0053] Figure 4 This is a scatter plot comparing the actual and predicted values of liquid copper ion concentration predicted by the hybrid model in this invention with the zero-error curve. Detailed Implementation
[0054] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0055] Refer to the instruction manual appendix Figure 1-4 The present invention provides a method for accurate prediction and modeling of copper electrolyte concentration based on mechanism and data synergy, comprising:
[0056] Relevant feature variables were extracted from historical data records of the electrolytic cell control system and the electrolytic cell inlet and outlet liquid monitoring system for copper electrolytic refining. The data was exported at fixed time intervals to obtain the input variable dataset.
[0057] The concentration data of effluent metal ions Me are continuously monitored at the same time intervals, and the input variables of the input variable dataset are matched in time series to obtain the output variable dataset. The input and output datasets are then cleaned.
[0058] Based on the correlation coefficients between the input variables, the input variable dataset is filtered to remove redundant variable data.
[0059] The cleaned and filtered output and input variable datasets were normalized to [-1, 1], and 80% of the entire dataset was used as the training set and the remaining 20% as the test set.
[0060] A theoretical model is constructed based on the mass conservation law of metal ions (Me) during copper electrolysis. The parameters of the theoretical model are inverted using the least squares method. Using training data as input, the mean square error between the theoretical model's predicted value and the actual measured value of the effluent metal ion (Me) concentration is minimized to obtain the optimal parameter combination. A machine learning algorithm is used to construct a residual prediction model. The normalized input variables are used as input, and the difference between the theoretical model's predicted value and the actual measured value of the effluent metal ion (Me) concentration is used as output. The residual prediction model is used to correct the theoretical model's predicted value, so that the mean absolute percentage error between the corrected predicted value and the actual measured value of the effluent metal ion (Me) concentration is less than 5%. The corrected model is then saved as a training model.
[0061] The hyperparameters of the initial prediction model were adjusted and trained multiple times to obtain multiple training models. Among these training models, the target training model was selected as the final prediction model based on the criteria of having the smallest mean absolute percentage error and the largest coefficient of determination. The relevant feature variable parameters at the current time point were input into the final prediction model, and the predicted value of the effluent metal ion (Me) concentration at the current time point was output. The training model was then applied to a test set to evaluate its prediction performance on the test set.
[0062] It should be noted that the existing electrolytic cell control system is an automated monitoring and execution platform used to maintain the stable operation of the electrolytic refining process. This system integrates a series of necessary sensors, including a Hall effect current sensor (monitoring current density) for controlling the electrochemical reaction rate, a thermocouple temperature sensor (monitoring electrolyte temperature) for ensuring the stability of the electrolyte's physicochemical properties, and an electromagnetic flowmeter (monitoring electrolyte circulation flow rate) for ensuring mass transfer uniformity. The electrolytic cell control system continuously collects key electrolysis operating conditions at the second level, forming dynamic time-series data reflecting the physical state of the process. In addition, the existing electrolytic cell influent and effluent substance monitoring system is an online or offline analytical device used to quantitatively track the dynamic evolution of anode plate content or electrolyte influent and effluent chemical composition in real time or periodically. This system includes rapid concentration trend monitoring using an online titrator or ion-selective electrode, supplemented by periodic high-precision detection using a laboratory atomic absorption spectrometer or inductively coupled plasma spectrometer, thereby obtaining the metal content of the anode plate and the composition of the electrolyte influent and effluent.
[0063] Furthermore, the relevant characteristic variables include anode plate metal content characteristic variables, electrolyte inlet parameters characteristic variables, and electrolysis operating conditions characteristic variables;
[0064] The characteristic variables of the metal content of the anode plate include the copper content, arsenic content, bismuth content, antimony content, and nickel content of the anode plate;
[0065] The characteristic variables of the electrolyte influent parameters include the concentrations of sulfate ions, chloride ions, copper ions, arsenic ions, antimony ions, bismuth ions, and nickel ions in the influent.
[0066] The characteristic variables of the electrolysis operating conditions include electrolysis time, current density, and number of electrolytic cells.
[0067] Furthermore, the dataset cleaning process includes removing outliers and imputing missing values. Outliers are identified using the quartile method (IQR). The data is sorted by size, and the lower quartile Q1 (25th percentile) and upper quartile Q3 (75th percentile) are calculated. IQR is calculated as Q3 - Q1. Outlier thresholds are set: lower limit = Q1 - 1.5 × IQR, upper limit = Q3 + 1.5 × IQR. Samples below the lower limit or above the upper limit are removed.
[0068] The missing values are filled using linear interpolation, and the calculation formula is as follows:
[0069]
[0070] In the formula Indicates the sample number is The new value after interpolation calculation to fill in the gaps; The starting sample number where the missing value appears; The sequence number of the last sample to be found where a missing value appears; The sample number to be processed; This indicates the monitoring value of the known sample preceding the starting position of the missing interval; This represents the monitoring value of a known sample following the end of the missing interval; This indicates the number of intervals between the starting and ending sample numbers; This represents the number of intervals between the current missing sample and the starting sample number; This indicates the range of sample numbers to which the interpolation calculation is applicable.
[0071] Furthermore, the correlation coefficient between the input variables is calculated using the following formula:
[0072]
[0073] In the formula, x and y represent two variable data points, and Represents the average value of variables; This represents the Pearson correlation coefficient between the input variables; The number of paired samples; , For the first The values of the two input variables for each sample Indicates the input variable in Arithmetic mean of each sample Indicates index arrive An operator that sums all samples; , Indicates the first The deviation of the two input variable values of a sample from its mean
[0074] Input variables with a correlation coefficient greater than 0.9 in the input variable dataset are removed as redundant variables.
[0075] Furthermore, the cleaned and filtered output and input variable datasets are normalized to [-1, 1], specifically including:
[0076] The Min-max normalization method is used to transform all variable data into supervised learning data in the interval [-1, 1]. The calculation formula is as follows:
[0077]
[0078] In the formula, Indicates the normalized i-th The value of each data point. For the first in the dataset Data points, and These are the maximum and minimum values in a certain type of data. and These are the upper and lower limits of the interval to be normalized, respectively.
[0079] Furthermore, the theoretical model constructed based on the law of conservation of mass of metal ions Me during copper electrolysis is as follows:
[0080]
[0081] In the formula, This represents the predicted concentration of metal ion Me in the effluent, calculated based on the law of conservation of mass. For current density, The concentration of Me in the influent is... The number of electrolytic cells in use; , , , , , and The model parameters to be determined are those to be inverted; these model parameters are determined by fitting them onto the training dataset using the least squares method.
[0082] The formula for minimizing the mean square error between the theoretical model prediction and the actual measured value of the effluent metal ion (Me) concentration is as follows:
[0083]
[0084] In the formula, Mean square error, For the output variable in the dataset, the first Data points, For the output variable in the dataset, the first Predicted values for each data point This represents the total number of data points.
[0085] Furthermore, the formula for calculating the mean absolute percentage error is:
[0086]
[0087] The formula for calculating the coefficient of determination is:
[0088]
[0089] In the formula, For the output variable in the dataset, the first Data points, For the output variable in the dataset, the first Predicted values for each data point For the total number of data, The concentration of effluent metal ions Me is at The arithmetic mean of the samples; Indicates the mean absolute percentage error; This represents the coefficient of determination.
[0090] Furthermore, the hyperparameters of the final prediction model include: 10-500 base models, 1000 iterations, a learning rate of 0.001-0.1, a tree depth of 0-6, an L2 regularization coefficient of 3, and a random seed of 42.
[0091] Furthermore, it is applicable to the prediction of the concentration of various substances during the electrolytic refining process of non-ferrous metals, wherein the metal ion Me includes different components such as copper, arsenic, antimony, bismuth, or nickel.
[0092] Furthermore, the machine learning algorithm includes the ExtraTrees algorithm, CatBoost algorithm, XGBoost algorithm, or SVR algorithm.
[0093] Furthermore, this solution also includes Embodiment 1 and Embodiment 2:
[0094] Example 1:
[0095] Taking a copper electrolytic refining plant with an annual copper production capacity of 400,000 tons as an example, the specific steps of the method of the present invention are explained as follows:
[0096] Relevant characteristic variables of continuous time series were extracted from the historical data records of the DCS control system and ion concentration monitoring system of the electrolytic refining equipment. The data were exported at fixed time intervals to obtain the input variable dataset. The sampling interval of all variables in the data sample was 1 day, and the data volume was approximately 10272 data points.
[0097] The extracted relevant characteristic variables include anode plate metal content, electrolyte feed parameters, and electrolysis operating conditions. Specifically, these include: five anode plate metal content characteristics: copper (%), bismuth (%), antimony (%), nickel (%), and arsenic (%); three electrolyte feed parameters: sulfate ion concentration (g / L), copper ion concentration (g / L), and chloride ion concentration (g / L); and three electrolysis operating conditions: electrolysis time (day), current density (A / m³). 2 ) and the number of electrolytic cells;
[0098] Samples were taken from the electrolyte outlet, and the copper ion concentration data at the outlet was continuously monitored at the same time intervals using ICP-MS. Input variables were matched over time to obtain a one-year dataset of copper ion concentrations at one-day time intervals, which was used as the training and testing set for the model. The data is as follows: Figure 1 As shown;
[0099] The input and output datasets are cleaned, specifically including outlier removal and missing value imputation. Outlier removal uses the quartile range (IQR) method, and missing value imputation uses linear interpolation, calculated as follows: ;
[0100] Based on the calculation of the Pearson correlation coefficient, redundant variables are eliminated; specifically, this includes calculating the Pearson correlation coefficient between each input variable and eliminating redundant variables with a correlation greater than 0.9.
[0101] The formula for calculating the Pearson correlation coefficient is:
[0102]
[0103] The results of the Pearson correlation coefficient can be found in [link to Pearson correlation coefficient]. Figure 2 There were no relevant input variables greater than 0.9. Data transformation was performed on the filtered input variables and the effluent copper ion concentration data. Then, 80% of the entire dataset was used as the training set and 20% as the test set.
[0104] The data transformation process specifically includes, based on the influence of input variables on output variables, converting all variable data into supervised learning data in the interval [-1, 1]. The transformation method is Min-max normalization, and the calculation method is shown in the following formula:
[0105]
[0106] A theoretical model is constructed, and the calculation formula for the theoretical model is as follows: ;
[0107] A theoretical model is constructed based on the mass conservation of copper during the copper electrolytic refining process. The least squares method is used to invert the parameters of the theoretical model. The training set data is used as input to minimize the mean square error between the theoretical value and the observed value and obtain the optimal parameter combination.
[0108] The formula for calculating the mean square error is: ;
[0109] like Figure 3 As shown in the figure, the scatter plot of the true and predicted values on the test set using the least squares method is presented.
[0110] A residual prediction model was constructed using the CatBoost machine learning model, with normalized input variables as input and theoretical model residuals as output. The theoretical model prediction values were corrected by the residual prediction values output by CatBoost, so that the average absolute percentage error between the predicted value of the copper ion concentration in the liquid outlet and the actual measured value of the copper ion concentration in the liquid outlet was less than 5%. The model was then saved as a training model.
[0111] The hyperparameters of the initial prediction model are changed, and the model is trained multiple times. Among the multiple training models obtained, the model with the smallest mean absolute percentage error and the largest coefficient of determination is selected as the final prediction model.
[0112] The formula for calculating the mean absolute percentage error is: ;
[0113] The formula for calculating the coefficient of determination is: ;
[0114] The models with the smallest mean absolute percentage error and the largest coefficient of determination are used as the hyperparameters of the final prediction model, as shown in Table 1.
[0115] Table 1. Hyperparameters of the final prediction model
[0116]
[0117] Input the relevant characteristic variable parameters of the current time point into the final prediction model to obtain the predicted value of the effluent copper ion concentration at the current time point;
[0118] 20% of the test set was input into the final prediction model for inference, and the final result was as follows: Figure 4 The trend between the actual and predicted values of the effluent copper ion concentration is shown, and the coefficient of determination R of the final test set is also presented. 2 =0.89, Mean Absolute Error Percentage (MAPE) = 1.14%, such as Figure 4 The relationship between the scatter plot distribution of the predicted copper ion concentration in the liquid and the zero-error curve is shown.
[0119] Compared to the performance of directly using CatBoost for predictive modeling: R 2 =0.80, MAPE=1.61%, indicating that the copper ion concentration prediction method based on the hybrid model of CatBoost and mechanistic model has high accuracy in predicting the copper ion concentration in the effluent. R 2 It increased by 11.3%, while MAPE decreased by 29.2%;
[0120] Example 2:
[0121] Similarly, using the method of this invention, based on mechanistic modeling and XGBoost residual correction, accurate prediction and modeling of arsenic ion concentration in the electrolyte is achieved. 2 =0.92, MAPE=1.3%, compared to XGBoost prediction modeling alone R 2 Increased by 15%, MAPE increased by 31.3%.
[0122] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A mechanism and data collaborative driven method for precise prediction modeling of copper electrolysis effluent concentration, comprising: extracting relevant feature variables from historical data records of an electrolytic cell control system and an electrolytic cell inlet and outlet liquid monitoring system of copper electrolytic refining, exporting data at a fixed time interval to obtain an input variable data set; continuously monitoring the concentration data of the effluent metal ions Me at the same time interval, and matching the input variables of the input variable data set in time sequence to obtain an output variable data set, and cleaning the input data set and the output data set; screening the input variable data set according to the correlation coefficient between the input variables, and eliminating redundant variable data in the input variable data set; characterized in that: normalizing the cleaned and screened output variable data set and input variable data set to [-1, 1], and proportionally taking 80% of the total data set as a training set and the other 20% as a test set; based on the law of conservation of mass of metal ions Me in the copper electrolysis process, constructing a theoretical model, using the least squares method to inverse the parameters of the theoretical model, taking the training set data as input, minimizing the mean square error between the predicted value of the theoretical model and the actual measured value of the effluent metal ion Me concentration, obtaining the optimal parameter combination; using a machine learning algorithm to construct a residual prediction model, taking the normalized input variables as input, and taking the difference between the predicted value of the theoretical model and the actual measured value of the effluent metal ion Me concentration as output; using the residual prediction model to correct the predicted value of the theoretical model, so that the average absolute percentage error between the corrected predicted value of the effluent metal ion Me concentration and the actual measured value is less than 5%, and the corrected model is saved as a training model; adjusting the hyperparameters of the initial prediction model and training multiple times to obtain multiple training models; in the multiple training models, according to the screening condition that the average absolute percentage error is the smallest and the determination coefficient is the largest, a target training model is selected as a final prediction model; inputting the relevant feature variable parameters of the current time point into the final prediction model to output the predicted value of the effluent metal ion Me concentration at the current time point; using the training model in the test set to evaluate the prediction effect on the test set. 2.The mechanism and data collaborative driven method for precise prediction modeling of copper electrolysis effluent concentration according to claim 1, characterized in that: the relevant feature variables include anode plate metal content feature variables, electrolyte inlet parameter feature variables, and electrolytic operation condition feature variables; the anode plate metal content feature variables include anode plate copper content, anode plate arsenic content, anode plate bismuth content, anode plate antimony content, and anode plate nickel content; the electrolyte inlet parameter feature variables include sulfate ion concentration, chloride ion concentration, copper ion concentration, arsenic ion concentration, antimony ion concentration, bismuth ion concentration, and nickel ion concentration in the inlet liquid; the electrolytic operation condition feature variables include electrolysis time, current density, and electrolytic cell number. 3.The mechanism and data collaborative driven method for precise prediction modeling of copper electrolysis effluent concentration according to claim 1, characterized in that: The cleaning of the data set includes removing outliers and filling in missing values, the outliers are removed by quartile method, the data is sorted by size, the lower quartile Q1 and the upper quartile Q3 are calculated; IQR = Q3 - Q1 is calculated; the threshold of outliers is set: lower limit = Q1 - 1.5*IQR, upper limit = Q3 + 1.5*IQR; samples lower than the lower limit or higher than the upper limit are removed; The missing values are filled in by linear interpolation method, and the calculation formula is: ; In the formula indicates the sample serial number , the new value after filling the gap through interpolation calculation; is the starting sample serial number of the missing value occurrence; is the ending sample serial number of the missing value occurrence; is the sample serial number to be processed; indicates the monitoring value of the known sample before the starting position of the missing interval; indicates the monitoring value of the known sample after the ending position of the missing interval; indicates the interval number between the starting point and the ending point sample serial number; indicates the interval number between the current missing sample and the starting point sample serial number; indicates the sample serial number range applicable to interpolation calculation.
4. The mechanism and data collaborative driving-based precise prediction modeling method for copper electrolysis solution concentration according to claim 1, characterized in that: The correlation coefficient between the input variables is calculated by the following calculation formula to calculate the Pearson correlation coefficient: ; where x and y denote two variable data points, and denotes the mean of a variable; denotes the Pearson correlation coefficient between input variables; is the number of pairs of samples; , are the values of the two input variables of the th sample; denotes the arithmetic mean of the input variables over samples; denotes the operator that sums over all samples with index to ; , denotes the deviation of the two input variable values of the th sample from their mean; The input variables with a correlation coefficient greater than 0.9 in the input variable data set are removed as redundant variables.
5. The mechanism and data collaborative driving-based precise prediction modeling method for copper electrolysis solution concentration according to claim 1, characterized in that: The cleaned and screened output variable data set and input variable data set are normalized to [-1, 1], specifically including: All variable data are converted into supervised learning data in the [-1, 1] interval by using the Min-max normalization method, and the calculation formula is: ; wherein, denotes the value of the normalized th data point, is the th data point in the data set, and are the maximum and minimum values in the data set, respectively, and are the upper and lower limits of the interval on which the normalization is desired.
6. The mechanism and data collaborative driving-based precise prediction modeling method for copper electrolysis solution concentration according to claim 1, characterized in that: The theoretical model based on the mass conservation law of metal ions Me in the copper electrolysis process is: ; In the formula, represents the predicted value of the outlet concentration of metal ions Me calculated based on the mass conservation theory, is the current density, is the inlet Me concentration, is the number of activated electrolytic cells; , , , , , and are model parameters to be determined by inversion; the above model parameters are determined by fitting the training data set by the least square method; The calculation formula for minimizing the mean square error between the predicted value of the theoretical model and the actual measured value of the solution metal ion Me concentration is: ; wherein is the mean squared error, is the predicted value of the i-th data point in the output variable data set, is the predicted value of the i-th data point in the output variable data set, is the predicted value of the i-th data point in the output variable data set, is the predicted value of the i-th data point in the output variable data set, is the total number of data.
7. The mechanism and data collaborative driving-based precise prediction modeling method for copper electrolysis solution concentration according to claim 1, characterized in that: The calculation formula of the mean absolute percentage error is: ; The calculation formula of the determination coefficient is: ; In the formula, For the output variable in the dataset, the first Data points, For the output variable in the dataset, the first Predicted values for each data point For the total number of data, The concentration of effluent metal ions Me is at The arithmetic mean of the samples; Indicates the mean absolute percentage error; This represents the coefficient of determination.
8. The mechanism and data collaborative driving-based precise prediction modeling method for copper electrolysis solution concentration according to claim 1, characterized in that: The hyperparameters of the final prediction model include: the number of base models is 10-500, the number of iterations is 1000, the learning rate is 0.001-0.1, the tree depth is 0-6, the L2 regularization coefficient is 3, and the random seed is 42.
9. The mechanism and data collaborative driving-based precise prediction modeling method for copper electrolysis solution concentration according to claim 1, characterized in that: It is suitable for predicting the concentration of various substances in non-ferrous metal electrolytic refining process, and the metal ion Me includes different components of copper, arsenic, antimony, bismuth or nickel.
10. The mechanism and data collaborative driving-based precise prediction modeling method for copper electrolysis solution concentration according to claim 1, characterized in that: The machine learning algorithm includes ExtraTrees algorithm, CatBoost algorithm, XGBoost algorithm or SVR algorithm.
Citation Information
Patent Citations
Battery thermal runaway prediction method based on gradient optimization multi-physical information neural network
CN116430245A
Lithium ion battery life prediction method and collaborative driving model training method
CN120763835A