A gas identification device and method based on switch thermal cycle modulation

By employing a gas identification method based on switching thermal cycling modulation, combined with hardware circuitry and data processing technology, the problems of poor selectivity and long response time of traditional gas sensors are solved, achieving multi-dimensional and high-precision gas detection, which is applicable to fields such as environmental monitoring, industrial safety, and medical diagnosis.

CN120761580BActive Publication Date: 2025-12-30HUNAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510874018.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-12-30
Estimated Expiration
2045-06-27

AI Technical Summary

Technical Problem

Traditional gas sensors suffer from poor selectivity, complex systems, high costs, and long response times, making it difficult to achieve rapid detection on resource-constrained equipment.

Method used

A gas identification method based on switching thermal cycling modulation is adopted. By simplifying the hardware circuit design and thermal cycling modulation technology, and combining a gas sensor array, a switching thermal cycling modulation module and a gas identification module, data processing is performed using 1DCNN and transformer networks to achieve multi-dimensional and high-precision gas detection.

Benefits of technology

It significantly reduces system complexity and cost, improves the flexibility and accuracy of gas detection, meets the gas detection needs in different scenarios, and the gas component classification model has high classification accuracy, while the gas concentration regression prediction model has high precision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120761580B_ABST
    Figure CN120761580B_ABST
Patent Text Reader

Abstract

The application discloses a gas recognition device and method based on on-off thermal cycle modulation, which is composed of an on-off thermal cycle signal generation module, a working mode switching module and a gas detection sensor module, supports constant temperature and on-off thermal cycle modulation two working mode switching, and is suitable for different detection requirements. The recognition method mainly includes mixed gas component recognition and concentration recognition, both of which utilize 1D convolutional neural network and Transformer model to extract multi-dimensional features, and cross-validation is used to optimize the model performance; the recognition algorithm can realize component classification and concentration regression prediction of multi-component mixed gas, the device is modularly designed, the sensor array can be flexibly replaced according to requirements, and is suitable for application fields such as environmental monitoring, industrial safety and intelligent sensing. The application effectively improves the gas detection accuracy by introducing the fusion of on-off thermal cycle modulation and deep learning algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of gas detection technology, specifically a gas identification device and gas identification method based on switch thermal cycle modulation. Background Technology

[0002] Gas sensors, as effective monitoring tools, play a vital role in environmental monitoring, industrial safety, and medical diagnostics. Traditional metal oxide semiconductor (MOS) gas sensors are widely used due to their low cost and high sensitivity, but they suffer from poor selectivity, cross-sensitivity, and susceptibility to interference from other gases. They are also less than ideal for identifying mixed gases and struggle to identify the type and concentration of target gases in complex gas environments.

[0003] To improve the selectivity of gas sensors, pattern recognition technology is combined with sensor arrays to address the poor selectivity of individual sensors. Sensor arrays typically consist of multiple gas sensors with different sensitivity characteristics. Increasing the array size can increase the characteristic parameters of the gas response, allowing for the acquisition of more gas response information and thus improving selectivity. However, this approach introduces problems such as large system size, high power consumption, and high cost, making it difficult to widely apply in resource-constrained devices.

[0004] Another improvement method is to employ temperature modulation technology, which obtains more response information by changing the sensor's operating temperature. Traditional temperature modulation techniques typically rely on microcontrollers or complex software algorithms to enhance the sensor's response characteristics to specific gases by periodically changing the sensor's operating temperature. However, the response signals obtained by this method are usually limited to the quasi-steady-state response values ​​of the sensor at different temperatures, making it difficult to comprehensively reflect the dynamic interaction process between the gas and the sensor, and increasing the complexity and cost of the system. Furthermore, the low frequency of traditional temperature modulation techniques results in excessively long sensor response times, making it difficult to meet the needs of rapid on-site detection. Summary of the Invention

[0005] This invention proposes a gas identification device and method based on switch thermal cycling modulation. By simplifying the hardware circuit design and using thermal cycling modulation technology, it solves the problems of poor selectivity, system complexity, high cost, and long response time of traditional gas sensors, achieving multi-dimensional and high-precision detection of target gases.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0007] A gas identification method based on switch thermal cycle modulation includes the following steps:

[0008] Step 1: Set up a gas sensor array for detecting the gas to be tested, a switch thermal cycling modulation module for cyclically heating the gas sensor array, and a gas identification module. The gas identification module includes a classification model for identifying the type of gas to be tested and a regression model for identifying the gas concentration.

[0009] Step 2: Preheat the gas sensor array to a stable state;

[0010] Step 3: Switch the thermal cycling modulation module to perform thermal cycling modulation heating, and ensure that the gas sensor array maintains at least one complete thermal cycling modulation cycle in the ambient gas to obtain the initial value of the sensing response;

[0011] Step 4: Introduce the gas to be tested, so that the gas sensor array is in the atmosphere of the gas to be tested, until the set detection time threshold is reached, and obtain multidimensional response characteristic data; the set detection time threshold is 10-40 thermal cycle modulation cycles.

[0012] Step 5: Input the multidimensional response feature data into the gas identification module to obtain the types of gases contained in the gas to be tested, as well as the corresponding concentrations of each type of gas.

[0013] A further improvement is made to the data processing method of the gas identification module as follows:

[0014] 1): Samples are obtained by preprocessing the multidimensional response feature data;

[0015] 2): Input the sample into the classification model to obtain the types of gases contained in the gas to be tested;

[0016] 3): The classification results of the classification model are combined with the sample input regression model to obtain the concentration of each gas in the gas to be tested.

[0017] A further improvement is made to the preprocessing method as follows:

[0018] 1.1): Benchmark correction of multidimensional response feature data is performed using the difference quotient method:

[0019] S t '=(S t -S0) / S0

[0020] Where S t S0 and S10 are the sensor response value and initial sensor response value at time t, respectively. t ' is the sensor response value at time t after baseline correction;

[0021] 1.2): Divide the sensor response value after reference calibration into L time periods according to the switching thermal cycle adjustment cycle, with each switching thermal cycle modulation cycle being a time period.

[0022] Further improvements include the following data processing method for the classification model:

[0023] 2.1): Construct a sample set. A training sample in the sample set consists of the response values ​​of n sensors over L time periods. The response values ​​of the n sensors within a time period are fed into a 1DCNN module to extract the response features of the n sensors within that time period. The input X to the 1DCNN module is a real-valued matrix, represented as... Where T represents the number of samples within a time period, and n represents the number of sensors. Represents the real number field;

[0024] 2.1.1): The response values ​​from n sensors are fed into a 1DCNN, as described by the following formula:

[0025]

[0026] in, This represents the output of the k-th convolutional kernel at position i, where K represents the kernel width. b is the convolution weight. (k) For the bias term, X i+j,c This represents the value of the input signal at time step i+j, on the c-th channel;

[0027] 2.1.2): After convolution, feature batch normalization and nonlinear mapping are performed, as described by the following formula:

[0028]

[0029] Where, μ B δ B 2 Let represent the mean and variance of the batch sample, respectively. Let represent the value of the k-th convolution kernel at position i, and ε represent a very small positive number to prevent division by zero. This represents the value of the k-th convolutional kernel at position i after normalization, where γ and β are learnable parameters. It is the batch-normalized output of the k-th convolutional kernel at position i, and ReLU(·) represents the ReLU activation function. It is the output value of the k-th convolutional kernel after activation at position i.

[0030] 2.1.3): Adaptive average pooling is used to compress the feature dimension, as described in the following formula:

[0031]

[0032] Among them, S i Indicates the pooling region, s i The number of elements in the region;

[0033] 2.2): The features extracted by the 1DCNN module are fed into the self-attention module for feature enhancement;

[0034] 2.2.1): Output feature F pool Let F be the query vector, and we can obtain the query vector Q = FW through a linear transformation. Q Key vector K = FW K Value vector V = FW V W Q W K W V The weight matrix is ​​trainable.

[0035] 2.2.2): Calculate the attention matrix A and output the enhanced features F. α The formula is described as follows:

[0036]

[0037] F α =AV

[0038] softmax() represents the normalization function, T represents the matrix transpose, and d k The dimension is represented as the key vector;

[0039] 2.2.3): Adaptive average pooling is used to compress and extract feature dimensions, and features from different time periods are stacked. The formula is described as follows:

[0040]

[0041] Where L represents the number of time periods for a single sample, d represents the feature dimension of a single time period, and F α (i) Represents the output feature at the i-th time interval enhanced by the attention mechanism; Represents the feature across all time intervals within a single sample.

[0042] 2.2.4) Features F of all time periods all The data is fed into a transformer network to extract the correlation features of the sensor response across different time periods;

[0043] 2.2.5): The associated features output by the transformer are flattened and fed into a fully connected layer for classification training. The cross-entropy loss function is used to calculate the difference between the model's predictions and the true labels. The network parameters are optimized through backpropagation, and the final classification model is retained. The formula is described as follows:

[0044]

[0045] Where z j Let z represent the predicted value of the j-th class of the sample.y These are the label values ​​for the actual gas components, where C represents the total number of categories;

[0046] 2.2.6): Load the final classification model, send the preprocessed sensor response data into the final classification model to output the component identification results of the gas to be tested, and obtain the types of gases contained in the gas to be tested.

[0047] Further improvements are made to the data processing flow of the regression model as follows:

[0048] 3.1) Construct a sample set. A training sample in the sample set consists of the response values ​​of n sensors over L time periods. The response values ​​of the n sensors within a time period are fed into n 1DCNN modules to extract the response features of the n sensors within the time period. The input to the 1DCNN module is represented as matrix X. i ∈R 1×T Where T represents the number of samples in each time period, and i represents the i-th sensor:

[0049] The response values ​​from n sensors are fed into n 1DCNN modules, and the sensor responses are convolved three times, with the kernel size decreasing sequentially. After convolution, the features are batch normalized and nonlinearly mapped. The formula is described as follows:

[0050]

[0051] Where k represents the number of convolutional layers, W i (k) and b i (k) where are the weights and biases of the k-th convolutional kernel, respectively; BN(·) is batch normalization; σ() is the non-linear activation function; F i (k) This represents the output of a k-layer convolution;

[0052] 3.2): Adaptive max pooling is used to compress and extract feature dimensions.

[0053] The output F of the 1DCNN convolutional module of the i-th sensor (k) Let F be the sum of features from the same sensor over different time periods. The formula is described below:

[0054]

[0055] in, This represents the real-domain feature vector of the i-th sensor during the j-th time period. This represents the real-domain feature vector of the i-th sensor over all time periods;

[0056] 3.3): Introduce trainable scalar weight coefficients for each sensor channel, with an initial value of α = 1 / n, where n is the number of sensors. The formula is described as follows:

[0057]

[0058] in, S is the weighted response value of the i-th sensor. i Let α be the response value of the i-th sensor. i For S i Weighting coefficients;

[0059] 3.4): Input the features of n sensors across all time periods into n transformers to extract the correlation features of the sensor responses across different time periods;

[0060] 3.5): The features H output by n transformers i ∈R L×d After flattening and splicing, the model is fed into a fully connected layer for regression training. The mean squared error loss function is used to calculate the difference between the model's prediction results and the actual sticky notes. The mean squared error loss function yields the final regression model. The network parameters are optimized through backpropagation, and the final regression model is retained. The formula is described as follows.

[0061] h i =Flatten(H i )

[0062] h = Concat(h1, h2, ..., h n )

[0063]

[0064] Where Flatten() means flatten, H i h represents the output of the i-th transformer model. i This represents the output of the i-th transformer model after flattening. `Concat()` concatenates the outputs along a dimension. `h` concatenates all transformer model outputs. `f()` represents a fully connected layer. This represents the regression prediction value from the regression model. and y j Let represent the regression predicted value and the true label value of the j-th sample, respectively, and m represent the number of samples in the batch;

[0065] 3.6): Load the final regression model and send the preprocessed sensor response data into the model to output the gas component identification results.

[0066] In a further improvement, the sample set is divided into a training set, a validation set, and a test set; the ratio of the training set, validation set, and test set is 6:2:2; and five-fold cross-validation is used in the training process.

[0067] A gas identification device based on switch thermal cycle modulation, characterized in that the gas identification device is used to implement the above-mentioned gas identification method based on switch thermal cycle modulation; the gas identification device includes a switch thermal cycle signal generation module, a working mode switching module, and a gas detection sensing module;

[0068] The gas detection sensing module includes a detachable and replaceable metal oxide semiconductor gas sensor array and a signal acquisition system. The gas detection sensing module is used to detect the target gas, output a corresponding electrical signal response, and detect the types of gases contained in the gas to be tested and the content of each type of gas.

[0069] The switching thermal cycle signal generation module is used to modulate the temperature of the metal oxide semiconductor gas sensor array and the gas to be measured.

[0070] The working mode switching module is used to turn the switching thermal cycle signal generation module off or on, so that it can work in constant temperature working mode or switching thermal cycle working mode.

[0071] In a further improvement, the working mode switching module is a double-pole double-throw slide switch K1, which includes six electrical connection points: the normally closed terminal 1 of the first pole, the common terminal 2 of the first pole, and the normally open terminal 3 of the first pole, as well as the normally closed terminal 4 of the second pole, the common terminal 5 of the second pole, and the normally open terminal 6 of the second pole.

[0072] The gas sensor array includes sensor 1, sensor 2, sensor 3, and sensor 4;

[0073] When the double-pole double-throw slide switch K1 is in the first position, the normally closed terminal 1 of the first pole is connected to the common terminal 2 of the first pole, and the normally closed terminal 4 of the second pole is connected to the common terminal 5 of the second pole; when the double-pole double-throw slide switch K1 is slid to the second position, the common terminal 2 of the first pole is connected to the normally open terminal 3 of the first pole, and the common terminal 5 of the second pole is connected to the normally open terminal 6 of the second pole; the switch thermal cycle signal generation module includes a power supply line VCC and a ground line GND. The power supply line VCC is electrically connected to one end of the first adjustable resistor VR1, the RESET pin of the timer, the VCC pin of the timer, the normally closed terminal 1 of the first pole of the double-pole double-throw slide switch K1, and the first heating resistor R of the sensor. H1 One end, the first sensing resistor R S1 One end, the second heating resistor R of sensor two H2 One end, the second sensing resistor R S2 One end, the third heating resistor R of sensor three H3 One end, the third sensing resistor RS3 One end, the fourth heating resistor R of sensor four H4 One end and the fourth sensing resistor R S4 One end of the first adjustable resistor VR1 is electrically connected to one end of the second adjustable resistor VR2 and the DIS pin of the timer; the other end of the second adjustable resistor VR2 is electrically connected to one end of the first capacitor C1, the TRIG pin of the timer, the THR pin of the timer and the normally closed terminal 4 of the second blade of the slide switch K1; the OUT pin of the timer is electrically connected to the common terminal 2 of the first blade.

[0074] The grounding wire GND is electrically connected to the other end of the timing capacitor C1, the GND pin of the timer, one end of the bypass capacitor C0, the second common terminal 5, the source of the first MOSFET Q1, one end of the load resistor R1 of sensor one, one end of the load resistor R2 of sensor two, one end of the load resistor R3 of sensor three, and one end of the load resistor R4 of sensor four; the other end of the load resistor R1 of sensor one is electrically connected to the sensing resistor R of sensor one. S1 The other end; the other end of the load resistor R2 of sensor two is electrically connected to the sensing resistor R of sensor two. S2 The other end; the other end of the load resistor R3 of sensor three is electrically connected to the sensing resistor R of sensor three. S3 The other end; the other end of the load resistor R4 of sensor four is electrically connected to the sensing resistor R of sensor four. S4 The other end; the other end of the bypass capacitor C0 is electrically connected to the CTRL pin of the timer; the first common terminal 2 of the slide switch K1 is electrically connected to the gate of the first MOSFET Q1, and the drain of the first MOSFET Q1 is electrically connected to the sensor-heating resistor R. H1 The other end, sensor two heating resistor R H2 The other end, sensor three heating resistor R H3 The other end and sensor four heating resistor R H4 The other end.

