An adaptive post-fusion detection method for gas sensor array

By constructing a neural network model of deep learning and MASK operator, the problems of long detection cycle and low accuracy of gas sensor array under interfering gas conditions are solved, and efficient and accurate gas concentration and sensor status detection are achieved.

CN116340881BActive Publication Date: 2025-09-19JILIN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310311007.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-28
Publication Date
2025-09-19
Estimated Expiration
2043-03-28

AI Technical Summary

Technical Problem

The existing gas sensor array detection process under interfering gas conditions has a long experimental cycle, complex data processing, inaccurate experimental results and uncertain array sensor status.

Method used

The adaptive post-fusion detection method of gas sensor array is adopted. Through deep learning, compensation correction algorithm and neural network model of MASK operator, data processing, sequence processing and post-fusion processing modules are constructed to perform data preprocessing, model training and detection.

Benefits of technology

It improves detection accuracy and efficiency, reduces the complexity of data processing, enhances the stability and reliability of the sensor, and can accurately detect gas concentration and sensor status in the presence of interfering gases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116340881B_ABST
    Figure CN116340881B_ABST
Patent Text Reader

Abstract

The present invention discloses an adaptive post-fusion detection method for a gas sensor array, which belongs to the field of intelligent sensor detection technology, including data set preparation and preprocessing; construction and training of a neural network model based on deep learning, compensation correction algorithm and MASK operator; and use of the above-mentioned trained neural network model to detect the actual concentration value and the state of the array sensor device. The present invention adopts a post-fusion algorithm, firstly performs calibration compensation and data fusion based on sensors of the same type, and then finally fuses the fusion results of each type of sensor. The fusion algorithm performs staged fusion according to the strength of the correlation between different data, which is conducive to controlling the complexity of the algorithm, improving the interpretability and execution efficiency of the algorithm, and reducing the requirements for the size of the data set during the model training process. The successful construction of this type of algorithm will help promote the construction of a universal algorithm framework for gas sensing systems and automated algorithm optimization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of intelligent sensor detection, and in particular relates to a gas sensor array adaptive post-fusion detection method. Background Art

[0002] In sealed environments where a fixed amount of gas has been injected, a gas sensor is used to detect the gas concentration in the environment. Gas sensors typically undergo a preheating step, during which the gas-sensing element undergoes a chemical or physical reaction with the gas, causing changes in its properties. Detection circuits designed based on the specific characteristics of the gas-sensing element ultimately convert the physical or chemical signal into an electrical signal. These reaction characteristics indicate that gas sensors have slow measurement cycles and pose significant challenges in ensuring accuracy.

[0003] In the traditional gas sensor measurement method, the lower computer is used to collect the amplitude of the electrical signal emitted by the gas sensor circuit, and the plateau value or peak value in the amplitude time series is set as the current ambient gas concentration value. Figure 1 As shown in the graph, the conductance amplitude changes caused by SOF2 and SO2F2 gas concentrations measured by the carbon nanotube gas sensor show irregular peak fluctuations throughout the reaction process. The experiment lasted 85 hours. Traditionally, collecting peak amplitude data over a time series can only reduce errors by extending the experimental period indefinitely, a process that is time-consuming and can lead to biased experimental results.

[0004] Furthermore, in array sensor selectivity experiments, the presence of interfering gases consistently impacts detection accuracy. Array gas sensors are subject to the influence of interfering gases in the detection environment. These interfering gases can cause cross-interference in the sensor, leading to false positives or missed detections. Therefore, to minimize the impact of interference, cross-response calibration of the array sensor is necessary. In an array sensor, each sensor corresponds to a specific gas. The presence of interfering gases can cause changes in the sensor's signal, affecting the responses of other sensors. Therefore, the effects of interfering gases must be taken into account during measurements, and cross-response calibration must be performed to ensure sensor accuracy and reliability.

[0005] Array gas sensors present several potential hazards. First, due to the limited response time of the sensor, missed or false positives may occur, resulting in inaccurate measurement results. Second, the sensor may be allergic to certain chemicals, leading to sensor failure or decreased accuracy. Furthermore, the sensor may be affected by environmental factors such as temperature and humidity, requiring proper environmental conditioning and maintenance to ensure stability and accuracy.

[0006] In traditional measurement schemes, interfering gases can be categorized into two types: cross-sensitivity and background interference. Cross-sensitivity refers to the effect of one gas component on the response of other gas components, while background interference refers to the influence of other gas components in the environment on the sensor response. To address these interferences, sensor response modeling is used: by building a sensor response model to correct for the effects of interfering gases, thereby improving measurement accuracy. This approach has the advantage of being able to correct for the effects of multiple interfering gases, but it requires a large amount of data and computational effort. Physicochemical methods use physicochemical methods to remove interfering gases, such as chemical reactions, adsorption, or separation, to reduce their impact on sensor response. This approach has the advantage of being able to remove the effects of interfering gases, but requires specialized processing equipment and a long processing time. Multi-sensor data fusion uses multiple sensors to obtain information on different gas components and fuses it to produce more accurate measurement results. This approach has the advantage of improving measurement accuracy and reliability, but it requires multiple sensors and data processing technology. Since multiple sensors and processors each have potential points of failure, system stability is difficult to ensure and maintenance costs are increased. Moreover, in the selectivity verification experiment of the gas sensor, in the presence of interfering gases, the cross-response of different gases will affect the detection accuracy, requiring more complex processing. Summary of the Invention

