Hydrogen leakage concentration prediction method and device, terminal equipment and storage medium
By combining CFD simulation and neural network with POD reconstruction technology, the problems of slow prediction speed and low accuracy in hydrogen leakage and diffusion research were solved, and efficient and accurate prediction of hydrogen leakage concentration distribution field was achieved.
Patent Information
- Application Number
- CN202510893474.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-10-10
AI Technical Summary
Existing technologies in hydrogen leakage and diffusion research have high safety risks, great measurement difficulty, expensive experimental costs and complex environmental control. Traditional electrochemical sensors have slow response rates and cannot measure with high precision. CFD simulations take a long time and require large computing resources, making it impossible to accurately predict the hydrogen leakage concentration distribution field.
Through CFD simulation, an operating condition data set is constructed to obtain the coefficient matrices corresponding to multiple operating conditions and perform linear interpolation. The coefficient matrix is corrected using a neural network and combined with POD reconstruction technology to generate the hydrogen leakage concentration distribution field.
It achieves efficient and accurate prediction of hydrogen leakage concentration distribution field, reduces the learning complexity of neural networks, improves prediction accuracy and speed, and can perform hydrogen concentration analysis in unknown areas.
Smart Images

Figure CN120764432A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of energy leakage prediction, and in particular to a method, device, terminal equipment and storage medium for predicting hydrogen leakage concentration. Background Art
[0002] As one of the most promising clean energy sources, hydrogen has applications in a number of key sectors, including energy, transportation, industry, and construction. Since hydrogen has extremely low ignition energy and a wide explosion limit, it is extremely important to conduct research on hydrogen leakage and diffusion. Research on hydrogen leakage and diffusion faces many challenges, mainly due to factors such as high safety risks, difficulty in measurement, high experimental costs, and complex environmental control. In addition, traditional electrochemical sensors have a slow response rate, and the rapid diffusion characteristics of hydrogen make it difficult for traditional electrochemical sensors to measure high-precision concentration fields. Computational fluid dynamics (CFD) has performed well in the study of simulating hydrogen leakage and diffusion, but it has the disadvantages of long simulation time and high computing resource requirements. At the same time, traditional hydrogen leakage concentration prediction models built based on CFD data can only make time-series predictions for sensor data at a few known points, and are unable to perform concentration analysis in the surrounding area or have large errors in hydrogen concentration predictions at distant locations. Summary of the Invention
[0003] The present invention provides a hydrogen leakage concentration prediction method, device, terminal equipment and storage medium, which can efficiently and accurately predict the hydrogen leakage concentration distribution field.
[0004] An embodiment of the present invention provides a method for predicting hydrogen leakage concentration, comprising:
[0005] Obtaining a plurality of second coefficient matrices corresponding to a plurality of second operating conditions from a preset operating condition data set, and performing linear interpolation on the plurality of second coefficient matrices to obtain a third coefficient matrix; wherein parameters of the plurality of second operating conditions are close to parameters of the first operating condition, the operating condition parameters including wind speed and hydrogen leakage intensity, and each operating condition corresponds to a coefficient matrix;
[0006] Inputting the third coefficient matrix into a preset neural network to perform correction amount prediction to obtain a coefficient matrix correction amount, and correcting the third coefficient matrix according to the coefficient matrix correction amount to generate a first coefficient matrix;
[0007] POD reconstruction is performed based on the first coefficient matrix to obtain a hydrogen leakage concentration distribution field corresponding to the first operating condition.
[0008] The embodiment of the present invention uses operating condition parameters to obtain the coefficient matrix corresponding to the adjacent known operating conditions of the unknown operating condition, and estimates the coefficient matrix of the unknown operating condition through linear interpolation, which can reduce the learning complexity of the subsequent neural network. The neural network performs fine-grained correction of the error between the linear interpolation result and the true coefficient matrix, which can obtain a more accurate coefficient matrix prediction result. The predicted coefficient matrix is reconstructed by POD with a pre-calculated global modal matrix to obtain a predicted hydrogen leakage concentration distribution field. Compared with the existing technology that has slow prediction speed and can only predict based on sensor data of known points, the present application can efficiently and accurately predict the hydrogen leakage concentration distribution field.
[0009] Furthermore, before obtaining a plurality of second coefficient matrices corresponding to a plurality of second operating conditions from a preset operating condition data set, the method further includes:
[0010] An operating condition data set is constructed through CFD simulation; wherein, the operating condition data set includes n×m second coefficient matrices corresponding to the second operating conditions, n is the number of wind speed gradients, and m is the number of hydrogen leakage intensity gradients.
[0011] The embodiment of the present invention constructs an operating condition data set through CFD simulation, providing a data basis for subsequent prediction of the coefficient matrix.
[0012] Furthermore, the construction of the operating condition data set through CFD simulation includes:
[0013] Build a physical model of hydrogen vehicles;
[0014] Based on the hydrogen vehicle physical model, CFD simulations are performed for n×m second operating conditions in a preset area to obtain hydrogen leakage concentration distribution fields corresponding to the n×m second operating conditions in the area;
[0015] Performing POD decomposition on the hydrogen leakage concentration distribution fields corresponding to the n×m second operating conditions to obtain a global modal matrix and a second coefficient matrix corresponding to the n×m second operating conditions;
[0016] Taking one of the second coefficient matrices as a sample, a working condition data set containing n×m samples is constructed; wherein the label of the sample is the parameter of the second working condition corresponding to the second coefficient matrix.
[0017] In the embodiment of the present invention, the hydrogen leakage concentration distribution field corresponding to different working conditions is obtained through CFD simulation, and the global modal matrix and coefficient matrices corresponding to different working conditions are obtained through POD decomposition, providing a data basis for constructing the working condition data set.
[0018] Furthermore, the modifying the third coefficient matrix according to the coefficient matrix modification amount includes:
[0019] The coefficient matrix correction quantity is added to the third coefficient matrix to generate a first coefficient matrix, specifically:
[0020]
[0021] Wherein, The first coefficient matrix is A0; the third coefficient matrix is ΔA; and the coefficient matrix correction quantity is A0.
[0022] The coefficient matrix correction quantity predicted by the neural network is used to correct the coefficient matrix estimated by linear interpolation, so that a more accurate coefficient matrix prediction result can be obtained.
[0023] Further, the POD reconstruction based on the first coefficient matrix comprises:
[0024] The first coefficient matrix is multiplied by the global modal matrix to obtain a hydrogen leakage concentration distribution field corresponding to the first working condition, specifically:
[0025]
[0026] Wherein, X is the hydrogen leakage concentration distribution field corresponding to the first working condition; and Φ is the global modal matrix. The first coefficient matrix is A0.
[0027] The POD reconstruction is performed on the predicted coefficient matrix and the pre-calculated global modal matrix, so that a predicted hydrogen leakage concentration distribution field can be obtained.
[0028] Further, before the third coefficient matrix is input into the preset neural network for correction quantity prediction, the method further comprises:
[0029] The neural network is trained based on the working condition data set; wherein, the neural network comprises an input layer, a first hidden layer, a second hidden layer and an output layer; and the loss function used in the training is the mean square error between the original hydrogen leakage concentration distribution field and the reconstructed hydrogen leakage concentration distribution field, specifically:
[0030]
[0031] Wherein, The mean square error is E; the number of working conditions is N; and X (i) The original hydrogen leakage concentration distribution field corresponding to the i th working condition is Xi; The reconstructed hydrogen leakage concentration distribution field corresponding to the i th working condition is Xi.
[0032] The neural network is trained based on the working condition data set, so as to provide a model basis for subsequent prediction of the coefficient matrix.
[0033] Furthermore, before inputting the third coefficient matrix into a preset neural network for correction amount prediction, the method further includes:
[0034] Each element in the third coefficient matrix is scaled, specifically:
[0035]
[0036] in, is the scaled element; a ij is an element in the third coefficient matrix; max is the largest element in the third coefficient matrix; min is the minimum element in the third coefficient matrix.
[0037] The embodiment of the present invention can improve the efficiency of neural network prediction by scaling each element in the coefficient matrix.
[0038] Another embodiment of the present invention further provides a hydrogen leakage concentration prediction device, comprising: a linear interpolation module, a neural network module and a POD reconstruction module;
[0039] The linear interpolation module is configured to obtain a plurality of second coefficient matrices corresponding to a plurality of second operating conditions from a preset operating condition data set, and perform linear interpolation on the plurality of second coefficient matrices to obtain a third coefficient matrix; wherein the parameters of the plurality of second operating conditions are close to the parameters of the first operating condition, the operating condition parameters include wind speed and hydrogen leakage intensity, and each operating condition corresponds to a coefficient matrix;
[0040] The neural network module is configured to input the third coefficient matrix into a preset neural network to perform correction amount prediction to obtain a coefficient matrix correction amount, and to correct the third coefficient matrix according to the coefficient matrix correction amount to generate a first coefficient matrix;
[0041] The POD reconstruction module is used to perform POD reconstruction based on the first coefficient matrix to obtain the hydrogen leakage concentration distribution field corresponding to the first operating condition.
[0042] Another embodiment of the present invention further provides a terminal device, comprising: a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the steps of a hydrogen leakage concentration prediction method of the present invention are implemented.
[0043] Another embodiment of the present invention further provides a computer-readable storage medium item, comprising: a stored computer program, which controls the device where the computer-readable storage medium is located to execute the steps of a hydrogen leakage concentration prediction method of the present invention when the computer program is executed. BRIEF DESCRIPTION OF DRAWINGS
[0044] Figure 1 A flowchart of an embodiment of the hydrogen leakage concentration prediction method provided by the present application;
[0045] Figure 2 A structural diagram of an embodiment of the neural network provided by the present application;
[0046] Figure 3 A structural diagram of an embodiment of the hydrogen vehicle physical model provided by the present application;
[0047] Figure 4 A flowchart of an embodiment of the hydrogen leakage concentration prediction system provided by the present application;
[0048] Figure 5 A structural diagram of an embodiment of the hydrogen leakage concentration prediction device provided by the present application. DETAILED DESCRIPTION
[0049] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely below with reference to the 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 of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without any creative work fall within the scope of protection of the present application.
[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs; the terms used herein are only for the purpose of describing specific embodiments of the present application, and are not intended to limit the present application; the terms “include” and “have” and any variations thereof in the specification and claims of the present application and the above description of drawings are intended to cover the non-exclusive inclusion.
[0051] In the description of the embodiments of the present application, the technical terms “first”, “second”, etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of “a plurality of” is two or more, unless otherwise explicitly and specifically limited.
[0052] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0053] In the description of the embodiments of this application, the term "and / or" is simply a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent the following three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.
[0054] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).
[0055] See also Figure 1 To solve the problem in the prior art that the prediction speed is slow and the prediction can only be performed based on sensor data of known points, an embodiment of the present invention provides a method for predicting hydrogen leakage concentration, including steps S101 to S103:
[0056] Step S101: obtain multiple second coefficient matrices corresponding to multiple second operating conditions in a preset operating condition data set, and perform linear interpolation on the multiple second coefficient matrices to obtain a third coefficient matrix; wherein the parameters of the multiple second operating conditions are close to the parameters of the first operating condition, and the parameters of the operating condition include wind speed and hydrogen leakage intensity, and each operating condition corresponds to a coefficient matrix.
[0057] Specifically, the hydrogen leakage concentration distribution field corresponding to the first operating condition is unknown. It is necessary to first obtain the first coefficient matrix corresponding to the first operating condition, and then reconstruct the hydrogen leakage concentration distribution field through POD. The first coefficient matrix corresponding to the first operating condition can be obtained by linear interpolation of the coefficient matrices of adjacent operating conditions, where the coefficient matrix is used to characterize the wind speed and hydrogen leakage intensity of the operating condition. A distance-based adjacent operating condition selection strategy can be adopted to calculate the Euclidean distance between the wind speed and hydrogen leakage intensity of each second operating condition in the preset operating condition data set and the wind speed and hydrogen leakage intensity of the first operating condition. When the Euclidean distance is less than a preset threshold, the second operating condition corresponding to the Euclidean distance is considered to be an adjacent operating condition of the first operating condition. Based on the local linear properties of parameters in physical space, multiple second coefficient matrices corresponding to multiple adjacent second operating conditions are linearly interpolated to generate a predicted value of the first coefficient matrix corresponding to the first operating condition.
[0058] Step S102, input the third coefficient matrix to a preset neural network to perform correction amount prediction, obtain a coefficient matrix correction amount, and correct the third coefficient matrix according to the coefficient matrix correction amount to generate a first coefficient matrix.
[0059] Specifically, the predicted value of the first coefficient matrix obtained by linear interpolation has an error, in order to further improve the prediction accuracy, a neural network can be introduced for error correction. Figure 2 As shown in the figure, the neural network is a structured fully connected neural network, including an input layer, a first hidden layer, a second hidden layer and an output layer; the dimension of the input layer is equal to the length of the coefficient matrix; the first hidden layer is a fully connected layer, the number of nodes is 128, since the concentration cannot be negative, and the scalar such as velocity should follow the Fick's law and N-S equation, therefore, the ReLU activation function is added; the number of nodes of the second hidden layer is 64, and the ReLU activation function is also added; the dimension of the output layer is the same as that of the input layer, which is used to output the coefficient matrix representation of the correction amount, and linear activation is adopted.
[0060] Step S103, performing POD reconstruction based on the first coefficient matrix to obtain a hydrogen leakage concentration distribution field corresponding to the first working condition.
[0061] Specifically, proper orthogonal decomposition (POD) is a data dimensionality reduction method based on eigen decomposition of data covariance matrix, and singular value decomposition (SVD) is the most commonly used numerical implementation tool in POD decomposition; according to the hydrogen leakage concentration distribution field corresponding to the working condition, a snapshot matrix can be constructed, and SVD decomposition can be performed on the snapshot matrix to obtain a global modal matrix and a coefficient matrix corresponding to the working condition; by performing POD reconstruction through the global modal matrix and the coefficient matrix, the hydrogen leakage concentration distribution field can be generated.
[0062] The embodiment of the application can obtain the coefficient matrix corresponding to the known working condition adjacent to the unknown working condition through the working condition parameters, and estimate the coefficient matrix of the unknown working condition through the linear interpolation method, which can reduce the learning complexity of the subsequent neural network; the neural network can perform fine-grained correction on the error between the linear interpolation result and the real coefficient matrix, which can obtain more accurate coefficient matrix prediction result; by performing POD reconstruction through the predicted coefficient matrix and the pre-calculated global modal matrix, the predicted hydrogen leakage concentration distribution field can be obtained. Compared with the existing prediction speed slow and only according to the sensor data of the known point for prediction problem, the application can efficiently and accurately predict the hydrogen leakage concentration distribution field.
[0063] Optionally, in an embodiment of the present invention, obtaining a plurality of second coefficient matrices corresponding to a plurality of second operating conditions from a preset operating condition data set further includes:
[0064] An operating condition data set is constructed through CFD simulation; wherein, the operating condition data set includes n×m second coefficient matrices corresponding to the second operating conditions, n is the number of wind speed gradients, and m is the number of hydrogen leakage intensity gradients.
[0065] Specifically, the wind speed can be set to 10 gradients (such as 1 to 10 m / s, with a step size of 1 m / s), corresponding to the natural ventilation and forced ventilation scenarios of the parking lot, with a velocity inlet as the inlet and a pressure outlet as the outlet. The hydrogen leakage intensity can be set to 10 gradients (such as 0.1 to 1.0 g / s, with a step size of 0.1 g / s), with the leak port located at a valve of the fuel cell system, using a mass flow inlet. In order to achieve efficient generation and management of operating condition data sets, an area containing the leak point can be delineated to ensure that the high gradient range of hydrogen diffusion is covered, and the three-dimensional coordinates (x, y, z) of all grid points in the area and the concentration data simulated for each operating condition by CFD are derived.
[0066] The embodiment of the present invention constructs an operating condition data set through CFD simulation, providing a data basis for subsequent prediction of the coefficient matrix.
[0067] Optionally, in an embodiment of the present invention, constructing an operating condition data set through CFD simulation includes:
[0068] Build a physical model of hydrogen vehicles;
[0069] Based on the hydrogen vehicle physical model, CFD simulations are performed for n×m second operating conditions in a preset area to obtain hydrogen leakage concentration distribution fields corresponding to the n×m second operating conditions in the area;
[0070] Performing POD decomposition on the hydrogen leakage concentration distribution fields corresponding to the n×m second operating conditions to obtain a global modal matrix and a second coefficient matrix corresponding to the n×m second operating conditions;
[0071] Taking one of the second coefficient matrices as a sample, a working condition data set including n×m samples is constructed; wherein the label of the sample is the parameter of the second working condition corresponding to the second coefficient matrix.
[0072] Specifically, a 3D geometric reconstruction is performed based on the original hydrogen vehicle physical model, such as Figure 3The key components such as the fuel cell system and the hydrogen storage tank are shown, and the complex structure is appropriately simplified to ensure the grid quality; according to the actual position of the hydrogen vehicle in the parking lot, an outflow field calculation domain containing the parking lot boundary (wall, ceiling and ground) is constructed. After obtaining the hydrogen leakage concentration distribution field corresponding to n*m second working conditions, POD decomposition is performed on each hydrogen leakage concentration distribution field, and the obtained global mode matrix and multiple second coefficient matrices are stored in HDF5 for storage and subsequent calling.
[0073] The embodiment of the application obtains the hydrogen leakage concentration distribution field corresponding to different working conditions through CFD simulation, and obtains the global mode matrix and the coefficient matrix corresponding to different working conditions through POD decomposition, thereby providing a data basis for constructing the working condition dataset.
[0074] Optionally, in the embodiment of the application, the third coefficient matrix is corrected according to the coefficient matrix correction amount, including:
[0075] The coefficient matrix correction amount is added to the third coefficient matrix to generate a first coefficient matrix, specifically:
[0076]
[0077] Wherein, The first coefficient matrix; A0 is the third coefficient matrix; ΔA is the coefficient matrix correction amount.
[0078] The coefficient matrix correction amount predicted by the neural network is used to correct the coefficient matrix estimated by linear interpolation, so that a more accurate coefficient matrix prediction result can be obtained.
[0079] Optionally, in the embodiment of the application, the POD reconstruction is performed based on the first coefficient matrix, including:
[0080] The first coefficient matrix is multiplied by the global mode matrix to obtain a hydrogen leakage concentration distribution field corresponding to the first working condition, specifically:
[0081]
[0082] Wherein, X is the hydrogen leakage concentration distribution field corresponding to the first working condition; Φ is the global mode matrix; The first coefficient matrix.
[0083] The POD reconstruction is performed on the predicted coefficient matrix and the pre-calculated global mode matrix, so that the predicted hydrogen leakage concentration distribution field can be obtained.
[0084] Optionally, in an embodiment of the present invention, before inputting the third coefficient matrix into a preset neural network for correction amount prediction, the method further includes:
[0085] A neural network is trained based on the operating condition data set; wherein the neural network includes an input layer, a first hidden layer, a second hidden layer, and an output layer; and the loss function used in the training is the mean square error between the original hydrogen leakage concentration distribution field and the reconstructed hydrogen leakage concentration distribution field, specifically:
[0086]
[0087] in, is the mean square error; N is the number of working conditions; X (i) is the original hydrogen leakage concentration distribution field corresponding to the i-th working condition; is the reconstructed hydrogen leakage concentration distribution field corresponding to the i-th operating condition.
[0088] Specifically, the neural network can be trained using the Adam optimizer in conjunction with a learning rate scheduling strategy. During the training process, methods such as early stopping or cross-validation can be used to improve robustness.
[0089] The embodiment of the present invention trains a neural network through an operating condition data set, providing a model basis for subsequent prediction of a coefficient matrix.
[0090] Optionally, in an embodiment of the present invention, before inputting the third coefficient matrix into a preset neural network for correction amount prediction, the method further includes:
[0091] Each element in the third coefficient matrix is scaled, specifically:
[0092]
[0093] in, is the scaled element; a ij is an element in the third coefficient matrix; max is the largest element in the third coefficient matrix; min is the minimum element in the third coefficient matrix.
[0094] The embodiment of the present invention can improve the efficiency of neural network prediction by scaling each element in the coefficient matrix.
[0095] like Figure 4 As shown, based on the above method embodiment, an embodiment of a hydrogen leakage concentration prediction system is provided. The process of the hydrogen leakage concentration prediction system includes steps S1 to S4:
[0096] Step S1, receiving the operating condition parameters input by the user; wherein, the operating condition parameters include the wind speed vector (wind speed magnitude and direction) and the leakage source intensity; the operating condition parameters are equivalent to the parameters used to obtain the adjacent operating conditions in step S101.
[0097] If the operating condition parameters are located at the boundary or extrapolation area of the known training data (i.e., beyond the parameter space of the training set), the uncertainty identification mechanism will be automatically triggered.
[0098] Step S2, generating an initial POD coefficient matrix through a linear interpolator, including: searching for several adjacent working conditions in a pre-built training working condition database according to the wind speed vector and the leakage source intensity, and based on the local linear properties of the parameters in the physical space, using a weighted linear interpolation method to quickly generate an initial POD coefficient matrix for the corresponding working condition; equivalent to executing step S101.
[0099] Introducing a structured fully connected neural network to perform nonlinear residual compensation on the initial POD coefficient matrix is equivalent to executing step S102.
[0100] Step S3, projecting the corrected POD coefficient matrix back to the high-dimensional space, and reconstructing the three-dimensional concentration field using the unified POD space basis extracted in the training phase; equivalent to executing step S103.
[0101] Step S4, based on the reconstructed three-dimensional concentration field, integrates automatic evaluation indicators of multiple key safety indicators; wherein, the automatic evaluation indicators include the volume of the highest flammable area (setting a flammable threshold, obtained by calculating the ratio between the grid points exceeding the flammable threshold and the total grid points), the highest concentration position (directly retrieving the coordinates corresponding to the highest concentration value), and the diffusion rate of the hazardous area (screening out grid points with concentrations exceeding the flammable threshold and observing the changes in their hazardous areas over time); which is equivalent to performing a safety assessment based on the hydrogen leakage concentration distribution field obtained in step S103.
[0102] The embodiment of the present invention obtains the coefficient matrix corresponding to the adjacent known working conditions of the unknown working condition through the working condition parameters, and estimates the coefficient matrix of the unknown working condition through the linear interpolation method, which can reduce the learning complexity of the subsequent neural network; the error between the linear interpolation result and the true coefficient matrix is corrected in a fine-grained manner by the neural network, so as to obtain a more accurate coefficient matrix prediction result; the predicted coefficient matrix and the pre-calculated global modal matrix are used for POD reconstruction to obtain a predicted hydrogen leakage concentration distribution field; the hydrogen leakage concentration distribution field is used for safety assessment, so as to achieve rapid early warning of hydrogen leakage and reduce the threat posed by hydrogen leakage to personnel and the environment.
[0103] like Figure 5 As shown, based on the above method embodiment, a corresponding device embodiment is provided;
[0104] An embodiment of the present application provides a hydrogen leakage concentration prediction device, comprising a linear interpolation module 501, a neural network module 502 and a POD reconstruction module 503.
[0105] The linear interpolation module 501 is configured to acquire a plurality of second coefficient matrices corresponding to a plurality of second working conditions from a preset working condition data set, and perform linear interpolation on the plurality of second coefficient matrices to obtain a third coefficient matrix; wherein parameters of the plurality of second working conditions are adjacent to parameters of the first working condition, and the parameters of the working condition include a wind speed and a hydrogen leakage intensity, and each working condition corresponds to a coefficient matrix.
[0106] The neural network module 502 is configured to input the third coefficient matrix into a preset neural network to predict a correction amount, obtain a coefficient matrix correction amount, and correct the third coefficient matrix according to the coefficient matrix correction amount to generate a first coefficient matrix.
[0107] The POD reconstruction module 503 is configured to perform POD reconstruction based on the first coefficient matrix to obtain a hydrogen leakage concentration distribution field corresponding to the first working condition.
[0108] Optionally, in the embodiment of the present application, before the linear interpolation module 501, a working condition data set submodule is further included.
[0109] The working condition data set submodule is configured to construct a working condition data set through CFD simulation; wherein the working condition data set includes second coefficient matrices corresponding to n x m second working conditions, n is a gradient number of a wind speed, and m is a gradient number of a hydrogen leakage intensity.
[0110] The embodiment of the present application constructs a working condition data set through CFD simulation, and provides a data basis for subsequent prediction of a coefficient matrix.
[0111] Optionally, in the embodiment of the present application, the working condition data set submodule includes a hydrogen vehicle model unit, a CFD simulation unit, a POD decomposition unit and a data set construction unit.
[0112] The hydrogen vehicle model unit is configured to construct a hydrogen vehicle physical model.
[0113] The CFD simulation unit is configured to perform CFD simulation on n x m second working conditions in a preset area based on the hydrogen vehicle physical model to obtain hydrogen leakage concentration distribution fields corresponding to the n x m second working conditions in the area.
[0114] The POD decomposition unit is configured to perform POD decomposition on the hydrogen leakage concentration distribution fields corresponding to the n x m second working conditions respectively to obtain a global modal matrix and second coefficient matrices corresponding to the n x m second working conditions.
[0115] The construction data set unit is configured to construct a working condition data set containing n*m samples by taking one of the second coefficient matrices as a sample, wherein a label of the sample is a parameter of a second working condition corresponding to the second coefficient matrix.
[0116] The embodiment of the present application obtains the hydrogen leakage concentration distribution field corresponding to different working conditions through CFD simulation, and obtains the global modal matrix and the coefficient matrix corresponding to different working conditions through POD decomposition, thereby providing a data basis for constructing the working condition data set.
[0117] Optionally, in the embodiment of the present application, the neural network module 502 comprises a coefficient matrix correction sub-module.
[0118] The coefficient matrix correction sub-module is configured to add the coefficient matrix correction quantity and the third coefficient matrix to generate a first coefficient matrix, specifically as follows:
[0119]
[0120] wherein, is the first coefficient matrix; A0 is the third coefficient matrix; and ΔA is the coefficient matrix correction quantity.
[0121] The embodiment of the present application corrects the coefficient matrix estimated through linear interpolation by the coefficient matrix correction quantity predicted through the neural network, and can obtain a more accurate coefficient matrix prediction result.
[0122] Optionally, in the embodiment of the present application, the POD reconstruction module 503 comprises a POD reconstruction sub-module.
[0123] The POD reconstruction sub-module is configured to multiply the first coefficient matrix and the global modal matrix to obtain a hydrogen leakage concentration distribution field corresponding to the first working condition, specifically as follows:
[0124]
[0125] wherein, X is the hydrogen leakage concentration distribution field corresponding to the first working condition; and Φ is the global modal matrix. is the first coefficient matrix.
[0126] The embodiment of the present application performs POD reconstruction by the predicted coefficient matrix and the pre-calculated global modal matrix, and can obtain the predicted hydrogen leakage concentration distribution field.
[0127] Optionally, in the embodiment of the present application, before the neural network module 502, there further comprises a neural network training sub-module.
[0128] The neural network training submodule is used to train the neural network based on the operating condition data set; wherein the neural network includes an input layer, a first hidden layer, a second hidden layer, and an output layer; the loss function used in the training is the mean square error between the original hydrogen leakage concentration distribution field and the reconstructed hydrogen leakage concentration distribution field, specifically:
[0129]
[0130] in, is the mean square error; N is the number of working conditions; X (i) is the original hydrogen leakage concentration distribution field corresponding to the i-th working condition; is the reconstructed hydrogen leakage concentration distribution field corresponding to the i-th operating condition.
[0131] The embodiment of the present invention trains a neural network through an operating condition data set, providing a model basis for subsequent prediction of a coefficient matrix.
[0132] Optionally, in the embodiment of the present invention, before the neural network module 502, it further includes: an element scaling submodule;
[0133] The element scaling submodule is used to scale each element in the third coefficient matrix, specifically:
[0134]
[0135] in, is the scaled element; a ij is an element in the third coefficient matrix; max is the largest element in the third coefficient matrix; min is the minimum element in the third coefficient matrix.
[0136] The embodiment of the present invention can improve the efficiency of neural network prediction by scaling each element in the coefficient matrix.
[0137] It can be understood that the above-mentioned device embodiment corresponds to the method embodiment of the present invention, and can implement a hydrogen leakage concentration prediction method provided by any of the above-mentioned method embodiments of the present invention.
[0138] The embodiment of the present application can obtain the coefficient matrix corresponding to the adjacent known working condition of the unknown working condition through the linear interpolation module, and estimate the coefficient matrix of the unknown working condition through the linear interpolation method, so as to reduce the learning complexity of the subsequent neural network; the error between the linear interpolation result and the real coefficient matrix is corrected in fine granularity through the neural network module, so as to obtain a more accurate coefficient matrix prediction result; the predicted coefficient matrix and the pre-calculated global modal matrix are reconstructed through the POD reconstruction module, so as to obtain the predicted hydrogen leakage concentration distribution field. Compared with the existing technology, the present application can efficiently and accurately predict the hydrogen leakage concentration distribution field.
[0139] It should be noted that the device embodiments described above are only schematic, and part or all of the modules thereof can be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the device embodiment provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which can be realized as one or more communication buses or signal lines. Those skilled in the art can understand and implement it without creative labor.
[0140] On the basis of the above-mentioned embodiment of the hydrogen leakage concentration prediction method, another embodiment of the present application provides a terminal device, which comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the hydrogen leakage concentration prediction method of any one of the embodiments of the present application is realized.
[0141] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present application. The one or more modules can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program in the terminal device.
[0142] The terminal device can be a desktop computer, a notebook computer, a palm computer and a cloud server, etc. The terminal device can include, but is not limited to, a processor and a memory.
[0143] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, connecting various parts of the entire terminal device using various interfaces and lines.
[0144] Based on the above method embodiments, another embodiment of the present invention provides a computer-readable storage medium, including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a hydrogen leakage concentration prediction method described in any one of the above method embodiments of the present invention.
[0145] Wherein, the module / unit integrated in the device / terminal equipment, if implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0146] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for predicting hydrogen leakage concentration, characterized in that: include: Obtaining a plurality of second coefficient matrices corresponding to a plurality of second operating conditions from a preset operating condition data set, and performing linear interpolation on the plurality of second coefficient matrices to obtain a third coefficient matrix; wherein parameters of the plurality of second operating conditions are close to parameters of the first operating condition, the operating condition parameters including wind speed and hydrogen leakage intensity, and each operating condition corresponds to a coefficient matrix; Inputting the third coefficient matrix into a preset neural network to perform correction amount prediction to obtain a coefficient matrix correction amount, and correcting the third coefficient matrix according to the coefficient matrix correction amount to generate a first coefficient matrix; POD reconstruction is performed based on the first coefficient matrix to obtain a hydrogen leakage concentration distribution field corresponding to the first operating condition.
2. A method for predicting hydrogen leakage concentration according to claim 1, characterized in that: Before obtaining a plurality of second coefficient matrices corresponding to a plurality of second operating conditions from a preset operating condition data set, the method further includes: An operating condition data set is constructed through CFD simulation; wherein, the operating condition data set includes n×m second coefficient matrices corresponding to the second operating conditions, n is the number of wind speed gradients, and m is the number of hydrogen leakage intensity gradients.
3. A method for predicting hydrogen leakage concentration according to claim 2, characterized in that: The construction of the working condition data set through CFD simulation includes: Build a physical model of hydrogen vehicles; Based on the hydrogen vehicle physical model, CFD simulations are performed for n×m second operating conditions in a preset area to obtain hydrogen leakage concentration distribution fields corresponding to the n×m second operating conditions in the area; Performing POD decomposition on the hydrogen leakage concentration distribution fields corresponding to the n×m second operating conditions to obtain a global modal matrix and a second coefficient matrix corresponding to the n×m second operating conditions; Taking one of the second coefficient matrices as a sample, a working condition data set containing n×m samples is constructed; wherein the label of the sample is the parameter of the second working condition corresponding to the second coefficient matrix.
4. A method for predicting hydrogen leakage concentration according to claim 1, characterized in that: The modifying the third coefficient matrix according to the coefficient matrix modification amount includes: The coefficient matrix correction amount is added to the third coefficient matrix to generate a first coefficient matrix, specifically: in, is the first coefficient matrix; A0 is the third coefficient matrix; ΔA is the coefficient matrix correction amount.
5. A method for predicting hydrogen leakage concentration according to claim 3, characterized in that: The performing POD reconstruction based on the first coefficient matrix includes: The first coefficient matrix is multiplied by the global modal matrix to obtain the hydrogen leakage concentration distribution field corresponding to the first operating condition, specifically: Wherein, X is the hydrogen leakage concentration distribution field corresponding to the first operating condition; Φ is the global modal matrix; is the first coefficient matrix.
6. A method for predicting hydrogen leakage concentration according to claims 1-5, characterized in that: Before inputting the third coefficient matrix into a preset neural network for correction amount prediction, the method further includes: A neural network is trained based on the operating condition data set; wherein the neural network includes an input layer, a first hidden layer, a second hidden layer, and an output layer; and a loss function used in the training is the mean square error between the original hydrogen leakage concentration distribution field and the reconstructed hydrogen leakage concentration distribution field, specifically: Among them, MSE is the mean square error; N is the number of working conditions; X (i) is the original hydrogen leakage concentration distribution field corresponding to the i-th working condition; is the reconstructed hydrogen leakage concentration distribution field corresponding to the i-th operating condition.
7. A method for predicting hydrogen leakage concentration according to claims 1-5, characterized in that: Before inputting the third coefficient matrix into a preset neural network for correction amount prediction, the method further includes: Each element in the third coefficient matrix is scaled, specifically: in, is the scaled element; a ij is an element in the third coefficient matrix; max is the largest element in the third coefficient matrix; min is the minimum element in the third coefficient matrix.
8. A hydrogen leakage concentration prediction device, characterized in that: include: Linear interpolation module, neural network module and POD reconstruction module; The linear interpolation module is configured to obtain a plurality of second coefficient matrices corresponding to a plurality of second operating conditions from a preset operating condition data set, and perform linear interpolation on the plurality of second coefficient matrices to obtain a third coefficient matrix; wherein the parameters of the plurality of second operating conditions are close to the parameters of the first operating condition, the operating condition parameters include wind speed and hydrogen leakage intensity, and each operating condition corresponds to a coefficient matrix; The neural network module is configured to input the third coefficient matrix into a preset neural network to perform correction amount prediction to obtain a coefficient matrix correction amount, and to correct the third coefficient matrix according to the coefficient matrix correction amount to generate a first coefficient matrix; The POD reconstruction module is used to perform POD reconstruction based on the first coefficient matrix to obtain the hydrogen leakage concentration distribution field corresponding to the first operating condition.
9. A terminal device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the method for predicting hydrogen leakage concentration according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that include: A stored computer program, wherein when the computer program is run, the device where the computer-readable storage medium is located is controlled to execute a hydrogen leakage concentration prediction method according to any one of claims 1 to 7.