Method and device for predicting gas leakage of power supply vehicle and electronic equipment

The whale optimization neural network algorithm model finely modeled and predicted the gas leakage of power vehicles, solving the problem of low accuracy of hydrogen leakage prediction in the prior art, and achieving high accuracy prediction and alarm functions in different scenarios.

CN118897967APending Publication Date: 2024-11-05GUANGDONG DIANWANG GONGSI YUNFU POWER SUPPLY BUREAU
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411019756.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2024-11-05

AI Technical Summary

Technical Problem

The existing hydrogen leakage prediction methods have low accuracy, lack mobility and dynamic adjustment capabilities, making it difficult to effectively predict gas leakage in different scenarios.

Method used

The whale optimization neural network algorithm model is adopted to establish a gas leakage model of the power supply vehicle, obtain data in various leakage scenarios, and optimize the neural network structure through the whale optimization algorithm to analyze and predict gas leakage data to achieve gas leakage Fine modeling and early warning.

Benefits of technology

It improves the accuracy and mobility of gas leakage prediction, can effectively predict gas leakage in different scenarios, and alarms are made when the preset threshold exceeds, ensuring the safety of the power supply vehicle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118897967A_ABST
    Figure CN118897967A_ABST
Patent Text Reader

Abstract

The invention provides a prediction method and a prediction device for gas leakage of a power supply vehicle, and electronic equipment. The method comprises the following steps: establishing a gas leakage model of the power supply vehicle, and acquiring gas leakage data of the gas leakage model under various leakage scenes; actual leakage data of the power supply vehicle at the current moment are obtained, the actual leakage data are analyzed through a whale optimization neural network algorithm model, a gas leakage predicted value at the next moment is obtained, the whale optimization neural network algorithm model is obtained through training of multiple sets of data, and the whale optimization neural network algorithm model is obtained through training of the multiple sets of data; each group of data in the plurality of groups of data comprises gas leakage data and a gas leakage predicted value; and when the gas leakage prediction value is greater than a preset threshold value, giving an alarm to warn the power supply vehicle that gas leakage occurs and take preventive measures. According to the invention, the accuracy of gas leakage prediction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of gas leakage warning for fuel vehicles, and in particular to a method for predicting gas leakage for power vehicles, a device for predicting gas leakage for power vehicles, a computer-readable storage medium, and an electronic device. Background Art

[0002] As environmental issues become increasingly prominent, traditional diesel generator sets as emergency power supplies can no longer meet current emission requirements. At the same time, new power systems have higher requirements for operational safety, stability and dynamic adjustment capabilities. Hydrogen energy, as an emerging energy source, has no pollution when used in power generation terminals such as hydrogen fuel cells. At the same time, in the vehicle field, the technical development and application of hydrogen fuel cell power systems are also gradually maturing. Therefore, the research and application of hydrogen fuel emergency power supply vehicles has broad prospects.

[0003] Of course, although hydrogen fuel emergency power supply vehicles have great potential and advantages, there are still potential safety issues in practical applications, and effective management and monitoring measures need to be taken to ensure their safety and reliability. By tracing the source of hydrogen safety issues, hydrogen leakage is undoubtedly one of the most important causes of accidents, so the monitoring and early warning of hydrogen leakage is particularly important.

[0004] There are many existing hydrogen leakage prediction methods. In summary, most of them use model-based or data-based machine learning or non-machine learning prediction methods. Each has its own advantages and disadvantages. The non-machine learning method has a simple structure and is easy to implement, but it has high requirements for the adaptability of the model and is not transferable. The prediction results may be biased. The machine learning method has higher prediction accuracy and is transferable. It can achieve adaptive dynamic adjustment, but it has higher requirements for data and computing power and a more complex structure.

[0005] Therefore, an optimized hydrogen leakage prediction method is needed to solve at least one of the above problems. Summary of the invention

[0006] The main purpose of the present application is to provide a method for predicting gas leakage of a power vehicle, a device for predicting gas leakage of a power vehicle, a computer-readable storage medium and an electronic device, so as to at least solve the problem of low accuracy of hydrogen leakage prediction in the prior art.

[0007] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for predicting gas leakage of a power supply vehicle is provided, comprising: establishing a gas leakage model of the power supply vehicle, and obtaining gas leakage data of the gas leakage model under various leakage scenarios; obtaining actual leakage data of the power supply vehicle at the current moment, analyzing the actual leakage data through a whale optimized neural network algorithm model, and obtaining a gas leakage prediction value at the next moment, wherein the whale optimized neural network algorithm model is trained using multiple sets of data, and each set of data in the multiple sets of data includes: the gas leakage data and a gas leakage prediction value; when the gas leakage prediction value is greater than a preset threshold, an alarm is issued to warn the power supply vehicle of a gas leakage and to take preventive measures.

[0008] Optionally, a gas leakage model of a power supply vehicle is established, and gas leakage data of the gas leakage model under various leakage scenarios are obtained, including: obtaining size information of the power supply vehicle, establishing a vehicle model based on the size information, setting a leakage port on the vehicle model, and meshing the vehicle model; establishing a mixed fluid model of leakage gas and air to simulate the leakage process of the leakage gas to obtain the gas leakage model; and performing transient solution on the gas leakage model under various leakage scenarios to obtain a plurality of gas leakage data.

[0009] Optionally, establishing a mixed fluid model of leaked gas and air includes: establishing a k transmission equation of the mixed fluid model as: Where k is the turbulent kinetic energy, G k is the turbulent kinetic energy brought by the laminar velocity gradient, G b is the turbulent kinetic energy brought by buoyancy, u i is the component of the velocity vector in the i direction, u j is the component of the velocity vector in the j direction, x j is the transmission distance in the j direction, x i is the transmission distance in the i direction, μ is the dynamic viscosity coefficient of the fluid, μ t is the turbulent viscosity coefficient of the fluid, Y M =2ρεMa 2 The dissipation term caused by wave expansion in compressible turbulence, Ma is the turbulent Mach number, ρ is the density, σ k is the Prandtl number of the k transport equation, ε represents the turbulent kinetic energy dissipation rate; the ε transport equation for establishing the mixed fluid model is: Among them, σ ε is the Prandtl number of the ε transport equation, C2 is the first constant, v represents the dynamic viscosity, C 1ε is the second constant, C 2ε is the third constant.

[0010] Optionally, before analyzing the actual leakage data through the whale optimization neural network algorithm model, the method also includes: establishing an initial BP neural network model and determining the initial structural parameters of the initial BP neural network model; training the initial structural parameters of the initial BP neural network model through the whale optimization algorithm based on the gas leakage data to optimize the initial structural parameters, obtain the optimal structural parameters, and obtain the whale optimization neural network algorithm model.

