Resin tower regeneration cycle optimization method based on AI algorithm

By using an AI-based method to optimize the regeneration cycle of resin towers, the quality of brine at the resin tower outlet can be monitored and predicted in real time. This solves the problems of lagging traditional detection and insufficient manual judgment, enabling efficient operation and resource conservation of the resin tower and reducing production costs.

CN121744029APending Publication Date: 2026-03-27HUBEI XINGFA CHEM GRP CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-06
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

In the traditional chlor-alkali industry, the quality testing of brine at the resin tower outlet is lagging behind, and manual judgment of the resin adsorption critical point is impossible, resulting in fixed regeneration cycles, high resource consumption, and high production costs.

Method used

An AI-based method for optimizing the regeneration cycle of a resin tower is adopted. By monitoring the calcium and magnesium ion concentrations of the brine at the resin tower outlet in real time and collecting relevant operating parameters, a dynamic prediction model is constructed, multi-objective optimization algorithm constraints are set, and a decision matrix for regeneration timing is generated to achieve scientific judgment of the resin tower regeneration cycle.

Benefits of technology

It significantly extends the effective operating time of the resin tower, reduces the consumption of recycled materials such as pure water, acid, and alkali, lowers enterprise production costs, and improves production efficiency and automation level.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121744029A_ABST
    Figure CN121744029A_ABST
Patent Text Reader

Abstract

The invention provides a resin tower regeneration cycle optimization method based on an AI algorithm. The method comprises the following steps: S1, continuously monitoring the calcium and magnesium ion concentration of salt water at an outlet of a resin tower on line; s2, collecting operation parameters associated with the adsorption process of the resin tower, wherein the operation parameters comprise the salt water double-alkali excess alkali amount, turbidity, pH, ORP, flow, temperature and resin tower pressure difference; s3, constructing a resin adsorption capacity dynamic prediction model and a resin tower outlet calcium and magnesium content dynamic prediction model based on the calcium and magnesium ion concentration monitored in the step S1 and the operation parameters collected in the step S2; and S4, constraint conditions are set through a multi-objective optimization algorithm, a regeneration opportunity decision matrix is generated based on the real-time prediction data of the two dynamic prediction models constructed in the step S3, and the constraint conditions are used for judging whether a resin tower regeneration program is triggered or not. Dynamic optimization of the regeneration period of the resin tower can be realized, the quality of saline water is guaranteed, the regeneration frequency and material consumption are reduced, the production cost of an enterprise is reduced, and the operation efficiency of the resin tower is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of chlor-alkali chemical production, and in particular to a method for optimizing the regeneration cycle of resin towers based on AI algorithms. Background Technology

[0002] In the chlor-alkali industry, the effective operation of resin towers is crucial for ensuring product quality and production efficiency. Traditionally, the quality analysis of brine at the resin tower outlet relies on periodic sampling and ICP testing, a process that takes 6-8 hours and exhibits significant lag, failing to reflect real-time dynamic changes in brine quality. Furthermore, numerous factors influence resin filtration, making it difficult to manually analyze and calculate resin performance and determine the resin adsorption critical point. Under these circumstances, companies tend to adopt conservative control measures for resin tower operation, resulting in fixed resin regeneration cycles and hindering optimal resin tower efficiency, leading to frequent resin regeneration.

[0003] This high-frequency regeneration significantly increases the consumption of resources such as pure water and acids / alkalis. Statistics show that a 20-cubic-meter resin tower consumes approximately 250 cubic meters of pure water, 7 tons of 31% hydrochloric acid, and 5.6 tons of 32% liquid alkali per regeneration cycle. This excessive consumption of resources greatly increases production costs for enterprises. Therefore, improving the operating efficiency of resin towers, extending the resin regeneration cycle, and reducing resource consumption have become urgent needs for technological upgrading in the chlor-alkali industry. Summary of the Invention

[0004] The main objective of this invention is to provide a method for optimizing the regeneration cycle of resin towers based on AI algorithms, which solves the problems in the background technology of lagging quality detection of brine at the outlet of traditional resin towers, inability of manual judgment of the resin adsorption critical point leading to fixed regeneration cycles, frequent regeneration with high resource consumption, and high production costs for enterprises.