[0007] In order to overcome the problems of existing array sensors under interfering gas conditions, such as long experimental cycle, complex data processing, inaccurate experimental results and uncertain array sensor status, the present invention proposes a gas sensor array adaptive post-fusion detection method.

[0008] The present invention is achieved through the following technical solutions:

[0009] A gas sensor array adaptive post-fusion detection method specifically comprises the following steps:

[0010] Step 1: Dataset preparation and preprocessing;

[0011] Collect existing standard calibration data from the gas to be measured under the presence of interfering gas, detected by the same type of array sensor; combine the interfering gas concentration, environmental parameters, and the standard concentration of the gas to be measured into a data set, and preprocess the data set. The preprocessing includes cleaning, denoising, and standardization to obtain a gas concentration sequence data set with a time dimension.

[0012] Step 2: Construction of a neural network model based on deep learning, compensation correction algorithm and MASK operator;

[0013] The neural network model includes a data processing module, a sequence processing module, a compensation correction algorithm module and a post-fusion processing module;

[0014] In the data processing module, the MASK operator is used to enhance the data set, and the data set is segmented using ten-fold cross-validation. In the sequence processing module, the hyperparameters of the encoder and decoder modules in the sequence neural network model (Transformer) are adjusted, and the optimal hyperparameter combination is evaluated using optimization functions such as grid search with reference to the mean square error (MSE) and mean absolute error (MAE) indicators to estimate the gas concentration values ​​(including interfering gas concentration values) and environmental parameter values ​​corresponding to each sensor sequence. In the compensation and correction algorithm module, after algorithm processing and correction, the target gas concentration value and the actual concentration value of the interfering gas under the environmental parameters are obtained. In the post-fusion processing module, a convolutional neural network (CNN) is used to automatically extract features from the data after compensation and correction processing, thereby realizing sensor detection and diagnosis.

[0015] Step 3: Training of neural network models based on deep learning, compensation correction algorithm and MASK operator;

[0016] Step 4: Use the trained neural network model to detect the actual concentration value and the state of the array sensor device.

[0017] Furthermore, in step 1, the data includes a sequence of concentration and time values ​​detected by the array sensor, a sequence of concentration and time values ​​of interfering gas detection, and a time series value of the environmental parameter. The above time series values ​​are converted into a format for the Transformer model to perform the model training task, which specifically includes the following:

[0018] A1. Discretize the time series: Discretize the continuous time series data into data with a fixed time interval of 10 minutes;

[0019] A 2. Series normalization: perform mean normalization on the discretized time series to make them have similar statistical characteristics;

[0020] A3. Constructing an input sequence: Convert the mean-normalized time series data into an input sequence, that is, input a fixed-length data sequence into the Transformer neural network model as a sequence.

[0021] A4. Batching and padding: When the input sequence length is insufficient, padding is performed to ensure the consistency of the input sequence length.

[0022] Furthermore, in step 2, in the data processing module, the MASK operator operation can expand the data set and increase the number of samples; specifically, the MASK operator is designed according to the sensor array form, and the generated MASK operator mask is used to mask the sequence data obtained after preprocessing in step 1 to obtain a series of masked new sample sequence data; finally, the generated new sample sequence data is used as the data set for model training and evaluation.

[0023] Furthermore, in step 2, a ten-fold cross-validation method is used to split the dataset and perform model training and evaluation. The specific steps are as follows:

[0024] B1. Divide the original dataset into 10 non-overlapping subsets;

[0025] B2. For each subset, use it as the test set and the remaining 9 subsets as the training set to perform model training and evaluation;

[0026] B3. Repeat step B2 10 times until each subset is used as a test set;

[0027] B4. For each partition, record the performance indicators of the model on the test set;

[0028] B5. Average the performance indicators of all 10 test sets to obtain the final performance indicator of the model.

[0029] Furthermore, in step 2, the sequence processing module uses the encoder-decoder model and embedding layer of the Transformer neural network to perform time series processing on the data; wherein the embedding layer is used to convert the data collected by the sensor into a vector form that can be processed by the neural network; the encoder module is used to convert the input sequence into a set of hidden representations; and the decoder module is used to generate the output of the current time step based on the hidden representation provided by the encoder module and the previously generated output;

[0030] The embedding layer consists of a position encoder and an input embedding. The position encoder is used to add position information to the input data at each time point to facilitate the model to learn the order of the time series; the input embedding is used to convert the input data at each time point into a vector representation of fixed dimension to facilitate subsequent processing by the attention mechanism, encoder and decoder.

[0031] The Encoder module includes:

[0032] Multi-Head Attention mechanism, which is used to perform weighted aggregation on the input sequence so that the Encoder module can better utilize the information of the input sequence;

[0033] Position-wise Feed-Forward Network: It is used to perform weighted aggregation on the output of the multi-head attention mechanism to generate a set of hidden representations.

[0034] The Decoder module includes:

[0035] The self-attention mechanism Masked Multi-Head Attention is used to calculate the relationship between the output of the current time step and the output generated previously, and to interact the hidden representation provided by the Encoder module with the output of the current time step;

[0036] Multi-Head Attention, which is used to perform weighted aggregation on the hidden representations provided by the Encoder module so that the Decoder module can better utilize the information of the input sequence;

[0037] The Position-wise Feed-Forward Network is used to perform weighted aggregation on the outputs of the two attention mechanisms to generate the output of the current time step;

[0038] A Layer Normalization module is provided between each component of the Encoder module and the Decoder module to better perform signal transmission and prevent the gradient disappearance problem during model training.

[0039] Furthermore, in step 2, the sequence processing module, the model construction specifically includes the following contents:

[0040] C1: Set the hyperparameter range;

[0041] First, determine the input sequence length. Based on the data sampling frequency and application scenario, select data points from 0 to 24 hours as an input sequence length to comprehensively record the changes in ambient gas concentrations. Then, determine the batch size and number of hidden layers. Set the batch size to 32, 64, or 128; determine the number of hidden layers to 5-6; and finally, determine the number of heads to 6-8.

[0042] C2: Grid search;

[0043] Use grid search method to search for the optimal hyperparameter combination within the hyperparameter range;

[0044] C3: Random search;

[0045] Use random search method to randomly search for the optimal hyperparameter combination within the hyperparameter range;

[0046] C4: Bayesian optimization;

[0047] Use Bayesian optimization method to find the optimal hyperparameter combination within the hyperparameter range;

[0048] C5: evaluate model performance;

[0049] The optimal hyperparameter combinations obtained by the above methods were used to train the Transformer neural network models respectively, and the mean square error (MSE) and mean absolute error (MAE) were used on the test set to evaluate the optimal hyperparameter combination. The MSE and MAE corresponding to the optimal parameter model were used to characterize the model performance.

[0050] Furthermore, in step 2, in the compensation correction algorithm module, the existing environmental parameter influence standard on the gas is used as the algorithm benchmark, the algorithm inputs the environmental parameters, the interfering gas and the target gas concentration, and obtains the target gas concentration value and the actual concentration value of the interfering gas under the stripping environment influence;

[0051] D1: The algorithm uses the existing environmental parameter impact standard on gas as the benchmark. Based on the existing environmental parameters, a relationship model between gas concentration values ​​and environmental parameters is established as the algorithm benchmark to correct the target gas concentration and interfering gas concentration for environmental impact.

[0052] D2: Input environmental parameters, interfering gas concentrations, and target gas concentrations; pass these parameters, interfering gas concentrations, and target gas concentrations as algorithm inputs to the compensation and correction algorithm module;

[0053] D3: Correct the target gas concentration and interfering gas concentration for the effects of the environment. Using the algorithm benchmark model, the input target gas concentration and interfering gas concentration are corrected for the effects of the environment to obtain the target gas concentration value and the actual concentration value of the interfering gas after the environmental effects are removed.

[0054] D4: Output the target gas concentration value after removing the environmental influence and the actual concentration value of the interfering gas; the target gas concentration value after removing the environmental influence and the actual concentration value of the interfering gas are used as the algorithm output and passed to the subsequent processing module for further processing.

[0055] Furthermore, in step 2, in the post-fusion processing module, a convolutional neural network (CNN) is used to automatically extract features from the data after compensation and correction processing, thereby realizing detection and diagnosis of the sensor.

[0056] Furthermore, in step 2, the implementation of the fusion processing module includes the following steps:

[0057] E1: Input sensor array data into the CNN network;

[0058] In the input layer of the CNN network, the sensor data (including the interfering gas sensor data) are arranged according to the sensor array position, and the reading of each sensor in the sensor array is used as a channel of input;

[0059] E2: Use multiple convolutional layers and pooling layers to extract features from the input data;

[0060] In the convolution layer, the input data is filtered through convolution operations to extract spatial features in the data; in the pooling layer, the convolution output is downsampled to reduce the size of the feature map while retaining key feature information;

[0061] E3: Use fully connected layers to classify and regress features;

[0062] In the fully connected layer, the feature vector is expanded into a one-dimensional vector, and through a series of fully connected operations, the feature is mapped to the output space to achieve classification of sensor array data and true standard regression fitting;

[0063] E4: Based on the classification results, the gas concentration value and the array sensor device status are output. The actual gas concentration value under interference is determined based on the regression results.

[0064] Furthermore, step three is as follows:

[0065] The existing data set of the target gas array sensor is selected, and the parameter values ​​of the data set and their corresponding time values ​​are used as the analysis feature of the neural network, namely Q i =[t i , v i ] T ,Q i Indicates the data parameters sent by the lower computer at a certain moment, t i 、v i are the concentration and time values ​​of the corresponding gases respectively; the training set is imported into the neural network through embedding. After a series of interleaving, normalization, attention mechanism, compensation correction algorithm, MASK operator masking, and post-fusion algorithm training processing, the parameter relationship between the gas array sensor data sequence and the actual gas concentration and array sensor device status under the influence of interfering gas is obtained, that is, the model training is completed.

[0066] Compared with the prior art, the advantages of the present invention are as follows:

[0067] The key components of this invention lie in the mask processing and pre-fusion compensation and correction algorithm, which significantly improves the algorithm's efficiency and accuracy. The final output is the current ambient target gas concentration value and the device fault source status parameters. Specifically, during the compensation and correction algorithm module training phase, the target gas, interfering gas, and environmental parameter data calculated by the time series neural network are pre-corrected to reduce data dimensionality and enhance the model's generalization capabilities.

[0068] This invention utilizes a post-fusion algorithm, first performing calibration compensation and data fusion based on sensors of the same type, and then performing a final fusion of the fusion results from each sensor type. This fusion algorithm performs fusion in stages based on the strength of the correlation between different data types, which helps control algorithm complexity, improves algorithm interpretability and execution efficiency, and reduces the dataset size requirements during model training. The successful development of this type of algorithm will help advance the construction of a universal algorithm framework for gas sensing systems and automated algorithm optimization.

[0069] The present invention incorporates the model obtained by training the MASK operator into the training data set, and better subdivides the fault source solution for evaluating the test parameter changes. On the one hand, it improves the accuracy of fault source analysis, and on the other hand, it incorporates suspicious parameters into the calculation according to weights to improve the accuracy of target gas concentration detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly describes the drawings required for the specific embodiments or the description of the prior art. Similar elements or parts are generally identified by similar reference numerals throughout the drawings. Elements or parts in the drawings are not necessarily drawn to scale.

[0071] Figure 1 : Response curve of gas sensor to 1μLL SO2F2;

[0072] Figure 2 : Flowchart of the sequential neural network based on the transformer model in the present invention;

[0073] Figure 3 : The overall architecture diagram of the sensor post-fusion solution in the present invention;

[0074] Figure 4 : The sensor test time and voltage change curve described in the present invention;

[0075] Figure 5 : A two-dimensional graph of sequence information in the present invention;

[0076] Figure 6 : The MASK operator subset sumk composition graph in the present invention;

[0077] Figure 7 : MASK operator composition diagram in the present invention. DETAILED DESCRIPTION

[0078] In order to clearly and completely describe the technical solution and specific working process of the present invention, the specific implementation methods of the present invention are as follows in conjunction with the accompanying drawings:

[0079] Example 1

[0080] This embodiment provides a gas sensor array adaptive post-fusion detection method, which specifically includes the following steps:

[0081] Step 1: Dataset preparation and preprocessing;

[0082] Collect existing standard calibration data from the same type of array sensor under interfering gas conditions. Combine the interfering gas concentration, environmental parameters, and the standard concentration of the gas to be measured into a dataset. This dataset is then preprocessed, including cleaning, denoising, and standardization, to produce time-dependent gas concentration sequence data and environmental parameter data.

[0083] like Figure 3 The overall post-fusion solution architecture shown in the figure includes three types of terminal sensors, a lower computer module, a MASK module, a compensation and correction module, and a post-fusion algorithm module. The data includes the sequence values ​​of concentration and time values ​​detected by the array sensor, the sequence values ​​of environmental parameters, and the sequence values ​​of interfering gases. The sequence values ​​of concentration and time in the sensor are converted into a format for the Transformer model to perform model training tasks, which specifically include the following:

[0084] A1. Discretize the time series: Discretize the continuous time series data into data with a fixed time interval of 10 minutes;

[0085] A 2. Series normalization: perform mean normalization on the discretized time series to make them have similar statistical characteristics;

[0086] A3. Constructing an input sequence: Convert the mean-normalized time series data into an input sequence, that is, input a fixed-length data sequence into the Transformer neural network model as a sequence.

[0087] A4. Batching and padding: When the input sequence length is insufficient, padding is performed to ensure the consistency of the input sequence length.

[0088] Step 2: Construction of a neural network model based on deep learning and MASK operator;

[0089] In the data processing module, the MASK operator is used to enhance the data set, and the data set is divided using ten-fold cross-validation. In the sequence processing module, the hyperparameters of the encoder and decoder modules in the sequence neural network model (Transformer) are adjusted, and the optimal hyperparameter combination is evaluated using optimization functions such as grid search with reference to the mean square error (MSE) and mean absolute error (MAE) indicators to estimate the gas concentration values ​​(including interfering gas concentration values) and environmental parameter values ​​corresponding to each sensor sequence. In the compensation and correction algorithm module, after algorithm processing and correction, the target gas concentration value and the actual concentration value of the interfering gas under the environmental parameters are obtained. In the post-fusion processing module, a convolutional neural network (CNN) is used to automatically extract features from the data after compensation and correction processing, thereby realizing the detection and diagnosis of the sensor.