[0011] Optionally, before analyzing the actual leakage data by using the whale optimization neural network algorithm model, the method further includes: determining the initial model of the whale optimization algorithm as D=|C·X best (t)-X(t)| and X(t+1)=X best (t)-A·D, where D represents the distance vector, X best represents the local optimal position vector, X represents the position vector, t represents the current iteration number, t+1 represents the next iteration number of the current iteration number, A represents the first coefficient and A=2a·ra, C represents the second coefficient and A=2a·ra, r is a random number in [0,1], a represents the convergence factor and T represents the maximum number of iterations; through the formula D'=|X best (t)-X(t)| and X(t+1) = D'·e bl ·cos(2πl)+X best (t) updating the position vector, wherein b is a constant, l is a random number between [-1, 1], and D' represents the updated distance vector.

[0012] Optionally, before analyzing the actual leakage data by using the whale optimization neural network algorithm model, the method further includes: using the formula D = |C·X r (t)-X(t)| and X(t+1)=X r (t)-A·D determines the optimal parameter value of the whale optimization algorithm, where D represents the distance vector, X represents the position vector, A represents the first coefficient and A=2a·ra, r∈[0,1] is a random number, and a represents the convergence factor T represents the maximum number of iterations, t represents the current number of iterations, and X r represents a random position vector.

[0013] Optionally, the method further comprises: Determine the number of hidden layer nodes of the whale optimized neural network algorithm model, where q is the number of hidden layer nodes, m is the number of input layer nodes of the whale optimized neural network algorithm model, n is the number of output layer nodes of the whale optimized neural network algorithm model, and a is an integer between [1,10].

[0014] According to another aspect of the present application, a prediction device for gas leakage of a power supply vehicle is provided, comprising: an acquisition unit, used to establish a gas leakage model of the power supply vehicle, and obtain gas leakage data of the gas leakage model under various leakage scenarios; an analysis unit, used to obtain actual leakage data of the power supply vehicle at the current moment, and analyze the actual leakage data through a whale optimized neural network algorithm model to obtain a gas leakage prediction value at the next moment, wherein the whale optimized neural network algorithm model is trained using multiple sets of data, and each set of data in the multiple sets of data includes: the gas leakage data and the gas leakage prediction value; an alarm unit, used to alarm when the gas leakage prediction value is greater than a preset threshold, so as to warn the power supply vehicle of gas leakage and take preventive measures.

[0015] According to another aspect of the present application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the methods for predicting gas leakage of a power source vehicle.

[0016] According to another aspect of the present application, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for executing any one of the power source vehicle gas leakage prediction methods.

[0017] Apply the technical solution of this application to establish a gas leakage model of a power supply vehicle, and obtain gas leakage data of the gas leakage model under various leakage scenarios; obtain the actual leakage data of the power supply vehicle at the current moment, analyze the actual leakage data through the whale optimization neural network algorithm model, and obtain the gas leakage prediction value at the next moment, wherein the whale optimization neural network algorithm model is obtained by training with multiple sets of data, and each set of data in the multiple sets of data includes: gas leakage data and gas leakage prediction value; when the gas leakage prediction value is greater than the preset threshold, an alarm is issued to warn the power supply vehicle of gas leakage and take preventive measures. Compared with the methods with lower prediction accuracy in the prior art, this application improves the accuracy of the prediction effect by fine modeling of the leakage model and optimizing the parameters of the neural network prediction algorithm, optimizes the prediction algorithm itself, and improves the accuracy of the prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0019] Figure 1 A hardware structure block diagram of a mobile terminal for executing a method for predicting gas leakage of a power vehicle provided by an embodiment of the present application is shown;

[0020] Figure 2 A schematic flow chart of a method for predicting gas leakage in a power vehicle provided in an embodiment of the present application is shown;

[0021] Figure 3 A schematic diagram of a hydrogen leakage model of a vehicle compartment provided by an embodiment of the present application is shown;

[0022] Figure 4 A schematic diagram of the hardware arrangement of an early warning system provided in an embodiment of the present application is shown;

[0023] Figure 5 A specific method for predicting gas leakage of a power vehicle provided by an embodiment of the present application is shown;

[0024] Figure 6 A specific whale optimization neural network prediction algorithm flow chart provided in an embodiment of the present application is shown;

[0025] Figure 7 A structural block diagram of a device for predicting gas leakage in a power vehicle provided in an embodiment of the present application is shown.

[0026] The above drawings include the following reference numerals:

[0027] 102, processor; 104, memory; 106, transmission device; 108, input and output devices. DETAILED DESCRIPTION

[0028] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0029] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0031] For the convenience of description, some nouns or terms involved in the embodiments of the present application are explained below:

[0032] Whale Optimization Algorithm (WOA) is an optimization algorithm that simulates the hunting behavior of whales. Whales mainly rely on two strategies to hunt: one is to circle and gradually approach the prey, and the other is to create a strong water column to push the prey to the surface. WOA is designed based on these two strategies.

[0033] As introduced in the background technology, the accuracy of gas leakage prediction in the prior art is low. To solve the problem of low accuracy of gas leakage prediction, the embodiments of the present application provide a method for predicting gas leakage of a power supply vehicle, a device for predicting gas leakage of a power supply vehicle, a computer-readable storage medium and an electronic device.

[0034] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0035] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a method for predicting gas leakage in a power vehicle according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0036] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the prediction method of gas leakage of power vehicles in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, corporate intranets, local area networks, mobile communication networks and combinations thereof. The transmission device 106 is used to receive or send data via a network. The above-mentioned specific examples of the network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0037] In this embodiment, a method for predicting gas leakage of a power vehicle running on a mobile terminal, a computer terminal or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0038] Figure 2 FIG. 1 is a flow chart of a method for predicting gas leakage in a power vehicle according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:

[0039] Step S201, establishing a gas leakage model of a power supply vehicle, and obtaining gas leakage data of the gas leakage model under various leakage scenarios;

[0040] Specifically, taking the hydrogen fuel emergency power supply vehicle as an example, based on the physical parameters of the hydrogen fuel emergency power supply vehicle, a car compartment hydrogen leakage simulation model is established, and then the components where leakage may occur are identified, the hydrogen leakage port is selected, the flow basin grid is divided, and the inlet is refined. The Mixture model is used as a mixture model of hydrogen and air, and a suitable turbulence model is selected for the leakage behavior of hydrogen in space. Finally, the pressure-based solver PISO is used to perform transient solution of the hydrogen leakage process, thereby obtaining gas leakage data of the gas leakage model under various leakage scenarios.

[0041] Step S202, obtaining the actual leakage data of the power supply vehicle at the current moment, analyzing the actual leakage data through the whale optimization neural network algorithm model, and obtaining the gas leakage prediction value at the next moment, wherein the whale optimization neural network algorithm model is obtained by training with multiple sets of data, and each set of data in the multiple sets of data includes: the gas leakage data and the gas leakage prediction value;