[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a resin tower regeneration cycle optimization method based on AI algorithm, comprising the following steps: S1. Continuously monitor the calcium and magnesium ion concentration of the brine at the resin tower outlet online; S2. Collect operating parameters related to the adsorption process of the resin tower, including brine double alkali excess amount, turbidity, pH, ORP, flow rate, temperature, and resin tower pressure difference; S3. Based on the calcium and magnesium ion concentrations monitored in step S1 and the operating parameters collected in step S2, construct a dynamic prediction model for resin adsorption capacity and a dynamic prediction model for calcium and magnesium content at the resin tower outlet. S4. Set constraints using a multi-objective optimization algorithm. Based on the real-time prediction data of the two dynamic prediction models constructed in step S3, generate a regeneration timing decision matrix. The constraints are used to determine whether to trigger the resin tower regeneration process.

[0006] In the preferred embodiment, in step S1, the concentration of calcium and magnesium ions is monitored in real time by an online analyzer with a ppb level accuracy of ±1 ppb.

[0007] In the preferred embodiment, in step S1, the ppb-level online analyzer uses spectral absorption to measure the concentration of calcium and magnesium ions, with a detection range of 0~100ppb, and outputs the detection data to the DCS system every 30-40 minutes.

[0008] In the preferred embodiment, the operating parameters collected in step S2 also include the calcium and magnesium content of the primary brine. The calcium and magnesium content of the primary brine is detected by spectrophotometry, with a detection range of 0–3 ppm and an error of ≤2%.

[0009] In the preferred embodiment, in step S2, all collected operating parameters are uploaded to the AI ​​server database via the Modbus protocol, with a data sampling frequency of 1-3 times / minute.

[0010] In the preferred embodiment, in step S3, both the dynamic prediction model for resin adsorption capacity and the dynamic prediction model for calcium and magnesium content at the resin tower outlet adopt a multi-task time-series large model based on the Transformer architecture and integrated with the chlor-alkali whole-process mechanism model. The steps include: A1. Construct a unified time-series input sequence: Align the calcium and magnesium ion concentrations and operating parameters collected in steps S1 and S2 according to timestamps to form a multivariate time series. , where T is the historical time step and d is the feature dimension; A2. The input sequence is position-encoded and layer-normalized, and then fed into a shared Transformer encoder, which contains L layers of self-attention modules, each layer including a multi-head self-attention mechanism and a feedforward neural network; A3. Set two independent task heads at the output of the Transformer encoder: The first task header is a fully connected regression layer, which outputs the predicted value of resin adsorption capacity. ; The second task head is a fully connected regression layer, which outputs the predicted calcium and magnesium concentration at the resin tower outlet. ; A4. Integrating the entire chlor-alkali process mechanism model as a physical constraint, specifically including: Establish the resin adsorption equilibrium equation: , where q is the amount of resin adsorbed per unit mass, c is the calcium and magnesium concentration in the solution, K is the adsorption equilibrium constant, and n is the adsorption index; Construct the material conservation equation: Where V is the effective volume of the resin tower. This refers to the concentration of imported calcium and magnesium. This refers to the total mass of the resin. The theoretical adsorption amount calculated from the mechanistic model With the rate of change of concentration As a soft constraint, a multi-task loss function is introduced: ; in The model parameters are jointly optimized through backpropagation to make them learnable weights. A5. After training, the model receives online monitoring data streams in real time and outputs dynamic predicted values ​​of resin adsorption capacity and outlet calcium and magnesium concentrations simultaneously for regeneration decision-making in step S4.

[0011] In the preferred scheme, in step S3, before constructing the Transformer-based time series model, the collected monitoring data and operating parameters need to be preprocessed, and the potential correlation patterns between parameters are jointly mined through principal component analysis and random forest algorithm to guide feature construction and model input design. The specific steps are as follows: B1. Principal component analysis is used to reveal linear coupling relationships between parameters: The original data matrix is ​​constructed from the collected m samples and n operating parameters. ; right Standardization process is performed to obtain ,in and are the mean and standard deviation of the j-th parameter, respectively; Calculate the covariance matrix Solve for its eigenvalues and the corresponding feature vectors; Analyze the principal component loading matrix to identify the original parameter combinations that share high loadings among principal components with high contribution rates, and reveal their potential synergistic or antagonistic relationships. B2. The random forest algorithm is used to quantify the nonlinear influence of each parameter on the target variable: A training set is constructed based on the original operating parameters and target variables; Construct T decision trees, each using bootstrap sampling, and randomly select nodes when splitting. One feature; Calculate the average reduction in impurity for each original parameter as its importance score; By combining the parameter coupling patterns revealed by PCA with the importance ranking of random forest, a subset of key parameters that have a significant impact on resin performance and have strong interactions are selected as the input feature dimensions of the Transformer model. B3. The subset of key parameters, together with the timestamp information, constitutes a multivariate time series input, which is used to train a large multi-task time series model.

[0012] In the preferred embodiment, the constraints in step S4 include: The calcium and magnesium ion concentration of the brine at the outlet of the first tower is ≤1ppm, and the resin adsorption capacity of the tower is ≤90%. The resin adsorption capacity of the two towers is ≥30%; During regeneration, the concentration of calcium and magnesium ions in the brine at the tail column outlet is ≤20 ppb.

[0013] In the preferred embodiment, in step S4, when any of the constraints reaches the target value, the system triggers a DCS pop-up alarm. After the production personnel confirm the alarm information, the resin tower regeneration program is automatically triggered.

[0014] In the preferred embodiment, after the resin tower regeneration program is triggered, a resin tower switching operation is performed. Specifically, the first tower that has reached the regeneration conditions is cut off from the system for regeneration, the original second tower is upgraded to a new first tower, the original third tower is upgraded to a new second tower, and the original first tower after regeneration is integrated into the system as a backup tower.

[0015] This invention provides an AI-based method for optimizing the regeneration cycle of a resin tower. By real-time monitoring of the calcium and magnesium ion concentration in the brine at the resin tower outlet and combining this method with multiple key operating parameters from upstream processes, an intelligent predictive model integrating process mechanisms is constructed, enabling precise perception and dynamic evaluation of the resin adsorption state. Based on this, by setting multi-dimensional process constraints, the optimal regeneration timing of the resin tower is scientifically determined, avoiding the problems of over-regeneration or under-regeneration that occur in traditional fixed-cycle regeneration models.

[0016] This method ensures consistently high-quality brine while significantly extending the effective operating time of the resin towers and reducing unnecessary regeneration operations. This results in a substantial decrease in the consumption of regeneration materials such as pure water, acid, and alkali, reducing resin loss and extending its service life. Furthermore, the system fully considers the safety boundary of the tail-tower water quality during multi-tower switching, effectively guaranteeing the continuous and stable operation of the entire brine purification system and improving the automation, intelligence, and economic efficiency of the chlor-alkali production process. Attached Figure Description

[0017] The present invention will be further described below with reference to the accompanying drawings and embodiments: Figure 1 This is a layout diagram of the resin tower and the online calcium and magnesium ion analyzer of the present invention; Figure 2 This is a simplified process flow diagram and a map showing the locations of each sampling data point; Figure 3 This is the operational logic diagram of the resin regeneration cycle optimization method of the present invention.

[0018] In the diagram: 1. Switching valve for the analysis port of the first tower; 2. Switching valve for the analysis port of the second tower; 3. Switching valve for the analysis port of the third tower; 4. Online calcium and magnesium ion analyzer. Detailed Implementation

[0019] Example 1 like Figure 1-3 As shown, a method for optimizing the regeneration cycle of a resin tower based on an AI algorithm includes the following steps: S1. Continuously monitor the calcium and magnesium ion concentration of the brine at the resin tower outlet online; S2. Collect operating parameters related to the adsorption process of the resin tower, including brine double alkali excess amount, turbidity, pH, ORP, flow rate, temperature, and resin tower pressure difference; S3. Based on the calcium and magnesium ion concentrations monitored in step S1 and the operating parameters collected in step S2, construct a dynamic prediction model for resin adsorption capacity and a dynamic prediction model for calcium and magnesium content at the resin tower outlet. S4. Set constraints using a multi-objective optimization algorithm. Based on the real-time prediction data of the two dynamic prediction models constructed in step S3, generate a regeneration timing decision matrix. The constraints are used to determine whether to trigger the resin tower regeneration process.

[0020] The method for optimizing the resin tower regeneration cycle based on the AI ​​algorithm is as follows: First, step S1 is executed, where a suitable detection device is installed on the resin tower outlet pipeline to continuously monitor the calcium and magnesium ion concentration of the brine at the resin tower outlet online, ensuring real-time acquisition of this key water quality indicator data. Next, step S2 is performed, where corresponding data acquisition devices are used to synchronously collect operating parameters related to the resin tower adsorption process, specifically including brine double alkali excess, turbidity, pH, ORP, flow rate, temperature, and resin tower pressure difference, ensuring the continuity and accuracy of parameter acquisition. Then, step S3 is carried out, integrating the calcium and magnesium ion concentration data monitored in step S1 with the various operating parameters collected in step S2. After processing the data using data preprocessing techniques, the algorithm is combined to mine the correlation patterns between parameters, constructing a dynamic prediction model for resin adsorption capacity and a dynamic prediction model for calcium and magnesium content at the resin tower outlet. The models are trained and validated to ensure prediction accuracy. Finally, step S4 is implemented, using a multi-objective optimization algorithm to set constraints for determining whether to trigger the resin tower regeneration program, based on step S3. The real-time prediction data output by the two dynamic prediction models are used to generate a regeneration timing decision matrix. When the matrix shows that any constraint condition reaches the trigger threshold, the subsequent resin tower regeneration-related operations can be started.

[0021] The beneficial effects of this method are as follows: Step S1 enables real-time monitoring of calcium and magnesium ion concentrations in the brine at the resin tower outlet, solving the problem of lag in traditional periodic sampling and testing, and providing timely data support for subsequent decision-making; Step S2 comprehensively collects relevant operating parameters, ensuring that the model construction has a sufficient and comprehensive data foundation, and improving the accuracy of the model in characterizing the resin adsorption process; Step S3 constructs two dynamic prediction models that can quantify the resin adsorption capacity and predict the calcium and magnesium content at the outlet, overcoming the limitation that it is difficult for humans to accurately judge resin performance and adsorption critical point; Step S4 uses a multi-objective optimization algorithm and a regeneration timing decision matrix to achieve scientific decision-making on regeneration timing, avoiding the problem of frequent regeneration caused by traditional fixed regeneration cycles. Under the premise of ensuring that the brine quality meets the requirements, it reduces the regeneration frequency of the resin tower, reduces the consumption of pure water, acids, alkalis and other materials, thereby reducing enterprise production costs and improving the operating efficiency of the resin tower.

[0022] In the preferred embodiment, in step S1, the concentration of calcium and magnesium ions is monitored in real time by an online analyzer with a ppb level accuracy of ±1 ppb.

[0023] In step S1, the ppb-level online analyzer uses spectral absorption to measure the concentration of calcium and magnesium ions, with a detection range of 0~100ppb, and outputs the detection data to the DCS system every 30-40 minutes.

[0024] In step S2, the collected operating parameters also include the calcium and magnesium content of the primary brine. The calcium and magnesium content of the primary brine is detected by spectrophotometry, with a detection range of 0 to 3 ppm and an error of ≤2%.

[0025] In step S2, all collected operating parameters are uploaded to the AI ​​server database via the Modbus protocol, with a data sampling frequency of 1-3 times per minute.

[0026] Step S1 uses a ppb-level online analyzer to monitor the calcium and magnesium ion concentration of the resin tower outlet brine in real time. The analyzer uses the spectral absorption method to measure the concentration, and its detection range covers 0~100ppb with a detection accuracy of ±1ppb. The monitored calcium and magnesium ion concentration data is automatically output to the DCS system every 30-40 minutes to ensure that the key water quality indicators of the resin tower outlet brine can be continuously, accurately and regularly obtained. Next, in step S2, when collecting operating parameters related to the resin tower adsorption process, in addition to the basic brine double alkali excess amount, turbidity, pH, ORP, flow rate, temperature, and resin tower pressure difference, the calcium and magnesium content of the brine is also collected once. The calcium and magnesium content of the brine is detected by spectrophotometry, with the detection range controlled within 0-3 ppm and the error ≤2%. At the same time, all collected operating parameters are uploaded to the AI ​​server database via the Modbus protocol. The data sampling frequency is set to 1-3 times / minute to ensure the comprehensiveness, accuracy, and timeliness of the collected operating parameters, providing data support for subsequent model construction and decision-making.

[0027] In step S1, the ppb-level online analyzer, with its spectral absorption method, detection accuracy of ±1ppb, detection range of 0~100ppb, and regular data output interval of 30-40 minutes, can capture the changes in calcium and magnesium ion concentration in the brine at the resin tower outlet in real time and accurately, avoiding the lag of traditional detection methods and providing a reliable data basis for subsequent analysis. In step S2, an additional collection of calcium and magnesium content data in the brine is conducted, and the detection method, range, and error are clarified. Simultaneously, the Modbus protocol and a sampling frequency of 1-3 times / minute are used to achieve efficient parameter uploading and collection, ensuring comprehensive coverage of operating parameters, accurate data, and timely updates. This provides high-quality data support for the subsequent construction of dynamic prediction models for resin adsorption capacity and resin tower outlet calcium and magnesium content, thereby helping to accurately generate a regeneration timing decision matrix. While ensuring brine quality, this reduces the frequency of resin tower regeneration, lowers material consumption, and improves resin tower operating efficiency and enterprise production benefits.

[0028] In the preferred embodiment, in step S3, both the dynamic prediction model for resin adsorption capacity and the dynamic prediction model for calcium and magnesium content at the resin tower outlet adopt a multi-task time-series large model based on the Transformer architecture and integrated with the chlor-alkali whole-process mechanism model. The steps include: A1. Construct a unified time-series input sequence: Align the calcium and magnesium ion concentrations and operating parameters collected in steps S1 and S2 according to timestamps to form a multivariate time series. , where T is the historical time step and d is the feature dimension; A2. The input sequence is position-encoded and layer-normalized, and then fed into a shared Transformer encoder, which contains L layers of self-attention modules, each layer including a multi-head self-attention mechanism and a feedforward neural network; A3. Set two independent task heads at the output of the Transformer encoder: The first task header is a fully connected regression layer, which outputs the predicted value of resin adsorption capacity. ; The second task head is a fully connected regression layer, which outputs the predicted calcium and magnesium concentration at the resin tower outlet. ; A4. Integrating the entire chlor-alkali process mechanism model as a physical constraint, specifically including: Establish the resin adsorption equilibrium equation: , where q is the amount of resin adsorbed per unit mass, c is the calcium and magnesium concentration in the solution, K is the adsorption equilibrium constant, and n is the adsorption index; Construct the material conservation equation: Where V is the effective volume of the resin tower. This refers to the concentration of imported calcium and magnesium. This refers to the total mass of the resin. The theoretical adsorption amount calculated from the mechanistic model With the rate of change of concentration As a soft constraint, a multi-task loss function is introduced: ; in The model parameters are jointly optimized through backpropagation to make them learnable weights. A5. After training, the model receives online monitoring data streams in real time and outputs dynamic predicted values ​​of resin adsorption capacity and outlet calcium and magnesium concentrations simultaneously for regeneration decision-making in step S4.

[0029] In step S3, both the dynamic prediction model for resin adsorption capacity and the dynamic prediction model for calcium and magnesium content at the resin tower outlet adopt a multi-task time series model based on the Transformer architecture and integrated with the chlor-alkali whole-process mechanism model. The specific implementation steps and related formulas are explained as follows: First, step A1 is executed to construct a unified time series input sequence. The calcium and magnesium ion concentrations monitored in step S1 are aligned with the operating parameters collected in step S2 according to the timestamps to form a multivariate time series. ,in Represents the overall multivariate time series. to These represent the feature vectors for each historical time step. This represents the historical time step, which is the total number of historical data time points used to build the model. This represents the characteristic dimension, namely the total number of calcium and magnesium ion concentrations and operating parameters included in each time step. This indicates that the time series belongs to OK The space of real matrix columns.

[0030] Next, step A2 is performed, where the constructed input sequence is first subjected to position encoding and layer normalization, and then the processed sequence is input into the shared Transformer encoder, which contains... Each layer of the self-attention module consists of a multi-head self-attention mechanism and a feedforward neural network. Position encoding is used to add temporal position information to the temporal data, preventing the Transformer architecture from losing temporal relationships due to parallel computation. Layer normalization is used to stabilize the data distribution and improve model training efficiency. This represents the number of layers in the self-attention module, and its number is set according to the actual data complexity and model accuracy requirements.

[0031] Then, step A3 is performed, where two independent task heads are set at the output of the Transformer encoder. Both task heads are fully connected regression layers, with the first task head used to output the predicted resin adsorption capacity value. , The representative model at time The predicted resin adsorption capacity; the second task head is used to output the predicted calcium and magnesium concentration at the resin tower outlet. , The representative model at time The predicted calcium and magnesium concentrations of the brine at the resin tower outlet.

[0032] Next, step A4 is performed, incorporating the chlor-alkali whole-process mechanism model as a physical constraint, first establishing the resin adsorption equilibrium equation. ,in This represents the amount of calcium and magnesium ions that a unit mass of resin can adsorb. This represents the adsorption equilibrium constant, the value of which is determined by operating conditions such as resin type and temperature. This represents the concentration of calcium and magnesium in the solution, specifically the concentration of calcium and magnesium ions in the current salt water. The adsorption index represents the degree of nonlinearity in the adsorption process; then, the material conservation equation is constructed. ,in This represents the effective volume of the resin tower, that is, the effective space volume within the resin tower that can hold brine and participate in the adsorption reaction. This represents the rate of change of calcium and magnesium concentrations in the solution, that is, the amount of change in calcium and magnesium concentrations in the salt water per unit time. This represents the brine flow rate, which is the volume of brine flowing into the resin tower per unit time. This represents the concentration of calcium and magnesium ions in the imported calcium and magnesium solution, specifically the concentration of calcium and magnesium ions in the brine flowing into the resin tower. This represents the total mass of resin, that is, the total mass of resin packed inside the resin tower. This represents the rate of change in the amount of resin adsorbed per unit mass, that is, the change in the mass of calcium and magnesium ions adsorbed per unit mass of resin per unit time.

[0033] The theoretical adsorption amount calculated through the mechanism model With the rate of change of concentration As a soft constraint, a multi-task loss function is introduced. ,in This represents the multi-task loss function, used to measure the deviation between the model's predicted values ​​and the actual and theoretical values. , , , These are all learnable weights, used to adjust the contribution ratio of different loss terms to the total loss. Their values ​​are automatically optimized and determined during the model training process. Represents the predicted value of resin adsorption capacity. Compared with the actual label value Between Norm, which is the square root of the sum of the squares of the deviations between the two. Predicted calcium and magnesium concentration at the resin tower outlet Compared with the actual label value Between Norm, Represents the predicted value of resin adsorption capacity. Theoretical adsorption amount calculated by the mechanistic model Between Norm, The rate of change in calcium and magnesium concentrations predicted by the representative model. Concentration change rate calculated by the mechanistic model Between The norm is then used to jointly optimize the model parameters through backpropagation, thereby improving the loss function. Minimize the value.

[0034] Finally, in step A5, after the model training is completed, the online monitoring data stream transmitted in steps S1 and S2 is received in real time. Based on this data stream, dynamic predicted values ​​of resin adsorption capacity and outlet calcium and magnesium concentration are output synchronously. These two predicted values ​​will be directly used to generate the regeneration timing decision matrix in step S4, providing data support for the triggering judgment of the resin tower regeneration program.

[0035] In the preferred scheme, in step S3, before constructing the Transformer-based time series model, the collected monitoring data and operating parameters need to be preprocessed, and the potential correlation patterns between parameters are jointly mined through principal component analysis and random forest algorithm to guide feature construction and model input design. The specific steps are as follows: B1. Principal component analysis is used to reveal linear coupling relationships between parameters: The original data matrix is ​​constructed from the collected m samples and n operating parameters. ; right Standardization process is performed to obtain ,in and are the mean and standard deviation of the j-th parameter, respectively; Calculate the covariance matrix Solve for its eigenvalues and the corresponding feature vectors; Analyze the principal component loading matrix to identify the original parameter combinations that share high loadings among principal components with high contribution rates, and reveal their potential synergistic or antagonistic relationships. B2. The random forest algorithm is used to quantify the nonlinear influence of each parameter on the target variable: A training set is constructed based on the original operating parameters and target variables (resin adsorption capacity, outlet calcium and magnesium concentration); Construct T decision trees, each using bootstrap sampling, and randomly select nodes when splitting. One feature; Calculate the average reduction in impurity for each original parameter as its importance score; By combining the parameter coupling patterns revealed by PCA with the importance ranking of random forest, a subset of key parameters that have a significant impact on resin performance and have strong interactions are selected as the input feature dimensions of the Transformer model. B3. The subset of key parameters, together with the timestamp information, constitutes a multivariate time series input, which is used to train a large multi-task time series model.

[0036] In step S3, before constructing the Transformer-based time series model, the collected monitoring data and operating parameters need to be preprocessed. Principal component analysis and random forest algorithms are then used to collaboratively mine potential correlations between parameters to guide feature construction and model input design. The specific implementation steps and related formulas are explained below: First, step B1 is performed to reveal the linear coupling relationship between parameters through principal component analysis. An original data matrix is ​​constructed from the collected m samples and n operating parameters. ,in The matrix represents the original data matrix, m represents the number of samples, i.e. the total number of samples of monitoring data and operating parameters collected, and n represents the number of operating parameters, i.e. the number of types of operating parameters collected related to the resin tower adsorption process. Next, the original data matrix Standardization process is performed to obtain ,in This represents the standardized value of the j-th parameter of the i-th sample. This represents the original value of the j-th parameter of the i-th sample in the original data matrix. This represents the mean of the j-th parameter, which is the average value of the j-th parameter across all samples. This represents the standard deviation of the j-th parameter, which is the degree to which the j-th parameter deviates from the mean across all samples. Then calculate the covariance matrix. ,in The covariance matrix, representing standardized data, is used to measure the degree of linear correlation between different parameters. Represents a standardized data matrix The transpose of the matrix, where m is the number of samples; solve for the covariance matrix. eigenvalues and the corresponding feature vector, where to The eigenvalues ​​represent the covariance matrix. The magnitude of the eigenvalues ​​reflects the information contribution of the corresponding principal components. The larger the value, the higher the contribution. The eigenvectors represent the coefficients of each principal component. Finally, the principal component loading matrix is ​​analyzed to identify the original parameter combinations that share high loadings in the principal components with high contribution rates, revealing the potential synergistic or antagonistic relationships between these parameters. Principal components with high contribution rates refer to principal components with large eigenvalues ​​that can reflect the main information of the data, and high loadings indicate that the original parameters have a significant impact on the principal component.

[0037] Then, step B2 is executed, which uses the random forest algorithm to quantify the nonlinear influence of each parameter on the target variable. First, a training set is constructed based on the original operating parameters and the target variable, which includes the resin adsorption capacity and the outlet calcium and magnesium concentration, i.e. the indicators that the model ultimately needs to predict. Next, T decision trees are constructed. Each tree uses bootstrap sampling, which means randomly drawing samples with replacement from the original training set to construct the training set for a single decision tree. Furthermore, samples are randomly selected when splitting at each node of the decision tree. There are 3 features, where T represents the number of decision trees and n represents the number of original running parameters. This represents the number of features randomly selected when each node splits; Next, calculate the average reduction in impurity for each original parameter and use it as the importance score for that parameter. The average reduction in impurity reflects the degree to which the parameter contributes to reducing data impurity during the decision tree splitting process. The higher the score, the stronger the influence of the parameter on the target variable. Finally, by combining the parameter coupling patterns revealed by PCA in step B1 with the parameter importance ranking obtained by random forest in this step, a subset of key parameters that have a significant impact on resin performance and exhibit strong interactions are selected. This subset of key parameters is used as the input feature dimension of the Transformer model. The parameter coupling pattern refers to the linear synergistic or antagonistic relationship between parameters obtained by PCA analysis, and the strong interaction refers to the relationship in which parameters influence each other and work together to affect resin performance.

[0038] Finally, step B3 is executed, which combines the selected subset of key parameters with timestamp information to form a multivariate time series input. This multivariate time series input is used to train a multi-task time series model. The timestamp information is used to mark the collection time corresponding to each parameter data, ensuring the temporal correlation of the time series data and providing a compliant input data format for the subsequent Transformer-based time series model.

[0039] In the preferred embodiment, the constraints in step S4 include: The calcium and magnesium ion concentration of the brine at the outlet of the first tower is ≤1ppm, and the resin adsorption capacity of the tower is ≤90%. The resin adsorption capacity of the two towers is ≥30%; During regeneration, the concentration of calcium and magnesium ions in the brine at the tail column outlet is ≤20 ppb.

[0040] In the preferred embodiment, in step S4, when any of the constraints reaches the target value, the system triggers a DCS pop-up alarm. After the production personnel confirm the alarm information, the resin tower regeneration program is automatically triggered.

[0041] In the preferred embodiment, after the resin tower regeneration program is triggered, a resin tower switching operation is performed. Specifically, the first tower that has reached the regeneration conditions is cut off from the system for regeneration, the original second tower is upgraded to a new first tower, the original third tower is upgraded to a new second tower, and the original first tower after regeneration is integrated into the system as a backup tower.

[0042] In step S4, the constraints used to determine whether to trigger the resin tower regeneration procedure are first defined, specifically including three items: First, the calcium and magnesium ion concentration of the brine at the outlet of the first tower must be ≤1ppm, and the resin adsorption capacity of the first tower must be ≤90%. Second, the resin adsorption capacity of the two towers must be ≥30%; Third, during resin tower regeneration, the calcium and magnesium ion concentration in the brine at the tail tower outlet must be ≤20 ppb. Based on the real-time prediction data output by the two dynamic prediction models in step S3, a regeneration timing decision matrix is ​​generated according to the above constraints. When the matrix shows that any condition in the constraints reaches the target value, the system will automatically trigger a DCS pop-up alarm. After production personnel check and confirm the alarm information, the system will further automatically trigger the resin tower regeneration program. After the resin tower regeneration program is triggered, a resin tower switching operation is performed simultaneously. The operation method is to cut off the original tower one, which has reached the regeneration conditions, from the production system for regeneration processing. At the same time, the original tower two is upgraded to a new tower one to take over the production function of the original tower one, and the original tower three is upgraded to a new tower two for auxiliary operation. After the original tower one completes regeneration, it is reintegrated into the production system as a backup tower to ensure the continuous and stable production process of the resin tower.

[0043] By clearly defining and specifying three constraints, the timing of resin tower regeneration can be precisely controlled, avoiding the waste of resin adsorption capacity due to regeneration too early or the substandard quality of brine due to regeneration too late. When any constraint condition is met, a DCS pop-up alarm is triggered, and the regeneration procedure is started after manual confirmation. This ensures the timeliness of regeneration decisions and reduces the risk of improper operation due to system misjudgment through the manual confirmation process. The tower switching operation after the regeneration procedure is triggered, through clear tower function upgrade and backup tower integration rules, can ensure the smooth progress of the regeneration process while ensuring uninterrupted production flow, maintaining the continuous ability of the resin tower to treat brine, further improving production efficiency, and reducing losses caused by regeneration downtime.

[0044] Example 2 Further explanation in conjunction with Example 1, such as Figure 1-3 The structure shown includes a high-precision online calcium and magnesium ion analyzer installed on the resin tower outlet pipeline. The analyzer has three inlets connected to the three resin towers, each controlled by a solenoid valve. Analysis is performed in an infinite loop, switching valve 1 for the first tower, valve 2 for the second tower, and valve 3 for the third tower. Specifically, the analyzer is an X-2000 model ppb-level calcium and magnesium ion analyzer, measuring using spectral absorption spectrometry. The detection range is 0–100 ppb, with an accuracy of ±1 ppb, and data is output to the DCS system every 30 minutes.

[0045] The following operating parameters related to resin adsorption performance were collected synchronously using an AI server: The excess alkalinity of saline solution was determined by potentiometric titration using a Yimai Technology SD-390-7.5-J syringe with a detection range of 0–1 g / L and an error of ≤2%. Turbidity, laser scattering turbidimeter, range 0-100 NTU, accuracy ±0.5%; Salt pH and ORP values, composite electrode sensor, measurement range pH 0-14, ORP -2000-+2000 mV; The calcium and magnesium content in a single saline solution was determined by spectrophotometry using a Yimai Technology SD-390-7.5-GG microscope. The detection range was 0–3 ppm, with an error of ≤2%. ⑥ Brine temperature (PT100 resistance thermometer, accuracy ±0.1℃); ⑦ Brine flow rate, obtained through an electromagnetic flowmeter, range 0~200m³ / h, error ≤0.5%; The pressure difference in the resin tower is measured by a differential pressure sensor with a range of 0-100 kPa and an accuracy of ±0.1%. Data is uploaded to the AI ​​server database via the Modbus protocol, with a sampling frequency of 1-3 times per minute.

[0046] Model building and training are carried out. Figure 2 All data were preprocessed, including data cleaning and normalization. Principal component analysis (PCA) and random forest algorithms were used to uncover potential correlations between parameters, and the following two models were established: (1) Dynamic prediction model of resin adsorption capacity: The regression model is trained based on historical data. The input parameters are brine flow rate, primary brine calcium and magnesium, secondary brine calcium and magnesium, and historical regeneration cycle. The output is the resin adsorption capacity of the resin tower. (2) Calcium and magnesium ion prediction model: By constructing a long time series model, the input parameters are the amount of double alkali, turbidity, pH value, ORP value, calcium and magnesium in primary brine, temperature, pressure difference of resin tower, brine flow rate, and calcium and magnesium in secondary brine. The output is the predicted value of calcium and magnesium ion concentration in the tail tower in the next 12 hours.

[0047] After the model was built, it was trained using nearly 12 months of historical data from the chlor-alkali plant, and the error of the validation set was controlled within ±3%.

[0048] Define the optimization objective and the following hard constraints: (1) The concentration of calcium and magnesium ions at the outlet of the first tower is ≤1ppm; (2) The adsorption capacity of the first column resin is ≤90%; (3) The adsorption capacity of the two-tower resin is ≥30%; (4) During the first tower regeneration period (within 12 hours), the calcium and magnesium ion concentration at the tail tower outlet is ≤20 ppb. The optimization objective is to maximize the adsorption capacity utilization of the first tower while minimizing the number of regenerations.

[0049] A regeneration timing decision matrix is ​​generated based on the model's prediction results. When any constraint approaches the threshold (the first tower's adsorption capacity reaches 90%), the system triggers a pop-up alarm on the DCS interface, displaying the parameters exceeding the limit and the predicted trend. After the operator clicks to confirm the alarm, the system automatically executes the resin tower switching procedure: the first tower is switched out for regeneration, and the regeneration program is started (including backwashing, acid-base regeneration, brine replacement, etc., taking approximately 10 hours). Simultaneously, the original second tower is upgraded to the first tower, and the standby tower is switched in as the second tower.

