A GateLSTM model-based reactor pH value optimization control method

By optimizing PID control parameters through the GateLSTM model and the Sand Cat Swarm Optimization Algorithm, the accuracy and stability issues in the pH value control of the reactor were resolved, and efficient and accurate pH value adjustment was achieved in complex environments, thereby improving production efficiency and safety.

CN120065703BActive Publication Date: 2025-09-09CHANGSHA RES INST OF MINING & METALLURGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510558835.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-09-09
Estimated Expiration
2045-04-30

AI Technical Summary

Technical Problem

Traditional control methods have insufficient accuracy and poor stability in controlling the pH value of reactors. They are difficult to handle complex nonlinear and time-varying systems, and cannot effectively utilize long-term dependencies in historical data, resulting in unstable production processes and quality fluctuations.

Method used

The GateLSTM model is combined with the sand cat swarm optimization algorithm. The multi-linear layer is constructed through the Sigmod function to optimize the PID control parameters. The model is trained using historical data. The sand cat swarm optimization algorithm combining distance diversity and elite cat strategy is dynamically adjusted to achieve precise control.

Benefits of technology

The control accuracy and stability of the pH value of the reactor are improved, and efficient and accurate pH value adjustment can be achieved in a rapidly changing environment, thereby improving production efficiency and safety and solving the limitations and inefficiency of traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120065703B_ABST
    Figure CN120065703B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of chemical engineering control technology, and discloses a method for optimizing the pH value of a reactor using a GateLSTM model. A multi-linear layer GateLSTM model for optimizing PID control parameters is constructed based on a Sigmod function; reaction parameters are obtained and input into the GateLSTM model to obtain optimized PID control parameters; a determination is made as to whether the optimized PID control parameters meet a PID threshold; if not, the PID control parameters are optimized using a Sand Dune Cat Swarm Optimization Algorithm that combines a distance diversity control strategy with an elite cat strategy until the PID threshold is met; if so, the PID control parameters are input into a PID controller; and the pH value of a precursor in the reactor is controlled by the PID controller based on the input PID control parameters. This method solves the problems of accuracy, stability, historical data utilization, and dynamic optimization in existing traditional control methods for reactor pH value control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of chemical engineering control technology, and in particular to a method for optimizing the pH value of a reactor based on a GateLSTM model. Background Art

[0002] Lithium-ion batteries are core energy storage devices in modern electronic devices and electric vehicles. The improvement of their performance is directly related to the battery's service life, energy density and safety. In lithium-ion batteries, the positive electrode material is its key component, and the performance of the positive electrode material is directly affected by the preparation process and quality of the precursor material. The quality of the precursor material determines the structure and morphology of the positive electrode material, which in turn plays an important role in the performance of the battery. The control of the pH value in the reactor is particularly important in the production process of the precursor material, because the fluctuation of the pH value will significantly affect the stability of the reaction process and the quality of the product. Therefore, how to accurately adjust the pH value of the reactor to ensure the stability and safety of the production process has become a key issue in the production of precursor materials.

[0003] In traditional precursor material production processes, pH control typically relies on manual or classical control methods such as PID controllers. However, these traditional methods have limitations in their application to dynamic and nonlinear problems. While traditional optimization methods such as particle swarm optimization (PSO) and genetic algorithms (GA) perform well for some static optimization problems, they often fail to adequately address the dynamic nature of complex, time-varying control problems in precursor material production. While PSO enables global search, its optimization process is prone to becoming trapped in local optima, especially when the process state changes rapidly, resulting in unsatisfactory control results. Genetic algorithms, on the other hand, have high computational complexity and significantly lack search efficiency and convergence speed when dealing with high-dimensional, time-varying problems. Traditional methods often struggle to uncover deep patterns and long-term dependencies in large-scale historical data. Summary of the Invention

[0004] The present invention provides a reactor pH value optimization control method based on a GateLSTM model to solve the problems of accuracy, stability, historical data utilization and dynamic optimization in the existing traditional control methods in reactor pH value control.

[0005] In order to achieve the above object, the present invention is implemented through the following technical solutions:

