A gas sensor detection system and method based on distribution feature optimization

By constructing a dynamic gas sampling and mixing module and dynamic temperature modulation, combined with a convolutional neural network model optimized by distribution characteristics, the problems of slow detection speed and low accuracy in existing gas detection systems are solved, achieving efficient and accurate gas detection and identification.

CN116593540BActive Publication Date: 2025-11-07NORTHEASTERN UNIV CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310562125.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-18
Publication Date
2025-11-07
Estimated Expiration
2043-05-18

AI Technical Summary

Technical Problem

Existing gas detection systems suffer from slow detection speed and low accuracy, especially in the gas sampling and feature information acquisition processes, where there are system errors and a single dimension of response signal.

Method used

By constructing a gas dynamic sampling and mixing module, uniform mixing of gas in the gas chamber is achieved, and a multi-dimensional response signal is obtained by using a dynamic temperature modulation heating method. Combined with a convolutional neural network model optimized by distribution characteristics, gas information is identified and classified.

Benefits of technology

It achieves efficient and accurate gas detection, increasing the gas detection accuracy rate from 97.35% to 99.36%, ensuring the speed and accuracy of gas detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure QLYQS_3
    Figure QLYQS_3
  • Figure QLYQS_8
    Figure QLYQS_8
  • Figure QLYQS_9
    Figure QLYQS_9
Patent Text Reader

Abstract

The application designs a gas sensor detection system and method based on distribution feature optimization, and belongs to the technical field of gas detection; when gas detection starts, a single-chip microcomputer program-controlled output PWM signal is used to control a gas sampling unit to realize dynamic collection of sample gas, and a mixing flow device is used to realize uniform distribution of gas in the device; a gas sensor is used to collect gas feature information, and the gas feature information is stored in the single-chip microcomputer after pretreatment; the mean value, dispersion coefficient and skewness coefficient are selected to reflect the concentration trend, dispersion degree and distribution shape of the gas feature information to describe the distribution feature; a basic convolutional neural network model and a distribution feature optimized convolutional neural network model are used to classify sample gas respectively, and the results are recorded as Result_1 and Result_2; the two results are compared, it is proved that the classification result of the application method for gas is more accurate, and accurate identification and classification of gas are realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of gas detection, and particularly relates to a gas sensor detection system and method based on distribution feature optimization. BACKGROUND

[0002] With the rapid development of global industry, more and more industrial waste gas is discharged into the air, however, the volatile harmful gas in the waste gas can have certain influence on human health and environment. In terms of human health, short-time contact with such gas can cause people to have symptoms such as headache, dizziness, visual impairment and memory loss; at the same time, when the waste gas reaches a certain concentration, it can also induce environmental problems such as haze, ozone hole and greenhouse effect. Therefore, how to realize accurate and efficient gas detection has gradually become one of the research hotspots.

[0003] The current gas detection system mainly includes a gas sampling module, a gas feature information acquisition module and an algorithm detection module. Among them, the gas sampling module mainly adopts a micro air pump to realize the collection of the environment to be detected gas, and there are problems such as non-adjustable ventilation speed and uneven gas distribution; for the gas feature information acquisition and algorithm detection part, the existing gas detection system mainly obtains a response signal based on a series-connection partial pressure circuit, when the gas-sensitive material in the gas sensor contacts the to-be-detected gas, the gas molecules react with the oxygen ions on the surface of the gas-sensitive material to generate electrons back to the conductive band of the gas-sensitive material, so that the carrier concentration on the conductive band changes, thereby causing the resistance of the gas-sensitive material to change, by connecting the gas-sensitive material and the fixed-value resistor in series, the partial pressure value of the gas-sensitive material is measured, after the voltage value is stable, it is compared with the voltage value divided by the gas-sensitive material in the air, and the ratio is the response signal of the gas-sensitive material. The response signal obtained in this process has a large system error, and the response signal dimension is relatively single, which will affect the algorithm detection process to a certain extent, resulting in low gas detection accuracy.

[0004] In summary, the existing gas detection system has the problems of slow detection speed and low detection accuracy. Therefore, a gas detection system is needed to realize efficient detection of gas. SUMMARY

