Reaction kettle pH value optimization control method of GateLSTM model

Through the GateLSTM model and the Dune Cat Group optimization algorithm, the accuracy and stability problems of traditional control methods in the pH control of reactors are solved, and more efficient and accurate pH adjustment is achieved.

CN120065703AActive Publication Date: 2025-05-30CHANGSHA RES INST OF MINING & METALLURGY CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing traditional control methods have problems in the pH control of the reactor, such as accuracy, stability, historical data utilization and dynamic optimization, making it difficult to effectively adjust the pH value in the reactor, resulting in mass fluctuations and incomplete reactions.

Method used

The GateLSTM model is used to combine Sigmod function to build a multilinear layer, obtain the optimized PID control parameters, and optimize it through the Dune Cat Group optimization algorithm until the PID threshold is met, and a feedback optimization closed loop is formed to improve control accuracy and stability.

Benefits of technology

It effectively improves the precise adjustment ability of the reactor pH value, improves the stability and accuracy of control, and can efficiently adjust the pH value in complex dynamic environments, improving production efficiency and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120065703A_ABST
    Figure CN120065703A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of chemical engineering control, and discloses a reaction kettle pH value optimization control method of a GateLSTM model. Based on a Sigmod function, constructing a multi-linear layer GateLSTM model related to PID control parameter optimization; obtaining a reaction parameter, and inputting the reaction parameter into the GateLSTM model to obtain an optimized PID control parameter; whether the optimized PID control parameters meet a PID threshold value or not is judged, if not, the PID control parameters are optimized through a sand dune cat group optimization algorithm based on a distance diversity control strategy and an elite cat strategy till the PID threshold value is met, and if yes, the PID control parameters are input into a PID controller; and completing the control of the pH value of the precursor in the reaction kettle based on the PID controller with the input PID control parameters. The problems of accuracy, stability, historical data utilization and dynamic optimization in reaction kettle pH value control of an existing traditional control method are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of chemical engineering control, and particularly to a method for optimizing the pH value control of a reactor using a GateLSTM model. Background Art

[0002] As a core energy storage device in modern electronic devices, electric vehicles and other fields, the performance improvement of lithium-ion batteries is directly related to the service life, energy density and safety of the batteries. In lithium-ion batteries, the cathode material is a key component, and the performance of the cathode 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 cathode material, and thus 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 the precursor material.

[0003] In the traditional production process of the precursor material, the control of the pH value usually relies on classical control methods such as manual or PID controllers. However, the application of these traditional methods in dynamic and nonlinear methods has certain limitations. Although traditional optimization methods such as Particle Swarm Optimization (PSO) and Genetic Algorithm (GA) perform well in some static optimization problems, they often cannot fully cope with the dynamic characteristics of the method when facing the complex time-varying control problems in the production process of the precursor material. Although PSO can perform global search, its optimization process is prone to falling into local optimal solutions, especially in the case of rapid changes in the method state, and the control effect may not be satisfactory. The genetic algorithm has a high computational complexity, and there are obvious deficiencies in the search efficiency and convergence speed when dealing with high-dimensional and time-varying problems. Especially when facing a large amount of historical data, traditional methods often have difficulty in mining the deep patterns and long-term dependencies therein. Summary of the Invention

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

[0005] To achieve the above object, the present invention is implemented through the following technical solutions: In a first aspect, the present invention provides a method for optimizing the pH value control of a reactor using a GateLSTM model, including the following steps: Step 1: Construct a multi-linear layer GateLSTM model for optimizing PID control parameters 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 through the sand cat swarm optimization algorithm that combines the distance diversity control strategy and the elite cat strategy until the PID control parameters meet the PID threshold. If they meet, input them into the PID controller; Step 4: Based on the PID controller with the input PID control parameters, complete the control of the precursor pH value in the reactor.

[0006] Among them, the PID control parameters output by the GateLSTM model include the proportional, integral, derivative, and score of PID control. When the score among them meets the set PID threshold, the proportional, integral, and derivative are input into the PID controller to achieve the control of the precursor pH value.

