Hydrogen leakage concentration prediction method and system
By combining a fully connected neural network with the hydrogen diffusion control equation, rapid and accurate prediction of hydrogen leakage concentration and real-time positioning of the leakage source are achieved, solving the problems of long CFD simulation tools and low positioning accuracy. This method is suitable for the safety monitoring of high-pressure hydrogen storage facilities.
Patent Information
- Application Number
- CN202510852800.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-09-19
AI Technical Summary
Existing CFD simulation tools take too long to simulate hydrogen leaks and cannot meet the real-time requirements of emergency response. In addition, leak source location relies on empirical assumptions or sparse sensor networks, which limits positioning accuracy.
A fully connected neural network combined with the hydrogen diffusion control equation is used to predict the hydrogen leakage concentration and locate the leakage source through feature extraction and mapping. A pre-trained neural network model is used for real-time prediction, combined with sliding window technology and physical constraints to achieve rapid response.
It significantly improves the real-time and accuracy of hydrogen leakage concentration prediction, can respond and trigger targeted emergency measures at the millisecond level, reduce false alarm rates, and is suitable for the safety monitoring of high-pressure hydrogen storage facilities.
Smart Images

Figure CN120671099A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of hydrogen energy safety technology, and in particular to a method and system for predicting hydrogen leakage concentration. Background Art
[0002] As a key energy source, hydrogen is rapidly being applied in transportation, energy storage, and industry. However, its low density, high diffusivity, and flammable and explosive properties make leakage risks particularly prominent in high-pressure storage and transportation scenarios. The hydrogen diffusion path is dynamically formed by the concentration gradient field of the leak, and its spatial distribution and evolution are directly reflected in the time series data of the concentration gradient field. By predicting the hydrogen leakage concentration in real time and accurately locating the leak source, targeted emergency measures such as local ventilation and rapid plugging can be triggered at the early stage of the leak, effectively avoiding the risk of flame spread or explosion, while reducing the waste of resources caused by blind disposal, providing core guarantees for the safe operation and maintenance and large-scale application of hydrogen energy facilities.
[0003] Although traditional CFD simulation tools based on fluid mechanics equations (such as the Navier-Stokes equations) can accurately simulate the hydrogen diffusion process and obtain the corresponding hydrogen leakage concentration, due to their reliance on grid discretization and iterative solutions, a single simulation takes hours to days and cannot meet the real-time requirements of emergency response. Summary of the Invention
[0004] Based on the above-mentioned defects of the prior art, the present invention provides a method and system for predicting hydrogen leakage concentration, which solves the problems of the prior art.
[0005] The present invention adopts the following technical solutions: In a first aspect, the present invention provides a method for predicting hydrogen leakage concentration, comprising the following steps: Collect hydrogen leakage concentration series and environmental parameters at different monitoring points at the current time step; The spatial coordinates of the monitoring point, environmental parameters, hydrogen leakage concentration sequence at the current time step, and the corresponding time are spliced into an input vector; Feature extraction is performed on the input vector to obtain spatial correlation features; the spatial correlation features are mapped to obtain the hydrogen leakage concentration sequence of the next time step.
[0006] Preferably, extracting features from the input vector to obtain spatial correlation features; and mapping the spatial correlation features includes: Processing the input vector using a pre-trained fully connected neural network to obtain the hydrogen leakage concentration sequence for the next time step; The fully connected neural network includes a feature extraction module and a first branch module; the feature extraction module includes three fully connected layers, wherein the first fully connected layer performs preliminary feature extraction on the input vector to obtain basic spatiotemporal correlation; the second fully connected layer captures the nonlinear interaction of the basic spatiotemporal correlation; the third fully connected layer performs secondary feature extraction on the captured basic spatiotemporal correlation to obtain spatial correlation features; The first branch module includes three hidden layers. The first hidden layer learns the characteristics of concentration evolution in spatial correlation features, the second hidden layer extracts the characteristic pattern of concentration evolution, and the third hidden layer compresses the characteristic pattern of concentration evolution to generate a hydrogen leakage concentration sequence for the next time step.
[0007] Preferably, the fully connected neural network model also includes a second branch module, which is used to perform leakage source regression on the spatial correlation features to obtain the predicted leakage source location. The second branch module includes two hidden layers, the first hidden layer learns the spatial features of the leakage source in the spatial correlation features, and the second hidden layer associates the spatial features with the leakage source parameters to generate the leakage source location.
[0008] Preferably, the fully connected neural network model is pre-trained by a joint loss function, and the joint loss function is specifically as follows: ; Where L is the joint loss function, λ 1. λ 2 and λ 3 is the weight coefficient, C pred is the hydrogen leakage concentration distribution sequence predicted by the model, C true is the real hydrogen leakage concentration distribution sequence, S pred is the location of the leakage source predicted by the model, S true is the actual leak source location, is the residual term of the hydrogen diffusion governing equation; The governing equation for hydrogen diffusion is as follows: ; Where, L physics is the hydrogen diffusion governing equation, u is the wind speed field, D is the diffusion coefficient, Q is the leakage rate, δ (r−r s ) is the leakage source position r s The Dirac function, ∇C is the spatial gradient of concentration, ∇ ² Cis the spatial diffusion term of hydrogen concentration, and r is the three-dimensional coordinate of any point in space.
[0009] Preferably, the alarm state and corresponding processing strategy are generated based on the hydrogen leakage concentration sequence of the current time step and the next time step and the predicted leakage source location, specifically including: If the hydrogen leakage concentration sequence of the current time step and the next time step is lower than 0.4%, no alarm will be issued; If the hydrogen leakage concentration sequence of the current time step and the next time step is higher than 0.4% but lower than 3.5%, or the error between the predicted leakage source location and the actual leakage source location is higher than 0.5m but lower than 2m, a level 1 alarm is triggered. At this time, local ventilation is initiated and a drone is dispatched for re-inspection. If the hydrogen leakage concentration sequence of the current time step and the next time step is higher than 3.5% or the error between the predicted leakage source location and the actual leakage source location is less than 0.5m, a secondary alarm is triggered; at this time, global ventilation is performed and a robot is used to plug the leak.
[0010] Preferably, the environmental parameters include ambient wind speed, ambient temperature, ambient pressure and ambient humidity.
[0011] In a second aspect, the present invention provides a hydrogen leakage concentration prediction system, comprising: A generation module is used to collect hydrogen leakage concentration sequences and environmental parameters at different monitoring points at the current time step; A construction module is used to concatenate the spatial coordinates of the monitoring point, environmental parameters, the hydrogen leakage concentration sequence at the current time step, and the corresponding time into an input vector; The prediction module is used to extract features from the input vector to obtain spatial correlation features; and to map the spatial correlation features to obtain the hydrogen leakage concentration sequence of the next time step.
[0012] Compared with the prior art, the at least one technical solution adopted by the present invention can achieve the following beneficial effects: The present invention first collects the hydrogen leakage concentration sequence and environmental parameters of different monitoring points at the current time step, and splices the spatial coordinates of the monitoring points, environmental parameters, the hydrogen leakage concentration sequence of the current time step and the corresponding time into an input vector. The present invention comprehensively considers the factors related to the hydrogen leakage concentration sequence. The input vector is input into a fully connected neural network, and the input vector is subjected to feature extraction by a feature extraction module to obtain spatial correlation features. The spatial correlation features are then subjected to concentration mapping by a first branch module to obtain the hydrogen leakage concentration sequence of the next time step. While maintaining high prediction accuracy, the real-time performance of the prediction is significantly improved, and it is particularly suitable for safety monitoring scenarios of high-pressure hydrogen storage facilities. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0014] Figure 1 This is a flow chart of the method for rapid simulation and location of hydrogen storage tank leakage of the present invention; Figure 2 This is an overall schematic diagram of the spherical storage tank leakage simulation model of the present invention; Figure 3 A top view of the spherical storage tank leakage simulation model of the present invention; Figure 4 Flowchart of establishing a spherical storage tank leakage simulation model and a hydrogen leakage database according to the present invention; Figure 5 is a structural diagram of a fully connected neural network of the present invention; Figure 6 This is a schematic diagram of the present invention for alarming according to hydrogen leakage; Figure 7 The figure is a flow chart of a method for predicting hydrogen leakage concentration according to the present invention. DETAILED DESCRIPTION
[0015] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0016] In order to solve the technical problems of low efficiency in hydrogen tank leakage simulation and reliance on empirical assumptions for leak source location, this paper proposes a hydrogen leakage concentration prediction method. By integrating fluid simulation data, physical law constraints, and adaptive incremental learning, it achieves high-precision prediction of hydrogen concentration and real-time location of leak sources, significantly improving the safety protection capabilities of hydrogen energy facilities. Figure 1 and Figure 7 , the present invention specifically includes the following steps:
[0017] S1: Establish a spherical tank leakage simulation model to simulate the transient diffusion process of high-pressure hydrogen leakage.
[0018] Based on the geometric parameters and operating conditions of a high-pressure spherical hydrogen storage tank, a three-dimensional transient leakage and diffusion model was constructed using computational fluid dynamics (CFD) software. This model considers the dynamic process of hydrogen leakage, including multi-dimensional parameters such as leak aperture, ambient wind speed, leak source location (three-dimensional coordinates on the tank surface), and injection direction (polar angle and azimuth angle). The governing hydrogen diffusion equation was embedded using a user-defined function (UDF) to ensure that the simulation results conform to the laws of mass conservation and momentum transfer.
[0019] S2: Generate a hydrogen concentration database using fluid simulation software. The database includes the hydrogen molar concentration and corresponding leakage source parameters at each monitoring point under different leakage conditions; the leakage conditions include tank pressure, leakage aperture, ambient wind speed, and leakage source location coordinates.
[0020] Furthermore, the leakage source parameters include the three-dimensional coordinates of the leakage point (x, y, z), the leakage aperture d, and the leakage direction angle (θ, ϕ); during the simulation, multiple sets of leakage scenarios are generated through parametric scanning, and each set of leakage scenarios corresponds to a set of concentration spatiotemporal distribution data and leakage source labels.
[0021] Furthermore, multiple sets of leakage scenarios are generated through parametric sweeps, each of which contains the following data: Spatiotemporal concentration distribution: The hydrogen molar concentration at 48 monitoring points around the tank is recorded at intervals of 0.1 seconds for 60 seconds.
[0022] Leak source parameter label: including the three-dimensional coordinates of the leak point (x, y, z), the leak aperture (d) and the direction angle (θ, φ).
[0023] Environmental parameters: dynamic wind speed vector, temperature, humidity and other variables.
[0024] The database is stored in HDF5 format, providing high-fidelity input for neural network training.
[0025] According to the above simulation model, some parameters can be changed, namely the hydrogen storage tank diameter, hydrogen storage tank pressure, leakage hole diameter, and ambient wind speed. Then, the hydrogen concentration of each hydrogen detection point under different hydrogen leakage conditions can be calculated according to the above hydrogen leakage conditions, and a sequence table of hydrogen concentration changes over time can be included in the database, thereby establishing a hydrogen leakage database.
[0026] Using an established hydrogen leak database, hydrogen concentration data was normalized and partitioned: 70% for model training, 15% for model validation, and 15% for prediction. A sliding window technique was used to segment the continuous time series data (collected hydrogen concentrations and spatial coordinates) into fixed-length windows. By encoding historical time series information, the sliding window enables a fully connected neural network to implicitly learn the dynamic patterns of hydrogen diffusion, avoiding the computational overhead associated with complex loop structures.
[0027] Determine hydrogen leakage conditions based on at least one of the following factors in the simulation model: hydrogen storage tank diameter, hydrogen storage tank pressure, leakage hole diameter, and ambient wind speed; input the hydrogen leakage conditions into the simulation model to obtain simulation results. Establish a hydrogen leakage database based on the simulation results. Figure 4 As shown, according to the established tank leakage simulation model, multiple leakage condition combinations are set according to the hydrogen storage tank diameter, hydrogen storage tank pressure, leakage hole diameter and ambient wind speed.
[0028] According to the selected leakage conditions, set the boundary conditions of the simulation, and complete the condition parameter setting of the fluent simulation software before simulation in combination with the initial conditions.
[0029] After setting the simulation conditions, other parameters are then set. In the general settings, select the density-based solver, select absolute for the velocity formula, and select transient for the time. Enable the gravity option and set the gravitational acceleration of the y-axis to -9.8m / s². In the model selection, enable the turbulence model, component transport model, and energy model. Select the standard k-ε model for the simulated turbulence model, and use the standard wall function. At the same time, hydrogen is also affected by buoyancy, and the compressibility effect needs to be turned on in the turbulence model. During the transient calculation process, the time step is fixed at 0.1s, the time step is set to 600 steps, and the total simulation time is 60s. Based on the simulation results, a hydrogen leakage database is established to obtain the hydrogen concentration change data of each monitoring point over time.
[0030] Through the above steps, the influence of hydrogen leakage factors is comprehensively considered, different leakage conditions are input into the simulation model, and a comprehensive hydrogen concentration database is established.
[0031] S3: Construct a physical constraint neural network model with inputs of time, spatial coordinates of monitoring points, and environmental parameters. The outputs include predicted hydrogen concentration values and estimated leakage source locations. During model training, the concentration prediction error and leakage source location error are jointly optimized.
[0032] Construct a neural network model with a shared feature layer and dual-branch output. Based on the existing fully connected neural network, design a multi-task physical constraint neural network: ① Dual-branch architecture, split the original network into a shared feature extraction layer (retaining 128-64-32 neurons) + independent task branches (left branch predicts concentration, right branch regresses leakage source coordinates / aperture); ② Physical constraint embedding, add the hydrogen diffusion control equation (∂C / ∂t+u·∇C=D∇²C+Qδ(rr s)) residual term, and calculate the spatiotemporal gradient of the concentration field through automatic differentiation. ③ Input feature expansion: Incorporating the 3D coordinates of the monitoring point and the ambient wind speed vector into the original time / concentration data to form an 11-dimensional input vector. This design is compatible with the original system data flow, requiring only the addition of coordinate data collection and feature splicing functions to the processor module.
[0033] Input features: time, monitoring point coordinates (X, Y, Z), wind speed vector (X, Y, Z directions), ambient temperature, ambient pressure, ambient humidity, and monitoring point concentration are spliced into an 11-dimensional vector, which is input into the network after standardization to achieve spatiotemporal feature coupling.
[0034] Furthermore, the neural network adopts a multi-task architecture consisting of a shared feature extraction layer and two independent output branches.
[0035] Shared feature extraction layer: High-order features are extracted step by step through three fully connected layers.
[0036] The first layer (256 neurons): learns basic spatiotemporal associations (such as the linear relationship between wind speed and concentration diffusion).
[0037] The second layer (128 neurons) captures complex nonlinear interactions (such as the effect of temperature gradient on diffusion rate).
[0038] The third layer (64 neurons): generates abstract spatial correlation features (such as the topological relationship between the leakage source and the monitoring point).
[0039] Activation function: ; Where W1 and W2 are weight matrices; b1 and b2 are bias terms; σ is the Sigmoid function, which generates a 0-1 gating weight. Represents element-wise multiplication.
[0040] The role of the GLU activation function: suppress noise characteristics; enhance the spatiotemporal correlation between concentration gradient and spatial coordinates.
[0041] Output: 64-dimensional vector containing abstract features that integrate spatiotemporal features for sharing by subsequent two branches.
[0042] Branch 1 (concentration prediction branch): Input data: 64-dimensional spatial correlation features output by the feature extraction layer.
[0043] 128-neuron layer: learns higher-order dynamics of concentration evolution (such as the decay of diffusion rate over time).
[0044] 64-neuron layer: extracts local patterns of concentration gradients (such as concentration differences between monitoring points).
[0045] 32-neuron layer: compresses features to key influencing factors (such as the dominant diffusion direction).
[0046] The output layer directly generates the concentration sequence of each monitoring point in the next time step.
[0047] Activation function: ; in, x is the input signal of the neuron.
[0048] Function: Only retain positive gradient features, automatically filter negative concentration errors, and accelerate model training.
[0049] Branch 2 (leak source location branch): Input data: 64-dimensional spatial correlation features output by the feature extraction layer.
[0050] 64-neuron layer: learns the spatial characteristics of leakage sources (such as the directional pattern of the concentration gradient field).
[0051] 32-neuron layer: associates spatial features with leak source parameters (such as the effect of wind speed on leak direction).
[0052] The output layer simultaneously predicts the leakage source parameters: three-dimensional coordinates (x, y, z) and leakage aperture (d).
[0053] Activation function: ; in, x is the input signal of the neuron.
[0054] Function: The gradient direction of back propagation is more stable and adapts to the probability distribution of the leakage source location.
[0055] Existing technologies for locating leak sources often rely on empirical assumptions or sparse sensor network inversion. Positioning accuracy is limited by the density of monitoring points and environmental noise. Purely data-driven prediction models, lacking physical constraints, are prone to violating fundamental laws such as mass conservation in extrapolated scenarios, leading to inaccurate concentration predictions and misjudgment of leak sources. Therefore, the present invention introduces the residual term of the diffusion-convection equation into the total loss function. Automatic differentiation is used to calculate the deviations of the time derivative of the predicted concentration field, the convection term, the diffusion term, and the leak source term, forcing the network output to conform to physical laws. The diffusion-convection equation is shown below:
[0056] ; Where u is the wind speed field, D is the diffusion coefficient, Q is the leakage rate, δ (r−r s ) is the leakage source position r s Dirac function; during training, the residual N(Cpred ) and add the loss function. Further, is the transient change term of concentration, representing the hydrogen concentration C Over time t The instantaneous rate of change corresponds to the non-steady-state characteristics of the leakage diffusion process. It is the dot product of the wind speed vector u (from the input feature) and the concentration spatial gradient ∇C, which describes the hydrogen advection effect driven by the ambient wind field. The diffusion term D∇²C uses the second-order central difference approximation, and the leakage source term Qδ (r−r s ) is replaced by a Gaussian kernel smoothing function. The weight coefficients (λ1, λ2, λ3) are dynamically adjusted using an uncertainty weighting method, with initial values set to (0.7, 0.2, 0.1). ∇C is calculated by the dot product of the wind speed vector and the concentration gradient. The residual weight λ3 is initially 0.1 and increases by 0.02 every 10 epochs, to a maximum of 0.3.
[0057] The joint loss function is: ; in is the residual term of the hydrogen diffusion governing equation (diffusion-convection equation), The weight coefficients (λ1, λ2, λ3) are dynamically adjusted using the uncertainty weighting method, and the initial values are set to (0.7, 0.2, 0.1).
[0058] The AdamW optimizer is used for training, with an initial learning rate of 3e-4 and a batch size of 256.
[0059] The designed multi-task physical constraint neural network adopts a dual-branch architecture. A shared feature layer fuses time, spatial coordinates, and environmental parameters to extract the spatiotemporal correlation characteristics of hydrogen diffusion. The concentration prediction branch outputs the hydrogen concentration sequence for the next time step, while the leak source location branch regresses the leak point coordinates and aperture. Both are optimized simultaneously using a joint loss function. The physical laws of the fluid diffusion equation are embedded as constraints during training, forcing the model to adhere to the principles of mass conservation and momentum transfer. Incremental learning is also used to dynamically update parameters.
[0060] like Figure 5 As shown, the fully connected neural network in this embodiment includes an input layer, a hidden layer and an output layer. The input layer receives input data, the hidden layer generates a new feature representation by weighting and activating the input, and the output layer weights and activates the output of the hidden layer to obtain the final output result.
[0061] In this embodiment, a hydrogen leakage prediction model obtained by training a fully connected neural network (FNN) is adopted. Through sliding window timing coding, physical constraint guidance and lightweight design, while maintaining high prediction accuracy, it significantly improves real-time performance, deployability and alarm response speed. It is particularly suitable for safety monitoring scenarios of high-pressure hydrogen storage facilities.
[0062] In hydrogen leak prediction model design, the fully connected neural network (FNN) demonstrates unique advantages through its simple and efficient structure and deep integration of physical constraints. Compared to models such as ARIMA, RNN, or Transformer, FNNs eschew complex recurrent or autoregressive mechanisms. Instead, they employ a sliding window to encode historical time series data (such as time, spatial coordinates, concentration, and wind speed over the past 10 seconds) into a multidimensional input, directly outputting a predicted concentration value for the next time step. This significantly reduces computational complexity while maintaining accuracy. Its lightweight design (fewer than 30,000 parameters) is well-suited for edge device deployment. Combined with a dynamic threshold algorithm, it achieves millisecond-level response and early warning, reducing alarm times by 2-3 seconds compared to measured values and significantly improving safety. Furthermore, by embedding a residual term from the mass conservation equation in its loss function, FNNs enforce the model's adherence to physical diffusion laws. This balances data-driven efficiency with the rationality of the physical model, providing a reliable and efficient solution for the safety monitoring of hydrogen energy facilities.
[0063] In some embodiments, it also includes: when training the prediction model of hydrogen concentration, the residual term of the mass conservation equation is additionally added to the loss function as a soft constraint to guide the network to learn physical laws, which is a non-traditional "logic gate" structure. The residual term of the mass conservation equation is additionally added to the loss function as a soft constraint. Through the deep integration of physical laws and data-driven, the model is forced to learn the mass conservation characteristics in the hydrogen diffusion process while optimizing the prediction accuracy. This design not only improves the generalization ability of the model for unknown working conditions, but also significantly reduces the non-physical solution caused by ignoring physical laws in pure data-driven methods. At the same time, it suppresses overfitting through the regularization effect, and can still maintain the physical rationality and stability of the prediction results under limited data, providing a reliable decision-making basis for industrial scenarios.
[0064] In some embodiments, this also includes: introducing a time second-order derivative constraint into the loss function, forcing the model's predicted concentration changes to follow smooth physical laws, effectively suppressing non-physical oscillations caused by error accumulation or data noise in long-term predictions. This constraint not only enhances the spatiotemporal coherence of the prediction curve, but also, by limiting the divergence of higher-order kinetic behavior, enables the model to maintain stable output under complex environmental perturbations. Combined with the EWC algorithm, it ensures the physical consistency of new and old knowledge during incremental learning, thereby improving the model's reliability in long-term prediction tasks and its applicability to industrial scenarios.
[0065] Incremental learning is triggered when the cache pool reaches 150 new data sets (capacity 200). When calculating the Fisher information matrix, the gradient statistics of 10% of the historical data (approximately 2000 sets) are randomly selected, and the EWC constraint strength coefficient β = 500. During fine-tuning, the learning rate decay strategy is cosine annealing, with an initial value of 1e-5 and a minimum value of 1e-6, for a total of 5 iterations.
[0066] A dual model of hydrogen leakage and leakage source location is constructed based on the leakage database. First, the concentration, spatial coordinates and environmental parameters (wind speed, temperature) of the monitoring point in the time series are extracted from the database as input features, and the spatiotemporal correlation of concentration diffusion is learned through a shared feature extraction layer. Then, two branches are set up in the output layer: the leakage prediction branch regresses the concentration value of the next time step with a fully connected network, and the positioning branch inverts the leakage source coordinates and aperture through a convolution-fully connected hybrid structure. At the same time, the mean square error of concentration, the positioning Huber loss and the embedded diffusion equation residual term are jointly optimized in the loss function. The physical consistency of the model is constrained by automatic differentiation, and finally a bidirectional mapping from concentration data to leakage parameters is achieved.
[0067] S4: Deploy the trained model to computing equipment to predict hydrogen concentration and invert the location of the leak source in real time, and trigger graded alarm measures based on the predicted concentration and positioning results.
[0068] Furthermore, the trained model is deployed to an edge computing terminal (such as NVIDIA Jetson AGXXavier), which receives sensor data in real time and performs the following operations: Concentration prediction: Using the data of 10 historical time steps (1 second) as input, the hydrogen concentration distribution in the next 1 second is predicted through single-step recursion.
[0069] Leakage source inversion: Output the leakage source coordinates and aperture estimation based on the concentration gradient and spatial distribution characteristics at the current moment.
[0070] Incremental learning update: New monitoring data is stored in a cache pool with a capacity of 200 groups. When the data volume reaches the threshold, the parameter importance matrix is calculated based on the Elastic Weight Consolidation (EWC) algorithm, and five rounds of fine-tuning training are performed. If the verification error increases by more than 5%, the system rolls back to the previous version.
[0071] Further, refer to Figure 6, the leak source location result and the concentration prediction value jointly trigger an alarm. The alarm system includes an audible and visual alarm system, an emergency ventilation system, and a drone robot inspection system. Among them, the current hydrogen concentration at the monitoring point is the hydrogen concentration detected by the sensor at the actual measurement point currently arranged around the storage tank, that is, the actual measured value of the hydrogen concentration; the predicted hydrogen concentration is the predicted value of the hydrogen concentration. Hydrogen sensors and timers can be set around the storage tank to monitor the current concentration of hydrogen around the storage tank in real time, and based on the current hydrogen concentration monitored in real time, the predicted value of the above-mentioned hydrogen leakage prediction model and the leak source location result, the hydrogen concentration leakage situation under different dangerous situations can be judged, and then corresponding instructions are issued to the alarm system to perform different alarm prompts and different processing.
[0072] Safe status (green light): both the predicted and real-time concentrations are lower than 0.4%, and the leakage source positioning error radius is greater than 2m; Level 1 alarm (yellow light): the concentration exceeds 0.4% but lower than 3.5%, or the positioning error is 0.5m≤≤2m, local ventilation is initiated and a drone is dispatched for re-verification; Level 2 alarm (red light): the concentration exceeds 3.5% or the positioning error is ≤0.5m, triggering an audible and visual alarm, global ventilation, and robot plugging; Positioning correction mode: if the spatial standard deviation of the positioning results is greater than 1m for three consecutive times, the backup sensor array is activated and the monitoring range is expanded.
[0073] The alarm system's core advantage lies in its deep integration of physical constraints and data-driven approaches. By embedding diffusion equations to constrain neural network predictions, the system ensures that concentration predictions strictly adhere to the principles of mass conservation and momentum transfer, avoiding the non-physical interpretation of pure data models in complex scenarios. Combined with a multi-task learning framework, the system simultaneously predicts hydrogen concentration and locates leak sources at the sub-meter level, significantly improving efficiency compared to traditional single-task models. A dynamic incremental learning mechanism enables the system to continuously adapt to environmental changes, reducing false alarm rates. A hierarchical response strategy intelligently triggers targeted measures based on leak location errors and concentration thresholds, forming a closed-loop "prediction-location-verification-disposition" management system, significantly improving the accuracy and real-time performance of hydrogen energy facility safety protection.
[0074] First, a three-dimensional transient leakage simulation model was established based on the tank's geometric parameters and operating conditions. Computational fluid dynamics (CFD) was used to simulate the hydrogen diffusion process under different leakage scenarios, generating a database containing spatiotemporal concentration distribution data and corresponding labels of leak source locations, apertures, and azimuth angles. Furthermore, a multi-task neural network architecture was designed to jointly optimize leakage concentration prediction and leak source localization as dual objectives. The shared feature extraction layer integrated time, spatial coordinates, and environmental parameters via a gated linear unit (GLU) and a Swish activation function. The concentration prediction branch outputted a hydrogen concentration sequence for the next time step. The leak source localization branch regressed the three-dimensional coordinates of the leak point and the leak aperture. The physical residual term of the diffusion-convection equation was embedded in the loss function. The spatiotemporal gradient of the concentration field was calculated through automatic differentiation to enforce the model's adherence to the laws of mass conservation and momentum transfer. Furthermore, the elastic weight consolidation (EWC) algorithm was used for incremental learning based on real-time monitoring data. The network parameters were dynamically updated to adapt to environmental changes. Finally, a graded response was triggered based on the predicted concentration value, the real-time monitored concentration, and the leak source localization error radius.
[0075] The present invention embeds the diffusion equation law to constrain the neural network prediction, ensuring that the concentration prediction results strictly follow the principles of conservation of mass and momentum transfer, avoiding the non-physical interpretation of pure data models in complex scenarios; combined with the multi-task learning framework, it simultaneously realizes hydrogen concentration prediction and sub-meter positioning of leakage sources, which is significantly more efficient than the traditional single-task model; the dynamic incremental learning mechanism enables the system to continuously adapt to environmental changes and reduce the false alarm rate; the hierarchical response strategy is based on the leakage positioning error and concentration threshold to intelligently trigger targeted measures, forming a "prediction-positioning-verification-disposal" closed-loop management, which significantly improves the accuracy and real-time performance of the safety protection of hydrogen energy facilities.
[0076] Example 1 A spherical tank leakage simulation model was constructed using ANSYS Fluent. The tank had a diameter of 16 meters and an operating pressure range of 1.5-70 MPa. The leak aperture was randomly distributed between 1 and 50 mm. The leak source location was parameterized using a spherical coordinate system, with polar angles θ∈[0°,180°] and azimuth angles φ∈[0°,360°]. The ambient wind speed was simulated using a random turbulence field (wind speeds ranging from 0 to 15 m / s). The simulation time step was 0.1 seconds, and the total duration was 60 seconds. The output included concentration time series data for 48 monitoring points and leak source labels.
[0077] The tank leakage simulation model consists of two spherical tanks. According to the simulation requirements, some supporting structures and connecting accessories of the spherical tanks are simplified. Among them, the diameter of the spherical tank is 16m, the pressure of the spherical tank is 1.5Mpa, there is a leakage hole in the center of the side of the spherical tank, the diameter of the leakage hole is 50mm, the ambient wind speed is the same as the jet direction, and the ambient wind speed is 5m / s. There is a spherical tank without a leakage hole on the right side of the spherical tank with a leakage hole, and the spherical tank is facing the leakage hole, with a diameter of 16m, and the distance between the centers of the two spherical tanks is 30m. Since the supporting structure of the spherical tank is simplified, the spherical tank is suspended in the air, and the spherical tank is 7m away from the ground. In the specific implementation, the following is established in the modeling and simulation platform in ANSYS SpaceClaim. Figure 2 The tank leakage simulation model shown in the figure has hydrogen concentration monitoring points (on the same horizontal plane) set as follows Figure 3 As shown in the figure, 48 hydrogen concentration monitoring points were set up around the two spherical storage tanks. Features were extracted individually near the tank supports and in the larger airspace surrounding them. Measurement points 1 through 48 were set during the simulation, and points 1 through 8 also exist in real-world sensors. Real-time hydrogen concentrations were measured using these sensors at points 1 through 8. These hydrogen concentrations were then used to update the prediction and leak source location models using an incremental algorithm.
[0078] Hydrogen leakage is primarily caused by tiny cracks in hydrogen storage tanks, and can be categorized as a pinhole leak. The ideal gas model is used for hydrogen, with supersonic flow at the outlet. The hydrogen leakage model is an underexpansion leak, meaning the outlet pressure is greater than the critical pressure. During continuous gas leakage, the continuity equation, momentum equation, energy equation, and diffusion equation are satisfied. The settings for each of these equations should be carefully considered during simulation.
[0079] Furthermore, the boundary conditions of the simulation model are determined. The boundary conditions include velocity inlet boundary conditions, outlet boundary conditions and wall boundary conditions. The specific boundary conditions can be set as follows: Figure 2 As shown, the fluid control area surface on the left side (i.e., the negative direction of the x-axis) of the spherical tank with a leakage hole is set as the velocity inlet, the fluid control area surface on the right side (i.e., the positive direction of the x-axis) of the spherical tank without a leakage hole is set as the pressure outlet, the fluid control area surface on the front side (i.e., the positive direction of the z-axis) of the spherical tank with a leakage hole is set as a symmetric boundary condition, the fluid control area surface on the back side (i.e., the negative direction of the z-axis) of the spherical tank with a leakage hole is set as a symmetric boundary condition, the fluid control area surface on the upper side (i.e., the positive direction of the y-axis) of the spherical tank with a leakage hole is set as the pressure outlet, and the fluid control area surface on the lower side (i.e., the negative direction of the y-axis) of the spherical tank with a leakage hole is set as a no-slip wall.
[0080] Furthermore, the initial conditions of the simulation model are determined. The specific initial conditions can be set as follows: the ambient temperature and hydrogen temperature are set to 300K, where K is Kelvin, and Kelvin = Celsius + 273.15°C; the ambient atmospheric pressure is set to a standard atmospheric pressure (101.325 kPa); and the acceleration due to gravity is set to 9.8 m / s. 2 , and along the negative direction of the y-axis; the velocity in the fluid control area is set to 0; the internal pressure of the spherical tank with a leaking hole is set to 1.5MPa; the turbulent kinetic energy is set to 1m 2 / s 2 ; The turbulent dissipation rate is set to 1m 2 / s 3 .
[0081] ANSYS FLUENT simulation software is used to simulate hydrogen leakage, and fluid simulation is performed based on the above geometric model, boundary conditions and initial conditions.
[0082] Example 2 When the leakage source positioning error radius R>1 meter, the system automatically activates the compensation algorithm: based on the spatial distribution of the last three positioning results, the center of mass coordinates are calculated as the correction output, and the drone carrying the gas sensor is started to perform intensive sampling of the 2-meter area around the center of mass (sampling interval 0.5 seconds) until the error converges to R≤0.5 meters.
[0083] Example 3 Dynamic adjustment of alarm strategies.
[0084] Dynamically adjust the concentration threshold according to the ambient humidity: When humidity is ≤40%, the second-level alarm threshold is reduced from 3.5% to 3.0%.
[0085] When humidity > 40%, the standard threshold is restored.
[0086] At the same time, if the leakage source positioning error R≤0.3 meters, the first-level alarm threshold is relaxed to 0.5% to avoid false triggering.
[0087] Example 4 Real-time data preprocessing.
[0088] Before the sensor data is fed into the model, the following preprocessing is performed: Outlier filtering: Hampel filter (window size 5, threshold 3σ) was used to remove outliers.
[0089] Time alignment: Synchronize data from multiple monitoring points to a unified timestamp using interpolation.
[0090] Normalization: The concentration value is divided by the safety threshold of 4%, and the coordinates are normalized to the range [-1, 1].
[0091] Example 5 To adapt to edge devices (such as Jetson AGX Xavier), the trained neural network is optimized as follows: Quantization compression: Convert FP32 models to INT8 precision, accelerating inference speed by 3 times.
[0092] Layer fusion: Merge the fully connected layers and activation functions of the shared feature layer into a single operator.
[0093] Cache reuse: Preload static environmental parameters (such as monitoring point coordinates) into memory to reduce real-time computing load.
[0094] Example 6 For multiple tank leak scenarios, the simulation model was expanded to a multi-sphere coupled system, with the leak source labeling augmented with tank ID information. The neural network input layer was expanded to 16 dimensions (with one-hot encoding of the tank IDs), and the output layer simultaneously predicted the leak source parameters for each tank. The loss function assigned independent weights to the positioning errors of different tanks.
[0095] Example 7 When applied to liquid hydrogen storage tanks (temperature -253°C), the simulation model adds a phase change module, and the database additionally records the hydrogen vaporization rate and temperature field distribution. The neural network input features are expanded to 14 dimensions (adding the temperature gradient ΔT), and the residual of the energy conservation equation is introduced in the physical constraint term:
[0096] ; Where ρ is the density, C p is the specific heat capacity, k is the thermal conductivity, Q latent is the latent heat of phase change.
[0097] Based on the same concept, the present invention also provides a hydrogen leakage concentration prediction system, which includes a generation module, a construction module and a prediction module.
[0098] The generation module is used to collect the hydrogen leakage concentration sequence and environmental parameters of different monitoring points at the current time step.
[0099] The construction module is used to splice the spatial coordinates of the monitoring point, environmental parameters, the hydrogen leakage concentration sequence of the current time step and the corresponding time into an input vector.
[0100] The prediction module is used to extract features from the input vector to obtain spatial correlation features; and perform concentration regression on the spatial correlation features to obtain the hydrogen leakage concentration sequence of the next time step.
[0101] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0102] Obviously, those skilled in the art may make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if such modifications and variations fall within the scope of the claims and their equivalents, the present invention is intended to include such modifications and variations.
Claims
1. A method for predicting hydrogen leakage concentration, characterized in that: The following steps are involved: Collect hydrogen leakage concentration series and environmental parameters at different monitoring points at the current time step; The spatial coordinates of the monitoring point, environmental parameters, hydrogen leakage concentration sequence at the current time step, and the corresponding time are spliced into an input vector; Extract features from the input vector to obtain spatial correlation features; The spatial correlation features are mapped to obtain the hydrogen leakage concentration sequence of the next time step.
2. A method for predicting hydrogen leakage concentration according to claim 1, characterized in that: The feature extraction is performed on the input vector to obtain spatial correlation features; Mapping of spatial association features, including: Processing the input vector using a pre-trained fully connected neural network to obtain the hydrogen leakage concentration sequence for the next time step; The fully connected neural network includes a feature extraction module and a first branch module; the feature extraction module includes three fully connected layers, wherein the first fully connected layer performs preliminary feature extraction on the input vector to obtain basic spatiotemporal correlation; the second fully connected layer captures the nonlinear interaction of the basic spatiotemporal correlation; the third fully connected layer performs secondary feature extraction on the captured basic spatiotemporal correlation to obtain spatial correlation features; The first branch module includes three hidden layers. The first hidden layer learns the characteristics of concentration evolution in spatial correlation features, the second hidden layer extracts the characteristic pattern of concentration evolution, and the third hidden layer compresses the characteristic pattern of concentration evolution to generate a hydrogen leakage concentration sequence for the next time step.
3. A method for predicting hydrogen leakage concentration according to claim 2, characterized in that: The fully connected neural network model also includes a second branch module, which is used to perform leakage source regression on spatial correlation features to obtain a predicted leakage source location. The second branch module includes two hidden layers. The first hidden layer learns the spatial features of the leakage source in the spatial correlation features, and the second hidden layer associates the spatial features with the leakage source parameters to generate the leakage source location.
4. A method for predicting hydrogen leakage concentration according to claim 3, characterized in that: The fully connected neural network model is pre-trained by a joint loss function, and the joint loss function is specifically as follows: ; Where L is the joint loss function, λ 1. λ 2 and λ 3 is the weight coefficient, C pred is the hydrogen leakage concentration distribution sequence predicted by the model, C true is the real hydrogen leakage concentration distribution sequence, S pred is the location of the leakage source predicted by the model, S true is the actual leak source location, is the residual term of the hydrogen diffusion governing equation; The governing equation for hydrogen diffusion is as follows: ; Where, L physics is the hydrogen diffusion governing equation, u is the wind speed field, D is the diffusion coefficient, Q is the leakage rate, δ (r−r s ) is the leakage source position r s The Dirac function, ∇C is the spatial gradient of concentration, ∇ ² C is the spatial diffusion term of hydrogen concentration, and r is the three-dimensional coordinate of any point in space.
5. A method for predicting hydrogen leakage concentration according to claim 4, characterized in that: Generate alarm status and corresponding processing strategies based on the hydrogen leakage concentration sequence of the current time step and the next time step and the predicted leakage source location, including: If the hydrogen leakage concentration sequence of the current time step and the next time step is lower than 0.4%, no alarm will be issued; If the hydrogen leakage concentration sequence of the current time step and the next time step is higher than 0.4% but lower than 3.5%, or the error between the predicted leakage source location and the actual leakage source location is higher than 0.5m but lower than 2m, a level 1 alarm is triggered. At this time, local ventilation is initiated and a drone is dispatched for re-inspection. If the hydrogen leakage concentration sequence of the current time step and the next time step is higher than 3.5% or the error between the predicted leakage source location and the actual leakage source location is less than 0.5m, a secondary alarm is triggered; at this time, global ventilation is performed and a robot is used to plug the leak.
6. A method for predicting hydrogen leakage concentration according to claim 1, characterized in that: The environmental parameters include ambient wind speed, ambient temperature, ambient pressure and ambient humidity.
7. A hydrogen leakage concentration prediction system, characterized in that: include: A generation module is used to collect hydrogen leakage concentration sequences and environmental parameters at different monitoring points at the current time step; A construction module is used to concatenate the spatial coordinates of the monitoring point, environmental parameters, the hydrogen leakage concentration sequence at the current time step, and the corresponding time into an input vector; The prediction module is used to extract features from the input vector and obtain spatial correlation features; The spatial correlation features are mapped to obtain the hydrogen leakage concentration sequence of the next time step.
Citation Information
Cited By
Dynamic risk evaluation method for hydrogen refueling station based on deep learning
CN121303861A
A hydrogen refueling station dynamic risk assessment method based on deep learning
CN121303861B