[0005] In view of the deficiencies of the prior art, the present application provides a gas sensor detection system and method based on distribution feature optimization, which comprises three processes of identification, gas dynamic sampling and mixing and gas feature information collection. The present application realizes adjustable ventilation speed and uniform mixing of the gas to be detected in the gas chamber by building a gas dynamic sampling and mixing module; the gas feature information collection module is built, which adopts a dynamic temperature modulation heating mode to obtain multi-dimensional response signals, thereby providing more gas information features for the identification part; and the identification module realizes effective detection of the multi-dimensional response signals, thereby realizing high-precision gas detection.

[0006] A gas sensor detection system based on distribution feature optimization, specifically comprising a device shell; an air inlet channel is formed on the outside of the device shell; a first sampling unit is installed in the air inlet channel, and the first sampling unit is composed of a first variable frequency motor connected with a fan blade; an air outlet channel is formed on the outside of the device shell; a second sampling unit is installed in the air outlet channel, and the second sampling unit is composed of a second variable frequency motor connected with a fan blade; a driving gear is installed on the rotating shaft of the second variable frequency motor of the second sampling unit; a square plate is further installed in the device shell; the square plate is connected with the air inlet channel; two rotating rods are arranged in the device shell; the rotating rods are installed with two driven gears which are in parallel meshing transmission with the driving gear installed on the rotating shaft of the second variable frequency motor, and the rotating rods are further installed with two fan blades; a gas sensor and a main circuit board are installed in the device shell, a single-chip microcomputer is connected with the sensor and the variable frequency motor, and the main circuit board is composed of the single-chip microcomputer and peripheral circuits thereof; a total power switch is arranged on the outside of the device shell and connected with the single-chip microcomputer.

[0007] A gas sensor detection method based on distribution feature optimization, which is realized based on the above-mentioned gas sensor detection system based on distribution feature optimization, and specifically comprises the following steps:

[0008] Step 1: dynamically obtaining sample gas and mixing the sample gas to realize the collection of the sample gas and the uniform mixing of the sample gas in the system; after the gas sensor completes the gas feature collection in step 2, the gas in the system is discharged;

[0009] Step 1.1: using the first sampling unit to obtain the sample gas, and outputting a PWM signal by the single-chip microcomputer to control the sampling rate of the sampling unit, thereby realizing dynamic sampling of the gas;

[0010] Step 1.2: outputting a PWM signal with a duty ratio by the single-chip microcomputer to realize rapid sampling of the sample gas; after the gas uniformly fills the entire system, the sampling is completed, the single-chip microcomputer adjusts the duty ratio of the PWM signal, and at this time, the airflow in the system is stable;

[0011] Step 1.3: Through the parallel meshing transmission between the driving gear on the variable frequency motor shaft and the driven gear mounted on the rotating rod in the second gas sampling unit, the driving gear drives the driven gear to rotate, thereby driving the rotating rod with two fan blades to rotate, so as to achieve uniform mixing of the sample gas in the device;

[0012] Step 1.4: After the gas sensor completes the gas characteristic acquisition in Step 2, the microcontroller outputs a PWM signal with a duty cycle again to realize the rapid discharge of gas in the system;

[0013] Step 2: Heat the gas sensor using dynamic temperature modulation and use the sensor to acquire the characteristic information of the sample gas in the system;

[0014] Step 2.1: Heat the gas sensor using a dynamic temperature modulation heating method until it reaches its operating temperature;

[0015] Step 2.2: When collecting gas characteristic information, the resistance value of the gas sensor is used as the response signal. The response signal of the gas sensor within one heating cycle is collected and stored in the microcontroller.

[0016] Step 3: Preprocess the gas sensor response signal obtained in Step 2 to obtain gas information features and store them in the microcontroller; optimize the basic convolutional neural network model to obtain a convolutional neural network model with optimized distribution features to classify the sample gas and obtain the classification result Result_2;

[0017] Step 3.1: Obtain the m-dimensional response signal S = {s1, s2, ..., s} obtained in Step 2 for one period. m} and store it in the microcontroller;