[0050] A comparison of the number of resin tower regenerations after adopting this method with the original method (1 time / day) and the method that determines the regeneration node (calcium and magnesium ≥ 20 ppb) solely based on the calcium and magnesium analysis results of the resin tower:

[0051] The comparison in the table above shows that the AI ​​decision-making method can significantly reduce the number of resin tower regenerations. Compared to the traditional timed regeneration method, the AI ​​decision-making mode reduces the average number of regenerations per year by 46.7%; compared to methods based on fixed thresholds, it can further reduce the regeneration frequency by 13.5%.

[0052] The above embodiments are merely preferred technical solutions of the present invention and should not be considered as limitations on the present invention. The scope of protection of the present invention should be limited to the technical solutions described in the claims, including equivalent substitutions of the technical features described in the claims. That is, equivalent substitutions and improvements within this scope are also within the scope of protection of the present invention.

Claims

1. A method for optimizing the regeneration cycle of a resin tower based on an AI algorithm, characterized by: Includes the following steps: S1. Continuously monitor the calcium and magnesium ion concentration of the brine at the resin tower outlet online; S2. Collect operating parameters related to the adsorption process of the resin tower, including brine double alkali excess amount, turbidity, pH, ORP, flow rate, temperature, and resin tower pressure difference; S3. Based on the calcium and magnesium ion concentrations monitored in step S1 and the operating parameters collected in step S2, construct a dynamic prediction model for resin adsorption capacity and a dynamic prediction model for calcium and magnesium content at the resin tower outlet. S4. Set constraints using a multi-objective optimization algorithm. Based on the real-time prediction data of the two dynamic prediction models constructed in step S3, generate a regeneration timing decision matrix. The constraints are used to determine whether to trigger the resin tower regeneration process.

2. The method for optimizing the regeneration cycle of a resin tower based on an AI algorithm according to claim 1, characterized in that: In step S1, the concentration of calcium and magnesium ions is monitored in real time using an online analyzer with a ppb-level accuracy of ±1 ppb.

3. The method for optimizing the regeneration cycle of a resin tower based on an AI algorithm according to claim 1, characterized in that: In step S1, the ppb-level online analyzer uses spectral absorption to measure the concentration of calcium and magnesium ions, with a detection range of 0~100ppb, and outputs the detection data to the DCS system every 30-40 minutes.

4. The method for optimizing the regeneration cycle of a resin tower based on an AI algorithm according to claim 1, characterized in that: In step S2, the collected operating parameters also include the calcium and magnesium content of the primary brine. The calcium and magnesium content of the primary brine is detected by spectrophotometry, with a detection range of 0 to 3 ppm and an error of ≤2%.

5. The method for optimizing the regeneration cycle of a resin tower based on an AI algorithm according to claim 1, characterized in that: In step S2, all collected operating parameters are uploaded to the AI ​​server database via the Modbus protocol, with a data sampling frequency of 1-3 times per minute.

6. The method for optimizing the regeneration cycle of a resin tower based on an AI algorithm according to claim 1, characterized in that: In step S3, both the dynamic prediction model for resin adsorption capacity and the dynamic prediction model for calcium and magnesium content at the resin tower outlet adopt a multi-task time-series large model based on the Transformer architecture and integrated with the chlor-alkali whole-process mechanism model. The steps include: A1. Construct a unified time-series input sequence: Align the calcium and magnesium ion concentrations and operating parameters collected in steps S1 and S2 according to timestamps to form a multivariate time series. , where T is the historical time step and d is the feature dimension; A2. The input sequence is position-encoded and layer-normalized, and then fed into a shared Transformer encoder, which contains L layers of self-attention modules, each layer including a multi-head self-attention mechanism and a feedforward neural network; A3. Set two independent task heads at the output of the Transformer encoder: The first task header is a fully connected regression layer, which outputs the predicted value of resin adsorption capacity. ; The second task head is a fully connected regression layer, which outputs the predicted calcium and magnesium concentration at the resin tower outlet. ; A4. Integrating the entire chlor-alkali process mechanism model as a physical constraint, specifically including: Establish the resin adsorption equilibrium equation: , where q is the amount of resin adsorbed per unit mass, c is the calcium and magnesium concentration in the solution, K is the adsorption equilibrium constant, and n is the adsorption index; Construct the material conservation equation: Where V is the effective volume of the resin tower. This refers to the concentration of imported calcium and magnesium. This refers to the total mass of the resin. The theoretical adsorption amount calculated from the mechanistic model With the rate of change of concentration As a soft constraint, a multi-task loss function is introduced: ; in The model parameters are jointly optimized through backpropagation to make them learnable weights. A5. After training, the model receives online monitoring data streams in real time and outputs dynamic predicted values ​​of resin adsorption capacity and outlet calcium and magnesium concentrations simultaneously for regeneration decision-making in step S4.