[0075] In a further improvement, the switch thermal cycle signal generation module generates a periodic pulse signal, the frequency of which is adjusted by the first adjustable resistor VR1, the second adjustable resistor VR2, and the timing capacitor C1. The periodic pulse signal is output from the timer OUT terminal. When the sliding switch K1 is in the first position, the supply voltage V... CCThe first MOSFET Q1 is kept on by the normally closed terminal 1 of the first pole of the double-pole double-throw sliding switch K1 and the common terminal 2 of the first pole of the double-pole double-throw sliding switch K1. The heating resistor circuit of the gas sensor is turned on, and the sensor operates in the normal temperature mode. At the same time, the second normally closed terminal 4 of the second pole of the double-pole double-throw sliding switch K1 and the common terminal 5 of the second pole of the double-pole double-throw sliding switch K1 are turned on, and the timing capacitor C1 is discharged. When the double-pole double-throw sliding switch K1 is in the first position, the timer OUT terminal outputs the circuit from the normally open terminal 3 of the first pole of the double-pole double-throw sliding switch K1 to the common terminal 2 of the first pole of the double-pole double-throw sliding switch K1, causing the first MOSFET Q1 to be turned on periodically. The heating resistor circuit of the gas sensor is turned on periodically, and the sensor operates in the switch thermal cycle modulation mode.

[0076] In a further improvement, the signal acquisition system consists of a data acquisition card, a computer, and LabVIEW software. The data acquisition card connects the metal oxide semiconductor gas sensor array to the computer, and the LabVIEW software acquires the analog signals of the metal oxide semiconductor gas sensor array in real time.

[0077] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0078] This invention achieves temperature modulation through timer integrated circuits and MOSFETs, eliminating the need for microcontrollers or software control, significantly reducing system complexity and cost. Through thermal cycling modulation technology, it can acquire multi-dimensional response characteristics of the sensor under dynamic temperature changes, significantly improving the dimensionality and accuracy of gas detection. The detachable sensor array design supports sensor replacement according to application requirements, enhancing system applicability. The design of a dual-working mode of "switching thermal cycling modulation - isothermal" effectively improves the flexibility of gas identification, meeting the gas detection needs of different scenarios. The gas component classification model and gas concentration regression prediction model proposed in this invention are designed based on two time scales: within the thermal cycling cycle and during the cycle period. The gas component classification model exhibits high classification accuracy and good generalization ability under both isothermal and switching thermal cycling modulation datasets; the gas concentration regression prediction model has high accuracy under the switching thermal cycling dataset. Attached Figure Description

[0079] Figure 1 This is a schematic diagram of the gas identification device based on switch thermal cycle modulation according to the present invention.

[0080] Figure 2 This is a schematic diagram of the process for identifying mixed gas components based on switch thermal cycle modulation in the gas identification method based on switch thermal cycle modulation of the present invention.

[0081] Figure 3This is a schematic diagram of the process for identifying the concentration of mixed gas based on switch thermal cycle modulation in the gas identification method based on switch thermal cycle modulation of the present invention. Detailed Implementation

[0082] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present invention.

[0083] like Figure 1 As shown, a gas identification device based on switch thermal cycling modulation consists of three parts: a switch thermal cycling signal generation module, a working mode switching module, and a gas detection sensing module. The switch thermal cycling modulation module is used to generate on / off signals with adjustable period and duty cycle to modulate the temperature of the gas sensor and enhance the gas identification capability of the sensor. The working mode switching module is used to switch between constant temperature working mode and switch thermal cycling working mode to adapt to different detection requirements.

[0084] The gas detection sensing module includes a detachable and replaceable metal oxide semiconductor gas sensor array and a signal acquisition system, which is used to detect the target gas, output a corresponding electrical signal response, and convert the electrical signal into a digital signal to be uploaded to a computer.

[0085] The switching thermal cycle control module consists of a timer integrated circuit, a timer peripheral circuit, and a MOSFET connection. The timer peripheral circuit includes an adjustable resistor and a capacitor. The switching thermal cycle control module is connected in series in the gas sensor heating circuit. The sensor temperature change period can be adjusted by adjusting the adjustable resistor.

[0086] The working mode switching module includes a sliding switch that can switch between constant temperature mode and switching thermal cycling modulation mode. When the working mode is switched to constant temperature mode, the capacitor is simultaneously triggered to discharge, ensuring that the initial state of the switching thermal cycling modulation is uniform and avoiding the impact of asynchronous initial states on gas identification.

[0087] The gas detection sensing module consists of a metal oxide semiconductor gas sensor array and a signal acquisition system. The metal oxide semiconductor gas sensor array is composed of multiple metal oxide semiconductor gas sensors. The gas sensing module adopts a detachable design, allowing for the replacement of different types or parameters of metal oxide semiconductor gas sensors according to application requirements. The signal acquisition system consists of a data acquisition card, a computer, and LabVIEW software. The data acquisition card connects the metal oxide semiconductor gas sensor array to the computer, and the LabVIEW software acquires the analog signals from the metal oxide semiconductor gas sensor array in real time.

[0088] The data acquisition steps of the gas identification device based on switch thermal cycle modulation are as follows:

[0089] Step 1: When the equipment is cold-started, switch the working mode to constant temperature mode and preheat the gas sensing module to a stable state.

[0090] Step 2: After preheating, switch the operating mode to thermal cycling mode and maintain at least one complete thermal cycling modulation cycle in the ambient gas to obtain a reference signal;

[0091] Step 3: After the reference signal is acquired, adjust the mass flow controller to introduce the gas to be tested into the device until the set detection time threshold is reached;

[0092] Step 4: After the detection is completed, the ambient gas is introduced into the device using a mass flow controller until the set recovery time threshold is reached. The sensor signal recovers to the stable state before the detection, the multi-dimensional response characteristic data of the gas sensing module is recorded, and the working mode is switched to constant temperature mode.

[0093] A gas identification method based on switch thermal cycle modulation includes: sensor response data preprocessing, a mixed gas component identification method based on switch thermal cycle modulation, and a mixed gas concentration identification method based on switch thermal cycle modulation.

[0094] The sensor data preprocessing includes the following steps:

[0095] Step 1: Perform baseline calibration on the sensor data using the difference quotient method:

[0096] S t '=(S t -S0) / S0

[0097] Where S t S0 and S10 represent the sensor response value and initial value at time t, respectively. t ' is the sensor response value at time t after baseline correction;

[0098] Step 2: Divide the sensor response value after benchmark calibration into multiple time periods according to the switching thermal cycle adjustment cycle;

[0099] like Figure 2 As shown, the method for identifying components in a mixed gas based on switch thermal cycle modulation includes the following steps:

[0100] Step 1: Input the response values ​​of n sensors within a time period into the 1DCNN module to extract the response features of the n sensors within the time period;

[0101] Step 1.1: Feed the response values ​​of n sensors into a 1DCNN;

[0102] Step 1.2: Feature batch normalization and non-linear mapping after convolution;

[0103] Step 1.3: Compress feature dimensions using adaptive average pooling.

[0104] Step 2: Feed the features extracted by the 1DCNN module into the self-attention module for feature enhancement;

[0105] Step 3: Use adaptive average pooling to compress and extract feature dimensions, and stack features from different time periods;

[0106] Step 4: Feed the features of all time periods into the transformer to extract the correlation features of the sensor response across different time periods;

[0107] Step 5: Flatten the features output by the transformer and feed them into the fully connected layer for classification training. Use the cross-entropy loss function to calculate the difference between the model's prediction results and the true labels. Optimize the network parameters through backpropagation and retain the final classification model.

[0108] Step 6: Load the classification model and send the preprocessed sensor response data into the model to output the gas component identification results.

[0109] like Figure 3 As shown, the mixed gas concentration identification method based on switch thermal cycle modulation includes the following steps:

[0110] Step 1: Feed the response values ​​of n sensors within a time period into n 1DCNN modules to extract the response features of the n sensors within the time period;

[0111] Step 1.1 Feed the response values ​​of the n sensors into the n 1DCNNs respectively;

[0112] Step 1.2 Perform three convolutions on the sensor response, with the kernel size decreasing sequentially. After convolution, perform batch normalization of the features and nonlinear mapping.

[0113] Step 1.3: Use adaptive max pooling to compress and extract feature dimensions.

[0114] Step 2: Stack the features from the same sensor at different time periods;

[0115] Step 3: Assign trainable weight coefficients to different sensor channels, with an initial coefficient of 1 / n, where n is the number of sensors;

[0116] Step 4: Input the features of n sensors for all time periods into n transformers respectively, and extract the correlation features of the sensor response between different time periods;

[0117] Step 5: Flatten and concatenate the features output by the n transformers, and feed them into a fully connected layer for regression training. Use the mean squared error loss function to calculate the difference between the model's prediction results and the real sticky notes. Optimize the network parameters through backpropagation and retain the final regression model.

[0118] Step 6: Load the regression model and send the preprocessed sensor response data into the model to output the gas concentration identification result.

[0119] Both the mixed gas component identification method based on switch thermal cycle modulation and the mixed gas concentration identification method based on switch thermal cycle modulation employ five-fold cross-validation during the training process, with the ratio of training set, validation set, and test set being 6:2:2.

[0120] The following is a comparison of the gas component identification method and gas concentration identification method proposed in this invention with existing 1DCNN, GA_BPNN, GAF_CNN and SVM gas detection models under the switching thermal cycle gas sensing array and isothermal sensor array dataset proposed in this invention.

[0121] The method for constructing the dataset of the switch thermal cycle gas sensor array is as follows:

[0122] Step 1: When the equipment is cold-started, switch the working mode to constant temperature mode and preheat the gas sensing module to a stable state.

[0123] Step 2: After preheating, switch the operating mode to thermal cycling mode and maintain at least one complete thermal cycling modulation cycle in the ambient gas to obtain a reference signal;

[0124] Step 3: After the reference signal is acquired, adjust the mass flow controller to introduce the target gas into the device until the set detection time threshold is reached;

[0125] Step 4: After the detection is completed, the ambient gas is introduced into the device using a mass flow controller until the set recovery time threshold is reached. The sensor signal recovers to the stable state before the detection, the multi-dimensional response characteristic data of the gas sensing module is recorded, and the working mode is switched to constant temperature mode.

[0126] Step 5: Record the composition and concentration of the introduced target gas and use them as labels. Repeat steps 1-4. Repeat the same composition and concentration of target gas 10 times until all target gas response data have been collected.

[0127] The traditional method for constructing a dataset for a constant temperature sensor array is as follows:

[0128] Step 1: When the equipment is cold-started, switch the working mode to constant temperature mode and preheat the gas sensing module to a stable state.

[0129] Step 2: After preheating, adjust the mass flow controller to introduce the target gas into the device until the set detection time threshold is reached;

[0130] Step 3: After the detection is completed, the ambient gas is introduced into the device using a mass flow controller until the set recovery time threshold is reached. The sensor signal recovers to the stable state before the detection, and the multi-dimensional response characteristic data of the gas sensing module is recorded and the working mode is changed.

[0131] Step 4: Record the composition and concentration of the target gas introduced and use it as a label. Repeat steps 1-3. Repeat the same composition and concentration of target gas 10 times until all target gas response data have been collected.

[0132] The gas concentrations used in constructing the datasets for the switchable thermal cycle gas sensor array and the isothermal sensor array are shown in the table below.

[0133] Correspondence between sample label and gas concentration

[0134]

[0135] The data comparison results are as follows:

[0136] Accuracy Comparison of Gas Component Identification Methods Using Constant Temperature Sensor Arrays

[0137]

[0138] Accuracy Comparison of Gas Component Identification Methods Using Switched Thermal Cycling Modulated Sensor Arrays

[0139]

[0140]

[0141] The accuracy comparison of gas component identification methods using isothermal sensor arrays shows that the gas component identification method proposed in this invention has the best accuracy compared to existing gas component identification methods at both 400s and 100s sample time scales, proving the effectiveness of the proposed gas component identification method. A comparison between the isothermal sensor array gas component identification method and the switch-thermal-cycle modulation sensor array gas component identification method shows that the existing gas component identification methods have higher accuracy on the switch-thermal-cycle modulation dataset than on the isothermal dataset, proving the effectiveness of the switch-thermal-cycle modulation device proposed in this invention.

[0142] II. Comparison of Gas Concentration Recognition Algorithm Accuracy

[0143] Accuracy Comparison of Traditional Isothermal Sensor Array Methane Gas Concentration Identification Methods

[0144]

[0145] Accuracy Comparison of Methane Gas Concentration Recognition Methods Using Switched Thermal Cycling Modulated Sensor Arrays

[0146]

[0147] In the scenario of methane gas concentration prediction, the gas recognition algorithm proposed in this invention is only behind the 1DCNN algorithm on the traditional isothermal dataset. However, on the switching thermal cycle dataset, the accuracy of the proposed algorithm is significantly better than other recognition algorithms on both datasets, proving the effectiveness of the gas concentration recognition algorithm proposed in this invention. At the same time, all algorithms are more accurate than the isothermal dataset on the switching thermal cycle dataset, proving the effectiveness of the switching thermal cycle modulation device proposed in this invention.

[0148] Accuracy Comparison of Traditional Isothermal Sensor Array Acetylene Gas Concentration Identification Methods

[0149]

[0150]

[0151] Accuracy Comparison of Acetylene Gas Concentration Recognition Methods Using Switched Thermal Cycling Modulated Sensor Arrays

[0152]

[0153] In the scenario of acetylene gas concentration prediction, the gas identification algorithm proposed in this invention is only inferior to the SVM algorithm on the traditional isothermal dataset. However, on the switching thermal cycle dataset, the accuracy of the proposed algorithm is significantly better than other identification algorithms on both datasets, proving the effectiveness of the gas concentration identification algorithm proposed in this invention. At the same time, all algorithms are more accurate than the isothermal dataset on the switching thermal cycle dataset, proving the effectiveness of the switching thermal cycle modulation device proposed in this invention.

[0154] Accuracy Comparison of Traditional Methods for Identifying Methane Concentration in Mixed Gases Using Temperature-Controlled Sensor Arrays

[0155]

[0156] Accuracy Comparison of Methods for Identifying Methane Concentration in Mixed Gases Using Switched Thermal Cyclic Modulated Sensor Arrays

[0157]

[0158] Accuracy Comparison of Traditional Methods for Identifying Acetylene Concentration in Mixed Gases Using Temperature-Controlled Sensor Arrays

[0159]

[0160] Accuracy Comparison of Acetylene Concentration Recognition Methods in Mixed Gases Using Switched Thermal Cyclic Modulated Sensor Arrays

[0161]

[0162] Conclusion: In the scenario of predicting acetylene and gas concentrations in mixed gases, the algorithm proposed in this invention significantly outperforms other identification algorithms in both datasets, demonstrating the effectiveness of the gas concentration identification algorithm proposed in this invention.

[0163] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A gas recognition device based on switch thermal cycle modulation, characterized by, The gas recognition device is used for realizing a gas recognition method based on on-off thermal cycle modulation; the gas recognition device comprises an on-off thermal cycle signal generation module, a working mode switching module and a gas detection sensor module; The gas detection sensor module comprises a detachable and replaceable metal oxide semiconductor gas sensor array and a signal acquisition system, and is used for detecting a target gas to output a corresponding electrical signal response and detecting gas types contained in the target gas and contents of various types of gas; The on-off thermal cycle signal generation module is used for temperature modulation of the metal oxide semiconductor gas sensor array and the target gas; The working mode switching module is used for turning off or on the on-off thermal cycle signal generation module, so that the gas detection sensor module works in a constant temperature working mode or an on-off thermal cycle working mode; The working mode switching module is a double-pole double-throw sliding switch (K1) comprising six electrical connection points, namely a normally closed end (1) of a first pole, a common end (2) of the first pole and a normally open end (3) of the first pole, and a normally closed end (4) of a second pole, a common end (5) of the second pole and a normally open end (6) of the second pole; When the double-pole double-throw sliding switch (K1) is in a first position, the normally closed end (1) of the first pole and the common end (2) of the first pole are conductive, and the normally closed end (4) of the second pole and the common end (5) of the second pole are conductive; when the double-pole double-throw sliding switch (K1) is slid to a second position, the common end (2) of the first pole and the normally open end (3) of the first pole are conductive, and the common end (5) of the second pole and the normally open end (6) of the second pole are conductive; The gas sensor array comprises sensor one, sensor two, sensor three and sensor four; The switch thermal cycle signal generating module includes a power supply line (VCC) and a ground line (GND), the power supply line (VCC) is electrically connected with one end of the first adjustable resistor (VR1), the RESET pin of the timer, the VCC pin of the timer, the first normally closed end (1) of the double-pole double-throw slide switch (K1), the first heating resistor (R H1 ) of the sensor one, the first sensing resistor (R S1 ), the second heating resistor (R H2 ) of the second sensor, the second sensing resistor (R S2 ), the third heating resistor (R H3 ) of the third sensor, the third sensing resistor (R S3 ), the fourth heating resistor (R H4 ) of the fourth sensor, and the fourth sensing resistor (R S4 ); the other end of the first adjustable resistor (VR1) is electrically connected with one end of the second adjustable resistor (VR2) and the DIS pin of the timer; the other end of the second adjustable resistor (VR2) is electrically connected with one end of the timing capacitor (C1), the TRIG pin of the timer, the THR pin of the timer, and the second normally closed end (4) of the double-pole double-throw slide switch (K1); the OUT pin of the timer is electrically connected with the first common end (2); The ground wire (GND) is electrically connected to the other end of the timing capacitor (C1), the GND pin of the timer, one end of the bypass capacitor (C0), the second knife public end (5), the source of the first MOS tube (Q1), one end of the sensor one load resistance (R1), one end of the sensor two load resistance (R2), one end of the sensor three load resistance (R3), and one end of the sensor four load resistance (R4); the other end of the sensor one load resistance (R1) is electrically connected to the other end of the first sensing resistance (R S1 ) of sensor one; the other end of the sensor two load resistance (R2) is electrically connected to the other end of the second sensing resistance (R S2 ) of sensor two; the other end of the sensor three load resistance (R3) is electrically connected to the other end of the third sensing resistance (R S3 ) of sensor three; the other end of the sensor four load resistance (R4) is electrically connected to the other end of the fourth sensing resistance (R S4 ) of sensor four; the other end of the bypass capacitor (C0) is electrically connected to the CTRL pin of the timer; the first knife public end (2) of the double knife double throw sliding switch (K1) is electrically connected to the gate of the first MOS tube (Q1), the drain of the first MOS tube (Q1) is electrically connected to the other end of the first heating resistance (R H1 ) of sensor one, the other end of the second heating resistance (R H2 ) of sensor two, the other end of the third heating resistance (R H3 ) of sensor three, and the other end of the fourth heating resistance (R H4 ) of sensor four. The switch thermal cycle signal generating module forms a periodic pulse signal, the frequency of which is adjusted by a first adjustable resistor (VR1), a second adjustable resistor (VR2) and a timing capacitor (C1), and the periodic pulse signal is output from the timer OUT terminal; when the double-pole double-throw slide switch (K1) is in the first position, the supply voltage V CC The first MOS tube (Q1) is kept conducting by input from the first pole normally closed terminal (1) of the double-pole double-throw slide switch (K1) to the first pole common terminal (2) of the double-pole double-throw slide switch (K1), the heating resistor loop of the gas sensor is conducted, and the sensor works in the normal temperature mode. At the same time, the second pole normally closed terminal (4) of the double-pole double-throw slide switch (K1) is conducted to the second pole common terminal (5) of the double-pole double-throw slide switch (K1), and the timing capacitor (C1) is discharged. When the double-pole double-throw slide switch (K1) is in the second position, the output of the timer OUT terminal is switched by the first pole normally open terminal (3) of the double-pole double-throw slide switch (K1) to the first pole common terminal (2) of the double-pole double-throw slide switch (K1), so that the first MOS tube (Q1) is periodically conducted, the heating resistor loop of the gas sensor is periodically conducted, and the sensor works in the switch thermal cycle modulation working mode. The gas recognition method based on on-off thermal cycle modulation comprises the following steps: Step one, setting a gas sensor array for detecting a target gas, an on-off thermal cycle modulation module for cyclically heating the gas sensor array and a gas recognition module, wherein the gas recognition module comprises a classification model for identifying gas types of the target gas and a regression model for identifying gas concentrations; Step two, preheating the gas sensor array to a stable state; Step three, the on-off thermal cycle modulation module performs thermal cycle modulation heating, and the gas sensor array is maintained in an ambient gas for at least one complete thermal cycle modulation period to obtain a sensor response initial value; Step four, introducing the target gas, so that the gas sensor array is in the target gas atmosphere until a set detection time threshold is reached, and multi-dimensional response feature data are obtained; the set detection time threshold is 10-40 thermal cycle modulation periods; Step five, inputting the multi-dimensional response feature data into the gas recognition module to obtain gas types contained in the target gas and corresponding concentrations of various types of gas.

2. The switch-based thermal cycle modulation gas identification device of claim 1, wherein, The data processing method of the gas recognition module is as follows: 1) data preprocessing of the multi-dimensional response feature data to obtain a sample; 2) inputting the sample into the classification model to obtain gas types contained in the target gas; 3) inputting the classification result of the classification model into the regression model to obtain concentrations of various types of gas in the target gas.

3. The switch-based thermal cycle modulation gas identification device of claim 2, wherein, The preprocessing method is as follows: 1.1):Baseline correction of multi-dimensional response characteristic data by difference quotient method: S t ’ = (S t -S0) / S0 where S t and So are the sensor response value at the tth time and the initial sensor response value, respectively, and S t ’ is the sensor response value at the tth time after the reference correction. 1.2):The sensor response value after baseline correction is divided into L time periods according to the on-off thermal cycle adjustment period, and each on-off thermal cycle modulation period is a time period.

