Liquid level measurement method based on multi-sensing data fusion

文档序号:465449 发布日期:2021-12-31 浏览:9次 中文

阅读说明:本技术 基于多传感数据融合的液位测量方法 (Liquid level measurement method based on multi-sensing data fusion ) 是由 雷勇 孙硕 于 2021-09-28 设计创作,主要内容包括:本发明涉及液位测量技术,其公开了一种基于多传感数据融合的液位测量方法,提高测量精度和可信度。该测量方法包括以下步骤:S1、利用温湿度传感器和气压传感器的采集数据计算液位高度;S2、基于超声波传感器测量液位高度;S3、采用EKF-FNN算法对步骤S1计算的液位高度数据进行滤波处理,获得符合高斯分布的液位高度数据;S4、对步骤S2中测量的液位高度数据进行可信度判断,并修正数据分布方差,获得符合高斯分布的液位高度数据;S5、对步骤S3和步骤S4中所述符合高斯分布的液位高度数据进行数据融合。(The invention relates to a liquid level measurement technology, and discloses a liquid level measurement method based on multi-sensing data fusion, which improves measurement precision and reliability. The measuring method comprises the following steps: s1, calculating the liquid level height by using the collected data of the temperature and humidity sensor and the air pressure sensor; s2, measuring the liquid level height based on the ultrasonic sensor; s3, filtering the liquid level height data calculated in the step S1 by adopting an EKF-FNN algorithm to obtain liquid level height data in accordance with Gaussian distribution; s4, carrying out reliability judgment on the liquid level height data measured in the step S2, and correcting the data distribution variance to obtain liquid level height data in accordance with Gaussian distribution; and S5, performing data fusion on the liquid level height data conforming to the Gaussian distribution in the steps S3 and S4.)

1. The liquid level measuring method based on multi-sensing data fusion is applied to a liquid level measuring system comprising a plurality of sensors, wherein the plurality of sensors comprise a temperature and humidity sensor, an air pressure sensor and an ultrasonic sensor; it is characterized in that the preparation method is characterized in that,

the measuring method comprises the following steps:

s1, calculating the liquid level height by using the collected data of the temperature and humidity sensor and the air pressure sensor;

s2, measuring the liquid level height based on the ultrasonic sensor;

s3, filtering the liquid level height data calculated in the step S1 by adopting an EKF-FNN algorithm to obtain liquid level height data in accordance with Gaussian distribution;

s4, carrying out reliability judgment on the liquid level height data measured in the step S2, and correcting the data distribution variance to obtain liquid level height data in accordance with Gaussian distribution;

and S5, performing data fusion on the liquid level height data conforming to the Gaussian distribution in the steps S3 and S4.

2. The multi-sensory data fusion-based level measurement method of claim 1,

in step S2, the method further includes: and processing the measurement data of the ultrasonic sensor by adopting a weighted least square method to eliminate the ultrasonic echo error.

3. The multi-sensory data fusion-based level measurement method of claim 1,

in step S3, EKF-FNN algorithm is adopted to filter the liquid level height data calculated in step S1, and the processed liquid level height data conform to Gaussian model N22,δ2 2)。

4. The multi-sensory data fusion-based level measurement method of claim 3,

in step S4, the determining the reliability of the liquid level height data measured in step S2 and correcting the variance of data distribution specifically includes:

setting a difference threshold value and a sampling interval between two times of sampling, sampling data according to the sampling interval, comparing the difference value of the sampling data and the last sampling data with the difference threshold value, if the difference threshold value is smaller than the difference threshold value, judging that the sampling data is credible, and keeping the variance of data distribution unchangedOtherwise, judging that the sampled data is not credible, and correcting the data distribution variance to a larger valueThe processed liquid level height data accord with a Gaussian model

5. The multi-sensory data fusion-based level measurement method of claim 4,

in step S5, the data fusion of the liquid level height data conforming to the gaussian distribution in steps S3 and S4 specifically includes:

the fused data are subjected to Gaussian distribution and are set as N (mu, delta)2) The specific method of fusion is as follows:

wherein, mu, delta2The fused level height values are determined by the μ values for the fused mean and variance.

Technical Field

The invention relates to a liquid level measurement technology, in particular to a liquid level measurement method based on multi-sensing data fusion.

Background

In industries such as the wine and gasoline industries, since liquids are volatile, it is often necessary to accurately monitor the amount of the liquids. Since contact measurement is prone to contamination and loss of measurement value, non-contact measurement methods such as infrared or ultrasonic are mainly used at present. In view of the special characteristics of liquid, the influence of factors such as scattering angle of ultrasonic waves and echo, the measurement accuracy using a single sensor is low, and particularly, for liquid in transportation or in a severe environment, the measurement accuracy and reliability are more linearly reduced.

Disclosure of Invention

The technical problem to be solved by the invention is as follows: a liquid level measuring method based on multi-sensing data fusion is provided, and measuring accuracy and reliability are improved.

The technical scheme adopted by the invention for solving the technical problems is as follows:

a liquid level measurement method based on multi-sensing data fusion is applied to a liquid level measurement system comprising a plurality of sensors, wherein the plurality of sensors comprise a temperature and humidity sensor, an air pressure sensor and an ultrasonic sensor;

the measuring method comprises the following steps:

s1, calculating the liquid level height by using the collected data of the temperature and humidity sensor and the air pressure sensor;

s2, measuring the liquid level height based on the ultrasonic sensor;

s3, filtering the liquid level height data calculated in the step S1 by adopting an EKF-FNN algorithm to obtain liquid level height data in accordance with Gaussian distribution;

s4, carrying out reliability judgment on the liquid level height data measured in the step S2, and correcting the data distribution variance to obtain liquid level height data in accordance with Gaussian distribution;

and S5, performing data fusion on the liquid level height data conforming to the Gaussian distribution in the steps S3 and S4.

As a further optimization, step S2 further includes: and processing the measurement data of the ultrasonic sensor by adopting a weighted least square method to eliminate the ultrasonic echo error.

As a further optimization, in step S3, the EKF-FNN algorithm is used to filter the liquid level height data calculated in step S1, and the processed liquid level height data conforms to the gaussian model N22,δ2 2)。

As a further optimization, in step S4, the determining the reliability of the liquid level height data measured in step S2 and correcting the variance of data distribution specifically includes:

setting a difference threshold value and a sampling interval between two times of sampling, sampling data according to the sampling interval, comparing the difference value of the sampling data and the last sampling data with the difference threshold value, if the difference threshold value is smaller than the difference threshold value, judging that the sampling data is credible, and keeping the variance of data distribution unchangedOtherwise, judging that the sampled data is not credible, and correcting the data distribution variance to a larger valueThe processed liquid level height data accord with a Gaussian model

As a further optimization, in step S5, the data fusion of the liquid level height data conforming to the gaussian distribution in steps S3 and S4 specifically includes:

the fused data are subjected to Gaussian distribution and are set as N (mu, delta)2) The specific method of fusion is as follows:

wherein, mu, delta2The fused level height values are determined by the μ values for the fused mean and variance.

The invention has the beneficial effects that:

the liquid level testing method adopting multi-sensing data fusion effectively combines the global liquid level test and the local liquid level test, adopts EKF-FNN algorithm to process the height data acquired and converted by the temperature and humidity sensor and the air pressure sensor, and fuses the height data and the ultrasonic sensor acquired data which are processed by reliability judgment and variance correction. Invisible errors between echoes of ultrasonic waves are eliminated, and the test precision and the system robustness are improved.

Drawings

FIG. 1 is a flow chart of a liquid level measurement method based on multi-sensing data fusion in the present invention;

FIG. 2 is a schematic block diagram of the EKF-FNN algorithm;

FIG. 3 is an exemplary diagram of a multi-sensor data fusion level test application in the present invention.

Detailed Description