[0090] In step 2, in the data processing module, the MASK operator operation can effectively expand the data set and increase the number of samples. This operator operation is a data enhancement method based on the state change of the array device in the form of a mask. By adding the MASK operator to the data set, the diversity of samples is achieved. Specifically, as shown in the attached Figure 6 、 7 As shown, a mask operator is designed based on a 1×3 sensor array. The generated mask operator mask is used to mask the sequence data obtained from the preprocessing in step 1, generating a series of masked new sample sequence data. Finally, the generated new sample sequence data is used as the dataset for model training and evaluation. In this embodiment, the time series of the array sensors are masked to limit the scope of deep learning operations, ensuring that the entire network operates effectively and efficiently, ultimately outputting the ambient target gas concentration value and fault source information.

[0091] like Figure 4 and Figure 5 As shown in the figure, the electrical signal sent by the lower computer is a two-dimensional time series information. Point Q in the figure represents the actual gas concentration value. The two-dimensional information contained in the vector corresponds to the t and v values ​​respectively. The former is the actual environmental measurement concentration value, and the latter is the time value when the lower computer sends the value. The three groups of two-dimensional time series of the array sensor are input into the MASK module for calculation processing.

[0092] In step 2, a ten-fold cross-validation method is used to split the dataset and perform model training and evaluation. The specific steps are as follows:

[0093] B1. Divide the original dataset into 10 non-overlapping subsets;

[0094] B2. For each subset, use it as the test set and the remaining 9 subsets as the training set to perform model training and evaluation;

[0095] B3. Repeat step B2 10 times until each subset is used as a test set;

[0096] B4. For each partition, record the model's performance indicators on the test set, such as accuracy, precision, recall, etc.

[0097] B5. Average the performance indicators of all 10 test sets to obtain the final performance indicator of the model.

[0098] In the sequence processing module of step 2, the encoder-decoder model and embedding layer of the Transformer neural network are used to perform time series processing on the data; wherein, the embedding layer is used to convert the data collected by the sensor into a vector form that can be processed by the neural network; the encoder module is used to convert the input sequence into a set of hidden representations; the decoder module is used to generate the output of the current time step based on the hidden representation provided by the encoder module and the previously generated output;

[0099] The embedding layer consists of a position encoder and an input embedding. The position encoder is used to add position information to the input data at each time point to facilitate the model to learn the order of the time series; the input embedding is used to convert the input data at each time point into a vector representation of fixed dimension to facilitate subsequent processing by the attention mechanism, encoder and decoder.

[0100] The Encoder module includes:

[0101] Multi-Head Attention mechanism, which is used to perform weighted aggregation on the input sequence so that the Encoder module can better utilize the information of the input sequence;

[0102] Position-wise Feed-Forward Network: It is used to perform weighted aggregation on the output of the multi-head attention mechanism to generate a set of hidden representations.

[0103] The Decoder module includes:

[0104] The self-attention mechanism Masked Multi-Head Attention is used to calculate the relationship between the output of the current time step and the output generated previously, and to interact the hidden representation provided by the Encoder module with the output of the current time step;

[0105] Multi-Head Attention, which is used to perform weighted aggregation on the hidden representations provided by the Encoder module so that the Decoder module can better utilize the information of the input sequence;

[0106] The Position-wise Feed-Forward Network is used to perform weighted aggregation on the outputs of the two attention mechanisms to generate the output of the current time step;

[0107] A Layer Normalization module is provided between each component of the Encoder module and the Decoder module to better perform signal transmission and prevent the gradient disappearance problem during model training.

[0108] Step 2: Sequence processing module. Model building specifically includes the following:

[0109] C1: Set the hyperparameter range;

[0110] First, determine the input sequence length. Based on the data sampling frequency and application scenario, select data points from 0 to 24 hours as an input sequence length to comprehensively record the changes in ambient gas concentrations. Then, determine the batch size and number of hidden layers. Set the batch size to 32, 64, or 128; determine the number of hidden layers to 5-6; and finally, determine the number of heads to 6-8.

[0111] C2: Grid search;

[0112] Use grid search method to search for the optimal hyperparameter combination within the hyperparameter range;

[0113] C3: Random search;

[0114] Use random search method to randomly search for the optimal hyperparameter combination within the hyperparameter range;

[0115] C4: Bayesian optimization;

[0116] Use Bayesian optimization method to find the optimal hyperparameter combination within the hyperparameter range;

[0117] C5: evaluate model performance;

[0118] The optimal hyperparameter combinations obtained by the above methods were used to train the Transformer neural network models respectively, and the mean square error (MSE) and mean absolute error (MAE) were used on the test set to evaluate the optimal hyperparameter combination. The MSE and MAE corresponding to the optimal parameter model were used to characterize the model performance.