[0018] Step 3.2: Normalize the acquired response signal, and normalize each element s. i (i = 1, 2, ..., m) are normalized to [0, 1]; "max-min" normalization is used to normalize the information features to [0, 1], and the normalized gas feature information is stored in the microcontroller. The specific normalization method is as follows:

[0019]

[0020] Step 3.3: Randomly divide the sample information processed in Step 3.2 into a training set X_train and a validation set X_valid according to an 8:2 ratio;

[0021] Step 3.4: Use the training set X_train obtained in Step 3.3 to train the convolutional neural network model. After training is complete, use the obtained model to classify the validation set X_valid.

[0022] Step 3.4.1: Divide the m-dimensional response signal stored in the single-chip microcomputer into multiple signal segments of the same size using a sliding window operation;

[0023] Step 3.4.2: Specify the sliding window step size as x, the edge padding as q, and the convolution kernel size as y x z; according to the size relationship between the convolution layer input and the convolution layer output, calculate the input size of the next convolution layer:

[0024]

[0025]

[0026] Wherein, Width1 and Hight1 represent the width and height of the convolution input respectively, Width2 and Hight2 represent the width and height of the convolution output respectively, Filer w And Filer H represent the width and height of the convolution kernel respectively, Step represents the step size of the sliding window, and P represents the edge padding size;

[0027] Step 3.4.3: Establish a convolutional neural network model and complete the training of the convolutional neural network model, and the specific network architecture is as follows: input layer → convolutional layer → ReLU activation function → pooling layer → convolutional layer → ReLU activation function → pooling layer → fully connected layer → Softmax activation function → output layer;

[0028] Step 3.4.4: Use the trained model to classify the validation set X_valid, and obtain the probability value p i of the classified gas belonging to the i-th class, select the class j corresponding to the maximum probability as the predicted class of the classified gas, and represent it as:

[0029] P{p1,p2,…,p n}=f(s1,s2,…,s m )

[0030] p j =max{p1,p2,…,p j ,…,p n}

[0031] Wherein, p n is the probability that the classified gas is the n-th gas;

[0032] Step 3.5: On the basis of the convolutional neural network model of step 3.4, the distribution feature information of the response signal is used to optimize the model;

[0033] Step 3.5.1: Select the mean, coefficient of dispersion and skewness coefficient to reflect the central tendency, dispersion degree and distribution shape of the response signal S to describe the distribution characteristics of the response signal;

[0034] Step 3.5.2: Select the response signal S = {s1, s2, …, s m}, calculate its mean μ l , coefficient of dispersion Cv l and skewness coefficient Sk l :

[0035]

[0036]

[0037]

[0038] where s k is the kth dimensional feature information of the response signal S, m is the dimension of the response signal S, and t represents the order of central moment used to calculate the skewness coefficient Sk l ;

[0039] Step 3.5.3: Calculate the distribution characteristic deviation function of the response signal S according to the following formula:

[0040] D i (μ l ,Cv l ,Sk l )=f(‖μ l -μ i0 ‖,‖Cv l -Cv i0 ‖,‖Sk l -Sk i0 ‖)

[0041] where D i (μ l ,Cv l ,Sk l ) is the distribution characteristic deviation function of the response signal S for the ith class, μ l , Cv l , Sk l are the mean, coefficient of dispersion and skewness coefficient of the response signal S, respectively, and μ i0 , Cv i0 , Sk i0 are the mean, coefficient of dispersion and skewness coefficient of the ith gas population, respectively.

[0042] Step 3.5.4: Use the distribution characteristic deviation function to optimize the convolutional neural network model, as follows:

[0043] P{p1, p2, …, p n} = (1 - θ) · f(s l1 , s l2 , …, s lm ) - θ · D i (μ l , Cv l , Sk l )

[0044] wherein θ is a correction coefficient and θ ∈, 0, 1];

[0045] Step 3.6: training the optimized convolutional neural network model using the training set X_train, and after the model training is completed, using the obtained model to classify the validation set X_valid, and recording the classification result as Result_2; obtaining the sample gas detection result.

[0046] The present application has the beneficial technical effects:

[0047] The gas sensor detection system and method based on distribution feature optimization designed by the present application includes three parts of identification, gas dynamic sampling and mixing flow, and gas feature information collection. The gas dynamic sampling and mixing flow are adopted to realize the program-controlled dynamic sampling of the to-be-detected gas, and the uniform mixing of the to-be-detected gas in the gas chamber is realized by the mixing flow device; for the gas feature information collection, the dynamic temperature modulation heating mode is adopted to obtain the multi-dimensional response signal, and more gas information features are provided for the identification part; finally, by designing the identification model, the multi-dimensional gas information distribution feature is used to optimize the convolutional neural network model, and the accurate recognition and accurate classification of the gas are realized. BRIEF DESCRIPTION OF DRAWINGS

[0048] Figure 1 The gas sensor detection system structure schematic diagram based on distribution feature optimization of the embodiment of the present application;

[0049] Figure 2 The structure enlarged schematic diagram of the embodiment A of the present application;

[0050] Figure 3 The overall architecture diagram of the gas sensor detection method based on distribution feature optimization of the embodiment of the present application;

[0051] Figure 4 The training set classification accuracy based on the uncorrected convolutional neural network model of the embodiment of the present application;

[0052] Figure 5 The validation set classification accuracy based on the uncorrected convolutional neural network model of the embodiment of the present application;

[0053] Figure 6The embodiment of the application is based on a distribution feature optimization gas sensor detection method correction coefficient influence curve on the training set classification accuracy rate;

[0054] Figure 7 The embodiment of the application is based on a distribution feature optimization gas sensor detection method correction coefficient influence curve on the validation set classification accuracy rate;

[0055] Figure 8 The embodiment of the application is based on a distribution feature optimization gas sensor detection system and method training set classification accuracy rate;

[0056] Figure 9 The embodiment of the application is based on a distribution feature optimization gas sensor detection system and method validation set classification accuracy rate. DETAILED DESCRIPTION

[0057] The application will be further described below in conjunction with the drawings and embodiments.

[0058] A distribution feature optimization gas sensor detection system, as shown in the accompanying Figure 1 The device housing 13 is provided with an air inlet channel 1 on the outside. The first sampling unit 2 is installed inside the air inlet channel 1, and the first sampling unit 2 is composed of a first variable frequency motor connected to a fan blade. The device housing 13 is provided with an air outlet channel 11 on the outside. The second sampling unit 10 is installed inside the air outlet channel 11, and the second sampling unit is composed of a second variable frequency motor connected to a fan blade. The second variable frequency motor of the second sampling unit 10 is provided with a driving gear 6 on the shaft. The device housing 13 is also provided with a square plate 3 inside. The square plate 3 is connected to the air inlet channel 1. The device housing 13 is provided with two rotating rods 4 inside. The rotating rods 4 are provided with two driven gears 7, which are parallel to the driving gear 6 installed on the shaft of the second variable frequency motor. The rotating rods 4 are also provided with two fan blades 5. The device housing 13 is provided with a gas sensor 9 and a main circuit board 8 inside. The single-chip microcomputer is connected to the sensor and the variable frequency motor. The main circuit board 8 is composed of a single-chip microcomputer and its peripheral circuit. The device housing 13 is provided with a total power switch 12 on the outside, which is connected to the single-chip microcomputer.

[0059] The connection relationship between the driving gear 6, the two driven gears 7, the rotating rods 4 and the second sampling unit 10 is shown in the accompanying Figure 1 A, as shown in the accompanying Figure 2 ;

[0060] A distribution feature optimization gas sensor detection method based on the above-mentioned distribution feature optimization gas sensor detection system, as shown in the accompanying Figure 3 The method specifically comprises the following steps:

[0061] Step 1: dynamically acquire sample gas and mix it to realize sample gas collection and uniform mixing of sample gas in the system; after the gas sensor completes the gas feature acquisition work in step 2, the gas in the system is discharged;

[0062] Step 1.1: use the first sampling unit to acquire sample gas, and output a PWM signal to control the sampling rate of the sampling unit through single-chip program control to realize dynamic sampling of gas;