[0006] In a first aspect, the present invention provides a method for optimizing the pH value of a reactor using a GateLSTM model, comprising the following steps:

[0007] Step 1: Build a multi-linear layer GateLSTM model for PID control parameter optimization based on the Sigmod function;

[0008] Step 2: Obtain the real-time reaction parameters in the reactor and input them into the GateLSTM model to obtain the optimized PID control parameters;

[0009] Step 3: Determine whether the optimized PID control parameters meet the PID threshold. If not, optimize the PID control parameters by combining the sand dune cat swarm optimization algorithm based on the distance diversity control strategy and the elite cat strategy until the PID control parameters meet the PID threshold. If so, input the PID controller.

[0010] Step 4: The PID controller based on the input PID control parameters completes the control of the pH value of the precursor in the reactor.

[0011] Among them, the PID control parameters output by the GateLSTM model include the proportion, integral, differential and score of PID control. When the score meets the set PID threshold, the proportion, integral and differential are input into the PID controller to realize the control of the pH value of the precursor.

[0012] Furthermore, the method further includes step 5: recording the PID control parameters that meet the PID threshold in step 3 as historical data to optimize the GateLSTM model.

[0013] Through the above operations, the PID control parameters that meet the PID threshold are used as historical data to train the GateLSTM model, making the output of the GateLSTM model more accurate. During use, a feedback optimization closed loop is formed between the GateLSTM model and the Sand Cat Swarm Optimization Algorithm, which can further more accurately regulate the pH value of the precursor.

[0014] Furthermore, the GateLSTM model obtains the dynamic characteristics of the reaction parameters, and obtains multiple feature space representations after compression of the dynamic characteristics through multilinear layers and Sigmod functions, and multiplies one of the compressed feature space representations with the dynamic characteristics element by element to obtain a first control signal, multiplies the first control signal with other feature space representations to obtain a second control signal, and obtains optimized PID control parameters based on the first control signal and the second control signal.

[0015] Furthermore, the GateLSTM model includes an input layer, a long short-term memory layer, a first linear layer, a second linear layer, a third linear layer, a first Sigmod function layer, a second Sigmod function layer, a first multiplication layer, a second multiplication layer, an addition layer, and a fully connected layer;

[0016] The input layer obtains a reaction parameter, which is input into the long short-term memory layer to process the dynamic feature to obtain the dynamic feature, the first linear layer obtains a first spatial feature representation by weighted summation of the dynamic feature, the first Sigmod function layer compresses the first spatial feature representation, and the second multiplication layer multiplies the compressed first spatial feature representation by the dynamic feature element by element to obtain a first control signal;

[0017] The second linear layer maps the compressed first spatial feature representation, the third linear layer obtains the second spatial feature representation by weighted summing the dynamic features, the second Sigmod function layer obtains the second spatial feature representation for compression, and the first multiplication layer performs element-by-element multiplication on the mapped first spatial feature representation and the compressed second spatial feature representation to obtain a second control signal;

[0018] The addition layer obtains the first control signal and the second control signal for fusion processing, and then obtains the PID control parameters through the full connection layer output.

[0019] Furthermore, the distance diversity-based control strategy is to adjust the Euclidean distance between each pair of individuals in the sand cat colony optimization algorithm;

[0020] The adjustment includes adding a first perturbation operation to the sand cat colony optimization algorithm to randomly perturb the Euclidean distances of individuals until the Euclidean distances of each pair of individuals meet a distance threshold;

[0021] It is expressed by the following formula:

[0022] ;

[0023] ;

[0024] in, represents the distance threshold; represents the Euclidean distance between a pair of individuals; represents the individuals of the population, Indicates the individual of the current operation, and represent a pair of individuals in the cat group, and and The disturbance operation is randomly added, which is expressed by the following formula:

[0025] ;

[0026] ;

[0027] in, Indicates that after adding the disturbance operation, the individual The corresponding individual position, Indicates that after adding the disturbance operation, the individual The corresponding individual position; Represents the first disturbance value corresponding to the first disturbance operation, satisfying , Represents a uniform distribution.