[0119] Furthermore, in step 2, in the compensation correction algorithm module, the existing environmental parameter influence standard on the gas is used as the algorithm benchmark, the algorithm inputs the environmental parameters, the interfering gas and the target gas concentration, and obtains the target gas concentration value and the actual concentration value of the interfering gas under the stripping environment influence;

[0120] D1: The algorithm uses the existing environmental parameter impact standard on gas as the benchmark. Based on the existing environmental parameters, a relationship model between gas concentration values ​​and environmental parameters is established as the algorithm benchmark to correct the target gas concentration and interfering gas concentration for environmental impact.

[0121] D2: Input environmental parameters, interfering gas concentrations, and target gas concentrations; pass these parameters, interfering gas concentrations, and target gas concentrations as algorithm inputs to the compensation and correction algorithm module;

[0122] D3: Correct the target gas concentration and interfering gas concentration for the effects of the environment. Using the algorithm benchmark model, the input target gas concentration and interfering gas concentration are corrected for the effects of the environment to obtain the target gas concentration value and the actual concentration value of the interfering gas after the environmental effects are removed.

[0123] D4: Output the target gas concentration value after removing the environmental influence and the actual concentration value of the interfering gas; the target gas concentration value after removing the environmental influence and the actual concentration value of the interfering gas are used as the algorithm output and passed to the subsequent processing module for further processing.

[0124] Furthermore, in step 2, in the post-fusion processing module, a convolutional neural network (CNN) is used to automatically extract features from the compensated and corrected data, thereby realizing the detection and diagnosis of the sensor;

[0125] Furthermore, in step 2, the implementation of the fusion processing module includes the following steps:

[0126] E1: Input sensor array data into the CNN network;

[0127] In the input layer of the CNN network, the sensor data (including the interfering gas sensor data) are arranged according to the sensor array position, and the reading of each sensor in the sensor array is used as a channel of input;

[0128] E2: Use multiple convolutional layers and pooling layers to extract features from the input data;

[0129] In the convolution layer, the input data is filtered through convolution operations to extract spatial features in the data; in the pooling layer, the convolution output is downsampled to reduce the size of the feature map while retaining key feature information;

[0130] E3: Use fully connected layers to classify and regress features;

[0131] In the fully connected layer, the feature vector is expanded into a one-dimensional vector, and through a series of fully connected operations, the feature is mapped to the output space to achieve classification of sensor array data and true standard regression fitting;

[0132] E4: Based on the classification results, the gas concentration value and the array sensor device status are output. The actual gas concentration value under interference is determined based on the regression results.

[0133] Step 3: Training of neural network model based on deep learning and MASK operator;

[0134] Select the collected existing data set, and the parameter value of the data set and its corresponding time value as the analysis feature of the neural network, that is, Q i =[t i , v i ] T ,Q i Indicates the data parameters sent by the lower computer at a certain moment, t i 、v i are the concentration and time values ​​of the corresponding gases respectively; the training set is imported into the neural network through embedding. After a series of interleaving, normalization, attention mechanism, MASK operator masking, compensation correction algorithm and post-fusion algorithm training processing, the parameter relationship between the gas array sensor data sequence and the actual gas concentration and array sensor device status under the influence of interfering gas is obtained, that is, the model training is completed.

[0135] In this embodiment, if Figure 6 As shown in the figure, taking the commonly used array mode composed of three gas sensors as an example, the three-row and eight-column matrix formed by the eight column vectors K1, K2, K3, K4, K5, K5, K7, and K8 constitutes a MASK operator module subset, where the binary value in each column vector represents the state of the array sensor, for example, [1 1 0] in the K2 column vector T Indicates that among the three gas sensors, the first sensor is in normal state, the second sensor is in normal state, and the third sensor is in abnormal state. In addition, according to the number of gas sensors in the array, sumk is weighted to improve learning accuracy. Figure 7 As shown in the figure, for an array consisting of three gas sensors, the six-equal gradient concatenation matrix of sumk is set. By incorporating the MASK operator into the training dataset, the resulting model can better segment the fault source analysis for test parameter variation assessment. This not only improves the accuracy of fault source analysis, but also incorporates suspicious parameters into the calculation according to their weights, improving the accuracy of target gas concentration detection.

[0136] Step 4: Use the trained neural network model to detect the actual concentration value and the state of the array sensor device.

[0137] In the gas array sensor test experiment, the gas sensor acts as a gas sensing element. The lower computer converts the physical or chemical characteristic parameter changes of the gas sensor into an electrical signal form, and sends it to the upper computer together with the environmental parameters and the interfering gas time series data. The PC side first performs compensation correction algorithm correction processing on the small amount of time series curve parameters obtained, and imports the gas time series data (including the interfering gas sensor data) into the model. The gas concentration parameters and fault source status information output by the model are the post-fusion detection effect proposed by the present invention, which solves the measurement problem of the current environmental gas accurate value and device status abnormal diagnosis under the influence of the stripping interfering gas. This process uses a large number of training set calculations and makes full use of the rich time series information data. It can obtain the actual gas concentration value and device status under the experimental conditions of a short time, a small amount of data and gas interference.

