Soft measurement method and system for hydrogen absorption and desorption characteristics of solid-state hydrogen storage material based on PINN
By embedding van der Hoff thermodynamic and JDM kinetic constraints into an LSTM network, a PINN model was constructed, solving the problem of real-time measurement of hydrogen storage density in solid-state hydrogen storage materials and achieving high-precision and widely applicable prediction of hydrogen storage characteristics.
Patent Information
- Application Number
- CN202610480851.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-13
- Publication Date
- 2026-08-25
AI Technical Summary
Existing technologies struggle to measure the hydrogen storage density of solid hydrogen storage materials in real time and accurately online. Traditional deep learning models suffer from insufficient accuracy, poor generalization, and weak physical interpretability in predicting the characteristics of solid hydrogen storage.
A Physical Information Neural Network (PINN) based method is adopted, which combines the van der Hoff thermodynamic equation and the JDM kinetic equation as physical constraints and embeds them into the LSTM network training process to construct the Physical Information Neural Network (PINN) to achieve the prediction of hydrogen storage density.
It significantly improves the reliability, generalization ability, and physical interpretability of prediction results, and supports the digital and intelligent monitoring of solid-state hydrogen storage systems.
Smart Images

Figure CN122637982A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of interdisciplinary technology of hydrogen energy storage technology and artificial intelligence, specifically relating to a soft measurement method and system for the hydrogen absorption and desorption characteristics of solid hydrogen storage materials based on PINN. Background Technology
[0002] Solid-state hydrogen storage materials (such as MgH2) have shown broad application prospects in stationary and vehicle-mounted hydrogen storage due to their advantages such as high volumetric hydrogen storage density, good safety, and long cycle life. However, the hydrogenation and dehydrogenation process of solid-state hydrogen storage materials is a complex dynamic process subject to the coupling of multiple physical fields such as temperature, pressure, and time. The core performance indicator, hydrogen storage density (wt%), is difficult to measure online in real time using sensors. Currently, obtaining this indicator mainly relies on intermittent sampling and offline analysis in the laboratory. This method is not only time-consuming, labor-intensive, and costly, but also cannot meet the urgent needs of real-time monitoring, fault diagnosis, and optimized control of operating status in practical hydrogen storage systems.
[0003] In recent years, deep learning models, represented by Long Short-Term Memory (LSTM) networks, have achieved success in many fields due to their superior ability to process time-series data and capture complex nonlinear relationships. However, these "black box" models rely on training data, have poor generalization and extrapolation performance, lack physical mechanisms, and have weak physical interpretability of prediction results, making them difficult to trust and apply to practical engineering. Therefore, how to effectively apply them to the field of solid-state hydrogen storage and construct a dual-physical-constrained soft-measurement model that can simultaneously describe the thermodynamic equilibrium and reaction kinetics of materials remains a key technical challenge that needs to be overcome. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of the prior art and provide a soft measurement method and system for the hydrogen absorption and desorption characteristics of solid hydrogen storage materials based on PINN, so as to solve the problems of insufficient accuracy, poor generalization and weak physical interpretation of pure data-driven models in the prediction of solid hydrogen storage characteristics.
[0005] To achieve the above objectives, the present invention employs the following technical solution: A soft measurement method for the hydrogen absorption and desorption characteristics of PINN-based solid-state hydrogen storage materials includes the following steps: S1, obtain the temperature, pressure and time of the hydrogen storage system; S2, based on the temperature, pressure, and time of the hydrogen storage system, the hydrogen storage density is predicted using a physical information neural network; the training process of the physical information neural network is as follows: Based on the temperature, pressure, and time data in the training dataset, a predicted hydrogen storage density is obtained through an initial physical information neural network. The data fitting loss is then obtained by combining the actual experimental values. The van der Hoff equation yields the van der Hoff constraint loss, and the JDM kinetic model yields the JDM constraint loss. A composite loss function is obtained by combining the data fitting loss, van der Hoff constraint loss, and JDM constraint loss. The parameters of the initial physical information neural network are then adjusted based on this composite loss function until the composite loss function meets the requirements, resulting in the final physical information neural network. S3 outputs hydrogen storage density.
[0006] A further improvement of the present invention is that: Preferably, in S2, the physical information neural network prediction model includes two LSTM layers, a Dropout layer between the two LSTM layers, and a fully connected layer after the last LSTM layer.
[0007] Preferably, in S2, the training process of the physical information neural network involves training and correcting the parameters of the physical information neural network, including the number of LSTM neurons, the Dropout rate, and the learning rate.
[0008] Preferably, the formula for calculating the data fitting loss is:
[0009] Where N is the total number of samples, the The table shows the predicted hydrogen storage density output from the basic LSTM network. The value represents the actual hydrogen storage density measured in the experiment, and i represents the sample number.
[0010] Preferably, the calculation of the van der Hoff constraint loss first involves calculating the theoretical equilibrium pressure P at the current temperature using the van der Hoff equation. theo Then, a hydrogen storage depth correction factor f(x) is introduced for P. theo The predicted value P is obtained by making corrections. theo,corrected The hydrogen absorption and desorption trend is determined by comparing the current predicted value with the previous predicted value, and the actual pressure and P are calculated based on thermodynamic laws. theo,corrected The degree of violation is determined, and the mean of the violation degrees across all samples is taken as the van der Hoff constraint loss L. vant .
[0011] Preferably, the formula for calculating the van der Hoff constraint loss is:
[0012] Where I is the hydrogen absorption / desorption state indicator variable, abs represents the hydrogen absorption state, and des represents the hydrogen desorption state. As an indicator variable for hydrogen absorption status, As an indicator variable for hydrogen release state, Let y be the actual operational pressure of the i-th sample. pred This represents the predicted hydrogen storage density.
[0013] Preferably, the process of obtaining the JDM constraint loss is as follows: first, the hydrogen storage density predicted by the model is converted into a reaction fraction; then, the reaction rate constants of time and input temperature range are substituted into the JDM equation to calculate the difference between the JDM predicted value and the JDM theoretical value, thereby obtaining the JDM constraint loss.
[0014] Preferably, the formula for calculating the JDM constraint loss is:
[0015] in, For JDM predictions, This is the theoretical value for JDM.
[0016] Preferably, the formula for calculating the composite loss function is:
[0017] in, For data fitting loss, To constrain losses by van der Hoff, For JDM constraint loss, The weighting coefficients of the van der Hoff constraint, This represents the JDM constraint loss.
[0018] A soft measurement system for the hydrogen absorption and desorption characteristics of solid-state hydrogen storage materials based on PINN, comprising: The data acquisition module is used to acquire the temperature, pressure, and time of the hydrogen storage system; An LSTM neural network model module is used to predict hydrogen storage density based on the temperature, pressure, and time of the hydrogen storage system using a physical information neural network; the training process of the physical information neural network is as follows: Based on the temperature, pressure, and time data in the training dataset, a predicted hydrogen storage density is obtained through an initial physical information neural network. The data fitting loss is then obtained by combining the actual experimental values. The van der Hoff equation yields the van der Hoff constraint loss, and the JDM kinetic model yields the JDM constraint loss. A composite loss function is obtained by combining the data fitting loss, van der Hoff constraint loss, and JDM constraint loss. The parameters of the initial physical information neural network are then adjusted based on this composite loss function until the composite loss function meets the requirements, resulting in the final physical information neural network. The soft measurement execution module is used to output hydrogen storage density.
[0019] Compared with the prior art, the present invention has the following beneficial effects: This invention discloses a soft measurement method for the hydrogen absorption and desorption characteristics of solid-state hydrogen storage materials based on PINN. This method embeds the van der Hoff thermodynamic equation and the JDM kinetic equation as physical constraints into the training process of an LSTM network to construct a Physical Information Neural Network (PINN). The PINN can embed physical laws as regularization terms into the neural network training. This method enables the model to not only learn complex nonlinear relationships from data, but also strictly limit its output to the reasonable range of physical laws, significantly improving the reliability, generalization ability, and physical interpretability of the prediction results, and providing core technical support for the digital and intelligent monitoring of solid-state hydrogen storage systems. Attached Figure Description
[0020] Figure 1 This is a flowchart illustrating the technical process of the present invention. Figure 2 Sensitivity analysis chart for the parameter settings of this invention; Figure 3 This is a fitting graph of the hydrogen absorption and desorption results of the LSTM model in Example 1 of the present invention; Figure 4 This is a fitting graph of the hydrogen absorption and desorption results of the van 't Hoff constraint model in Example 1 of the present invention; Figure 5 This is a fitting graph of the hydrogen absorption and desorption results of the dual physical constraint model in Embodiment 1 of the present invention. Detailed Implementation
[0021] Hereinafter, the terms "first," "second," "third," and "fourth" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first," "second," "third," or "fourth" may explicitly or implicitly include one or more of that feature.
[0022] The method provided in this application can be applied to mobile phones, tablets, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptops, and ultra-mobile personal computers. In this application, the specific type of terminal device is not limited to terminal devices such as mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs).
[0023] It should be noted that the terms "first," "second," etc., used in the specification and drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0024] See Figure 1 and Figure 2 The present invention discloses a soft measurement method for the hydrogen absorption and desorption characteristics of solid-state hydrogen storage materials based on Physical Information Neural Network (PINN), the specific implementation process of which is as follows: S1 uses three key operational parameters—temperature, pressure, and time—as model inputs and hydrogen storage density as model output. It constructs a two-layer LSTM neural network as the basic predictor. The two LSTM layers extract and integrate features from the model input, ultimately outputting the predicted hydrogen storage density. This network structure includes an input layer that receives standardized feature sequences, specifically temperature, pressure, and time; two sequentially arranged LSTM layers that extract and memorize complex temporal features and nonlinear relationships from the input sequences. The number of LSTM neurons is set to the default number for LSTM networks. After the two LSTM layers, an attention mechanism layer is introduced, assigning different weights to different time steps in the input sequence. This allows the model to focus more on the most crucial historical information, improving its ability to capture information and enhancing the accuracy of dynamic process predictions. Following the attention mechanism layer is a fully connected layer that integrates the high-level features output by the LSTM layers, and a linearly activated output layer that outputs the final predicted hydrogen storage density. A dropout layer is introduced between the two LSTM layers to prevent overfitting during training.
[0025] In this process, the parameters of the PINN model need to be selected and trained in advance. These parameters include the number of LSTM neurons, the Dropout rate, and the learning rate. Specifically, seven sets of comparative experiments are designed, and the results are referenced... Figure 2 With training time and R 2As an evaluation metric, 64 and 32 neurons were ultimately selected for configuration in two LSTMs to achieve a better balance between accuracy and efficiency, sufficient to capture hydrogen absorption and desorption features. A dropout rate of 0.3 was optimal, providing the best balance between overfitting suppression and feature preservation. Adam was the preferred optimizer with a learning rate of 0.001, offering the best performance and balancing accuracy and efficiency. The total number of training epochs was set to 100, and an early stopping strategy was implemented to terminate training early when the validation set loss no longer decreased within 15 to 25 consecutive epochs, thus preventing overfitting.
[0026] Based on the predicted hydrogen storage density and the experimentally measured actual hydrogen storage density, the data fitting loss L is calculated using the following formula (1). data : (1) Where N is the total number of samples, The predicted hydrogen storage density represents the output of the basic LSTM network. This represents the actual hydrogen storage density value measured in the experiment. The loss is the mean squared error (MSE) loss function, which measures the deviation between the model prediction and the actual experimental value. The smaller the value, the more accurate the prediction.
[0027] S2. Based on the thermodynamic properties of the target hydrogen storage material, the van der Hoff equation is introduced as the first physical constraint, and the influence of the hydrogen storage depth on the equilibrium pressure during the reaction process is further considered.
[0028] The actual input pressure is compared with the theoretical plateau pressure to determine the hydrogen absorption / desorption state. This process uses an empirical formula related to the hydrogen storage depth to correct the reaction enthalpy change or theoretical plateau pressure, and defines a state consistency constraint loss function, namely van der Hoff constraint loss, to penalize cases where the model's predicted hydrogen absorption / desorption state is inconsistent with the thermodynamic state judgment, thus removing predictions that violate physical laws. Compared with the fixed plateau pressure assumption, this makes the thermodynamic equilibrium criterion closer to the non-ideal behavior in the actual reaction process, and can more accurately describe the changes in driving forces when the reaction approaches equilibrium, improving the model's predictive accuracy across the entire reaction range.
[0029] van der Hoff constraint loss L vant The specific calculation method is as follows: First, the theoretical equilibrium pressure P at the current temperature is calculated using the van der Hoff equation. theo Then, a hydrogen storage depth correction factor f(x) is introduced for P. theo After making corrections, the corrected theoretical equilibrium pressure P is obtained. theo,corrected By comparing the predicted values at the current moment with those at the previous moment, the trend of hydrogen absorption and release is determined, and the actual pressure P and P' are calculated based on thermodynamic laws. theo,correctedThe degree of violation is determined, and finally, the mean of the degree of violation for all samples is taken as L. vant .
[0030] Specifically, the theoretical plateau pressure at the current temperature is calculated using the van der Hoff equation. (2) in, For the enthalpy change of the reaction, ; Let be the ideal gas constant. ; The theoretical platform pressure is measured in MPa. Reference pressure, MPa; The reference temperature is K; where the reference pressure and reference temperature are set values, obtained based on formula (2). .
[0031] Hydrogen storage depth correction: (3) (4) Here, x=0.5 is the midpoint of the reaction process, at which point the actual behavior of the material is closest to the ideal thermodynamic model. Therefore, corrections are made with this point as the center of symmetry, where P... theo,corrected This represents the corrected theoretical equilibrium pressure, where x is the reaction fraction. Let y be the response score of the i-th training data set, γ be the material-related empirical coefficient, and y be the response score of the i-th training data set. max The maximum hydrogen storage capacity of magnesium hydride is 7.6 wt%. The calculation formula is: (5) Based on the above formula, the van der Hoff constraint loss L vant Calculation formula: (6) Where I is the hydrogen absorption / desorption state indicator variable, abs represents the hydrogen absorption state, and des represents the hydrogen desorption state. As an indicator variable for hydrogen absorption status, As an indicator variable for hydrogen release state, Let y be the actual operational pressure of the i-th sample. pred This represents the predicted hydrogen storage density.
[0032] The hydrogen absorption / desorption state is determined by the following equations (7) and (8): (7) (8) S3. For the hydrogen absorption and desorption process, the Jander kinetic model is introduced as a second physical constraint. The JDM kinetic formula is as follows: (9) Where x is the reaction fraction; k is the reaction rate constant, s -1 t represents time, in seconds.
[0033] First, the hydrogen storage density (wt%) predicted by the model is converted into a reaction fraction x (x = wt% / 7.6, where 7.6 is the theoretical maximum hydrogen storage density of magnesium-based alloys). Then, the reaction rate constants of time and the input temperature range are substituted into the JDM equation to calculate the difference between the JDM predicted value and the JDM theoretical value. A kinetic consistency constraint loss function is defined as the JDM loss, which allows the kinetic constraint to adapt to different operating temperatures and enhances the model's generalization ability.
[0034] JDM dynamic constraint loss L JDM The specific calculation method is as follows: First, the predicted hydrogen storage density y is calculated using formula (5). pred Convert to a reaction fraction, then calculate the reaction rate constant K(T) at the current temperature, and substitute it into the JDM equation to calculate the theoretical reaction fraction x. JDM ; Calculate x pred With x JDM The mean square error is used as the degree of dynamic violation, and finally the mean of all samples is taken as L. JDM .
[0035] Hydrogen storage density conversion is calculated using formula (5).
[0036] The reaction rate constant k is not fixed, but is constructed as a temperature-dependent function, allowing the kinetic constraints to adapt to different operating temperatures. This enables a single physical constraint layer to cover a wider temperature range, greatly enhancing the model's generalization ability and physical consistency. The relationship between the temperature-adaptive reaction rate constant K(T) and temperature is as follows: (11) In the formula, s is the pre-exponential factor. -1 ; For activation energy, ; Let be the ideal gas constant. , Let be the operating temperature of the i-th sample.
[0037] JDM equations calculate theoretical reaction fraction : (12) in, This represents the reaction time (or moment) of the i-th sample.
[0038] Based on the above formulas (10)-(12), the JDM dynamic constraint loss L is calculated using the following formula (13). JDM .
[0039] (13) In this process, the JDM equation can be used to describe the kinetic characteristics of the hydrogen absorption and desorption process and is applicable to a variety of solid hydrogen storage materials. Therefore, the JDM equation is also incorporated into the LSTM neural network as part of the loss function. The constrained model makes the prediction conform to the law of reaction kinetics. This invention is the first to combine JDM with temperature adaptive k(T) and embed it into LSTM as a loss function.
[0040] S4 integrates the two physical constraints mentioned above with the data-driven prediction of the base LSTM network. This includes constructing the composite loss function, implementing the custom physical constraint layer, model compilation and training, and finally training the model end-to-end through a unified optimization objective. The physical constraint calculations in S2 and S3 are implemented through a custom layer. This layer receives the input features and outputs of the base network and outputs the physical constraint loss value. The model's total loss function... The loss consists of a weighted sum of three parts: data fitting loss, van der Hoff constraint loss, and JDM constraint loss. The relationship between the three is as follows: (14) In the dual physical constraint fusion training, the parameters included in the composite loss function are adaptively adjusted during the training process. The weights of each loss term are dynamically adjusted according to their magnitude, avoiding the problem that a certain constraint may be too strong or too weak and dominate the training under fixed weights. This achieves an automatic balance between data-driven loss and loss under different physical constraints, enabling the model to fuse different types of information in the optimal way, thereby obtaining more robust performance and minimizing the composite loss function.
[0041] Among them, the weighting coefficients of the van der Hoff constraint The value ranges from 0.05 to 0.2, preferably 0.1; the weighting coefficient of the JDM constraint loss. The value ranges from 0.01 to 0.1, with 0.05 being preferred.
[0042] See Figure 2 ,use Backpropagation is used to calculate gradients and train the dual-physical-constraint LSTM model S1, updating the LSTM network weight parameters until... The set conditions are met.
[0043] Specifically, the updated LSTM network weight parameters include the weight matrices (W) of each gate. f W i W c and W o ), the bias terms of each gate (b) f b i b c and b o The weights and biases of the fully connected layer (dense layer), and the role of each gate, determine which historical information to discard, which new information to update, and which information to output. The method is as follows: by changing the weight values, the gradient of Ltotal with respect to each weight is calculated through backpropagation, and then updated using gradient descent.
[0044] During model training, corrections and parameter updates are not performed on individual samples. Instead, a batch is used as a unit. First, all samples within the batch are forward-propagated to calculate the average loss. Then, a backpropagation is performed to update the weights. The specific training process is as follows: starting from the beginning of training, the first iteration is performed, and the forward propagation, average loss calculation, backpropagation, and weight update operations are performed on batch 1, batch 2, and so on up to the last batch 32 containing the remaining samples. After all batches in the first round are processed, the validation loss is recorded. Then, the second round is entered, and the above batch training process is repeated based on the updated weights. This process is repeated until the early stopping mechanism is triggered or the preset 100 iterations are completed, at which point the entire training process officially ends.
[0045] The training process continues until any of the following predefined conditions are met, which include: (1) Reach the preset maximum number of training rounds, 100 rounds; (2) The data fitting loss on the validation set no longer decreases after 15 consecutive rounds (early stopping strategy).
[0046] After training, the model weights are restored to the parameter configuration that minimizes the loss on the validation set, ensuring that the model has the best generalization performance.
[0047] S5, Soft-measure prediction of hydrogen storage density for solid-state hydrogen storage materials. By inputting temperature, pressure, time, and the reaction rate coefficient K within the target temperature range into a trained LSTM model, prediction results with both thermodynamic and kinetic constraints are obtained. The accuracy of the results can be compared with the experimental data (R0). 2 To evaluate the accuracy of predictions, the hyperparameter values or reaction rate coefficient K in the total loss function can be changed if necessary.
[0048] The trained model is applied to a solid-state hydrogen storage prediction system. By inputting temperature, pressure, and time data for a specified material, as well as the inherent reaction rate constant within the temperature range, the corresponding hydrogen storage density can be measured online and in real time using soft measurement. This soft measurement method exhibits good versatility and transferability; by only updating key physical parameters and adding a small amount of new data, the model can be quickly adapted to new materials or operating conditions.
[0049] A second aspect of the present invention discloses a soft measurement system for the hydrogen absorption and desorption characteristics of solid-state hydrogen storage materials based on PINN, comprising: The data acquisition module is used to acquire the temperature, pressure, and time of the hydrogen storage system; An LSTM neural network model module is used to predict hydrogen storage density based on the temperature, pressure, and time of the hydrogen storage system using a physical information neural network; the training process of the physical information neural network is as follows: Based on the temperature, pressure, and time data in the training dataset, a predicted hydrogen storage density is obtained through an initial physical information neural network. The data fitting loss is then obtained by combining the actual experimental values. The van der Hoff equation yields the van der Hoff constraint loss, and the JDM kinetic model yields the JDM constraint loss. A composite loss function is obtained by combining the data fitting loss, van der Hoff constraint loss, and JDM constraint loss. The parameters of the initial physical information neural network are then adjusted based on this composite loss function until the composite loss function meets the requirements, resulting in the final physical information neural network. The soft measurement execution module is used to output hydrogen storage density.
[0050] The data acquisition module also includes a data preprocessing module, which is used to clean, standardize and serialize the input raw operating parameters and hydrogen storage density data.
[0051] The LSTM neural network model module includes a model training and optimization module, used to calculate the composite loss function, update model parameters, and monitor the training process. Specifically, based on the temperature, pressure, and time of the training dataset, a predicted hydrogen storage density is obtained through an initial physical information neural network; a data fitting loss is obtained by combining the experimental real values; a van 't Hoff equation is used to obtain a van 't Hoff constraint loss; and a JDM kinetic model is used to obtain a JDM constraint loss. A composite loss function is obtained by combining the data fitting loss, van 't Hoff constraint loss, and JDM constraint loss. The parameters of the initial physical information neural network are corrected based on the composite loss function until the composite loss function meets the requirements, thus obtaining the final physical information neural network. The soft measurement execution module is used to load the trained model, receive real-time temperature, pressure, time, and reaction rate constant inputs, and output the predicted hydrogen storage density.
[0052] The following description, in conjunction with specific embodiments, provides further details.
[0053] Example 1 Based on the hydrogen absorption and desorption experimental data of MgH2 in the same laboratory, this embodiment details the application of the soft measurement method of hydrogen absorption and desorption characteristics of solid hydrogen storage materials based on physical information neural network (PINN) on MgH2 material. The results show that the model can accurately and quickly predict the hydrogen storage density of the material under various temperature and pressure conditions.
[0054] (1) Data preparation: Hydrogen absorption and storage density data of MgH2 within 0-3000 s at 300-390℃ and 3.0 MPa pressure, and hydrogen release and storage density data within 0-3000 s at 250-300℃ and atmospheric pressure were collected. Temperature (converted to K), pressure, and time were normalized and reshaped into the sequence format that the LSTM model can receive, as shown in Table 1 below.
[0055] Table 1. LSTM parameter sensitivity analysis results
[0056] (2) Pure data-driven LSTM model training: Construct the LSTM model according to step S1. See the fitting results after training. Figure 3 The growth trends of the experimental data and the predicted data are largely consistent, and the fitting results for hydrogen absorption and desorption are R... 2 All scores exceeded 0.9, proving that the predicted values and experimental values were in high agreement. Figure 3 The left graph represents the hydrogen absorption prediction, and the right graph represents the hydrogen release prediction.
[0057] (3) Van der Hoff equation constraint model training: Add van der Hoff equation constraints according to step S2. See the fitting results after training. Figure 4 Compared to training with a basic LSTM model, the R-value of the hydrogen absorption / desorption fitting results is higher. 2 The increases in all these aspects prove that the constraints of the van der Hoff equations are effective, among which... Figure 4 The left graph represents the hydrogen absorption prediction, and the right graph represents the hydrogen release prediction.
[0058] (4) Training of the dual physical constraint model: Based on the model constructed in S3, train the model again, input the reaction rate coefficient K corresponding to the temperature range, and train the dual physical constraint model according to the steps in S4. See the fitting results after training. Figure 5 The fitting results of hydrogen absorption and desorption are R 2 The score is very close to 1, and the prediction accuracy is further improved compared to the pure data-driven model. Moreover, the change in the response score conforms to the dynamic law of JDM.
[0059] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0060] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0061] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0062] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
[0063] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A soft measurement method for the hydrogen absorption and desorption characteristics of solid-state hydrogen storage materials based on PINN, characterized in that, Includes the following steps: S1, obtain the temperature, pressure and time of the hydrogen storage system; S2, based on the temperature, pressure, and time of the hydrogen storage system, the hydrogen storage density is predicted using a physical information neural network; the training process of the physical information neural network is as follows: Based on the temperature, pressure, and time data in the training dataset, a predicted hydrogen storage density is obtained through an initial physical information neural network. The data fitting loss is then obtained by combining the actual experimental values. The van der Hoff equation yields the van der Hoff constraint loss, and the JDM kinetic model yields the JDM constraint loss. A composite loss function is obtained by combining the data fitting loss, van der Hoff constraint loss, and JDM constraint loss. The parameters of the initial physical information neural network are then adjusted based on this composite loss function until the composite loss function meets the requirements, resulting in the final physical information neural network. S3 outputs hydrogen storage density.
2. The soft measurement method for hydrogen absorption and desorption characteristics of solid-state hydrogen storage materials based on PINN according to claim 1, characterized in that, In S2, the physical information neural network prediction model includes two LSTM layers, a Dropout layer between the two LSTM layers, and a fully connected layer after the last LSTM layer.
3. The soft measurement method for hydrogen absorption and desorption characteristics of solid-state hydrogen storage materials based on PINN according to claim 1, characterized in that, In S2, the training process of the physical information neural network involves training and correcting the parameters of the physical information neural network, including the number of LSTM neurons, the Dropout rate, and the learning rate.
4. The soft measurement method for hydrogen absorption and desorption characteristics of solid hydrogen storage materials based on PINN according to claim 1, characterized in that, The formula for calculating the data fitting loss is: Where N is the total number of samples, the The table shows the predicted hydrogen storage density output from the basic LSTM network. The value represents the actual hydrogen storage density measured in the experiment, and i represents the sample number.
5. The soft measurement method for hydrogen absorption and desorption characteristics of solid-state hydrogen storage materials based on PINN according to claim 1, characterized in that, The calculation of van der Hoff constraint loss first uses the van der Hoff equation to calculate the theoretical equilibrium pressure P at the current temperature. theo Then, a hydrogen storage depth correction factor f(x) is introduced for P. theo The predicted value P is obtained by making corrections. theo,corrected The hydrogen absorption and desorption trend is determined by comparing the current predicted value with the previous predicted value, and the actual pressure and P are calculated based on thermodynamic laws. theo,corrected The degree of violation is determined, and the mean of the violation degrees across all samples is taken as the van der Hoff constraint loss L. vant .
6. The soft measurement method for hydrogen absorption and desorption characteristics of solid hydrogen storage materials based on PINN according to claim 1, characterized in that, The formula for calculating the van der Hoff constraint loss is as follows: Where I is the hydrogen absorption / desorption state indicator variable, abs represents the hydrogen absorption state, and des represents the hydrogen desorption state. As an indicator variable for hydrogen absorption status, As an indicator variable for hydrogen release state, Let y be the actual operational pressure of the i-th sample. pred This represents the predicted hydrogen storage density.
7. The soft measurement method for hydrogen absorption and desorption characteristics of solid hydrogen storage materials based on PINN according to claim 1, characterized in that, The process of obtaining the JDM constraint loss is as follows: First, the hydrogen storage density predicted by the model is converted into a reaction fraction; then, the reaction rate constants of time and input temperature range are substituted into the JDM equation to calculate the difference between the JDM predicted value and the JDM theoretical value, thereby obtaining the JDM constraint loss.
8. The soft measurement method for hydrogen absorption and desorption characteristics of solid hydrogen storage materials based on PINN according to claim 7, characterized in that, The formula for calculating the JDM constraint loss is as follows: in, For JDM predictions, This is the theoretical value for JDM.
9. The soft measurement method for hydrogen absorption and desorption characteristics of solid-state hydrogen storage materials based on PINN according to claim 1, characterized in that, The formula for calculating the composite loss function is as follows: in, For data fitting loss, To constrain losses by van der Hoff, For JDM constraint loss, The weighting coefficients of the van der Hoff constraint, This represents the JDM constraint loss.
10. A soft measurement system for the hydrogen absorption and desorption characteristics of solid-state hydrogen storage materials based on PINN, characterized in that, include: The data acquisition module is used to acquire the temperature, pressure, and time of the hydrogen storage system; The LSTM neural network model module is used to predict the hydrogen storage density based on the temperature, pressure, and time of the hydrogen storage system using a physical information neural network; the training process of the physical information neural network is as follows: Based on the temperature, pressure, and time data in the training dataset, a predicted hydrogen storage density is obtained through an initial physical information neural network. The data fitting loss is then obtained by combining the actual experimental values. The van der Hoff equation yields the van der Hoff constraint loss, and the JDM kinetic model yields the JDM constraint loss. A composite loss function is obtained by combining the data fitting loss, van der Hoff constraint loss, and JDM constraint loss. The parameters of the initial physical information neural network are then adjusted based on this composite loss function until the composite loss function meets the requirements, resulting in the final physical information neural network. The soft measurement execution module is used to output hydrogen storage density.