[0028] Furthermore, before executing the distance diversity control strategy on the sand cat population optimization algorithm, the individual position update speed in the population is optimized, which is expressed by the following formula:

[0029] ;

[0030] in, represents the individual position after the updated position, represents the individual position before the updated position, Indicates the distance the individual moves during the update process.

[0031] Furthermore, the elite cat strategy is to rank the fitness of individuals in the sand dune cat swarm optimization algorithm, add a second perturbation operation to the fitness of individuals that meet a predetermined ranking, and perform a third perturbation operation on individuals that do not participate in the second perturbation operation based on the individuals that participate in the second perturbation operation;

[0032] The second perturbation operation is expressed as:

[0033] ;

[0034] in, represents the fitness of the individual after the second perturbation operation is added; represents the fitness of an individual, represents a second disturbance value corresponding to the second disturbance operation;

[0035] The third perturbation operation includes adding a third perturbation value to individuals that have not been subjected to the second perturbation operation and moving them closer to individuals that have been subjected to the second perturbation operation, which is expressed by the following formula:

[0036] ;

[0037] in, Indicates the fitness of the individual after adding the third perturbation operation; represents the individual without the second perturbation operation, The third disturbance value corresponding to the third disturbance operation is in the range of [-5, 5]. Indicates the degree of convergence, with a value range of [0-1].

[0038] Furthermore, the sand cat swarm optimization algorithm constructs an objective function with minimizing error as the first goal;

[0039] The error includes the difference between the target pH value and the pH value in the reactor at any moment;

[0040] The objective function is expressed by the following formula:

[0041] ;

[0042] in, Indicates the first goal;

[0043] The first goal is expressed by the following formula:

[0044] ;

[0045] in, Indicates error, ; Indicates the target value, Indicates the amount of liquid in the reactor at any moment value, represents any moment in the reaction process, Indicates the total time required for the complete reaction.

[0046] Furthermore, the sand cat swarm optimization algorithm constructs an objective function with a first objective and a second objective, wherein the second objective includes minimizing the error and the weighted integral at any moment;

[0047] The objective function is expressed by the following formula:

[0048] ;

[0049] in, represents the objective function; Indicates the second goal; and Represent the weight coefficients of the first and second objectives respectively;

[0050] The second objective is expressed by the following formula:

[0051] .

[0052] Beneficial effects:

[0053] The present invention provides a reactor pH value optimization control method based on a GateLSTM model. The GateLSTM model with multiple linear layers constructed based on the Sigmod function solves the problem that the existing traditional control methods, when controlling the pH value of the reactor, are difficult to maintain precise regulation of the pH value in the face of complex nonlinear and time-varying systems, resulting in quality fluctuations and incomplete reactions, thereby effectively improving accuracy and stability.

[0054] The GateLSTM model also addresses the problem that traditional optimization methods, such as particle swarm optimization and genetic algorithms, are prone to falling into local optimal solutions when dealing with dynamic, time-varying, and nonlinear problems, and struggle to efficiently adapt to system dynamics. The GateLSTM model and the optimized SandCat swarm optimization algorithm overcome the limitations of traditional methods, resolving issues such as slow system response and inaccurate parameter adjustments.

[0055] Traditional control methods often fail to effectively exploit long-term dependencies in historical data, resulting in low prediction accuracy. By using the GateLSTM model, this paper can fully exploit the patterns and regularities in historical data, improving the system's predictive capabilities and, in turn, enhancing PID control effectiveness.

[0056] In complex production environments, reactor operating conditions are constantly changing, requiring dynamic adjustment of PID control parameters. Traditional optimization algorithms are inefficient for such dynamic control problems, and the optimization process can converge slowly, resulting in suboptimal control results. By incorporating the SandCat swarm optimization algorithm, this present invention efficiently optimizes dynamic control parameters, ensuring that the reactor pH value can be precisely adjusted in rapidly changing environments, thereby improving production efficiency and safety. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 This is an overall flow chart of a method for optimizing pH value of a reactor using a GateLSTM model of the present invention;

