Method for identifying multiple gases by using single sensitive material based on machine learning
Through machine learning technology, feature extraction and analysis of sensor response curves and multiple machine learning algorithms, the cross-sensitivity problem of semiconductor sensors in ozone and nitrogen oxide detection is solved, and the precise distinction between ozone and nitrogen oxide is achieved, improving the improvement of Detection accuracy and application prospects.
Patent Information
- Application Number
- CN202411376618.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-10
AI Technical Summary
Existing semiconductor chemical resistance gas sensors have cross-sensitivity in ozone and nitrogen oxide detection, which is difficult to accurately distinguish, resulting in false alarms and reduced reliability, affecting ozone pollution control.
Using a machine learning-based method, the characteristic parameters extraction and principal component analysis of the sensor response curve and recovery curve are extracted and principal component analysis are combined with multiple machine learning algorithms to draw decision boundaries to achieve accurate distinction between ozone and nitrogen oxides.
It improves the accuracy of gas detection and the application prospects of sensors in complex environments, reduces detection costs and complexity, and provides an efficient and reliable ozone pollution control solution.
Smart Images

Figure CN119293554A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of gas sensors, and in particular relates to a method for identifying multiple gases using a single sensitive material based on machine learning. Background Art
[0002] Ozone (O3), as an oxidizing gas, is one of the important components of air pollution. In particular, ground-level ozone pollution has far-reaching negative effects on human health, plant and animal growth, and the environment. Ozone is mainly produced through the photochemical reaction of nitrogen oxides (NOx) and volatile organic compounds (VOCs) under sunlight. Therefore, the control of ozone pollution is not limited to monitoring ozone itself, but also requires effective monitoring and differentiation of precursor substances. Especially in urban areas, motor vehicle exhaust and industrial emissions are the main sources of NOx and VOCs. They jointly participate in photochemical reactions in the atmosphere, leading to increased ozone concentrations.
[0003] In recent years, chemical resistance gas sensors based on semiconductor materials have attracted much attention due to their advantages such as low cost, simple structure, convenient preparation and rapid response, and have played a significant role in production safety, environmental protection and human health. At the same time, they have great potential in the field of gas detection related to ozone treatment. The working principle of this type of sensor is: when the semiconductor material comes into contact with the target gas, its surface charge changes, resulting in a change in resistance value. By monitoring the change in resistance value, the target gas can be effectively detected. However, in the application scenario of ozone treatment gas detection, ozone and NOx are both strong oxidizing gases. Due to the similar oxidizing properties of the two, a single semiconductor chemical resistance gas sensor element often has cross-sensitivity to the two gases, making it difficult to accurately distinguish them. This cross-sensitivity can cause false alarms in the sensor, reduce the reliability of the sensor in practical applications, and thus affect the effective control of ozone pollution.
[0004] In recent years, the rapid development of machine learning technology has provided a new direction for solving this problem. Through in-depth analysis of the response curve of the sensor element, characteristic parameters related to different gases can be extracted. Although a single gas sensor element has cross-sensitivity when facing multiple gases, with the help of machine learning algorithms, valuable characteristic values can be extracted from the sensor response recovery curve, and the differences in response behaviors of different gases can be analyzed, thereby achieving accurate distinction between ozone and NOx. This method not only improves the accuracy of gas sensing detection, but also greatly expands the application scenarios of a single sensor in complex environments. Summary of the invention
[0005] In response to the problem of cross-sensitivity of a single sensor to multiple gases in the prior art, the present invention provides a method for identifying multiple gases using a single sensitive material based on machine learning. This method can distinguish between multiple gases such as ozone and nitrogen oxides by combining the response curve characteristics of the sensor and a machine learning algorithm, thereby providing an efficient and reliable solution for the precise control of ozone pollution.
[0006] The present invention is achieved through the following technical solutions:
[0007] A method for identifying multiple gases using a single sensitive material based on machine learning includes the following steps:
[0008] S1. Determine a sensitive material that responds to the target gas, and make the selected sensitive material into a semiconductor gas sensor element;
[0009] S2. Testing the instantaneous resistance of the semiconductor gas sensor element under different gases and different concentrations to obtain the response curve and recovery curve of the semiconductor gas sensor element;
[0010] S3, performing unified mode processing on the response curve and the recovery curve, and then extracting characteristic parameters of all the response curves and the recovery curves respectively;
[0011] S4, using principal component analysis (PCA) to reduce the dimension of the characteristic parameters extracted in step S3, and generate a corresponding spectrum;
[0012] S5. Use multiple machine learning algorithms to draw decision boundaries for the graph in step S4 respectively; use k-fold and accuracy to comprehensively evaluate the decision boundaries obtained by different machine learning algorithms and select the optimal solution.
[0013] Further, in step S1, by the formula f(t)=R C / R0 determines the sensitive material, where f(t) is the response value, R C is the resistance value of the material after contact with the gas, R0 is the initial resistance value of the material in the air, and the contact between the sensitive material and the target gas will cause the resistivity of the material to change.
[0014] Further, in step S2, the response curve is a curve of the response value f(t) changing with time, wherein the start time is the time when the sensitive material begins to contact with the target gas, and the end time is the time when the response value reaches the highest / lowest point;
[0015] The recovery curve is a curve showing the response value f(t) changing with time, where the initial time is the time when the sensitive material comes into contact with the target gas and returns to the air environment, and the end time is the time when f(t) returns to the initial resistance R0 and tends to be stable.
[0016] Furthermore, in step S3, the unified mode processing includes processing by fitting and Fourier transform.
[0017] Furthermore, in step S4, the principal component analysis method determines the number of principal components based on the principle that the cumulative variance contribution rate is greater than 90%.
[0018] Furthermore, step S5 specifically includes the following steps:
[0019] S51. Build multiple machine learning models in parallel;
[0020] S52, determining the hyperparameters of the boundary decision machine learning algorithm based on the data distribution after dimensionality reduction in step S4, and selecting the best parameters for each algorithm model through comprehensive evaluation of k-fold and accuracy;
[0021] S53, compare the various machine learning models under the best parameters horizontally, and select the best machine learning model through comprehensive evaluation of k-fold and accuracy;
[0022] S54. Draw the decision boundary obtained by the optimal machine learning model determined in step S53 into the spectrum obtained in step S4, and use the spectrum as the basis for gas classification.
[0023] Furthermore, in step S51, the multiple machine learning models include: K-Nearest Neighbors, Support Vector Machine, Naive Bayes, Linear Discriminant Analysis, Logistic Regression, Random Forest and Neural Network.
[0024] Compared with the prior art, the advantages of the present invention are as follows:
[0025] The present invention provides a method for identifying multiple gases using a single sensitive material based on machine learning. Compared with traditional gas detection methods such as spectroscopy and sensor arrays, it greatly reduces the cost and complexity of gas detection, effectively distinguishes ozone and NOx gases, and has high application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for the specific embodiments or the description of the prior art. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn according to the actual scale.
[0027] Figure 1 A schematic flow chart of a method for identifying multiple gases using a single sensitive material based on machine learning according to the present invention;
[0028] Figure 2 The selectivity of the sensor to different gases and the response to different concentrations of NO2 and O3 at 62.5°C;
[0029] Among them, a is the selectivity test result, b and c are the response recovery curves of NO2 and O3 at different concentrations respectively;
[0030] Figure 3 A method for extracting characteristic parameters from response recovery curves;
[0031] Figure 4 It is the distribution diagram of the characteristic parameters in two-dimensional space after the dimension is reduced by principal component analysis;
[0032] Figure 5 The classification results of different machine learning algorithms under the optimal parameters;
[0033] Among them, a is the original graph after dimensionality reduction in step S4, and the rest are decision boundary graphs under different machine learning algorithms;
[0034] Figure 6 Decision boundaries for different machine learning algorithms, with score plots evaluated using both accuracy and k-fold methods. DETAILED DESCRIPTION
[0035] In order to clearly and completely describe the technical solution and its specific working process of the present invention, the specific implementation methods of the present invention are as follows in conjunction with the accompanying drawings of the specification:
[0036] Example 1
[0037] Semiconductor gas sensors based on In2O3 usually have a high sensitivity to NO2 gas, but also have a good response to O3. In this embodiment, a single gas sensor based on In2O3 is used, and NO2 and O3 are used as target gases to distinguish between the two and their mixed gases.
[0038] like Figure 1 The figure shows a flow chart of a method for identifying multiple gases using a single sensitive material based on machine learning in this embodiment, wherein the method specifically comprises the following steps:
[0039] S1, using a doping ratio of 0.5% reduced graphene oxide and In2O3 (0.5%-rGO-In2O3) material has a high response to both target gases, but is insensitive to other common pollutant gases. The selectivity verification results are as follows Figure 2 As shown, from Figure 2 It can be seen from a that the sensor has a good response to NO2 gas and O3 gas. Figure 2 b and Figure 2 c are the response recovery curves of NO2 and O3 at different concentrations. It can be seen that the higher the concentration, the greater the response. Therefore, this material is selected as the sensitive material to prepare the sensor.
[0040] Determine the sensitive material 0.5%-rGO-In2O3 that responds to the target gas, and make the selected sensitive material into a semiconductor gas sensing element;
[0041] S2. Testing the instantaneous resistance of the semiconductor gas sensor element under different gases and different concentrations to obtain a response recovery curve of the semiconductor gas sensor element;
[0042] In this embodiment, the optimal working temperature of NO2 is selected as 62.5°C and used as the test temperature. The response recovery curve of the semiconductor gas sensor element prepared in step S1 to NO2, O3 and a mixture of the two gases at different concentrations is tested. The test concentration range is between 100 ppb and 150 ppm, and 20-40 sets of data are tested for each gas.
[0043] S3, performing unified mode processing on the response recovery curves, and then extracting characteristic parameters of all the response recovery curves respectively;
[0044] The response and recovery curves tested were fitted in exponential form, and the fitting parameters were used as the characteristic parameters of the test data. The specific fitting formula is as follows:
[0045] y=A*exp(x / t)+k
[0046] like Figure 3 As shown; the characteristic parameters include the initial value A of the exponential part, the time constant t, the offset term k and the goodness of fit R 2 , the above parameter response curve and recovery curve each take a group of 8 values as the characteristic parameters of the test curve;
[0047] S4, using principal component analysis (PCA) to reduce the dimension of the characteristic parameters extracted in step S3, and generate a corresponding spectrum;
[0048] The principal component analysis (PCA) method is used to reduce the dimension of the feature parameters; in this embodiment, the 8-dimensional data obtained in step S3 is normalized, that is, linearly mapped to the interval (0,1). Then, the covariance matrix of the data set is subjected to eigenvalue decomposition, and the two largest eigenvalues account for 68.3% and 21.7% of the total eigenvalues respectively; the cumulative variance contribution rate of the first two principal components reaches 90%, which indicates that the two-dimensional data of these two principal components retain most of the characteristics of the original data; therefore, the original 8-dimensional features are reduced to 2 dimensions, and the spectrum after dimensionality reduction is drawn, as shown in FIG. Figure 4 As shown;
[0049] S5. Use multiple machine learning algorithms to draw decision boundaries for the graphs in step S4 respectively; use k-fold and accuracy to comprehensively evaluate the decision boundaries obtained by different machine learning algorithms and select the best solution;
[0050] The specific steps are as follows:
[0051] S51. Build multiple machine learning models in parallel, including K-Nearest Neighbors, Support Vector Machine, Naive Bayes, Linear Discriminant Analysis, Logistic Regression, Random Forest, and Neural Network.
[0052] S52. Find the best parameters for each algorithm. The specific evaluation method is to comprehensively compare the accuracy, k-fold (k=7) and the characteristics of the algorithm itself to obtain the best results for each algorithm. Figure 5 As shown, specifically:
[0053] ①K-Nearest Neighbor (KNN):
[0054] The main principle of KNN is that for a given training data set, for a new input instance, the KNN algorithm calculates its distance to each instance in the training set, finds the K nearest neighbors, and then predicts the category or value of the new instance based on the category (for classification tasks) or value (for regression tasks) of these neighbors. Since too large or too small a k value will lead to poor generalization or overfitting, k=6 is selected as the best parameter of the algorithm after comprehensive evaluation. The accuracy is 92.86% and the k-fold is 83.3%;
[0055] ②Support Vector Machine (SVM):
[0056] The core idea of SVM is to find an optimal hyperplane in the feature space for classification and maximize the interval. By using the kernel function, SVM can handle nonlinear problems and map the data to a higher-dimensional feature space so that it can be linearly separable in the space. After comprehensive comparison, this example uses the linear kernel function without regularization to obtain the best classification effect, with an accuracy of 96.43% and a k-fold of 75%;
[0057] ③Linear Discriminant Analysis (LDA):
[0058] The principle of LDA is that given a training sample set, LDA projects the samples onto a straight line so that the projection points of similar samples are as close as possible and the projection points of heterogeneous samples are as far apart as possible. When classifying new samples, they are also projected onto this straight line, and then the category of the new samples is determined based on the position of the projection points. This example uses least squares regularization, shrinkage = 0.1 to achieve the best classification effect of the algorithm, with an accuracy of 88.09% and a k-fold of 75%;
[0059] ④Logistic Regression (LR):
[0060] Logistic regression uses a logistic function to map data to a probability value between 0 and 1, thereby determining the likelihood that a sample is a positive example. In this example, the quasi-Newton method and L2 regularization are the best parameters under this algorithm, with an accuracy of 95.24% and a k-fold of 91.67%;
[0061] ⑤Naive Bayes (NB):
[0062] The core principle of Naive Bayes is to use Bayes' theorem to calculate the posterior probability of each category under a given data sample, and select the category with the highest posterior probability as the prediction result. The Gaussian distribution used in this example is the best solution for this model, with an accuracy of 82.14% and a k-fold of 83.33%;
[0063] ⑥ Random Forest (RF):
[0064] Random forest is an ensemble learning model composed of many independent decision trees. Each decision tree is trained by randomly selecting features and samples, and then their predictions are aggregated to form the final prediction. In this example, Gini impurity is used as the metric, 100 trees, no limit on the maximum depth is the optimal solution for this algorithm, with an accuracy of 100% and a k-fold of 75%.
[0065] ⑦Find out the Artificial Neural Network (ANN):
[0066] A neural network is a computational model composed of neurons that mimics the structure and function of the human brain. It extracts patterns and features from input data through learning and training, and is used for tasks such as classification, regression, and clustering. In this example, a neural network with two hidden layers and 16 neurons in each layer is used. The relu activation function is the optimal solution for the algorithm, with an accuracy of 91.67% and a k-fold of 75%.
[0067] S53: Using the accuracy and k-fold (k=7) methods as well as the characteristics of the algorithm itself, we further comprehensively evaluate the classification results of each machine learning algorithm under the optimal parameters. It is found that the two-dimensional map of the decision boundary made by the logistic regression algorithm has the best performance and can be used as a basis for identifying NO2, O3 and their mixed gases. The evaluation scores of each algorithm are as follows: Figure 6 shown.
[0068] Depend on Figure 6 It can be seen that the accuracy and k-fold of the logistic regression algorithm (LR) are both above 90%, which is determined to be the best solution in this embodiment; then the type of gas is determined based on the specific position of the gas in the spectrum.
[0069] The preferred embodiments of the present invention are described in detail above in conjunction with the accompanying drawings. However, the present invention is not limited to the specific details in the above embodiments. Within the technical concept of the present invention, a variety of simple modifications can be made to the technical solution of the present invention, and these simple modifications all belong to the protection scope of the present invention.
[0070] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present invention will not further describe various possible combinations.
[0071] In addition, various embodiments of the present invention may be arbitrarily combined, and as long as they do not violate the concept of the present invention, they should also be regarded as the contents disclosed by the present invention.
Claims
1. A method for identifying multiple gases using a single sensitive material based on machine learning, characterized in that: The specific steps include: S1. Determine a sensitive material that responds to the target gas, and make the selected sensitive material into a semiconductor gas sensor element; S2. Testing the instantaneous resistance of the semiconductor gas sensor element under different gases and different concentrations to obtain the response curve and recovery curve of the semiconductor gas sensor element; S3, performing unified mode processing on the response curve and the recovery curve, and then extracting characteristic parameters of all the response curves and the recovery curves respectively; S4, using principal component analysis (PCA) to reduce the dimension of the characteristic parameters extracted in step S3, and generate a corresponding spectrum; S5. Use multiple machine learning algorithms to draw decision boundaries for the graph in step S4 respectively; use k-fold and accuracy to comprehensively evaluate the decision boundaries obtained by different machine learning algorithms and select the optimal solution.
2. A method for identifying multiple gases using a single sensitive material based on machine learning as claimed in claim 1, characterized in that: In step S1, the formula f(t)=R C / R0 determines the sensitive material, where f(t) is the response value, R C is the resistance value of the material after contact with the gas, R0 is the initial resistance value of the material in the air, and the contact between the sensitive material and the target gas will cause the resistivity of the material to change.
3. A method for identifying multiple gases using a single sensitive material based on machine learning as claimed in claim 1, characterized in that: In step S2, the response curve is a curve of the response value f(t) changing with time, wherein the start time is the time when the sensitive material begins to contact with the target gas, and the end time is the time when the response value reaches the highest / lowest point; The recovery curve is a curve showing the response value f(t) changing with time, where the initial time is the time when the sensitive material comes into contact with the target gas and returns to the air environment, and the end time is the time when f(t) returns to the initial resistance R0 and tends to be stable.
4. The method for identifying multiple gases using a single sensitive material based on machine learning as claimed in claim 1, characterized in that: In step S3, the unified mode processing includes processing by fitting and Fourier transform.
5. The method for identifying multiple gases using a single sensitive material based on machine learning as claimed in claim 1, characterized in that: In step S4, the principal component analysis method determines the number of principal components based on the principle that the cumulative variance contribution rate is greater than 90%.
6. The method for identifying multiple gases using a single sensitive material based on machine learning as claimed in claim 1, characterized in that: Step S5 specifically includes the following steps: S51. Build multiple machine learning models in parallel; S52, determining the hyperparameters of the boundary decision machine learning algorithm based on the data distribution after dimensionality reduction in step S4, and selecting the best parameters for each algorithm model through comprehensive evaluation of k-fold and accuracy; S53, compare the various machine learning models under the best parameters horizontally, and select the best machine learning model through comprehensive evaluation of k-fold and accuracy; S54. Draw the decision boundary obtained by the optimal machine learning model determined in step S53 into the spectrum obtained in step S4, and use the spectrum as the basis for gas classification.
7. A method for identifying multiple gases using a single sensitive material based on machine learning as claimed in claim 6, characterized in that: In step S51, the multiple machine learning models include: k-nearest neighbor, support vector machine, naive Bayes, linear discriminant analysis, logistic regression, random forest and neural network.