[0063] Step 1.2: output a PWM signal with a large duty ratio from the single-chip program control to realize rapid sampling of sample gas; after the gas uniformly fills the entire system, sampling is completed, the single-chip adjusts the PWM signal duty ratio, at this time the airflow in the system is stable, ensuring detection accuracy;

[0064] Step 1.3: through the parallel mesh transmission between the driving gear 6 on the variable frequency motor shaft in the second gas sampling unit 10 and the driven gear 7 installed on the rotating rod, the driving gear 6 drives the driven gear 7 to rotate, thereby driving the rotating rod 4 installed with two fan blades 5 to rotate, realizing uniform mixing of sample gas in the device, ensuring the accuracy of gas feature information acquisition;

[0065] Step 1.4: after the gas sensor completes the gas feature acquisition work in step 2, the exhaust signal will be fed back to the single-chip, which will output a PWM signal with a large duty ratio again to realize rapid discharge of the gas in the system;

[0066] Step 2: heat the gas sensor in a dynamic temperature modulation manner, and use the sensor to acquire sample gas feature information in the system;

[0067] Step 2.1: heat the gas sensor in a dynamic temperature modulation manner until it reaches its working temperature;

[0068] Step 2.2: during gas feature information acquisition, the resistance value of the gas sensor is taken as the response signal, the response signal of the gas sensor in a heating period is collected and stored in the single-chip;

[0069] Step 3: preprocess the gas sensor response signal obtained in step 2 to obtain gas information features and store them in the single-chip; optimize the basic convolutional neural network model to obtain a distributed feature optimized convolutional neural network model to classify sample gas and obtain a classification result Result_2;

[0070] Step 3.1: obtain a period of m-dimensional response signal S = {s1, s2, …, sm} in step 2 and store it in the single-chip; m} in step 2 and store it in the single-chip;

[0071] Step 3.2: Normalizing the acquired response signal, each element s i (i = 1, 2, …, m) is normalized to [0, 1]; the information feature is normalized to [0, 1] by taking the "max-min" normalization, and the normalized gas feature information is stored in the single-chip microcomputer. The specific normalization method is as follows:

[0072]

[0073] Step 3.3: The sample information processed in step 3.2 is randomly divided into a training set X_train and a validation set X_valid according to an 8:2 ratio relationship;

[0074] Step 3.4: The training set X_train obtained in step 3.3 is used to train the convolutional neural network model. After the training is completed, the obtained model is used to classify the validation set X_valid, and the classification result is recorded as Result_1;

[0075] Step 3.4.1: A sliding window operation is adopted to divide the m-dimensional response signal stored in the single-chip microcomputer into multiple signal segments with the same size;

[0076] Step 3.4.2: The sliding window step is specified as x, the edge padding is specified as q, and the convolution kernel size is specified as y x z. According to the size relationship between the convolution layer input and the convolution layer output, the input size of the next convolution layer is calculated:

[0077]

[0078]

[0079] Wherein, Width1 and Hight1 represent the width and height of the convolution input respectively, Width2 and Hight2 represent the width and height of the convolution output respectively, Filer w and Filer H represent the width and height of the convolution kernel respectively, Step represents the step size of the sliding window, and P represents the edge padding size;

[0080] Step 3.4.3: A convolutional neural network model is established, and the training of the convolutional neural network model is completed. The specific network architecture is as follows: input layer → convolutional layer → ReLU activation function → pooling layer → convolutional layer → ReLU activation function → pooling layer → fully connected layer → Softmax activation function → output layer;

[0081] Step 3.4.4: The trained model is used to classify the validation set X_valid, and the probability value p i, the category j corresponding to the maximum probability is selected as the predicted category of the gas to be classified, denoted as:

[0082] P{p1,p2,…,p n}=f(s1,s2,…,s m )

[0083] p j =max{p1,p2,…,p j ,…,p n}

[0084] wherein p n is the probability of the gas to be classified being the nth category of gas;

[0085] Step 3.4.5: the classification result of the verification set X_valid is recorded as Result_1; the classification accuracy of the training set based on the unmodified convolutional neural network model is as shown in the attached Figure 4 ; the classification accuracy of the verification set based on the unmodified convolutional neural network model is as shown in the attached Figure 5 ;

[0086] Step 3.5: based on the convolutional neural network model of step 3.4, the model is optimized using the distribution feature information of the response signal;

[0087] Step 3.5.1: the mean, dispersion coefficient and skewness coefficient are selected to reflect the central tendency, dispersion degree and distribution shape of the response signal S to describe the distribution features of the response signal;

[0088] Step 3.5.2: the response signal S={s1,s2,…,s m} is selected, and the mean μ l , dispersion coefficient Cv l and skewness coefficient Sk l are calculated:

[0089]

[0090]

[0091]

[0092] wherein s k is the kth feature information of the response signal S, m is the dimension of the response signal S, and t represents the tth central moment used to calculate the skewness coefficient Sk l ;

[0093] Step 3.5.3: the distribution feature deviation function of the response signal S is calculated according to the following formula:

[0094] D i (μl ,Cv l l )=f(‖μ l -μ i0 ‖,‖Cv l -Cv i0 ‖,‖Sk l -Sk i0 ‖)

[0095] wherein D i (μ l ,Cv l ,Sk l ) is a distribution feature deviation function of the response signal S to the i-th category, μ l , Cv l , Sk l are the mean, dispersion coefficient and skewness coefficient of the response signal S, respectively, μ i0 , Cv i0 , Sk i0 are the mean, dispersion coefficient and skewness coefficient of the i-th category of gas population, respectively;

[0096] Step 3.5.4: optimizing the convolutional neural network model using the distribution feature deviation function, and the formula is as follows:

[0097] P{p1,p2,…,p n}=(1-θ)·f(s l1 ,s l2 ,…,s lm )-θ·D i (μ l ,Cv l ,Sk l )

[0098] wherein θ is a correction coefficient and θ∈,0,1];

[0099] Step 3.6: training the optimized convolutional neural network model using the training set X_train, and after the model training is completed, using the obtained model to classify the validation set X_valid, and recording the classification result as Result_2; obtaining the sample gas detection result.

[0100] Comparing Result_1 and Result_2, it can be seen that the gas sample classification result obtained by optimizing the convolutional neural network is more accurate; the influence curve of the correction coefficient of the gas sensor detection method based on distribution feature optimization on the training set classification accuracy is shown in FIG. 2; and the influence curve of the correction coefficient of the gas sensor detection method based on distribution feature optimization on the validation set classification accuracy is shown in FIG. 3. Figure 6 Figure 7 ​​​

[0101] The training set classification accuracy of the gas sensor detection system and method based on distribution feature optimization is as shown in the accompanying Figure 8 The validation set classification accuracy of the gas sensor detection system and method based on distribution feature optimization is as shown in the accompanying Figure 9 .

[0102] The technical key point of the application is:

[0103] 1. Establishment of a distribution feature optimized convolutional neural network classification model: by calculating the distribution features of multi-dimensional response signals, constructing a distribution feature bias function, and modifying the convolutional neural network model, the risk of overfitting in the model training process is reduced, and the classification accuracy is improved.

[0104] 2. Construction of gas dynamic sampling and mixing flow module: using a single-chip microcomputer to program the gas sampling unit, the gas sampling speed is adjustable and controllable, the gas sampling speed is improved, and the stability of the airflow in the device is ensured; at the same time, through the parallel meshing transmission action of the gear, the rotating rod with two fan leaves installed on both sides is driven to rotate at a constant speed, realizing uniform mixing of the sample gas in the device, and ensuring the accuracy of gas feature information acquisition.

[0105] 3. Acquisition of multi-dimensional response signals: build a gas feature information acquisition module, use dynamic temperature modulation heating method to heat the gas sensor, collect the response signal of the gas sensor in a heating period, and provide multi-dimensional feature information for the algorithm detection stage.

[0106] The gas sensor system analysis method based on distribution feature optimization designed by the application divides 1500 groups of sample gas into training set and validation set and selects appropriate correction parameter θ, uses the distribution feature optimization convolutional neural network model of gas information, and the optimized model can improve the classification accuracy of the training set from the original 97.35% to 99.36%; the validation set is used to verify the model, and the classification accuracy of the validation set is improved from the original 97% to 99%.

