Gas sensor temperature and humidity dynamic compensation method based on multi-parameter fusion

By establishing a nonlinear model based on Arrhenius dynamics and the temperature and humidity coupling effect, and combining adaptive dynamic fusion weights and Kalman filtering, the detection accuracy and reliability problems of catalytic combustion gas sensors in complex environments were solved, and high-precision gas concentration compensation was achieved.

CN121898535AInactive Publication Date: 2026-04-21BEIJING INST OF METROLOGY & TESTING SCI
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING INST OF METROLOGY & TESTING SCI
Filing Date
2026-02-04
Publication Date
2026-04-21
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The detection accuracy and reliability of catalytic combustion gas sensors are affected by ambient temperature, humidity and atmospheric pressure under complex environmental conditions. Existing compensation methods cannot adapt to the decay of catalyst activity and dynamic changes in the environment, resulting in a decrease in detection accuracy.

Method used

A temperature drift model based on Arrhenius dynamics and a nonlinear humidity compensation model incorporating temperature and humidity coupling effects are adopted, combined with adaptive dynamic fusion weights and Kalman filtering technology, to achieve high-precision real-time compensation of gas concentration.

Benefits of technology

It improves the detection accuracy and stability of the sensor within a wide range of temperature, humidity, and air pressure, supports online coefficient updates, and has the ability to self-calibrate for long-term operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121898535A_ABST
    Figure CN121898535A_ABST
Patent Text Reader

Abstract

The invention discloses a gas sensor temperature and humidity dynamic compensation method based on multi-parameter fusion, and the method comprises the steps: building an environment state vector through the real-time synchronous collection of a differential resistance signal, environment temperature, humidity and air pressure of a detection element and a compensation element; establishing a temperature drift reference model, and calculating a comprehensive temperature compensation factor in combination with the activity attenuation characteristics of the catalyst; establishing a nonlinear humidity compensation model containing a temperature and humidity coupling effect and air pressure correction based on a competitive adsorption mechanism of water vapor molecules to catalyst active sites; self-adaptively calculating a dynamic fusion weight according to the environmental parameter change rate; and finally, performing state estimation and noise suppression through Kalman filtering, and outputting a compensated gas concentration value. According to the invention, the problem of temperature and humidity interference is effectively solved, and the measurement precision and stability of the sensor in a complex environment are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of gas sensor signal processing technology, specifically relating to a dynamic compensation method for temperature and humidity of gas sensors based on multi-parameter fusion. Background Technology

[0002] Catalytic combustion gas sensors are widely used in industrial production, mine safety, and household gas leak detection due to their advantages such as high sensitivity, fast response speed, and good selectivity. These sensors reflect gas concentration through the differential resistance signal between the detection element and the compensation element. However, their working principle determines that the sensor output signal is not only related to the target gas concentration, but is also significantly affected by factors such as ambient temperature, humidity, and atmospheric pressure. In practical applications, changes in environmental conditions can cause temperature drift and humidity cross-sensitivity in the sensor, which seriously affects the detection accuracy and reliability.

[0003] Existing temperature and humidity compensation methods mainly fall into two categories: hardware compensation and software compensation. Hardware compensation typically employs compensation elements or constant temperature control circuits, but it suffers from drawbacks such as high cost, high power consumption, and complex structure. Software compensation methods often use simple linear or polynomial models, considering only the single influence of temperature or humidity, neglecting the coupling effect between temperature and humidity, as well as the influence of atmospheric pressure on water vapor partial pressure. Furthermore, traditional compensation methods usually use fixed compensation coefficients, which cannot adapt to the activity decay of catalysts during long-term operation and the dynamic changes in environmental conditions, resulting in a decrease in compensation effect over time.

[0004] Therefore, there is an urgent need to develop a dynamic compensation method that can comprehensively consider the influence of multiple parameters such as temperature and humidity, and can adaptively adjust the compensation strategy according to environmental changes, so as to improve the detection accuracy and long-term stability of catalytic combustion gas sensors under complex environmental conditions. Summary of the Invention