[0007] Further, it also includes Step 5: Record the PID control parameters that meet the PID threshold in Step 3 as historical data to optimize the GateLSTM model.

[0008] 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 of the GateLSTM model and the sand cat swarm optimization algorithm is formed to further and more accurately regulate the pH value of the precursor.

[0009] Further, the GateLSTM model obtains the dynamic characteristics of the reaction parameters, and through the multi-linear layer and the Sigmod function, obtains multiple feature space representations after compressing the dynamic characteristics. Multiply one of the compressed feature space representations element by element with the dynamic characteristics to obtain the first control signal, and multiply the first control signal with other feature space representations to obtain the second control signal. Based on the first control signal and the second control signal, obtain the optimized PID control parameters.

[0010] Further, 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 reaction parameters and inputs them into the long short-term memory layer to process dynamic features and obtain dynamic features. The first linear layer obtains a first spatial feature representation by performing weighted summation on the dynamic features. The first Sigmod function layer compresses the first spatial feature representation. The second multiplication layer performs element-wise multiplication on the compressed first spatial feature representation and the dynamic features to obtain a first control signal. The second linear layer maps the compressed first spatial feature representation. The third linear layer obtains a second spatial feature representation by performing weighted summation on the dynamic features. The second Sigmod function layer compresses the second spatial feature representation. The first multiplication layer performs element-wise 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 outputs PID control parameters through a fully connected layer.

[0011] Further, the distance diversity control strategy is to adjust the Euclidean distance between each pair of individuals in the sand cat swarm optimization algorithm. The adjustment includes adding a first perturbation operation to the sand cat swarm optimization algorithm to randomly perturb the Euclidean distance of individuals until the Euclidean distance between each pair of individuals meets the distance threshold. It is represented by the following formula: ; ; Among them, represents the distance threshold; represents the Euclidean distance between a pair of individuals; represents an individual in the population, represents the individual of the current operation, and respectively represent a pair of individuals in the cat swarm, and and both randomly add perturbation operations, which are represented by the following formula: ; ; Among them, represents the first perturbation value corresponding to the first perturbation operation, satisfying , represents a uniform distribution.

[0012] Further, before executing the distance diversity control strategy on the sand cat swarm optimization algorithm, the update speed of the individual positions in the population is optimized, which is represented by the following formula: ; Among them, represents the individual position after updating the position, represents the individual position before updating the position, represents the position update speed.

[0013] Furthermore, the elite cat strategy ranks the fitness of individuals in the sand cat swarm optimization algorithm. The fitness of individuals meeting a predetermined ranking is added with a second perturbation operation, and a third perturbation operation is performed on individuals not added with the second perturbation operation based on the individuals added with the second perturbation operation; The second perturbation operation is expressed as: ; Among them, represents the fitness of an individual, represents the second perturbation value corresponding to the second perturbation operation; The third perturbation operation includes adding the individuals not added with the second perturbation operation with a third perturbation value and making them approach the individuals added with the second perturbation operation, which is expressed by the following formula: ; Among them, represents the individuals not added with the second perturbation operation, represents the third perturbation value corresponding to the third perturbation operation, and its value range is [-5, 5]; represents the degree of approach, and its value range is [0 - 1].

[0014] Furthermore, the sand cat swarm optimization algorithm constructs an objective function with minimizing the 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: ; Among them, represents the first goal; The first goal is expressed by the following formula: ; Among them, represents the error, ; represents the target value, represents the value in the reactor at any moment, represents any moment during the reaction process, represents the total time required for the complete reaction.

[0015] Further, the sand cat swarm optimization algorithm constructs an objective function based on a first objective and a second objective, and the second objective includes minimizing the error and the weighted integral at any moment; The objective function is represented by the following formula: ; Wherein, represents the objective function; represents the second objective; and respectively represent the weight coefficients of the first objective and the second objective; The second objective is represented by the following formula: .

[0016] Beneficial effects: A method for optimizing the pH value control of a reactor based on a GateLSTM model provided by the present invention solves the problems of quality fluctuations and incomplete reactions caused by the difficulty of maintaining precise regulation of the pH value in the control of the reactor pH value by existing traditional control methods in the face of complex non-linear and time-varying systems, effectively improving the accuracy and stability.