[0058] Figure 2 Schematic diagram of the network structure of the GateLSTM model of the present invention;

[0059] Figure 3 Schematic diagram of the process of the sand dune cat group optimization algorithm of the present invention. DETAILED DESCRIPTION

[0060] The following is a clear and complete description of the technical solutions of the present invention. It should be understood that the embodiments described are only a portion of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are intended to fall within the scope of protection of the present invention.

[0061] Unless otherwise defined, the technical or scientific terms used in the present invention shall have the usual meanings understood by persons of ordinary skill in the field to which the present invention belongs. The words "first", "second" and similar terms used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one" or "a" do not indicate a quantity limitation, but rather indicate the existence of at least one. Words such as "connected" or "connected" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the object being described changes, the relative positional relationship also changes accordingly.

[0062] See Figure 1 The present invention provides a method for optimizing the pH value of a reactor using a GateLSTM model, comprising the following steps:

[0063] Step 1: Build a multi-linear layer GateLSTM model for PID control parameter optimization based on the Sigmod function;

[0064] Among them, the GateLSTM model obtains the dynamic characteristics of the reaction parameters, and obtains multiple feature space representations after compression of the dynamic characteristics through multilinear layers and Sigmod functions, and multiplies a feature space representation with the dynamic characteristics element by element to obtain a first control signal, and multiplies the first control signal with other feature space representations to obtain a second control signal. Based on the first control signal and the second control signal, the optimized PID control parameters are obtained. The reaction parameters include the current pH value, flow rate and concentration, and the PID control parameters include score, proportion, integration and differentiation for realizing PID control.

[0065] For details, see Figure 2 The GateLSTM model includes an input layer, a long short-term memory layer, a first linear layer, a second linear layer, a third linear layer, a first Sigmod function layer, a second Sigmod function layer, a first multiplication layer, a second multiplication layer, an addition layer, and a fully connected layer;

[0066] The input layer obtains the reaction parameters, the input long short-term memory layer processes the dynamic features to obtain the dynamic features, the first linear layer obtains the first spatial feature representation by weighted summation of the dynamic features, the first Sigmod function layer compresses the first spatial feature representation, and the second multiplication layer multiplies the compressed first spatial feature representation by the dynamic features element by element to obtain the first control signal;

[0067] The second linear layer maps the compressed first spatial feature representation, the third linear layer obtains the second spatial feature representation by weighted summation of the dynamic features, the second Sigmod function layer obtains the second spatial feature representation for compression, and the first multiplication layer multiplies the mapped first spatial feature representation by the compressed second spatial feature representation element by element to obtain a second control signal;

[0068] The addition layer obtains the first control signal and the second control signal for fusion processing, and then obtains the PID control parameters through the output of the fully connected layer.

[0069] The long short-term memory layer is expressed by the following formula:

[0070] ;

[0071] in, represents the hidden state at the current moment, is the input data, and is the weight matrix, is the bias term, is the activation function;

[0072] The first linear layer is expressed as follows:

[0073] ;

[0074] in, is the output after linear transformation of the first linear layer, is the weight matrix corresponding to the first linear layer, is the bias term corresponding to the first linear layer;

[0075] The first Sigmod function layer and the second Sigmod function layer are both expressed by the following formula:

[0076] ;

[0077] Used to simulate the effect of probability or proportional adjustment. Through this function layer, the pH value control signal of the reactor can be adjusted within a certain range;

[0078] The second linear layer is expressed as follows:

[0079] ;

[0080] in, is the output after linear transformation of the second linear layer, is the weight matrix corresponding to the second linear layer, is the bias term corresponding to the second linear layer;

[0081] The third linear layer is expressed as follows:

[0082] ;

[0083] in, is the output after linear transformation of the third linear layer, is the weight matrix corresponding to the third linear layer, is the bias term corresponding to the third linear layer;

[0084] The first multiplication layer is expressed as follows:

[0085] ;

[0086] The second multiplication layer is expressed as follows:

[0087] ;

[0088] The additive layer is expressed as follows:

[0089] ;

