[go: up one dir, main page]

CN114429589B - Hydrogen leakage concentration distribution prediction method and system - Google Patents

Hydrogen leakage concentration distribution prediction method and system Download PDF

Info

Publication number
CN114429589B
CN114429589B CN202210356904.2A CN202210356904A CN114429589B CN 114429589 B CN114429589 B CN 114429589B CN 202210356904 A CN202210356904 A CN 202210356904A CN 114429589 B CN114429589 B CN 114429589B
Authority
CN
China
Prior art keywords
training
concentration
gray
image set
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210356904.2A
Other languages
Chinese (zh)
Other versions
CN114429589A (en
Inventor
李建威
王天赐
鲍欢欢
吕洪
郝冬
高雷
王薛超
郭文军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Institute of Technology BIT
Original Assignee
Beijing Institute of Technology BIT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Institute of Technology BIT filed Critical Beijing Institute of Technology BIT
Priority to CN202210356904.2A priority Critical patent/CN114429589B/en
Publication of CN114429589A publication Critical patent/CN114429589A/en
Application granted granted Critical
Publication of CN114429589B publication Critical patent/CN114429589B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of hydrogen safe utilization, in particular to a method and a system for predicting hydrogen leakage concentration distribution, wherein the method comprises the following steps: acquiring a plurality of groups of training data sets; the training data set comprises a training concentration set and a training image set; preprocessing a training image set to obtain a training gray level image set; matching the gray value in the training gray image set with the concentration value in the training concentration set to obtain a training gray concentration mapping set; training a gray level concentration conversion model based on a training gray level concentration mapping set, and training a concentration distribution prediction model based on a training gray level image set; based on the real-time leakage image set, combining the trained concentration distribution prediction model to obtain a prediction gray level image; and obtaining the predicted hydrogen concentration distribution based on the predicted gray level image and the trained gray level concentration conversion model. The invention improves the efficiency and the precision of the concentration distribution prediction.

Description

一种氢气泄漏浓度分布预测方法及系统A kind of hydrogen leakage concentration distribution prediction method and system

技术领域technical field

本发明涉及氢安全利用技术领域,特别是涉及一种氢气泄漏浓度分布预测方法及系统。The invention relates to the technical field of hydrogen safety utilization, in particular to a hydrogen leakage concentration distribution prediction method and system.

背景技术Background technique

由于氢气具有高效、清洁和可再生的优点,以氢气作为储能和供能的能源越来越受政界、学界和工业界的关注。但是氢气具有易燃易爆、扩散系数大和易对材料力学性能造成劣化的特征,并且当在空气中氢气达到4%-75.6%体积分数,仅需0.017mJ的点火能量就可点燃氢气发生爆炸。在氢气制备、储存、运输、加注和使用过程中均具有潜在的泄漏和爆炸危险,同时氢气的爆炸是在扩散范围内爆燃爆轰的合并连锁反应,产生的火焰传播速度与音速相近。因此研究氢泄漏及扩散规律,预测氢气泄漏时在空气中的浓度分布对研究氢安全具有重要意义。Due to the high efficiency, cleanliness and renewable advantages of hydrogen, the use of hydrogen as energy storage and energy supply has attracted more and more attention from the political, academic and industrial circles. However, hydrogen has the characteristics of being flammable and explosive, having a large diffusion coefficient and easily deteriorating the mechanical properties of materials, and when the volume fraction of hydrogen in the air reaches 4%-75.6%, only 0.017mJ of ignition energy can ignite hydrogen and explode. There are potential leakage and explosion hazards in the process of hydrogen preparation, storage, transportation, filling and use. At the same time, the explosion of hydrogen is a combined chain reaction of deflagration and detonation in the diffusion range, and the resulting flame propagation speed is close to the speed of sound. Therefore, it is of great significance to study the hydrogen leakage and diffusion law and predict the concentration distribution of hydrogen in the air when it leaks.

现有的氢气泄漏浓度分布预测方法是基于流体力学的基本控制方程及数值模型,采用低压积分泄漏模型、高压欠膨胀射流模型及简化两区域模型三种模型进行数值模拟研究。然而依靠该方法需要的计算仿真时间长,且准确度不高。The existing hydrogen leakage concentration distribution prediction methods are based on the basic governing equations and numerical models of fluid mechanics, and three models are used for numerical simulation research: the low-pressure integral leakage model, the high-pressure under-expanded jet model and the simplified two-region model. However, the calculation and simulation time required by this method is long, and the accuracy is not high.

发明内容SUMMARY OF THE INVENTION

有鉴于此,本发明提供了一种氢气泄漏浓度分布预测方法及系统,整个流程计算量小,效率高,更贴合现实,准确性高。In view of this, the present invention provides a method and system for predicting the distribution of hydrogen leakage concentration, the whole process has small calculation amount, high efficiency, more realistic and high accuracy.

为实现上述目的,本发明提供了如下方案:For achieving the above object, the present invention provides following scheme:

一种氢气泄漏浓度分布预测方法,包括:A hydrogen leakage concentration distribution prediction method, comprising:

获取若干组训练数据集;所述训练数据集包括训练浓度集和训练图像集;Obtain several groups of training data sets; the training data sets include training concentration sets and training image sets;

对所述训练图像集进行预处理,得到训练灰度图像集;Preprocessing the training image set to obtain a training grayscale image set;

将所述训练灰度图像集中的灰度值与所述训练浓度集中的浓度值进行匹配,得到训练灰度浓度映射集;Matching the grayscale values in the training grayscale image set with the concentration values in the training concentration set to obtain a training grayscale concentration map set;

基于所述训练灰度浓度映射集对灰度浓度转化模型进行训练,得到训练好的所述灰度浓度转化模型;Perform training on the grayscale concentration conversion model based on the training grayscale concentration mapping set, to obtain the trained grayscale concentration conversion model;

基于所述训练灰度图像集对浓度分布预测模型进行训练,得到训练好的所述浓度分布预测模型;The concentration distribution prediction model is trained based on the training grayscale image set to obtain the trained concentration distribution prediction model;

获取实时泄露图像集,基于所述实时泄露图像集和训练好的所述浓度分布预测模型,得到预测灰度序列;Obtain a real-time leaked image set, and obtain a predicted grayscale sequence based on the real-time leaked image set and the trained concentration distribution prediction model;

基于所述预测灰度序列和训练好的所述灰度浓度转化模型得到预测氢气浓度分布。The predicted hydrogen concentration distribution is obtained based on the predicted grayscale sequence and the trained grayscale concentration conversion model.

优选地,所述获取若干组训练数据集,包括:Preferably, the acquiring several groups of training data sets, including:

搭建实验台架,布置M1×M2个浓度传感器,其中M1为高度方向上浓度传感器的数目,M2为宽度方向上浓度传感器的数目;Build an experimental bench and arrange M 1 ×M 2 concentration sensors, where M 1 is the number of concentration sensors in the height direction, and M 2 is the number of concentration sensors in the width direction;

进行氢气泄漏实验,利用浓度传感器记录氢气泄漏的固定位置点浓度值,得到所述训练浓度集;利用高速摄像机记录氢气泄漏过程的完整图像,得到所述训练图像集。Carry out a hydrogen leakage experiment, use a concentration sensor to record the concentration value of a fixed point of hydrogen leakage to obtain the training concentration set; use a high-speed camera to record a complete image of the hydrogen leakage process to obtain the training image set.

优选地,所述对所述训练图像集进行预处理,得到训练灰度图像集,包括:Preferably, the training image set is preprocessed to obtain a training grayscale image set, including:

对所述训练图像集进行灰度处理,得到初始训练灰度图像集;Perform grayscale processing on the training image set to obtain an initial training grayscale image set;

对所述初始训练灰度图像集进行卷积滤波处理,得到训练滤波图像集;Performing convolution filtering processing on the initial training grayscale image set to obtain a training filtering image set;

对所述训练滤波图像集中的每个训练滤波图像进行划分,得到划分图像集;dividing each training filtered image in the training filtered image set to obtain a divided image set;

对所述划分图像集进行采样,得到所述训练灰度图像集。Sampling the divided image set to obtain the training grayscale image set.

优选地,所述将所述训练灰度图像集中的灰度值与所述训练浓度集中的浓度值进行匹配,得到训练灰度浓度映射集,包括:Preferably, the matching of the grayscale values in the training grayscale image set and the concentration values in the training concentration set to obtain a training grayscale concentration map set includes:

确定各所述浓度值在训练滤波图像集中训练滤波图像的位置,得到初始位置数据集;Determine the position of each said concentration value in the training filter image set of the training filter image to obtain the initial position data set;

基于所述初始位置数据集在所述训练灰度图像集进行查找,得到映射关系;所述映射关系为每个所述浓度值对应一个像素块;Based on the initial position data set, searching is performed in the training grayscale image set to obtain a mapping relationship; the mapping relationship is that each of the concentration values corresponds to a pixel block;

基于各所述像素块的灰度值、各所述浓度值和所述映射关系得到所述训练灰度浓度映射集。The training grayscale density map set is obtained based on the grayscale value of each of the pixel blocks, each of the density values and the mapping relationship.

优选地,所述基于所述训练灰度浓度映射集对灰度浓度转化模型进行训练,得到训练好的所述灰度浓度转化模型,具体为:Preferably, the grayscale concentration conversion model is trained based on the training grayscale concentration map set to obtain the trained grayscale concentration conversion model, specifically:

基于所述训练灰度浓度映射集对所述灰度浓度转化模型进行迭代训练,基于误差损失值对所述灰度浓度转化模型进行评价,直至所述误差损失值小于误差损失设定值,得到训练好的所述灰度浓度转化模型;所述损失误差值包括均方误差和正则化损失。Iteratively trains the grayscale density conversion model based on the training grayscale density map set, and evaluates the grayscale density conversion model based on the error loss value until the error loss value is less than the error loss setting value, and obtains The trained grayscale concentration conversion model; the loss error value includes mean square error and regularization loss.

本发明还提供了一种氢气泄漏浓度分布预测系统,包括:The present invention also provides a hydrogen leakage concentration distribution prediction system, comprising:

数据获取模块,获取若干组训练数据集;所述训练数据集包括训练浓度集和训练图像集;The data acquisition module acquires several groups of training data sets; the training data sets include training concentration sets and training image sets;

预处理模块,对所述训练图像集进行预处理,得到训练灰度图像集;a preprocessing module, which preprocesses the training image set to obtain a training grayscale image set;

匹配模块,将所述训练灰度图像集中的灰度值与所述训练浓度集中的浓度值进行匹配,得到训练灰度浓度映射集;a matching module, which matches the grayscale values in the training grayscale image set with the concentration values in the training concentration set to obtain a training grayscale concentration map set;

第一训练模块,基于所述训练灰度浓度映射集对灰度浓度转化模型进行训练,得到训练好的所述灰度浓度转化模型;a first training module, which trains a grayscale concentration conversion model based on the training grayscale concentration mapping set to obtain the trained grayscale concentration conversion model;

第二训练模块,基于所述训练灰度图像集对浓度分布预测模型进行训练,得到训练好的所述浓度分布预测模型;The second training module, based on the training grayscale image set, trains the concentration distribution prediction model to obtain the trained concentration distribution prediction model;

灰度预测模块,获取实时泄露图像集,基于所述实时泄露图像集和训练好的所述浓度分布预测模型,得到预测灰度序列;The grayscale prediction module obtains a real-time leaked image set, and obtains a predicted grayscale sequence based on the real-time leaked image set and the trained concentration distribution prediction model;

浓度分布预测模块,基于所述预测灰度序列和训练好的所述灰度浓度转化模型得到预测氢气浓度分布。The concentration distribution prediction module obtains the predicted hydrogen concentration distribution based on the predicted grayscale sequence and the trained grayscale concentration conversion model.

优选地,所述数据获取模块包括:Preferably, the data acquisition module includes:

实验搭建单元,搭建实验台架,布置M1×M2个浓度传感器,其中M1为高度方向上浓度传感器的数目,M2为宽度方向上浓度传感器的数目;Experiment building unit, build an experimental bench, and arrange M 1 × M 2 concentration sensors, where M 1 is the number of concentration sensors in the height direction, and M 2 is the number of concentration sensors in the width direction;

数据获取单元,进行氢气泄漏实验,利用浓度传感器记录氢气泄漏的固定位置点浓度值,得到所述训练浓度集;利用高速摄像机记录氢气泄漏过程的完整图像,得到所述训练图像集。The data acquisition unit performs the hydrogen leakage experiment, uses the concentration sensor to record the concentration value of the fixed position of the hydrogen leakage, and obtains the training concentration set; uses the high-speed camera to record the complete image of the hydrogen leakage process to obtain the training image set.

优选地,所述预处理模块包括:Preferably, the preprocessing module includes:

灰度处理单元,对所述训练图像集进行灰度处理,得到初始训练灰度图像集;a grayscale processing unit, which performs grayscale processing on the training image set to obtain an initial training grayscale image set;

滤波单元,对所述初始训练灰度图像集进行卷积滤波处理,得到训练滤波图像集;A filtering unit, which performs convolution filtering on the initial training grayscale image set to obtain a training filtering image set;

划分单元,对所述训练滤波图像集中的每个训练滤波图像进行划分,得到划分图像集;a dividing unit, which divides each training filtered image in the training filtered image set to obtain a divided image set;

采样单元,对所述划分图像集进行采样,得到所述训练灰度图像集。A sampling unit, for sampling the divided image set to obtain the training grayscale image set.

优选地,所述匹配模块包括:Preferably, the matching module includes:

位置确定单元,确定各所述浓度值在训练滤波图像集中训练滤波图像的位置,得到初始位置数据集;a position determining unit, for determining the position of each of the concentration values in the training filter image set in the training filter image set, to obtain an initial position data set;

映射单元,基于所述初始位置数据集在所述训练灰度图像集进行查找,得到映射关系;所述映射关系为每个所述浓度值对应一个像素块;a mapping unit, searching in the training grayscale image set based on the initial position data set to obtain a mapping relationship; the mapping relationship is that each of the concentration values corresponds to a pixel block;

匹配单元,基于各所述像素块的灰度值、各所述浓度值和所述映射关系得到所述训练灰度浓度映射集。The matching unit obtains the training grayscale density map set based on the grayscale value of each of the pixel blocks, each of the density values and the mapping relationship.

优选地,所述第一训练模块具体为:Preferably, the first training module is specifically:

基于所述训练灰度浓度映射集对所述灰度浓度转化模型进行迭代训练,基于误差损失值对所述灰度浓度转化模型进行评价,直至所述误差损失值小于误差损失设定值,得到训练好的所述灰度浓度转化模型;所述损失误差值包括均方误差和正则化损失。Iteratively trains the grayscale density conversion model based on the training grayscale density map set, and evaluates the grayscale density conversion model based on the error loss value until the error loss value is less than the error loss setting value, and obtains The trained grayscale concentration conversion model; the loss error value includes mean square error and regularization loss.

根据本发明提供的具体实施例,本发明公开了以下技术效果:According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

本发明涉及一种氢气泄漏浓度分布预测方法及系统,方法包括:获取若干组训练数据集;训练数据集包括训练浓度集和训练图像集;对训练图像集进行预处理,得到训练灰度图像集;将训练灰度图像集中的灰度值与训练浓度集中的浓度值进行匹配,得到训练灰度浓度映射集;基于训练灰度浓度映射集对灰度浓度转化模型进行训练,基于训练灰度图像集对浓度分布预测模型进行训练;基于实时泄露图像集,结合训练好的浓度分布预测模型,得到预测灰度图像;基于预测灰度图像和训练好的灰度浓度转化模型得到预测氢气浓度分布。本发明提高了浓度分布预测的效率和精度。The invention relates to a hydrogen leakage concentration distribution prediction method and system. The method includes: acquiring several sets of training data sets; the training data set includes a training concentration set and a training image set; preprocessing the training image set to obtain a training grayscale image set ; Match the gray values in the training gray image set with the concentration values in the training concentration set to obtain the training gray concentration map set; train the gray concentration conversion model based on the training gray concentration map set, and train the gray concentration conversion model based on the training gray image set. Based on the real-time leaked image set, combined with the trained concentration distribution prediction model, the predicted grayscale image is obtained; based on the predicted grayscale image and the trained grayscale concentration conversion model, the predicted hydrogen concentration distribution is obtained. The present invention improves the efficiency and accuracy of concentration distribution prediction.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings required in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some of the present invention. In the embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative labor.

图1为本发明氢气泄漏浓度分布预测方法流程图;Fig. 1 is the flow chart of the hydrogen leakage concentration distribution prediction method of the present invention;

图2为本发明浓度传感器布置方式示意图;2 is a schematic diagram of the arrangement of the concentration sensor of the present invention;

图3为本发明八位灰度图示意图;3 is a schematic diagram of an eight-bit grayscale map of the present invention;

图4为本发明训练滤波图像示意图;4 is a schematic diagram of a training filter image of the present invention;

图5为本发明灰度浓度转化模型结构图;5 is a structural diagram of a grayscale concentration conversion model of the present invention;

图6为本发明氢气泄漏浓度分布预测系统结构图。FIG. 6 is a structural diagram of the hydrogen leakage concentration distribution prediction system of the present invention.

符号说明:1-数据获取模块,2-预处理模块,3-匹配模块,4-第一训练模块,5-第二训练模块,6-灰度预测模块,7-浓度分布预测模块。Symbol description: 1-data acquisition module, 2-preprocessing module, 3-matching module, 4-first training module, 5-second training module, 6-grayscale prediction module, 7-concentration distribution prediction module.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

本发明的目的是提供一种氢气泄漏浓度分布预测方法及系统,整个流程计算量小,效率高,更贴合现实,准确性高。The purpose of the present invention is to provide a method and system for predicting the distribution of hydrogen leakage concentration, the whole process has small calculation amount, high efficiency, more realistic and high accuracy.

为使本发明的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本发明作进一步详细的说明。In order to make the above objects, features and advantages of the present invention more clearly understood, the present invention will be described in further detail below with reference to the accompanying drawings and specific embodiments.

图1为本发明氢气泄漏浓度分布预测方法流程图。如图1所示,本发明提供了一种氢气泄漏浓度分布预测方法,包括:Fig. 1 is a flow chart of the method for predicting the hydrogen leakage concentration distribution of the present invention. As shown in Figure 1, the present invention provides a method for predicting the hydrogen leakage concentration distribution, including:

步骤S1,获取若干组训练数据集;所述训练数据集包括训练浓度集和训练图像集。In step S1, several groups of training data sets are obtained; the training data sets include a training concentration set and a training image set.

具体地所述步骤S1包括:Specifically, the step S1 includes:

步骤S11,搭建实验台架,布置M1×M2个浓度传感器,其中M1为高度方向上浓度传感器的数目,M2为宽度方向上浓度传感器的数目。以10×2为例,所述浓度传感器的布置方式如图2所示,图2中每个四角星代表一个所述浓度传感器。Step S11, build an experimental bench, and arrange M 1 ×M 2 density sensors, where M 1 is the number of density sensors in the height direction, and M 2 is the number of density sensors in the width direction. Taking 10×2 as an example, the arrangement of the concentration sensors is shown in FIG. 2 , and each four-pointed star in FIG. 2 represents one of the concentration sensors.

步骤S12,进行氢气泄漏实验,利用浓度传感器记录氢气泄漏的固定位置点浓度值,得到所述训练浓度集;利用高速摄像机记录氢气泄漏过程的完整图像,得到所述训练图像集。为了安全性的考虑,实验利用了密度与氢气相近但是不易燃易爆的氦气替代氢气,利用高速摄像机拍摄整个氢气过程,本实施例中,设定氢气的泄漏时长为10s,以0.01s的时间步长对氢泄漏进行图像和浓度分布采样,可以得到1000张X×Y大小的氢泄漏的训练图像和(M1×M2)×1000大小的氢浓度分布数据,其中X是训练图像的高,Y是训练图像的宽。In step S12, a hydrogen leakage experiment is performed, and a concentration sensor is used to record the concentration value of a fixed point of hydrogen leakage to obtain the training concentration set; a high-speed camera is used to record a complete image of the hydrogen leakage process to obtain the training image set. For the sake of safety, the experiment replaced hydrogen with helium, which has a density similar to that of hydrogen but is not flammable and explosive, and used a high-speed camera to record the entire hydrogen process. Sampling images and concentration distributions of hydrogen leakage at time step, 1000 training images of hydrogen leakage of size X × Y and hydrogen concentration distribution data of size (M 1 × M 2 ) × 1000 can be obtained, where X is the size of the training image height, Y is the width of the training image.

步骤S2,对所述训练图像集进行预处理,得到训练灰度图像集。In step S2, the training image set is preprocessed to obtain a training grayscale image set.

优选地,所述步骤S2包括:Preferably, the step S2 includes:

步骤S21,对所述训练图像集进行灰度处理,得到初始训练灰度图像集。所述初始训练灰度图像集中的初始训练灰度图像为八位灰度图像,如图3所示。Step S21, performing grayscale processing on the training image set to obtain an initial training grayscale image set. The initial training grayscale images in the initial training grayscale image set are eight-bit grayscale images, as shown in FIG. 3 .

步骤S22,对所述初始训练灰度图像集进行卷积滤波处理,得到训练滤波图像集。所述训练滤波图像集中的训练滤波图像如图4所示。优选地,采用3×3卷积核进行卷积滤波处理。卷积核中心作为原点(0,0),该卷积核由高斯卷积核与均值滤波叠加,可以消去图像中随机误差,卷积核计算式如下式:Step S22, performing convolution filtering on the initial training grayscale image set to obtain a training filtered image set. The training filtered images in the training filtered image set are shown in FIG. 4 . Preferably, a 3×3 convolution kernel is used for convolution filtering processing. The center of the convolution kernel is the origin (0, 0). The convolution kernel is superimposed by the Gaussian convolution kernel and the mean filter, which can eliminate random errors in the image. The calculation formula of the convolution kernel is as follows:

Figure 90222DEST_PATH_IMAGE002
Figure 224006DEST_PATH_IMAGE004
Figure 90222DEST_PATH_IMAGE002
,
Figure 224006DEST_PATH_IMAGE004
;

式中:x为卷积核的横坐标,y为卷积核的纵坐标,

Figure 941427DEST_PATH_IMAGE005
为卷积核,
Figure 22122DEST_PATH_IMAGE006
为高斯卷积核。In the formula: x is the abscissa of the convolution kernel, y is the ordinate of the convolution kernel,
Figure 941427DEST_PATH_IMAGE005
is the convolution kernel,
Figure 22122DEST_PATH_IMAGE006
is the Gaussian convolution kernel.

步骤S23,对所述训练滤波图像集中的每个训练滤波图像进行划分,得到划分图像集。Step S23: Divide each training filtered image in the training filtered image set to obtain a divided image set.

由于浓度传感器测得的浓度值是一个区域的浓度,需要对训练滤波图像进行划分,使该区域能由一个像素块表示,划分计算公式如下:Since the density value measured by the density sensor is the density of an area, the training filter image needs to be divided so that the area can be represented by a pixel block. The division calculation formula is as follows:

Figure 570915DEST_PATH_IMAGE007
Figure 81793DEST_PATH_IMAGE008
Figure 570915DEST_PATH_IMAGE007
;
Figure 81793DEST_PATH_IMAGE008
;

式中:

Figure 486842DEST_PATH_IMAGE009
为训练滤波图像的宽度,
Figure 233212DEST_PATH_IMAGE010
为浓度传感器检测区域的宽度,
Figure 955222DEST_PATH_IMAGE011
为划分后像素块的宽度,
Figure 620690DEST_PATH_IMAGE012
为训练滤波图像的高度,
Figure 591663DEST_PATH_IMAGE013
为浓度传感器检测区域的高度,
Figure 813828DEST_PATH_IMAGE014
为划分后像素块的高度。where:
Figure 486842DEST_PATH_IMAGE009
is the width of the training filtered image,
Figure 233212DEST_PATH_IMAGE010
is the width of the detection area of the concentration sensor,
Figure 955222DEST_PATH_IMAGE011
is the width of the divided pixel block,
Figure 620690DEST_PATH_IMAGE012
is the height of the training filtered image,
Figure 591663DEST_PATH_IMAGE013
is the height of the detection area of the concentration sensor,
Figure 813828DEST_PATH_IMAGE014
is the height of the divided pixel block.

步骤S24,对所述划分图像集进行采样,得到所述训练灰度图像集。并且以

Figure 947000DEST_PATH_IMAGE016
为高度步长,以
Figure 780440DEST_PATH_IMAGE018
为宽度步长对所述划分图像集中的划分图像进行采样,得到训练灰度图像,所述训练灰度图像的大小为
Figure 694169DEST_PATH_IMAGE020
。Step S24, sampling the divided image set to obtain the training grayscale image set. and with
Figure 947000DEST_PATH_IMAGE016
is the height step, with
Figure 780440DEST_PATH_IMAGE018
Sampling the divided images in the divided image set for the width step to obtain a training grayscale image, and the size of the training grayscale image is
Figure 694169DEST_PATH_IMAGE020
.

步骤S3,将所述训练灰度图像集中的灰度值与所述训练浓度集中的浓度值进行匹配,得到训练灰度浓度映射集。Step S3, matching the grayscale values in the training grayscale image set with the concentration values in the training concentration set to obtain a training grayscale concentration map set.

具体地,所述步骤S3包括:Specifically, the step S3 includes:

步骤S31,确定各所述浓度值在训练滤波图像集中训练滤波图像的位置,得到初始位置数据集。Step S31: Determine the position of each of the concentration values in the training filter image set in the training filter image set to obtain an initial position data set.

具体地,基于各浓度传感器在训练滤波图像上的位置确定各浓度值在训练滤波图像上的位置,浓度传感器在训练滤波图像上的位置确定过程如下:Specifically, the position of each density value on the training filtered image is determined based on the position of each density sensor on the training filtered image, and the process of determining the location of the density sensor on the training filtered image is as follows:

以一个正方形区域作为氢气扩散的背景,以正方形的右下角为原点建立坐标系;以训练滤波图像的右下角作为坐标系原点,按照下述公式就可以得到浓度传感器在训练滤波图像上的位置:Taking a square area as the background of hydrogen diffusion, the coordinate system is established with the lower right corner of the square as the origin; with the lower right corner of the training filtered image as the origin of the coordinate system, the position of the concentration sensor on the training filtered image can be obtained according to the following formula:

Figure 844659DEST_PATH_IMAGE022
Figure 844659DEST_PATH_IMAGE022
;

式中:

Figure 97917DEST_PATH_IMAGE024
为浓度传感器在现实中的高度方向上的坐标值,
Figure 774361DEST_PATH_IMAGE026
为浓度传感器在现实中的宽度方向上的坐标值,
Figure 909808DEST_PATH_IMAGE028
为浓度传感器在训练滤波图像上高度方向的坐标值,
Figure 863988DEST_PATH_IMAGE030
为浓度传感器在训练滤波图像上宽度方向的坐标值,
Figure 237332DEST_PATH_IMAGE032
为正方形的高度,
Figure 146994DEST_PATH_IMAGE034
为正方形的宽度。where:
Figure 97917DEST_PATH_IMAGE024
is the coordinate value of the concentration sensor in the height direction in reality,
Figure 774361DEST_PATH_IMAGE026
is the coordinate value of the density sensor in the width direction in reality,
Figure 909808DEST_PATH_IMAGE028
is the coordinate value of the height direction of the density sensor on the training filtered image,
Figure 863988DEST_PATH_IMAGE030
is the coordinate value of the density sensor in the width direction on the training filtered image,
Figure 237332DEST_PATH_IMAGE032
is the height of the square,
Figure 146994DEST_PATH_IMAGE034
is the width of the square.

步骤S32,基于所述初始位置数据集在所述训练灰度图像集进行查找,得到映射关系;所述映射关系为每个所述浓度值对应一个像素块。Step S32, searching in the training grayscale image set based on the initial position data set to obtain a mapping relationship; the mapping relationship is that each density value corresponds to a pixel block.

步骤S33,基于各所述像素块的灰度值、各所述浓度值和所述映射关系得到所述训练灰度浓度映射集。Step S33, obtaining the training grayscale density map set based on the grayscale value of each of the pixel blocks, each of the density values, and the mapping relationship.

将所述训练灰度图像转换为灰度值序列,遍历所述训练灰度图像集得到灰度值序列集;所述灰度值序列集的大小为

Figure 176261DEST_PATH_IMAGE036
,N为训练灰度图像集中训练灰度图像的数量。Convert the training grayscale image into a grayscale value sequence, and traverse the training grayscale image set to obtain a grayscale value sequence set; the size of the grayscale value sequence set is
Figure 176261DEST_PATH_IMAGE036
, N is the number of training grayscale images in the training grayscale image set.

将所述灰度值序列集基于时间序列按照

Figure 262029DEST_PATH_IMAGE038
进行逐步采样,得到灰度值时间序列集。所述灰度值时间序列集包括
Figure 693142DEST_PATH_IMAGE020
个灰度值时间序列。即将训练灰度图像每个像素块的灰度值按照时间序列进行采样,得到所述灰度值时间序列集。The gray value sequence set is based on the time series according to
Figure 262029DEST_PATH_IMAGE038
Step-by-step sampling is performed to obtain a gray value time series set. The gray value time series set includes
Figure 693142DEST_PATH_IMAGE020
gray value time series. That is to say, the gray value of each pixel block of the training gray image is sampled according to a time series to obtain the gray value time series set.

将所述训练浓度集按照时间序列采样,得到浓度值时间序列集,所述浓度值时间序列集包括M1×M2个浓度值时间序列,即将每个浓度传感器得到的浓度值按照时间序列进行采样,得到所述浓度值时间序列集。Sampling the training concentration set according to a time series to obtain a concentration value time series set, the concentration value time series set includes M 1 ×M 2 concentration value time series, that is, the concentration values obtained by each concentration sensor are carried out according to the time series. Sampling to obtain the concentration value time series set.

基于所述初始位置数据集将所述灰度值时间序列集与所述浓度值时间序列集进行匹配,得到所述训练灰度浓度映射集。Matching the gray value time series set and the concentration value time series set based on the initial position data set to obtain the training gray concentration map set.

步骤S4,基于所述训练灰度浓度映射集对灰度浓度转化模型进行训练,得到训练好的所述灰度浓度转化模型。In step S4, the gray-scale density conversion model is trained based on the training gray-scale density map set to obtain the trained gray-scale density conversion model.

优选地,从所述训练灰度浓度映射集中选出80%用于训练,剩下20%用于测试,搭建所述灰度浓度转化模型,以灰度值作为特征输入,浓度值作为最终输出量,进行迭代训练。所述灰度浓度转化模型的损失函数选用均方误差,激活函数选用ReLU,并且加入正则化层,将正则化损失和均方误差合在一起作为整体的误差损失值,在反向传播过程中,整个灰度浓度转化模型的尺寸会减小,同时所有的权重系数的会尽可能地变小,减小了随机误差对最终输出量的影响。所述灰度浓度转化模型如图5所示。当所述误差损失值误差损失值小于误差损失设定值且不出现过拟合时,训练结束,得到训练好的所述灰度浓度转化模型。本实施例中,所述误差损失设定值为10%。Preferably, 80% are selected from the training grayscale concentration map set for training, and the remaining 20% are used for testing, and the grayscale concentration conversion model is built, using the grayscale value as the feature input and the concentration value as the final output , for iterative training. The loss function of the grayscale concentration conversion model is the mean square error, the activation function is ReLU, and a regularization layer is added, and the regularization loss and the mean square error are combined together as the overall error loss value. In the process of back propagation , the size of the entire grayscale density conversion model will be reduced, and all the weight coefficients will be as small as possible, reducing the impact of random errors on the final output. The grayscale density conversion model is shown in FIG. 5 . When the error loss value is less than the error loss setting value and no overfitting occurs, the training ends, and the trained grayscale density conversion model is obtained. In this embodiment, the set value of the error loss is 10%.

所述均方误差的计算公式如下:The calculation formula of the mean square error is as follows:

Figure 773706DEST_PATH_IMAGE039
Figure 773706DEST_PATH_IMAGE039
;

式中:MSE为均方误差,M为当前迭代输入的灰度值的数量,

Figure 87006DEST_PATH_IMAGE040
为灰度值对应的真实的浓度值,
Figure 586252DEST_PATH_IMAGE041
为灰度值对应的预测的浓度值。In the formula: MSE is the mean square error, M is the number of gray values input in the current iteration,
Figure 87006DEST_PATH_IMAGE040
is the real density value corresponding to the gray value,
Figure 586252DEST_PATH_IMAGE041
is the predicted density value corresponding to the gray value.

所述正则化损失如下:The regularization loss is as follows:

Figure 934188DEST_PATH_IMAGE042
Figure 934188DEST_PATH_IMAGE042
;

式中:L2为正则化损失,Z为权重系数的个数,λ为正则化系数,θz为第z个权重系数。In the formula: L2 is the regularization loss, Z is the number of weight coefficients, λ is the regularization coefficient, and θ z is the zth weight coefficient.

所述误差损失值计算公式如下:The calculation formula of the error loss value is as follows:

Figure 185653DEST_PATH_IMAGE043
Figure 185653DEST_PATH_IMAGE043
;

式中:

Figure 720671DEST_PATH_IMAGE044
为误差损失值。where:
Figure 720671DEST_PATH_IMAGE044
is the error loss value.

步骤S5,基于所述训练灰度图像集对浓度分布预测模型进行训练,得到训练好的所述浓度分布预测模型。In step S5, the concentration distribution prediction model is trained based on the training grayscale image set to obtain the trained concentration distribution prediction model.

优选地,将所述灰度值时间序列集以

Figure 820345DEST_PATH_IMAGE046
个时间步为长度进行选取,作为一个灰度预测集,用每个时间步的前
Figure 226050DEST_PATH_IMAGE048
步灰度值
Figure 382837DEST_PATH_IMAGE050
来预测第
Figure 936309DEST_PATH_IMAGE046
个时间步的图像灰度值
Figure 839674DEST_PATH_IMAGE052
,所述浓度分布预测模型为长短期记忆网络(Long Short-Term Memory,简称LSTM),所述浓度分布预测模型的激活函数选ReLU,损失函数选均方误差,全连接层添加正则化层,训练过程与所述灰度浓度转化模型的训练过程相同,得到训练好的所述浓度分布预测模型。Preferably, the gray value time series set is
Figure 820345DEST_PATH_IMAGE046
The length of time steps is selected as a grayscale prediction set, using the previous value of each time step
Figure 226050DEST_PATH_IMAGE048
step gray value
Figure 382837DEST_PATH_IMAGE050
to predict the
Figure 936309DEST_PATH_IMAGE046
image grayscale values at time steps
Figure 839674DEST_PATH_IMAGE052
, the concentration distribution prediction model is a long short-term memory network (Long Short-Term Memory, referred to as LSTM), the activation function of the concentration distribution prediction model selects ReLU, the loss function selects the mean square error, and the full connection layer adds a regularization layer, The training process is the same as the training process of the grayscale concentration conversion model, and the trained concentration distribution prediction model is obtained.

步骤S6,获取实时泄露图像集,基于所述实时泄露图像集和训练好的所述浓度分布预测模型,得到预测灰度序列。In step S6, a real-time leaked image set is acquired, and a predicted grayscale sequence is obtained based on the real-time leaked image set and the trained concentration distribution prediction model.

采用如步骤S2的过程对所述实时泄露图像集进行预处理,得到实时灰度值时间序列集;Using the process of step S2 to preprocess the real-time leaked image set to obtain a real-time gray value time series set;

基于所述实时灰度值时间序列集和训练好的所述浓度分布预测模型,得到初始预测灰度值序列,对所述初始预测灰度值序列进行插值,得到所述预测灰度值序列。Based on the real-time gray value time series set and the trained concentration distribution prediction model, an initial predicted gray value sequence is obtained, and the initial predicted gray value sequence is interpolated to obtain the predicted gray value sequence.

步骤S7,基于所述预测灰度序列和训练好的所述灰度浓度转化模型得到预测氢气浓度分布。In step S7, a predicted hydrogen concentration distribution is obtained based on the predicted grayscale sequence and the trained grayscale concentration conversion model.

图6为本发明氢气泄漏浓度分布预测系统结构图。如图6所示,本发明提供了一种氢气泄漏浓度分布预测系统,包括:数据获取模块1、预处理模块2、匹配模块3、第一训练模块4、第二训练模块5、灰度预测模块6和浓度分布预测模块7。FIG. 6 is a structural diagram of the hydrogen leakage concentration distribution prediction system of the present invention. As shown in FIG. 6 , the present invention provides a hydrogen leakage concentration distribution prediction system, including: data acquisition module 1, preprocessing module 2, matching module 3, first training module 4, second training module 5, grayscale prediction Module 6 and Concentration Distribution Prediction Module 7.

所述数据获取模块1获取若干组训练数据集;所述训练数据集包括训练浓度集和训练图像集。The data acquisition module 1 acquires several sets of training data sets; the training data sets include a training concentration set and a training image set.

所述预处理模块2对所述训练图像集进行预处理,得到训练灰度图像集;The preprocessing module 2 preprocesses the training image set to obtain a training grayscale image set;

所述匹配模块3将所述训练灰度图像集中的灰度值与所述训练浓度集中的浓度值进行匹配,得到训练灰度浓度映射集。The matching module 3 matches the grayscale values in the training grayscale image set with the concentration values in the training concentration set to obtain a training grayscale concentration map set.

所述第一训练模块4基于所述训练灰度浓度映射集对灰度浓度转化模型进行训练,得到训练好的所述灰度浓度转化模型。The first training module 4 trains the grayscale concentration conversion model based on the training grayscale concentration map set to obtain the trained grayscale concentration conversion model.

所述第二训练模块5基于所述训练灰度图像集对浓度分布预测模型进行训练,得到训练好的所述浓度分布预测模型。The second training module 5 trains the concentration distribution prediction model based on the training grayscale image set to obtain the trained concentration distribution prediction model.

所述灰度预测模块6获取实时泄露图像集,基于所述实时泄露图像集和训练好的所述浓度分布预测模型,得到预测灰度序列。The grayscale prediction module 6 obtains a real-time leaked image set, and obtains a predicted grayscale sequence based on the real-time leaked image set and the trained concentration distribution prediction model.

所述浓度分布预测模块7基于所述预测灰度序列和训练好的所述灰度浓度转化模型得到预测氢气浓度分布。The concentration distribution prediction module 7 obtains the predicted hydrogen concentration distribution based on the predicted grayscale sequence and the trained grayscale concentration conversion model.

作为一种可选的实施方式,本发明所述数据获取模块1包括:实验搭建单元和数据获取单元。As an optional implementation manner, the data acquisition module 1 of the present invention includes: an experiment construction unit and a data acquisition unit.

所述实验搭建单元用于搭建实验台架,布置M1×M2个浓度传感器,其中M1为高度方向上浓度传感器的数目,M2为宽度方向上浓度传感器的数目。The experimental building unit is used to build an experimental bench, and M1×M2 concentration sensors are arranged, wherein M1 is the number of concentration sensors in the height direction, and M2 is the number of concentration sensors in the width direction.

所述数据获取单元用于进行氢气泄漏实验,利用浓度传感器记录氢气泄漏的固定位置点浓度值,得到所述训练浓度集;利用高速摄像机记录氢气泄漏过程的完整图像,得到所述训练图像集。The data acquisition unit is used for hydrogen leakage experiments, using a concentration sensor to record the concentration value of a fixed point of hydrogen leakage to obtain the training concentration set; using a high-speed camera to record a complete image of the hydrogen leakage process to obtain the training image set.

作为一种可选的实施方式,本发明所述预处理模块2包括:灰度处理单元、滤波单元、划分单元和采样单元。As an optional implementation manner, the preprocessing module 2 of the present invention includes: a grayscale processing unit, a filtering unit, a dividing unit and a sampling unit.

所述灰度处理单元对所述训练图像集进行灰度处理,得到初始训练灰度图像集。The grayscale processing unit performs grayscale processing on the training image set to obtain an initial training grayscale image set.

所述滤波单元对所述初始训练灰度图像集进行卷积滤波处理,得到训练滤波图像集。The filtering unit performs convolution filtering on the initial training grayscale image set to obtain a training filtered image set.

所述划分单元对所述训练滤波图像集中的每个训练滤波图像进行划分,得到划分图像集。The dividing unit divides each training filtered image in the training filtered image set to obtain a divided image set.

所述采样单元对所述划分图像集进行采样,得到所述训练灰度图像集。The sampling unit samples the divided image set to obtain the training grayscale image set.

作为一种可选的实施方式,本发明所述匹配模块3包括:位置确定单元、映射单元和匹配单元。As an optional implementation manner, the matching module 3 of the present invention includes: a position determination unit, a mapping unit and a matching unit.

所述位置确定单元,确定各所述浓度值在训练滤波图像集中训练滤波图像的位置,得到初始位置数据集。The position determination unit determines the position of each of the concentration values in the training filter image set in the training filter image set to obtain an initial position data set.

所述映射单元,基于所述初始位置数据集在所述训练灰度图像集进行查找,得到映射关系;所述映射关系为每个所述浓度值对应一个像素块。The mapping unit searches the training grayscale image set based on the initial position data set to obtain a mapping relationship; the mapping relationship is that each density value corresponds to a pixel block.

所述匹配单元,基于各所述像素块的灰度值、各所述浓度值和所述映射关系得到所述训练灰度浓度映射集。The matching unit obtains the training grayscale density map set based on the grayscale value of each of the pixel blocks, each of the density values and the mapping relationship.

作为一种可选的实施方式,本发明所述第一训练模块4具体为:As an optional implementation manner, the first training module 4 of the present invention is specifically:

基于所述训练灰度浓度映射集对所述灰度浓度转化模型进行迭代训练,基于误差损失值对所述灰度浓度转化模型进行评价,直至所述误差损失值小于误差损失设定值,得到训练好的所述灰度浓度转化模型;所述损失误差值包括均方误差和正则化损失。Iteratively trains the grayscale density conversion model based on the training grayscale density map set, and evaluates the grayscale density conversion model based on the error loss value until the error loss value is smaller than the error loss setting value, and obtains The trained grayscale concentration conversion model; the loss error value includes mean square error and regularization loss.

本发明不依靠仿真软件,以氢气在空气中扩散的真实情况作为整个系统的输入,更贴合现实,准确性高。The invention does not rely on simulation software, and uses the real situation of hydrogen diffusion in the air as the input of the whole system, which is more realistic and has high accuracy.

本发明能适用于各种气体在空气中扩散的浓度分布预测,并不局限于氢气。The present invention can be applied to the prediction of the concentration distribution of various gases diffusing in the air, and is not limited to hydrogen.

本发明基于训练好的模型,整个流程计算量小,效率高。The present invention is based on the trained model, and the whole process has small calculation amount and high efficiency.

本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的系统而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the various embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant part can be referred to the description of the method.

本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处。综上所述,本说明书内容不应理解为对本发明的限制。The principles and implementations of the present invention are described herein using specific examples, and the descriptions of the above embodiments are only used to help understand the method and the core idea of the present invention; There will be changes in the specific implementation and application scope. In conclusion, the contents of this specification should not be construed as limiting the present invention.

Claims (8)

1. A hydrogen leakage concentration distribution prediction method characterized by comprising:
acquiring a plurality of groups of training data sets; the training data set comprises a training concentration set and a training image set;
preprocessing the training image set to obtain a training gray level image set;
matching the gray values in the training gray image set with the concentration values in the training concentration set to obtain a training gray concentration mapping set;
training a gray level concentration conversion model based on the training gray level concentration mapping set to obtain the trained gray level concentration conversion model;
training a concentration distribution prediction model based on the training gray level image set to obtain the trained concentration distribution prediction model;
acquiring a real-time leakage image set, and acquiring a prediction gray sequence based on the real-time leakage image set and the trained concentration distribution prediction model; the method comprises the following specific steps: preprocessing the real-time leakage image set by adopting the process of preprocessing the training image set to obtain a training gray level image set to obtain a real-time gray level time sequence set; obtaining an initial predicted gray value sequence based on the real-time gray value time sequence set and the trained concentration distribution prediction model, and interpolating the initial predicted gray value sequence to obtain the predicted gray value sequence;
obtaining the predicted hydrogen concentration distribution based on the predicted gray level sequence and the trained gray level concentration conversion model;
the preprocessing the training image set to obtain a training gray level image set includes:
carrying out gray processing on the training image set to obtain an initial training gray image set;
performing convolution filtering processing on the initial training gray level image set to obtain a training filtering image set; performing convolution filtering processing by adopting a 3 multiplied by 3 convolution kernel; the center of the convolution kernel is taken as an origin (0, 0), the convolution kernel is overlapped by a Gaussian convolution kernel and the mean filtering, and the convolution kernel is calculated by the following formula:
Figure DEST_PATH_IMAGE002
Figure DEST_PATH_IMAGE003
in the formula: x is the abscissa of the convolution kernel, y is the ordinate of the convolution kernel,
Figure DEST_PATH_IMAGE004
is a convolution kernel, and is a function of the convolution kernel,
Figure DEST_PATH_IMAGE005
is a gaussian convolution kernel;
dividing each training filtering image in the training filtering image set to obtain a divided image set;
and sampling the divided image set to obtain the training gray level image set.
2. The hydrogen leak concentration distribution prediction method according to claim 1, wherein the acquiring of sets of training data includes:
building an experiment bench and arranging M 1 ×M 2 A concentration sensor, wherein M 1 Number of concentration sensors in height direction, M 2 The number of concentration sensors in the width direction;
performing a hydrogen leakage experiment, and recording the concentration value of the fixed position point of hydrogen leakage by using a concentration sensor to obtain the training concentration set; and recording a complete image of the hydrogen leakage process by using a high-speed camera to obtain the training image set.
3. The method for predicting hydrogen leakage concentration distribution according to claim 1, wherein the matching gray-scale values in the training gray-scale image set with concentration values in the training concentration set to obtain a training gray-scale concentration mapping set comprises:
determining the position of each density value in a training filter image set to obtain an initial position data set;
searching in the training gray level image set based on the initial position data set to obtain a mapping relation; the mapping relation is that each concentration value corresponds to a pixel block;
and obtaining the training gray scale concentration mapping set based on the gray scale value of each pixel block, each density value and the mapping relation.
4. The method for predicting the distribution of hydrogen leakage concentration according to claim 1, wherein the training of a gray concentration conversion model based on the training gray concentration mapping set is performed to obtain the trained gray concentration conversion model, and specifically includes:
iteratively training the gray scale concentration conversion model based on the training gray scale concentration mapping set, and evaluating the gray scale concentration conversion model based on an error loss value until the error loss value is smaller than an error loss set value to obtain the trained gray scale concentration conversion model; the error penalty values include mean square error and regularization penalty.
5. A hydrogen leakage concentration distribution prediction system characterized by comprising:
the data acquisition module acquires a plurality of groups of training data sets; the training data set comprises a training concentration set and a training image set;
the preprocessing module is used for preprocessing the training image set to obtain a training gray image set;
the matching module is used for matching the gray values in the training gray image set with the concentration values in the training concentration set to obtain a training gray concentration mapping set;
the first training module is used for training a gray concentration conversion model based on the training gray concentration mapping set to obtain the trained gray concentration conversion model;
the second training module is used for training a concentration distribution prediction model based on the training gray level image set to obtain the trained concentration distribution prediction model;
the gray level prediction module is used for acquiring a real-time leakage image set and obtaining a prediction gray level sequence based on the real-time leakage image set and the trained concentration distribution prediction model; the method specifically comprises the following steps: preprocessing the real-time leakage image set based on the matching module to obtain a real-time gray value time sequence set; the gray scale prediction module obtains an initial prediction gray scale value sequence based on the real-time gray scale value time sequence set and the trained concentration distribution prediction model, and interpolates the initial prediction gray scale value sequence to obtain the prediction gray scale value sequence;
the concentration distribution prediction module is used for obtaining the predicted hydrogen concentration distribution based on the predicted gray level sequence and the trained gray level concentration conversion model;
the preprocessing module comprises:
the gray processing unit is used for carrying out gray processing on the training image set to obtain an initial training gray image set;
the filtering unit is used for carrying out convolution filtering processing on the initial training gray level image set to obtain a training filtering image set; performing convolution filtering processing by adopting a 3 multiplied by 3 convolution kernel; the center of the convolution kernel is taken as an origin (0, 0), the convolution kernel is overlapped by a Gaussian convolution kernel and the mean filtering, and the convolution kernel is calculated by the following formula:
Figure DEST_PATH_IMAGE002A
Figure 789730DEST_PATH_IMAGE003
in the formula: x is the abscissa of the convolution kernel, y is the ordinate of the convolution kernel,
Figure 300346DEST_PATH_IMAGE004
is a convolution kernel, and is a function of the convolution kernel,
Figure 548925DEST_PATH_IMAGE005
is a gaussian convolution kernel;
the dividing unit is used for dividing each training filtering image in the training filtering image set to obtain a divided image set;
and the sampling unit is used for sampling the divided image set to obtain the training gray level image set.
6. The hydrogen leak concentration distribution prediction system according to claim 5, characterized in that the data acquisition module includes:
experiment building unit, building experiment bench and arranging M 1 ×M 2 A concentration sensor, wherein M 1 Number of concentration sensors in height, M 2 The number of density sensors in the width direction;
the data acquisition unit is used for carrying out a hydrogen leakage experiment, and recording the concentration value of the hydrogen leakage at the fixed position point by using a concentration sensor to obtain the training concentration set; and recording a complete image of the hydrogen leakage process by using a high-speed camera to obtain the training image set.
7. The hydrogen leak concentration distribution prediction system according to claim 5, characterized in that the matching module includes:
the position determining unit is used for determining the position of each density value in a training filter image set to train a filter image to obtain an initial position data set;
the mapping unit is used for searching in the training gray level image set based on the initial position data set to obtain a mapping relation; the mapping relation is that each concentration value corresponds to a pixel block;
and the matching unit is used for obtaining the training gray scale concentration mapping set based on the gray scale value of each pixel block, each density value and the mapping relation.
8. The hydrogen leak concentration distribution prediction system according to claim 5, characterized in that the first training module is specifically:
iteratively training the gray scale concentration conversion model based on the training gray scale concentration mapping set, and evaluating the gray scale concentration conversion model based on an error loss value until the error loss value is smaller than an error loss set value to obtain the trained gray scale concentration conversion model; the error loss values include mean square error and regularization loss.
CN202210356904.2A 2022-04-07 2022-04-07 Hydrogen leakage concentration distribution prediction method and system Active CN114429589B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210356904.2A CN114429589B (en) 2022-04-07 2022-04-07 Hydrogen leakage concentration distribution prediction method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210356904.2A CN114429589B (en) 2022-04-07 2022-04-07 Hydrogen leakage concentration distribution prediction method and system

Publications (2)

Publication Number Publication Date
CN114429589A CN114429589A (en) 2022-05-03
CN114429589B true CN114429589B (en) 2022-07-26

Family

ID=81314280

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210356904.2A Active CN114429589B (en) 2022-04-07 2022-04-07 Hydrogen leakage concentration distribution prediction method and system

Country Status (1)

Country Link
CN (1) CN114429589B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116309505B (en) * 2023-03-28 2024-04-05 北京理工大学 A hydrogen concentration visualization image calibration system, method and detection method
CN116306377B (en) * 2023-04-04 2024-04-05 中国石油大学(华东) A method and system for quickly predicting the consequences of a hydrogen refueling station leakage accident
CN119197894B (en) * 2024-10-21 2025-03-28 国网浙江省电力有限公司嘉善县供电公司 Hydrogen leakage monitoring method and device and fuel cell vehicle

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4137890B2 (en) * 2005-01-21 2008-08-20 シャープ株式会社 Image processing apparatus, image forming apparatus, image reading processing apparatus, image processing method, image processing program, and computer-readable recording medium
CN104792674B (en) * 2015-04-01 2017-07-28 东南大学 A kind of granule density measuring method
CN106769743B (en) * 2017-03-06 2020-03-17 北京理工大学 Non-contact measurement device and method for aerosol mass concentration field
CN111126136B (en) * 2019-11-18 2023-04-21 上海交通大学 A Quantification Method of Smoke Concentration Based on Image Recognition
CN111401246B (en) * 2020-03-17 2024-06-04 广东智媒云图科技股份有限公司 Smoke concentration detection method, device, equipment and storage medium
CN113239991B (en) * 2021-04-28 2024-02-27 浙江工业大学 Flame image oxygen concentration prediction method based on regression generation countermeasure network
CN113380340B (en) * 2021-06-21 2023-05-16 深圳开云智能有限公司 Training method and device for fly ash concentration prediction model and computer equipment

Also Published As

Publication number Publication date
CN114429589A (en) 2022-05-03

Similar Documents

Publication Publication Date Title
CN114429589B (en) Hydrogen leakage concentration distribution prediction method and system
Samara et al. Implementing the MULTI-VP coronal model in EUHFORIA: Test case results and comparisons with the WSA coronal model
CN111580163B (en) Full waveform inversion method and system based on non-monotonic search technology
CN115994465B (en) Method, device and medium for evaluating damage effect kNN of unexpected explosion air shock wave to bridge
CN113532397A (en) A subregional elevation anomaly fitting method based on extended algorithm
CN116401756A (en) Solid rocket engine performance prediction method, prediction system, storage medium and equipment based on deep learning and data enhancement
CN114707376A (en) Method for simulating occurrence distribution of seabed polymetallic tuberculosis
CN110389382A (en) A Reservoir Representation Method Based on Convolutional Neural Network
CN113722894A (en) Model simplification-based fire spread simulation acceleration method and system
CN112180369A (en) One-dimensional synthetic aperture radiometer sea surface wind speed retrieval method based on deep learning
CN103018779B (en) A kind of offshore seismic exploration air gun source wavelet analogy method and system
CN113094962B (en) Multi-scale grid-based explosion shock wave overpressure field partition reconstruction method
Mohammadzaheri et al. Fuzzy analysis of resonance frequencies for structural inspection of an engine cylinder block
CN119203780A (en) Inverse simulation method for CO2 geological storage based on deep learning parameterization strategy
CN119644423A (en) A method for automatic identification of three-dimensional seismic faults based on deep learning
CN119067009A (en) A rapid simulation and evaluation method and system for large-scale shock wave damage
CN114943163B (en) A method for reconstructing overpressure field of explosion shock wave based on finite element and tomographic inversion
CN117493943A (en) Cable-stayed bridge cable damage identification method, equipment and storage medium
CN114966838B (en) Seismic intelligent inversion method and system driven by geological modeling and seismic forward modeling
CN114543789A (en) Star map identification method and system based on one-dimensional convolutional neural network
CN117688849B (en) A virtual test method for sea launch based on stratified sampling agent model
Liu et al. An efficient and accurate numerical method for simulating close-range blast loads of cylindrical charges based on neural network
CN105301635B (en) A kind of construction method and device of marine streamer time-lapse seismic data
CN108132486A (en) A kind of heavy magnetic gradient combines the Optimized Simulated annealing method of Interface Inversion with seismic data
CN114415236A (en) Method and system suitable for shallow structure detection in urban area

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant