A method for drift compensation of periodic timing response data of a gas sensor
Patent Information
- Application Number
- CN202311356448.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-19
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2043-10-19
AI Technical Summary
随着温度调制周期数的增加,传感器漂移对周期性时序响应数据的干扰逐渐不可忽视,导致多个温度调制周期后的周期性时序响应数据严重失真,造成气体浓度识别精度下降
[0028] This invention provides a drift compensation method for periodic time-series response data of a gas sensor. Based on an additive model of time series, the periodic time-series response data of a MOS gas sensor with cyclic temperature modulation is decomposed into a periodic term, a trend term, and a noise term. The periodic term and noise term originate from the gas-sensing response of the MOS gas sensor itself, while the trend term is an interference component caused by sensor drift. Therefore, the periodic term and noise term are retained as components of the true data, while the trend term is eliminated as an interference component. By eliminating the trend term, the drift increment of the periodic time-series response data of the MOS gas sensor is effectively eliminated, significantly reducing the interference of sensor drift on the periodic time-series response data, which is beneficial to improving the gas concentration recognition accuracy based on cyclic temperature modulation of the MOS gas sensor.
Smart Images

Figure CN117421544B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of gas detection technology, specifically relating to a method for drift compensation of periodic time-series response data of a gas sensor. Background Technology
[0002] Metal oxide semiconductor (MOS) gas sensors are widely used for the detection of volatile organic compounds (VOCs) due to their advantages such as low cost, high sensitivity, and fast response. However, the cross-sensitivity and drift characteristics of MOS gas sensors severely interfere with the qualitative and quantitative identification accuracy of the sensors. To improve the cross-sensitivity characteristics of MOS gas sensors, a cyclic temperature modulation method has been proposed to enhance the distinguishability of response modes for different types and concentrations of VOCs. By applying periodically varying heating temperatures to the MOS gas sensor, the unique response mode of the sensor to the target VOC under that temperature mode can be obtained. The type and concentration information of VOCs can be determined by the changing trend and amplitude of the VOC response mode, respectively. Different types of VOCs have different changing trends in their response modes; while the response modes of the same type of VOCs but different concentrations have similar changing trends, but their amplitudes show an increasing trend with increasing concentration.
[0003] While cyclic temperature modulation effectively improves the selectivity of MOS gas sensors and significantly enhances their gas type identification accuracy, it fails to effectively overcome the interference of sensor drift on gas concentration identification accuracy. Factors leading to MOS gas sensor drift include sensor aging, sensor poisoning, temperature accumulation effects, and other environmental factors. Sensor drift primarily affects the amplitude of VOCs response modes, with a relatively small impact on the trend of response mode changes. Therefore, sensor drift mainly interferes with the gas concentration identification of MOS gas sensors, especially when the gas concentration gradient of the identification task is small.
[0004] With the advent of smart factories and the Internet of Things (IoT) era, data-driven intelligent VOCs identification models have enormous application potential, requiring higher accuracy in the response data of gas sensors. The response data of a MOS gas sensor based on cyclic temperature modulation is a periodic time-series data. The periodic time-series response data in the first cycle is least affected by sensor drift, with the drift increment approximately zero, and can be used as standard response data for constructing VOCs identification models. As the number of temperature modulation cycles increases, the interference of sensor drift on the periodic time-series response data becomes increasingly significant, leading to severe distortion of the periodic time-series response data after multiple temperature modulation cycles, resulting in a decrease in the accuracy of gas concentration identification. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a drift compensation method for periodic time-series response data of a gas sensor. First, based on an additive model of time series data, the periodic time-series response data of a MOS gas sensor is decomposed into a periodic term, a trend term, and a noise term. Then, by eliminating the trend term, the drift increment of the periodic time-series response data is eliminated, achieving drift compensation. The drift compensation method for periodic time-series response data of a gas sensor proposed in this invention can significantly reduce the interference of sensor drift on the periodic time-series response data, which is beneficial for improving the gas concentration recognition accuracy based on cyclic temperature modulation of a MOS gas sensor.
[0006] A method for drift compensation of periodic time-series response data of a gas sensor includes the following steps:
[0007] Step 1: Based on the measurement parameters of cyclic temperature modulation, obtain the variation period T of the periodic time response data Y(t) of the MOS gas sensor. t ;
[0008] Step 2: Based on the period of change T t The periodic time-series response data Y(t) is decomposed into three parts: periodic term S(t), trend term T(t), and noise term N(t).
[0009] Step 2.1: Use the periodic time response data of the first period as standard data to calculate the periodic term S(t), as shown in the following formula:
[0010] S(t)=Y(t-(n-1)T t ),t∈[(n-1)T t ,nT t )
[0011] Where n represents the nth period, n = 1, 2, 3, ...;
[0012] Step 2.2: Calculate the time series response data Y(t) after eliminating the periodic term based on the periodic term S(t) and the periodic time series response data Y(t). -S (t) and trend term T(t);
[0013] Step 2.2.1: Calculate the difference between the periodic time response data Y(t) and the periodic term S(t) to obtain the time response data Y after eliminating the periodic term. -S (t), the formula is as follows:
[0014] Y -S (t)=Y(t)-S(t)
[0015] Step 2.2.2: Process the time-series response data Y after eliminating the periodic term. -SPerform a linear fit on (t), and use the fitted linear function as the trend term T(t). The form of T(t) is as follows:
[0016] T(t) = at + b
[0017] Where a and b are pairs of Y -S (t) are the fitting parameters obtained after linear fitting;
[0018] Step 2.3: Time-series response data Y based on the elimination of periodic terms -S The noise term N(t) is calculated from the trend term T(t) and the trend term T(t);
[0019] Step 2.3.1: Calculate the time-series response data Y after eliminating the periodic term. -S Subtracting the trend term T(t) from the difference yields the time series response data Y after eliminating the periodic and trend terms. -S-T (t), the formula is as follows:
[0020] Y -S-T (t)=Y -S (t)-T(t)
[0021] Step 2.3.2: Process the time series response data Y after eliminating periodic and trend terms. -S-T (t) Perform a normality test; if Y -S-T If (t) follows a normal distribution with a mean of 0, then Y -S-T (t) is taken as the noise term N(t); otherwise, return to step 2.2.2 to adjust the fitting parameters to recalculate the trend term T(t), and execute step 2.3.1 again until Y -S-T (t) conforms to a normal distribution with a mean of 0;
[0022] Step 3: Eliminate the trend term T(t) of the periodic time response data Y(t) to obtain the drift-compensated periodic time response data Y'(t);
[0023] Step 3.1: Calculate the difference between the periodic time series response data Y(t) and the trend term T(t) to obtain the periodic time series response data Y after eliminating the trend term. -T (t), the formula is as follows:
[0024] Y -T (t)=Y(t)-T(t)
[0025] Step 3.2: Remove the periodic time-series response data Y with the trend term eliminated. -T Y'(t) is the periodic time response data after drift compensation, and the formula is as follows:
[0026] Y'(t)=Y -T (t)
[0027] Beneficial technical effects of the present invention:
[0028] This invention provides a drift compensation method for periodic time-series response data of a gas sensor. Based on an additive model of time series, the periodic time-series response data of a MOS gas sensor with cyclic temperature modulation is decomposed into a periodic term, a trend term, and a noise term. The periodic term and noise term originate from the gas-sensing response of the MOS gas sensor itself, while the trend term is an interference component caused by sensor drift. Therefore, the periodic term and noise term are retained as components of the true data, while the trend term is eliminated as an interference component. By eliminating the trend term, the drift increment of the periodic time-series response data of the MOS gas sensor is effectively eliminated, significantly reducing the interference of sensor drift on the periodic time-series response data, which is beneficial to improving the gas concentration recognition accuracy based on cyclic temperature modulation of the MOS gas sensor.
[0029] This invention can significantly reduce the interference of sensor drift on periodic time-series response data, which is beneficial to improving the gas concentration recognition accuracy based on cyclic temperature modulation of MOS gas sensors. This invention compensates for sensor drift from the perspective of data processing. Compared with existing drift compensation methods, this invention is simpler to implement, requires less computation, and is more suitable for processing periodic time-series response data of cyclic temperature modulation of MOS gas sensors. Attached Figure Description
[0030] Figure 1 This is a flowchart of the drift compensation method for the periodic time-series response data of the gas sensor in an example of the present invention.
[0031] Figure 2 Y(t) is the periodic time-series response data of a MOS gas sensor to 100ppm benzene vapor obtained based on cyclic temperature modulation in an example of this invention.
[0032] Figure 3 S(t) is the periodic term of the 100ppm benzene vapor periodic time-series response data in this invention example.
[0033] Figure 4 Y is the time-series response data of 100 ppm benzene vapor with periodic terms eliminated in this invention example. -S The calculation results of T(t) and the trend term T(t).
[0034] Figure 5 Y is the time-series response data of 100 ppm benzene vapor after eliminating periodic and trend terms in an example of this invention. -S-T The calculation result of (t).
[0035] Figure 6This is the calculation result of the periodic time response data Y'(t) of 100ppm benzene vapor after drift compensation in the example of this invention. Detailed Implementation
[0036] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples.
[0037] Example: Taking 100 ppm benzene vapor and the commercial MOS gas sensor TGS2603 as an example, the periodic time response data Y(t) of the sensor to 100 ppm benzene vapor is obtained based on cyclic temperature modulation; the drift compensation method proposed in this invention is used to compensate for the drift of the above-mentioned periodic time response data Y(t) of 100 ppm benzene vapor. The specific implementation scheme is as follows:
[0038] A method for drift compensation of periodic time-series response data of a gas sensor, such as Figure 1 As shown, it includes the following steps:
[0039] Step 1: Based on the measurement parameters of cyclic temperature modulation, obtain the variation period T of the periodic time response data of the MOS gas sensor. t ;
[0040] In this embodiment, the periodic time-series response data Y(t) of the MOS gas sensor to 100ppm benzene vapor is obtained based on cyclic temperature modulation, such as... Figure 2 As shown, the period T of the periodic time-series response data t The test duration is 40 seconds, and the test time is 400 seconds (the test goes through 10 change cycles in total);
[0041] Step 2: Based on the period of change T t The periodic time-series response data Y(t) is decomposed into three parts: periodic term S(t), trend term T(t), and noise term N(t).
[0042] Step 2.1: Firstly, use the periodic time response data of the first period as standard data to calculate the periodic term S(t), as shown in the following formula:
[0043] S(t)=Y(t-(n-1)T t ),t∈[(n-1)T t ,nT t )
[0044] Where n represents the nth period, n = 1, 2, 3, ...;
[0045] In this embodiment, the periodic time response data of 100 ppm benzene vapor in the first temperature modulation cycle is used as the standard data, and the calculated periodic term S(t) is as follows: Figure 3 As shown, the expression for S(t) is as follows:
[0046] S(t)=Y(t-40(n-1)),t∈[40(n-1) t ,40n), n=1,2,...,10
[0047] Step 2.2: Calculate the time series response data Y(t) after eliminating the periodic term based on the periodic term S(t) and the periodic time series response data Y(t). -S (t) and trend term T(t);
[0048] Step 2.2.1: Calculate the difference between the periodic time response data Y(t) and the periodic term S(t) to obtain the time response data Y after eliminating the periodic term. -S (t), the formula is as follows:
[0049] Y -S (t)=Y(t)-S(t)
[0050] In this embodiment, the 100ppm benzene vapor time-series response data Y with periodic terms eliminated -S The calculation results of (t) are as follows Figure 4 As shown, Y -S The expression for (t) is as follows:
[0051] Y -S (t)=Y(t)-S(t)
[0052] Step 2.2.2: Firstly, process the time-series response data Y after eliminating the periodic term. -S Perform a linear fit on (t), and use the fitted linear function as the trend term T(t). The form of T(t) is as follows:
[0053] T(t) = at + b
[0054] Where a and b are pairs of Y -S (t) are the fitting parameters obtained after linear fitting;
[0055] In this embodiment, Y -S The data fitting results for T(t) are shown in Table 1, and the calculation results for the trend term T(t) are shown in Table 1. Figure 4 As shown, the expression for T(t) is as follows:
[0056] T(t) = 0.1634t - 4.961
[0057] Table 1Y -S (t) is a data fit index;
[0058]
[0059] Step 2.3: Time-series response data Y based on the elimination of periodic terms -SThe noise term N(t) is calculated from the trend term T(t) and the trend term T(t);
[0060] Step 2.3.1: Calculate the time-series response data Y after eliminating the periodic term. -S Subtracting the trend term T(t) from the difference yields the time series response data Y after eliminating the periodic and trend terms. -S-T (t), the formula is as follows:
[0061] Y -S-T (t)=Y -S (t)-T(t)
[0062] In this embodiment, the 100ppm benzene vapor time-series response data Y, after eliminating periodic and trend terms, is used. -S-T The calculation results of (t) are as follows Figure 5 As shown, Y -S-T The expression for (t) is as follows:
[0063] Y -S-T (t)=Y -S (t)-T(t)
[0064] Step 2.3.2: Prioritize processing the time-series response data Y after eliminating periodic and trend terms. -S-T (t) Perform a normality test; if Y -S-T If (t) follows a normal distribution with a mean of 0, then Y -S-T (t) is taken as the noise term N(t); otherwise, return to step 2.2.2 to adjust the fitting parameters to recalculate the trend term T(t), and execute step 2.3.1 again until Y -S-T (t) conforms to a normal distribution with a mean of 0;
[0065] In this embodiment, Y -S-T The mean of (t) is 0.005 (approximately 0). The significance index based on the Shapiro-Wilk normality test is shown in Table 2. The test results support Y. -S-T Since Y(t) follows a normal distribution, the noise term N(t) is Y. -S-T (t);
[0066] Table 2Y -S-T (t) The significance index of the normality test;
[0067]
[0068] Step 3: Eliminate the trend term T(t) of the periodic time response data Y(t) to obtain the drift-compensated periodic time response data Y'(t);
[0069] Step 3.1: Calculate the difference between the periodic time series response data Y(t) and the trend term T(t) to obtain the periodic time series response data Y after eliminating the trend term. -T (t), the formula is as follows:
[0070] Y -T (t)=Y(t)-T(t)
[0071] Step 3.2: Remove the periodic time-series response data Y with the trend term eliminated. -T Y'(t) is the periodic time response data after drift compensation, and the formula is as follows:
[0072] Y'(t)=Y -T (t)
[0073] In this embodiment, the calculation result of the periodic time response data Y'(t) of 100ppm benzene vapor after drift compensation is as follows: Figure 6 As shown, the expression for Y'(t) is as follows:
[0074] Y'(t)=Y -T (t)=Y(t)-T(t)
[0075] In this embodiment, the comparison between the periodic time-series response data Y(t) of 100ppm benzene vapor and the drift-compensated periodic time-series response data Y'(t) of 100ppm benzene vapor is as follows: Figure 6 As shown; by Figure 6 It can be seen that the drift compensation method proposed in this invention can effectively eliminate the drift increment of the periodic time response data based on the cyclic temperature modulation of the MOS gas sensor.
Claims
1. A method for drift compensation of periodic time-series response data of a gas sensor, characterized in that, Includes the following steps: Step 1: Obtain periodic time response data of the MOS gas sensor based on the measurement parameters of cyclic temperature modulation. Y ( t ) cycle of change ; Step 2: Based on the cycle of change , periodic time-series response data Y ( t Decompose it; Step 3: Eliminate periodic time-series response data Y ( t Trend item T ( t To obtain periodic time-series response data after drift compensation Y’ ( t ); Step 2 specifically involves the periodic time-series response data. Y ( t Decompose into periodic terms S ( t Trend items T ( t ) and noise items N ( t Three parts; Step 2 is as follows: Step 2.1: Use the periodic time response data of the first period as standard data to calculate the periodic term. S ( t The formula is as follows: ; in, n Indicates the first n One cycle, n = 1, 2, 3, ...; Step 2.2: Based on periodic terms S ( t and periodic time-series response data Y ( t Calculate the timing response data for eliminating periodic terms. ( t ) and trend items T ( t ); Step 2.3: Time-series response data based on the elimination of periodic terms ( t ) and trend items T ( t ) Calculate the noise term N ( t ); Step 2.2 specifically involves: Step 2.2.1: Calculate the periodic time series response data Y ( t Subtract the periodic term S ( t The difference between the two values is used to obtain the time-series response data after eliminating the periodic term. ( t The formula is as follows: ; Step 2.2.2: Time-series response data for eliminating periodic terms ( t Perform linear fitting, and use the fitted linear function as the trend term. T ( t The linear fit is a univariate linear regression. T ( t The form is as follows: ; in, a and b Yes ( t The fitting parameters obtained after performing linear fitting; Step 2.3 specifically involves: Step 2.3.1: Calculate the timing response data for eliminating periodic terms. ( t Subtract the trend term T ( t The difference between the two terms is used to obtain the time series response data after eliminating the periodic and trend terms. ( t The formula is as follows: ; Step 2.3.2: Time series response data after eliminating periodic and trend terms. ( t Perform a normality test; if ( t If the distribution follows a normal distribution with a mean of 0, then... ( t ) as a noise item N ( t Otherwise, return to step 2.2.2 to adjust the fitting parameters to recalculate the trend term. T ( t Then, repeat step 2.3.1 until... ( t Until it conforms to a normal distribution with a mean of 0.
2. The drift compensation method for periodic time-series response data of a gas sensor according to claim 1, characterized in that, Step 3 specifically involves: Step 3.1: Calculate the periodic time series response data Y ( t Subtract the trend term T ( t The difference between the two values is used to obtain the periodic time-series response data after eliminating the trend term. ( t ); Step 3.2: Remove the periodic time-series response data of the trend term. ( t As drift-compensated periodic time response data Y’ ( t The formula is as follows: 。 3. The drift compensation method for periodic time-series response data of a gas sensor according to claim 2, characterized in that, The periodic time-series response data for eliminating the trend term ( t The formula is as follows: 。
Citation Information
Patent Citations
Time sequence analysis based optical transmission network trend prediction method
CN106059661A
Gas sensor baseline drift compensation method for VOC detection
CN111307881A
Traffic prediction method and device and storage medium
CN113037531A