[0090] in, Indicates the unadjusted PID control signal;

[0091] The fully connected layer is expressed as follows:

[0092] ;

[0093] represents the PID control signal after adjustment by the fully connected layer; Represents the corresponding weight matrix of the fully connected layer; Represents the bias term corresponding to the fully connected layer.

[0094] Through the above operations, the precise adjustment of the pH value in the reactor is effectively achieved. The long-short-term memory layer effectively captures the temporal dependence and long-term trends in the injected data, and shows the predicted trend of the pH value in the reactor. The first control signal obtained subsequently ensures that the signal adjustment conforms to the actual dynamic changes of the reactor. The second control signal obtained further enhances the adaptability to the state change of the reactor. The PID control parameters integrate information at different levels and different paths to more accurately reflect the current state of the reactor and more efficiently and stably regulate the pH value in the reactor.

[0095] Step 2: Obtain the real-time reaction parameters in the reactor and input them into the GateLSTM model to obtain the optimized PID control parameters;

[0096] Obtain the pH value, flow rate, and concentration in the reactor at this time, and input them into the GateLSTM model to obtain the PID control parameters;

[0097] Step 3: Determine whether the optimized PID control parameters meet the PID threshold. If not, optimize the PID control parameters using the Sand Dune Cat Swarm Optimization Algorithm that combines the distance diversity control strategy with the elite cat strategy until the PID control parameters meet the PID threshold. If they meet, input them into the PID controller.

[0098] In this embodiment, the PID threshold is 0.8. When the score of the optimized PID control parameters is greater than 0.8, it is considered to be satisfied, and the corresponding proportional, integral, and differential are input into the PID controller. If it is less than or equal to 0.8, it is considered to be unsatisfactory, and the PID control parameters need to be optimized using the Sand Cat Swarm Optimization Algorithm.

[0099] In this example, see Figure 3 , the individual position update speed in the sand cat swarm optimization algorithm is optimized, which is expressed by the following formula:

[0100] ;

[0101] in, represents the individual position after the updated position, represents the individual position before the updated position, Indicates the distance the individual moves during the update process.

[0102] The distance diversity control strategy is to adjust the Euclidean distance of each pair of individuals in the sand cat colony optimization algorithm;

[0103] The adjustment includes adding a first perturbation operation to the sand cat colony optimization algorithm, which randomly perturbs the Euclidean distance of individuals until the Euclidean distance of each pair of individuals meets the distance threshold;

[0104] It is expressed by the following formula:

[0105] ;

[0106] ;

[0107] in, represents the distance threshold; represents the Euclidean distance between a pair of individuals; represents the individuals of the population, Indicates the individual of the current operation, and represent a pair of individuals in the cat group, and and The disturbance operation is randomly added, which is expressed by the following formula:

[0108] ;

[0109] ;

[0110] in, Indicates that after adding the disturbance operation, the individual The corresponding individual position, Indicates that after adding the disturbance operation, the individual The corresponding individual position; Represents the first disturbance value corresponding to the first disturbance operation, satisfying , Represents a uniform distribution.

[0111] The elite cat strategy ranks the fitness of individuals in the sand dune cat swarm optimization algorithm, adds a second perturbation operation to the fitness of individuals that meet the predetermined ranking, and performs a third perturbation operation on the individuals that do not participate in the second perturbation operation based on the individuals that participate in the second perturbation operation.

[0112] The second perturbation operation is expressed as:

[0113] ;

[0114] in, represents the fitness of the individual after the second perturbation operation is added; represents the fitness of an individual, represents a second disturbance value corresponding to the second disturbance operation;

[0115] The third perturbation operation includes adding the third perturbation value to the individuals that have not been subjected to the second perturbation operation and moving them closer to the individuals that have been subjected to the second perturbation operation, which can be expressed by the following formula:

[0116] ;

[0117] in, Indicates the fitness of the individual after adding the third perturbation operation; represents the individual without the second perturbation operation, The third disturbance value corresponding to the third disturbance operation is in the range of [-5, 5]. Indicates the degree of convergence, with a value range of [0-1].