[0017] The GateLSTM model also solves the problem that traditional optimization methods such as traditional particle swarm optimization and genetic algorithms are prone to fall into local optimal solutions when dealing with dynamic, time-varying, and non-linear problems, and it is difficult to efficiently adapt to the dynamic changes of the system. The GateLSTM model and the optimized sand cat swarm optimization algorithm break through the limitations of traditional methods and solve problems such as slow system response and inaccurate parameter adjustment.

[0018] Traditional control methods often cannot effectively utilize the long-term dependence relationships in historical data, resulting in low prediction accuracy. By using the GateLSTM model, the present invention can fully mine the patterns and rules in historical data, improve the prediction ability of the system, and thus improve the PID control effect.

[0019] In a complex production environment, the operating conditions of the reactor are constantly changing, and the PID control parameters also need to be dynamically adjusted. The efficiency of traditional optimization algorithms in such dynamic control problems is low, and the optimization process may converge slowly, resulting in unsatisfactory control effects. By combining the sand cat swarm optimization algorithm, the present invention can efficiently optimize the dynamic control parameters, ensure that the pH value of the reactor can be precisely adjusted in a rapidly changing environment, and thus improve the production efficiency and safety. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is the overall flowchart of a method for optimizing the pH value control of a reactor based on a GateLSTM model of the present invention; Figure 2 It is a schematic diagram of the network structure of the GateLSTM model of the present invention; Figure 3 It is a schematic diagram of the process of the fennec fox swarm optimization algorithm of the present invention. Specific implementation manners

[0021] The technical solutions of the present invention will be described clearly and completely below. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without making creative efforts shall fall within the protection scope of the present invention.

[0022] Unless otherwise defined, the technical terms or scientific terms used in the present invention shall have the ordinary meanings understood by those of ordinary skill in the art to which the present invention belongs. The "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, terms such as "a" or "one" do not indicate a quantity limitation, but indicate that there is at least one. The terms "connected" or "coupled" and the like are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The terms "upper", "lower", "left", "right" and the like are only used to represent relative positional relationships. When the absolute position of the object being described changes, the relative positional relationship also changes accordingly.

[0023] Please refer to Figure 1 , the embodiments of the present application provide a method for optimizing and controlling the pH value of a reactor of a GateLSTM model, including the following steps: Step 1: Construct a multi-linear layer GateLSTM model for optimizing PID control parameters based on the Sigmod function; 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 the multi-linear layer and the Sigmod function, multiplies one feature space representation element by element with the dynamic characteristics to obtain the first control signal, multiplies the first control signal with other feature space representations to obtain the second control signal, and obtains the optimized PID control parameters based on the first control signal and the second control signal. The reaction parameters include the current pH value, flow rate and concentration, and the PID control parameters include scores, the proportion, integral and differential for implementing PID control.

[0024] Specifically, please refer to 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; The input layer obtains reaction parameters, the long short-term memory layer processes dynamic features to obtain dynamic features, the first linear layer obtains a weighted sum of the dynamic features to obtain a first spatial feature representation, the first Sigmod function layer compresses the first spatial feature representation, and the second multiplication layer element-wise multiplies the compressed first spatial feature representation by the dynamic features to obtain a first control signal; The second linear layer maps the compressed first spatial feature representation, the third linear layer obtains a weighted sum of the dynamic features to obtain a second spatial feature representation, the second Sigmod function layer compresses the second spatial feature representation, and the first multiplication layer element-wise multiplies the mapped first spatial feature representation by 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 for fusion processing, and outputs through the fully connected layer to obtain the PID control parameter.