[0005] The purpose of this invention is to address the problem of decreased detection accuracy of catalytic combustion gas sensors due to temperature and humidity in existing technologies. This invention provides a dynamic temperature and humidity compensation method for gas sensors based on multi-parameter fusion. By establishing a temperature drift model based on Arrhenius dynamics and a nonlinear humidity compensation model that includes temperature and humidity coupling effects, and by employing adaptive dynamic fusion weights and Kalman filtering technology, high-precision real-time compensation of gas concentration can be achieved.

[0006] To achieve the above-mentioned objectives, the specific technical solution is as follows: A dynamic compensation method for temperature and humidity of a gas sensor based on multi-parameter fusion, used for output correction of a catalytic combustion gas sensor, comprising the following steps: Step S1: Real-time synchronous acquisition of differential resistance signals of the detection element and compensation element of the catalytic combustion gas sensor, ambient temperature, ambient humidity and atmospheric pressure, and construction of an environmental state vector based on a timestamp alignment mechanism.

[0007] Step S2: Establish a temperature drift benchmark model based on the Arrhenius kinetics of the catalytic combustion reaction, and calculate the comprehensive temperature compensation factor by combining the catalyst activity decay characteristics.

[0008] Step S3: Based on the competitive adsorption mechanism of water vapor molecules on the active sites of the catalyst, a nonlinear humidity compensation model including temperature and humidity coupling effect and pressure correction is established.

[0009] Step S4: Based on the instantaneous change rate of environmental parameters, adaptively calculate the dynamic fusion weight of each compensation channel.

[0010] Step S5: Based on the dynamic weight fusion of each compensation factor, state estimation and noise suppression are performed by combining Kalman filtering, and the compensated gas concentration value is output.

[0011] Furthermore, using a hardware clock as the global time base, the resistance of the sensing element is... Compensation element resistance Ambient temperature Ambient humidity and atmospheric pressure Perform synchronous sampling.

[0012] Set synchronization tolerance window ms, interpolation resampling is used for asynchronous data; differential resistance signal is calculated. And build Environment state vector at time step : , .

[0013] Furthermore, the calculation method for the comprehensive temperature compensation factor includes: establishing a temperature drift baseline model based on the Arrhenius equation, and calculating the basic temperature compensation factor. ;in, The apparent activation energy of the catalyst, The gas constant is This is a reference temperature.

[0014] Establish the catalyst activity attenuation factor: ;in, The coefficient of thermal aging. The cumulative working time of the sensor, For catalyst characteristic lifetime, The toxicity coefficient, For high concentration exposure times; Comprehensive temperature compensation factor for: .

[0015] Furthermore, the calculation methods for the humidity compensation factor include: Establish a nonlinear humidity compensation model that incorporates the temperature and humidity coupling effect: ;in, The first-order humidity sensitivity coefficient, It is a second-order humidity sensitivity coefficient. The temperature and humidity coupling coefficient is... This is for reference humidity.

[0016] Introducing air pressure correction yields a humidity compensation factor with air pressure correction. : ;in, Standard atmospheric pressure This is the barometric pressure sensitivity index.

[0017] Furthermore, the temperature and humidity coupling coefficient The method for obtaining the data is as follows: collect response data under multiple conditions of alternating temperature and humidity, and construct a multiple regression model. ;in, The change in sensor response For constant terms, For temperature coefficient, Humidity coefficient Here, ΔT represents the temperature-humidity cross-term coefficient, ΔH represents the temperature change, and ΔH represents the humidity change. This is the random error term.

[0018] The coefficient vector is solved using ridge regression: Where η is the regularization parameter; take As a temperature and humidity coupling coefficient.

[0019] Furthermore, the calculation methods for dynamic fusion weights include: The standard deviation of the rate of change of parameters in each channel was calculated using the sliding window method. : ;in, For window length, For the first Channel 1 Time parameter value, This represents the mean value within the window.

[0020] Calculate dynamic weights based on soft maximization: ;in, For the first Channel sensitivity parameters, This represents the total number of channels.

[0021] Furthermore, the specific method for filtering compensation output includes: calculating the initial compensation concentration based on the dynamic weighted fusion compensation factor. ;in, The original concentration is determined by the differential resistance signal. Obtained through calibration curve conversion; , These are the dynamic weights for the temperature compensation channel and the humidity compensation channel, respectively; the final concentration is output using a Kalman filter. ;in, For the first The Kalman filter correction term at time t.