4. The switch-based thermal cycle modulation gas identification device of claim 3, wherein, The data processing method of the classification model is as follows: 2.1): Constructing the sample set, one training sample in the sample set is composed of the response values of n sensors in L time periods, the response values of n sensors in one time period are input into the 1D CNN module to extract the response features of n sensors in the time period, the input X of the 1D CNN module is a real value matrix, which is expressed as wherein T represents the number of samples in one time period, n represents the number of sensors, represents the real number field; 2.1.1):The response values of n sensors are sent to 1DCNN, and the formula is described as follows: where F i (k) represents the output of the kth convolutional kernel at position i, K represents the convolutional kernel width, are the convolutional weights, b (k) is the bias term, X i+j,c represents the value of the input signal at time step i + j, cth channel. 2.1.2):Batch normalization and nonlinear mapping of features after convolution, and the formula is described as follows: F i out(k) = ReLU(F i BN(k) ) where μ B , δ B 2 denote the mean and variance of the batch samples, respectively, F i (k) denotes the value of the k-th convolution kernel at position i, and ε denotes a small positive number to prevent division by zero, denotes the normalized value of the k-th convolution kernel at position i, and γ, β are learnable parameters, F i BN(k) is the batch normalization output of the k-th convolution kernel at position i, and ReLU(·) denotes the ReLU activation function, F i out(k) is the output value after activation of the k-th convolution kernel at position i; 2.1.3):Adaptive average pooling is used to compress the feature dimension, and the formula is described as follows: wherein E i represents a pooling region, e i is the number of region elements; 2.2):The features extracted by the 1DCNN module are sent to the self-attention module for feature enhancement; 2.2.1): the output features F pool are denoted F, the query vector Q = FW Q is obtained by a linear transformation K , the key vector K = FW V , and the value vector V = FW Q where W K , W V are trainable weight matrices; 2.2.2): Compute attention matrix A and output enhanced features F α The formula is described as follows: F α = AV softmax() denotes a normalization function, T denotes matrix transpose, d k denotes the dimension of the key vector; 2.2.3):Adaptive average pooling is used to compress the feature dimension, and the formula is described as follows: wherein L represents the number of time periods of a single sample, d represents the feature dimension of a single time period, F α (i) denotes the output feature of the i-th time period reinforced by the attention mechanism, F all denotes the feature of all time periods within a single sample; 2.2.4) Feature F of all time periods are fed into the transformer network to extract the associated features of sensor responses across different time periods; all sent into the transformer network to extract the associated features of sensor responses across different time periods; 2.2.5):The correlation features output by the transformer are flattened and sent to the fully connected layer for classification training. The cross-entropy loss function is used to calculate the difference between the model prediction result and the true label. The network parameters are optimized through back propagation, and the final classification model is retained. The formula is described as follows: where z j represents the predicted value of the jth class of the sample, z y is the label value of the real gas component, and C represents the total number of classes. 2.2.6):Load the final classification model, send the preprocessed sensor response data into the final classification model to output the component identification result of the gas to be measured, and obtain the gas species contained in the gas to be measured.

5. The switch-based thermal cycle modulation gas identification device of claim 2, wherein, The data processing flow of the regression model is as follows: 3.1) Construct a sample set, and a training sample in the sample set is composed of the response values of n sensors in L time periods. The response values of n sensors in a time period are sent to n 1DCNN modules respectively to extract the response features of n sensors in the time period; 1 The input to the 1D CNN module is represented as a matrix X i ∈ R 1×T where T denotes the number of samples in each time period and i denotes the i-th sensor: The response values of n sensors are sent to n 1DCNN modules respectively, and the response of the sensor is convolved three times with the convolution kernel size decreasing in turn. After convolution, the features are batch normalized and nonlinearly mapped, and the formula is described as follows: where k denotes the number of convolution layers, W i (k) and b i (k) are the weight and bias of the k-th layer of convolution kernel, respectively, BN(·) is batch normalization, σ() is a nonlinear activation function; F i (k) denotes the output of the k-th layer of convolution. 3.2):Adaptive maximum pooling is used to compress the feature dimension: The 1D CNN convolution module output F of the ith sensor (k) The features of the same sensor at different time periods are stacked, denoted as F, and the formula is described as follows: wherein, represents a real-valued feature vector of the i-th sensor over the j-th time segment, represents a real-valued feature vector of the i-th sensor over all time segments; L represents the number of time segments of a single sample, and d represents the feature dimension of a single time segment; represents a real-valued feature vector of the i-th sensor over all time segments; L represents the number of time segments of a single sample, and d represents the feature dimension of a single time segment; 3.3):A trainable scalar weight coefficient is introduced for each sensor channel, and the initial value is set as α=1 / n, where n is the number of sensors, and the formula is described as follows: wherein, S is the response value of the i-th sensor after weighting, S i S is the response value of the i-th sensor, S i is the weight coefficient of S i S 3.4):The features of n sensors in all time periods are sent to n transformers respectively to extract the correlation features of the sensor response in different time periods; 3.5): concatenate n transformer outputs of features H i ∈ R L×d After flattening, concatenate, send to the full connection layer for regression training, use the mean square error loss function to calculate the difference between the model prediction result and the true label, get the final regression model by the mean square error loss function, optimize the network parameters by back propagation, keep the final regression model, the formula is described as follows; h i = Flatten(H i ) h = Concat(h1, h2,..., h n ) where Flatten() represents flattening, H i represents the i-th transformer model output, h i represents the flattened i-th transformer model output, Concat() represents concatenation by dimension, h represents the concatenation of all transformer model output values, f() represents a fully connected layer, represents the regression prediction value of the regression model, and y j respectively represent the regression prediction value and the label true value of the j-th sample, and m represents the number of samples in the batch. 3.6):Load the final regression model, and send the preprocessed sensor response data into the model to output the gas component identification result.

6. The gas identification apparatus based on switchable thermal cycle modulation according to claim 4 or 5, wherein The sample set is divided into training set, validation set and test set; the ratio of training set, validation set and test set is 6:2:2; and five-fold cross-validation is used in the training process.

7. The switch-based thermal cycle modulation gas identification device of claim 1, wherein, The signal acquisition system is composed of a data acquisition card, a computer and computer software Labview. The data acquisition card is used to connect the metal oxide semiconductor gas sensor array and the computer, and the computer software Labview is used to acquire the analog signal of the metal oxide semiconductor gas sensor array in real time.

Citation Information

Patent Citations

  • Harbor confined space operation safety environment monitoring method and system

    CN118501210A

  • Mixed gas concentration detection method based on temperature modulation technology

    CN119442905A