Method, system and equipment for predicting hydrogen leakage flow of hydrogen refueling station, medium and product
By obtaining a variety of environmental and system parameters on the hydrogen refueling station, and using prediction models and machine learning algorithms to accurately predict hydrogen leakage flow, the problem of inaccurate reflection of leakage situations in the existing technology is solved, and the accuracy and safety of leakage flow prediction are improved.
Patent Information
- Application Number
- CN202510237855.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-06-20
AI Technical Summary
The existing hydrogen leakage flow prediction method at hydrogen refueling stations cannot accurately reflect the leakage situation in a timely manner, and is susceptible to environmental factors, and serious leakage may occur at the leakage port before the alarm threshold is reached.
By obtaining the hydrogen concentration value of the hydrogen refueling station, the hydrogen temperature value, ambient temperature value, wind direction and wind speed of the hydrogen storage system, the hydrogen leakage flow prediction model is used, combined with the first training data set and the second training data set, the training element learner and the basic learner to determine the hydrogen leakage flow, and judge the leakage level based on the flow.
It significantly improves the accuracy of hydrogen leakage flow prediction, and can predict leakage flow at the leakage port before the sensor alarm threshold is reached, ensuring that the overall leakage situation of hydrogen refueling stations is accurately reflected in complex environments.
Smart Images