[0042] Specifically, the gas leakage data obtained by the gas leakage model constitutes a hydrogen leakage database, and then the database data is normalized and divided into a training data set and a verification data set. A whale optimized (WOA) BP neural network algorithm is established, and the network structure is optimized by the whale optimization algorithm. The training data set is used for training to obtain a whale optimized neural network algorithm model. In this way, the above actual leakage data can be analyzed by the whale optimized neural network algorithm model to obtain the predicted value of gas leakage at the next moment and issue an early warning.

[0043] Step S203, when the gas leakage prediction value is greater than a preset threshold, an alarm is issued to warn the power supply vehicle of gas leakage and take preventive measures.

[0044] Specifically, according to the hydrogen leakage concentration prediction results of the model and algorithm, the next predicted value is used as an input parameter of the alarm system. When the concentration exceeds a preset threshold (usually set to less than 4%), the alarm system implements a buzzer warning.

[0045] Through this embodiment, a gas leakage model of a power supply vehicle is established, and gas leakage data of the gas leakage model under various leakage scenarios is obtained; the actual leakage data of the power supply vehicle at the current moment is obtained, and the actual leakage data is analyzed by the whale optimization neural network algorithm model to obtain the gas leakage prediction value at the next moment, wherein the whale optimization neural network algorithm model is obtained by training with multiple sets of data, and each set of data in the multiple sets of data includes: gas leakage data and gas leakage prediction value; when the gas leakage prediction value is greater than the preset threshold, an alarm is issued to warn the power supply vehicle of gas leakage and take preventive measures. Compared with the methods with lower prediction accuracy in the prior art, the present application improves the accuracy of the prediction effect by fine modeling of the leakage model and optimizing the parameters of the neural network prediction algorithm, optimizes the prediction algorithm itself, and improves the accuracy of the prediction.

[0046] In the specific implementation process, the above step S201 establishes a gas leakage model of the power supply vehicle and obtains the gas leakage data of the above gas leakage model in various leakage scenarios, which can be achieved through the following steps: Step S2011: obtain the size information of the above power supply vehicle, establish a vehicle model according to the above size information, set a leakage port on the above vehicle model, and mesh the above vehicle model; Step S2012: establish a mixed fluid model of leaking gas and air to simulate the leakage process of the above leaking gas and obtain the above gas leakage model; Step S2013: perform transient solution on the above gas leakage model in various leakage scenarios to obtain multiple gas leakage data. The method establishes a model and obtains simulation data through the above steps, so that multiple data can be obtained as training data sets to train the model.

[0047] Specifically, a vehicle compartment hydrogen leakage model is established, with a length, width and height of 4550×2500×2670mm and an initial leakage opening size of 1mm. Figure 3 As shown in the figure. The left port is used as the gas mass flow inlet of the system, while the body and interior components are defined as walls, and the ventilation window is a pressure outlet. This setting can simulate the flow behavior of hydrogen from the leak into the surrounding space. Divide the flow domain grid and ensure that the grid at the leak is fine enough. Through dense grid division, the detailed characteristics of hydrogen leakage can be captured more accurately, thereby improving the accuracy of the simulation results.

[0048] In some optional implementations, step S2012 establishes a mixed fluid model of leaked gas and air, which can be achieved by the following steps: The k transmission equation of the mixed fluid model is established as follows: Where k is the turbulent kinetic energy, G k is the turbulent kinetic energy brought by the laminar velocity gradient, G b is the turbulent kinetic energy brought by buoyancy, ui is the component of the velocity vector in the i direction, u j is the component of the velocity vector in the j direction, x j is the transmission distance in the j direction, x i is the transmission distance in the i direction, μ is the dynamic viscosity coefficient of the fluid, μ t is the turbulent viscosity coefficient of the fluid, Y M =2ρεMa 2 The dissipation term caused by wave expansion in compressible turbulence, Ma is the turbulent Mach number, ρ is the density, σ k is the Prandtl number of the above k transport equation, ε represents the turbulent kinetic energy dissipation rate; the ε transport equation for the above mixed fluid model is established as Among them, σ ε is the Prandtl number of the above ε transmission equation, C2 is the first constant, v represents the dynamic viscosity, C 1ε is the second constant, C 2ε is the third constant. The method establishes a mixed fluid model through the above steps, so that the diffusion scenario of hydrogen in the air can be simulated.

[0049] In the specific implementation process, in order to simulate the leakage behavior of hydrogen in space, the Mixture model is used to model the mixture of hydrogen and air. The plane where the leakage port is located is set as the no-slip wall, and the other surfaces are set as pressure outlets, and the pressure is set to standard atmospheric pressure. In the selection of turbulence model, the RNG k-ε model is used, and the standard wall function is selected. The continuity equation and momentum equation are: The k transmission equation and the ε transmission equation are as above, where u x ,u y ,u z is the flow velocity in the x, y, and z directions, and k is the turbulent kinetic energy in kg / m 3 ,u i is the component of the velocity vector in the i direction; u j is the component of the velocity vector in the j direction, in m / s; P is the pressure, x j is the transmission distance x in direction j i is the transmission distance in the i direction, in m, and the unit of the dynamic viscosity coefficient and the turbulent viscosity coefficient is kg / (m·s); Y M =2ρεMa 2 The dissipation term Ma caused by wave expansion in compressible turbulence is the turbulent Mach number; S k , S ε Customize heat source items for users. Since the density of hydrogen is significantly lower than that of air and has outstanding diffusivity, in order to ensure the accuracy of the simulation, the influence of gravity needs to be considered and the gravity acceleration is set to 9.8m / s 2. Open the energy equation and component transport equation, use the pressure-based solver PISO to perform transient solutions for hydrogen leakage, and save the flow field data. Simulate various leakage situations separately to obtain a small database of hydrogen leakage flow field information under the influence of multiple factors at multiple points.

[0050] In some optional embodiments, before analyzing the actual leakage data through the whale optimization neural network algorithm model, the method further includes the following steps: establishing an initial BP neural network model and determining the initial structural parameters of the initial BP neural network model; training the initial structural parameters of the initial BP neural network model through the whale optimization algorithm based on the gas leakage data to optimize the initial structural parameters, obtain the optimal structural parameters, and obtain the whale optimization neural network algorithm model. The method optimizes the BP neural network model through the whale optimization algorithm through the above steps, so that a more accurate neural network model can be obtained and hydrogen leakage can be predicted.

[0051] Specifically, the data in the database were split, and 429 groups of data were completed, each with 7 variables and 1 target quantity (hydrogen leakage mass flow rate). Then the 429 groups of sample data obtained by parametric design were normalized and differentiated, of which 200 groups were training sets and the remaining groups were validation sets. A whale optimization algorithm model was established, the optimal parameter values ​​were obtained through training, and then the initial BP neural network structure was established. Then, the parameters of the BP neural network structure were optimized through the whale algorithm (WOA).