[0025] Among them, the long short-term memory layer is represented by the following formula: ; Among them, represents the hidden state at the current moment, is the input data, and are weight matrices, is the bias term, is the activation function; The first linear layer is represented by the following formula: ; Among them, is the output after linear transformation by the first linear layer, is the weight matrix corresponding to the first linear layer, is the bias term corresponding to the first linear layer; Both the first Sigmod function layer and the second Sigmod function layer are represented by the following formula: ; Used to simulate the effect of probability or ratio adjustment. Through this function layer, the control signal of the pH value of the reactor can be adjusted within a certain range; The second linear layer is represented by the following formula: ; Among them, is the output after linear transformation by the second linear layer, is the weight matrix corresponding to the second linear layer, is the bias term corresponding to the second linear layer; The third linear layer is represented by the following formula: ; where, is the output after linear transformation by the third linear layer, is the weight matrix corresponding to the third linear layer, is the bias term corresponding to the third linear layer; The first multiplication layer is represented by the following formula: ; The second multiplication layer is represented by the following formula: ; The addition layer is represented by the following formula: ; where, represents the unadjusted PID control signal; The fully connected layer is represented by the following formula: ; represents the PID control signal adjusted 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.

[0026] Through the above operations, the precise regulation of the pH value in the reactor is effectively realized. The long short-term memory layer effectively captures the temporal dependence and long-term trend in the injected data, representing the prediction trend of the pH value in the reactor. The first control signal obtained subsequently ensures that the signal regulation conforms to the actual dynamic changes of the reactor. The obtained second control signal further enhances the adaptability to the state changes of the reactor. The PID control parameters fuse information from different levels and different paths, more accurately reflecting the current state of the reactor and more efficiently and stably regulating the pH value in the reactor.

[0027] 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; 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; Step 3: Determine whether the optimized PID control parameters meet the PID threshold. If they do not meet, optimize the PID control parameters through the sand cat swarm optimization algorithm that combines the distance diversity control strategy and the elite cat strategy until the PID control parameters meet the PID threshold. If they meet, input them into the PID controller. 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 meet the requirement, and the corresponding proportional, integral, and differential values are input into the PID controller. If it is less than or equal to 0.8, it is considered not to meet the requirement, and the PID control parameters need to be optimized through the sand cat swarm optimization algorithm.

[0028] In this embodiment, please refer to Figure 3 , optimize the individual position update speed in the population of the sand cat swarm optimization algorithm, which is represented by the following formula: ; where, represents the individual position after updating the position, represents the individual position before updating the position, represents the position update speed.

[0029] The distance diversity control strategy is to adjust the Euclidean distance between each pair of individuals in the sand cat swarm optimization algorithm; The adjustment includes adding a first perturbation operation to the sand cat swarm optimization algorithm to randomly perturb the Euclidean distance of the individuals until the Euclidean distance between each pair of individuals meets the distance threshold; It is represented by the following formula: ; ; where, represents the distance threshold; represents the Euclidean distance between a pair of individuals; represents the individuals in the population, represents the current operating individual, and respectively represent a pair of individuals in the cat swarm, and and both randomly add the perturbation operation, which is represented by the following formula: ; ; where, represents the first perturbation value corresponding to the first perturbation operation, satisfying , represents the uniform distribution.

[0030] The elite cat strategy ranks the fitness of individuals in the sand cat swarm optimization algorithm. The fitness of individuals meeting the predetermined ranking is added to the second perturbation operation, and a third perturbation operation is performed on the individuals not added to the second perturbation operation based on the individuals added to the second perturbation operation; The second perturbation operation is expressed as: ; Among them, represents the fitness of an individual, represents the second perturbation value corresponding to the second perturbation operation; The third perturbation operation includes adding individuals not added to the second perturbation operation to the third perturbation value and approaching the individuals added to the second perturbation operation, which is expressed by the following formula: ; Among them, represents an individual not added to the second perturbation operation, represents the third perturbation value corresponding to the third perturbation operation, and its value range is [-5, 5]; represents the degree of approach, and its value range is [0 - 1].

[0031] After updating the position, calculate the new fitness value of each cat. If the new fitness value is better than the historical optimal value, update the historical optimal position and its fitness of this individual. If the current fitness value is better than the global optimal value, update the global optimal solution.

[0032] When the maximum number of iterations is reached or the global optimal solution reaches the preset target value, the sand cat swarm optimization algorithm terminates.