[0118] After the position is updated, the new fitness value of each cat is calculated. If the new fitness value is better than the historical optimal value, the historical optimal position and fitness of the individual are updated. If the current fitness value is better than the global optimal value, the global optimal solution is updated.

[0119] The Sand Cat Swarm Optimization Algorithm terminates when the maximum number of iterations is reached or the global optimal solution reaches the preset target value.

[0120] By combining distance-based diversity control with the Elite Cat strategy, premature convergence is effectively avoided and global search capabilities are enhanced. The distance-based diversity control strategy increases the search diversity of the cat group, preventing over-concentration of individuals, while the Elite Cat strategy maintains the independence of a subset of outstanding individuals, encouraging the entire group to explore a broader solution space. These improvements to the algorithm enable it to more efficiently find the global optimal solution when solving complex optimization problems.

[0121] In this embodiment, the sand cat swarm optimization algorithm constructs an objective function with a first objective and a second objective, wherein the first objective includes minimizing the error, and the second objective includes minimizing the weighted integral of the error and any time, wherein the error includes the difference between the target pH value and the pH value in the reactor at any time;

[0122] The objective function is expressed as follows:

[0123] ;

[0124] in, represents the objective function; Indicates the second goal; and Represent the weight coefficients of the first and second objectives respectively;

[0125] The first goal is expressed by the following formula:

[0126] ;

[0127] in, Indicates error, ; Indicates the target value, Indicates the amount of liquid in the reactor at any moment value, represents any moment in the reaction process, Indicates the total time required for the complete reaction.

[0128] The second goal is expressed by the following formula:

[0129] .

[0130] Step 4: The PID controller completes the control of the pH value of the precursor in the reactor based on the input PID control parameters;

[0131] Step 5: Record the PID control parameters that meet the PID threshold in step 3 as historical data to optimize the GateLSTM model.

[0132] In this example, the GateLSTM model was trained by first collecting a dataset of proportional, integral, and differential parameters from a conventional PID control process for the pH value of a precursor. This dataset was randomly divided into a training set (80%) and a validation set (20%). The training set was used for model parameter learning, while the validation set was used to evaluate the model's generalization ability. Mean squared error (MSE) was used as the loss function during training to measure the deviation between the predicted and true values. The Adam optimizer (ADAM) was used for optimization, with an initial learning rate of 0.001. Cosine annealing was used to dynamically adjust the learning rate to ensure a more stable training process and improve final model performance. Training was performed using the ADAM optimization method with a batch size of 64 to strike a balance between computational efficiency and model stability. To prevent overfitting, an early stopping mechanism was introduced during training; training was terminated prematurely if the validation loss did not significantly decrease after 10 consecutive training rounds. The maximum number of iterations was set to 100 to ensure the model fully learned the data characteristics and avoid overtraining.

[0133] After using the GateLSTM model, the proportion, integral, and differential of the PID control parameters that meet the PID threshold in the present invention are reconstructed into a new data set, and the GateLSTM model is retrained using the above method to form a feedback optimization closed loop of the GateLSTM model and the sand cat swarm optimization algorithm, thereby further more accurately regulating the pH value of the precursor.

[0134] Based on the above steps, a comparative experiment was conducted on the same set of data using a GateLSTM model-based reactor pH value optimization control method provided by the present invention, traditional PID control, PID control combined with a neural network, and PID control combined with a particle swarm optimization algorithm. For specific results, please see Tables 1 and 2.

[0135] Table 1 Control parameters of the present invention and various control methods;

[0136]

[0137] Table 2: Comparison results between the present invention and various control methods;

[0138]

[0139] Note: GateLSTM and MSCSO optimized PID control is the control method provided by the present invention;

[0140] According to the experimental data, there are significant differences in the performance of the four control methods in pH regulation.

[0141] The traditional PID control method took 18 minutes to adjust the pH value from 10.5 to the target value of 11.12. The stabilization time was long, and the final pH value was 10.90, with large fluctuations (±0.15 pH). The control accuracy was only 95.13%, and the target pH value was not accurately achieved.