[0022] Furthermore, the first Kalman filter correction term at time 1 The calculation steps are as follows: State prediction: Covariance prediction: Kalman gain: Correction item: ;in, Here is the state transition matrix. For process noise covariance, To measure the noise covariance, To calibrate the measured values.

[0023] Furthermore, set the ambient temperature. and ambient humidity The effective range is determined; when a parameter exceeds the limit, the output is locked to the most recent valid value and an alarm is triggered; when the parameter change rate exceeds the threshold, it is determined to be a rapidly changing operating condition, and the sampling frequency is automatically increased and the process noise covariance is increased. Periodically calibrate using standard gas, and update the compensation coefficients online using the recursive least squares method: ,in, For the first The compensation coefficient vector at time step, Here is the gain matrix. For the regression vector, To calibrate the measured values.

[0024] Furthermore, the operating environment range of the method is: temperature Temperature range: 40℃ to +85℃, humidity range: 0%RH to 100%RH, air pressure range: 80kPa to 110kPa; detectable target gases include: methane, propane, hydrogen, carbon monoxide and their mixtures.

[0025] Compared with the prior art, the beneficial effects of this invention are: This invention integrates multiple parameters such as temperature, humidity, and air pressure to establish a temperature drift model based on Arrhenius dynamics and a nonlinear humidity compensation model incorporating temperature-humidity coupling effects. This effectively solves the problem that traditional single-parameter compensation methods cannot cope with complex environmental changes. An adaptive dynamic fusion weighting mechanism is employed to automatically adjust the weight allocation of each compensation channel according to the instantaneous rate of change of environmental parameters, achieving rapid response to rapidly changing operating conditions. Combined with Kalman filtering for state estimation and noise suppression, measurement noise is effectively filtered out, improving the stability of the output signal. Online coefficient updates are supported, and the device possesses long-term self-calibration capabilities, ensuring high-precision detection performance of the sensor across a wide range of temperature, humidity, and air pressure. Attached Figure Description

[0026] Figure 1 This is a flowchart of a dynamic temperature and humidity compensation method for a gas sensor based on multi-parameter fusion according to the present invention. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention are described clearly and completely below. Obviously, the described embodiments are only a part of the embodiments of this invention, not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0028] Example like Figure 1 As shown, this invention provides a dynamic temperature and humidity compensation method for gas sensors based on multi-parameter fusion, used for output correction of catalytic combustion gas sensors, comprising the following steps: Step S1: Real-time synchronous acquisition of differential resistance signals of the detection element and compensation element of the catalytic combustion gas sensor, ambient temperature, ambient humidity and atmospheric pressure, and construction of an environmental state vector based on a timestamp alignment mechanism.

[0029] The operating environment range of the method is: temperature Temperature range: 40℃ to +85℃, humidity range: 0%RH to 100%RH, air pressure range: 80kPa to 110kPa; detectable target gases include: methane, propane, hydrogen, carbon monoxide and their mixtures.

[0030] Using the hardware clock as the global time base, the resistance of the sensing element is... Compensation element resistance Ambient temperature Ambient humidity and atmospheric pressure Perform synchronous sampling.

[0031] Set synchronization tolerance window ms, interpolation resampling is used for asynchronous data; differential resistance signal is calculated. And build Environment state vector at time step : , .

[0032] Step S2: Establish a temperature drift benchmark model based on the Arrhenius kinetics of the catalytic combustion reaction, and calculate the comprehensive temperature compensation factor by combining the catalyst activity decay characteristics.

[0033] The calculation method for the comprehensive temperature compensation factor includes: establishing a temperature drift baseline model based on the Arrhenius equation, and calculating the basic temperature compensation factor. ;in, The apparent activation energy of the catalyst, The gas constant is This is a reference temperature.

[0034] Establish the catalyst activity attenuation factor: ;in, The coefficient of thermal aging. The cumulative working time of the sensor, For catalyst characteristic lifetime, The toxicity coefficient, For high concentration exposure times; Comprehensive temperature compensation factor for: .

[0035] Step S3: Based on the competitive adsorption mechanism of water vapor molecules on the active sites of the catalyst, a nonlinear humidity compensation model including temperature and humidity coupling effect and pressure correction is established.