[0052] In some other optional implementations, before analyzing the actual leakage data using the whale optimization neural network algorithm model, the method further includes: determining the initial model of the whale optimization algorithm as D = |C·X best (t)-X(t)| and X(t+1)=X best (t)-A·D, where D represents the distance vector, X best represents the local optimal position vector, X represents the position vector, t represents the current iteration number, t+1 represents the next iteration number of the current iteration number, A represents the first coefficient and A=2a·ra, C represents the second coefficient and A=2a·ra, r is a random number in [0,1], a represents the convergence factor and T represents the maximum number of iterations; through the formula D'=|X best (t)-X(t)| and X(t+1) = D'·e bl ·cos(2πl)+X best(t) Update the above position vector, where b is a constant, l is a random number between [-1,1], and D' represents the updated distance vector. The method establishes a whale optimization neural network algorithm model through the above steps, and optimizes the parameters of the BP neural network through the whale optimization algorithm to obtain more accurate parameters of the BP neural network.

[0053] Specifically, the optimization process of the whale optimization algorithm is as follows: first surround the prey to preliminarily determine the optimization range: when the whale is hunting, after identifying the approximate location of the optimal individual (i.e., the prey), the whale forms an encirclement under the guidance of the individual. Its mathematical model can be expressed as the above D = |C·X best (t)-X(t)| and X(t+1)=X best (t)-A·D, and then hunt prey by optimizing the path and method. After narrowing the activity range of the fish school, the whale will spray bubbles to the fish school to form a "bubble net" so that the fish school cannot escape. The whale has designed two hunting strategies here. One is the contraction and encirclement mechanism. The group presents a contraction and encirclement situation under the guidance of the global optimal solution. Through the formula X(t+1)=X best (t)-A·D updates the position information of the fish school to achieve the shrinkage and encirclement of the group; the other is to update the position in a spiral. By walking in a spiral, the whale can accurately capture the fish school in the area. The spiral update position can effectively improve the local optimization ability of the whale optimization (WOA) algorithm. Its mathematical model is as follows: D'=|X best (t)-X(t)| and X(t+1) = D'·e bl ·cos(2πl)+X best (t).

[0054] In some optional embodiments, before analyzing the actual leakage data by using the whale optimization neural network algorithm model, the method further includes the following steps: r (t)-X(t)| and X(t+1)=X r (t)-A·D determines the optimal parameter value of the whale optimization algorithm, where D represents the distance vector, X represents the position vector, A represents the first coefficient and A=2a·ra, r∈[0,1] is a random number, and a represents the convergence factor T represents the maximum number of iterations, t represents the current number of iterations, and X r Represents a random position vector. This method determines the optimal parameter value of the whale optimization algorithm through the above steps, which makes the prediction function of the model more accurate.

[0055] In the specific implementation process, the whale optimization algorithm finally captures the prey and determines the optimal parameters: the whale population will perform random search when hunting. The random search uses the A value and the random parameter p as a reference, and the individual whale will perform random optimization. Its mathematical model is as above: D = | C·X r (t)-X(t)| and X(t+1)=X r (t)-A·D, when the number of iterations meets the requirements, the optimal parameter value is output.

[0056] In some optional embodiments, the above method further comprises the following steps: Determine the number of hidden layer nodes of the whale optimized neural network algorithm model, where q is the number of hidden layer nodes, m is the number of input layer nodes of the whale optimized neural network algorithm model, n is the number of output layer nodes of the whale optimized neural network algorithm model, and a is an integer between [1,10]. The method establishes a whale optimized neural network algorithm model through the above steps, so that hydrogen leakage can be predicted according to the final determined model, making the prediction result more accurate.

[0057] In the specific implementation process, the initial BP neural network structure is finally established, and then the parameters of the BP neural network structure are optimized through the whale algorithm (WOA). The optimized WOA-BP neural network model has a 3-layer structure, with 6 input layer nodes, corresponding to 7 variables in the original data; the number of output layer nodes is 1, corresponding to the mass flow rate of hydrogen leakage. The number of hidden layer nodes is 12.

[0058] Finally, a hydrogen leakage warning system is established. The hardware layout of the warning system is as follows: Figure 4 As shown, the hydrogen concentration value data at the leakage port is monitored and collected by the hydrogen sensor and transmitted to the early warning system, and then the hydrogen leakage prediction value at the next moment is predicted through the model and algorithm, and the system decides whether to issue a buzzer warning based on whether the predicted concentration value exceeds the 4% warning value.

[0059] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the method for predicting gas leakage of a power vehicle of the present application will be described in detail below in conjunction with specific embodiments.

[0060] This embodiment relates to a specific method for predicting gas leakage in a power vehicle, such as Figure 5 As shown, the following steps are included:

[0061] Step S1: building a hydrogen leakage simulation model;

[0062] Step S2: Simulate different conditions and establish a hydrogen leakage simulation database;

[0063] Step S3: Building a whale optimized neural network (WOA-BP) prediction algorithm;

[0064] Step S4: training the algorithm using database data;

[0065] Step S5: inputting hydrogen sensor data into the algorithm for prediction;

[0066] Step S6: Determine whether the predicted value at the next moment exceeds the set warning value of 4% (the prediction time granularity is determined to be 10ms considering the example limitation and the hydrogen combustion rate). If yes, execute step S7; if not, execute step S8;

[0067] Step S7: the early warning system buzzes and alarms;

[0068] Step S8: Do not issue a buzzer warning and continue prediction, and return to step S5.

[0069] This embodiment relates to a specific Whale Optimized Neural Network (WOA-BP) prediction algorithm flow chart, such as Figure 6 As shown:

[0070] Step S11: start;

[0071] Step S12: input data and perform normalization processing;

[0072] Step S13: Determine the BP neural network topology structure;

[0073] Step S14: Initialize BP threshold and weight, t=0;

[0074] Step S15: determine whether t<maximum number of iterations T, if yes, execute step S16, if no, execute step S20;

[0075] Step S16: outputting the optimal weight and threshold;

[0076] Step S17: BP neural network training;

[0077] Step S18: Update weights and thresholds based on errors;

[0078] Step S19: determine whether the accuracy requirement is met or the maximum number of iterations is reached. If yes, perform training and simulation prediction and output the results. If no, execute step S17.

[0079] Step S20: constraining the population within the boundary;

[0080] Step S21: Save the current best position of the population in X best ;

[0081] Step S22: Generate a random number p and update parameters a, A, C;

[0082] Step S23: Determine if P≥0.5. If yes, execute step S24. If no, calculate according to formula 3 (D=|C·X best (t)-X(t)| and X(t+1)=X best (t)-A·D) Update population position;

[0083] Step S24: |A|≤1, if yes, according to formula 1 (D=|C·X r (t)-X(t)| and X(t+1)=X r (t)-A·D) updates the population position. If not, according to Formula 2 (D = |C·X best (t)-X(t)| and X(t+1)=X best (t)-A·D) updates the population position and returns to step S15.

[0084] The embodiment of the present application also provides a device for predicting gas leakage of a power supply vehicle. It should be noted that the device for predicting gas leakage of a power supply vehicle in the embodiment of the present application can be used to execute the method for predicting gas leakage of a power supply vehicle provided in the embodiment of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0085] The following is an introduction to the prediction device for gas leakage in a power supply vehicle provided in an embodiment of the present application.

