A mixed gas concentration detection method based on deep learning correction

By employing a deep learning-based method for detecting mixed gas concentrations, and utilizing sensor arrays and neural networks to correct for mixed gas concentrations, the detection error caused by sensor cross-response is resolved, thus achieving accurate detection of mixed gas concentrations.

CN115879371BActive Publication Date: 2026-04-14HANGZHOU DIANZI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU DIANZI UNIV
Filing Date
2022-11-28
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

In existing technologies, the detection results are interfered with by the cross-response of sensors when detecting mixed gases, making it difficult to accurately determine the concentration of different components.

Method used

A deep learning-based method for detecting mixed gas concentration is adopted, which uses a sensor array and a neural network to correct the mixed gas concentration. This includes building a mixed gas detection system and a mixed gas concentration correction network, and using a BP neural network for data correction.

Benefits of technology

By using a neural network to correct the concentration measurements of different components in the mixed gas, errors caused by sensor cross-response are reduced, thus improving the accuracy of mixed gas concentration detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115879371B_ABST
    Figure CN115879371B_ABST
Patent Text Reader

Abstract

The application discloses a mixed gas concentration detection method based on deep learning correction, which comprises the following steps: 1, a mixed gas detection system is built; the mixed gas detection system comprises a controller, an AD acquisition circuit, a sensor array module and an upper computer; the sensor array module comprises a plurality of sensors capable of detecting different gas concentrations; 2, the mixed gas detection system detects each measured gas; 3, the upper computer inputs the measured concentration values of each measured gas component into a mixed gas concentration correction network; the mixed gas concentration correction network outputs the judgment of whether each measured gas component exists in the mixed gas and outputs the correction values of the concentrations of each measured gas component. The application corrects the concentration measurement values of different components in the mixed gas through a neural network, so that more accurate mixed gas concentrations are obtained, and the errors caused by the cross response of the sensors are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of mixed gas concentration analysis technology, specifically relating to a mixed gas concentration detection method based on deep learning correction. Background Technology

[0002] With the development of technology, more and more mobile devices are being used in daily life, and gas sensors are becoming increasingly smaller and more accurate. When using gas sensors for single-gas detection, the results show good linearity and accuracy. However, when gases are mixed, linear interference occurs due to the cross-response of the sensors, which is detrimental to concentration determination. Therefore, in the detection of mixed gases, the mutual influence between the gases causes significant interference in the measured data, making it difficult to accurately obtain the concentrations of different components in the mixed gas.

[0003] Currently, electrochemical sensors are widely used for gas measurement due to their advantages such as portability, low cost, and ease of development. While a single sensor offers excellent selectivity and high accuracy when measuring a single gas, in reality, most gases are mixed. When measuring mixed gases, sensors experience significant interference because of cross-sensitivity, leading to responses from multiple gases in a mixture. This makes it difficult to accurately determine the concentrations of different components. Summary of the Invention

[0004] The purpose of this invention is to provide a method for detecting the concentration of mixed gases based on deep learning correction.

[0005] This invention discloses a method for detecting the concentration of mixed gases based on deep learning correction, comprising the following steps:

[0006] Step 1: Set up a mixed gas detection system

[0007] The mixed gas detection system includes a controller, an AD acquisition circuit, a sensor array module, and a host computer. The sensor array module includes multiple sensors capable of detecting different gas concentrations. The controller communicates with the host computer. The host computer contains a mixed gas concentration correction network.

[0008] Step 2: Place the mixed gas detection system built in Step 1 in the environment to be tested. The sensor array module detects each gas. The obtained analog signals are transmitted to the controller after analog-to-digital conversion. The controller then sends the obtained digital signals to the host computer.

[0009] Step 3: The host computer converts the received digital signal into the measured concentration value of each gas component and inputs it into the mixed gas concentration correction network; the mixed gas concentration correction network outputs the judgment of whether each gas component exists in the mixed gas and outputs the correction value of the concentration of each gas component.

[0010] Preferably, the mixed gas detection system constructed in step 1 also includes a WiFi module. The WiFi module is model ESP8266; the controller communicates with the cloud server via the WiFi module.

[0011] Preferably, the mixed gas detection system constructed in step 1 also includes a display module; the display module uses an LCD screen. The display module is controlled by a controller and is used to display the measured mixed gas data.

[0012] Preferably, the controller uses an STM32 series microcontroller.

[0013] Preferably, the sensor array module includes sensors for detecting the concentrations of four gases: carbon monoxide, nitrogen dioxide, sulfur dioxide, and formaldehyde.

[0014] Preferably, the mixed gas concentration correction network employs a backpropagation (BP) neural network, outputting the detected concentrations of the four gases, the presence of the four gases, and the calibrated concentration. This mixed gas concentration correction network comprises three convolutional layers and two fully connected layers. The three convolutional layers are sequentially connected, with a ReLU function appended to each convolutional layer; the two fully connected layers are positioned after the last convolutional layer, outputting the gas category and predicted concentration value, respectively.