[0036] Establish a nonlinear humidity compensation model that incorporates the temperature and humidity coupling effect: ;in, The first-order humidity sensitivity coefficient, It is a second-order humidity sensitivity coefficient. The temperature and humidity coupling coefficient is... This is for reference humidity.

[0037] Introducing air pressure correction yields a humidity compensation factor with air pressure correction. : ;in, Standard atmospheric pressure This is the barometric pressure sensitivity index.

[0038] The temperature and humidity coupling coefficient The method for obtaining the data is as follows: collect response data under multiple conditions of alternating temperature and humidity, and construct a multiple regression model. ;in, The change in sensor response For constant terms, For temperature coefficient, Humidity coefficient Here, ΔT represents the temperature-humidity cross-term coefficient, ΔH represents the temperature change, and ΔH represents the humidity change. This is the random error term.

[0039] The coefficient vector is solved using ridge regression: Where η is the regularization parameter; take As a temperature and humidity coupling coefficient.

[0040] To obtain the temperature and humidity coupling coefficient It is necessary to collect sensor response data under multiple temperature and humidity changing conditions, and solve the coefficient vector of the multivariate regression model through ridge regression. The following section uses a set of typical experimental data to explain in detail the complete calculation process of ridge regression.

[0041] Assuming a standard gas concentration of 1.0% CH4, and using a reference temperature... K (i.e., 25℃), reference humidity Using %RH as a baseline, the sensor response changes were collected under nine operating conditions with alternating temperature and humidity. The experimental data obtained are as follows: Group 1, ℃, %RH, mV; Group 2, ℃, %RH, mV; Group 3 ℃, %RH, mV; Group 4, ℃, %RH, mV; Group 5, ℃, %RH, mV; Group 6, ℃, %RH, mV; Group 7 ℃, %RH, mV; Group 8, ℃, %RH, mV; Group 9 ℃, %RH, mV.

[0042] According to the multiple regression model Construct a design matrix and observation vector .

[0043] Design Matrix Each row corresponds to a set of experimental data, the first column is the constant term 1, and the second column is... The third column is The fourth column contains the cross-items. .

[0044] For the above nine sets of data, design a matrix. It is a 9x4 matrix, and the observation vector is... It is a 9-dimensional column vector. Taking the first set of data as an example, this behavior... Taking the fifth set of data as an example, this behavior... Taking the 9th set of data as an example, this behavior... Observation vector .

[0045] The formula for solving ridge regression is: ,in For regularization parameters, The matrix is ​​a 4th order identity matrix, and the regularization parameter is... The selection of has a significant impact on the regression results. If the value is too small, it cannot effectively suppress multicollinearity. An excessively large regularization parameter will introduce too much bias; this embodiment uses generalized cross-validation (GCV) to select the optimal regularization parameter, and its criterion function is: ,in For the hat matrix, For the sample size, Represents the trace of a matrix. Candidate range Take 50 candidate values ​​at logarithmic intervals, calculate the GCV value for each, and select the one that minimizes the GCV value. As the optimal regularization parameter, the optimal regularization parameter was calculated for the above experimental data. .

[0046] Design Matrix Multiplying the transpose by itself yields a 4th-order symmetric matrix. Because the experimental design employed a balanced combination of temperature and humidity, It exhibits good diagonal dominance; specific calculations can yield... The diagonal elements are respectively , (here) (6 non-zero items in total) (here) ), (Only the intersection of the four sets of data at the four corners is) ), and because the experimental data are symmetrical about the origin, Most of the off-diagonal elements are zero or close to zero.

[0047] Will Multiply by the 4th order identity matrix Added later Above, that is, in Adding 0.01 to each diagonal element yields the regularization matrix. Because... much smaller The diagonal elements of the matrix are used for regularization. The main function of regularization is to ensure the numerical stability and invertibility of the matrix without significantly changing the regression results.

[0048] Since the regularized matrix is ​​a symmetric positive definite matrix, its inverse can be found using the Cholesky decomposition method. First, the matrix is ​​decomposed into lower triangular matrices. The product of its transpose, i.e. Then, the inverse matrix is ​​solved by substituting the previous and back generations.

