A model training method and a hydrogen leakage prediction method for hydrogen fuel cell vehicles
Through model training and neural network prediction methods, the problem of difficulty in identifying hydrogen leaks in hydrogen fuel cell vehicles is solved, accurate prediction of hydrogen concentration and identification of leak risks are achieved, improving safety and reliability.
Patent Information
- Application Number
- CN202410881422.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-07-03
AI Technical Summary
Hydrogen leaks in hydrogen fuel cell vehicles are difficult to effectively identify by traditional detection methods. Especially in confined spaces or inside vehicles, there are hidden and safety risks. Scientific and reasonable prediction methods are needed to identify potential leak risks.
Using the model training method, by obtaining the historical hydrogen concentration sequence, average hydrogen concentration sequence and hydrogen concentration change rate sequence of the monitoring point, the neural network model is used to predict hydrogen leakage, and the sliding window algorithm and fluid simulation software are combined to construct a hydrogen fuel cell compartment. Three-dimensional structural model, leak simulation is performed to obtain training data to achieve accurate prediction of future hydrogen concentration.
It can accurately determine whether hydrogen leakage occurs in hydrogen fuel cell vehicles under safe conditions, identify the degree of leakage, and identify potential leakage risks in advance, improving safety and reliability.
Smart Images

Figure CN118428242B_ABST
Abstract
Description
Technical Field
[0001] One or more embodiments of the present specification relate to the technical field of hydrogen fuel cell vehicles, and in particular, to a model training method and a hydrogen leakage prediction method for hydrogen fuel cell vehicles. Background Art
[0002] In the current global automobile market, fuel cell vehicles are gradually gaining attention and being widely used as an environmentally friendly and high-efficiency alternative. However, with the increase in its large-scale application, the safety and reliability requirements for fuel cell vehicles are also increasing. Among them, hydrogen leakage is a safety hazard that has attracted much attention. First of all, hydrogen is a flammable and explosive gas. Once leaked, it may cause fire or explosion, posing a serious threat to personnel and the environment. Secondly, hydrogen leakage in fuel cell vehicles is usually hidden. Due to the extremely small molecular size and strong permeability of hydrogen, its leakage is often not easy to detect, especially in confined spaces or inside vehicles. Therefore, traditional detection methods often cannot effectively find potential leakage points, which requires relying on scientific and reasonable prediction methods to timely identify potential leakage risks. Summary of the invention
[0003] One or more embodiments of this specification describe a model training method and a hydrogen leakage prediction method for a hydrogen fuel cell vehicle, which can predict the hydrogen concentration of a monitoring point at a future time; and accurately determine whether a hydrogen leakage occurs in a fuel cell vehicle and the extent of the hydrogen leakage through the hydrogen concentration at a future time and the hydrogen concentration at a current time.
[0004] In a first aspect, an embodiment of the present specification provides a model training method, comprising:
[0005] Acquire training data of the monitoring point, the training data including a plurality of historical hydrogen concentration sequences, and corresponding historical average hydrogen concentration sequences, historical hydrogen concentration change rate sequences and future hydrogen concentration sequences; wherein each historical hydrogen concentration sequence includes hydrogen concentration data at consecutive moments in a historical time period, each future hydrogen concentration sequence includes hydrogen concentration data at consecutive moments in a future time period, and each historical average hydrogen concentration sequence and historical hydrogen concentration change rate sequence are calculated based on the corresponding historical hydrogen concentration sequence; the training data is obtained by performing leakage simulation on a three-dimensional structural model of a fuel cell compartment;
[0006] Based on the training data, the hydrogen leakage model of the monitoring point is trained. The hydrogen leakage model is a neural network model. The training process is:
[0007] Input the historical hydrogen concentration sequence, the corresponding historical average hydrogen concentration sequence and the historical hydrogen concentration change rate sequence into the hydrogen leakage model training, and output the predicted hydrogen concentration sequence; the predicted hydrogen concentration sequence includes the hydrogen concentration data at consecutive moments within the prediction time;
[0008] The loss function is used to predict and judge the future hydrogen concentration sequence and the predicted hydrogen concentration sequence. When the prediction result does not meet the convergence condition, the above training process is repeated until the convergence condition is met; when the prediction result meets the convergence condition, the hydrogen leakage model training is completed.
[0009] In some implementations, obtaining training data of monitoring points includes:
[0010] Obtaining a hydrogen concentration sequence at a monitoring point within a period of time, and a corresponding average hydrogen concentration sequence at the monitoring point within a period of time and a hydrogen concentration change rate sequence at the monitoring point within a period of time, wherein the hydrogen concentration sequence at the monitoring point within a period of time, the average hydrogen concentration sequence at the monitoring point within a period of time and the hydrogen concentration change rate sequence at the monitoring point within a period of time are calculated when a leakage simulation is performed based on a fuel cell compartment simulation model;
[0011] By using a sliding window algorithm, hydrogen concentration data of multiple window sizes, average hydrogen concentration data of multiple window sizes, and hydrogen concentration change rate data of multiple window sizes are obtained from a hydrogen concentration sequence of a monitoring point within a period of time, an average hydrogen concentration sequence of a monitoring point within a period of time, and a hydrogen concentration change rate sequence of a monitoring point within a period of time. According to a prediction time step, hydrogen concentration data corresponding to the prediction time step of each window is obtained from the hydrogen concentration sequence of the monitoring point within a period of time, and a future hydrogen concentration sequence corresponding to the hydrogen concentration data of each window size is formed. The window size is determined based on the time step. The hydrogen concentration data under each window is a historical hydrogen concentration sequence, the average hydrogen concentration data under each window is a historical average hydrogen concentration sequence, and the hydrogen concentration change rate data under each window is a historical hydrogen concentration change rate sequence.
[0012] In some implementations, the window size is X time steps, and the prediction time step is Y time steps; X is not less than Y.
[0013] In some embodiments, the step of obtaining a hydrogen concentration sequence at a monitoring point within a period of time, and a corresponding average hydrogen concentration sequence at the monitoring point within a period of time and a hydrogen concentration change rate sequence at the monitoring point within a period of time includes:
[0014] According to the monitoring point, the hydrogen concentration sequence of the monitoring point within a period of time, the corresponding average hydrogen concentration sequence of the monitoring point within a period of time and the hydrogen concentration change rate sequence of the monitoring point within a period of time are obtained from the database; wherein, the database stores the hydrogen concentration data, average hydrogen concentration data and hydrogen concentration change rate data of multiple monitoring points under a certain fuel cell vehicle compartment simulation model at each continuous moment; the hydrogen concentration data of multiple monitoring points under a certain fuel cell vehicle compartment simulation model at each continuous moment are calculated when the fuel cell vehicle compartment simulation model is subjected to leakage simulation; the average hydrogen concentration data and hydrogen concentration change rate data of multiple monitoring points under a certain fuel cell vehicle compartment simulation model at each continuous moment are calculated based on the hydrogen concentration data of the corresponding monitoring points at each continuous moment.
[0015] In some embodiments, before obtaining the training data of the monitoring points, the method further includes: performing leakage simulation based on the fuel cell compartment simulation model to obtain hydrogen concentration data at different monitoring points in the fuel cell compartment simulation model at respective continuous moments.
[0016] In some embodiments, the leakage simulation based on the fuel cell compartment simulation model includes:
[0017] Based on the fuel cell vehicle model, a three-dimensional structural model of the fuel cell vehicle box is constructed and several monitoring points are marked on the three-dimensional structural model;
[0018] Fluid simulation software is used to perform leakage simulation on the three-dimensional structural model of the fuel cell vehicle box with marked monitoring points. During the simulation, the hydrogen leakage and diffusion process needs to satisfy the conservation of mass, momentum, and energy, and each component of hydrogen needs to satisfy the component transport equation.
[0019] In some embodiments, the loss function is a root mean square error loss function. When the loss function is used to train the hydrogen leakage model, the model parameters are gradient updated with the goal of minimizing the loss function.
[0020] In a second aspect, the embodiments of this specification provide a method for predicting hydrogen leakage of a hydrogen fuel cell vehicle, comprising:
[0021] Collect hydrogen concentration data of a certain monitoring point in the fuel cell vehicle compartment at continuous moments in the current time period and form a current hydrogen concentration sequence;
[0022] Based on the current hydrogen concentration sequence, calculate the current average hydrogen concentration sequence and the current hydrogen concentration change rate sequence of the monitoring point;
[0023] Inputting the current hydrogen concentration sequence, the current average hydrogen concentration sequence and the current hydrogen concentration change rate sequence of the monitoring point into the hydrogen leakage model of the monitoring point trained according to the method of the first aspect, and outputting the predicted hydrogen concentration sequence of the monitoring point;
[0024] Based on the predicted hydrogen concentration sequence of the monitoring point, the hydrogen concentration data of the monitoring point at consecutive moments within the predicted time are obtained.
[0025] In some embodiments, the method further includes: determining that the hydrogen concentration at a certain moment in the current hydrogen concentration sequence or the hydrogen concentration at a certain moment in the predicted hydrogen concentration sequence is greater than a concentration threshold, or that the hydrogen concentration change rate is greater than a concentration change rate threshold, and determining that there is a hydrogen leak at the monitoring point; the hydrogen concentration change rate = the difference between the hydrogen concentration at a certain moment at present and the hydrogen concentration at a certain moment predicted / the difference between the hydrogen concentration at a certain moment at present and the hydrogen concentration at a certain moment predicted.
[0026] In some embodiments, the method further comprises:
[0027] When it is determined that the hydrogen concentration at a certain moment in the current hydrogen concentration sequence or the hydrogen concentration at a certain moment in the predicted hydrogen concentration sequence is greater than the first concentration threshold, or the hydrogen concentration change rate is greater than the concentration change rate threshold, it is determined that there is a slight hydrogen leak at the monitoring point;
[0028] When it is determined that the hydrogen concentration at a certain moment in the current hydrogen concentration sequence or the hydrogen concentration at a certain moment in the predicted hydrogen concentration sequence is greater than the second concentration threshold, it is determined that there is a moderate hydrogen leak at the monitoring point;
[0029] When it is determined that the hydrogen concentration at a certain moment in the current hydrogen concentration sequence or the hydrogen concentration at a certain moment in the predicted hydrogen concentration sequence is greater than the third concentration threshold, it is determined that there is a severe hydrogen leak at the monitoring point;
[0030] Among them, the first concentration threshold is smaller than the second concentration threshold and smaller than the third concentration threshold.
[0031] The beneficial effects brought by the technical solutions provided by some embodiments of this specification include at least:
[0032] In one or more embodiments of the present specification, the model training method of the embodiment of the present specification inputs the historical hydrogen concentration sequence, the historical average hydrogen concentration sequence and the historical hydrogen concentration change rate sequence in the monitoring point training data into the neural network model training to obtain a model that can accurately output the predicted hydrogen concentration sequence. The above training data is obtained by simulating the leakage of the three-dimensional structure of a hydrogen fuel cell vehicle box. Further, when the leakage simulation is performed on hydrogen fuel cell boxes of different models, the training data of hydrogen fuel cell boxes of different models can be obtained, and the training data is used to train the hydrogen leakage model suitable for hydrogen fuel cell boxes of different models. In this way, the data of various types of hydrogen fuel cell boxes during the simulated leakage can be obtained in a safe situation, so as to apply the trained hydrogen leakage model to the actual scene to predict the hydrogen concentration at a future moment, and then judge whether hydrogen leakage occurs in the vehicle box, and identify the potential leakage risk in advance before the hydrogen leakage causes danger. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of this specification, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0034] Figure 1 A flowchart of a model training method provided in an embodiment of this specification;
[0035] Figure 2a This is a schematic diagram of the three-dimensional structural model of the fuel cell vehicle box in the embodiment of this specification; in the figure, 5 is the skylight, 6 is the window, and 7 is the hydrogen storage bottle;
[0036] Figure 2b This is a schematic diagram of the three-dimensional structural model of the fuel cell vehicle box in the embodiment of this specification;
[0037] Figure 3 A flowchart of a method for predicting hydrogen leakage of a hydrogen fuel cell vehicle provided in an embodiment of this specification;
[0038] Figure 4 The present invention is a flow chart of an example of a method for predicting hydrogen leakage of a hydrogen fuel cell vehicle according to an embodiment of the present specification, which predicts and alarms hydrogen leakage for a working hydrogen fuel cell vehicle. DETAILED DESCRIPTION
[0039] The technical solutions in the embodiments of this specification will be described clearly and completely below in conjunction with the drawings in the embodiments of this specification.
[0040] The terms "first", "second", "third", etc. in the description and claims of this specification and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0041] like Figure 1 , a model training method in an embodiment of this specification includes:
[0042] Step 102, obtaining training data of the monitoring point, the training data including a plurality of historical hydrogen concentration sequences, and corresponding historical average hydrogen concentration sequences, historical hydrogen concentration change rate sequences and future hydrogen concentration sequences; wherein each historical hydrogen concentration sequence includes hydrogen concentration data at consecutive moments in a historical time period, each future hydrogen concentration sequence includes hydrogen concentration data at consecutive moments in a future time period, and each historical average hydrogen concentration sequence and historical hydrogen concentration change rate sequence are calculated based on the corresponding historical hydrogen concentration sequence, respectively; the training data is obtained by performing leakage simulation on a three-dimensional structural model of a fuel cell compartment;
[0043] Step 104: Based on the training data, a hydrogen leakage model of the monitoring point is trained. The hydrogen leakage model is a neural network model. The training process is:
[0044] Input the historical hydrogen concentration sequence, the corresponding historical average hydrogen concentration sequence and the historical hydrogen concentration change rate sequence into the hydrogen leakage model training, and output the predicted hydrogen concentration sequence; the predicted hydrogen concentration sequence includes the hydrogen concentration data at consecutive moments within the prediction time;
[0045] The loss function is used to predict and judge the future hydrogen concentration sequence and the predicted hydrogen concentration sequence. When the prediction result does not meet the convergence condition, the above training process is repeated until the convergence condition is met; when the prediction result meets the convergence condition, the hydrogen leakage model training is completed.
[0046] The method of the embodiments of this specification is executed on a computer device, and the computer device may be a computer, a mobile terminal, a server with computing capabilities, etc.
[0047] The method of the embodiment of this specification can use the training data obtained by leak simulation of the three-dimensional structural model of the fuel cell compartment to train the hydrogen leakage model, and obtain a hydrogen leakage model that can accurately predict the hydrogen concentration at a future time.
[0048] The method is trained based on the training data of a monitoring point of a fuel cell vehicle compartment of a certain model, and then obtains the hydrogen leakage model of the monitoring point of the fuel cell vehicle compartment of the model. The hydrogen leakage model of the monitoring point can be applied to the prediction of the hydrogen concentration of the current monitoring point at a future time.
[0049] Next, steps 102 to 104 will be described in detail.
[0050] In step 102, when it is necessary to train a hydrogen leakage model for a certain monitoring point, it is necessary to obtain training data for the monitoring point.
[0051] The training data includes a training set and a test set. The training set is a data set for inputting a model, including multiple historical hydrogen concentration sequences, multiple historical average hydrogen concentration sequences, and multiple historical hydrogen concentration change rate sequences. The historical average hydrogen concentration sequence and the historical hydrogen concentration change rate sequence are calculated based on the historical hydrogen concentration sequence, and for this purpose, the three related sequences are stored correspondingly. The test set includes multiple future hydrogen concentration sequences, each of which contains hydrogen concentration data in a future time period after the moment of the corresponding historical hydrogen concentration sequence.
[0052] The step of obtaining training data of monitoring points includes:
[0053] Step 1021, obtaining a hydrogen concentration sequence at a monitoring point within a period of time, and a corresponding average hydrogen concentration sequence at the monitoring point within a period of time and a hydrogen concentration change rate sequence at the monitoring point within a period of time, wherein the hydrogen concentration sequence at the monitoring point within a period of time, the average hydrogen concentration sequence at the monitoring point within a period of time and the hydrogen concentration change rate sequence at the monitoring point within a period of time are calculated when a leakage simulation is performed based on a fuel cell vehicle simulation model;
[0054] Step 1023, using a sliding window algorithm, obtain hydrogen concentration data of multiple window sizes, average hydrogen concentration data of multiple window sizes, and hydrogen concentration change rate data of multiple window sizes from the hydrogen concentration sequence of the monitoring point within a period of time, the average hydrogen concentration sequence of the monitoring point within a period of time, and the hydrogen concentration change rate sequence of the monitoring point within a period of time; according to the prediction time step, obtain the hydrogen concentration data of each window corresponding to the prediction time step from the hydrogen concentration sequence of the monitoring point within a period of time and form a future hydrogen concentration sequence corresponding to the hydrogen concentration data of each window size;
[0055] Among them, the window size is determined based on the time step; the hydrogen concentration data under each window is a historical hydrogen concentration sequence, the average hydrogen concentration data under each window is a historical average hydrogen concentration sequence, and the hydrogen concentration change rate data under each window is a historical hydrogen concentration change rate sequence.
[0056] In step 1021, the step of obtaining a hydrogen concentration sequence at a monitoring point within a period of time, and a corresponding average hydrogen concentration sequence at the monitoring point within a period of time and a hydrogen concentration change rate sequence at the monitoring point within a period of time includes:
[0057] According to the monitoring point, the hydrogen concentration sequence of the monitoring point within a period of time, the corresponding average hydrogen concentration sequence of the monitoring point within a period of time and the hydrogen concentration change rate sequence of the monitoring point within a period of time are obtained from the database;
[0058] Among them, the database stores hydrogen concentration data, average hydrogen concentration data, and hydrogen concentration change rate data at each continuous moment of multiple monitoring points under a fuel cell compartment simulation model; the hydrogen concentration data at each continuous moment of multiple monitoring points under a fuel cell compartment simulation model are calculated when leakage simulation is performed on the fuel cell compartment simulation model; the average hydrogen concentration data and hydrogen concentration change rate data at each continuous moment of multiple monitoring points under a fuel cell compartment simulation model are calculated based on the hydrogen concentration data at the corresponding monitoring points at continuous moments.
[0059] Before step 102, the method of the embodiment of this specification further includes:
[0060] Step 100, based on the fuel cell vehicle compartment simulation model, a leakage simulation is performed to obtain hydrogen concentration data at different monitoring points in the fuel cell vehicle compartment simulation model at respective continuous moments and store the data in a database.
[0061] In addition, for each monitoring point under the fuel cell vehicle simulation model, average hydrogen concentration data and hydrogen concentration change rate data are calculated, and the calculated average hydrogen concentration data and hydrogen concentration change rate data of multiple monitoring points at consecutive moments are stored in a database.
[0062] Taking the hydrogen concentration data of a certain monitoring point at continuous moments as an example, calculate the average hydrogen concentration data and hydrogen concentration change rate data of the monitoring point at continuous moments. Assume that at time T0, the hydrogen concentration data is c0; at time T1, the hydrogen concentration data is c1; at time T2, the hydrogen concentration data is c2; at time T3, the hydrogen concentration data is c3; at time T4, the hydrogen concentration data is c4; at time T5, the hydrogen concentration data is c5; at time T6, the hydrogen concentration data is c6; at time T7, the hydrogen concentration data is c7; at time T8, the hydrogen concentration data is c8. Based on the moments before and after a certain moment, calculate the average hydrogen concentration data: for time T1, the average hydrogen concentration data is (c0+c1+c2) / 3, for time T2, the average hydrogen concentration data is (c1+c2+c3) / 3, ..., for time T7, the average hydrogen concentration data is (c6+c7+c8) / 3. For time T0, it is assumed that the hydrogen concentration data of the previous moment is 0, and the average hydrogen concentration data is (0+c0+c1) / 3; for time T8, it is assumed that the hydrogen concentration data of the next moment is 0, and the average hydrogen concentration data is (c7+c8+0) / 3. Based on the degree of change from a certain moment to the previous moment, the hydrogen concentration change rate is calculated: for time T1, the hydrogen concentration change rate data is (c1-c0) / (T2-T1), for time T2, the hydrogen concentration change rate data is (c2-c1) / (T2-T1), ..., for time T8, the hydrogen concentration change rate data is (c8-c7) / (T2-T1). For time T0, it is assumed that the hydrogen concentration data of the previous moment is 0, and the previous moment is 0, and the hydrogen concentration change rate data is c0 / T0.
[0063] After obtaining the hydrogen concentration data, the average hydrogen concentration data and the hydrogen change rate data at the corresponding time are calculated; then, the hydrogen concentration data, the average hydrogen concentration data and the hydrogen change rate data at the same time are correspondingly stored in the database.
[0064] Since a large amount of data at continuous moments is stored in the database, the data at some continuous moments can be obtained from the database through step 1021 to form a hydrogen concentration sequence of the monitoring point over a period of time, as well as a corresponding average hydrogen concentration sequence of the monitoring point over a period of time and a hydrogen concentration change rate sequence of the monitoring point over a period of time.
[0065] In addition, after obtaining data at some continuous moments, the data needs to be cleaned. After cleaning and removing erroneous data, the hydrogen concentration sequence of the above-mentioned monitoring point over a period of time, as well as the corresponding average hydrogen concentration sequence of the monitoring point over a period of time and the hydrogen concentration change rate sequence of the monitoring point over a period of time are formed.
[0066] Next, step 1023 performs data segmentation on the acquired sequence to form a training set and a test set. The specific segmentation method is to segment the data using a sliding window and a prediction step length, and then construct training data including a training set and a test set.
[0067] The window size is X time steps, and the prediction time step is Y time steps; X is not less than Y. Under this setting, more hydrogen concentration data can be used to predict less hydrogen concentration data to ensure prediction accuracy.
[0068] For example, the hydrogen concentration sequence over a period of time has 30 consecutive hydrogen concentration data. The average hydrogen concentration sequence over a period of time has 30 consecutive average hydrogen concentration data. The hydrogen concentration change rate sequence over a period of time has 30 consecutive hydrogen concentration change rate data. Assume that X is 20 and Y is 5.
[0069] The first sliding window uses 20 time steps to obtain the hydrogen concentration data from the 1st to 20th continuous moments in the hydrogen concentration sequence within a period of time, and construct the first historical hydrogen concentration sequence; accordingly, the average hydrogen concentration data from the 1st to 20th continuous moments in the average hydrogen concentration sequence within a period of time is obtained to construct the first historical average hydrogen concentration sequence; the hydrogen concentration change rate data from the 1st to 20th continuous moments in the hydrogen concentration change rate sequence within a period of time is obtained to construct the first historical hydrogen concentration change rate data. The prediction time step is 5 time steps, and the hydrogen concentration data from the 21st to 25th continuous moments are constructed as the first future hydrogen concentration sequence.
[0070] The second sliding window uses 20 time steps to obtain the hydrogen concentration data from the 2nd to 21st continuous moments in the hydrogen concentration sequence within a period of time, and construct the second historical hydrogen concentration sequence; accordingly, the average hydrogen concentration data from the 2nd to 21st continuous moments in the average hydrogen concentration sequence within a period of time is obtained to construct the second historical average hydrogen concentration sequence; the hydrogen concentration change rate data from the 2nd to 21st continuous moments in the hydrogen concentration change rate sequence within a period of time is obtained to construct the second historical hydrogen concentration change rate data. The prediction time step is 5 time steps, and the hydrogen concentration data from the 22nd to 26th continuous moments are constructed as the second future hydrogen concentration sequence.
[0071] The third sliding window uses 20 time steps to obtain the hydrogen concentration data from the 3rd to the 22nd continuous moments in the hydrogen concentration sequence within a period of time, and construct the 3rd historical hydrogen concentration sequence; accordingly, the average hydrogen concentration data from the 3rd to the 22nd continuous moments in the average hydrogen concentration sequence within a period of time is obtained to construct the 3rd historical average hydrogen concentration sequence; the hydrogen concentration change rate data from the 3rd to the 22nd continuous moments in the hydrogen concentration change rate sequence within a period of time is obtained to construct the 3rd historical hydrogen concentration change rate data. The prediction time step is 5 time steps, and the hydrogen concentration data from the 23rd to the 27th continuous moments are constructed as the 3rd future hydrogen concentration sequence.
[0072] In the above manner, the sliding window is used to obtain the data of the subsequent 20 consecutive time steps in sequence to construct the 4th, 5th, and 6th historical hydrogen concentration series, average hydrogen concentration series, and hydrogen concentration change rate series. Accordingly, according to the prediction compensation, the relevant 4th, 5th, and 6th future hydrogen concentration series are obtained.
[0073] The above example is used to illustrate how to split data to obtain training sets and test sets. During training, the required data is not limited to 30 moments, or even more moments. The above sliding window size and the number of prediction steps are not limited to the above values and can be set as needed.
[0074] In step 100, the leakage simulation is performed based on the fuel cell compartment simulation model, including:
[0075] Step 101, based on the fuel cell vehicle model, construct a three-dimensional structural model of the fuel cell vehicle box and mark a number of monitoring points on the three-dimensional structural model;
[0076] Step 103, using fluid simulation software, conduct leakage simulation on the three-dimensional structural model of the fuel cell vehicle box with the monitoring points marked; during the simulation, the hydrogen leakage diffusion process needs to satisfy the conservation of mass, momentum, and energy, and each component of hydrogen needs to satisfy the component transport equation.
[0077] In step 101, since the structures of fuel cell vehicles of different models are different, it is necessary to construct a three-dimensional structural model of the fuel cell vehicle box corresponding to each model.
[0078] The 3D structural model can be implemented in 3D modeling software, such as Spaceclaim. Figure 2a , Figure 2b A simplified model of . Figure 2a , Figure 2b Taking a certain type of fuel cell vehicle as an example, the three-dimensional structural model is shown. Figure 2aIn the vehicle, there are two vents 10 in the compartment, through which outside air enters the interior of the vehicle to heat, cool and renew the air in the vehicle. The exhaust holes are located at the rear of the compartment. The vehicle has a total of four exhaust holes 11, two at the bottom and two at the top. The function of the exhaust holes is to extract air (or air-hydrogen mixture to prevent leakage) and prevent overpressure in the vehicle. Therefore, under fixed conditions, all airflow introduced into the ventilation vents must leave the vehicle through these exhaust vents. The hydrogen bottle is a Type IV bottle that can accommodate hydrogen with a maximum pressure of 70MPa. The inner diameter of the hydrogen supply pipeline is 6mm, the high-pressure pipeline is 0-70MPa, and the medium-pressure pipeline is 20bar. Hydrogen is transported from the hydrogen storage bottle through the hydrogen supply pipeline through the compartment to the fuel cell system at the front of the vehicle. In Figure 2b In the three-dimensional structure model, four hydrogen concentration monitoring points are arranged, namely, monitoring point 1 and monitoring point 2 located near two ventilation openings 10 , and monitoring point 3 and monitoring point 4 located near two exhaust holes 11 .
[0079] In step 103, the fluid simulation software may be Fluent software.
[0080] The leakage mode mainly studies the continuous leakage caused by the rupture of the hydrogen supply pipeline. The ideal gas model is used for hydrogen, that is, PV=nRT.
[0081] Assume that the hydrogen supply pipe near the hydrogen bottle is completely broken, and the fracture surface is a circular hole with a diameter of 10 mm. Set the pressure outlet to pressurize in the Fluent software, and the gauge pressure is 0 MPa. The car windows and sunroof are closed by default, and the exhaust conditions of the vents and exhaust ports can be set to natural ventilation and forced ventilation. The exhaust efficiency of forced ventilation can be reflected in the mass flow rate of the gas, so it can be set as a mass flow outlet in the Fluent software. The boundary conditions are set to the ambient pressure and temperature set to standard atmospheric pressure (101.325 kPa) and 300 K. Considering the influence of gravity, the gravitational acceleration is set to 9.81 m / s2, vertically downward. The time step is fixed to 0.001 s.
[0082] Fluent software is pre-configured with relevant formulas for hydrogen concentration calculation, including hydrogen mass flow calculation formula, mass, momentum, energy conservation formula, and component transport equation.
[0083] The outlet flow state is supersonic flow, so the hydrogen mass flow rate calculation formula is:
[0084]
[0085] Among them, P0 is the ambient pressure; P is the initial pressure; k is the gas adiabatic coefficient; Q is the hydrogen leakage mass flow rate; Cd is the hydrogen leakage coefficient; A is the leakage port area; M is the molar mass of hydrogen; R is the gas constant; T is the temperature, and n is the number of moles of gas.
[0086] During the leakage and diffusion process of hydrogen, the gas flows continuously, satisfying the conservation of mass and energy, and each component satisfies the component transport equation. The whole process satisfies the following basic control equations:
[0087] The continuity equation, i.e. the mass conservation equation, is:
[0088]
[0089] The momentum equation is:
[0090]
[0091]
[0092]
[0093] The energy equation is:
[0094]
[0095] The component transport equation is:
[0096]
[0097] Among them, u x 、u y 、u z are the velocity components in the X, Y, and Z directions respectively; t is time; ρ is the fluid density; P is the fluid pressure; τ xx , τ yy , τ zz is the component of viscous stress τ; f x 、f y 、f z is the unit mass force in the X, Y, and Z directions; E is the total energy of the fluid microgroup (including internal energy, kinetic energy, and potential energy); k eff is the effective heat transfer coefficient; h j For components j Enthalpy; J j is the diffusion flux of component j; S h User-defined heat source items.
[0098] In step 104, the hydrogen leakage model adopts an LSTM neural network model.
[0099] The internal state of the LSTM neural network model is used as a carrier to store or forget historical information. Its neurons contain three logic gate structures: forget gate, input gate, and output gate. Among them, the forget gate determines which information needs to be forgotten through the transformation calculation of the σ function. Its output value is between 0 and 1. The specific mathematical expression is:
[0100]
[0101] x (t) represents the neuron input at time t; h (t-1) represents the hidden layer information at time t-1; f c is the output of the forget gate; W fx and W fh Input x (t) and h (t-1) The forget gate weight of b f is the forget gate threshold.
[0102] After determining the information to be forgotten, the input gate is responsible for deciding which information needs to be saved to the internal state. This process involves the transformation of the σ function to determine which inputs need to be updated, and generates alternative update information through the transformation of the tanh function. The specific mathematical expression is:
[0103]
[0104]
[0105] in, and Corresponding to the input gate information under σ function transformation and tanh function transformation respectively; W iX and W gX Corresponding to the above two parts of the transformation about x (t) The input gate weight of ih and W gh Corresponding to the above two parts of the transformation about h (t-1) The input gate weight of b i and b g They correspond to the input gate thresholds under σ function transformation and tanh function transformation respectively.
[0106] Finally, the internal state value of LSTM is updated, and the specific mathematical expression is:
[0107]
[0108] The symbol · represents element-by-element multiplication.
[0109] After selective memory and update of information, the output gate is responsible for determining the current output information. The specific mathematical expression is:
[0110]
[0111]
[0112] Among them, W oX and W oh Input x (t) And output h (t-1) The output gate weight of b o is the output gate threshold.
[0113] The network is trained using a long short-term memory network (LSTM). Taking the window size of 20 time steps and the prediction time step of 5 time steps as an example, the structure of the neural network is designed as follows: the number of input layers is 1, the number of neurons is 20 (i.e., the sliding window size), the number of hidden layers is 1, the number of neurons is 100, and the number of output layers is 1, and the number of neurons is 5. The loss function is a root mean square error loss function. When the loss function is used to train the hydrogen leakage model, the model parameters are gradient updated with the goal of minimizing the loss function, such as using the Adam optimizer for parameter update optimization. The network weights are continuously corrected so that the model can accurately predict the hydrogen concentration. After the training is completed, the test set data is input into the network for multi-step prediction and verified. The convergence condition can be set to the minimum loss function and convergence, or the maximum number of iterations, such as 250 times. When the convergence condition is met, the model training is completed.
[0114] like Figure 3 The embodiment of this specification provides a method for predicting hydrogen leakage of a hydrogen fuel cell vehicle, including:
[0115] Step 202, collecting hydrogen concentration data of a certain monitoring point in the fuel cell compartment at consecutive moments in the current time period, and forming a current hydrogen concentration sequence;
[0116] Step 204, based on the current hydrogen concentration sequence, calculate the current average hydrogen concentration sequence and the current hydrogen concentration change rate sequence of the monitoring point;
[0117] Step 206, input the current hydrogen concentration sequence, the current average hydrogen concentration sequence and the current hydrogen concentration change rate sequence of the monitoring point into the hydrogen leakage model of the monitoring point trained by the method of the above embodiment, and output the predicted hydrogen concentration sequence of the monitoring point;
[0118] Step 208, based on the predicted hydrogen concentration sequence of the monitoring point, obtain the hydrogen concentration data of the monitoring point at consecutive moments within the predicted time.
[0119] The method of the embodiment of this specification is executed on a computer device, and the computer device is configured with a trained hydrogen leakage model. The computer device is a control device such as a central processing unit.
[0120] The method of the embodiment of this specification puts the trained hydrogen leakage model into practical application, and predicts the hydrogen concentration at a future time based on the actually collected hydrogen concentration data.
[0121] Next, step 202 to step 208 will be described in detail.
[0122] In step 202, detectors for detecting hydrogen concentration, such as gas concentration sensors, are pre-arranged at various monitoring points of the fuel cell vehicle compartment. The gas concentration sensors collect hydrogen concentration data in real time and upload it to a computer device.
[0123] When predicting the hydrogen concentration of a fuel cell compartment, the data of each monitoring point can be obtained and the trained hydrogen leakage model of the corresponding monitoring point can be input for prediction.
[0124] In step 204, average hydrogen concentration data and hydrogen concentration change rate data at corresponding moments are calculated based on the collected hydrogen concentration data, and a corresponding sequence is formed.
[0125] In step 206, the current hydrogen concentration sequence, the current average hydrogen concentration sequence and the current hydrogen concentration change rate sequence of the monitoring point are input into the hydrogen leakage model for prediction to obtain the predicted hydrogen concentration sequence of the monitoring point.
[0126] In one implementation manner, the method of the embodiment of this specification further includes:
[0127] Step 208, when it is determined that the hydrogen concentration at a certain moment in the current hydrogen concentration sequence or the hydrogen concentration at a certain moment in the predicted hydrogen concentration sequence is greater than the concentration threshold, or the hydrogen concentration change rate is greater than the concentration change rate threshold, it is determined that there is a hydrogen leak at the monitoring point; the hydrogen concentration change rate = the difference between the hydrogen concentration at a certain moment at present and the hydrogen concentration at a certain moment at prediction / the difference between the hydrogen concentration at a certain moment at present and the hydrogen concentration at a certain moment at prediction.
[0128] In step 208, when one of the above conditions is met, it is determined that there is a hydrogen leak at the monitoring point, and it is determined that there is a hydrogen leak in the current fuel cell compartment.
[0129] When multiple monitoring points are judged and tested according to the above method, if there is hydrogen leakage at both monitoring point 1 and monitoring point 2, it can be determined that there is hydrogen leakage in the current fuel cell compartment, and the leakage location is at monitoring point 1 and monitoring point 2.
[0130] The concentration threshold and the concentration change rate threshold are set according to the hydrogen concentration data and the hydrogen concentration change rate data obtained during the simulation process.
[0131] In another implementation manner, the method of the embodiment of this specification further includes:
[0132] Step 209, when it is determined that the hydrogen concentration at a certain moment in the current hydrogen concentration sequence or the hydrogen concentration at a certain moment in the predicted hydrogen concentration sequence is greater than the first concentration threshold, or the hydrogen concentration change rate is greater than the concentration change rate threshold, it is determined that there is a slight hydrogen leak at the monitoring point;
[0133] When it is determined that the hydrogen concentration at a certain moment in the current hydrogen concentration sequence or the hydrogen concentration at a certain moment in the predicted hydrogen concentration sequence is greater than the second concentration threshold, it is determined that there is a moderate hydrogen leak at the monitoring point;
[0134] When it is determined that the hydrogen concentration at a certain moment in the current hydrogen concentration sequence or the hydrogen concentration at a certain moment in the predicted hydrogen concentration sequence is greater than the third concentration threshold, it is determined that there is a severe hydrogen leak at the monitoring point;
[0135] Among them, the first concentration threshold is smaller than the second concentration threshold and smaller than the third concentration threshold.
[0136] The above implementation can evaluate the degree of hydrogen leakage according to different pre-set concentration thresholds, and can determine whether there is hydrogen leakage in the current fuel cell compartment at different monitoring points, as well as the different degrees of hydrogen leakage, so as to facilitate timely and targeted solutions according to different leakage situations.
[0137] by Figure 4 For the purpose of specific examples, the embodiments of this specification subdivide the hydrogen leakage warning level, which is light leakage, moderate leakage and severe leakage according to the different hydrogen leakage concentrations. The first level is a general warning, the second level is a serious warning, and the third level is a major warning. The corresponding hydrogen concentration thresholds are 0.1%, 1.5%, and 2.5%, respectively, and the hydrogen concentration change rate threshold is 0.1% / s. For the first level warning: if at least one of the current hydrogen concentration and the hydrogen concentration in the next 5 moments is higher than 0.1% or the current hydrogen concentration change rate is higher than 0.1% / s, it is judged that hydrogen leakage has occurred, and a hydrogen leakage is reminded, the yellow light is on, and an alarm is issued; for the second level warning: if at least one of the current hydrogen concentration and the hydrogen concentration in the next 5 moments is higher than 1.5%, a serious hydrogen leakage alarm, a yellow light alarm, and the exhaust fan is turned on for exhaust; for the third level warning: if at least one of the current hydrogen concentration and the hydrogen concentration in the next 5 moments is higher than 2.5%, an emergency hydrogen leakage alarm, a red light alarm, a buzzer alarm, and the exhaust fan is turned on for exhaust, the car window sunroof is opened, and the machine is shut down for processing if necessary.
[0138] The training method of the embodiment of this specification uses a long short-term memory neural network (LSTM) to predict time series, which can quickly and effectively combine the hydrogen concentration and hydrogen concentration change rate in historical data to predict the hydrogen concentration in the future. In this way, the hydrogen concentration alarm limit can be triggered in advance, thereby shortening the hydrogen leak monitoring alarm time.
[0139] The prediction method of the embodiment of this specification can achieve fast and efficient prediction of safety risk level and leakage range. Based on current data and predicted data, the computer equipment makes corresponding instructions for different ranges of hydrogen concentration and sets timely and reasonable preventive measures to prevent the occurrence of potential dangers.
[0140] The embodiments described above are merely preferred embodiments of this specification and are not intended to limit the scope of this specification. Without departing from the design spirit of this specification, various modifications and improvements made to the technical solutions of this specification by ordinary technicians in this field should fall within the scope of protection determined by the claims of this specification.
Claims
1. A model training method, It is characterized in that include: Acquire training data of the monitoring point, the training data including a plurality of historical hydrogen concentration sequences, and corresponding historical average hydrogen concentration sequences, historical hydrogen concentration change rate sequences, and future hydrogen concentration sequences; wherein each historical hydrogen concentration sequence includes hydrogen concentration data at consecutive moments in a historical time period, and each future hydrogen concentration sequence includes hydrogen concentration data at consecutive moments in a future time period; the training data is obtained by performing leakage simulation on a three-dimensional structural model of a fuel cell compartment in the case of continuous leakage due to a rupture of a hydrogen supply pipeline; The step of obtaining training data of monitoring points includes: According to the monitoring point, the hydrogen concentration sequence of the monitoring point within a period of time, the corresponding average hydrogen concentration sequence of the monitoring point within a period of time, and the hydrogen concentration change rate sequence of the monitoring point within a period of time are obtained from the database; wherein the database stores the hydrogen concentration data, average hydrogen concentration data, and hydrogen concentration change rate data of multiple monitoring points under a certain fuel cell compartment simulation model at each continuous moment; the hydrogen concentration data of multiple monitoring points under a certain fuel cell compartment simulation model at each continuous moment are calculated based on the leakage simulation of the fuel cell compartment simulation model; the average hydrogen concentration data and hydrogen concentration change rate data of multiple monitoring points under a certain fuel cell compartment simulation model at each continuous moment are calculated based on the hydrogen concentration data of the corresponding monitoring points at each continuous moment; there are four multiple monitoring points under a certain fuel cell compartment simulation model, which are respectively located at monitoring points near two ventilation ports and monitoring points near two exhaust holes; Using a sliding window algorithm, hydrogen concentration data of multiple window sizes, average hydrogen concentration data of multiple window sizes, and hydrogen concentration change rate data of multiple window sizes are obtained from the hydrogen concentration sequence of the monitoring point within a period of time, the average hydrogen concentration sequence of the monitoring point within a period of time, and the hydrogen concentration change rate sequence of the monitoring point within a period of time. According to the prediction time step, the hydrogen concentration data of each window corresponding to the prediction time step is obtained from the hydrogen concentration sequence of the monitoring point within a period of time, and a future hydrogen concentration sequence corresponding to the hydrogen concentration data of each window size is formed; wherein the window size is determined based on the time step; the hydrogen concentration data under each window is a historical hydrogen concentration sequence, the average hydrogen concentration data under each window is a historical average hydrogen concentration sequence, and the hydrogen concentration change rate data under each window is a historical hydrogen concentration change rate sequence; Based on the training data, the hydrogen leakage model of the monitoring point is trained. The hydrogen leakage model is a neural network model. The training process is: Input the historical hydrogen concentration sequence, the corresponding historical average hydrogen concentration sequence and the historical hydrogen concentration change rate sequence into the hydrogen leakage model training, and output a predicted hydrogen concentration sequence; the predicted hydrogen concentration sequence includes hydrogen concentration data at consecutive moments within the prediction time; The loss function is used to predict and judge the future hydrogen concentration sequence and the predicted hydrogen concentration sequence. When the prediction result does not meet the convergence condition, the above training process is repeated until the convergence condition is met; when the prediction result meets the convergence condition, the hydrogen leakage model training is completed.
2. The method according to claim 1, It is characterized in that The window size is X time steps, and the prediction time step is Y time steps; X is not less than Y.
3. The method according to claim 1, It is characterized in that Before obtaining the training data of the monitoring points, the method also includes: performing leakage simulation based on the fuel cell compartment simulation model to obtain the hydrogen concentration data of different monitoring points in the fuel cell compartment simulation model at respective continuous moments.
4. The method according to claim 3, It is characterized in that The leakage simulation is performed based on the fuel cell compartment simulation model, including: Based on the fuel cell vehicle model, a three-dimensional structural model of the fuel cell vehicle box is constructed and several monitoring points are marked on the three-dimensional structural model; Fluid simulation software is used to perform leakage simulation on the three-dimensional structural model of the fuel cell vehicle box with marked monitoring points. During the simulation, the hydrogen leakage and diffusion process needs to satisfy the conservation of mass, momentum, and energy, and each component of hydrogen needs to satisfy the component transport equation.
5. The method according to claim 1, It is characterized in that The loss function is a root mean square error loss function. When the loss function is used to train the hydrogen leakage model, the model parameters are gradient updated with the goal of minimizing the loss function.
6. A method for predicting hydrogen leakage of hydrogen fuel cell vehicles, It is characterized in that include: Collect hydrogen concentration data of a certain monitoring point in the fuel cell vehicle compartment at continuous moments in the current time period and form a current hydrogen concentration sequence; Based on the current hydrogen concentration sequence, calculate the current average hydrogen concentration sequence and the current hydrogen concentration change rate sequence of the monitoring point; Inputting the current hydrogen concentration sequence, the current average hydrogen concentration sequence and the current hydrogen concentration change rate sequence of the monitoring point into the hydrogen leakage model of the monitoring point obtained by training according to the method of claim 1, and outputting the predicted hydrogen concentration sequence of the monitoring point; Based on the predicted hydrogen concentration sequence of the monitoring point, the hydrogen concentration data of the monitoring point at consecutive moments within the predicted time are obtained; When it is determined that the hydrogen concentration at a certain moment in the current hydrogen concentration sequence or the hydrogen concentration at a certain moment in the predicted hydrogen concentration sequence is greater than the concentration threshold, or the hydrogen concentration change rate is greater than the concentration change rate threshold, it is determined that there is a hydrogen leak at the monitoring point; the hydrogen concentration change rate = the difference between the hydrogen concentration at a certain moment at present and the hydrogen concentration at a certain moment at prediction / the difference between the current moment and the predicted moment at present.
7. The method according to claim 6, It is characterized in that Also includes: When it is determined that the hydrogen concentration at a certain moment in the current hydrogen concentration sequence or the hydrogen concentration at a certain moment in the predicted hydrogen concentration sequence is greater than the first concentration threshold, or the hydrogen concentration change rate is greater than the concentration change rate threshold, it is determined that there is a slight hydrogen leak at the monitoring point; When it is determined that the hydrogen concentration at a certain moment in the current hydrogen concentration sequence or the hydrogen concentration at a certain moment in the predicted hydrogen concentration sequence is greater than the second concentration threshold, it is determined that there is a moderate hydrogen leak at the monitoring point; When it is determined that the hydrogen concentration at a certain moment in the current hydrogen concentration sequence or the hydrogen concentration at a certain moment in the predicted hydrogen concentration sequence is greater than the third concentration threshold, it is determined that there is a severe hydrogen leak at the monitoring point; Among them, the first concentration threshold is smaller than the second concentration threshold and smaller than the third concentration threshold.
Citation Information
Patent Citations
Fuel cell PACK internal hydrogen concentration detection device and early warning method
CN117199448A
Large underground garage hydrogen leakage prediction and risk assessment method based on Informer model
CN117313191A
Modeling method and system for hydrogen leakage diffusion process
CN117875188A
Fuel cell fault diagnosis method and system
CN118114101A
Hydrogen leakage monitoring method based on deep learning algorithm
CN118245776A
Cited By
Generator hydrogen leakage dynamic monitoring and early warning method based on machine learning
CN121073202A