[0015] Preferably, the loss function of the mixed gas concentration correction network is as follows:

[0016] TotalLoss=SigmoidCrossEnropyLoss+SmoothL1Loss

[0017]

[0018]

[0019] Where TotalLoss is the total loss; SigmoidCrossEntropyLoss is the probability loss; SmoothL1Loss is the concentration loss; p i Indicates the true classification; y represents the predicted class, N represents the number of samples, and the probability loss is the difference between the true classification value and the predicted value. i f(x) represents the detection concentration of the i-th sample. i) represents the predicted concentration of the i-th sample. N represents the total number of samples.

[0020] The beneficial effects of this invention are:

[0021] This invention uses a neural network to correct the concentration measurements of different components in a gas mixture, thereby obtaining a more accurate gas mixture concentration and reducing errors caused by sensor cross-response. Attached Figure Description

[0022] Figure 1 This is a schematic diagram of the mixed gas detection system in this invention;

[0023] Figure 2 This invention provides a signal transmission diagram for mixed gas concentration detection.

[0024] Figure 3 This is a structural diagram of the mixed gas concentration correction network used in this invention. Detailed Implementation

[0025] The present invention will be further described below with reference to the accompanying drawings.

[0026] A method for detecting the concentration of mixed gases based on deep learning correction includes the following steps:

[0027] Step 1: Set up a mixed gas detection system

[0028] like Figure 1 and 2 As shown, the mixed gas detection system includes a controller 1, an AD acquisition circuit 2, a WiFi module 3, a display module 4, a sensor array module 5, and a host computer 6. The WiFi module 3 is an ESP8266; the display module 4 uses an LCD screen. The controller 1 uses an STM32 series microcontroller. The sensor array reacts with various gases being measured and generates electrical signals, serving as the data source for the entire system. The sensor array module 5 contains Alpha's Apollo four-electrode electrochemical sensor and a three-electrode sensor; specifically, it includes four sensors with models CO-B4, NO2-B4, SO2-B4, and ETO-A1 (used to detect carbon monoxide, nitrogen dioxide, sulfur dioxide, and formaldehyde, respectively).

[0029] Both WiFi module 3 and display module 4 are connected to controller 1. Controller 1 communicates with the cloud server via WiFi module 3 to upload mixed gas data. Display module 4 displays the measured mixed gas data. AD acquisition circuit 2 converts the analog signal output from sensor array module 5 to digital and transmits it to controller 1. Controller 1 sends the obtained digital signal to host computer 6. Host computer 6 corrects the measured gas concentration signal and sends it back to controller 1. The mixed gas detection system needs to work in conjunction with the mixed gas concentration detection method mounted on host computer 6 to achieve accurate monitoring and prediction of mixed gas concentration.

[0030] Step 2: Place the mixed gas detection system built in Step 1 in the environment to be tested. Sensor array module 5 detects each gas. The obtained analog signal is transmitted to controller 1 after analog-to-digital conversion. Controller 1 then sends the obtained digital signal to host computer 6. The data sent by controller 1 to host computer 6 is in txt format, including eight files, namely files O0-O7; each or two files correspond to the concentration of a type of gas. Files O0 and O1 correspond to CO (carbon monoxide); files O2 and O3 correspond to NO2 (nitrogen dioxide); files O4 and O5 correspond to SO2 (sulfur dioxide); file O7 corresponds to HCHO (formaldehyde); file O6 is left blank.

[0031] Except for formaldehyde, the sensors for detecting each gas have two electrodes: one is the reference electrode, and the other is the working electrode. Therefore, during data processing, the data from the working electrode is subtracted from the data from the reference electrode. The data files corresponding to the working electrodes are files O1, O3, O5, and O7, respectively. Formaldehyde has no reference electrode, so file O7 does not need to be subtracted.

[0032] For carbon monoxide, nitrogen dioxide, and sulfur dioxide, the detection concentration of these three gases is obtained by subtracting the data output from the working electrode from that from the reference electrode; for formaldehyde, the data output from the working electrode is directly used as the detection concentration.

[0033] Step 3: Construct a mixed gas concentration correction network for correcting the concentrations of the four types of gases.

[0034] like Figure 3 As shown, the mixed gas concentration correction network employs a convolutional neural network, outputting the detected concentrations of four gases, the presence of the four gases, and the calibrated concentration. This mixed gas concentration correction network comprises three convolutional layers and two fully connected layers. The kernel size of the convolutional layers is 3*3; the three convolutional layers are sequentially connected, and each convolutional layer is followed by a ReLU function; the two fully connected layers are placed after the last convolutional layer, and are used to output the gas category and the predicted concentration value, respectively.

[0035] The data construction of the mixed gas concentration correction network is as follows: the data length is adjusted to a consistent 32 values ​​through numerical interpolation, and an 8*32 array is constructed as the network input. After passing through three convolutional layers with a kernel size of 3*3, each convolutional layer branches into two branches, each passing through two fully connected layers, outputting the category and concentration respectively.