[0049] Design Matrix transpose multiplied by the observation vector This yields a 4-dimensional column vector. Regarding the above data, The first component is The second component is Where negative temperature corresponds to positive response and positive temperature corresponds to negative response, the calculation yields... Similarly, calculate the third and fourth components.

[0050] Inverse matrix and Multiplication, that is To obtain the coefficient vector After the above matrix operations, the final coefficient vector is: , , , Its physical meaning is: constant term The value is close to zero, indicating that the sensor response changes very little under the reference operating conditions; temperature coefficient A negative value indicates that increased temperature leads to a decrease in sensor response; humidity coefficient A negative value indicates that increased humidity will also cause a decrease in sensor response; the temperature-humidity cross-term coefficient A negative value indicates a synergistic effect between temperature and humidity on the sensor response; that is, when both temperature and humidity deviate from the reference value simultaneously, their combined effect is greater than the sum of their individual effects. (Take...) As a temperature and humidity coupling coefficient, it is substituted into the humidity compensation model in step S3.

[0051] To verify the reliability of the ridge regression results, the goodness of fit was calculated. ,in These are the model's predicted values. This is the mean of the observed values. Calculated... This indicates that the regression model can explain 98.7% of the response variation, demonstrating a good fit. Furthermore, t-tests were performed on each coefficient, and the results showed... , , The p-values ​​were all less than 0.01, indicating statistical significance at a 99% confidence level.

[0052] Step S4: Based on the instantaneous change rate of environmental parameters, adaptively calculate the dynamic fusion weight of each compensation channel.

[0053] The calculation methods for dynamic fusion weights include: using the sliding window method to calculate the standard deviation of the rate of change of each channel parameter. : ;in, For window length, For the first Channel 1 Time parameter value, This represents the mean value within the window.

[0054] Calculate dynamic weights based on soft maximization: ;in, For the first Channel sensitivity parameters, This represents the total number of channels.

[0055] Step S5: Based on the dynamic weight fusion of each compensation factor, state estimation and noise suppression are performed by combining Kalman filtering, and the compensated gas concentration value is output.

[0056] The specific methods for filtering and compensating output include: calculating the initial compensation concentration based on the dynamic weighted fusion compensation factor. ;in, The original concentration is determined by the differential resistance signal. Obtained through calibration curve conversion; , These are the dynamic weights for the temperature compensation channel and the humidity compensation channel, respectively; the final concentration is output using a Kalman filter. ;in, For the first The Kalman filter correction term at time t.

[0057] No. Kalman filter correction term at time 1 The calculation steps are as follows: State prediction: Covariance prediction: Kalman gain: Correction item: ;in, Here is the state transition matrix. For process noise covariance, To measure the noise covariance, To calibrate the measured values.

[0058] Set ambient temperature and ambient humidity The effective range is determined; when a parameter exceeds the limit, the output is locked to the most recent valid value and an alarm is triggered; when the parameter change rate exceeds the threshold, it is determined to be a rapidly changing operating condition, and the sampling frequency is automatically increased and the process noise covariance is increased. Periodically calibrate using standard gas, and update the compensation coefficients online using the recursive least squares method: ,in, For the first The compensation coefficient vector at time step, Here is the gain matrix. For the regression vector, To calibrate the measured values.

[0059] The following is a specific calculation example illustrating the Kalman filter correction term. The calculation process and the calculation process of online updating compensation coefficients using the recursive least squares method are explained in detail.

[0060] Kalman filtering is used to correct the initial compensation concentration in order to suppress measurement noise and improve estimation accuracy. The following detailed numerical calculations at three consecutive time points illustrate the Kalman filter correction term. The complete recursive process.

[0061] In this embodiment, since the change in gas concentration between adjacent sampling times is small, the state transition matrix is ​​set to... (Scalar form) indicates that the one-step prediction of the system state is the estimate from the previous moment. The process noise covariance is set as... This reflects the uncertainty of the system model, and its order of magnitude is consistent with the concentration fluctuation of the sensor under stable conditions. The measurement noise covariance is set as... This reflects the random error in sensor measurements, and its value is obtained from the variance statistics of multiple measurements of the same concentration of standard gas during calibration experiments. Initial state estimation. %CH4 represents the initial estimated error covariance of the measurement value during the first calibration after the system is powered on. A larger value indicates higher uncertainty about the initial estimate.