[0142] When combining PID and neural network control, the stabilization time was shortened to 14 minutes, and the final pH value was 11.08, close to the target pH of 11.12, with a fluctuation range of ±0.10 pH, and the control accuracy increased to 99.64%. Although this method improved accuracy, fluctuations still existed, and the target value was not fully achieved.

[0143] The combined PID and PSO control method adjusted the pH to 11.12 within 12 minutes, significantly improving both stability and accuracy. The final pH value was 11.11, very close to the target, with a fluctuation range of ±0.05 pH and a control accuracy of 99.91%. This method demonstrated higher control accuracy and stability than traditional PID control and PID combined with neural network control.

[0144] The GateLSTM and MSCSO optimized PID control method performed the best, accurately adjusting the pH to 11.12 within 11 minutes, with minimal fluctuation of only ±0.03 pH and a control accuracy of 99.97%. This method, by combining GateLSTM for historical data learning and MSCSO for PID parameter optimization, demonstrated excellent stability, accuracy, and response speed.

[0145] Data analysis shows that the GateLSTM and MSCSO optimized PID control methods performed the best among all compared methods, accurately adjusting the pH value to the target value in the fastest time (11 minutes), with minimal fluctuation and the highest control accuracy (99.97%). In contrast, while traditional PID control can complete the task, it suffers from large fluctuations and low control accuracy, significantly reducing the system's stability and response speed.

[0146] Based on experimental data, both PID and PSO control, as well as PID and neural network control, offer significant improvements over traditional PID control, but still fall short of the GateLSTM and MSCSO optimized PID control methods. Especially in complex dynamic environments, the GateLSTM and MSCSO optimized PID control methods offer more stable and precise pH regulation, suggesting broader application prospects.

[0147] The above describes in detail the preferred embodiments of the present invention. It should be understood that those skilled in the art can make numerous modifications and variations based on the concepts of the present invention without inventive effort. Therefore, any technical solutions that can be derived by those skilled in the art through logical analysis, reasoning, or limited experimentation based on the concepts of the present invention and the prior art should be within the scope of protection defined by the claims.

Claims

1. A GateLSTM model for optimizing the pH value of a reactor, characterized in that: The steps include: Step 1: Build a multi-linear layer GateLSTM model for PID control parameter optimization based on the Sigmod function; Step 2: Obtain the real-time reaction parameters in the reactor and input them into the GateLSTM model to obtain the optimized PID control parameters; Step 3: Determine whether the optimized PID control parameters meet the PID threshold. If not, optimize the PID control parameters by combining the sand dune cat swarm optimization algorithm based on the distance diversity control strategy and the elite cat strategy until the PID control parameters meet the PID threshold. If so, input the PID controller. Step 4: The PID controller based on the input PID control parameters completes the control of the pH value of the precursor in the reactor.

2. The reactor pH value optimization control method of the GateLSTM model according to claim 1, characterized in that: The method further includes step 5: recording the PID control parameters that meet the PID threshold in step 3 as historical data to optimize the GateLSTM model.

3. The reactor pH value optimization control method of the GateLSTM model according to claim 1, characterized in that: The GateLSTM model obtains the dynamic characteristics of the reaction parameters, and multiplies one of the compressed feature space representations by the dynamic characteristics element by element to obtain a first control signal, multiplies the first control signal by other feature space representations to obtain a second control signal, and obtains optimized PID control parameters based on the first control signal and the second control signal.

4. The method for optimizing pH value of a reactor using the GateLSTM model according to claim 3, wherein: The GateLSTM model includes an input layer, a long short-term memory layer, a first linear layer, a second linear layer, a third linear layer, a first Sigmod function layer, a second Sigmod function layer, a first multiplication layer, a second multiplication layer, an addition layer, and a fully connected layer; The input layer obtains a reaction parameter, which is input into the long short-term memory layer to process the dynamic feature to obtain the dynamic feature, the first linear layer obtains a first spatial feature representation by weighted summation of the dynamic feature, the first Sigmod function layer compresses the first spatial feature representation, and the second multiplication layer multiplies the compressed first spatial feature representation by the dynamic feature element by element to obtain a first control signal; The second linear layer maps the compressed first spatial feature representation, the third linear layer obtains the second spatial feature representation by weighted summing the dynamic features, the second Sigmod function layer obtains the second spatial feature representation for compression, and the first multiplication layer performs element-by-element multiplication on the mapped first spatial feature representation and the compressed second spatial feature representation to obtain a second control signal; The addition layer obtains the first control signal and the second control signal, performs fusion processing, and obtains the PID control parameters through the full connection layer output.