[0107] In summary, the gas sensor system analysis method based on distribution feature optimization designed by the application effectively solves the problems of long detection time, low recognition rate and low detection accuracy in the gas detection process, and successfully improves the accuracy of gas detection to more than 99%.

Claims

1. A gas sensor detection method based on distribution feature optimization, characterized in that, Specifically comprising the following steps: Step 1: dynamically obtaining sample gas and mixing it to realize sample gas collection and uniform mixing of sample gas in the system; after the gas sensor completes the gas feature collection work in step 2, the gas in the system is discharged; Wherein, the system is a gas sensor detection system based on distribution feature optimization, the gas sensor detection system based on distribution feature optimization comprises a device shell; an air inlet channel is formed on the outside of the device shell; a first sampling unit is installed in the air inlet channel, the first sampling unit is composed of a first variable frequency motor connected with a fan blade; an air outlet channel is formed on the outside of the device shell; a second sampling unit is installed in the air outlet channel, the second sampling unit is composed of a second variable frequency motor connected with a fan blade; a driving gear is installed on the rotating shaft of the second variable frequency motor of the second sampling unit; a square plate is further installed in the device shell; the square plate is connected with the air inlet channel; two rotating rods are arranged in the device shell; the rotating rods are provided with two driven gears which are in parallel meshing transmission with the driving gear installed on the rotating shaft of the second variable frequency motor, and the rotating rods are further provided with two fan blades; a gas sensor and a main circuit board are installed in the device shell, a single-chip microcomputer is connected with the sensor and the variable frequency motor, and the main circuit board is composed of the single-chip microcomputer and peripheral circuits thereof; a total power switch is arranged on the outside of the device shell and connected with the single-chip microcomputer; Step 2: heating the gas sensor in a dynamic temperature modulation mode, and acquiring sample gas feature information in the system by using the sensor; Step 3: preprocessing the response signal of the gas sensor acquired in step 2 to obtain gas information features and store them in the single-chip microcomputer; optimizing the basic convolutional neural network model to obtain a distribution feature optimized convolutional neural network model, classifying the sample gas to obtain a classification result Result_2; Step 3.1: Obtain the m-dimensional response signal of one cycle from step 2 and store it in the single-chip microcomputer; Step 3.2: Normalization is performed on the acquired response signal, and each element is normalized to [0, 1]; the information features are normalized to [0, 1] by taking "max-min" normalization, and the normalized gas feature information is stored in the single-chip microcomputer. The specific normalization method is as follows: ; Step 3.3: dividing the sample information processed in step 3.2 into a training set X_train and a validation set X_valid according to a ratio of 8:2; Step 3.4: training the convolutional neural network model using the training set X_train obtained in step 3.3, and after the training is completed, classifying the validation set X_valid using the obtained model; Step 3.5: on the basis of the convolutional neural network model in step 3.4, optimizing the model using the distribution feature information of the response signal; Step 3.5.1: selecting mean, dispersion coefficient and skewness coefficient to reflect the concentration tendency, dispersion degree and distribution shape of the response signal S to describe the distribution feature of the response signal; Step 3.5.2: Selecting the response signal , calculating the mean value , the coefficient of dispersion and the coefficient of skewness : ; ; ; wherein, is a response signal of the kth dimension feature information, is a response signal of the dimension, indicates taking the central moment of order 3 to calculate the skewness coefficient ; Step 3.5.3: Calculate the response signal according to the following formula the distribution characteristic deviation function: ; wherein is a response signal is a distribution characteristic bias function for the first , , are respectively a mean, a dispersion coefficient and a skewness coefficient of a response signal , , , are respectively a mean, a dispersion coefficient and a skewness coefficient of the first population of gases Step 3.5.4: optimizing the convolutional neural network model using the distribution feature bias function, and the formula is as follows: ; wherein is a correction factor and ; Step 3.6: training the optimized convolutional neural network model using the training set X_train, and after the model training is completed, classifying the validation set X_valid using the obtained model, and recording the classification result as Result_2; obtaining the sample gas detection result.