[0062] No. The calculation process for the time step is as follows. Assuming that after steps S1 to S4, the initial compensation concentration is... %CH4. Meanwhile, the measurement value obtained through calibration reference is... %CH4.

[0063] State prediction steps: Based on the prediction equation %CH4.

[0064] Covariance prediction steps: Based on the covariance prediction equation .

[0065] Kalman gain calculation steps: Based on the gain equation The Kalman gain is close to 1, indicating that the system's confidence in the measured values ​​is much higher than its confidence in the predicted values. This is because of the initial estimated covariance. Larger, and measurement noise Relatively small.

[0066] Correction term calculation steps: %CH4.

[0067] Final concentration output: %CH4. Note that the final output here is based on the initial compensation concentration with a Kalman correction term added, so that the output value simultaneously incorporates the physical information of the compensation model and the statistically optimal estimate of the Kalman filter.

[0068] Status Update: %CH4. Covariance Update: .

[0069] No. The calculation process for the time point is as follows, assuming the initial compensation concentration... %CH4, calibration measurement value %CH4.

[0070] State prediction: %CH4. Covariance Prediction: Kalman gain: At this point, the Kalman gain is approximately 0.5, indicating that the system's confidence in the predicted and measured values ​​is approaching equilibrium. This is because the covariance is estimated after the first update. It has decreased significantly, compared to measurement noise. They are on the same order of magnitude. Correction: %CH4. Final concentration output: %CH4. Status Update: %CH4. Covariance Update: .

[0071] No. The calculation process for the time point is as follows, assuming the initial compensation concentration... %CH4, calibration measurement value %CH4.

[0072] State prediction: %CH4. Covariance Prediction: Kalman gain: As the recursion progresses, the Kalman gain gradually decreases and stabilizes, indicating that the filter is converging and the system's confidence in the prediction model is gradually increasing. Correction term: %CH4. Final concentration output: %CH4. Status Update: %CH4. Covariance Update: .

[0073] The following pattern can be observed from the above three-step recursive process: Estimation error covariance... The Kalman filter rapidly converged from an initial value of 0.01 to 0.000376, a decrease of approximately 96.2%, indicating that the estimation accuracy of the Kalman filter increases rapidly with the number of recursion steps; Kalman gain The value gradually decreased from 0.9099 to 0.3758, reflecting the filter's transition from primarily relying on measured values ​​to a balanced fusion of predicted and measured values; the correction term... The magnitude gradually decreased from 0.00728 to 0.000884, indicating that as the filter converged, the correction amount for the initial compensation concentration tended to stabilize.

[0074] Once the system reaches steady state, the Kalman gain will converge to its steady-state value. This can be achieved by solving the Riccati algebraic equations. Obtained. For the scalar case in this embodiment, the steady-state covariance... Corresponding steady-state Kalman gain .

[0075] Furthermore, when the rate of change of environmental parameters exceeds the threshold and is determined to be a rapidly changing operating condition in step S5, the system automatically increases the process noise covariance. For example, to Increasing the Kalman gain from 0.0001 to 0.001 will increase the Kalman gain accordingly, making the filter more confident in the measured values ​​and more sensitive to environmental changes, thereby avoiding the hysteresis effect of the filter under rapidly changing operating conditions.

[0076] In actual long-term operation, the catalyst in a catalytic combustion gas sensor will gradually drift due to factors such as thermal aging and poisoning, causing the compensation coefficients obtained from the initial calibration to become inaccurate. To address this, the system is periodically calibrated using a standard gas and the compensation coefficients are updated online using the recursive least squares (RLS) method to maintain compensation accuracy.

[0077] set up For the first The compensation coefficient vector at time step, For the regression vector, To calibrate the measured values, the parameter update formula is as follows: The gain matrix The calculation formula is: The formula for updating the covariance matrix is: .in The forgetting factor has a value range of 1. This is used to control the weight decay rate of historical data. When At that time, all historical data have equal weight; when In this case, more recent data has a higher weight, enabling the algorithm to track parameter changes more quickly. This embodiment uses... It balances tracking speed and estimation stability.