[0138] 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, various simple modifications can be made to the technical solution of the present invention, and these simple modifications all fall within the scope of protection of the present invention.

[0139] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any appropriate manner without contradiction. In order to avoid unnecessary repetition, the present invention will not further describe various possible combinations.

[0140] In addition, the 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 gas sensor array adaptive post-fusion detection method, characterized in that: The specific steps include: Step 1: Dataset preparation and preprocessing; Collect existing standard calibration data from the gas to be measured under the presence of interfering gas, detected by the same type of array sensor; combine the interfering gas concentration, environmental parameters, and the standard concentration of the gas to be measured into a data set, and preprocess the data set. The preprocessing includes cleaning, denoising, and standardization to obtain a gas concentration sequence data set with a time dimension. Step 2: Construction of a neural network model based on deep learning, compensation correction algorithm and MASK operator; In the data processing module, the MASK operator is used to enhance the data set, and the data set is segmented using ten-fold cross-validation. In the sequence processing module, the hyperparameters of the encoder and decoder modules in the sequence neural network model are adjusted, and the optimal hyperparameter combination is evaluated using optimization functions such as grid search with reference to the mean square error and mean absolute error indicators to estimate the gas concentration and environmental parameter values ​​corresponding to each sensor sequence. In the compensation and correction algorithm module, after algorithm processing and correction, the target gas concentration value and the actual concentration value of the interfering gas under the environmental parameters are obtained. In the post-fusion processing module, a convolutional neural network is used to automatically extract features from the data after compensation and correction, thereby realizing sensor detection and diagnosis. Step 3: Training of neural network models based on deep learning, compensation correction algorithm and MASK operator; Step 4: Use the trained neural network model to detect the actual concentration value and the state of the array sensor device.

2. The gas sensor array adaptive post-fusion detection method according to claim 1, characterized in that: In step 1, the data includes the sequence of concentration and time values ​​detected by the array sensor, the sequence of concentration and time values ​​of interfering gas detection, and the time series values ​​of environmental parameters. These time series values ​​are converted into the format used for the Transformer model to perform the model training task, which specifically includes the following: A1. Discretize the time series: Discretize the continuous time series data into data with a fixed time interval of 10 minutes; A 2. Series normalization: perform mean normalization on the discretized time series to make them have similar statistical characteristics; A3. Constructing an input sequence: Convert the mean-normalized time series data into an input sequence, that is, input a fixed-length data sequence into the Transformer neural network model as a sequence. A4. Batching and padding: When the input sequence length is insufficient, padding is performed to ensure the consistency of the input sequence length.

3. The gas sensor array adaptive post-fusion detection method according to claim 1, characterized in that: In step 2, in the data processing module, the MASK operator operation can expand the data set and increase the number of samples. Specifically, the MASK operator is designed according to the sensor array form, and the generated MASK operator mask is used to mask the sequence data obtained after preprocessing in step 1 to obtain a series of masked new sample sequence data. Finally, the generated new sample sequence data is used as the data set for model training and evaluation.

4. The gas sensor array adaptive post-fusion detection method according to claim 1, characterized in that: In step 2, a ten-fold cross-validation method is used to split the dataset and perform model training and evaluation. The specific steps are as follows: B1. Divide the original dataset into 10 non-overlapping subsets; B2. For each subset, use it as the test set and the remaining 9 subsets as the training set to perform model training and evaluation; B3. Repeat step B2 10 times until each subset is used as a test set; B4. For each partition, record the performance indicators of the model on the test set; B5. Average the performance indicators of all 10 test sets to obtain the final performance indicator of the model.

5. The gas sensor array adaptive post-fusion detection method according to claim 1, characterized in that: In step 2, the sequence processing module uses the encoder-decoder model and embedding layer of the Transformer neural network to perform time series processing on the data; wherein the embedding layer is used to convert the data collected by the sensor into a vector form that can be processed by the neural network; the encoder module is used to convert the input sequence into a set of hidden representations; the decoder module is used to generate the output of the current time step based on the hidden representation provided by the encoder module and the previously generated output; The embedding layer consists of a position encoder and an input embedding. The position encoder is used to add position information to the input data at each time point to facilitate the model to learn the order of the time series; the input embedding is used to convert the input data at each time point into a vector representation of fixed dimension to facilitate subsequent processing by the attention mechanism, encoder and decoder. The Encoder module includes: Multi-Head Attention mechanism, which is used to perform weighted aggregation on the input sequence so that the Encoder module can better utilize the information of the input sequence; Position-wise Feed-Forward Network: used to perform weighted aggregation on the outputs of the multi-head attention mechanism to generate a set of hidden representations; The Decoder module includes: The self-attention mechanism Masked Multi-Head Attention is used to calculate the relationship between the output of the current time step and the output generated previously, and to interact the hidden representation provided by the Encoder module with the output of the current time step; Multi-Head Attention, which is used to perform weighted aggregation on the hidden representations provided by the Encoder module so that the Decoder module can better utilize the information of the input sequence; The Position-wise Feed-Forward Network is used to perform weighted aggregation on the outputs of the two attention mechanisms to generate the output of the current time step; A Layer Normalization module is provided between each component of the Encoder module and the Decoder module to better perform signal transmission and prevent the gradient disappearance problem during model training.