[0036] The ReLU function is used to accelerate convergence, and when it is greater than 0, there will be no gradient vanishing or gradient saturation. The mixed gas concentration correction network outputs two sets of data: one set is the classification result of the four gases, i.e., whether each of the four gases exists; the other set is the predicted concentration value of the four gases.

[0037] After 10,000 echo iterations, the mixed gas concentration correction network converges to the final model, yielding the loss function. The total loss, TotaLoss, consists of two parts: the probability loss, SigmoidCrossEntropyLoss, and the concentration loss, SmoothL1Loss. The expressions for the total loss, TotaLoss, SigmoidCrossEntropyLoss, and SmoothL1Loss are as follows:

[0038] TotalLoss=SigmoidCrossEnropyLoss+SmoothL1Loss

[0039]

[0040]

[0041] Where, p i This represents the true classification, which is either 0 or 1. 1 indicates the presence of gas, and 0 indicates its absence. y represents the predicted class, N represents the number of samples, and the probability loss is the difference between the true classification value and the predicted value. i f(x) represents the detection concentration of the i-th sample. i ) represents the predicted concentration of the i-th sample. N represents the total number of samples. When y i -f(x i When the absolute value of ) is less than 1, take 0.5 times its square; otherwise, take the absolute value minus 0.5 as the concentration loss SmoothL1Loss.

[0042] Step 4: Input the detected concentrations of the four gases obtained in Step 2 into the mixed gas concentration correction network; the mixed gas concentration correction network outputs whether the four gases exist and the concentration values ​​of the four gases after being corrected by the mixed gas concentration correction network.

[0043] Step 5: The host computer 6 sends the corrected concentration values ​​of the four gases to the controller 1; the controller 1 controls the display module 4 to display the corrected concentration values ​​of the four gases.

[0044] Four gas sources are used to send different volumes of gas into a mixing cylinder for thorough mixing; the mixed gas in the mixing cylinder is output to a sensor array, and an analog signal is generated after the reaction; the concentration of the four gases is detected and corrected using the method provided in this embodiment, and the obtained concentration value is closer to the true concentration value than the value directly measured by the sensor.

Claims

1. A method for detecting the concentration of mixed gases based on deep learning correction, characterized in that: Includes the following steps: Step 1: Set up a mixed gas detection system The mixed gas detection system includes a controller (1), an AD acquisition circuit (2), a sensor array module (5), and a host computer (6); the sensor array module (5) includes multiple sensors capable of detecting different gas concentrations; the controller (1) communicates with the host computer (6); the host computer (6) is equipped with a mixed gas concentration correction network; The sensor array module (5) includes sensors for detecting the concentrations of four gases: carbon monoxide, nitrogen dioxide, sulfur dioxide, and formaldehyde. The mixed gas concentration correction network uses a BP neural network, taking the detected concentrations of four gases as input and the presence and calibration concentrations of the four gases as outputs. The mixed gas concentration correction network includes three convolutional layers and two fully connected layers. The three convolutional layers are connected in sequence, and each convolutional layer is followed by a ReLU function. The two fully connected layers are placed after the last convolutional layer and are used to output the gas category and the predicted concentration value, respectively. The loss function of the mixed gas concentration correction network is as follows: Where TotalLoss is the total loss; SigmoidCrossEntropyLoss is the probability loss; SmoothL1Loss is the concentration loss; p i Indicates the true classification; Let y represent the predicted category, N represent the number of samples, and the probability loss is the difference between the true classification value and the predicted value. i f(x) represents the detection concentration of the i-th sample. i () represents the predicted concentration of the i-th sample; N represents the total number of samples; Step 2: Place the mixed gas detection system built in Step 1 in the environment to be tested; the sensor array module (5) detects each gas to be tested; the obtained analog signal is transmitted to the controller (1) after analog-to-digital conversion; the controller (1) then sends the obtained digital signal to the host computer (6). Step 3: The host computer (6) converts the received digital signal into the measured concentration value of each gas component and inputs it into the mixed gas concentration correction network; the mixed gas concentration correction network outputs the judgment of whether each gas component exists in the mixed gas and outputs the correction value of the concentration of each gas component.

2. The method for detecting mixed gas concentration based on deep learning correction according to claim 1, characterized in that: The mixed gas detection system constructed in step 1 also includes a WiFi module (3); the WiFi module (3) is model ESP8266; the controller (1) communicates with the cloud server through the WiFi module (3).

3. The method for detecting mixed gas concentration based on deep learning correction according to claim 1, characterized in that: The mixed gas detection system constructed in step 1 also includes a display module (4); the display module (4) adopts an LCD display screen; the display module (4) is controlled by the controller (1) to display the measured mixed gas data.

4. The method for detecting the concentration of a mixed gas based on deep learning correction according to claim 1, characterized in that: The controller (1) mentioned above uses an STM32 series microcontroller.

Citation Information

Patent Citations

  • Method and device for gas sensor array mixed gas detection based on machine learning

    CN111126575A

  • Mixed gas identification method and system, terminal equipment and readable storage medium

    CN114707598A