2. The method of claim 1, wherein, The step 1 specifically comprises: Step 1.1: The sample gas is obtained by using the first sampling unit, and the sampling rate of the sampling unit is controlled by the single-chip microcomputer program output PWM signal to realize dynamic sampling of the gas; Step 1.2: The single-chip microcomputer program outputs a PWM signal with a duty cycle to realize fast sampling of the sample gas; after the gas uniformly fills the entire system, the sampling is completed, and the single-chip microcomputer adjusts the PWM signal duty cycle, at which time the airflow in the system is stable; Step 1.3: The parallel mesh transmission between the driving gear on the shaft of the second gas sampling unit variable frequency motor and the driven gear installed on the rotating rod drives the driven gear to rotate, thereby driving the rotating rod installed with two fan blades to rotate, realizing uniform mixing of the sample gas in the device; Step 1.4: After the gas sensor completes the gas characteristic collection work in step 2, the single-chip microcomputer outputs a PWM signal with a duty cycle again to realize fast discharge of the gas in the system.

3. The method of claim 1, wherein the method is characterized by: The step 2 is specifically: Step 2.1: The gas sensor is heated by using dynamic temperature modulation heating method until its working temperature is reached; Step 2.2: During the collection of gas characteristic information, the resistance value of the gas sensor is taken as the response signal, the response signal of the gas sensor in a heating period is collected, and it is stored in the single-chip microcomputer.

4. The method of claim 1, wherein the method is characterized by: The step 3.4 is specifically: Step 3.4.1: The m-dimensional response signal stored in the single-chip microcomputer is divided into multiple signal segments of the same size by using sliding window operation; Step 3.4.2: specify sliding window step size as x, edge padding as q, convolution kernel size as y z; according to the size relationship between the input of the convolution layer and the output of the convolution layer, calculate the input size of the next convolution layer: ; ; wherein, and denote the width and height of the convolution input, respectively, and denote the width and height of the convolution output, respectively, and denote the width and height of the convolution kernel, respectively, denotes the stride of the sliding window, and P denotes the padding size. Step 3.4.3: A convolutional neural network model is established, and the training of the convolutional neural network model is completed, and the specific network architecture is as follows: Input layer→Convolutional layer→ReLU activation function→Pooling layer→Convolutional layer→ReLU activation function→Pooling layer→Fully connected layer→Softmax activation function→Output layer; Step 3.4.4: Classify the validation set X_valid using the trained model to obtain the probability value of the to-be-classified gas belonging to the i-th category , select the category corresponding to the maximum probability as the predicted category of the to-be-classified gas, denoted as: ​​ ; ; wherein, is the probability that the gas to be classified is of the nth class of gases.

5. A gas sensor detection system based on distribution feature optimization, used to implement the gas sensor detection method based on distribution feature optimization in claim 1, characterized in that, The gas sensor detection system based on distribution feature optimization specifically comprises a device shell; an air inlet channel is formed in the outer portion of the device shell; a first sampling unit is installed in the inner portion of the air inlet channel, and the first sampling unit is composed of a first variable frequency motor connected with fan blades; an air outlet channel is formed in the outer portion of the device shell; a second sampling unit is installed in the inner portion of the air outlet channel, and the second sampling unit is composed of a second variable frequency motor connected with fan blades; a driving gear is installed on the shaft of the second variable frequency motor of the second sampling unit; a square plate is further installed in the inner portion of the device shell; the square plate is connected with the air inlet channel; two rotating rods are arranged in the inner portion of the device shell; the rotating rods are installed with two driven gears which are in parallel mesh transmission with the driving gear installed on the shaft of the second variable frequency motor, and the rotating rods are further installed with two fan blades; a gas sensor and a main circuit board are installed in the inner portion of the device shell, a single-chip microcomputer is connected with the sensor and the variable frequency motor, and the main circuit board is composed of the single-chip microcomputer and its peripheral circuit; a total power switch is arranged on the outer portion of the device shell and connected with the single-chip microcomputer.

Citation Information

Patent Citations

  • Mixed gas recognition method based on improved one-dimensional convolutional neural network

    CN114252560A

  • Device for detecting indoor air harmful gas in public place

    CN212845261U