[0086] Figure 7 Schematic diagram of a device for predicting gas leakage in a power vehicle according to an embodiment of the present application. Figure 7 As shown, the device comprises:

[0087] An acquisition unit 10 is used to establish a gas leakage model of a power supply vehicle and obtain gas leakage data of the gas leakage model under various leakage scenarios;

[0088] Specifically, taking the hydrogen fuel emergency power supply vehicle as an example, based on the physical parameters of the hydrogen fuel emergency power supply vehicle, a car compartment hydrogen leakage simulation model is established, and then the components where leakage may occur are identified, the hydrogen leakage port is selected, the flow basin grid is divided, and the inlet is refined. The Mixture model is used as a mixture model of hydrogen and air, and a suitable turbulence model is selected for the leakage behavior of hydrogen in space. Finally, the pressure-based solver PISO is used to perform transient solution of the hydrogen leakage process, thereby obtaining gas leakage data of the gas leakage model under various leakage scenarios.

[0089] The analysis unit 20 is used to obtain the actual leakage data of the power supply vehicle at the current moment, analyze the actual leakage data through the whale optimization neural network algorithm model, and obtain the gas leakage prediction value at the next moment, wherein the whale optimization neural network algorithm model is obtained by training with multiple sets of data, and each set of data in the multiple sets of data includes: the gas leakage data and the gas leakage prediction value;

[0090] Specifically, the gas leakage data obtained by the gas leakage model constitutes a hydrogen leakage database, and then the database data is normalized and divided into a training data set and a verification data set. A whale optimized (WOA) BP neural network algorithm is established, and the network structure is optimized by the whale optimization algorithm. The training data set is used for training to obtain a whale optimized neural network algorithm model. In this way, the above actual leakage data can be analyzed by the whale optimized neural network algorithm model to obtain the predicted value of gas leakage at the next moment and issue an early warning.

[0091] The alarm unit 30 is used to sound an alarm when the gas leakage prediction value is greater than a preset threshold value, so as to warn the power supply vehicle of gas leakage and take preventive measures.

[0092] Specifically, according to the hydrogen leakage concentration prediction results of the model and algorithm, the next predicted value is used as an input parameter of the alarm system. When the concentration exceeds a preset threshold (usually set to less than 4%), the alarm system implements a buzzer warning.

[0093] Through this embodiment, a gas leakage model of a power supply vehicle is established, and gas leakage data of the gas leakage model under various leakage scenarios is obtained; the actual leakage data of the power supply vehicle at the current moment is obtained, and the actual leakage data is analyzed by the whale optimization neural network algorithm model to obtain the gas leakage prediction value at the next moment, wherein the whale optimization neural network algorithm model is obtained by training with multiple sets of data, and each set of data in the multiple sets of data includes: gas leakage data and gas leakage prediction value; when the gas leakage prediction value is greater than the preset threshold, an alarm is issued to warn the power supply vehicle of gas leakage and take preventive measures. Compared with the devices with lower prediction accuracy in the prior art, the present application improves the accuracy of the prediction effect by fine modeling of the leakage model and optimizing the parameters of the neural network prediction algorithm, optimizes the prediction algorithm itself, and improves the accuracy of the prediction.

[0094] In the specific implementation process, the acquisition unit includes a division module, a building module and a solution module. The division module is used to obtain the size information of the power vehicle, build a vehicle model according to the size information, set a leakage port on the vehicle model, and mesh the vehicle model; the building module is used to build a mixed fluid model of leaking gas and air to simulate the leakage process of the leaking gas and obtain the gas leakage model; the solution module is used to perform transient solution on the gas leakage model under multiple leakage scenarios to obtain multiple gas leakage data. The device builds a model and obtains simulation data through the above steps, so that multiple data can be obtained as training data sets to train the model.

[0095] Specifically, a vehicle compartment hydrogen leakage model is established, with a length, width and height of 4550×2500×2670mm and an initial leakage opening size of 1mm. Figure 3 As shown, Figure 3 The upper part is the overall model of the car, and the lower part is an enlarged view of the leak. The left port (black protrusion) serves as the gas mass flow inlet of the system, while the body and interior components are defined as walls, and the ventilation window is a pressure outlet. This setting can simulate the flow behavior of hydrogen from the leak into the surrounding space. Divide the flow domain grid and ensure that the grid at the leak is fine enough. Through dense grid division, the detailed characteristics of hydrogen leakage can be captured more accurately, thereby improving the accuracy of the simulation results.

[0096] In some optional embodiments, the establishment module includes a first establishment submodule and a second establishment submodule, and the first establishment submodule is used to establish the k transmission equation of the mixed fluid model as follows: Where k is the turbulent kinetic energy, G k is the turbulent kinetic energy brought by the laminar velocity gradient, G b is the turbulent kinetic energy brought by buoyancy, ui is the component of the velocity vector in the i direction, u j is the component of the velocity vector in the j direction, x j is the transmission distance in the j direction, x i is the transmission distance in the i direction, μ is the dynamic viscosity coefficient of the fluid, μ t is the turbulent viscosity coefficient of the fluid, Y M =2ρεMa 2 The dissipation term caused by wave expansion in compressible turbulence, Ma is the turbulent Mach number, ρ is the density, σ k is the Prandtl number of the above k transport equation, ε represents the turbulent kinetic energy dissipation rate; the second establishment submodule is used to establish the ε transport equation of the above mixed fluid model: Among them, σ ε is the Prandtl number of the above ε transmission equation, C2 is the first constant, v represents the dynamic viscosity, C 1ε is the second constant, C 2ε is the third constant. The device establishes a mixed fluid model through the above steps, so that the diffusion scene of hydrogen in the air can be simulated.

[0097] In the specific implementation process, in order to simulate the leakage behavior of hydrogen in space, the Mixture model is used to model the mixture of hydrogen and air. The plane where the leakage port is located is set as the no-slip wall, and the other surfaces are set as pressure outlets, and the pressure is set to standard atmospheric pressure. In the selection of turbulence model, the RNG k-ε model is used, and the standard wall function is selected. The continuity equation and momentum equation are: The k transmission equation and the ε transmission equation are as above, where u x ,u y ,u z is the flow velocity in the x, y, and z directions, and k is the turbulent kinetic energy in kg / m 3 ,u i is the component of the velocity vector in the i direction; u j is the component of the velocity vector in the j direction, in m / s; P is the pressure, x j is the transmission distance x in direction j i is the transmission distance in the i direction, in m, and the unit of the dynamic viscosity coefficient and the turbulent viscosity coefficient is kg / (m·s); Y M =2ρεMa 2 The dissipation term Ma caused by wave expansion in compressible turbulence is the turbulent Mach number; S k , S ε Customize heat source items for users. Since the density of hydrogen is significantly lower than that of air and has outstanding diffusivity, in order to ensure the accuracy of the simulation, the influence of gravity needs to be considered and the gravity acceleration is set to 9.8m / s2 . Open the energy equation and component transport equation, use the pressure-based solver PISO to perform transient solutions for hydrogen leakage, and save the flow field data. Simulate various leakage situations separately to obtain a small database of hydrogen leakage flow field information under the influence of multiple factors at multiple points.