7. The method for optimizing the regeneration cycle of a resin tower based on an AI algorithm according to claim 6, characterized in that: In step S3, before constructing the Transformer-based time series model, the collected monitoring data and operating parameters need to be preprocessed. Principal component analysis and random forest algorithms are then used to collaboratively mine potential correlations between parameters to guide feature construction and model input design. The specific steps are as follows: B1. Principal component analysis is used to reveal linear coupling relationships between parameters: The original data matrix is ​​constructed from the collected m samples and n operating parameters. ; right Standardization process is performed to obtain ,in and are the mean and standard deviation of the j-th parameter, respectively; Calculate the covariance matrix Solve for its eigenvalues and the corresponding feature vectors; Analyze the principal component loading matrix to identify the original parameter combinations that share high loadings among principal components with high contribution rates, and reveal their potential synergistic or antagonistic relationships. B2. The random forest algorithm is used to quantify the nonlinear influence of each parameter on the target variable: A training set is constructed based on the original operating parameters and target variables; Construct T decision trees, each using bootstrap sampling, and randomly select nodes when splitting. One feature; Calculate the average reduction in impurity for each original parameter as its importance score; By combining the parameter coupling patterns revealed by PCA with the importance ranking of random forest, a subset of key parameters that have a significant impact on resin performance and have strong interactions are selected as the input feature dimensions of the Transformer model. B3. The subset of key parameters, together with the timestamp information, constitutes a multivariate time series input, which is used to train a large multi-task time series model.