6. The gas sensor array adaptive post-fusion detection method according to claim 1, characterized in that: Step 2: Sequence processing module. Model building specifically includes the following: C1: Set the hyperparameter range; First, determine the input sequence length. Based on the data sampling frequency and application scenario, select data points from 0 to 24 hours as an input sequence length to comprehensively record the changes in ambient gas concentrations. Then, determine the batch size and number of hidden layers. Set the batch size to 32, 64, or 128; determine the number of hidden layers to 5-6; and finally, determine the number of heads to 6-8. C2: Grid search; Use grid search method to search for the optimal hyperparameter combination within the hyperparameter range; C3: Random search; Use random search method to randomly search for the optimal hyperparameter combination within the hyperparameter range; C4: Bayesian optimization; Use Bayesian optimization method to find the optimal hyperparameter combination within the hyperparameter range; C5: evaluate model performance; The optimal hyperparameter combinations obtained by the above methods were used to train the Transformer neural network models respectively, and the mean square error and mean absolute error were used on the test set to evaluate the optimal hyperparameter combination, and the MSE and MAE corresponding to the optimal parameter model were used to characterize the model performance.

7. The gas sensor array adaptive post-fusion detection method according to claim 1, characterized in that: In step 2, the compensation and correction algorithm module uses the existing environmental parameter impact standard on gas as the algorithm benchmark. The algorithm inputs the environmental parameters, interfering gas and target gas concentrations to obtain the target gas concentration value and the actual concentration value of the interfering gas under the stripping environment influence. D1: The algorithm uses the existing environmental parameter impact standard on gas as the benchmark. Based on the existing environmental parameters, a relationship model between gas concentration values ​​and environmental parameters is established as the algorithm benchmark to correct the target gas concentration and interfering gas concentration for environmental impact. D2: Input environmental parameters, interfering gas concentrations, and target gas concentrations; pass these parameters, interfering gas concentrations, and target gas concentrations as algorithm inputs to the compensation and correction algorithm module; D3: Correct the target gas concentration and interfering gas concentration for the effects of the environment. Using the algorithm benchmark model, the input target gas concentration and interfering gas concentration are corrected for the effects of the environment to obtain the target gas concentration value and the actual concentration value of the interfering gas after the environmental effects are removed. D4: Output the target gas concentration value after removing the environmental influence and the actual concentration value of the interfering gas; the target gas concentration value after removing the environmental influence and the actual concentration value of the interfering gas are used as the algorithm output and passed to the subsequent processing module for further processing.

8. The gas sensor array adaptive post-fusion detection method according to claim 1, characterized in that: In step 2, in the post-fusion processing module, a convolutional neural network is used to automatically extract features from the compensated and corrected data, thereby realizing the detection and diagnosis of the sensor.

9. The gas sensor array adaptive post-fusion detection method according to claim 1, characterized in that: In step 2, the implementation of the fusion processing module includes the following steps: E1: Input sensor array data into the CNN network; In the input layer of the CNN network, the sensor data is arranged according to the position of the sensor array, and the reading of each sensor in the sensor array is used as a channel of input; E2: Use multiple convolutional layers and pooling layers to extract features from the input data; In the convolution layer, the input data is filtered through convolution operations to extract spatial features in the data; in the pooling layer, the convolution output is downsampled to reduce the size of the feature map while retaining key feature information; E3: Use fully connected layers to classify and regress features; In the fully connected layer, the feature vector is expanded into a one-dimensional vector, and through a series of fully connected operations, the feature is mapped to the output space to achieve classification of sensor array data and true standard regression fitting; E4: Based on the classification results, the gas concentration value and the array sensor device status are output, and the actual gas concentration value under interference is determined based on the regression results.

10. The gas sensor array adaptive post-fusion detection method according to claim 1, characterized in that: Step 3 is as follows: The existing data set of the target gas array sensor is selected, and the parameter values ​​of the data set and their corresponding time values ​​are used as the analysis feature of the neural network, namely Q i =[t i , v i ] T ,Q i Indicates the data parameters sent by the lower computer at a certain moment, t i 、v i are the concentration and time values ​​of the corresponding gases respectively; the training set is imported into the neural network through embedding. After a series of interleaving, normalization, attention mechanism, compensation correction algorithm, MASK operator masking, and post-fusion algorithm training processing, the parameter relationship between the gas array sensor data sequence and the actual gas concentration and array sensor device status under the influence of interfering gas is obtained, that is, the model training is completed.

Citation Information

Patent Citations

  • Multi-sensor fusion decision-making vehicle detection method of W-type geomagnetic array

    CN114881156A

  • Gas sensing device for sensing one or more gases in a mixture of gases

    EP3936861A1