[0098] In some optional embodiments, before analyzing the actual leakage data through the whale optimization neural network algorithm model, the device further includes an establishment unit and a training unit, the establishment unit is used to establish an initial BP neural network model and determine the initial structural parameters of the initial BP neural network model; the training unit is used to train the initial structural parameters of the initial BP neural network model through the whale optimization algorithm based on the gas leakage data to optimize the initial structural parameters, obtain the optimal structural parameters, and obtain the whale optimization neural network algorithm model. The device optimizes the BP neural network model through the whale optimization algorithm through the above steps, so that a more accurate neural network model can be obtained and hydrogen leakage can be predicted.

[0099] Specifically, the data in the database were split, and 429 groups of data were completed, each with 7 variables and 1 target quantity (hydrogen leakage mass flow rate). Then the 429 groups of sample data obtained by parametric design were normalized and differentiated, of which 200 groups were training sets and the remaining groups were validation sets. A whale optimization algorithm model was established, the optimal parameter values ​​were obtained through training, and then the initial BP neural network structure was established. Then, the parameters of the BP neural network structure were optimized through the whale algorithm (WOA).

[0100] In some other optional embodiments, before analyzing the actual leakage data by the whale optimization neural network algorithm model, the device further includes a first determination unit and an update unit, wherein the first determination unit is used to determine that the initial model of the whale optimization algorithm is D=|C·X best (t)-X(t)| and X(t+1)=X best (t)-A·D, where D represents the distance vector, X best represents the local optimal position vector, X represents the position vector, t represents the current iteration number, t+1 represents the next iteration number of the current iteration number, A represents the first coefficient and A=2a·ra, C represents the second coefficient and A=2a·ra, r is a random number in [0,1], a represents the convergence factor and T represents the maximum number of iterations; the update unit is used to pass the formula D'=|X best (t)-X(t), and X(t+1)=D'·e bl ·cos(2πl)+X best(t) updating the above position vector, wherein b is a constant, l is a random number between [-1,1], and D' represents the updated distance vector. The device establishes a whale optimization neural network algorithm model through the above steps, and optimizes the parameters of the BP neural network through the whale optimization algorithm to obtain more accurate parameters of the BP neural network.

[0101] Specifically, the optimization process of the whale optimization algorithm is as follows: first surround the prey to preliminarily determine the optimization range: when the whale is hunting, after identifying the approximate location of the optimal individual (i.e., the prey), the whale forms an encirclement under the guidance of the individual. Its mathematical model can be expressed as the above D = |C·X best (t)-X(t)| and X(t+1)=X best (t)-A·D, and then hunt prey by optimizing the path and device. After narrowing the activity range of the fish school, the whale will spray bubbles to the fish school to form a "bubble net" so that the fish school cannot escape. The whale has designed two hunting strategies here. One is the contraction and encirclement mechanism. The group presents a contraction and encirclement situation under the guidance of the global optimal solution. Through the formula X(t+1)=X best (t)-A·D updates the position information of the fish school to achieve the shrinkage and encirclement of the group; the other is to update the position in a spiral. By walking in a spiral, the whale can accurately capture the fish school in the area. The spiral update position can effectively improve the local optimization ability of the whale optimization (WOA) algorithm. Its mathematical model is as follows: D'=|X best (t)-X(t)| and X(t+1) = D'·e bl ·cos(2πl)+X best (t).

[0102] In some optional embodiments, before analyzing the actual leakage data by using the whale optimization neural network algorithm model, the device further includes a second determination unit for determining the actual leakage data by using the formula D=|C·X r (t)-X(t)| and X(t+1)=X r (t)-A·D determines the optimal parameter value of the whale optimization algorithm, where D represents the distance vector, X represents the position vector, A represents the first coefficient and A=2a·ra, r∈[0,1] is a random number, and a represents the convergence factor T represents the maximum number of iterations, t represents the current number of iterations, and X r Represents a random position vector. The device determines the optimal parameter value of the whale optimization algorithm through the above steps, so that the prediction function of the model is more accurate.

[0103] In the specific implementation process, the whale optimization algorithm finally captures the prey and determines the optimal parameters: the whale population will perform random search when hunting. The random search uses the A value and the random parameter p as a reference, and the individual whale will perform random optimization. Its mathematical model is as above: D = | C·X r (t)-X(t)| and X(t+1)=X r (t)-A·D, when the number of iterations meets the requirements, the optimal parameter value is output.

[0104] In some optional implementations, the apparatus further includes a third determining unit configured to: Determine the number of hidden layer nodes of the whale optimized neural network algorithm model, where q is the number of hidden layer nodes, m is the number of input layer nodes of the whale optimized neural network algorithm model, n is the number of output layer nodes of the whale optimized neural network algorithm model, and a is an integer between [1,10]. The device establishes a whale optimized neural network algorithm model through the above steps, so that hydrogen leakage can be predicted according to the final determined model, making the prediction result more accurate.

[0105] In the specific implementation process, the initial BP neural network structure is finally established, and then the parameters of the BP neural network structure are optimized through the whale algorithm (WOA). The optimized WOA-BP neural network model has a 3-layer structure, with 6 input layer nodes, corresponding to 7 variables in the original data; the number of output layer nodes is 1, corresponding to the mass flow rate of hydrogen leakage. The number of hidden layer nodes is 12.

[0106] Finally, a hydrogen leakage warning system is established. The hardware layout logic of the warning system is as follows: Figure 4 As shown, it includes a vehicle control unit VCU, an electric drive system, an early warning system, an inverter DC / DC, a power battery system and a hydrogen fuel cell system. In addition, at least five hydrogen sensors are installed in the cab, the motor assembly, the fuel cell assembly, the hydrogen filling port and the tail exhaust. The hydrogen concentration value data at the leakage port is monitored and collected by the hydrogen sensor and transmitted to the early warning system. The hydrogen leakage prediction value at the next moment is predicted through the model and algorithm, and the system decides whether to issue a buzzer warning based on whether the predicted concentration value exceeds the 4% warning value.

[0107] The above-mentioned prediction device for gas leakage of power supply vehicle includes a processor and a memory. The above-mentioned acquisition unit, analysis unit and alarm unit are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize the corresponding functions. The above-mentioned modules are all located in the same processor; or, the above-mentioned modules are located in different processors in any combination.

[0108] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the accuracy of gas leakage prediction can be improved by adjusting kernel parameters.

[0109] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0110] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for predicting gas leakage in a power source vehicle.

[0111] Specifically, the prediction method of gas leakage of power supply vehicles includes:

[0112] Step S201, establishing a gas leakage model of a power supply vehicle, and obtaining gas leakage data of the gas leakage model under various leakage scenarios;

[0113] Specifically, taking the hydrogen fuel emergency power supply vehicle as an example, based on the physical parameters of the hydrogen fuel emergency power supply vehicle, a car compartment hydrogen leakage simulation model is established, and then the components where leakage may occur are identified, the hydrogen leakage port is selected, the flow basin grid is divided, and the inlet is refined. The Mixture model is used as a mixture model of hydrogen and air, and a suitable turbulence model is selected for the leakage behavior of hydrogen in space. Finally, the pressure-based solver PISO is used to perform transient solution of the hydrogen leakage process, thereby obtaining gas leakage data of the gas leakage model under various leakage scenarios.

[0114] Step S202, obtaining the actual leakage data of the power supply vehicle at the current moment, analyzing the actual leakage data through the whale optimization neural network algorithm model, and obtaining the gas leakage prediction value at the next moment, wherein the whale optimization neural network algorithm model is obtained by training with multiple sets of data, and each set of data in the multiple sets of data includes: the gas leakage data and the gas leakage prediction value;

[0115] Specifically, the gas leakage data obtained by the gas leakage model constitutes a hydrogen leakage database, and then the database data is normalized and divided into a training data set and a verification data set. A whale optimized (WOA) BP neural network algorithm is established, and the network structure is optimized by the whale optimization algorithm. The training data set is used for training to obtain a whale optimized neural network algorithm model. In this way, the above actual leakage data can be analyzed by the whale optimized neural network algorithm model to obtain the predicted value of gas leakage at the next moment and issue an early warning.

[0116] Step S203, when the gas leakage prediction value is greater than a preset threshold, an alarm is issued to warn the power supply vehicle of gas leakage and take preventive measures.

[0117] Specifically, according to the hydrogen leakage concentration prediction results of the model and algorithm, the next predicted value is used as an input parameter of the alarm system. When the concentration exceeds a preset threshold (usually set to less than 4%), the alarm system implements a buzzer warning.

[0118] An embodiment of the present invention provides an electronic device, including a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, at least the following steps are implemented:

[0119] Step S201, establishing a gas leakage model of a power supply vehicle, and obtaining gas leakage data of the gas leakage model under various leakage scenarios;

[0120] Specifically, taking the hydrogen fuel emergency power supply vehicle as an example, based on the physical parameters of the hydrogen fuel emergency power supply vehicle, a car compartment hydrogen leakage simulation model is established, and then the components where leakage may occur are identified, the hydrogen leakage port is selected, the flow basin grid is divided, and the inlet is refined. The Mixture model is used as a mixture model of hydrogen and air, and a suitable turbulence model is selected for the leakage behavior of hydrogen in space. Finally, the pressure-based solver PISO is used to perform transient solution of the hydrogen leakage process, thereby obtaining gas leakage data of the gas leakage model under various leakage scenarios.

[0121] Step S202, obtaining the actual leakage data of the power supply vehicle at the current moment, analyzing the actual leakage data through the whale optimization neural network algorithm model, and obtaining the gas leakage prediction value at the next moment, wherein the whale optimization neural network algorithm model is obtained by training with multiple sets of data, and each set of data in the multiple sets of data includes: the gas leakage data and the gas leakage prediction value;

[0122] Specifically, the gas leakage data obtained by the gas leakage model constitutes a hydrogen leakage database, and then the database data is normalized and divided into a training data set and a verification data set. A whale optimized (WOA) BP neural network algorithm is established, and the network structure is optimized by the whale optimization algorithm. The training data set is used for training to obtain a whale optimized neural network algorithm model. In this way, the above actual leakage data can be analyzed by the whale optimized neural network algorithm model to obtain the predicted value of gas leakage at the next moment and issue an early warning.

[0123] Step S203, when the gas leakage prediction value is greater than a preset threshold, an alarm is issued to warn the power supply vehicle of gas leakage and take preventive measures.

[0124] Specifically, according to the hydrogen leakage concentration prediction results of the model and algorithm, the next predicted value is used as an input parameter of the alarm system. When the concentration exceeds a preset threshold (usually set to less than 4%), the alarm system implements a buzzer warning.

[0125] The devices in this article can be servers, PCs, PADs, mobile phones, etc.

[0126] The present application also provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the above method in each embodiment of the present application are implemented:

[0127] Step S201, establishing a gas leakage model of a power supply vehicle, and obtaining gas leakage data of the gas leakage model under various leakage scenarios;

[0128] Specifically, taking the hydrogen fuel emergency power supply vehicle as an example, based on the physical parameters of the hydrogen fuel emergency power supply vehicle, a car compartment hydrogen leakage simulation model is established, and then the components where leakage may occur are identified, the hydrogen leakage port is selected, the flow basin grid is divided, and the inlet is refined. The Mixture model is used as a mixture model of hydrogen and air, and a suitable turbulence model is selected for the leakage behavior of hydrogen in space. Finally, the pressure-based solver PISO is used to perform transient solution of the hydrogen leakage process, thereby obtaining gas leakage data of the gas leakage model under various leakage scenarios.

[0129] Step S202, obtaining the actual leakage data of the power supply vehicle at the current moment, analyzing the actual leakage data through the whale optimization neural network algorithm model, and obtaining the gas leakage prediction value at the next moment, wherein the whale optimization neural network algorithm model is obtained by training with multiple sets of data, and each set of data in the multiple sets of data includes: the gas leakage data and the gas leakage prediction value;

[0130] Specifically, the gas leakage data obtained by the gas leakage model constitutes a hydrogen leakage database, and then the database data is normalized and divided into a training data set and a verification data set. A whale optimized (WOA) BP neural network algorithm is established, and the network structure is optimized by the whale optimization algorithm. The training data set is used for training to obtain a whale optimized neural network algorithm model. In this way, the above actual leakage data can be analyzed by the whale optimized neural network algorithm model to obtain the predicted value of gas leakage at the next moment and issue an early warning.

[0131] Step S203, when the gas leakage prediction value is greater than a preset threshold, an alarm is issued to warn the power supply vehicle of gas leakage and take preventive measures.

[0132] Specifically, according to the hydrogen leakage concentration prediction results of the model and algorithm, the next predicted value is used as an input parameter of the alarm system. When the concentration exceeds a preset threshold (usually set to less than 4%), the alarm system implements a buzzer warning.

[0133] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0134] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0135] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0136] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0137] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0138] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0139] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0140] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0141] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0142] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:

[0143] 1) In the prediction method of gas leakage of power supply vehicles of the present application, a gas leakage model of the power supply vehicle is established, and gas leakage data of the gas leakage model under various leakage scenarios are obtained; the actual leakage data of the power supply vehicle at the current moment is obtained, and the actual leakage data is analyzed by the whale optimization neural network algorithm model to obtain the gas leakage prediction value at the next moment, wherein the whale optimization neural network algorithm model is obtained by training with multiple sets of data, and each set of data in the multiple sets of data includes: gas leakage data and gas leakage prediction value; when the gas leakage prediction value is greater than the preset threshold, an alarm is issued to warn the power supply vehicle of gas leakage and take preventive measures. Compared with the methods with lower prediction accuracy in the prior art, the present application improves the accuracy of the prediction effect by fine modeling of the leakage model and optimizing the parameters of the neural network prediction algorithm, optimizes the prediction algorithm itself, and improves the accuracy of the prediction.

[0144] 2) In the prediction device for gas leakage of power supply vehicles of the present application, a gas leakage model of the power supply vehicle is established, and gas leakage data of the gas leakage model under various leakage scenarios are obtained; the actual leakage data of the power supply vehicle at the current moment is obtained, and the actual leakage data is analyzed by the whale optimization neural network algorithm model to obtain the gas leakage prediction value at the next moment, wherein the whale optimization neural network algorithm model is obtained by training with multiple sets of data, and each set of data in the multiple sets of data includes: gas leakage data and gas leakage prediction value; when the gas leakage prediction value is greater than the preset threshold, an alarm is issued to warn the power supply vehicle of gas leakage and take preventive measures. Compared with the methods with lower prediction accuracy in the prior art, the present application improves the accuracy of the prediction effect by fine modeling of the leakage model and optimizing the parameters of the neural network prediction algorithm, optimizes the prediction algorithm itself, and improves the accuracy of the prediction.

[0145] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for predicting gas leakage in power vehicles, It is characterized in that include: Establishing a gas leakage model of a power supply vehicle, and obtaining gas leakage data of the gas leakage model under various leakage scenarios; Acquire actual leakage data of the power supply vehicle at the current moment, analyze the actual leakage data through a whale optimization neural network algorithm model, and obtain a gas leakage prediction value at the next moment, wherein the whale optimization neural network algorithm model is obtained by training with multiple sets of data, and each set of data in the multiple sets of data includes: the gas leakage data and the gas leakage prediction value; When the predicted value of gas leakage is greater than a preset threshold, an alarm is issued to warn the power supply vehicle of gas leakage and take preventive measures.

2. The prediction method according to claim 1, It is characterized in that Establish a gas leakage model of the power vehicle, and obtain gas leakage data of the gas leakage model under various leakage scenarios, including: Acquiring dimension information of the power supply vehicle, establishing a vehicle model according to the dimension information, setting a leakage port on the vehicle model, and meshing the vehicle model; Establishing a mixed fluid model of leaking gas and air to simulate the leakage process of the leaking gas and obtain the gas leakage model; Under the various leakage scenarios, the gas leakage model is transiently solved to obtain a plurality of gas leakage data.

3. The prediction method according to claim 2, It is characterized in that Establish a mixed fluid model of leaking gas and air, including: The k transport equation for the mixed fluid model is established as Where k is the turbulent kinetic energy, G k is the turbulent kinetic energy brought by the laminar velocity gradient, G b is the turbulent kinetic energy brought by buoyancy, u i is the component of the velocity vector in the i direction, u j is the component of the velocity vector in the j direction, x j is the transmission distance in the j direction, x i is the transmission distance in the i direction, μ is the dynamic viscosity coefficient of the fluid, μ t is the turbulent viscosity coefficient of the fluid, Y M =2ρεMa 2 The dissipation term caused by wave expansion in compressible turbulence, Ma is the turbulent Mach number, ρ is the density, σ k is the Prandtl number of the k transport equation, ε represents the turbulent kinetic energy dissipation rate; The ε transport equation for the mixed fluid model is established as Among them, σ ε is the Prandtl number of the ε transport equation, C 2 is the first constant, v represents the dynamic viscosity, C 1ε is the second constant, C 2ε is the third constant.

4. The prediction method according to claim 1, It is characterized in that Before analyzing the actual leakage data by using the whale optimization neural network algorithm model, the method further includes: Establishing an initial BP neural network model, and determining initial structural parameters of the initial BP neural network model; Based on the gas leakage data, the initial structural parameters of the initial BP neural network model are trained by the whale optimization algorithm to optimize the initial structural parameters, obtain the optimal structural parameters, and obtain the whale optimization neural network algorithm model.

5. The prediction method according to claim 1, It is characterized in that Before analyzing the actual leakage data by using the whale optimization neural network algorithm model, the method further includes: Determine the initial model of the whale optimization algorithm as D = |C·X best (t)-X(t)| and X(t+1)=X best (t)-A·D, where D represents the distance vector, X best represents the local optimal position vector, X represents the position vector, t represents the current iteration number, t+1 represents the next iteration number of the current iteration number, A represents the first coefficient and A=2a·ra, C represents the second coefficient and A=2a·ra, r is a random number in [0,1], a represents the convergence factor and T represents the maximum number of iterations; By the formula D'=|X best (t)-X(t)| and X(t+1) = D'·e bl ·cos(2πl)+X best (t) updating the position vector, wherein b is a constant, l is a random number between [-1, 1], and D' represents the updated distance vector.

6. The prediction method according to claim 1, It is characterized in that Before analyzing the actual leakage data by using the whale optimization neural network algorithm model, the method further includes: By the formula D = |C·X r (t)-X(t)| and X(t+1)=X r (t)-A·D determines the optimal parameter value of the whale optimization algorithm, where D represents the distance vector, X represents the position vector, A represents the first coefficient and A=2a·ra, r∈[0,1] is a random number, and a represents the convergence factor T represents the maximum number of iterations, t represents the current number of iterations, and X r represents a random position vector.

7. The prediction method according to claim 1, It is characterized in that The method further comprises: pass Determine the number of hidden layer nodes of the whale optimized neural network algorithm model, where q is the number of hidden layer nodes, m is the number of input layer nodes of the whale optimized neural network algorithm model, n is the number of output layer nodes of the whale optimized neural network algorithm model, and a is an integer between [1,10].

8. A device for predicting gas leakage in a power vehicle, It is characterized in that include: An acquisition unit, used to establish a gas leakage model of a power supply vehicle and acquire gas leakage data of the gas leakage model under various leakage scenarios; An analysis unit, used for obtaining actual leakage data of the power supply vehicle at the current moment, analyzing the actual leakage data through a whale optimization neural network algorithm model, and obtaining a gas leakage prediction value at the next moment, wherein the whale optimization neural network algorithm model is obtained by training with multiple sets of data, and each set of data in the multiple sets of data includes: the gas leakage data and the gas leakage prediction value; The alarm unit is used to give an alarm when the gas leakage prediction value is greater than a preset threshold value, so as to warn the power supply vehicle of gas leakage and take preventive measures.

9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for predicting gas leakage of a power supply vehicle according to any one of claims 1 to 7.

10. An electronic device, It is characterized in that include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for executing the prediction method of gas leakage of a power supply vehicle as described in any one of claims 1 to 7.