8. The method for optimizing the regeneration cycle of a resin tower based on an AI algorithm according to claim 1, characterized in that: Step S4 In the context, the constraints include: The calcium and magnesium ion concentration of the brine at the outlet of the first tower is ≤1ppm, and the resin adsorption capacity of the tower is ≤90%. The resin adsorption capacity of the two towers is ≥30%; During regeneration, the concentration of calcium and magnesium ions in the brine at the tail column outlet is ≤20 ppb.

9. The method for optimizing the regeneration cycle of a resin tower based on an AI algorithm according to claim 1, characterized in that: In step S4, when any of the constraints reaches the target value, the system triggers a DCS pop-up alarm. After the production personnel confirm the alarm information, the resin tower regeneration program is automatically triggered.

10. The method for optimizing the regeneration cycle of a resin tower based on an AI algorithm according to claim 9, characterized in that: After the resin tower regeneration program is triggered, the resin tower switching operation is performed. Specifically, the first tower that has reached the regeneration conditions is cut off from the system for regeneration, the original second tower is upgraded to the new first tower, the original third tower is upgraded to the new second tower, and the original first tower after regeneration is integrated into the system as a backup tower.

Citation Information

Cited By

  • Online identification method and system for adsorption kinetic parameters of imidazolium resin

    CN121978320A