[0078] The following uses coefficients from the humidity compensation model Taking online updates as an example, the recursive process is explained in detail. Compensation coefficient vector. Regression vector Calibration measurement value This represents the humidity compensation factor deviation measured during standard gas calibration.

[0079] Initialization phase: Based on the offline calibration results of ridge regression in step S3, set the initial compensation coefficients. Initial covariance matrix (A larger value indicates higher uncertainty in the estimation of the initial parameters, where...) (It is a 3rd order identity matrix).

[0080] No. The calculation process for this calibration update is as follows. Assume the environmental conditions during calibration are... K (i.e., 35℃) %RH, standard gas concentration is 1.0%CH4. The regression vector at this time... Calibration measurement values (This indicates the measured deviation of the humidity compensation factor under this operating condition).

[0081] First calculate .because Therefore ,and then .

[0082] Calculate the gain matrix .because much smaller Therefore .

[0083] Calculate the prior prediction error (News) .

[0084] Update compensation coefficient Calculated .

[0085] Update covariance matrix Calculations show that... diagonal elements are more The significant reduction reflects the improved accuracy of coefficient estimation.

[0086] No. The calculation process for this calibration update is as follows, assuming the environmental conditions during calibration are: K (i.e., 10℃) %RH, standard gas concentration is 1.0%CH4. Regression vector. Calibration measurement values .

[0087] calculate .because The value has been significantly reduced after the first update, and is much smaller than the corresponding value in the first step. The gain matrix is ​​then calculated. New information and the updated coefficients Covariance Matrix As calibration data gradually accumulates, the gain matrix... As the magnitude of the coefficients gradually decreases, the step size of the coefficient updates also gradually decreases, indicating that the coefficient estimates are gradually converging.

[0088] No. The calculation process for the next calibration update is similar, assuming the environmental conditions at the time of calibration are... K (i.e., 25℃) %RH, regression vector Calibration measurement value Calculate sequentially using the same steps as described above. , , and After three calibration updates, the compensation coefficients have been significantly adjusted from their initial values ​​to their true values ​​that are adapted to the current sensor conditions.

[0089] It should be noted that the forgetting factor The selection of has a crucial impact on the performance of the recursive least squares method. The smaller the value, the faster the algorithm responds to new data, but the larger the variance of the estimate, and the more susceptible it is to noise interference. The closer the value is to 1, the more stable the estimate, but the ability to track slow parameter drift decreases. In engineering practice, the appropriate value can be selected based on the timescale of sensor characteristic drift. Value: For slow drift caused by thermal aging (timescale from months to years), it is advisable to take [value]. For rapid drift (timescale from days to weeks) caused by poisoning, etc., it is advisable to take... This embodiment takes It is suitable for most industrial applications.

[0090] In addition, to prevent the covariance matrix During long-term operation, the covariance continuously decays to near-zero matrix, resulting in the loss of parameter tracking ability (the so-called covariance weathering problem). A lower bound on the covariance can be set. ,when Any diagonal element is less than When that happens, reset the diagonal element to In this embodiment, we take .

[0091] By combining the above-mentioned strategy of ridge regression offline calibration with recursive least squares online update, the compensation method of the present invention can maintain high-precision temperature and humidity compensation performance throughout the entire life cycle of the sensor, effectively addressing long-term drift problems caused by factors such as catalyst aging and changes in environmental conditions.

[0092] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., 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 dynamic temperature and humidity compensation method for a gas sensor based on multi-parameter fusion, used for output correction of a catalytic combustion gas sensor, characterized in that, The method includes the following steps: Step S1: Real-time synchronous acquisition of differential resistance signals of the detection element and compensation element of the catalytic combustion gas sensor, ambient temperature, ambient humidity and atmospheric pressure, and construction of an environmental state vector based on a timestamp alignment mechanism; Step S2: Establish a temperature drift benchmark model based on the Arrhenius kinetics of the catalytic combustion reaction, and calculate the comprehensive temperature compensation factor by combining the catalyst activity decay characteristics. Step S3: Based on the competitive adsorption mechanism of water vapor molecules on the active sites of the catalyst, a nonlinear humidity compensation model including temperature and humidity coupling effect and pressure correction is established. Step S4: Based on the instantaneous change rate of environmental parameters, adaptively calculate the dynamic fusion weight of each compensation channel. Step S5: Based on the dynamic weight fusion of each compensation factor, state estimation and noise suppression are performed by combining Kalman filtering, and the compensated gas concentration value is output.