[0033] By combining distance-based diversity control and the elite cat strategy, premature convergence is effectively avoided, and the global search ability is improved. The distance-based diversity control strategy avoids over-concentration of individuals by increasing the search diversity of the cat swarm, while the elite cat strategy promotes the entire group to explore a wider solution space by maintaining the independence of a part of the excellent individuals. The improvement of this algorithm enables it to find the global optimal solution more efficiently when solving complex optimization problems.

[0034] In this embodiment, the sand cat swarm optimization algorithm constructs an objective function with a first objective and a second objective. The first objective includes minimizing the error, and the second objective includes minimizing the error and the weighted integral at any moment. 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: ; Among them, represents the objective function; represents the second objective; and respectively represent the weight coefficients of the first target and the second target; The first target is represented by the following formula: ; where, represents the error, ; represents the target value, represents the value in the reactor at any moment represents any moment during the reaction process, represents the total time required for the complete reaction.

[0035] The second target is represented by the following formula: .

[0036] Step 4: Based on the PID controller with the input PID control parameters, complete the control of the pH value of the precursor in the reactor; Step 5: Record the PID control parameters that meet the PID threshold in Step 3 as historical data to optimize the GateLSTM model.

[0037] In this embodiment, for the training of the GateLSTM model, first collect the proportional, integral, and differential values during the process of controlling the pH value of the precursor by conventional PID to form a data set. Randomly divide the data set into a training set (80%) and a validation set (20%). The training set is used for model parameter learning, while the validation set is used to evaluate the generalization ability of the model. During the training process, the mean square error (MSE) is used as the loss function to measure the deviation between the predicted value and the true value. The optimization strategy uses the Adam optimizer (ADAM), and the initial learning rate is set to 0.001. At the same time, the cosine annealing (Cosine Annealing) strategy is used to dynamically adjust the learning rate to ensure the stability of the training process and improve the performance of the final model. The ADAM optimization method is used for training, and the batch size is set to 64 to balance the computational efficiency and model stability. In addition, to avoid overfitting, an early stopping mechanism (Early Stopping) is introduced during the training process. When the validation loss does not decrease significantly after 10 consecutive rounds of training, the training is terminated in advance. At the same time, the maximum number of iterations is set to 100 to ensure that the model fully learns the data features and avoids overtraining.

[0038] After using the GateLSTM model, the proportional, integral, and differential of the PID control parameters that meet the PID threshold in the present invention are reconstituted 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, further more precisely regulating the pH value of the precursor.

[0039] Based on the above steps, a comparative experiment was conducted on the same set of data using the reaction kettle pH value optimization control method of a GateLSTM model provided by the present invention, traditional PID control, the combination of PID control and neural network, and the combination of PID control and particle swarm optimization algorithm. For specific results, please refer to Table 1 and Table 2; Table 1: Control parameters of the present invention and various control methods;

[0040] Table 2: Comparison results of the present invention and various control methods;

[0041] Note: GateLSTM and MSCSO optimized PID control are the control methods provided by the present invention; According to the experimental data, there are significant differences in the performance of the four control methods in pH value regulation.

[0042] The traditional PID control method takes 18 minutes to adjust the pH value from 10.5 to the target value of 11.12. The stabilization time is relatively long, the final pH value is 10.90, with a large fluctuation (±0.15 pH), and the control accuracy is only 95.13%, failing to accurately reach the target pH value.

[0043] When using the combined control method of PID and neural network, the stabilization time is shortened to 14 minutes, the final pH value is 11.08, which is closer to the target pH value of 11.12, and the fluctuation range is ±0.10 pH. The control accuracy is increased to 99.64%. Although the accuracy of this method has been improved, the fluctuation still exists and the target value has not been fully reached.

[0044] The combined method of PID and PSO control adjusts the pH value to 11.12 within 12 minutes, with significant improvements in both stability and accuracy. The final pH value is 11.11, very close to the target value, the fluctuation range is reduced to ±0.05 pH, and the control accuracy is 99.91%. Compared with the traditional PID control and the combination of PID and neural network control, this method demonstrates higher control accuracy and stability.