The invention adopts a liquid level testing mode of multi-sensing data fusion, can fully exert the advantages of each sensor, complement the advantages and disadvantages and improve the measuring precision. The method combines a temperature and humidity sensor and an air pressure sensor (for convenience of description, the combination is defined as a BTH measuring unit hereinafter), and an ultrasonic sensor is defined as a UR unit; the method effectively combines the global liquid level height and the local liquid level height, and processes BTH data by adopting an EKF-FNN algorithm formed by combining EKF (extended Kalman Filter) and FNN (fuzzy neural network). And then performing data fusion on the processed BTH data and the UR data, eliminating the echo error by reducing the weight value of the UR data when the echo error is larger, and solving the problems of low accuracy, poor test robustness and the like of the liquid level test.

In a specific implementation, the liquid level measurement method based on multi-sensing data fusion in the present invention is shown in fig. 1, and includes the following steps:

s1, calculating the liquid level height by using the collected data of the temperature and humidity sensor and the air pressure sensor;

in the step, a temperature and humidity sensor and an air pressure sensor carry out data acquisition to obtain temperature, humidity and air pressure data;

based on temperature, humidity and barometric data (BTH data for short), the liquid level height can be converted using the following formula:

wherein h is the liquid level height, P0Standard atmospheric pressure, RH measured humidity, t measured temperature, P measured air pressure data.

S2, measuring the liquid level height based on the ultrasonic sensor;

in this step, the ultrasonic sensor performs data acquisition to obtain flight distance data (UR data for short), and may process the UR data by using a weighted least square method to eliminate the ultrasonic echo error.

S3, filtering the liquid level height data calculated in the step S1 by adopting an EKF-FNN algorithm to obtain liquid level height data in accordance with Gaussian distribution;

in the step, EKF (extended Kalman Filter) expands Kalman filtering from a linear field to a nonlinear field, so that the EKF is a high-efficiency data filtering algorithm, and because the high-order terms of Taylor expansion are omitted, errors are inevitably introduced by the EKF. And the FNN (fuzzy neural network) has the advantages of self-learning, self-adaption and the like.

Thus, the present invention combines EKF and FNN to form an EKF-FNN algorithm in which FNN is processed by EKF by K (k),And an innovation sequence as a model input, and compensating an error generated by the EKF by using a deviation formed by the difference between the model output X (k) and the estimated value of the EKF.

The processed liquid level height data conform to a Gaussian model N22,δ2 2)。

S4, carrying out reliability judgment on the liquid level height data measured in the step S2, and correcting the data distribution variance to obtain liquid level height data in accordance with Gaussian distribution;

in this step, the reliability of UR data is determined by setting a sampling interval of UR data and setting a difference threshold epsilon of two sampling values, if the two previous and subsequent sampling data | S (k +1) -S (k) | < epsilon, the current sampling data is reliable, and the difference is corrected according to the result of reliability determination as follows:

when the sampled data is credible, the method adoptsCorrecting the variance of UR data and keeping the variance unchanged; when the sampled data is not credible, the method adoptsThe variance is corrected to a larger value.

The processed liquid level height data accord with a Gaussian model

And S5, performing data fusion on the liquid level height data conforming to the Gaussian distribution in the steps S3 and S4.

In this step, the two height data are fused, and since the two height data are both in accordance with the gaussian distribution, the fused data are also in accordance with the gaussian distribution, and are set as N (μ, δ)2) The specific method of fusion is as follows:

wherein, mu, delta2The fused level height values are determined by the μ values for the fused mean and variance.

An example of an application of the multi-sensor data fusion liquid level test in the invention is shown in fig. 3, in this example, STM32H7 of a semiconductor by law, which is used as a microcontroller, is written into an FNN network by Python + kereas on an Anaconda platform, and is stored as an H5 file after training. The trained h5 file is converted into a C file directly applicable to a microcontroller and loaded in IAR engineering through an AI module in an STM32CubeMx of STM 32. STM32H7 control ultrasonic wave, humiture, atmospheric pressure sensor carry out data acquisition, and humiture, atmospheric pressure data that the collection obtained carry out data fusion with ultrasonic sensor's distance data after through EKF-FNN processing, and the liquid level height data that will be accurate at last passes through the bluetooth and transmits to the host computer and show.

7页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种EPS泡沫料仓的检测装置及检测方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类