Figure CN120183553A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of hydrogen energy safety, and particularly to a method, system, device, medium and product for predicting hydrogen leakage flow rate in a hydrogen refueling station. Background Art
[0002] Under the background of vigorously promoting fuel cell vehicles, as the core of green transportation infrastructure, hydrogen refueling stations provide hydrogen replenishment for fuel cell vehicles, and the number of hydrogen refueling stations has been increasing year by year. To support the development of this emerging technology, the construction of hydrogen refueling stations is particularly crucial. The construction of hydrogen refueling stations has increasingly become an important part of the hydrogen energy industry chain, and its safety, stable and reliable operation issues have attracted much social attention.
[0003] Hydrogen in a hydrogen refueling station has the characteristics of high pressure, flammable and explosive, and small molecular diameter. Compared with other gases, it is more likely to leak. Hydrogen concentration sensors can detect hydrogen leakage and give an alarm, and gradually become an indispensable device for ensuring the safe operation of hydrogen refueling stations. The detection performance of hydrogen concentration sensors is not only directly related to the normal operation of hydrogen refueling stations, but also closely related to the personal safety of staff. Therefore, it is of great significance to develop a fast and accurate detection method using hydrogen concentration sensors to detect hydrogen leakage in hydrogen refueling stations.
[0004] The current method for predicting hydrogen leakage flow rate in a hydrogen refueling station uses a hydrogen concentration sensor to collect hydrogen concentration and judges the degree of hydrogen leakage by setting different thresholds. The existing deficiencies are as follows:
[0005] (1) When the hydrogen concentration sensor detects that the hydrogen concentration reaches the alarm threshold, serious hydrogen leakage may have occurred at the leakage port; (2) The hydrogen concentration measured by the hydrogen concentration sensor is easily affected by various factors such as environmental wind speed, wind direction, temperature, hydrogen self-temperature and leakage position, and cannot accurately and real-time reflect the overall leakage situation. Summary of the Invention
[0006] The purpose of the present application is to provide a method, system, device, medium and product for predicting hydrogen leakage flow rate in a hydrogen refueling station to improve the accuracy of hydrogen leakage flow rate prediction.
[0007] To achieve the above purpose, the present application provides the following solutions:
[0008] In the first aspect, the present application provides a method for predicting hydrogen leakage flow rate in a hydrogen refueling station, including:
[0009] Obtaining the hydrogen concentration value, the hydrogen temperature value in the hydrogen storage system, the environmental temperature value, and the wind direction and wind speed in the target hydrogen refueling station at the position to be predicted;
[0010] According to the hydrogen concentration value, hydrogen temperature value in the hydrogen storage system, ambient temperature value, and wind direction and speed in the hydrogen refueling station at the position to be predicted of the target hydrogen refueling station, use the hydrogen leakage flow prediction model to determine the hydrogen leakage flow at the position to be predicted of the target hydrogen refueling station; wherein, the hydrogen leakage flow prediction model is obtained by training each base learner using the first training dataset and training the meta-learner using the second training dataset; the first training dataset consists of a relationship database of hydrogen concentration at each monitoring point, hydrogen concentration at each monitoring point, and hydrogen leakage flow at each leakage port calculated by the simulation model and the processed key features; the processed key features are determined based on the candidate features and the correlation feature selection algorithm; the candidate features include the maximum leakage concentration value, wind speed weighted average leakage concentration, leakage concentration rise rate, leakage concentration gradient, leakage concentration volatility, leakage concentration dynamic time warping distance, leakage exposure time, leakage concentration extreme value index, spectral energy, and wavelet energy distribution; the second training dataset consists of the verification dataset and the hydrogen leakage flow prediction results generated by each trained base learner.
[0011] Optionally, it further includes:
[0012] Determine the hydrogen leakage level according to the hydrogen leakage flow at the position to be predicted of the target hydrogen refueling station.
[0013] Optionally, determining the hydrogen leakage level according to the hydrogen leakage flow at the position to be predicted of the target hydrogen refueling station specifically includes:
[0014] Judge whether the hydrogen leakage flow at the position to be predicted of the target hydrogen refueling station is less than or equal to the first preset value to obtain the first judgment result;
[0015] If the first judgment result is yes, the hydrogen leakage level is a minor leakage level;
[0016] If the first judgment result is no, then judge whether the hydrogen leakage flow at the position to be predicted of the target hydrogen refueling station is less than the second preset value to obtain the second judgment result; the second preset value is greater than the first preset value;
[0017] If the second judgment result is yes, the hydrogen leakage level is a medium leakage level;
[0018] If the second judgment result is no, then judge whether the hydrogen leakage flow at the position to be predicted of the target hydrogen refueling station is less than the third preset value to obtain the third judgment result; the third preset value is greater than the second preset value;
[0019] If the third judgment result is yes, the hydrogen leakage level is a severe leakage level;
[0020] If the third judgment result is no, the hydrogen leakage level is an extremely dangerous leakage level.
[0021] Optionally, the base learners include a random forest model, a support vector machine model, a multi-layer perceptron model, a K-nearest neighbor model, a decision tree model, and a naive Bayes model.
[0022] Optionally, the base learners are trained respectively using the first training dataset, and the meta-learner is trained using the second training dataset. Specifically, it includes:
[0023] Construct a first training dataset and a validation set;
[0024] Train each base learner respectively using the first training dataset to obtain the trained base learners;
[0025] Input the validation set into each of the trained base learners respectively to obtain the predicted results of the hydrogen leakage flow rate of the base learners;
[0026] Take the predicted results of the hydrogen leakage flow rate of each base learner and the input of the corresponding validation set as the second training dataset;
[0027] Train the meta-learner using the second training dataset to obtain a hydrogen leakage flow rate prediction model.
[0028] Optionally, constructing a first training dataset and a validation set specifically includes:
[0029] Establish a hydrogen leakage velocity model, a hydrogen initial jet model, a model of the influence of the environment on hydrogen leakage, a hydrogen leakage turbulent diffusion model, and a comprehensive influence model of leakage distance and direction; the model of the influence of the environment on hydrogen leakage includes a wind speed and wind direction influence model and a temperature influence model;
[0030] Based on the hydrogen leakage velocity model, the hydrogen initial jet model, the model of the influence of the environment on hydrogen leakage, and the comprehensive influence model of leakage distance and direction, establish a calculation model for the hydrogen concentration at the monitoring points;
[0031] Use the calculation model for the hydrogen concentration at the monitoring points to determine the hydrogen concentration at each monitoring point, and establish a relationship database between the hydrogen concentration at each monitoring point and the hydrogen leakage flow rate at each leakage port;
[0032] Use Numpy to resample the hydrogen concentration changing with time in the relationship database so that the sampling time interval is consistent with the sampling time interval of the actual hydrogen concentration sensor, and obtain a hydrogen concentration time series;
[0033] Extract features based on the hydrogen concentration time series to obtain candidate features;
[0034] Based on the candidate features, use a correlation feature selection algorithm to obtain key features;
[0035] Normalize the key features to obtain the processed key features, and generate a hydrogen leakage concentration feature dataset;
[0036] Divide the hydrogen leakage concentration feature dataset into a first training dataset and a validation set.
[0037] In a second aspect, the present application provides a hydrogen leakage flow prediction system for a hydrogen refueling station, including:
[0038] A data acquisition module for acquiring the hydrogen concentration value, the hydrogen temperature value in the hydrogen storage system, the ambient temperature value, and the wind direction and wind speed in the target hydrogen refueling station at the position to be predicted;
[0039] A hydrogen leakage flow prediction module for determining the hydrogen leakage flow at the position to be predicted in the target hydrogen refueling station according to the hydrogen concentration value, the hydrogen temperature value in the hydrogen storage system, the ambient temperature value, and the wind direction and wind speed in the hydrogen refueling station, using a hydrogen leakage flow prediction model; wherein, the hydrogen leakage flow prediction model is obtained by training each base learner using the first training dataset and training the meta-learner using the second training dataset; the first training dataset consists of a relational database of the hydrogen concentration at each monitoring point, the relationship between the hydrogen concentration at each monitoring point and the hydrogen leakage flow at each leakage port calculated by a simulation model, and the processed key features; the processed key features are determined based on candidate features and a correlation feature selection algorithm; the candidate features include the maximum leakage concentration value, the wind speed-weighted average leakage concentration, the leakage concentration rising rate, the leakage concentration gradient, the leakage concentration volatility, the leakage concentration dynamic time warping distance, the leakage exposure time, the leakage concentration extreme value index, the spectral energy, and the wavelet energy distribution; the second training dataset consists of the validation dataset and the hydrogen leakage flow prediction results generated by each trained base learner.
[0040] In a third aspect, the present application provides a computer device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the computer program to implement the hydrogen leakage flow prediction method for a hydrogen refueling station described in any one of the above.
[0041] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the hydrogen leakage flow prediction method for a hydrogen refueling station described in any one of the above.
[0042] In a fifth aspect, the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the hydrogen leakage flow prediction method for a hydrogen refueling station described in any one of the above.
[0043] According to the specific embodiments provided in this application, the following technical effects are achieved in this application:
[0044] This application provides a hydrogen leakage flow prediction method, system, device, medium and product for a hydrogen refueling station. The hydrogen concentration value at the position to be predicted in the target hydrogen refueling station, the hydrogen temperature value in the hydrogen storage system, the ambient temperature value, and the wind direction and wind speed in the target hydrogen refueling station are obtained. According to the hydrogen concentration value at the position to be predicted in the target hydrogen refueling station, the hydrogen temperature value in the hydrogen storage system, the ambient temperature value, and the wind direction and wind speed in the hydrogen refueling station, the hydrogen leakage flow at the position to be predicted in the target hydrogen refueling station is determined by using a hydrogen leakage flow prediction model. Among them, the hydrogen leakage flow prediction model is obtained by training each base learner using a first training dataset and training a meta-learner using a second training dataset. The first training dataset consists of a relational database of the hydrogen concentration at each monitoring point calculated by a simulation model, the relationship between the hydrogen concentration at each monitoring point and the hydrogen leakage flow at each leakage port, and the processed key features. The second training dataset consists of a validation dataset and the hydrogen leakage flow prediction results generated by each trained base learner. This application converts the conventional hydrogen leakage concentration detection into the leakage flow prediction of the leakage port, and judges the leakage level based on the leakage flow prediction result. The hydrogen leakage flow prediction model adopted significantly improves the prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0046] Figure 1 It is a flowchart of a hydrogen leakage flow prediction method for a hydrogen refueling station provided in an embodiment of this application;
[0047] Figure 2 It is a schematic diagram of the usage method of a stacked ensemble machine learning model with hydrogen leakage flow classification ability in this application;
[0048] Figure 3 It is a flowchart of the method for converting the hydrogen concentration distribution value collected by a sensor into the hydrogen leakage flow at the leakage port and classifying it by using stacked ensemble machine learning in the hydrogen leakage flow prediction method of this application;
[0049] Figure 4 It is a flowchart of the training of a stacked ensemble machine learning model with hydrogen leakage flow classification ability in this application;
[0050] Figure 5Schematic diagram of a computer device provided by an embodiment of the present application. Detailed implementation manners
[0051] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0052] To make the above objects, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below in conjunction with the accompanying drawings and specific implementation manners.
[0053] The present application provides a method for predicting the hydrogen leakage flow rate in a hydrogen refueling station. This method predicts the hydrogen leakage flow rate at the leakage ports of various components, internal pipelines, and valves in the hydrogen refueling station through the concentration values collected in real time by hydrogen concentration sensors, and then determines the leakage level, providing a guarantee for the safety prevention and control of the hydrogen refueling station.
[0054] In an exemplary embodiment, as Figure 1 shown, a method for predicting the hydrogen leakage flow rate in a hydrogen refueling station is provided, including the following steps:
[0055] S1: Obtain the hydrogen concentration value, the hydrogen temperature value in the hydrogen storage system, the ambient temperature value, and the wind direction and wind speed in the target hydrogen refueling station at the position to be predicted.
[0056] S2: According to the hydrogen concentration value, the hydrogen temperature value in the hydrogen storage system, the ambient temperature value, and the wind direction and wind speed in the target hydrogen refueling station at the position to be predicted, use the hydrogen leakage flow rate prediction model to determine the hydrogen leakage flow rate at the position to be predicted in the target hydrogen refueling station; wherein, the hydrogen leakage flow rate prediction model is obtained by training each base learner using the first training dataset and training the meta-learner using the second training dataset; the first training dataset consists of a relational database of the hydrogen concentration at each monitoring point, the relationship between the hydrogen concentration at each monitoring point and the hydrogen leakage flow rate at each leakage port calculated by the simulation model, and the processed key features; the processed key features are determined based on the candidate features and the correlation feature selection algorithm; the candidate features include the maximum leakage concentration value, the wind speed weighted average leakage concentration, the leakage concentration rising rate, the leakage concentration gradient, the leakage concentration volatility, the leakage concentration dynamic time warping distance, the leakage exposure time, the leakage concentration extreme value index, the spectral energy, and the wavelet energy distribution; the second training dataset consists of the verification dataset and the hydrogen leakage flow rate prediction results generated by each trained base learner.
[0057] As Figure 2As shown in the figure, when the stacked integrated machine learning model (hydrogen leakage flow prediction model) with the ability to classify hydrogen leakage flow is used in this application, corresponding wind direction and wind speed monitors need to be arranged in the hydrogen refueling station. The central control room collects in real time the hydrogen concentration value collected by the hydrogen concentration sensor, the hydrogen temperature value in the hydrogen storage system, the ambient temperature value, and the wind direction and wind speed in the hydrogen refueling station, and inputs the collected data into the trained stacked machine learning model. This model outputs the hydrogen leakage flow by synthesizing the input parameters. When the hydrogen leakage flow ≤ 21 NL / min, it is determined as a minor leakage level; when the hydrogen leakage flow is between 21 - 118 NL / min, it is determined as a medium leakage level; when the hydrogen leakage flow is between 118 - 463 NL / min, it is determined as a severe leakage level; when the hydrogen leakage flow ≥ 463 NL / min, it is determined as an extremely dangerous leakage level.
[0058] As an alternative implementation, it further includes:
[0059] Determine the hydrogen leakage level according to the hydrogen leakage flow at the position to be predicted in the target hydrogen refueling station, specifically including:
[0060] Judge whether the hydrogen leakage flow at the position to be predicted in the target hydrogen refueling station is less than or equal to the first preset value, and obtain the first judgment result.
[0061] If the first judgment result is yes, the hydrogen leakage level is a minor leakage level.
[0062] If the first judgment result is no, then judge whether the hydrogen leakage flow at the position to be predicted in the target hydrogen refueling station is less than the second preset value, and obtain the second judgment result; the second preset value is greater than the first preset value.
[0063] If the second judgment result is yes, the hydrogen leakage level is a medium leakage level.
[0064] If the second judgment result is no, then judge whether the hydrogen leakage flow at the position to be predicted in the target hydrogen refueling station is less than the third preset value, and obtain the third judgment result; the third preset value is greater than the second preset value.
[0065] If the third judgment result is yes, the hydrogen leakage level is a severe leakage level.
[0066] If the third judgment result is no, the hydrogen leakage level is an extremely dangerous leakage level.
[0067] In this embodiment, the first preset value is 21 NL / min; the second preset value is 118 NL / min; the third preset value is 463 NL / min.
[0068] As an alternative implementation, the base learner includes a random forest model, a support vector machine model, a multi-layer perceptron model, a K-nearest neighbor model, a decision tree model, and a naive Bayes model.
[0069] As an alternative implementation, as Figure 3 shown, the first training dataset is used to train each base learner respectively, and the second training dataset is used to train the meta-learner, specifically including:
[0070] Step 1: Construct the first training dataset and the validation set.
[0071] As an alternative implementation, as Figure 4 shown, Step 1 specifically includes:
[0072] Step 11: Establish a hydrogen leakage velocity model, a hydrogen initial jet model, an environmental impact model on hydrogen leakage, a hydrogen leakage turbulent diffusion model, and a comprehensive impact model of leakage distance and direction; the environmental impact model on hydrogen leakage includes a wind speed and wind direction impact model and a temperature impact model.
[0073] In practical applications, during actual hydrogen leakage in a hydrogen refueling station, the diffusion concentration of hydrogen is easily affected by various factors such as hydrogen release rate, leakage location, leakage direction, environmental wind speed, environmental temperature, and hydrogen temperature in the hydrogen supply system. In fluid mechanics software, import the three-dimensional models of each system and component of the actual or scaled hydrogen refueling station. To truly simulate the leakage situation of the hydrogen refueling station in different complex environments and also to obtain the concentration distribution around the hydrogen concentration sensor during actual hydrogen leakage in the hydrogen refueling station. It is necessary to simulate and calculate the hydrogen leakage situation of the hydrogen refueling station, covering key components such as long tube trailers, unloading cabinets, compressors, sequential control cabinets, hydrogen storage bottle groups, and hydrogen dispensers, as well as their internal pipelines and valves. First, consider different leakage locations, which may include areas prone to leakage such as equipment connection points, pipe joints, and valves. Then, at each leakage location, further analyze different hydrogen release rates and leakage directions, which determine the initial diffusion form and velocity of hydrogen. Next, different environmental conditions need to be considered, including environmental wind speed and wind direction, which will significantly affect the diffusion path of hydrogen in the air. In addition, environmental temperature and the temperature of hydrogen in the hydrogen supply system will also affect the diffusion speed and range of hydrogen. In fluid mechanics software, incorporate the above factors into the simulation calculation, and use the location in the three-dimensional model of the hydrogen refueling station that is the same as the installation location of the actual hydrogen concentration sensor in the hydrogen refueling station as the monitoring point to generate a database of the relationship between the concentration distribution values around the monitoring point and the hydrogen flow rate at the leakage ports of the station internal components.
[0074] For the factors considered in the above-mentioned hydrogen refueling station leakage, a mathematical model needs to be established to calculate the diffusion process of hydrogen leakage from each component of the hydrogen refueling station, and then calculate the hydrogen concentration value at the monitoring point. The following is the mathematical model of the considered factors:
[0075] (1) Hydrogen leakage rate model:
[0076]
[0077] Among them, is the leakage rate when leakage occurs in each component of the hydrogen refueling station; C d is the flow coefficient of the leakage orifice; A is the cross-sectional area of the leakage orifice. ΔP(t) is the hydrogen pressure difference between the inside and outside of the hydrogen refueling station component; ρ(t) is the density of hydrogen; θ is the angle between the leakage direction and the normal direction of the leakage orifice. cos(θ) represents the correction of the leakage direction to the leakage rate, considering the angular relationship between the leakage direction and the position of the leakage orifice.
[0078]
[0079] Among them, is the leakage velocity vector at time t; is the unit vector in the leakage direction, representing the leakage direction.
[0080] (2) Hydrogen initial jet model:
[0081]
[0082] Among them, C(x, y, z, t) is the hydrogen concentration at the position (x, y, z) at time t; D t is the effective diffusion coefficient of hydrogen; (x0, y0, z0) is the initial position of the leakage point in the leakage direction ;
[0083] (3) Model of the influence of the environment on hydrogen leakage:
[0084] ① Wind speed and wind direction influence model:
[0085]
[0086] Among them, U is the wind speed; H is the leakage height; σ y , σ z are the lateral diffusion coefficient and the vertical diffusion coefficient, which are related to the degree of turbulence.
[0087] ② Temperature influence model:
[0088]
[0089] Among them, D t is the effective diffusion coefficient of hydrogen; Dt0 is the diffusion coefficient of hydrogen under standard conditions; T0 is the standard ambient temperature; P0 is the standard ambient pressure; α and β are empirical coefficients; T env is the ambient temperature; P env is the hydrogen temperature.
[0090] (4) Hydrogen leakage turbulent diffusion model:
[0091]
[0092] where is the ambient wind speed vector; v t is the turbulent diffusion coefficient, representing the contribution of turbulence to the diffusion of hydrogen.
[0093] (5) Comprehensive influence model of leakage distance and direction:
[0094]
[0095] where is the component of the hydrogen leakage velocity in the x-axis direction; is the component of the hydrogen leakage velocity in the y-axis direction; is the component of the hydrogen leakage velocity in the z-axis direction.
[0096] Step 12: Establish a calculation model for the hydrogen concentration at the monitoring points based on the hydrogen leakage velocity model, the initial hydrogen jet model, the model of the influence of the environment on hydrogen leakage, and the comprehensive influence model of leakage distance and direction.
[0097] In practical applications, the calculation model for the hydrogen concentration at the monitoring points is:
[0098]
[0099] Step 13: Determine the hydrogen concentration at each monitoring point using the calculation model for the hydrogen concentration at the monitoring points, and establish a relational database between the hydrogen concentration at the monitoring points and the hydrogen leakage flow rate at each leakage port.
[0100] In practical applications, a relational database between the hydrogen concentration value around the hydrogen concentration sensor and the hydrogen leakage flow rate at the leakage ports of each component in the station is obtained through calculation.
[0101] Step 14: Use Numpy to resample the hydrogen concentration that changes with time in the relational database to obtain a time series of hydrogen concentration.
[0102] In practical applications, to ensure the accuracy of the above simulation calculation results, the time step is set to be small during the simulation calculation. Therefore, it is necessary to use Numpy to resample the hydrogen leakage concentration that changes with time in this database so that the sampling time interval is consistent with the sampling time interval of the actual hydrogen concentration sensor.
[0103] Step 15: Extract features based on the hydrogen concentration time series to obtain candidate features.
[0104] In practical applications, when extracting features from the hydrogen concentration time series, the following are the features to be extracted and their corresponding formulas:
[0105] (1) Maximum leakage concentration value.
[0106] C max = max(C(t)).
[0107] Where C(t) is the hydrogen concentration varying with time.
[0108] (2) Wind speed weighted average leakage concentration.
[0109]
[0110] Where U(t) is the wind speed varying with time, t initial is the initial leakage time; t end is the end leakage time.
[0111] (3) Leakage concentration rising rate.
[0112]
[0113] Where C initial is the concentration at the initial stage of leakage, t peak is the time when the hydrogen concentration reaches the peak, t initial is the initial time of the hydrogen concentration.
[0114] (4) Leakage concentration gradient.
[0115]
[0116] (5) Leakage concentration volatility.
[0117]
[0118] Where C is the average value representing the hydrogen concentration, and it is the average concentration in the time interval [t end , t initial .
[0119] (6) Leakage concentration dynamic time warping distance.
[0120]
[0121] Among them, C1 and C2 represent two hydrogen concentration time series, which are usually used to compare two different concentration change processes; i and j respectively represent specific time points in the two hydrogen concentration time series C1 and C2; n is the length of the hydrogen concentration time series; C1(i) represents the concentration value of the hydrogen concentration time series C1 at the i-th time point; C2(j) represents the concentration value of the hydrogen concentration time series C2 at the j-th time point.
[0122] (7) Leak exposure time.
[0123]
[0124] Among them, C threshold is the threshold value of hydrogen concentration, that is, a set concentration standard or critical value. When the hydrogen concentration C(t) exceeds this threshold value C threshold , it will be calculated as part of the exposure time.
[0125] (8) Leak concentration extreme value index.
[0126]
[0127] Among them, k is the number of samples used to calculate the extreme value index, usually the number of extreme values with the top rankings; X (n-i+1) is the (n - i + 1)-th largest concentration value, arranged in descending order; X (n-k) is the (n - k)-th largest concentration value, that is, the k-th largest concentration value with the top rankings.
[0128] (9) Spectrum energy.
[0129]
[0130] Among them, C(f) is the frequency domain representation after Fourier transform, and f1 and f2 are the frequency ranges.
[0131] (10) Wavelet energy distribution.
[0132]
[0133] Among them, a and b are the scale and translation factors respectively, is the mother wavelet function.
[0134] Step 16: Based on the candidate features, use the correlation feature selection algorithm to obtain the key features.
[0135] Step 17: Normalize the key features to obtain the processed key features and generate a hydrogen leak concentration feature dataset.
[0136] In practical applications, to reduce the redundancy of the above hydrogen leakage concentration time series features, the Correlation-based Feature Selection (CFS) algorithm is used to evaluate the relationship between the candidate features and the selected feature subset. The selected features should have a high correlation with the target of hydrogen leakage flow rate, while the correlation between the features should be as low as possible. Through this feature selection method, the correlation between the features and the target, as well as the relationship between the features within the feature subset, can be considered simultaneously, so as to effectively reduce the impact of redundant features on the model performance while retaining the key features. The evaluation function is as follows:
[0137]
[0138] where S is the feature subset, containing k features, represents the average correlation between the k features and the target hydrogen leakage flow rate Q(t), so where C i is the i-th feature, and r(C i , Q) is the correlation between the feature C i and the hydrogen leakage flow rate Q. represents the average redundancy between the k features, so where r(C i , C j ) is the correlation between the feature C i and C j . α is a parameter that adjusts the weight of the correlation between each feature and the hydrogen leakage flow rate target; β is a parameter that adjusts the weight of the correlation between each feature.
[0139] Entropy is a measure of the uncertainty of a random variable and can be used to measure the correlation between the above hydrogen leakage concentration features that change over time. Information entropy can reflect the amount of information contained in each of the above features. Therefore, this application uses information entropy to evaluate the features. The calculation formula for the information entropy of the hydrogen leakage in the hydrogen refueling station considering multiple factors is as follows:
[0140]
[0141] where Y is the external environmental conditions, such as wind speed, wind direction, and environmental temperature, etc.; P(y j ) is the probability that Y takes the value y i ; P(x i |y j) is the posterior probability of variable X after a given Y value. Due to the addition of variable Y, the entropy of X decreases. The decrease in the entropy of X reflects the additional information about X provided by variable Y, and this part of the additional information is called information gain. In the concentration distribution of hydrogen leakage, there are high-dimensional features, and some of these features may contain less information, which will affect the classification effect. For feature selection, the greater the amount of information carried by a feature, the greater the corresponding information gain of that feature, and the higher the importance of the feature. The formula for information gain is as follows:
[0142] IG(X|Y) = H(X) - H(X|Y).
[0143] Among them, H(X) is the entropy of random variable X.
[0144] In the CFS algorithm, information entropy and information gain are combined to jointly measure the correlation between features. The specific formula is as follows:
[0145] SU(X,Y) = 2 * [IG(X∣Y) / H(X) + H(Y)].
[0146] Among them, H(Y) is the entropy of random variable Y.
[0147] This formula balances the preference of the information gain algorithm for features with more information content using information entropy and normalizes the final result to the range of 0 to 1.
[0148] Step 18: Divide the hydrogen leakage concentration feature dataset into a first training dataset and a validation set.
[0149] In practical applications, after obtaining the hydrogen leakage concentration feature dataset, the entire feature dataset is further divided into a training set (the first training dataset) and a validation set. Among them, the training set accounts for 70% of the feature dataset and is used for the training of the stacked ensemble machine learning model; after training, appropriate evaluation metrics are used to accurately evaluate the performance of the stacked machine learning model, including accuracy ACC, precision PC, recall RC, and F1 score F1. The formulas are as follows:
[0150]
[0151] Among them, TP is the true positive example; TN is the true negative example; FP is the false positive example; FN is the false negative example.
[0152] In addition, the validation set accounts for 30% and is used to evaluate the performance of the stacked ensemble machine learning model. The stacked ensemble machine learning model is optimized based on the evaluation metric results of the prediction results. At this time, the stacked ensemble machine learning model already has high prediction accuracy and generalization ability for hydrogen flow rate, and can predict the hydrogen leakage flow rate at hydrogen refueling station components, pipelines, and valves, and judge the leakage level based on the size of the leakage flow rate.
[0153] Step 2: Use the first training dataset to train each base learner to obtain the trained base learners.
[0154] Step 3: Input the validation set into each of the trained base learners to obtain the hydrogen leakage flow prediction results of the base learners.
[0155] Step 4: Take the hydrogen leakage flow prediction results of each base learner and the inputs of the corresponding validation set as the second training dataset.
[0156] Step 5: Use the second training dataset to train the meta-learner to obtain the hydrogen leakage flow prediction model.
[0157] In practical applications, the training process of the stacked ensemble machine learning model with the ability to classify hydrogen leakage flow in this application is as follows: First, divide the hydrogen leakage concentration feature dataset into a training set and a validation set. The training set is used to train the base learners in the stacked ensemble machine learning model, and the validation set is used to generate the hydrogen leakage flow prediction results of the base learners. Second, according to the prediction performance of a single algorithm and the correlation between algorithms, select algorithms with lower correlation as the respective base learners in the stacked ensemble machine learning model. The Pearson correlation coefficient can be used to measure the correlation between algorithms. The value range of the Pearson correlation coefficient is [-1, 1], and the closer the absolute value is to 0, the smaller the correlation. The expression of the Pearson correlation coefficient is:
[0158]
[0159] In the formula, x and y are the average values of the elements in each vector respectively.
[0160] In this application, the base learners select the Random Forest model (RF model), Support Vector Machine model (SVM model), Multilayer Perceptron model (MLP model), k-Nearest Neighbor model (KNN model), Decision Tree model (DT model), and Naive Bayes model (NB model). Again, each base learner is trained in parallel using different hydrogen leakage concentration feature datasets, thereby obtaining six different prediction results for hydrogen leakage flow rates, such as Hydrogen Leakage Flow Rate Prediction Result 1, Hydrogen Leakage Flow Rate Prediction Result 2, Hydrogen Leakage Flow Rate Prediction Result 3, Hydrogen Leakage Flow Rate Prediction Result 4, Hydrogen Leakage Flow Rate Prediction Result 5, and Hydrogen Leakage Flow Rate Prediction Result 6. Finally, these prediction results are combined into a new dataset, and then these new datasets are used as the input of the meta-learner to train a stacked ensemble machine learning model with the ability to classify hydrogen leakage flow rates.
[0161] Compared with the traditional method of using a hydrogen sensor to detect the leakage concentration and issue an alarm, the hydrogen leakage flow rate prediction method of this application can predict the leakage flow rate at the leakage port before reaching the sensor alarm threshold.
[0162] The hydrogen leakage flow rate prediction method of this application for a hydrogen refueling station takes into account the influence of various factors such as environmental wind speed, wind direction, temperature, the temperature of hydrogen itself, and the leakage location, and can ensure an accurate reflection of the overall hydrogen leakage situation at the hydrogen refueling station in a complex environment.
[0163] The hydrogen leakage flow rate prediction method of this application for a hydrogen refueling station can classify hydrogen leakage flow rates at different levels. This prediction method can not only distinguish between "leakage" and "no leakage", but also determine the severity of the leakage, providing more detailed information for further processing and response strategies.
[0164] Based on the same inventive concept, the embodiments of this application also provide a hydrogen leakage flow rate prediction system for a hydrogen refueling station. The implementation solution provided by this system to solve the problem is similar to the implementation solution described in the above method. Therefore, the specific limitations in the embodiments of the hydrogen leakage flow rate prediction system for a hydrogen refueling station provided below can refer to the limitations on the hydrogen leakage flow rate prediction method in the above text, and will not be repeated here.
[0165] In an exemplary embodiment, a hydrogen leakage flow rate prediction system for a hydrogen refueling station is provided, including:
[0166] A data acquisition module, configured to acquire the hydrogen concentration value at the to-be-predicted position of the target hydrogen refueling station, the hydrogen temperature value in the hydrogen storage system, the ambient temperature value, and the wind direction and wind speed in the target hydrogen refueling station.
[0167] A hydrogen leakage flow prediction module, configured to determine the hydrogen leakage flow at the to-be-predicted position of the target hydrogen refueling station according to the hydrogen concentration value at the to-be-predicted position of the target hydrogen refueling station, the hydrogen temperature value in the hydrogen storage system, the ambient temperature value, and the wind direction and wind speed in the hydrogen refueling station, by using a hydrogen leakage flow prediction model; wherein, the hydrogen leakage flow prediction model is obtained by training each base learner using a first training data set and training a meta-learner using a second training data set; the first training data set consists of a relational database of the hydrogen concentration at each monitoring point, the relationship between the hydrogen concentration at each monitoring point and the hydrogen leakage flow at each leakage port calculated by a simulation model, and processed key features; the processed key features are determined based on candidate features and a correlation feature selection algorithm; the candidate features include the maximum leakage concentration value, the wind speed-weighted average leakage concentration, the leakage concentration rising rate, the leakage concentration gradient, the leakage concentration volatility, the leakage concentration dynamic time warping distance, the leakage exposure time, the leakage concentration extreme value index, the spectral energy, and the wavelet energy distribution; the second training data set consists of a validation data set and the hydrogen leakage flow prediction results generated by each trained base learner.
[0168] In an exemplary embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the above-mentioned hydrogen refueling station hydrogen leakage flow prediction method is implemented.
[0169] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the above-mentioned hydrogen refueling station hydrogen leakage flow prediction method is implemented.
[0170] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the above-mentioned hydrogen refueling station hydrogen leakage flow prediction method is implemented.
[0171] In an exemplary embodiment, a computer device is provided. The computer device can be a server or a terminal, and its internal structure diagram can be as Figure 5As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a method for predicting the hydrogen leakage flow rate of a hydrogen refueling station.
[0172] Those skilled in the art can understand that Figure 5 the structure shown in is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0173] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.
[0174] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0175] The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0176] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0177] In this article, specific examples are used to elaborate on the principles and implementation manners of the present application. The descriptions of the above embodiments are only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. A method for predicting hydrogen leakage flow at a hydrogen refueling station, characterized in that: include: Obtain the hydrogen concentration value at the target hydrogen refueling station to be predicted, the hydrogen temperature value in the hydrogen storage system, the ambient temperature value, and the wind direction and wind speed in the target hydrogen refueling station; According to the hydrogen concentration value of the target hydrogen refueling station to be predicted, the hydrogen temperature value in the hydrogen storage system, the ambient temperature value and the wind direction and wind speed in the hydrogen refueling station, the hydrogen leakage flow prediction model is used to determine the hydrogen leakage flow at the target hydrogen refueling station to be predicted. The hydrogen leakage flow prediction model is obtained by training each base learner separately using the first training data set and training the meta learner using the second training data set. The first training data set is composed of a relational database of hydrogen concentrations at each monitoring point, hydrogen concentrations at each monitoring point and hydrogen leakage flow at each leakage port calculated by the simulation model, and processed key features. The processed key features are determined based on candidate features and correlation feature selection algorithms. The candidate features include the maximum leakage concentration value, wind speed weighted average leakage concentration, leakage concentration rising rate, leakage concentration gradient, leakage concentration volatility, leakage concentration dynamic time warping distance, leakage exposure time, leakage concentration extreme value index, spectrum energy and wavelet energy distribution. The second training data set is composed of the validation data set and the hydrogen leakage flow prediction results generated by each trained base learner.
2. The method for predicting hydrogen leakage flow rate of a hydrogen refueling station according to claim 1, characterized in that: Also includes: The hydrogen leakage level is determined based on the hydrogen leakage flow at the predicted location of the target hydrogen refueling station.
3. The method for predicting hydrogen leakage flow rate of a hydrogen refueling station according to claim 2, characterized in that: According to the hydrogen leakage flow rate at the target hydrogen refueling station to be predicted, the hydrogen leakage level is determined, including: Determine whether the hydrogen leakage flow rate at the predicted position of the target hydrogen refueling station is less than or equal to a first preset value, and obtain a first determination result; If the first judgment result is yes, the hydrogen leakage level is a slight leakage level; If the first judgment result is no, then judging whether the hydrogen leakage flow rate at the predicted position of the target hydrogen refueling station is less than a second preset value, and obtaining a second judgment result; the second preset value is greater than the first preset value; If the second judgment result is yes, the hydrogen leakage level is a medium leakage level; If the second judgment result is no, then judging whether the hydrogen leakage flow rate at the predicted position of the target hydrogen refueling station is less than a third preset value, and obtaining a third judgment result; the third preset value is greater than the second preset value; If the third judgment result is yes, the hydrogen leakage level is a serious leakage level; If the third judgment result is no, the hydrogen leakage level is an extremely dangerous leakage level.
4. The method for predicting hydrogen leakage flow rate at a hydrogen refueling station according to claim 1, characterized in that: The base learners include a random forest model, a support vector machine model, a multi-layer perceptron model, a K nearest neighbor model, a decision tree model and a naive Bayes model.
5. The method for predicting hydrogen leakage flow rate of a hydrogen refueling station according to claim 4, characterized in that: Using the first training data set to train each base learner respectively, and using the second training data set to train the meta learner, specifically includes: Construct the first training data set and validation set; Using the first training data set to train each base learner respectively, to obtain a trained base learner; The validation set is input into each trained base learner to obtain the hydrogen leakage flow prediction result of the base learner; The hydrogen leakage flow prediction results of each base learner and the corresponding validation set input are used as the second training data set; The meta-learner is trained using the second training data set to obtain a hydrogen leakage flow prediction model.
6. The method for predicting hydrogen leakage flow rate at a hydrogen refueling station according to claim 5, characterized in that: Construct the first training data set and validation set, specifically including: Establish hydrogen leakage velocity model, hydrogen initial jet model, environment impact model on hydrogen leakage, hydrogen leakage turbulence diffusion model and leakage distance and direction comprehensive impact model; environment impact model on hydrogen leakage includes wind speed and wind direction impact model and temperature impact model; A hydrogen concentration calculation model for monitoring points is established based on the hydrogen leakage velocity model, hydrogen initial jet model, environment impact model on hydrogen leakage, and leakage distance and direction comprehensive impact model; The hydrogen concentration at each monitoring point is determined using the hydrogen concentration calculation model at the monitoring point, and a relationship database between the hydrogen concentration at each monitoring point and the hydrogen leakage flow at each leakage port is established; Numpy is used to resample the hydrogen concentration that changes with time in the relational database so that the sampling time interval is consistent with the sampling time interval of the actual hydrogen concentration sensor to obtain the hydrogen concentration time series; Feature extraction is performed based on the hydrogen concentration time series to obtain candidate features; Based on the candidate features, the key features are obtained by using the correlation feature selection algorithm; Normalizing the key features to obtain processed key features and generating a hydrogen leakage concentration feature data set; The hydrogen leakage concentration feature dataset is divided into a first training dataset and a validation set.
7. A hydrogen leakage flow prediction system for a hydrogen refueling station, characterized in that: include: A data acquisition module is used to obtain the hydrogen concentration value of the target hydrogen refueling station to be predicted, the hydrogen temperature value in the hydrogen storage system, the ambient temperature value, and the wind direction and wind speed in the target hydrogen refueling station; A hydrogen leakage flow prediction module is used to determine the hydrogen leakage flow at the target hydrogen refueling station to be predicted based on the hydrogen concentration value at the target hydrogen refueling station to be predicted, the hydrogen temperature value in the hydrogen storage system, the ambient temperature value and the wind direction and wind speed in the hydrogen refueling station, using a hydrogen leakage flow prediction model; wherein the hydrogen leakage flow prediction model is obtained by training each base learner separately using a first training data set and training a meta learner using a second training data set; the first training data set is composed of a relational database of hydrogen concentrations at each monitoring point, hydrogen concentrations at each monitoring point and hydrogen leakage flow at each leakage port calculated by a simulation model, and processed key features; the processed key features are determined based on candidate features and correlation feature selection algorithms; the candidate features include maximum leakage concentration value, wind speed weighted average leakage concentration, leakage concentration rising rate, leakage concentration gradient, leakage concentration volatility, leakage concentration dynamic time warping distance, leakage exposure time, leakage concentration extreme value index, spectrum energy and wavelet energy distribution; the second training data set is composed of a validation data set and hydrogen leakage flow prediction results generated by each trained base learner.
8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for predicting hydrogen leakage flow of a hydrogen refueling station according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for predicting hydrogen leakage flow rate of a hydrogen refueling station described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for predicting hydrogen leakage flow rate of a hydrogen refueling station described in any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Hydrogen leakage detection system and method applied to water electrolysis hydrogen production system
CN120846588A