[0045] The GateLSTM and MSCSO optimized PID control method performs the best, precisely adjusting the pH value to 11.12 within 11 minutes, with the smallest fluctuation range, only ±0.03 pH, and a control accuracy of 99.97%. This method combines GateLSTM for historical data learning and MSCSO to optimize PID parameters, showing excellent performance in terms of stability, accuracy, and response speed.

[0046] As can be seen from the data analysis results, the GateLSTM and MSCSO optimized PID control method stands out among all the comparison methods, being able to precisely adjust the pH value to the target value in the shortest time (11 minutes), with the smallest fluctuation range and the highest control accuracy (99.97%). In contrast, although the traditional PID control can complete the task, it has large fluctuations and low control accuracy, significantly reducing the stability and response speed of the system.

[0047] Combined with the experimental data, both the PID and PSO control and the PID and neural network control have greater improvements compared to the traditional PID control, but they still cannot compare with the GateLSTM and MSCSO optimized PID control method. Especially in a complex dynamic environment, the GateLSTM and MSCSO optimized PID control method provides more stable and precise pH value adjustment, with a broader application prospect.

[0048] The preferred specific embodiments of the present invention have been described in detail above. It should be understood that those of ordinary skill in the art can make many modifications and variations based on the concept of the present invention without creative work. Therefore, all technical solutions that can be obtained by those skilled in the art in the technical field of the present invention through logical analysis, reasoning, or limited experiments based on the concept of the present invention on the basis of the prior art should fall within the protection scope determined by the claims.

Claims

1. A method for optimizing pH value of a reactor using a GateLSTM model, characterized in that: The steps include: Step 1: Construct 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 parameter meets the PID threshold. If not, optimize the PID control parameter 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 parameter meets 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 method for optimizing pH value of a reactor according to the GateLSTM model of claim 1, characterized in that: The method further includes step 5: recording the PID control parameters satisfying the PID threshold in step 3 as historical data to optimize the GateLSTM model.

3. The method for optimizing the pH value of a reactor according to the GateLSTM model of 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 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.

4. The method for optimizing the pH value of a reactor according to the GateLSTM model of claim 3, characterized in that: 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 the 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 the 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 the 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 multiplies the mapped first spatial feature representation by the compressed second spatial feature representation element by element to obtain a second control signal; 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.

5. The method for optimizing the pH value of a reactor according to the GateLSTM model of claim 1, characterized in that: The distance diversity-based control strategy is to adjust the Euclidean distance of each pair of individuals in the sand dune cat colony optimization algorithm; The adjustment includes adding a first perturbation operation to the sand dune cat colony optimization algorithm to randomly perturb the Euclidean distances of the individuals until the Euclidean distances of each pair of individuals meet a distance threshold; It is expressed by the following formula: ; ; in, Indicates the distance threshold; Represents the Euclidean distance between a pair of individuals; represents the individuals of a population, Indicates the individual of the current operation. and represent a pair of individuals in the cat population, and and The disturbance operation is randomly added, which is expressed by the following formula: ; ; in, 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 according to the GateLSTM model of claim 5, characterized in that: Before executing the distance diversity control strategy on the sand dune cat population optimization algorithm, the individual position update speed in the population is also optimized, which is expressed by the following formula: ; in, represents the individual position after the updated position, represents the individual position before updating the position, Indicates the position update speed.

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

8. The method for optimizing pH value of a reactor according to the GateLSTM model of claim 1, characterized in that: The sand dune cat swarm optimization algorithm constructs an objective function with minimizing error as the first objective; The error includes the difference between the target pH value and the pH value in the reactor at any time; The objective function is expressed by the following formula: ; in, Indicates the first goal; The first objective is expressed by the following formula: ; in, Indicates the error, ; Indicates the target value, Indicates the amount of liquid in the reactor at any time 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 according to the GateLSTM model of claim 8, characterized in that: The sand dune 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 goal and the second goal 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

  • Method and equipment for automatically preparing ternary precursor

    CN114180650A

  • Ternary precursor reaction kettle reaction reverse selectivity control method and system

    CN117234266A

  • Unmanned aerial vehicle airport liftable platform optimization control method

    CN119439698A