Hydrogen-rich water optimization preparation method and multi-cycle generation system
Through the combination of SVR regression model and PID controller, the nonlinear relationship between temperature and hydrogen rod immersion time is solved, the precise control of hydrogen-rich water is achieved, the production efficiency and product quality are improved, and it is suitable for mass production on industrial scale.
Patent Information
- Application Number
- CN202411080297.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-08-08
AI Technical Summary
The prior art is difficult to flexibly control the temperature and hydrogen rod immersion time, which makes it difficult for hydrogen-rich water to achieve ideal and accurate indicators in large-scale production, limiting the production efficiency and product quality of industrial scale. .
The SVR regression model combined with the PID controller was used to process the nonlinear relationship between independent variables (temperature and hydrogen rod immersion time) and the dependent variables (hydrogen content, ORP value and oxygen content), and adjust them through dynamic compensation mechanism and real-time feedback. , realize precise control of the hydrogen-rich water generation system.
Accurate control of hydrogen-rich aquatic products has been achieved, production flexibility and quality consistency have been improved, costs and resource waste have been reduced, and production efficiency has been improved.
Smart Images

Figure CN118993294A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of hydrogen-rich water preparation, specifically to the technical field of preparing HRW by electrolyzing water, and in particular to an optimized preparation method of hydrogen-rich water and a multi-cycle generation system. Background Art
[0002] Hydrogen-Rich Water (HRW), that is, "water rich in dissolved hydrogen molecules", is commonly called "hydrogen molecule bubble water" or "hydrogen water". Its hydrogen content, ORP value (oxidation-reduction potential) and oxygen content are its main process indicators:
[0003] 1) Hydrogen content: The main effect of hydrogen-rich water comes from the dissolved hydrogen molecules, so it is necessary to ensure that the hydrogen-rich water contains sufficient and stable hydrogen molecules;
[0004] 2) ORP value: A lower ORP value means that hydrogen-rich water has stronger reducing properties, which is directly related to its antioxidant capacity;
[0005] 3) Oxygen content (dissolved oxygen): The dissolved oxygen in hydrogen-rich water plays a certain role in maintaining the ecological balance and biological activity of the water body.
[0006] HRW not only plays an important role in the biomedical field in reducing tissue oxidative damage after ischemia-reperfusion, inhibiting inflammatory response, preventing and treating metabolic diseases, preventing and treating arteriosclerosis and treating ophthalmic diseases, but also plays an important role in the field of crops in promoting biosynthesis, preventing and treating oxidative damage and increasing growth hormone levels.
[0007] There are currently three main methods for preparing HRW. The first is to introduce H2 into water to prepare saturated water. The second is to use the reaction of metallic magnesium and water to produce hydrogen to prepare HRW. The third is to produce hydrogen by electrolyzing water to prepare HRW.
[0008] For the third method of electrolytic preparation of HRW and the principle of its hydrogen production unit, please refer to the contents of references [3-4]; however, the latest research shows [5] that in the hydrogen production unit, the factors affecting the preparation of HRW by hydrogen rods are as follows: Figure 2 As shown in the figure, when the temperature remains unchanged, the hydrogen content in HRW increases with the extension of the time the hydrogen rod is immersed in water, the ORP value decreases with the extension of the immersion time, and the oxygen content decreases with the increase of temperature. There is a nonlinear relationship between these independent variables and the dependent variable.
[0009] Although a relatively optimized preparation process was given through experiments [5]: when HRW was prepared using a container with a diameter of 25 mm, the hydrogen content of the HRW in the group where the hydrogen rod was not removed remained constant after dropping to 0.5 mg / L, and the hydrogen content of the group where the hydrogen rod was removed dropped to 0 mg / L after 72 hours. However, this undoubtedly restricts the industrial-scale mass production of hydrogen-rich water with ideal and accurate hydrogen content, ORP value and oxygen content. To this end, some existing technologies attempt to solve this technical problem, such as:
[0010] One prior art discloses a hydrogen-rich water preparation device through optimized electrolysis [1]: the above-mentioned independent variable can be controlled by using a hydrogen discharge pressure limiting mechanism, thereby achieving regulation of the dependent variable. However, the above-mentioned nonlinear relationship is not essentially solved, and actual application still requires subjective adjustment by the user, which is not very practical;
[0011] Another prior art discloses electric heat cold hydrogen storage technology [2]: optimizing at the operation level to obtain the optimal operating conditions of the system under multiple planning schemes. The planning results of the upper-level configuration optimization stage are used as input parameters for the lower-level operation optimization stage, which directly affect the lower-level objective function and constraints. The operation results of the lower-level operation optimization stage will be fed back to the upper layer in a timely manner to verify the accuracy of the upper-level planning results, and prompt the planning stage model to re-search for the optimal planning scheme, and continuously cycle to achieve the overall optimum. However, it is essentially a linear programming technology based on prior experience, which is not very suitable for the nonlinear relationship between the above-mentioned independent variables and dependent variables;
[0012] To this end, the present invention proposes an optimized preparation method for hydrogen-rich water and a multi-cycle generation system.
[0013] The citations in the present invention are as follows:
[0014] [1] Yang Xiaoxi, Huang Nan, Cheng Longfei, et al. An electrolyzer capable of preparing hydrogen-rich water[P]. CN202210237297.8: 2022-05-06.
[0015] [2] Yang Jiaqi, Zhang Shunyu, Zhou Zhenling, et al. Electric, thermal, cold and hydrogen storage integrated energy system and method integrating production and storage [P]. CN202311088386.1: 2023-11-24.
[0016] [3] Park In-cheol, Kim Il-bong. Portable HRW manufacturing device:
[0017] CN201180022475.5[P].2013-04-10.
[0018] [4] Zhang Minghui. Design and research of hydrogen-rich water cup for the elderly based on service design concept[D]. Qingdao University, 2019.
[0019] [5] Huang Qingjian, Zhang Shuangshuang, Sha Jibin, et al. Experimental study on preparation of hydrogen-rich water by hydrogen rods[J]. Military Medicine, 2016, 40(8): 646-650. Summary of the invention
[0020] In view of this, the embodiment of the present invention hopes to provide an optimized preparation method for hydrogen-rich water and a multi-cycle generation system to solve or alleviate the technical problems existing in the prior art, namely: for production tasks with different production requirements and index specifications, that is, hydrogen-rich water product production tasks with different hydrogen contents, ORP values and oxygen contents, how to flexibly control the temperature and hydrogen rod immersion time to achieve mass production of hydrogen-rich water with ideal and accurate hydrogen content, ORP value and oxygen content. And at least one beneficial option is provided for this; the technical solution of the present invention is implemented as follows:
[0021] First, the optimization preparation method of hydrogen-rich water:
[0022] 1. Overview:
[0023] This solution aims to solve the above technical problems; by introducing the SVR regression model to perform regression tasks, the nonlinear relationship between independent variables (temperature and hydrogen rod immersion time) and dependent variables (hydrogen content, ORP value and oxygen content) is processed, and a dynamic compensation mechanism is introduced in each production task to correct the SVR regression model; after generating the corresponding error value e, the control error signal e1(t) and the control error signal e2(t) are calculated, and the hydrogen-rich water multi-cycle generation system is controlled based on the PID controller algorithm to achieve mass production of hydrogen-rich water with ideal and accurate hydrogen content, ORP value and oxygen content.
[0024] (II) PID controller algorithm:
[0025] For this solution, we must first clarify the method of controlling the independent variable to achieve the dependent variable. This solution chooses the PID controller algorithm. The PID controller controls the controlled object by forming a linear combination of three links: proportional (P), integral (I) and differential (D).
[0026] 2.1 Application of PID controller:
[0027] For the gas-liquid hybrid unit and the hydrogen production unit, the control error signal e1(t) and the control error signal e2(t) need to be applied respectively, then:
[0028] 1) For gas-liquid hybrid units:
[0029]
[0030] 2) For hydrogen production units:
[0031]
[0032] Where: u1(t) and u2(t) are the control output electrical signals of the gas-liquid hybrid unit and the hydrogen production unit respectively; K P1 , K I1 , K D1 are the proportional, integral and differential coefficients of the PID controller of the gas-liquid hybrid unit; K P2 , K I2 , K D2 are the proportional, integral and differential coefficients of the PID controller of the hydrogen production unit; e1(t) and e2(t) are the control error signals of the gas-liquid hybrid unit and the hydrogen production unit, that is, the difference between the expected output and the actual output; τ is the time variable.
[0033] 2.2PID control mechanism:
[0034] Proportional link (P): Proportional to the error signal, used to quickly respond to error changes. Proportional coefficient K P The larger it is, the faster the system responds.
[0035] Integral link (I): Integrate the past errors to eliminate the steady-state error of the system. Integral coefficient K I It determines the strength of the integral action. Appropriate integral action can improve the control accuracy of the system.
[0036] Differential link (D): predicts the trend of error change and produces advanced control to reduce overshoot, overcome oscillation and improve system stability. Differential coefficient K D The larger it is, the stronger the differential effect is.
[0037] 2.3 Technical ideas:
[0038] Based on 2.1 to 2.2, it can be seen that it is necessary to further clarify the difference between the expected output and the actual output, that is, to obtain the control error signals e1(t) and e2(t); however, for this scheme, there is a nonlinear relationship between the independent variable and the dependent variable; therefore, how to deal with the nonlinear relationship between the two, and predict the dependent variable, and then control the independent variable that is controllable itself, can realize the control of the hydrogen-rich water multi-cycle generation system, and realize mass production of hydrogen-rich water with ideal and accurate hydrogen content, ORP value and oxygen content.
[0039] (III) Technical solution:
[0040] To achieve the above objectives, this scheme introduces the following steps S1 to S4, which are cyclically executed in each round of preparation batches:
[0041] 3.1 Step S1, read the SVR regression model:
[0042] Input the dependent variable y into the regression function f(y), including the hydrogen content h, ORP value O and oxygen content o, and use the RBF kernel function using its dot product operation and its support vector x i , processing the nonlinear relationship between the independent variable x and the dependent variable y, and using the ε-insensitive loss function to perform error constraints on the regression function f(y); the regression function f(y) outputs the corresponding independent variable x, including the temperature T and the hydrogen rod immersion time S. Step S1 specifically includes the following steps S100-S101;
[0043] 3.1.1 Step S100, processing regression task:
[0044] First, the RBF kernel function K(y,x i ) performs a dot product operation:
[0045]
[0046] Among them: Υ is the hyperparameter of the RBF kernel function; σ is the width parameter of the kernel function, which controls the radial range of the function. ||yx i || 2 is the dependent variable y and the support vector x i The RBF kernel function can map the input data into a high-dimensional space to handle complex nonlinear relationships.
[0047] The goal of the SVR regression model is to find a regression function f(y) that can predict the corresponding independent variable x (output value) by performing the regression task for a given dependent variable y (input value):
[0048]
[0049] Where: α i and α i * is the trained Lagrange multiplier; b is the bias term; x i is the i-th support vector x i ; ; n is the number of support vectors.
[0050] 3.1.2 Step S101, introducing the ε-insensitive loss function L ε Constraints on (x',f(y)):
[0051]
[0052] Where x' is the value of the independent variable x in the previous batch. The radius ε refers to the radius of the insensitive region, which is used to control the model's tolerance to prediction errors. When the absolute value of the difference between the predicted value and the true value is less than or equal to the radius ε, the SVR regression model believes that its prediction result is accurate, and the loss is 0. Once the absolute value of the difference between the predicted value and the true value exceeds this range, the loss will accumulate linearly.
[0053] 3.2 Method for training SVR regression model:
[0054] Although the SVR regression model is used in the above step S1, the model still needs to be trained before use. The method includes:
[0055] 3.2.1 The first step, data engineering:
[0056] Collect historical data, record the dependent variable y under different hydrogen contents h, ORP values O and oxygen contents o, as well as the corresponding temperature T and hydrogen rod immersion time S, i.e., the independent variable x; and then construct the data set D:
[0057] D={[(T1,S1)(h1,O1,o1)],[(T2,S2)(h2,O2,o2)],...,[(T m ,S m )(h m ,O m ,o m )]};
[0058] Among them, [(T i ,S i )(h i ,O i ,o i )] is the i-th sample, and m is the number of samples.
[0059] Then, the dataset D is normalized and outliers and noise are removed.
[0060] 3.2.2 The second step is to set the convex optimization goal:
[0061] The goal is to find a hyperplane that divides the data points in the sample in the data set D and forms several support vectors x i ; Based on the RBF kernel function K(y,x i ) performs the kernel trick, implicitly implementing the dot product operation in high-dimensional space
[0062] 3.2.3 The third step is to constrain the convex optimization objective:
[0063] The ε-insensitive loss function in step S101 is introduced to constrain the convex optimization objective. When the absolute value of the difference between the predicted value and the true value is less than or equal to the radius ε, the SVR regression model believes that its prediction result is accurate, and the loss is 0. Once the absolute value of the difference between the predicted value and the true value exceeds this range, the loss will accumulate linearly.
[0064] 3.2.4 The third step, training:
[0065] Training is to continuously solve the above convex optimization problem, during which the k-fold cross-validation method is introduced; the overall training steps are:
[0066] (1) Randomly divide the data set D into k subsets of equal size, namely D1, D2, ..., D k
[0067] (2) Loop execution:
[0068] Select D i As the test set D test , and the remaining subsets are combined as training set D train ; In the training set D train In the example, the QP algorithm (quadratic programming algorithm) is used to solve the convex optimization objective; it is responsible for finding a set of Lagrange multipliers α i and α i *And it is required to correspond to the data point, and then the normal vector W can be obtained.
[0069] Based on the construction of the Lagrangian function, we can obtain a Lagrangian function that only contains the Lagrangian multiplier α. i and α i *The dual problem is then solved to obtain the optimal Lagrange multiplier α i and α i * value. Then the normal vector W can be obtained by α i and α i * and the corresponding support vector x i It can also be expressed by the support vector x i To directly obtain the value of the bias term b.
[0070] (3) Using the test set D test Test the trained SVR model. Calculate the average of k test results as the final evaluation of model performance.
[0071] (4) Select the model hyperparameters obtained from the round of training that minimizes the mean square error (MSE) as the optimal model hyperparameters; that is, the Lagrange multiplier α i and α i *, normal vector W, bias term b, penalty coefficient C and hyperparameter Υ;
[0072] (5) Stop training when the model converges or reaches the predetermined number of iterations.
[0073] 3.3 Step S2, dynamic compensation mechanism:
[0074] For the dependent variable y input in step S1, the residual sum of squares S of the dependent variable y is minimized by the least squares method to obtain the error feedback coefficient β i , look back the historical forecast error to compensate. Form the compensated independent variable x";
[0075] Error feedback coefficient β i It can help the SVR regression model “remember-correct” past forecast errors, thereby improving the accuracy of current forecasts.
[0076] 3.3.1 Step S200, calculate the residual sum of squares S:
[0077] Look back to the previous M historical moments, each moment includes the actual value y of the dependent variable at that time i and predicted values Calculate the residual sum of squares S to quantify the accuracy of the regression task (prediction):
[0078]
[0079] The residual sum of squares S is calculated to quantify the gap between the predicted value and the actual value, which is the objective function that needs to be minimized in the optimization process.
[0080] 3.3.2 Step S201, obtaining error feedback coefficient β i :
[0081] In order to use historical forecast errors to improve current forecasts, the error feedback coefficient β is solved by the least squares method. i , so that the predicted value after compensation is closer to the actual value. i =y i -y i ' is the historical forecast error, and a linear relationship is constructed to represent the forecast value after compensation:
[0082]
[0083] in, is the dependent variable after compensation, a i-1 is the prediction error of the previous data point. In order to solve β i , substitute the above linear relationship into the residual sum of squares S and calculate β i Take the derivative and set it equal to 0 to find the β that minimizes the residual sum of squares S i value.
[0084] The smallest β i After getting the value, you can use it to update the independent variable x":
[0085] x"=x'+β i Δx;
[0086] Where Δb x is the adjustment associated with historical forecast errors. In this way, the SVR regression model can "remember-correct" past forecast errors, thereby improving the accuracy of current forecasts.
[0087] 3.4 Step S3, calculate the error value e:
[0088] Based on the independent variable x' obtained in step S2, the difference between the independent variable x' and the independent variable x' in the previous batch is calculated, which may be an absolute value difference or a relative error, and an error value e is obtained;
[0089] 3.5 Step S4, applying PID controller:
[0090] Based on the technical solutions described in 2.1 to 2.2; when we get the error value e, we can obtain the control error signal e1(t) and the control error signal e2(t):
[0091] e1(t)=|e-u1(t-1)|;
[0092] e2(t)=|e-u2(t-1)|;
[0093] Among them, u1(t-1) and u2(t-1) are the control output electrical signals of the gas-liquid hybrid unit and the hydrogen production unit in the previous production batch, respectively.
[0094] Then, the control output electrical signals u1(t-1) and u2(t-1) are input into the PID controller algorithm as described in 2.1 to 2.2. After the control output electrical signal u1(t) and the control output electrical signal u2(t) are output, the gas-liquid hybrid unit and the hydrogen production unit are dynamically controlled to meet the production task.
[0095] (IV) Mechanisms for resolving technical issues:
[0096] The SVR regression model can capture the complex nonlinear relationship between the independent variables (temperature and hydrogen rod immersion time) and the dependent variables (hydrogen content, ORP value and oxygen content). In each production task, the actual measured value is compared with the SVR model predicted value; after the error value e is generated in step S3, the difference between the model prediction and the actual production can be reflected;
[0097] Based on the error value e, two control error signals e1(t) and e2(t) are calculated, reflecting the gap between the current production state and the target state. The PID controller adjusts the temperature and hydrogen rod soaking time according to these error signals to reduce the error and drive the system closer to the target state.
[0098] Furthermore, through the real-time feedback and adjustment of the PID controller, the system can flexibly and accurately control the temperature and hydrogen rod soaking time during the production process, and can flexibly enable the system to be quickly adjusted according to different production requirements (i.e. different hydrogen content, ORP value and oxygen content indicators).
[0099] In practical applications, through the cyclic operation and continuous optimization of the above mechanism, the system can maintain a high degree of consistency and accuracy in a mass production environment, ensuring that each batch of hydrogen-rich water products can achieve the ideal and accurate hydrogen content, ORP value and oxygen content.
[0100] Second, the hydrogen-rich water multi-circulation generation system:
[0101] Including pure water treatment equipment and hydrogen production unit;
[0102] It also includes a processor and a memory connected to the processor, wherein the memory stores program instructions, and when the program instructions are executed by the processor, the processor executes the above-mentioned hydrogen-rich water optimization preparation method, and transmits the control output electrical signal u1(t) and the control output electrical signal u2(t) to the PLC controller;
[0103] After the PLC controller reads the control output electrical signal u1(t), it controls the hydrogen rod immersion time of the hydrogen production unit, generates hydrogen of corresponding concentration, and transmits it to the pressure cutting machine;
[0104] The pure water treatment device extracts pure water from the pure water storage tank and filters out salt and other impurities, and then sends it to the pressure cutter;
[0105] The pressure cutter adjusts the hydrogen and pure water inside to the corresponding pressure, and then delivers the hydrogen and pure water to the gas-liquid mixing unit at the same time;
[0106] After the PLC controller reads the control output electrical signal u2(t), it controls the gas-liquid mixing unit to mix and heat to a corresponding temperature to form hydrogen-rich water; the hydrogen-rich water is sent to the gas-water mixing tank for storage;
[0107] When the production volume of this batch of hydrogen-rich water meets the production index, it is sent to the storage barrel through the water outlet for storage.
[0108] Compared with the prior art, the present invention has the following beneficial effects:
[0109] 1. Improve product preparation flexibility: For industrial-scale large-batch product preparation, the solution of the present invention allows manufacturers to no longer be limited to fixed process indicators; based on the nonlinear processing function provided by this solution, when manufacturers need to complete the production tasks of hydrogen-rich water products with different hydrogen contents, ORP values, and oxygen contents, the technical solution of the present invention can help them flexibly control the temperature and hydrogen rod soaking time to meet the production tasks. That is, whether it is a product with high hydrogen content or a specific ORP value, the corresponding production parameters can be obtained through this solution and automatically controlled.
[0110] 2. Improve product preparation quality: Through the precise control of the SVR regression model and the PID controller, the present invention can ensure that the hydrogen-rich water products produced have consistent and high-quality hydrogen content, ORP value and oxygen content, thereby meeting the health needs of consumers.
[0111] 3. Improve production efficiency: The PID controller used in the present invention has a real-time feedback mechanism, which can reduce the adjustment time and error in the production process, thereby improving production efficiency. In addition, the predictive ability of the SVR regression model also helps to optimize the production process and reduce unnecessary downtime or adjustment time.
[0112] 4. Reduce costs and resource waste: Precise control means less waste of raw materials and lower defective rates, which helps reduce production costs. At the same time, optimized production processes can also reduce energy consumption and further reduce operating costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0113] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0114] Figure 1 It is a schematic diagram of the method flow of the present invention;
[0115] Figure 2 Schematic diagram of the degree of change of hydrogen production and redox potential, wherein part (a) is a line graph showing the relationship between the increase of hydrogen content in hydrogen-rich water produced by hydrogen rods with increasing temperature, and part (b) is a line graph showing the relationship between the decrease of ORP value in hydrogen-rich water produced by hydrogen rods with increasing temperature under the same time conditions;
[0116] Figure 3 Schematic diagram of the training method of the SVR regression model of the present invention;
[0117] Figure 4It is a schematic diagram of the structure of the generation system of the present invention;
[0118] Figure 5 A schematic diagram of a method for using the generation system of the present invention;
[0119] Figure 6 It is a comparison chart of hydrogen content results in the test examples of the present invention;
[0120] Figure 7 It is a comparison chart of oxygen content results in the test examples of the present invention. DETAILED DESCRIPTION
[0121] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below;
[0122] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0123] Example 1: Please refer to Figure 1 This embodiment discloses an optimized preparation method for hydrogen-rich water; different production batches need to be planned in advance when applied, and the hydrogen content h, ORP value O and oxygen content o of the hydrogen-rich water product in each production batch should be consistent, so that the following steps S101 and S2 can read historical data. In each round of preparation batches, this method sequentially executes the following steps S1 to S4.
[0124] In this embodiment, regarding step S1, read the SVR regression model: input the dependent variable y into the regression function f(y), including the hydrogen content h, ORP value O and oxygen content o, and use the RBF kernel function to utilize its dot product operation and its support vector x i , processing the nonlinear relationship between the independent variable x and the dependent variable y, and using the ε-insensitive loss function to perform error constraints on the regression function f(y); the regression function f(y) outputs the corresponding independent variable x, including the temperature T and the hydrogen rod immersion time S. Step S1 specifically includes the following steps S100-S101;
[0125] Specifically, step S100, processing the regression task: first, the RBF kernel function K(y,x i) performs a dot product operation:
[0126]
[0127] Among them: Υ is the hyperparameter of the RBF kernel function; σ is the width parameter of the kernel function, which controls the radial range of the function. ||yx i || 2 is the dependent variable y and the support vector x i The RBF kernel function can map the input data into a high-dimensional space to handle complex nonlinear relationships.
[0128] The goal of the SVR (Support Vector Regression) model is to find a regression function f(y) that can predict the corresponding independent variable x (output value) by performing the regression task for a given dependent variable (input value):
[0129]
[0130] Where: α i and α i * is the trained Lagrange multiplier; b is the bias term; x i is the i-th support vector x i ; ; n is the number of support vectors.
[0131] Understandably,
[0132] By using the RBF kernel function and the SVR model, the complex nonlinear relationship between the dependent and independent variables can be captured, thereby achieving high-precision predictions. Accurate predictions can ensure that products that meet specifications are produced. The SVR model constructs a regression function by finding support vectors, which represent the key features of the data. Therefore, the model has a strong generalization ability for the prediction of new data and can maintain good prediction performance even outside the training data.
[0133] Specifically, in step S101, in order to ensure the prediction accuracy of the SVR regression model and tolerate small prediction errors to a certain extent, step S101 introduces the ε-insensitive loss function L ε (x',f(y)). This loss function is characterized by tolerance for prediction errors within a small range, thereby avoiding overfitting the model to the noise in the data:
[0134]
[0135] Where x' is the value of the independent variable x in the last batch. The radius ε refers to the radius of the insensitive region, which is used to control the model's tolerance to prediction errors. When the absolute value of the difference between the predicted value and the true value is less than or equal to the radius ε, the SVR regression model believes that its prediction result is accurate, and the loss is 0. Once the absolute value of the difference between the predicted value and the true value exceeds this range, the loss will accumulate linearly.
[0136] It can be understood that this step essentially needs to be executed by obtaining the true value x' in the next time step after steps S1 to S4 are completed; therefore, this step is essentially a correction measure for the regression function f(y). By introducing the ε-insensitive loss function, the model can tolerate small prediction errors to a certain extent, while focusing on and optimizing those predictions with large errors. This helps to improve the overall prediction accuracy of the model. At the same time, avoid overfitting small fluctuations in the data, so that the model can better adapt to new data and new situations, thereby enhancing its generalization ability. And by continuously adjusting and optimizing the SVR regression model based on actual data, the conditions required for the production of hydrogen-rich water (such as temperature and hydrogen rod immersion time) can be more accurately predicted, thereby optimizing the preparation process and improving product quality and efficiency.
[0137] Furthermore, the Python execution program of steps S100 to S101 is as follows:
[0138]
[0139]
[0140] In the above program, the principle is as follows:
[0141] (1) Step S100 (predict method): The SVR model is a regression version based on the support vector machine. In this model, the RBF kernel function is used to map the input data to a high-dimensional space, so that it can handle complex nonlinear relationships. Given a dependent variable y, the SVR model will predict the corresponding independent variable x. The predict method uses the trained SVR model to make this prediction.
[0142] (2) Step S101 (calculate_loss method): In the calculate_loss method, we first use the predict method to get the predicted value x_predicted. Then we calculate the difference between each predicted value and the true value x_prime, and calculate the loss according to the definition of the ε-insensitive loss function. If the difference between the predicted value and the true value is less than or equal to ε (here we use the epsilon parameter in the SVR model as the radius of the insensitive region), the loss is 0. If the difference is greater than ε, the loss is the difference minus ε. Finally, the average loss of all samples is calculated as the output of this method.
[0143] In this embodiment, regarding step S2, dynamic compensation mechanism: in the process of optimizing the preparation of hydrogen-rich water, in order to more accurately control the production parameters to obtain products that meet the specifications, we introduced a dynamic compensation mechanism. The core of this mechanism is to use historical prediction errors to optimize the current prediction, thereby improving the accuracy and efficiency of the production process. For the dependent variable y input in step S1, the residual sum of squares S of the dependent variable y is minimized by the least squares method to obtain the error feedback coefficient β i , and look back on historical forecast errors to compensate. Form the compensated independent variable x"; error feedback coefficient β i It can help the SVR regression model "remember-correct" past prediction errors, thereby improving the accuracy of current predictions. It includes the following steps S200-S201.
[0144] Specifically, step S200, calculate the residual sum of squares S: First, look back at the data of the previous M historical moments. For each historical moment, we have the actual value of the dependent variable y at that time i and the predicted value obtained by the SVR regression model To quantify the accuracy of the predictions, we calculate the sum of squared residuals S between these actual and predicted values:
[0145]
[0146] The residual sum of squares S is calculated to quantify the gap between the predicted value and the actual value, which is the objective function that needs to be minimized in the optimization process.
[0147] Specifically, in step S201, the error feedback coefficient β is obtained. i :In order to use historical forecast errors to improve current forecasts, the error feedback coefficient β is solved by the least squares method i , so that the predicted value after compensation is closer to the actual value. i =y i -y i' is the historical forecast error, and a linear relationship is constructed to represent the forecast value after compensation:
[0148]
[0149] in, is the dependent variable after compensation, a i-1 is the prediction error of the previous data point. In order to solve β i , the operation method is as follows:
[0150] 1) Substitute into the residual sum of squares formula:
[0151]
[0152] 2) Minimize the residual sum of squares:
[0153] For S about β i Take the derivative and set it equal to 0 to find the extreme point and find the β that makes S reach the minimum value i :
[0154]
[0155]
[0156] Further expansion and arrangement can be obtained i The solution.
[0157] It is understandable that if there is a clear historical forecast error sequence ∈ i , and a i-1 is the prediction error ∈ at the previous moment i-1 , then a in the above formula i-1 should be replaced by ∈ i-1 ;
[0158] The smallest β i After getting the value, you can use it to update the independent variable x":
[0159] x"=x'+β i Δx;
[0160] Where Δb x is an adjustment related to historical forecast errors and is a preset fixed value. In this way, the SVR regression model can "remember-correct" past forecast errors, thereby improving the accuracy of current forecasts.
[0161] Furthermore, the Python execution program of step S2 is as follows:
[0162] import numpy as np
[0163] #y_actual: List of actual dependent variable values
[0164] #y_predicted: Initial predicted dependent variable value list
[0165] #x_predicted: Initial prediction independent variable value list
[0166] #delta_x: The adjustment amount related to the historical forecast error, which is a preset fixed value #M: The number of historical data points to look back
[0167] defcalculate_residual_square_sum(y_actual,y_predicted):
[0168] """Calculate the residual sum of squares S between the actual value and the predicted value"""
[0169] return np.sum((y_actual-y_predicted)**2)
[0170] defcalculate_beta(y_actual,y_predicted,a_prev,M):
[0171] """Solve the error feedback coefficient βi by the least squares method"""
[0172] #Build matrix A and vector b
[0173] A=np.array([a_prev[i-1]for iin range(M)]).reshape(-1,1)
[0174] b=y_actual[:M]-y_predicted[:M]
[0175] #Use numpy's lstsq function to solve the linear equations
[0176] beta,_,_,_=np.linalg.lstsq(A,b,rcond=None)
[0177] return beta[0]
[0178] defupdate_x_predicted(x_predicted,beta,delta_x):
[0179] """Use βi to modify the current predicted independent variable x to x""""
[0180] return x_predicted+beta*delta_x
[0181] #Main program
[0182] y_actual = np.array([1.2,1.5,1.8,2.1,2.4]) #actual dependent variable value y_predicted = np.array([1.0,1.3,1.6,1.9,2.2]) #initial predicted dependent variable value x_predicted = np.array([0.5,0.6,0.7,0.8,0.9]) #initial predicted independent variable value delta_x = 0.1 #adjustment related to historical forecast error
[0183] M=3#Number of historical data points to look back
[0184] #Calculate the residual square sum SS = calculate_residual_square_sum(y_actual,y_predicted)
[0185] print(f"Residual sum of squares S:{S}")
[0186] #a_prev is the previous prediction error
[0187] a_prev=y_actual[:-1]-y_predicted[:-1]
[0188] #Calculate the error feedback coefficient βibeta = calculate_beta(y_actual,y_predicted,a_prev,M)
[0189] print(f"Error feedback coefficient βi:{beta}")
[0190] #Correct the current predicted independent variable x to x"
[0191] x_predicted_corrected=update_x_predicted(x_predicted,beta,delta_x)print(f"Corrected independent variable x":{x_predicted_corrected}")
[0192] In the above program, the calculate_residual_square_sum function calculates the residual sum of squares S by calculating the sum of squares of the difference between the actual dependent variable value y_actual and the initial predicted dependent variable value y_predicted. This value is used to quantify the accuracy of the prediction. The smaller S is, the more accurate the prediction is. The calculate_beta function uses the least squares method to solve the error feedback coefficient βi. It constructs a system of linear equations, where the A matrix consists of the historical prediction errors a_prev and the b vector consists of the difference between the actual value and the predicted value. The np.linalg.lstsq function is used to solve the linear equation system to obtain βi. The update_x_predicted function uses the obtained βi and the preset adjustment delta_x to correct the initial predicted independent variable x_predicted to obtain the corrected independent variable x". This correction process takes into account the historical prediction errors and aims to improve the accuracy of the current prediction.
[0193] In this embodiment, regarding step S3, the error value e is calculated: based on the independent variable x' obtained in step S2, the difference between it and the independent variable x' in the previous round of preparation batch is calculated, which can be an absolute value difference or a relative error, and the error value e of the quantization error is obtained:
[0194] 1) Absolute value difference: If the absolute value difference is used to calculate the error e, then:
[0195] e=|x”-x'|;
[0196] Among them, |·| means taking the absolute value. The absolute value difference can intuitively reflect the actual difference between the independent variables in the two preparation batches, which is easy to understand and operate.
[0197] 2) Relative error: If relative error is chosen for calculation, it is:
[0198] e=|(x”-x') / x'|;
[0199] The relative error takes into account the size of the independent variable itself, so it better reflects the degree of variation of the independent variable between the two preparation batches. This is particularly useful when the independent variable is large or small, because it provides a standardized comparison indicator.
[0200] In this embodiment, regarding step S4, a PID controller is applied: after the error value e is obtained based on step S3, a control error signal e1(t) and a control error signal e2(t) can be obtained:
[0201] e1(t)=|e-u1(t-1)|;
[0202] e2(t)=|e-u2(t-1)|;
[0203] Among them, u1(t-1) and u2(t-1) are the control output electrical signals of the gas-liquid hybrid unit and the hydrogen production unit in the previous production batch, respectively.
[0204] Then, the control output electrical signals u1(t-1) and u2(t-1) are input into the PID controller algorithm to generate the control output electrical signals u1(t) and u2(t), thereby dynamically controlling the gas-liquid hybrid unit and the hydrogen production unit for preparing hydrogen-rich water to meet the production task.
[0205] That is, the gas-liquid hybrid unit performs corresponding temperature control, and the hydrogen production unit adjusts its corresponding hydrogen rod immersion time, so that the corresponding independent variables are driven based on our preset dependent variables (that is, the product parameters we want):
[0206] 1) For gas-liquid hybrid units:
[0207]
[0208] 2) For hydrogen production units:
[0209]
[0210] Where: u1(t) and u2(t) are the control output electrical signals of the gas-liquid hybrid unit and the hydrogen production unit respectively; K P1 , K I1 , K D1 are the proportional, integral and differential coefficients of the PID controller of the gas-liquid hybrid unit; K P2 , K I2 , K D2 are the proportional, integral and differential coefficients of the PID controller of the hydrogen production unit; e1(t) and e2(t) are the control error signals of the gas-liquid hybrid unit and the hydrogen production unit, i.e., the difference between the expected output and the actual output; τ is the time variable;
[0211] It can be understood that the time variable τ enables the PID controller to have a real-time feedback mechanism, which can reduce the adjustment time and error in the production process, thereby improving production efficiency: by integrating the control error signal e1(τ) or e2(τ) from 0 to t, the controller can accumulate error information at all times in the past. This integral effect allows the controller to not only focus on the error at the current moment, but also consider the historical cumulative effect of the error, thereby more comprehensively evaluating the control effect of the system. Moreover, due to the existence of the integral term, even if the error at the current moment is small or zero, if there is a large cumulative error in the past, the controller will still adjust according to the value of the integral term. This continuous adjustment capability helps the system approach the set target faster and reduce the adjustment time. At the same time, after the control system reaches a steady state, if there is a steady-state error (that is, a continuous deviation between the system output and the set target), the integral term will continue to accumulate this error and eliminate it by adjusting the control output.
[0212] Furthermore, the Python execution program of step S4 is as follows:
[0213]
[0214]
[0215]
[0216] In the above program, serial.Serial configures the serial port communication parameters to communicate with the PLC controller. The pid_controller function calculates the new control output based on the current error, PID parameters, the last error, and the last output. It returns the new output value, the updated integral value, and the current error for use in the next loop. The send_to_plc function sends the calculated control output electrical signals u1 and u2 to the PLC controller through the serial port. In the main loop, the error value e is first obtained. Then the control error signals e1 and e2 are calculated, and the new control outputs u1 and u2 are calculated through the PID controller function. Finally, we update the control output of the previous round and send the new control signal to the PLC controller through the serial port. The time.sleep in the loop is used to simulate the time interval in the real-time control system.
[0217] Furthermore, through the real-time feedback and adjustment of the PID controller, the system can flexibly and accurately control the temperature and hydrogen rod soaking time during the production process, and can flexibly enable the system to be quickly adjusted according to different production requirements (i.e. different hydrogen content, ORP value and oxygen content indicators).
[0218] In practical applications, through the cyclic operation and continuous optimization of the above mechanism, the system can maintain a high degree of consistency and accuracy in a mass production environment, ensuring that each batch of hydrogen-rich water products can achieve the ideal and accurate hydrogen content, ORP value and oxygen content.
[0219] Embodiment 2: Based on the SVR regression model of step S1 of embodiment 1, this embodiment further provides a method for training it. The technical solution of this embodiment needs to be implemented before the SVR regression model deployment step S1. Figure 3 :
[0220] 1. Data Engineering
[0221] First, historical data needs to be collected. These data cover the dependent variable y under different hydrogen content h, ORP value O and oxygen content o, as well as the corresponding temperature T and hydrogen rod immersion time S, that is, the independent variable x. These data are obtained through experiments or records in the actual production process. The data set D is constructed as follows:
[0222] D={[(T1,S1)(h1,O1,o1)],[(T2,S2)(h2,O2,o2)],...,[(T m ,S m )(h m ,O m ,o m )]};
[0223] Among them, [(T i ,S i )(h i ,O i ,o i )] is the i-th sample, and m is the number of samples.
[0224] Then, conventional data processing operations can be performed on the data set D, such as removing outliers and noise, performing normalization, etc.
[0225] (II) Setting convex optimization objectives:
[0226] Our goal is to find a hyperplane that can best divide the sample points in the data set D. This hyperplane is determined by the normal vector W and the bias term b. To achieve this goal, the regression function f(y) is first used as the training function and the following convex optimization objective is set:
[0227]
[0228] Where: W is the normal vector of the hyperplane. C is the penalty coefficient, which is used to control the trade-off between model complexity and fitting data. i and ζi i* is the slack variable; Φx i The support vector x i Function mapped to high-dimensional space (implicitly defined by kernel function). Then, the task of this convex optimization objective is:
[0229] 1) Minimize The smaller the modulus (length) of the normal vector W of the hyperplane, the better. This has the advantage of preventing the model from overfitting, that is, the model will not be too complex, so that it can maintain good generalization ability on new data.
[0230] 2) Minimize The closer all data points are to the hyperplane, the better; by minimizing this term, we want as many data points as possible to be close to the hyperplane, thereby improving the prediction accuracy of the model.
[0231] 3)(w·φ(x i The difference between ) and b) should be increased by adding slack variables ζi within the radius ε i and ζi i * Internal: On the basis of satisfying the first two tasks, some data points are allowed to deviate from the hyperplane to a certain extent. These constraints ensure the robustness of the model, that is, the model can tolerate noise and outliers in the data to a certain extent.
[0232] Since there may be nonlinear relationships between independent variables and dependent variables, the RBF kernel function is introduced to perform kernel tricks to handle this complexity. The kernel trick allows us to perform kernel tricks without knowing the high-dimensional mapping function Φx i In the specific form, a linear partition of the high-dimensional space is performed:
[0233] K(x i ,x j )=<φ(x i ),φ(x j )>;
[0234] Among them, <·,·> is the dot product operation, which means determining and dividing any two different support vectors x in the high-dimensional space. i and x j The kernel technique can be used to transform the nonlinear problem in the original data space into a linear problem in the high-dimensional feature space, and then solve it using the SVR model.
[0235] (III) Constrained convex optimization objective:
[0236] The ε-insensitive loss function in step S101 is introduced to constrain the convex optimization objective. When the absolute value of the difference between the predicted value and the true value is less than or equal to a set radius ε, the SVR regression model believes that its prediction result is accurate, and the loss is 0 at this time. That is, as long as the predicted value falls within the ε range near the true value, we will not penalize the model. However, once the absolute value of the difference between the predicted value and the true value exceeds this ε range, the loss will accumulate linearly. This accumulation method ensures that the model is punished accordingly when the prediction deviation is too large, thereby prompting the model to continuously adjust parameters during the training process to improve the prediction accuracy.
[0237] (IV) Training:
[0238] Training is to continuously solve the above convex optimization problem, during which the k-fold cross-validation method is introduced; the overall training steps are:
[0239] (1) Randomly divide the data set D into k subsets of equal size, namely D1, D2, ..., D k
[0240] (2) Loop through the following steps:
[0241] Select D i As the test set D test , and the remaining subsets are combined as training set D train ; In the training set D train In the example, the QP algorithm (quadratic programming algorithm) is used to solve the convex optimization objective; it is responsible for finding a set of Lagrange multipliers α i and α i *And it is required to correspond to the data point, and then the normal vector W can be obtained.
[0242] First construct the Lagrangian function L and introduce a set of Lagrangian multipliers (α i ,α′ i η i ,η i ^), where
[0243]
[0244]
[0245]
[0246] About L Find the partial derivative and set it to 0, and we get:
[0247]
[0248] Substituting these relations into the Lagrangian function, we obtain a function that only contains the Lagrangian multiplier αi and α i *The dual problem is then solved to obtain the optimal Lagrange multiplier α i and α i * value. Then the normal vector W can be obtained by α i and α i * and the corresponding support vector x i It can also be expressed by the support vector x i To directly obtain the value of the bias term b.
[0249] (3) Using the test set D test Test the trained SVR model. Calculate the average of k test results as the final evaluation of model performance.
[0250] (4) Select the model hyperparameters obtained from the round of training that minimizes the mean square error (MSE) as the optimal model hyperparameters, i.e., the Lagrange multiplier α i and α i *, normal vector W, bias term b, penalty coefficient C and hyperparameter Υ;
[0251] (5) When the model converges or reaches the predetermined number of iterations, stop training. Otherwise, repeat the above training steps.
[0252] It is understandable that by using the k-fold cross-validation method, the model is trained and tested on different subsets, which helps to discover and correct overfitting, thereby improving the model's generalization ability on new data. The optimal parameters of the model are determined by solving the convex optimization problem, which ensures the accuracy and stability of the model in predicting the conditions for preparing hydrogen-rich water. At the same time, selecting the hyperparameters that minimize the MSE further improves the performance of the model.
[0253] Furthermore, the training framework program (python) of the SVR regression model of this embodiment is as follows:
[0254]
[0255]
[0256]
[0257]
[0258] The principle of the above procedure is as follows:
[0259] (1) Data Engineering (I): Use KFold from sklearn.model_selection to perform k-fold cross-validation data partitioning.
[0260] (2) Setting the convex optimization objective (II) and constraining the convex optimization objective (III): In the SVR model, the convex optimization objective and constraints are already implemented internally by the SVR class of the scikit-learn library. There is no need to explicitly set these objectives and constraints, and you only need to adjust the parameters of the SVR (such as C, epsilon, gamma, etc.) to affect the optimization process.
[0261] (3) Training (IV): Use GridSearchCV to perform parameter grid search to find the optimal hyperparameter combination. The search ranges of parameters such as C, epsilon, and gamma are defined.
[0262] GridSearchCV automatically performs k-fold cross validation and uses the specified scoring function (here is the negative mean square error) to evaluate the performance of each set of parameters. After training, GridSearchCV will save the optimal parameter combination and the corresponding best model.
[0263] (4) Encapsulating the SVR regression model: Encapsulate the trained SVR model and the optimal parameters in the SVRModel class to facilitate the program call of step S1 in Example 1.
[0264] (5) This class provides the predict method for predicting new data and the get_best_params method for obtaining the optimal parameters.
[0265] Embodiment 3: Based on Embodiment 1, this embodiment further provides a more intelligent technical solution for step S2.
[0266] In step S2 of the first embodiment, Δb x is an adjustment related to the historical forecast error, and is a preset fixed value. However, this form of pre-setting a fixed adjustment value restricts the flexibility of the model in practical applications. Therefore, this embodiment further provides an exponential smoothing method, which changes with the change of the forecast error (in each round of preparation batches), Δb x It will also be adjusted accordingly to more accurately reflect the actual needs of the current preparation batch. It includes the following steps:
[0267] Step S2020, initialization:
[0268] Select an initial forecast value. This can be the first observation in the series or the average of the first few observations. It can also be a preset value.
[0269] Step S2021, recursive calculation:
[0270] For each subsequent time point, the forecast is calculated using the exponential smoothing formula:
[0271] St=αY t +(1-α)S t-1 ;
[0272] St is the smoothed value (i.e. predicted value) at time point t. t is the actual observed value at time point t. S t-1 is the smoothed value at time point t-1. α is a smoothing constant between 0 and 1, which is used to determine the weight of the actual observation and the previous smoothed value.
[0273] Step S2022, dynamic adjustment of Δbx:
[0274] In order to make Δbx reflect the change of forecast error dynamically, it is combined with the forecast error of exponential smoothing method. The specific steps are as follows:
[0275] Step S20200, calculating the prediction error:
[0276] At each time point t, calculate the prediction error et = Y t -S t-1 (actual observation minus the predicted value at the previous time point).
[0277] Step S20201, dynamically adjust Δb x :
[0278] Dynamically adjust Δb according to the prediction error et x . Use the idea of exponential smoothing to update Δb x :
[0279] Δb xnew =β·et+(1-β)Δb xold +(1-β);
[0280] Where β is another smoothing constant. Δb xnew is the adjusted Δb x , Δb xold is Δb before adjustment x Then the adjusted Δb x Used to correct subsequent forecast values or as a basis for adjusting other related parameters.
[0281] It can be understood that the logic of the solution of this embodiment is that the prediction error et reflects the gap between the model prediction and the actual observation. When this gap is large, it means that the model prediction deviates from the actual situation. x , this deviation can be quickly fed back to the model to correct subsequent predictions. x This means that the model can adapt to changes in data in real time. If the prediction error becomes larger, Δbx The adjustment of will also increase accordingly, so that the model returns to the correct prediction track faster. This adjustment mechanism helps improve the accuracy of predictions because it can reduce the lag of the model behind the actual data changes.
[0282] During the preparation of the batch, the actual demand may change due to various factors (such as raw material quality, environmental conditions, etc.). x , the model is able to track these changes more closely and more accurately reflect the actual needs of the current preparation batch. This helps optimize the production process, reduce waste, and improve product quality.
[0283] Embodiment 4: Based on Embodiment 1, this embodiment further introduces an adaptive correction mechanism for the SVM regression model used in step S1:
[0284] Considering that in a production batch, step S1 requires the overall technical solution to be executed multiple times for the production batch, the independent variable x regressed in each round can indirectly use its historical credible information, and use the DS evidence theory to make a certain amount of correction to the final predicted value at the current time step; the predicted independent variable x' and the corresponding actual independent variable x" (need to be detected at the previous time) are divided into evidence A and evidence B, and the combination is performed through Dempster's combination principle to output the joint trust function Bel (A ∪ B); the joint trust function Bel (A ∪ B) is mapped to an interval value between [0, 1] as a correction factor δ, and the prediction function f (x) of step S1 is corrected. It includes the following steps S1020 to S1023:
[0285] In this embodiment, regarding step S1020, evidence A and evidence B in the form of a collection are collected in a time series:
[0286] Evidence A is the independent variable x' predicted at the current time step t in the previous n time steps (t-1 to t-5):
[0287] A=[x'(t-1),x'(t-2),...,x'(tn)];
[0288] Evidence B is the actual gelatinization degree measured at the previous n time steps (t-1 to t-5) at the current time step t:
[0289] B=[x”(t-1),x”(t-2),...,x”(tn)];
[0290] In this embodiment, regarding step S1021, Dempster's combination principle is implemented:
[0291] (1) Calculate the combined trust distribution Bel(C):
[0292]
[0293] (2) Calculate the combined uncertainty allocation Pl(C):
[0294]
[0295] Among them, A i and B i are a subset of evidence A and evidence B respectively; mass is the weight (a value of 0.5 is sufficient, but if some evidence is special, a subjective value can be assigned); C is the "possible set"; Represents the empty set.
[0296] (3) Get the joint trust function Bel(A∪B):
[0297]
[0298] Bel(A) and Pl(A) are the confidence and uncertainty distributions of the set of evidence A;
[0299] Bel(B) and Pl(B) are the confidence and uncertainty distributions of the set of evidence B;
[0300] (Pl(A)∩Pl(B)) is the uncertainty distribution of the intersection of evidence A and evidence B:
[0301]
[0302] Specifically, Represents any subset A in evidence A i and a subset B of evidence B i The intersection of is not empty. That is, it finds a subset A i , the mass of this subset in the set of evidence A is not zero, and there is also a subset B i , the mass of this subset in B is also not zero, that is, the two subsets have an intersection.
[0303] It is understandable that Responsible for finding some elements in hypothesis set C that are supported by both evidence A and evidence B. Then, when calculating the combined trust distribution Bel(C), these common elements must be taken into account because they contribute to the support of the hypothesis set C.
[0304] Furthermore, after the above concept is visualized, it is equivalent to judging whether any element in evidence A and evidence B at the same time step t has the same "index"; if they do not have the same "index", it is considered that the current evidence A and evidence B do not support each other, which means that the regression of the prediction function f(x) may have a certain deviation, and the correction factor δ of the subsequent mapping will further bias the weighting. On the contrary, it proves that the regression of the prediction function f(x) has no deviation, and the correction factor δ is kept as 1 as possible, that is, no correction.
[0305] In this embodiment, regarding step S1022, the joint trust function Bel(A∪B) is mapped to an interval value between [0,1] as the correction factor δ through the sigmoid function:
[0306]
[0307] Where e is the base of natural logarithms;
[0308] Specifically, the sigmoid function is chosen to ensure that the correction factor δ can change smoothly between 0 and 1, thereby achieving continuous correction of the predicted value. This mapping method not only simplifies the calculation process, but also makes the correction factor γ intuitively interpretable.
[0309] It can be understood that the joint trust function Bel(A∪B) reflects the trust distribution between evidence A and evidence B, which comprehensively considers the matching degree between the predicted value and the actual value. In the weighted correction process, the correction factor δ is used as a weight to scale the output of the prediction function f(x). Specifically, the correction factor δ can dynamically adjust the weight of the SVM regression model output according to the matching degree between the predicted value and the actual value.
[0310] In this embodiment, regarding step S1023, the correction is: scaling the prediction function f(x):
[0311]
[0312] Specifically, the prediction function is scaled according to the correction factor δ. This correction method not only takes into account the contribution of different prediction models, but also realizes dynamic adjustment of the prediction value through the correction factor δ. This adaptive correction helps to improve the accuracy and flexibility of production control.
[0313] Exemplarily, when the predicted value is close to the actual value, the value of the joint trust function Bel(A∪B) will be higher, resulting in a higher value of the correction factor δ, that is, the weight of the model output will be greatly enhanced, making the corrected predicted value closer to the actual value. On the contrary, when the predicted value is significantly different from the actual value, the value of the joint trust function Bel(A∪B) will be lower, and the value of the correction factor δ will also be reduced accordingly, thereby reducing the weight of the model output and preventing the corrected predicted value from deviating too far from the law of change of the actual value. The effectiveness of this adaptive correction mechanism lies in its ability to adjust the weight of the prediction model output according to the degree of match between the real-time predicted value and the actual value. This makes the correction process more flexible and accurate, and can adapt to changes in different production batches and product characteristics.
[0314] Embodiment 5: Figures 4-5 As shown, this embodiment discloses a multi-cycle generation system of hydrogen-rich water: its core components include a pure water treatment device, a hydrogen production unit, a processor, a memory, a PLC controller (i.e., the PLC controller described in Example 1), a pressure cutter, a gas-liquid hybrid unit and a booster pump.
[0315] (I) Pure water treatment device and hydrogen production unit:
[0316] The pure water storage tank is connected to an external water source (pure water, tap water, mineral water, etc.) to store water and is provided with a three-way valve a; the pure water treatment device draws water from the pure water storage tank through one of the three-way valves a, and removes salt and other impurities through a filtration system to ensure the purity of the water quality and form pure water.
[0317] The hydrogen production unit extracts water through another way of the three-way valve a, and electrolysis is responsible for producing oxygen (oxygen is directly discharged) and hydrogen. Another way of the three-way valve a is connected to the pressure cutter to transport water.
[0318] The concentration of hydrogen produced will be precisely controlled by the PLC controller in the first embodiment, which is achieved by adjusting the soaking time of the hydrogen rod. A three-way valve b is provided at the gas outlet of the hydrogen production unit.
[0319] (II) Processor and Memory:
[0320] The processor is the brain of the system and is responsible for executing program instructions stored in the memory. These instructions are programs for implementing the hydrogen-rich water optimization preparation method in the above-mentioned embodiments 1 to 3. They can predict and adjust independent variables (such as the hydrogen rod immersion time of the hydrogen production unit, the mixing temperature and time of the gas-liquid mixing unit, etc.) according to the input dependent variables (such as the desired hydrogen-rich water parameters). The memory is responsible for storing these program instructions and historical data information.
[0321] (III) PLC controller:
[0322] The PLC controller is the control center of the system. It receives the control output electrical signals u1(t) and u2(t) from the processor and controls the working status of the hydrogen production unit and the gas-liquid hybrid unit according to these signals.
[0323] When the PLC controller reads the control output electrical signal u1(t), it will accurately adjust the hydrogen rod immersion time of the hydrogen generator to generate hydrogen of corresponding concentration. This step is the key to ensure the hydrogen content in hydrogen-rich water.
[0324] Similarly, after reading the control output electrical signal u2(t), the PLC controller will control the gas-liquid mixing unit to mix and heat at an appropriate temperature to form hydrogen-rich water that meets the specifications.
[0325] (IV) Pressure cutter and gas-liquid hybrid unit:
[0326] One passage of the three-way valve b is connected to the pressure cutter, which is responsible for adjusting the hydrogen and pure water to the appropriate pressure to ensure that the two can be effectively mixed in the gas-liquid mixing unit. The other passage of the three-way valve b is connected to the gas-liquid mixing unit, which is the key equipment for mixing hydrogen and pure water. Under the precise control of the PLC controller, it performs efficient mixing and heating operations to produce high-quality hydrogen-rich water. After pressure relief treatment, it enters the booster pump.
[0327] Specifically, one passage of the three-way valve b is connected to the pressure cutter, but in fact the hydrogen flowing through the passage is first mixed by the gas-liquid mixing unit, then enters the main channel (main pipe) of the pressure cutter, then enters the pressure chamber for cutting, and then enters the gas-water mixing tank.
[0328] (V) Booster pumps and storage facilities:
[0329] After the above mixing and heating operation, the hydrogen-rich water is equivalent to completing "one cutting", and the gas-mixed water storage tank already has a certain amount of gas-mixed water (the remaining water can be pumped back to the pure water storage tank, which can be used multiple times without generating waste water). However, the hydrogen in the water can easily escape after one cutting. At this time, a booster pump can repeatedly send the hydrogen-rich water back to the pressure cutter for another cutting, and this cycle can be repeated many times to prevent the hydrogen from escaping.
[0330] Finally, another booster pump delivers the produced hydrogen-rich water to the gas-water storage tank for storage, ensuring that the hydrogen-rich water can be supplied to users with sufficient pressure and flow when needed. When the production volume of this batch of hydrogen-rich water meets the production index, it will be sent to the storage tank for long-term storage for subsequent use or sale.
[0331] It should be pointed out that Figure 4The boost pumps shown are arranged in parallel, so only one boost pump is shown; the other boost pump is covered by the boost pump.
[0332] In this embodiment, the workflow of the above system is as follows: Figure 5 As shown, including:
[0333] P1, initial preparation and pure water treatment:
[0334] First, the pure water treatment device extracts pure water from the pure water storage tank. This step ensures the basic purity of the water and provides high-quality base liquid for subsequent steps. The extracted pure water will pass through a filtration system that can remove salt and other impurities to further purify the water quality.
[0335] P2, Hydrogen Preparation and Control:
[0336] 1) Hydrogen generation: The hydrogen generator starts to work and produces hydrogen through electrolysis or other means. In this process, the immersion time of the hydrogen rod is a key parameter, which directly affects the concentration of the generated hydrogen.
[0337] 2) Hydrogen concentration control: The PLC controller accurately controls the immersion time of the hydrogen rod according to the control output electrical signal u1(t) received from the processor. This control method can ensure that the hydrogen concentration generated each time meets the production requirements and provide a stable hydrogen source for the subsequent gas-liquid mixing step.
[0338] P3, gas-liquid mixing and heating:
[0339] 1) Gas-liquid mixing: In the pressure cutter, pressure-regulated pure water and hydrogen are fed into the gas-liquid mixing unit. Here, the PLC controller plays a role again, accurately controlling the mixing process according to the control output electrical signal u2(t).
[0340] 2) Heating treatment: During the mixing process, the gas-liquid mixing unit will also be heated at an appropriate temperature. This step helps to improve the mixing effect of hydrogen and pure water and ensure the stable quality of the generated hydrogen-rich water.
[0341] P4, storage and output:
[0342] 1) Pressurization and storage: The mixed hydrogen-rich water will be pumped to the gas-water storage tank for storage. This step ensures that hydrogen-rich water can be supplied with sufficient pressure and flow when needed.
[0343] 2) When the production volume of this batch of hydrogen-rich water reaches the preset production index, it will be transferred to the storage barrel for long-term storage for subsequent use or sale.
[0344] P5, loop generation:
[0345] Once a batch is completed, the system automatically resets and prepares to start the next batch. This design ensures efficient and continuous production. The system achieves multi-cycle generation of hydrogen-rich water through precise control systems and efficient hardware equipment. From the extraction and filtration of pure water to the preparation and control of hydrogen, to gas-liquid mixing and heating, and finally storage and output, the quality and stability of the hydrogen-rich water generated can be ensured.
[0346] In this embodiment, further, the embedded C language execution program built into the PLC controller is as follows:
[0347]
[0348]
[0349]
[0350] In the above program, u1_t and u2_t are the control output electrical signals received from the processor, representing the immersion time of the hydrogen rod and the heating temperature of the gas-liquid hybrid unit respectively. These variables need to be updated in the communication interface between the PLC controller and the processor. The while loop in the main function ensures that the PLC controller continuously adjusts the parameters of the hydrogen generator and the gas-liquid hybrid unit according to the received control signals.
[0351] Set_hydrogen_stick_dip_time and set_mixing_temperature are functions related to the hardware interface, which are used to convert the control signal into actual hardware operation. The control cycle is implemented through the delay function to ensure that the PLC controller updates the control signal at a certain frequency (every 100 milliseconds).
[0352] Test example: This example aims to verify the beneficial degree of the optimized preparation method of hydrogen-rich water (steps S1 to S4) disclosed in Examples 1 to 3 compared with the traditional preparation method.
[0353] 1. Experimental purpose:
[0354] The purpose of this experiment is to verify the superiority of the optimized preparation method of hydrogen-rich water (steps S1 to S4) over the traditional preparation process in maintaining the key parameters of hydrogen-rich water (hydrogen content, ORP value and oxygen content).
[0355] (II) Experimental equipment and materials:
[0356] As disclosed in Example 5, there are two sets of hydrogen-rich water multi-circulation generation systems (one set for the experimental group and one for the control group).
[0357] Agilent 7890C gas chromatograph and supporting software.
[0358] ORP-2096 detector.
[0359] Raw water and other necessary preparation materials.
[0360] (III) Experimental steps:
[0361] 3.1 System Preparation:
[0362] A hydrogen-rich water multi-circulation generation system was configured for the experimental group and the control group respectively, and it was ensured that the initial states of the two systems were consistent.
[0363] 3.2 Experimental group operation:
[0364] The optimized preparation method (S1-S4) was performed on the hydrogen-rich water multi-cycle generation system of the experimental group.
[0365] 3.3 Control group operation:
[0366] The hydrogen-rich water multi-cycle generation system of the control group does not perform the optimized preparation method (S1-S4) to simulate the traditional preparation process.
[0367] 3.4 Preparation of hydrogen-rich water:
[0368] The two groups used the same raw materials to prepare hydrogen-rich water with the same hydrogen content, ORP value and oxygen content parameters, with a total amount of 5 liters each.
[0369] 3.5 Sampling and testing:
[0370] 10 ml of hydrogen-rich water was sampled from each of the two groups every 15 seconds.
[0371] The sampled water was sent to an Agilent 7890C gas chromatograph to detect its hydrogen and oxygen contents.
[0372] Use the supporting software to record the data and draw a graph of the changes in hydrogen and oxygen content parameters within a 9.45 minute time interval.
[0373] The ORP-2096 detector was used simultaneously to detect the ORP values of hydrogen-rich water prepared in the experimental group and the control group.
[0374] (IV) Experimental results and analysis:
[0375] 4.1 ORP value analysis:
[0376] The ORP values of both the experimental and control groups were between -50mV and +350mV, both in line with industry standards.
[0377] 4.2 Hydrogen content analysis:
[0378] like Figure 6As shown in the figure (line 1 is the experimental group, line 2 is the threshold line, and line 3 is the control group), the hydrogen content of the experimental group can always be maintained above the preset threshold line, showing the superiority of the optimized preparation method. The hydrogen content of the control group may fluctuate near the threshold line, reflecting the poor stability of the traditional preparation process.
[0379] 4.3 Oxygen content analysis:
[0380] like Figure 7 As shown in the figure (line 1 is the experimental group, line 2 is the control group), the oxygen content of the experimental group changes more slowly than that of the control group, indicating that the optimized preparation method also has advantages in maintaining stable oxygen content. The oxygen content of the control group showed large fluctuations.
[0381] (V) Conclusion:
[0382] Through this experiment, the effectiveness of the optimized preparation method of hydrogen-rich water in maintaining the key parameters of hydrogen-rich water was verified, providing an experimental basis for further optimizing the preparation process and improving the quality of hydrogen-rich water.
[0383] The above specific embodiments only express the embodiments of the relevant practical applications of the present invention, and the description is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention patent. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be based on the attached claims.
[0384] For those skilled in the art, it can be further appreciated that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0385] At the same time, those skilled in the art can understand that all or part of the processes in all the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
Claims
1. An optimized preparation method for hydrogen-rich water, characterized in that: In each batch preparation, the following steps are performed: S1, read the SVR regression model: input the dependent variable y into the regression function f(y), including the hydrogen content h, ORP value O and oxygen content o; use the RBF kernel function to utilize its dot product operation and its support vector x i , dealing with the nonlinear relationship between the independent variable x and the dependent variable y; the regression function f(y) outputs the corresponding independent variable x, including the temperature T and the hydrogen rod immersion time S; S2, execute dynamic compensation mechanism: minimize the residual sum of squares S of the dependent variable y, and obtain the error feedback coefficient β i , look back on the historical forecast error to compensate and form the compensated independent variable x"; S3, for the independent variable x', calculate the difference between it and the independent variable x' in the previous round of preparation batch, and obtain the error value e; S4, after obtaining the control error signal e1(t) and the control error signal e2(t) based on the error value e, input them into the PID controller algorithm to obtain the control output electrical signal u1(t) and the control output electrical signal u2(t), dynamically control the gas-liquid hybrid unit and the hydrogen production unit, and then prepare hydrogen-rich water.
2. The optimized preparation method according to claim 1, characterized in that: In S1, the regression function f(y) and the RBF kernel function perform the following regression task to process the nonlinear relationship: RBF kernel function K(y,x i ) performs the dot product operation: Where: Υ is the hyperparameter of the RBF kernel function; σ is the width parameter of the kernel function; ||yx i || 2 is the dependent variable y and the support vector x i The square of the Euclidean distance between them; The regression function f(y): Where: α i and α i * is the trained Lagrange multiplier; b is the bias term; x i is the i-th support vector x i; ; n is the number of support vectors.
3. The optimized preparation method according to claim 2, characterized in that: In S1, the regression function f(y) is replaced by the ε-insensitive loss function L ε (x',f(y)) constrained by: Where x' is the value of the independent variable x in the previous preparation batch; ε is the radius of the insensitive region.
4. The optimized preparation method according to claim 1 or 2, characterized in that: In S2, the residual sum of squares S is minimized to obtain the error feedback coefficient β i The method is: Look back to the previous M historical moments, each moment includes the actual value y of the dependent variable at that time i and predicted values Let ∈ i =y i -y i ' is the historical forecast error, and the following linear relationship is constructed to represent the forecast value after compensation: in, is the dependent variable after compensation, a i-1 is the prediction error of the previous data point; Substitute the linear relationship into the residual sum of squares S and calculate β i Take the derivative and set the derivative equal to 0 to find the β that minimizes the residual sum of squares S i value.
5. The optimized preparation method according to claim 4, characterized in that: In S2, the method for obtaining the independent variable x" is: x" = x' + β i Δx; Where Δb x is the adjustment associated with historical forecast errors; x' is the value of the independent variable x in the previous round of preparation.
6. The optimized preparation method according to claim 1 or 2, characterized in that: In S3, the difference is an absolute value difference or a relative error.
7. The optimized preparation method according to claim 1 or 2, characterized in that: In S4, the control error signal e1(t) and the control error signal e2(t) are obtained by: e1(t)=|e-u1(t-1)|; e2(t)=|e-u2(t-1)|; Among them, u1(t-1) and u2(t-1) are the control output electrical signals of the gas-liquid hybrid unit and the hydrogen production unit in the previous production batch, respectively.
8. The optimized preparation method according to claim 7, characterized in that: In S4, the methods of dynamically controlling the gas-liquid hybrid unit and the hydrogen production unit using the PID controller algorithm are respectively: For the gas-liquid hybrid unit: For the hydrogen production unit: Wherein: u1(t) and u2(t) are the control output electrical signals of the gas-liquid hybrid unit and the hydrogen production unit respectively; K P1 , K I1 and K D1 are the proportional, integral and differential coefficients of the PID controller of the gas-liquid hybrid unit; K P2 , K I2 and K D2 are the proportional, integral and differential coefficients of the PID controller of the hydrogen production unit; τ is the time variable.
9. A multi-cycle hydrogen-rich water generation system, including a pure water treatment device, characterized in that: The method comprises the hydrogen production unit and the gas-liquid hybrid unit in the optimized preparation method according to any one of claims 1 to 8; It also includes a processor and a memory connected to the processor, wherein program instructions are stored in the memory. When the program instructions are executed by the processor, the processor executes the optimization preparation method as described in any one of claims 1 to 8, and transmits the control output electrical signal u1(t) and the control output electrical signal u2(t) to the PLC controller, thereby controlling the gas-liquid hybrid unit and the hydrogen production unit.
10. The multi-cycle generation system according to claim 9, characterized in that: After reading the control output electrical signal u1(t), the PLC controller controls the hydrogen rod immersion time of the hydrogen production unit, generates hydrogen of corresponding concentration, and transmits it to the pressure cutting machine; The pure water treatment device extracts pure water from the pure water storage tank and filters the salt, and then sends it to the pressure cutter; The pressure cutter adjusts the hydrogen and pure water therein to corresponding pressures, and then delivers the hydrogen and pure water to the gas-liquid mixing unit at the same time; After reading the control output electrical signal u2(t), the PLC controller controls the gas-liquid mixing unit to mix and heat to a corresponding temperature to form hydrogen-rich water.
Citation Information
Patent Citations
Nonlinear kernelled adaptive prediction method
CN102200759A
Method for acquiring appropriate root temperature interval based on crop requirements
CN107220672A
Hydrogen-rich water preparation equipment
CN113697928A
Hydrogen production system efficiency optimization method and device, computer equipment and storage medium
CN114065483A
Real-time control method for dosing pump of sewage treatment plant based on machine learning
CN117555303A