5. The method for optimizing pH value of a reactor using a GateLSTM model according to claim 1, wherein: The distance diversity-based control strategy is to adjust the Euclidean distance of each pair of individuals in the sand cat colony optimization algorithm; The adjustment includes adding a first perturbation operation to the sand cat colony optimization algorithm to randomly perturb the Euclidean distances of individuals until the Euclidean distances of each pair of individuals meet a distance threshold; It is expressed by the following formula: ; ; in, represents the distance threshold; represents the Euclidean distance between a pair of individuals; and Used to distinguish two different individuals in a pair; represents the individuals of the population, Indicates the individual of the current operation, and represent a pair of individuals in the cat group, and and The disturbance operation is randomly added, which is expressed by the following formula: ; ; in, Indicates that after adding the disturbance operation, the individual The corresponding individual position, Indicates that after adding the disturbance operation, the individual The corresponding individual position; Represents the first disturbance value corresponding to the first disturbance operation, satisfying , Represents a uniform distribution.

6. The method for optimizing pH value of a reactor using a GateLSTM model according to claim 5, wherein: Before executing the distance diversity control strategy on the sand cat swarm optimization algorithm, the individual position update speed in the population is optimized, which is expressed by the following formula: ; in, represents the individual position after the updated position, represents the individual position before the updated position, Indicates the distance the individual moves during the update process.

7. The method for optimizing pH value of a reactor using a GateLSTM model according to claim 1, wherein: The elite cat strategy is to rank the fitness of individuals in the sand dune cat swarm optimization algorithm, add a second perturbation operation to the fitness of individuals that meet a predetermined ranking, and perform a third perturbation operation on individuals that do not participate in the second perturbation operation based on the individuals that participate in the second perturbation operation; The second perturbation operation is expressed as: ; in, represents the fitness of the individual after the second perturbation operation is added; represents the fitness of an individual, represents a second disturbance value corresponding to the second disturbance operation; The third perturbation operation includes adding a third perturbation value to individuals that have not been subjected to the second perturbation operation and moving them closer to individuals that have been subjected to the second perturbation operation, which is expressed by the following formula: ; in, Indicates the fitness of the individual after adding the third perturbation operation; represents the individual without the second perturbation operation, The third disturbance value corresponding to the third disturbance operation is in the range of [-5, 5]. Indicates the degree of convergence, with a value range of [0-1].

8. The method for optimizing pH value of a reactor using a GateLSTM model according to claim 1, wherein: The sand cat swarm optimization algorithm constructs an objective function with minimizing error as the first goal; The error includes the difference between the target pH value and the pH value in the reactor at any moment; The objective function is expressed by the following formula: ; in, Indicates the first goal; The first goal is expressed by the following formula: ; in, Indicates error, ; Indicates the target value, Indicates the amount of liquid in the reactor at any moment value, represents any moment in the reaction process, Indicates the total time required for the complete reaction.

9. The method for optimizing pH value of a reactor using a GateLSTM model according to claim 8, wherein: The sand cat swarm optimization algorithm constructs an objective function with a first objective and a second objective, wherein the second objective includes minimizing the error and the weighted integral at any time; The objective function is expressed by the following formula: ; in, represents the objective function; Indicates the second goal; and Represent the weight coefficients of the first and second objectives respectively; The second objective is expressed by the following formula: 。

Citation Information

Patent Citations

  • High-precision synthesis control method for ternary precursor

    CN108336314A

  • Ternary precursor reaction kettle pH control method

    CN113735194A