2. The method according to claim 1, characterized in that, Using the hardware clock as the global time base, the resistance of the sensing element is... Compensation element resistor Ambient temperature Ambient humidity and atmospheric pressure Perform synchronous sampling; Set synchronization tolerance window ms, interpolation resampling is used for asynchronous data; differential resistance signal is calculated. And build Environment state vector at time step : , .

3. The method according to claim 2, characterized in that, The calculation method for the comprehensive temperature compensation factor includes: establishing a temperature drift baseline model based on the Arrhenius equation, and calculating the basic temperature compensation factor. ;in, The apparent activation energy of the catalyst, The gas constant is For reference temperature; Establish the catalyst activity attenuation factor: ;in, The coefficient of thermal aging. The cumulative working time of the sensor, For catalyst characteristic lifetime, The toxicity coefficient, For high concentration exposure times; Comprehensive temperature compensation factor for: .

4. The method according to claim 3, characterized in that, The methods for calculating the humidity compensation factor include: Establish a nonlinear humidity compensation model that incorporates the temperature and humidity coupling effect: ;in, The first-order humidity sensitivity coefficient, It is a second-order humidity sensitivity coefficient. The temperature and humidity coupling coefficient is... For reference humidity; Introducing air pressure correction yields a humidity compensation factor with air pressure correction. : ;in, Standard atmospheric pressure This is the barometric pressure sensitivity index.

5. The method according to claim 4, characterized in that, The temperature and humidity coupling coefficient The method for obtaining the data is as follows: collect response data under multiple conditions of alternating temperature and humidity, and construct a multiple regression model. ;in, The change in sensor response For constant terms, For temperature coefficient, Humidity coefficient Here, ΔT represents the temperature-humidity cross-term coefficient, ΔH represents the temperature change, and ΔH represents the humidity change. This is the random error term; The coefficient vector is solved using ridge regression: Where η is the regularization parameter; take As a temperature and humidity coupling coefficient.

6. The method according to claim 5, characterized in that, The methods for calculating dynamic fusion weights include: The standard deviation of the rate of change of parameters in each channel was calculated using the sliding window method. : ;in, For window length, For the first Channel 1 Time parameter value, The mean within the window; Calculate dynamic weights based on soft maximization: ;in, For the first Channel sensitivity parameters, This represents the total number of channels.

7. The method according to claim 6, characterized in that, The specific methods for filtering and compensating output include: calculating the initial compensation concentration based on the dynamic weighted fusion compensation factor. ;in, The original concentration is determined by the differential resistance signal. Obtained through calibration curve conversion; , These are the dynamic weights for the temperature compensation channel and the humidity compensation channel, respectively; the final concentration is output using a Kalman filter. ;in, For the first The Kalman filter correction term at time t.

8. The method according to claim 7, characterized in that, No. Kalman filter correction term at time 1 The calculation steps are as follows: State prediction: Covariance prediction: Kalman gain: Correction item: ;in, Here is the state transition matrix. For process noise covariance, To measure the noise covariance, To calibrate the measured values.

9. The method according to claim 8, characterized in that, Set ambient temperature and ambient humidity The effective range is determined; when a parameter exceeds the limit, the output is locked to the most recent valid value and an alarm is triggered; when the parameter change rate exceeds the threshold, it is determined to be a rapidly changing operating condition, and the sampling frequency is automatically increased and the process noise covariance is increased. Periodically calibrate using standard gas, and update the compensation coefficients online using the recursive least squares method: ,in, For the first The compensation coefficient vector at time step, Here is the gain matrix. For the regression vector, To calibrate the measured values.

10. The method according to any one of claims 1 to 9, characterized in that, The operating environment range of the method is: temperature Temperature range: 40℃ to +85℃, humidity range: 0%RH to 100%RH, air pressure range: 80kPa to 110kPa; detectable target gases include: methane, propane, hydrogen, carbon monoxide and their mixtures.