Real-time gas concentration prediction model and method based on response curve slope judgment

By processing the derivatives of the response curves of the gas sensor array and the CA-DSN model in real time, the problems of cross-sensitivity interference and baseline drift in the identification of mixed gases in the electronic nose system are solved, achieving high-precision, low-cost gas concentration prediction and system stability.

CN121601089APending Publication Date: 2026-03-03HUAZHONG UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511762340.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing electronic nose systems suffer from several drawbacks when facing complex application scenarios involving mixed gases. These include difficulty in accurately quantifying nonlinear relationships caused by cross-sensitive interference, high data processing costs, inability to adapt to the characteristics of continuous sensor signal generation, and sensor baseline drift affecting long-term stability.

Method used

By acquiring the resistance signal of the gas sensor array in real time, calculating the first derivative of the response curve, automatically determining the gas response stage, extracting responsivity features, and using the CA-DSN model for real-time training and calibration, combined with GPR data augmentation and PSO optimization, the entire process is automated and online self-calibrated.

Benefits of technology

It achieves high-precision ppm-level prediction of various volatile organic compounds under complex concentration combinations, reduces training costs, ensures the long-term stability and reliability of the system, and is suitable for online monitoring scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121601089A_ABST
    Figure CN121601089A_ABST
Patent Text Reader

Abstract

The invention relates to a real-time gas concentration prediction model and method based on response curve slope judgment, and belongs to the technical field of gas sensing and intelligent detection. The method comprises the following steps: acquiring a resistance signal of a gas sensor array in real time and calculating a first-order derivative of a response curve; automatically judging a gas response stage based on the first-order derivative, and extracting responsivity when the response is stable; inputting the features into a pre-trained gas concentration prediction model, and outputting a concentration prediction result of each component; based on the prediction error of the new data, calibration or retraining of the model is dynamically triggered to achieve adaptive update. Through full-process real-time processing and an intelligent calibration training mechanism, sensor baseline drift and gas cross interference are effectively dealt with, ppm-level high-precision prediction of various volatile organic compounds under complex concentration combinations is realized on the premise of remarkably reducing the training cost, and the stability and reliability of long-term operation of the system are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of gas sensing and intelligent detection technology, and more specifically, to a real-time gas concentration prediction model and method based on the slope determination of the response curve. Background Technology

[0002] Electronic nose systems, comprised of gas sensor arrays and recognition algorithms, are widely used in environmental monitoring, industrial safety, medical diagnostics, and battery thermal runaway early warning systems due to their advantages such as low cost, small size, and continuous monitoring capability. However, in complex real-world applications, electronic nose systems face numerous challenges: First, there is severe cross-sensitivity interference among the components in the mixed gas, which leads to a complex nonlinear relationship between the sensor's response signal and the gas concentration, making accurate quantitative identification extremely difficult.

[0003] Secondly, most existing deep learning-based gas identification research relies on large-scale static datasets that have been pre-collected, cleaned, and labeled. This offline processing mode cannot adapt to the characteristics of continuous generation of sensor signals, and data preprocessing is costly, time-consuming, and labor-intensive.

[0004] Furthermore, baseline drift, a common phenomenon in gas sensors, is a key issue affecting their long-term stability. Over time, the sensor's baseline output changes, leading to a significant deterioration in the performance of models trained on initial data. The traditional solution is periodic recalibration, which typically requires interrupting system operation and using a standard gas—a cumbersome and costly process.

[0005] Therefore, there is an urgent need for a mixed gas identification scheme that can automate the entire process from signal acquisition and feature extraction to concentration prediction, and has online self-calibration capabilities to cope with baseline drift and ensure long-term prediction accuracy. Summary of the Invention

[0006] This invention acquires the resistance signal of a gas sensor array in real time and calculates the first derivative of the response curve; based on the first derivative, it automatically determines the gas response stage and extracts the responsivity when the response is stable; the features are input into a pre-trained gas concentration prediction model, and the concentration prediction results of each component are output; based on the prediction error of new data, the model is dynamically calibrated or retrained to achieve adaptive updates. This invention effectively addresses sensor baseline drift and gas cross-interference through real-time processing and intelligent calibration training mechanisms. While significantly reducing training costs, it achieves high-precision ppm-level prediction of various volatile organic compounds under complex concentration combinations, ensuring the long-term stability and reliability of the system. This solves the technical problems of poor long-term stability and difficult calibration of gas concentration prediction models in existing technologies.

[0007] According to a first aspect of the present invention, a method for constructing a real-time gas concentration prediction model based on the slope determination of the response curve is provided, comprising the following steps: (1) Use a gas sensor array to detect the target gas sample, acquire the original resistance signal of the sensor array in real time, and calculate the first derivative of the response curve corresponding to the original resistance signal; (2) Response determination based on the first derivative: When the first derivative changes from the baseline fluctuation state to a significant positive or negative sign direction, that is, when the first derivative is greater than 0.05 kΩ / s for 5 consecutive seconds, it is determined that the response has started and signal tracking is performed; when the first derivative is less than 0.01 kΩ / s for 5 consecutive seconds, it is determined that the response is stable, the responsivity is calculated and extracted as a feature; (3) Based on the response features obtained in step (2) as input and the corresponding gas concentration as output, the gas concentration prediction model is trained or calibrated in real time: As the target gas sample is continuously detected and features are extracted, when the number of extracted response features reaches the preset number, the average absolute error of the gas concentration predicted by the model is calculated; if the average absolute error is less than the threshold, the accumulated response features are used to calibrate the model parameters, and the trained gas concentration prediction model is obtained; if the average absolute error is greater than or equal to the threshold, the accumulated response features are added to the training set and the model is retrained until the average absolute error is less than the threshold, and the trained gas concentration prediction model is obtained.

[0008] Preferably, in step (3), before real-time training or calibration of the gas concentration prediction model, a model pre-training step is further included, specifically: S1: Use all the response features extracted in step (2) as the gas dataset for model pre-training, and use the Gaussian process regression algorithm to perform data interpolation and augmentation to generate an augmented dataset; S2: Use the expanded training set to pre-train the gas concentration prediction model.

[0009] Preferably, before pre-training in step S2, the learning rate, regularization coefficient, and auxiliary loss weights of the gas concentration prediction model are optimized using a particle swarm optimization algorithm.

[0010] Preferably, the gas concentration prediction model is a CA-DSN model constructed based on a shrinking autoencoder and a deep supervision network; The shrinking autoencoder is used to reduce the dimensionality of the input features and extract robust features. Its loss function includes the Frobenius norm of the Jacobian matrix mapped by the encoder as a regularization term. The deep supervisory network introduces at least one auxiliary supervisory branch in the intermediate layer of the encoder, and the auxiliary supervisory branch participates in loss calculation together with the main output layer.

[0011] Preferably, the loss function of the shrinking autoencoder J CAE ( θ ) is defined as:

[0012] in, For input data x With reconstruction data Reconstruction error between For encoder f The squared Frobenius norm of the Jacobian matrix, λ This is the regularization coefficient.

[0013] Preferably, the total loss function of the deep supervision network L total Defined as: L total = L 0+ α 1 L S1 + α 2 L S2 in, L 0 is the loss of the main output layer. L S1 and L S2 The losses for different intermediate auxiliary supervision branches are respectively. α 1 and α 2 represents the corresponding weighting coefficient.

[0014] According to another aspect of the present invention, a real-time gas concentration prediction model obtained by the aforementioned construction method is provided.

[0015] According to another aspect of the present invention, a method for predicting gas concentration using the real-time gas concentration prediction model is provided, wherein the response characteristics extracted from the gas to be tested are input into the trained gas concentration prediction model, the gas to be tested being of the same type as the target gas, and the gas concentration prediction results of each component in the gas to be tested are obtained. Preferably, the gas to be tested is a single gas or a mixture of gases.

[0016] According to another aspect of the present invention, an electronic device is provided, including at least one memory and at least one processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the method described thereon.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program that, when executed by a processor, implements the method.

[0018] In summary, compared with the prior art, the above-described technical solutions conceived by this invention mainly possess the following technical advantages: (1) The invention achieves real-time and automation of the entire process: by automatically determining the gas response stage through the first derivative of the response curve, the unattended automated operation of the entire process from signal acquisition and feature extraction to concentration prediction is realized, which significantly improves the practicality and ease of use of the system.

[0019] (2) The invention has a high efficiency in resisting baseline drift: the innovative real-time calibration training mechanism can make intelligent decisions to fine-tune or retrain the model based on the prediction error of new data, and continuously adapt to the performance changes of the sensor with extremely low computational cost (experiments show that it can save more than 50% of the training cost), effectively resisting baseline drift and ensuring the long-term stability and reliability of the system.

[0020] (3) Excellent prediction accuracy of the present invention: The CA-DSN model, which combines the robust feature extraction capability of CAE with the stable training advantage of DSN, can still achieve high-precision prediction at the ppm level even for VOCs gases such as ethanol, ammonia, and toluene with similar response trends, in complex environments with up to 120 concentration combinations, with an average absolute error of up to 1.3 ppm.

[0021] (4) The invention has low data dependence and high training efficiency: Through GPR data expansion and efficient model structure, the model only needs a small amount of initial data to complete the training, which greatly reduces the data collection cost and speeds up the model deployment.

[0022] (5) The gas concentration prediction method of the present invention is particularly suitable for online monitoring scenarios that require rapid and accurate quantitative identification of multiple mixed gases and long-term stable operation.

[0023] (6) The present invention realizes real-time and automated processing of the entire process from raw signal to concentration prediction, reducing the dependence on manual intervention and offline data processing.

[0024] (7) The present invention designs an efficient model update mechanism to deal with the baseline drift of the sensor with extremely low training cost, and ensure the accuracy and reliability of the model in long-term use. Attached Figure Description

[0025] Figure 1 This is an overall flowchart of the real-time mixed gas concentration prediction method provided in the embodiments of the present invention.

[0026] Figure 2 This is a schematic diagram of the structure of the CA-DSN model in an embodiment of the present invention.

[0027] Figure 3 This is a flowchart of the particle swarm optimization algorithm used in this embodiment of the invention.

[0028] Figure 4 This is a performance comparison chart of the fully trained model and different prediction models in an embodiment of the present invention.

[0029] Figure 5 This is a schematic diagram comparing the performance of model calibration training and complete retraining in an embodiment of the present invention. Detailed Implementation

[0030] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0031] The present invention provides a real-time mixed gas concentration prediction system, comprising: The signal acquisition and processing module is used to acquire the raw resistance signal of the gas sensor array in real time, calculate the first derivative of the response curve, and determine the response. The feature extraction module is used to extract responsivity features when the response is stable. The concentration prediction module has a built-in gas concentration prediction model, which is used to output gas concentration prediction results based on the responsivity characteristics. The model calibration module is used to decide and perform calibration or retraining of the gas concentration prediction model based on the prediction error of new data.

[0032] The hardware platform of this invention includes: Gas supply: It consists of standard gas cylinders containing ethanol (C2H5OH), ammonia (NH3), toluene (C7H8) and clean air, and the gas is precisely proportioned and delivered through a mass flow controller (MFC).

[0033] Sensor array: Includes 6 metal oxide semiconductor gas sensors, namely MP702, TGS2602, TGS2603, and TGS2600, used to collect gas response signals.

[0034] Data acquisition and processing: Sensor signals are converted into digital signals by a data acquisition card and transmitted to a PC for processing.

[0035] Through constrained random sampling, 125 sets of ternary gas mixture samples with different concentrations were generated. 120 sets were used to build the dataset, and the remaining 5 sets were used to test the real-time processing performance of the system.

[0036] refer to Figure 1 The real-time processing flow of this invention is as follows: Step 1: Signal Monitoring and Differential Calculation. The system continuously monitors the sensor data files and calculates the first derivative of the response curve in real time. .

[0037] Step 1: Response determination based on the first derivative: When the first derivative changes from the baseline fluctuation state to a significant positive or negative sign change, that is, when the first derivative is greater than 0.05 for 5 consecutive seconds, it is determined that the response has started and signal tracking is performed; when the first derivative is less than 0.01 for 5 consecutive seconds, it is determined that the response is stable, the responsivity is calculated and extracted as a feature.

[0038] Step 3: Calibration Decision. After accumulating 10 sets of new data, calculate the mean absolute error (MAE). If MAE < 2.5 ppm, proceed to Step 5 (Model Calibration); otherwise, proceed to Step 6 (Model Retraining).

[0039] Step 4: Concentration Prediction. The extracted response amplitude features are input into the loaded CA-DSN model, which is a CA-DSN model built based on a Contractive Autoencoder (CAE) and a Deeply Supervised Network (DSN), to instantly output the predicted concentration values ​​of the three gases.

[0040] Step 5: Model calibration. Use the new data to fine-tune the model's parameters with small adjustments, quickly adapting to new changes.

[0041] Step 6: Model Retraining. Add new data to the training set. When the amount of untrained data reaches 30 sets, trigger model retraining to better adapt to changes in device performance.

[0042] Before model deployment, a pre-training phase is included: based on the initial small-scale gas dataset, Gaussian Process Regression (GPR) algorithm is used for data interpolation augmentation to generate a more diverse augmented training set; this augmented training set is then used to pre-train the CA-DSN model. During training, Particle Swarm Optimization (PSO) algorithm can be used to optimize the model's key hyperparameters.

[0043] The core models and algorithms used are as follows: Gaussian Process Regression (GPR) Data Augmentation: To address the issue of insufficient sample size, GPR is used to interpolate and augment the initial dataset before pre-training. Its core principle is to utilize the probabilistic model of Gaussian processes to generate statistically reasonable new samples among known data points, effectively expanding the training set size and preventing overfitting.

[0044] CA-DSN model: Model structure as follows Figure 2 As shown.

[0045] Shrinking autoencoders (CAEs): These are encoders used to reduce the dimensionality and denoise the response features of the input. They add the Frobenius norm of the Jacobian matrix mapped by the encoder as a regularization term to the standard autoencoder loss, forcing the model to learn shrinking features that are insensitive to small changes in the input, thereby improving robustness.

[0046] Deep Supervised Network (DSN): Auxiliary supervisory branches (Supervision 1, Supervision 2) are introduced into the intermediate layers of the CAE, and they jointly calculate the loss with the final output layer. The total loss function is... L total = L 0+ α 1 L S1 + α 2 L S2 This approach helps with gradient backpropagation, alleviates gradient vanishing, and allows intermediate layers to learn more discriminative features.

[0047] Particle Swarm Optimization (PSO): During the model pre-training phase, the PSO algorithm is used (see flowchart). Figure 3 The key hyperparameters of the CA-DSN model were optimized, including the learning rate and CAE regularization coefficient. λ and the auxiliary loss weights of DSN α 1. α2. Other parameters. PSO improves the final performance of the model by simulating swarm intelligence and efficiently searching for the optimal solution in the hyperparameter space.

[0048] The method described in this invention (CA-DSN) is compared with models such as LTSTMSN and CSN. For example... Figure 4 As shown, the CA-DSN model achieved the best performance on the test set, with MAEs of 1.28 ppm, 1.35 ppm, and 1.27 ppm for ethanol, ammonia, and toluene, respectively, and an overall MAE of 1.3 ppm.

[0049] Figure 5 The effectiveness of the calibration training strategy is demonstrated. In 12 consecutive training decisions, accuracy could be maintained in 7 cases with only low-cost calibration, while only 5 cases required full retraining. Statistics show that in this embodiment, the calibration strategy can achieve approximately 96% of the model performance with approximately 50% of the training cost of full retraining. Furthermore, it can further reduce training costs when dealing with larger datasets, significantly improving the long-term efficiency of the system.

[0050] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for constructing a real-time gas concentration prediction model based on response curve slope determination, characterized in that, Includes the following steps: (1) Use a gas sensor array to detect the target gas sample, acquire the original resistance signal of the sensor array in real time, and calculate the first derivative of the response curve corresponding to the original resistance signal; (2) Response determination based on the first derivative: When the first derivative changes from the baseline fluctuation state to a significant positive or negative sign direction, that is, when the first derivative is greater than 0.05 kΩ / s for 5 consecutive seconds, it is determined that the response has started and signal tracking is performed; when the first derivative is less than 0.01 kΩ / s for 5 consecutive seconds, it is determined that the response is stable, the responsivity is calculated and extracted as a feature; (3) Based on the features obtained in step (2) as input and the corresponding gas concentration as output, the gas concentration prediction model is trained or calibrated in real time: As the target gas sample is continuously detected and features are extracted, when the number of extracted response features reaches the preset number, the average absolute error of the gas concentration predicted by the model is calculated; if the average absolute error is less than the threshold, the accumulated response features are used to calibrate the model parameters, and the trained gas concentration prediction model is obtained; if the average absolute error is greater than or equal to the threshold, the accumulated response features are added to the training set and the model is retrained until the average absolute error is less than the threshold, and the trained gas concentration prediction model is obtained.

2. The method for constructing a real-time gas concentration prediction model based on response curve slope determination as described in claim 1, characterized in that, In step (3), before real-time training or calibration of the gas concentration prediction model, a model pre-training step is also included, specifically: S1: Use all the response features extracted in step (2) as the gas dataset for model pre-training, and use the Gaussian process regression algorithm to perform data interpolation and augmentation to generate an augmented dataset; S2: Use the expanded training set to pre-train the gas concentration prediction model.

3. The method for constructing a real-time gas concentration prediction model based on response curve slope determination as described in claim 2, characterized in that, Before pre-training in step S2, the learning rate, regularization coefficient, and auxiliary loss weights of the gas concentration prediction model are optimized using a particle swarm optimization algorithm.

4. The method for constructing a real-time gas concentration prediction model based on response curve slope determination as described in any one of claims 1-3, characterized in that, The gas concentration prediction model is a CA-DSN model constructed based on a shrinking autoencoder and a deep supervision network; The shrinking autoencoder is used to reduce the dimensionality of the input features and extract robust features. Its loss function includes the Frobenius norm of the Jacobian matrix mapped by the encoder as a regularization term. The deep supervisory network introduces at least one auxiliary supervisory branch in the intermediate layer of the encoder, and the auxiliary supervisory branch participates in loss calculation together with the main output layer.

5. The method for constructing a real-time gas concentration prediction model based on response curve slope determination as described in claim 4, characterized in that, The loss function of the shrinking autoencoder J CAE ( θ ) is defined as: in, For input data x With reconstruction data Reconstruction error between For encoder f The squared Frobenius norm of the Jacobian matrix, λ This is the regularization coefficient.

6. The method for constructing a real-time gas concentration prediction model based on response curve slope determination as described in claim 4, characterized in that, The total loss function of the deep supervision network L total Defined as: L total = L 0+ α 1 L S1 + α 2 L S2 in, L 0 is the loss of the main output layer. L S1 and L S2 The losses for different intermediate auxiliary supervision branches are respectively. α 1 and α 2 represents the corresponding weighting coefficient.

7. The real-time gas concentration prediction model obtained by the construction method according to any one of claims 1-6.

8. A method for predicting gas concentration using the real-time gas concentration prediction model according to claim 7, characterized in that, The response features extracted from the gas to be tested are input into the trained gas concentration prediction model. The gas to be tested is of the same type as the target gas, and the gas concentration prediction results of each component in the gas to be tested are obtained. Preferably, the gas to be tested is a single gas or a mixture of gases.

9. An electronic device, characterized in that, It includes at least one memory and at least one processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the method as described in any one of claims 1-6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1-6.