A multi-environment factor coordinated compensation high-precision gas sensor compensation method

CN122385841BActive Publication Date: 2026-11-03SHENZHEN RUIDA TONGSHENG TECH DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610639049.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-05-11
Publication Date
2026-11-03
Estimated Expiration
2046-05-11

AI Technical Summary

Technical Problem

Existing gas sensors suffer from low measurement accuracy and easy accumulation and divergence of errors in complex dynamic environments due to the nonlinear cross-coupling of multiple environmental factors and the transient physical hysteresis effect caused by sudden environmental changes.

Method used

A hardware platform including a measurement sensor and a reference sensor was constructed. Steady-state response data was obtained using a multivariate cross-grid calibration method. A joint nonlinear response surface model of temperature and humidity and a first-order transient dynamic compensation model were established. Weighted fusion correction was performed through an adaptive weight allocation algorithm to eliminate steady-state cross-coupling and transient dynamic errors.

Benefits of technology

It improves the steady-state compensation accuracy of the sensor in complex temperature and humidity environments, reduces the dynamic signal deviation when the environment fluctuates drastically, and ensures the measurement stability of the system in a wide range and dynamic changing environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122385841B_ABST
    Figure CN122385841B_ABST
Patent Text Reader

Abstract

The present application relates to the field of environmental gas detection, and discloses a high-precision gas sensor compensation method with multiple environmental factor synergistic compensation, comprising the following steps: configuring a measurement sensor and a physically sealed reference sensor on hardware to form a differential sensing platform; using a multivariate cross-grid calibration method to construct a temperature and humidity double-variable joint response surface model to process steady-state cross-coupling effects; simultaneously, a first-order transient dynamic compensation model is established by combining a step excitation to extract the time variation gradient of environmental parameters. In the real-time measurement stage, the system calculates the steady-state joint compensation and the transient dynamic compensation in parallel, and performs weighted fusion correction through an adaptive weight distribution algorithm to calculate the final gas concentration value. The present application effectively overcomes the composite error caused by multiple factor nonlinear coupling and transient physical hysteresis in a complex dynamic environment, avoids error accumulation of traditional algorithms, and improves the full-range measurement accuracy and stability of the gas sensor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of environmental gas detection technology, specifically to a high-precision gas sensor compensation method for the coordinated compensation of multiple environmental factors. Background Technology

[0002] Gas sensors are widely used in industrial safety and environmental monitoring. In practical applications, the output signal of a gas sensor is not only related to the concentration of the gas being measured, but is also affected by external factors such as ambient temperature, humidity, and atmospheric pressure. To eliminate these interferences, existing technologies typically employ software compensation algorithms that combine single-variable decoupling calibration with sequential logic to deduct errors.

[0003] However, temperature and humidity in real-world environments are often nonlinearly coupled. For example, in high-temperature and high-humidity environments, the physical adsorption of moisture on the sensor surface alters its temperature sensitivity. Traditional single-variable calibration models cannot accurately represent this cross-coupling effect, leading to a significant decrease in sensor compensation accuracy under complex operating conditions. Furthermore, when ambient temperature or humidity changes drastically, the hysteresis effects of physical heat and mass transfer inside and outside the sensor cause dynamic deviations in the output signal. Existing static compensation models fail to incorporate a time-rate-of-change parameter, making them unable to handle such unsteady transitions. Moreover, existing hardware compensation networks are prone to entering nonlinear saturation regions under extreme environments, while conventional pure software algorithms, lacking a mechanism to perceive the underlying hardware's operating state, continue to calculate according to a fixed model, easily leading to the accumulation and divergence of final compensation errors. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a high-precision gas sensor compensation method with multi-environmental factor collaborative compensation. This method solves the problems of low measurement accuracy and easy accumulation and divergence of errors caused by the nonlinear cross-coupling of multiple environmental factors and the transient physical hysteresis effect caused by sudden environmental changes in complex dynamic environments.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a high-precision gas sensor compensation method for coordinated compensation of multiple environmental factors, comprising the following steps: Construct a hardware platform that includes a measurement sensor, a reference sensor for sensing changes in ambient temperature and isolated from the gas to be measured, and an environmental sensor. Steady-state response data were obtained using a multivariate cross-grid calibration method, and a joint nonlinear response surface model of temperature and humidity was constructed. Step excitation was applied to obtain unsteady-state dynamic data to establish a first-order transient dynamic compensation model. A pressure compensation model and a gas concentration nonlinear calibration model were also established. The system collects signals from various sensors in real time and calculates the gradient of environmental parameter changes. It calculates steady-state joint compensation and transient dynamic compensation in parallel, and performs weighted fusion correction through an adaptive weight allocation algorithm to eliminate the composite error introduced by steady-state cross-coupling and transient thermal hysteresis. Finally, it calculates and outputs the gas concentration value.

[0006] Preferably, the construction of the hardware platform specifically includes: Two gas sensors with identical characteristics are selected from the sensor array and used as the reference sensor and the measuring sensor, respectively. The reference sensor is physically sealed to completely isolate its sensing element from the external gas environment to be measured, and additional thermal resistance and thermal capacity are introduced through the sealing material. The reference sensor and the measuring sensor are placed adjacent to each other in the same thermal environment, so that the reference sensor becomes a temperature-affected reference element, and forms a response phase difference with the measuring sensor to characterize the physical heat transfer hysteresis effect in an unsteady environment.

[0007] Preferably, the construction of the temperature and humidity bivariate joint nonlinear response surface model and the first-order transient dynamic compensation model specifically includes: Perform steady-state cross-grid data acquisition for temperature and humidity: The calibration system is set as multiple temperature and humidity cross-grid nodes covering the entire range. Under standard gas input, steady-state response data of the measurement sensor under different temperature and humidity combined effects are collected synchronously. The temperature and humidity bivariate joint nonlinear response surface model is constructed using a surface fitting algorithm to characterize the cross-sensitive abrupt change region. Perform non-steady-state dynamic transient characteristic data acquisition: A step temperature or humidity excitation is applied to the calibration system, and the real-time temperature and humidity gradients and the differential signals between the measurement sensor and the reference sensor are continuously recorded. The differential compensation coefficients are solved based on the system identification algorithm to construct the first-order transient dynamic compensation model.

[0008] Preferably, the specific forms of the temperature and humidity bivariate joint nonlinear response surface model and the first-order transient dynamic compensation model are as follows: In the temperature and humidity bivariate joint nonlinear response surface model, the steady-state joint voltage drift is obtained by calculating the difference between the real-time ambient temperature, real-time relative humidity and the calibrated reference value, and combining the fitting order of the temperature variable, the fitting order of the humidity variable and the matrix polynomial interpolation that characterizes the joint weight coefficient of the cross term. The first-order transient dynamic compensation model includes the product of the time first derivative of the current real-time ambient temperature and the transient temperature differential compensation coefficient, as well as the product of the time first derivative of the current real-time ambient relative humidity and the transient humidity differential compensation coefficient.

[0009] Preferably, the parallel computation of steady-state joint compensation and transient dynamic compensation, and the weighted fusion correction through an adaptive weight allocation algorithm, specifically includes: The first step is to substitute the real-time temperature and humidity parameters into the temperature and humidity bivariate joint nonlinear response surface model to obtain the steady-state joint compensation amount, and to substitute the real-time air pressure into the air pressure compensation model to obtain the air pressure compensation amount. The second step is to substitute the real-time temperature change gradient and the real-time humidity change gradient into the first-order transient dynamic compensation model to obtain the transient dynamic compensation amount. Third, the microprocessor dynamically allocates adaptive steady-state weight coefficients and adaptive transient weight coefficients based on the magnitude of the gradient change in current environmental parameters or the state of the hardware compensation network. It then weights and fuses the steady-state joint compensation amount, transient dynamic compensation amount, and air pressure compensation amount to calculate the total environmental composite voltage drift and correct the original output voltage.

[0010] Preferably, the final calculation and output of the gas concentration value specifically includes: Zero-point offset calibration is performed on the environmental compensation signal voltage after adaptive weighted fusion correction. The sensor's response voltage to the zero-point gas under standard reference conditions is subtracted to obtain the final reference signal voltage. The final reference signal voltage is substituted into the offline solidified nonlinear calibration model of gas concentration to calculate the gas concentration value, which is then output through a standard communication interface.

[0011] Preferably, before constructing the hardware platform, a signal conditioning circuit including a preliminary hardware compensation network is further included for configuring the measurement sensor, specifically: A negative temperature coefficient thermistor or humidity-sensitive resistor is integrated into the feedback network of the amplifier circuit. The gain is dynamically adjusted to perform preliminary compensation by utilizing the characteristic that the resistance of the negative temperature coefficient thermistor or humidity-sensitive resistor changes with the environment. The microprocessor monitors the gain status of the hardware preliminary compensation network in real time. When it detects that the resistance change rate of the resistor element is lower than the preset saturation threshold, it generates and triggers a hardware saturation status flag. When the adaptive weight allocation algorithm detects the hardware saturation state flag, it automatically reduces the hardware compensation weight and dynamically amplifies the calculation weight of the temperature and humidity bivariate joint nonlinear response surface model.

[0012] Preferably, the construction of the hardware platform also includes designing a multi-channel data synchronization acquisition link, specifically: In each measurement cycle, the microprocessor sequentially triggers the analog-to-digital converter to synchronously sample the analog signals from the measurement sensor, the reference sensor, and each environmental sensor; By using the high-frequency sliding window differential calculation module built into the microprocessor, after completing synchronous data acquisition, the first derivative is calculated in real time for multiple consecutive cycles to obtain the gradient of the current environmental parameters.

[0013] Preferably, the establishment of the first-order transient dynamic compensation model further includes extracting the time first derivative of the reference sensor signal, specifically: The dynamic voltage drift compensation, which characterizes the physical heat transfer hysteresis effect, is defined as a comprehensive functional expression that includes the product of the real-time output voltage of the reference sensor and the first static coupling coefficient, and the product of the first derivative of the output voltage of the reference sensor with time and the second differential coupling coefficient.

[0014] Preferably, before deriving the air pressure compensation amount, a digital preprocessing step is further included, specifically: The microprocessor uses a moving average filtering algorithm to smooth the raw output signal of the measurement sensor acquired in real time; The high-frequency sliding window differential calculation module is synchronously invoked to obtain the real-time temperature change gradient and real-time humidity change gradient at the current moment, which serve as the core input for the calculation of the transient dynamic compensation quantity.

[0015] This invention provides a high-precision gas sensor compensation method with coordinated compensation for multiple environmental factors. It has the following beneficial effects: 1. This invention obtains steady-state response data through a multivariate cross-grid calibration method and constructs a joint nonlinear response surface model of temperature and humidity. This technique overcomes the limitations of traditional single-variable calibration and can accurately map the cross-coupling effects between temperature and humidity, thereby improving the steady-state compensation accuracy of the sensor in complex temperature and humidity environments.

[0016] 2. This invention establishes a differential structure by configuring a physically sealed reference sensor in hardware and combining it with step excitation calibration to build a first-order transient dynamic compensation model. By incorporating the temporal gradient of environmental parameters into the calculation, it can effectively reduce the dynamic signal deviation caused by heat and mass transfer hysteresis when the environment fluctuates drastically.

[0017] 3. This invention uses a microprocessor to monitor the hardware circuit status and environmental parameter changes in real time, and employs an adaptive weight allocation algorithm to process steady-state joint compensation and transient dynamic compensation in parallel. This computational architecture avoids error accumulation caused by traditional sequential logic and can dynamically adjust the fusion ratio of the software algorithm when hardware compensation is limited, ensuring the measurement stability of the system in a wide range and dynamically changing environment. Attached Figure Description

[0018] Figure 1 This is a flowchart of the method steps of the present invention. Detailed Implementation

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

[0020] Please see the appendix Figure 1 This invention provides a high-precision gas sensor compensation method with multi-environmental factor collaborative compensation, comprising the following steps: S1. Build the system hardware platform and perform initialization.

[0021] This step provides the physical basis for subsequent calibration and compensation. First, a sensor array is selected and configured, including a measurement sensor for actual gas detection and a specially sealed reference sensor isolated from the gas being measured and used only to sense changes in ambient temperature. Next, a signal conditioning and data acquisition circuit is designed and integrated. This circuit filters, amplifies, and performs high-precision analog-to-digital conversion on the raw sensor output signals, while integrating environmental sensors such as temperature, humidity, and pressure to simultaneously acquire environmental parameters. After the hardware platform is built, the microprocessor and all peripheral circuits are powered on and initialized.

[0022] S2. Perform multi-dimensional joint calibration and dynamic transient feature extraction to construct a collaborative compensation model.

[0023] This step aims to establish an accurate mathematical compensation model for complex environmental cross-coupling effects and thermal inertia characteristics using experimental data. The constructed hardware platform is placed in a calibration system with controllable environmental parameters. Abandoning the traditional single-variable calibration principle, a multi-variable cross-grid calibration method is adopted. First, steady-state joint calibration is performed: in a controlled environment, multiple temperature and humidity cross-combination nodes are set up, and steady-state response data of the measuring sensors under different combined temperature and humidity conditions are simultaneously collected. A bicubic B-spline surface (or radial basis function) fitting algorithm is used to construct a bivariate joint nonlinear response surface model of temperature and humidity to accurately characterize the cross-sensitive abrupt change regions under high and low humidity and extreme temperatures.

[0024] Transient dynamic calibration is then performed: a step-like temperature or humidity excitation is applied to the calibration system, and the rate of change of the differential signal between the measuring sensor and the reference sensor, as well as the environmental parameters, is recorded during this non-steady-state process. Based on the differential signal and rate of change, a first-order transient dynamic compensation model characterizing the physical heat transfer hysteresis effect is established. Finally, supplementary calibrations are performed for relatively independent factors such as air pressure and the response to gas concentration. Through the above joint calibration, the key parameters of the steady-state surface model and the transient dynamic compensation model are solved and determined.

[0025] S3. Perform online real-time collaborative compensation measurement based on adaptive weighted fusion.

[0026] This step outlines the workflow for the sensor to perform high-precision measurements in a real-world application environment. During the measurement process, the system acquires the raw output signal from the measurement sensor in real time and simultaneously obtains parameters such as current temperature, humidity, and atmospheric pressure measured by environmental sensors. It also calculates the real-time gradient of changes in current ambient temperature and humidity.

[0027] The microprocessor first performs preprocessing operations such as moving average filtering on the acquired raw signal. Then, abandoning the traditional linear sequential subtraction logic, it adopts an adaptive fusion architecture: First, real-time temperature and humidity parameters are substituted into the temperature and humidity bivariate joint nonlinear response surface model, and the steady-state joint compensation amount is calculated through surface interpolation. Second, the temperature change gradient and the real-time signal from the reference sensor are substituted into the transient dynamic compensation model to calculate the transient compensation amount used to suppress spurious thermal inertia signals. Third, the microprocessor uses a built-in adaptive weight allocation algorithm to dynamically allocate the weights of the steady-state and transient compensation amounts according to the drastic change (gradient magnitude) of the current environmental parameters, performing weighted fusion correction to completely eliminate the composite errors introduced by steady-state cross-coupling and transient thermal hysteresis. After completing adaptive fusion compensation and air pressure compensation, zero-point offset calibration is further performed. Finally, a gas concentration nonlinear calibration model is applied to solve the corrected final signal value into an accurate gas concentration value and output it.

[0028] After completing the above steps, the effectiveness of the compensation method can be verified.

[0029] This step aims to verify the accuracy of the constructed compensation model and the effectiveness of the entire compensation method through independent test data. Using independent test sets of sensors, multiple different combinations of environmental conditions (e.g., combinations of different temperatures and humidity levels) are set under controlled experimental conditions. In addition to conventional static temperature and humidity combinations, extreme cross-coupling conditions (such as low temperature and high humidity, high temperature and low humidity) and dynamic unsteady-state conditions (such as simulating the drastic temperature jump experienced by the sensor when it is suddenly transferred from indoors to outdoors) are emphasized. Under each set of environmental conditions, a standard gas of known concentration is introduced into the test sensor, and the measurement system with the solidified compensation algorithm is run.

[0030] Finally, the gas concentration value output by the system after the complete compensation process is compared with the true concentration value of the standard gas used, and the indication error is calculated. By analyzing whether the system's indication error remains within the preset accuracy index under harsh operating conditions with wide environmental changes and drastic dynamic fluctuations, the performance of this compensation method is objectively evaluated.

[0031] In one specific implementation, to achieve accurate compensation for multiple environmental factors, this method employs a specific sensor array configuration. Four gas sensors with similar physical characteristics are selected. Similar physical characteristics mean that, under the same manufacturing batch and model, their zero-point output, sensitivity to specific gases, and response trends to environmental factors such as temperature exhibit high consistency. These four sensors are divided into a reference group and a test group. The reference group is used for the development and calibration of the compensation model, while the test group is used for subsequent independent verification of the effectiveness of the established compensation method.

[0032] To accurately isolate the influence of temperature on gas measurements, this method implements a differential configuration for the sensors in the reference group. The specific implementation steps of this configuration are as follows: S111. Select two gas sensors with the best characteristic consistency from the reference group, and denot them as reference sensor A and measurement sensor B, respectively.

[0033] S112. Perform physical sealing on reference sensor A. This process aims to completely isolate its sensing element from the external gas environment to be measured. For example, a high- or low-temperature resistant epoxy resin or inert metal shell can be used to permanently encapsulate its sensing window. This process ensures that reference sensor A no longer responds to changes in the concentration of the target gas in the environment, but its overall structure, including the sensing core and its peripheral circuitry, remains fully exposed to the ambient temperature field, thus enabling it to accurately respond to changes in ambient temperature.

[0034] S113. After processing in S112, reference sensor A is transformed into a high-precision temperature-affected reference element. The change in its output signal primarily reflects the impact of ambient temperature changes on the inherent electrical characteristics of this sensor model (such as baseline drift and sensitivity temperature drift), without including interference from changes in gas concentration. More importantly, due to the additional thermal resistance and capacity introduced by the sealing material, a small but regular difference in thermal transfer physics is formed between reference sensor A and the unsealed measurement sensor B. This difference results in a phase difference in their thermal inertial responses under unsteady conditions (such as drastic temperature changes).

[0035] S114. The processed reference sensor A and the measuring sensor B are arranged adjacent to each other in the same area of ​​the circuit board. This adjacent arrangement ensures that they are in the same thermal environment, can synchronize, and sense the same ambient temperature changes in real time, thus guaranteeing the common-mode nature of their temperature responses. However, due to the aforementioned difference in thermal inertia, when the environment experiences dynamic step fluctuations, their responses are no longer simply synchronous drifts.

[0036] Through the aforementioned differential configuration, the output signal of the measuring sensor B is a composite response to factors such as gas concentration and ambient temperature, while the output signal of the reference sensor A includes not only the static baseline drift but also dynamic transient physical signals reflecting the temperature gradient inside and outside the sensor body. The core value of this configuration lies in providing dynamic heat transfer characteristic parameters that surpass conventional static analysis for the offline calibration stage, thus laying the hardware foundation for constructing a groundbreaking first-order transient dynamic compensation model. In unsteady-state environments, the thermal inertia dynamic voltage drift used for compensation is no longer a simple subtraction of the reference values; instead, the time-dependent first derivative of the reference sensor A's output signal is extracted to characterize its response rate. ; In the formula, This is the compensation amount for transient dynamic voltage drift caused by heat transfer hysteresis (thermal inertia); The first static coupling coefficient is determined and fitted through experiments using a physical heat transfer model. Reference sensor At the current real time ; output voltage; The second differential coupling coefficient characterizes the additional heat capacity and thermal resistance hysteresis properties introduced by the sealing material; Reference sensor The first derivative of the output voltage signal with time (i.e., the rate of change of the signal response over time). For differential operators, This is the time differential.

[0037] In the offline calibration process, the traditional static approach of taking steady-state points in a constant temperature chamber is abandoned. Instead, a step-temperature excitation is injected into the test chamber, and a series of different temperature points are collected simultaneously. (Measured by an independent digital temperature sensor), temperature change gradient and its corresponding Data pairs. These data pairs were subsequently used to fit and solve the subsequent first-order transient dynamic compensation model, thereby accurately solving the complex dynamic temperature influence problem by combining hardware differential measurement with software differential model fitting. This completely overcomes the technical bias of conventional polynomial algorithms in being unable to handle spurious signals caused by drastic environmental fluctuations.

[0038] In one specific implementation, to ensure the data quality and synchronization used for compensation calculations, the hardware platform upon which this method relies integrates dedicated signal conditioning and multi-source data synchronous acquisition circuitry. The goal of this circuitry is to accurately convert the weak, noisy analog signals from each sensor into high-quality digital signals suitable for subsequent processing by the microprocessor.

[0039] S121. Configure an independent signal conditioning circuit for each gas sensor in the sensor array (including reference sensor A and measuring sensor B). This circuit processes the raw analog signal output by the sensor, mainly including signal amplification and filtering.

[0040] The signal amplification stage employs a programmable gain amplifier (PGA). Based on the sensitivity characteristics of different sensors or their response intensity across different concentration ranges, the microprocessor can dynamically adjust the PGA gain to ensure that the amplified signal fully utilizes the range of the analog-to-digital converter (ADC), thereby maximizing measurement resolution while avoiding signal saturation. For signal filtering, those skilled in the art can use a hardware low-pass filter circuit; its specific implementation is well-known in the field and will not be elaborated upon here.

[0041] S122. On the circuit board, adjacent to the gas sensor array, high-precision environmental sensors are integrated, including a digital temperature sensor, a digital humidity sensor, and an atmospheric pressure sensor. This physical proximity arrangement aims to ensure that the collected environmental parameters can truly and accurately reflect the real-time environmental conditions at the gas sensor's operating location, thus guaranteeing the accuracy of subsequent environmental compensation algorithms.

[0042] S123. Design a multi-channel data synchronous acquisition link. The core of this link is a high-resolution analog-to-digital converter (ADC) and a microprocessor (MCU). The microprocessor, acting as the main controller, triggers the ADC to sample and convert multiple channels sequentially at extremely short time intervals within each preset measurement cycle through its control logic. These channels include analog signals from gas sensor A and gas sensor B after signal conditioning, as well as other environmental sensor signals requiring analog-to-digital conversion. This rapid polling sampling method ensures that all data points acquired within the same measurement cycle (gas sensor output, temperature, humidity, air pressure) are highly synchronized in time, reflecting the system state at the same instant. The ADC converts the input analog voltage... Convert to digital quantity The transformation relationship can be expressed as: ; In the formula, For ADC output A digital value. This is the analog voltage signal input to the ADC. This is the reference voltage for the ADC. The resolution bit depth of the ADC.

[0043] Specifically, to support subsequent dynamic compensation and adaptive algorithms, the microprocessor, in addition to containing conventional data storage logic, also has a built-in high-frequency sliding window differential calculation module. After completing the synchronous data acquisition for the current cycle, the microprocessor not only stores the absolute digital values ​​of each channel at the current moment into memory, but also synchronously calls the differential calculation module to process the data from past continuous cycles. The first-order derivatives of the digital signals from the digital temperature sensor, digital humidity sensor, and reference sensor A are calculated in real time over several cycles to obtain the temporal gradients of the current ambient temperature and humidity, as well as the response rate of the reference signal. This dynamic gradient data, along with the static absolute value data, is packaged together and used as the core input for subsequent high-dimensional joint interpolation and dynamic compensation algorithms.

[0044] In one specific implementation, to reduce the computational load on the subsequent software compensation algorithm and provide it with an input signal with a smaller fluctuation range, this method integrates a hardware preliminary compensation network into the analog signal conditioning circuit of the gas sensor. More importantly, this hardware network serves as a state-aware probe for adaptive weight allocation in the system.

[0045] S131. In the signal amplification circuit of the measuring sensor B, one or more resistive elements that vary with environmental parameters are integrated. Specifically, a negative temperature coefficient (NTC) thermistor and a humidity sensor are connected in parallel into the feedback network of the amplification circuit. This amplification circuit can be implemented using an operational amplifier. For the design of this circuit, those skilled in the art can choose according to their needs, and its specific implementation is well known in the art and will not be described in detail here.

[0046] S132. The working principle of this hardware compensation network is to dynamically adjust the gain or bias of the signal amplification circuit by utilizing the characteristic that the resistance of these special resistive elements changes with the environment, thereby offsetting part of the sensor's own reverse drift. For example, if the sensitivity of a gas sensor decreases as the temperature rises, an NTC thermistor (whose resistance decreases as the temperature rises) can be placed in the feedback loop of the operational amplifier, so that the gain of the amplifier circuit increases as the temperature rises. This compensatory change in gain can partially offset the negative temperature drift of the sensor sensitivity at the analog signal level.

[0047] S133. Taking a non-inverting amplifier circuit as an example, its gain is determined by the ratio of the feedback resistor to the ground resistor. By connecting an NTC thermistor in parallel with a fixed resistor as a composite feedback resistor, the gain of the amplifier circuit can be increased. Become temperature Functions: ; In the formula, As temperature Varying circuit gain. The value of the fixed resistor in the feedback network. This is the resistance value of the NTC thermistor, which is related to temperature. The function. This is the value of the grounding resistor for the amplifier circuit.

[0048] Similarly, by integrating the humidity-sensitive resistor into the circuit, preliminary hardware compensation for the effects of humidity can be achieved.

[0049] S134. After processing by this hardware preliminary compensation network, the analog signal output to the analog-to-digital converter has had its fluctuation amplitude within the normal temperature and humidity range effectively compressed. This provides a more stable signal foundation for subsequent software algorithms.

[0050] However, the core breakthrough of this embodiment lies in surpassing the traditional simple hardware suppression logic: when environmental conditions enter extreme regions (such as extremely low temperature, extremely high temperature or high humidity condensation critical point), the physical characteristics of the NTC thermistor and humidity sensor will enter the nonlinear saturation region, causing the gain adjustment capability of the amplifier circuit to fail. At this time, the sensor drift mechanism changes abruptly from single-variable linear drift to multi-variable cross-coupling drift.

[0051] To this end, the microprocessor monitors the current gain status of the hardware compensation network in real time. When the microprocessor determines that the resistance change rate of the NTC or humidity sensor is lower than a preset saturation threshold, the system immediately generates a hardware saturation status flag. This status flag is directly associated with the subsequent adaptive weight allocator. Once the flag is triggered, the system automatically reduces the weights of hardware compensation and conventional basic algorithms, and seamlessly switches to and triggers the more computationally intensive and accurate bicubic B-spline temperature and humidity joint response surface model to take over the main error correction work. This mechanism of hardware state awareness and adaptive linkage with high-order software algorithms fundamentally solves the problem of compensation failure under extreme conditions caused by hardware nonlinear distortion or fixed algorithm models in traditional solutions.

[0052] It should be noted that the resistance change rate of NTC thermistors or humidity-sensitive resistors decreases sharply and enters the nonlinear saturation region under extreme environments (such as extremely high / low temperature ranges), which is common physical knowledge in this field. The specific value of the preset saturation threshold can be determined by those skilled in the art based on the characteristic curves recorded in the datasheet of the selected electronic component, or directly through conventional factory calibration experiments in this field, and will not be elaborated further here.

[0053] In one specific implementation, to thoroughly address the issues of temperature and humidity cross-sensitivity and unsteady thermal inertia hysteresis that traditional single-variable calibration cannot handle, this method abandons the conventional single-variable decoupling principle and adopts a method combining multi-variable cross-grid joint calibration and transient characteristic excitation calibration. The aim of this method is to systematically extract and quantify the nonlinear cross-coupling effect between temperature and humidity, as well as the dynamic spurious signals caused by heat / mass transfer hysteresis, thereby establishing a high-dimensional compensation model that conforms to real physical characteristics.

[0054] The specific implementation of this method includes the following steps: S211. During steady-state joint calibration experiments, instead of controlling a single variable in isolation, the environmental factors to be calibrated (temperature and humidity) are treated as a two-dimensional correlation vector for joint control. Multiple temperature and humidity cross-grid nodes covering the entire range are set up. This ensures that during experimental data acquisition, the changes in the sensor output signal can truly reflect the nonlinear changes (i.e., coupling abrupt changes) in temperature sensitivity due to the physical adsorption of water molecules under extreme conditions such as high temperature and high humidity, and low temperature and high humidity.

[0055] S212. The standard reference state and grid reference point for this joint calibration can be set as: reference temperature. 25℃, reference humidity 50%RH, reference atmospheric pressure The value is 101.325 kPa. When calibrating external environmental factors, a standard gas of a fixed concentration needs to be introduced into the sensor as an input excitation, for example, a standard gas at 50% FS (full scale).

[0056] S213. To achieve the above control conditions, the calibration process must be carried out in an environmental test chamber capable of performing complex multivariate linkage programming and rapidly implementing temperature and humidity step excitations. This system must be equipped with high-precision reference instruments to monitor and ensure the stability and accuracy of the experimental environment.

[0057] S214. By implementing this cross-grid calibration and step excitation method, not only can a two-dimensional array dataset reflecting steady-state cross-sensitivity be obtained, but also a time-series dataset containing sensor dynamic response hysteresis (relationship between rate of change and bias) can be obtained. This data provides a foundation for subsequently establishing high-precision surface compensation models and transient differential compensation models that surpass traditional univariate polynomials, completely breaking through the technical bottleneck that simple linear combinations cannot solve the problem of deep coupling of multiple variables.

[0058] In one specific implementation, in order to obtain the basic data required to construct the compensation model, this method performs a systematic data acquisition process for each independent influencing factor based on the aforementioned decoupling calibration principle.

[0059] S221. Perform data acquisition for the nonlinear response of the gas concentration. Place the hardware platform equipped with the sensor to be calibrated into the calibration system, and set and maintain the system environment at the standard reference state, i.e., the reference temperature. Reference humidity Compared with reference atmospheric pressure In this stable environment, standard gases covering the sensor's measurement range are sequentially introduced into the calibration system at preset concentration points. For example, multiple concentration points can be selected, such as 0%FS (zero-point gas, such as high-purity nitrogen or clean air), 20%FS, 50%FS, 80%FS, and 100%FS. At each concentration point, after the gas concentration stabilizes and the sensor output signal reaches a steady state, the current true value of the standard gas concentration and the original voltage signal output by the sensor are recorded simultaneously. Between switching concentration points, the gas path must be thoroughly purged to prevent interference from residual gas.

[0060] S222. Perform steady-state cross-grid data acquisition for temperature and humidity. Maintain the atmospheric pressure of the calibration system at the reference atmospheric pressure and introduce a standard gas at a fixed concentration (e.g., 50%FS). Within the operating temperature range (e.g., -20℃ to 50℃) and operating humidity range (e.g., 10%RH to 90%RH), set temperature and humidity cross-grid nodes of, for example, 5×5 or larger (e.g., node 1 is -20℃ / 10%RH, node 2 is -20℃ / 30%RH, and so on). Control the calibration system to sequentially traverse all cross-grid nodes. After each node reaches a constant state and the sensor output is in steady state, synchronously record the true values ​​of ambient temperature and humidity, as well as the raw voltage signal output by the sensor.

[0061] S223. Perform non-steady-state dynamic transient characteristic data acquisition. Under standard concentration and reference pressure, apply a step temperature excitation (e.g., rapidly increasing from 0℃ to 40℃ at a set maximum heating rate) and a step humidity excitation to the environmental test chamber. During this non-steady-state transition, the system continuously records the real-time values ​​of temperature and humidity at a high-frequency sampling rate, and calculates the environmental change gradient (first derivative of temperature, first derivative of humidity) and the dynamic voltage drift of the measuring sensor to establish a dynamic hysteresis mapping dataset. Since the influence of air pressure is relatively independent and not prone to sudden changes, univariate acquisition is used when acquiring air pressure influence data: maintain the ambient temperature and humidity at the reference values, change the air pressure, and collect the corresponding data.

[0062] In all the above data acquisition steps, each set of raw data must undergo preprocessing such as digital filtering and outlier removal to ensure the data quality used for subsequent model fitting.

[0063] In one specific implementation, this method transforms the discrete data points collected in the aforementioned steps into a collaborative compensation function that can be embedded in a microprocessor and used for real-time calculation through high-dimensional mathematical modeling and feature parameter identification.

[0064] S231. Establish mathematical models matching the physical characteristics of each influencing factor. For the abrupt changes caused by the cross-coupling of temperature and humidity, abandon the traditional simple univariate polynomials that are independent of each other, and use bicubic B-splines or bivariate polynomial surfaces to construct a joint temperature and humidity response surface model; for the unsteady-state drift caused by thermal inertia, construct a first-order transient dynamic compensation model containing differential terms; retain the univariate polynomial model for the relatively independent air pressure factor; and construct a nonlinear calibration model for the basic concentration response.

[0065] S232. Construct a collaborative compensation model for external environmental factors. For the cross-coupling effects of steady-state temperature and humidity, the joint voltage drift is represented by the following bivariate joint nonlinear response surface model of temperature and humidity: ; In the formula, This refers to the steady-state combined voltage drift caused by the cross-coupling of temperature and humidity. For real-time measurement of ambient temperature; The reference temperature used during calibration; For real-time measurement of ambient relative humidity; The reference humidity used during calibration; The fitting order for the temperature variable; The order of fitting the humidity variable; In the temperature and humidity bivariate joint response surface model, the first... First-order temperature and the first The joint weighting coefficient of the humidity cross term (this coefficient characterizes the temperature sensitivity change due to the presence of a humidity water film).

[0066] To address the heat / mass transfer hysteresis problem under drastic environmental changes, its real-time dynamic compensation is represented by the following first-order transient dynamic compensation model: ; In the formula, This is the dynamic transient voltage compensation amount caused by the rapid change in the unsteady environment at the current moment; This is the first derivative of the current real-time ambient temperature with time (i.e., the rate of temperature change). The transient temperature differential compensation coefficient characterizing the thermal inertial hysteresis characteristics of the sensor body; This is the first derivative of the current real-time ambient relative humidity with time (i.e., the rate of change of humidity). The transient humidity differential compensation coefficient is used to characterize the hysteresis properties of moisture adsorption / desorption on the sensor surface.

[0067] Regarding the influence of air pressure, its voltage drift It can be expressed by the following formula: ; In the formula, This refers to the voltage drift caused by changes in air pressure. The ambient atmospheric pressure is measured in real time. The reference atmospheric pressure used during calibration; represents the order of the polynomial in the pressure compensation model; These are the polynomial coefficients of the air pressure compensation model.

[0068] S233. Construct a nonlinear calibration model for gas concentration. The goal of this model is to establish an accurate mapping relationship between the sensor output voltage and the actual concentration of the gas to be measured under a standard reference environment. Its mathematical form is as follows: ; In the formula, This represents the calculated gas concentration value. To eliminate all environmental interference, the equivalent restoration to the standard reference environment ( , , The reference voltage signal under ( ); represents the order of the polynomial in the nonlinear calibration model for gas concentration. These are the polynomial coefficients of the nonlinear calibration model for gas concentration. The summation index variable, i.e., the order of the polynomial, takes values ​​from 0 to... Integers.

[0069] S234. Perform model parameter fitting and solution. Using the two-dimensional cross-grid data collected in step S222, perform surface joint parameter estimation using the nonlinear least squares method to solve for the cross-term coefficient matrix; using the time series dynamic data collected in step S223, use system identification algorithms (such as gradient-based parameter optimization) to solve for the dynamic differential compensation coefficients. and These algorithms can be implemented using existing mathematical libraries by those skilled in the art, and their specific implementations are well-known technologies in this field, so they will not be described in detail here.

[0070] S235. Solidify model parameters. After completing the parameter fitting of all models, the coefficients of all joint surface matrices, dynamic differential coefficients, polynomial coefficients, and the order of each model are solved as the final compensation parameters, written and stored in the non-volatile memory of the microprocessor for use during online real-time compensation measurements.

[0071] In one specific implementation, this method employs an adaptive weighted fusion collaborative compensation computational architecture during the actual measurement phase. This architecture completely abandons the traditional sequential stripping logic, avoiding the error accumulation caused by ignoring the cross-sensitivity effect of temperature and humidity when subtracting single variables step by step. Through adaptive fusion of steady-state joint drift and transient dynamic drift, high-precision restoration is achieved under wide dynamic environments.

[0072] S311. At the beginning of each measurement cycle, the system first measures the raw output voltage of the sensor acquired in real time. Digital preprocessing is performed. This step can employ a moving average filtering algorithm to smooth the signal by calculating the average of the most recent N sampling points, effectively suppressing high-frequency random noise. Simultaneously, the microprocessor calls its internal high-frequency sliding window differential calculation module to calculate the time-first derivative (temperature change rate) of the current ambient temperature and the time-first derivative (humidity change rate) of the current ambient relative humidity in real time. Furthermore, the microprocessor evaluates the state of the hardware compensation network in real time; if it detects that the resistance change rate of a resistor element is lower than a preset threshold, it triggers and sets the hardware saturation flag.

[0073] S312. After preprocessing, the system sequentially calls the compensation models for each environmental factor established during offline calibration according to the preset collaborative fusion calculation logic, and performs parallel calculation and weighted correction on the signal.

[0074] The first step is to calculate the steady-state joint compensation and air pressure compensation. The microprocessor substitutes the current real-time temperature and humidity into the offline-preserved temperature and humidity bivariate joint nonlinear response surface model and calculates the steady-state joint voltage drift through matrix interpolation; at the same time, it substitutes the real-time air pressure into the air pressure compensation model to calculate the air pressure voltage drift.

[0075] The second step is to perform transient dynamic compensation calculation. The microprocessor uses the real-time temperature change rate and real-time humidity change rate extracted from S311, substitutes them into the offline-cured first-order transient dynamic compensation model, and calculates the transient dynamic voltage drift used to suppress thermal inertial hysteresis response.

[0076] The third step is to perform adaptive weighted fusion correction. The microprocessor's built-in adaptive weight allocation algorithm dynamically allocates the weight coefficients for steady-state and transient compensation based on the hardware saturation state flag and the real-time gradient magnitude of environmental parameters. It calculates the total environmental composite voltage drift and then performs a one-time coordinated correction to the original output voltage. The calculation formula is as follows: ; In the formula, This represents the total environmental composite voltage drift calculated using adaptive weighted fusion at the current moment. This is the adaptive steady-state weighting coefficient (when the system is in a normal stable environment, this value approaches 1; when the hardware saturation state flag is triggered, this value is dynamically amplified to take over the compensation of the hardware failure part). The steady-state joint voltage drift is calculated using a joint nonlinear response surface model of temperature and humidity. This represents the barometric voltage drift calculated using the barometric pressure compensation model. This is the adaptive transient weighting coefficient (its value is positively correlated with the gradient of real-time environmental changes; the more severe the environmental fluctuations, the larger the value). The transient temperature differential compensation coefficient characterizing the thermal inertial hysteresis characteristics of the sensor body; This is the first derivative of the current real-time ambient temperature with respect to time. The transient humidity differential compensation coefficient is used to characterize the hysteresis properties of moisture adsorption / desorption on the sensor surface. This is the first derivative of the current real-time ambient relative humidity with respect to time.

[0077] Next, the environmental compensation signal voltage after eliminating all environmental interference factors is calculated: ; In the formula, The environmental compensation signal voltage after adaptive weighted fusion compensation; The original output voltage is acquired by the sensor in real time and pre-processed by filtering. This represents the total environmental composite voltage drift calculated using adaptive weighted fusion at the current moment.

[0078] S313. After compensating for all external environmental factors, perform zero-point offset calibration on the environmental compensation signal voltage. This step subtracts the reference output voltage of the sensor when zero-point gas is introduced under standard reference conditions. This yields a net signal voltage that reflects only the change in the concentration of the gas being measured. .

[0079] ; In the formula, This is the final reference signal voltage after all environmental factors have been compensated and zero-point calibration has been performed. This is the environmental compensation signal voltage after adaptive weighted fusion compensation. For the sensor under standard reference environment The response voltage to zero-point gas is measured and solidified during the offline calibration phase.

[0080] After the above adaptive fusion and calibration process, the obtained It has been corrected to be equivalent to the signal voltage measured under standard reference conditions, and this voltage value will be used as the direct input for subsequent nonlinear calibration calculations of gas concentration.

[0081] In one specific implementation, after completing adaptive fusion compensation and calibration, the microprocessor performs the final gas concentration calculation and outputs the results through a standard communication interface.

[0082] S321. The microprocessor takes the final reference signal voltage, calculated in the previous stage and after eliminating all environmental factors (including steady-state cross-sensitivity and dynamic thermal inertia hysteresis) and zero-point offset effects, as an input variable and substitutes it into the gas concentration nonlinear calibration model that is stored in non-volatile memory. Through the calculation of this model, the voltage signal is accurately converted into the corresponding gas concentration value. The calculation process is represented by the following formula: ; In the formula, This represents the final calculated gas concentration value. represents the order of the polynomial in the nonlinear calibration model for gas concentration. For the summation index of the polynomial (from 0 to ... ); These are the polynomial coefficients of the nonlinear calibration model for gas concentration, which are solved and solidified during the offline calibration phase. This is the final reference signal voltage after all environmental factors have been compensated and zero-point calibration has been performed.

[0083] S322, after obtaining the accurate gas concentration value The microprocessor then packages the data according to a preset communication protocol format. Subsequently, the concentration data is transmitted to a host computer, data display terminal, or industrial control system via a standard communication interface of the hardware platform, such as a Universal Asynchronous Receiver / Transmitter (UART) or a Controller Area Network (CAN) bus. The specific implementation of the communication protocol can be configured by those skilled in the art according to application requirements; its implementation is well-known in the field and will not be elaborated upon here.

[0084] In one specific implementation, an independent verification scheme was designed and implemented to objectively evaluate the effectiveness of the compensation method described in this invention.

[0085] S411. Select an independent test group of sensors that were not involved in the compensation model construction as the verification object. The complete compensation model parameters obtained through offline calibration and fitting using the reference group sensors, including the coefficients of the temperature and humidity joint response surface matrix, transient differential compensation coefficients, adaptive weight parameters, and reference baseline values, are embedded into the microprocessor of the test group sensors. This ensures that the verification process is a performance test of the established algorithm, rather than a repeated test of the modeling data.

[0086] S412. In a test system where environmental parameters can be precisely controlled, set multiple combinations of environmental conditions that have not been used in the offline calibration phase. These combinations are designed to simulate typical, complex, or extreme operating conditions that the sensor may encounter in practical applications, such as low temperature and high humidity (e.g., -10℃, 85%RH), high temperature and low humidity (e.g., 45℃, 20%RH), and non-standard air pressure under standard temperature and humidity.

[0087] More importantly, in addition to the aforementioned static extreme conditions, dynamic unsteady-state test conditions have been specifically added to trigger hardware saturation and evaluate thermal inertia hysteresis effects. For example, these simulate the drastic temperature and humidity abrupt changes experienced by the sensor when it is instantly transferred from a warm and humid indoor environment (e.g., 25°C, 80%RH) to a cold and dry outdoor environment (e.g., -15°C, 20%RH). The selection of these test points aims not only to verify the fitting and generalization ability of the surface model at the extreme boundary, but also to objectively verify the dynamic suppression performance of the adaptive weighted and transient differential compensation architecture of this invention under drastic environmental fluctuations.

[0088] S413. Under each set of environmental conditions, for static conditions, after the environmental parameters within the test system stabilize, a standard gas of known concentration is introduced into the test sensor. For dynamic step conditions, a standard gas of a fixed concentration (e.g., 50% FS of the range) is continuously introduced throughout the entire process of drastic changes in environmental parameters to comprehensively evaluate the effectiveness of the compensation method at steady-state and unsteady-state levels.

[0089] S414. At each test point, i.e., under a specific static steady-state environment, data is acquired when the output of the test sensor reaches a stable state; while during the dynamic environment transition period, the following data is continuously and synchronously acquired and recorded at a preset high-frequency sampling rate throughout the entire process of drastic changes in environmental parameters, for subsequent performance evaluation and analysis: The test sensor outputs the raw voltage signal without any compensation algorithm processing.

[0090] The final gas concentration measurement value output by the microprocessor equipped with the adaptive fusion compensation algorithm of this invention after a complete calculation process.

[0091] The testing system uses high-precision reference instruments to measure the real-time values ​​of the current ambient temperature, humidity, and atmospheric pressure.

[0092] The microprocessor extracts and calculates the gradient of environmental parameter changes (i.e., the rate of temperature change and the rate of humidity change) in real time.

[0093] The real-time toggle state of the hardware saturation flag triggered by the hardware preliminary compensation network.

[0094] In one specific implementation, in order to quantitatively evaluate the performance of this compensation method, the indication error of the data collected in the aforementioned verification phase is calculated and analyzed.

[0095] S421. For each set of data points recorded during the verification process, calculate its indication error. The indication error is usually expressed as a percentage relative to the sensor's full scale (FS), and its calculation formula is as follows: ; In the formula, This represents the calculated percentage of the indication error. The gas concentration measurement value is the final output of the sensor test group after adaptive weighted fusion and complete compensation using this method. This represents the actual concentration of the standard gas synchronously introduced at this test point. The full-scale concentration nominal value of the sensor being tested.

[0096] S422. To intuitively demonstrate the effectiveness and substantial progress of this compensation method, a performance comparison analysis before and after compensation is conducted. At each test point, not only is the indication error of the output value of the architecture of this invention calculated, but also the indication error corresponding to the original signal without compensation is calculated.

[0097] In addition, to highlight that the present invention overcomes the shortcomings of the prior art, in this comparison process, the system also runs the traditional single-variable univariate polynomial sequential subtraction algorithm in parallel and calculates the comparison concentration value and comparison indication error output by the traditional algorithm.

[0098] Comparative analysis concludes that under normal, stable conditions and when the hardware is not saturated, the indication error of the algorithm in this invention is close to that of the traditional polynomial algorithm. However, when the test environment enters extreme cross-coupling regions such as low temperature and high humidity, or is under unsteady conditions with drastic step changes, the traditional univariate polynomial algorithm suffers severe divergence in indication error (far exceeding accuracy requirements) because it cannot handle the sensitive abrupt changes in water film cross-coupling and spurious signals from thermal inertia. In contrast, this invention relies on a joint response surface model triggered by hardware saturation sensing to handle extreme static errors and a transient differential compensation model to suppress dynamic spikes, thus maintaining convergence in indication error. This direct comparison clearly demonstrates the powerful suppression effect of this method on complex coupling and dynamic environmental interference, producing unexpected technical effects that cannot be achieved by existing conventional mathematical modeling.

[0099] S423. Perform the final performance evaluation. Calculate the percentage of indication error after compensating all test points using this method. Statistical analysis was conducted. These error values ​​obtained under various complex and extreme environments were compared with the accuracy specifications stated by the sensor manufacturer in their product specifications, which can only be achieved under standard conditions (e.g., 25°C, 50%RH). The results showed that the sensor's indication error remained within or near its nominal accuracy range across a wide temperature and humidity range, under different air pressures, and even under severe, unsteady conditions with drastic environmental fluctuations. This completely solved the measurement failure problem caused by environmental cross-coupling and dynamic hysteresis in practical applications, verifying its effectiveness.

[0100] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A high-precision gas sensor compensation method with multi-environmental factor collaborative compensation, characterized in that, Includes the following steps: Construct a hardware platform that includes a measurement sensor, a reference sensor for sensing changes in ambient temperature and isolated from the gas to be measured, and an environmental sensor. Steady-state response data were obtained using a multivariate cross-grid calibration method, and a joint nonlinear response surface model of temperature and humidity was constructed. Step excitation was applied to obtain unsteady-state dynamic data to establish a first-order transient dynamic compensation model. A pressure compensation model and a gas concentration nonlinear calibration model were also established. The system collects signals from various sensors in real time and calculates the gradient of environmental parameter changes. It calculates steady-state joint compensation and transient dynamic compensation in parallel, and performs weighted fusion correction through an adaptive weight allocation algorithm to eliminate the composite error introduced by steady-state cross-coupling and transient thermal hysteresis. Finally, it calculates and outputs the gas concentration value. The parallel computation of steady-state joint compensation and transient dynamic compensation, and the weighted fusion correction through an adaptive weight allocation algorithm, specifically include: The first step is to substitute the real-time temperature and humidity parameters into the temperature and humidity bivariate joint nonlinear response surface model to obtain the steady-state joint compensation amount, and to substitute the real-time air pressure into the air pressure compensation model to obtain the air pressure compensation amount. The second step is to substitute the real-time temperature change gradient and the real-time humidity change gradient into the first-order transient dynamic compensation model to obtain the transient dynamic compensation amount. Third, the microprocessor dynamically allocates adaptive steady-state weight coefficients and adaptive transient weight coefficients according to the magnitude of the gradient change of the current environmental parameters or the state of the hardware compensation network. It then weights and fuses the steady-state joint compensation amount, the transient dynamic compensation amount, and the air pressure compensation amount to calculate the total environmental composite voltage drift amount and corrects the original output voltage. The final calculation and output of the gas concentration value specifically includes: Zero-point offset calibration is performed on the environmental compensation signal voltage after adaptive weighted fusion correction. The sensor's response voltage to the zero-point gas under standard reference conditions is subtracted to obtain the final reference signal voltage. The final reference signal voltage is substituted into the offline solidified nonlinear calibration model of gas concentration to calculate the gas concentration value, which is then output through a standard communication interface.

2. The high-precision gas sensor compensation method for coordinated compensation of multiple environmental factors according to claim 1, characterized in that, The construction of the hardware platform specifically includes: Two gas sensors with identical characteristics are selected from the sensor array and used as the reference sensor and the measuring sensor, respectively. The reference sensor is physically sealed to completely isolate its sensing element from the external gas environment to be measured, and additional thermal resistance and thermal capacity are introduced through the sealing material. The reference sensor and the measuring sensor are placed adjacent to each other in the same thermal environment, so that the reference sensor becomes a temperature-affected reference element, and forms a response phase difference with the measuring sensor to characterize the physical heat transfer hysteresis effect in an unsteady environment.

3. The high-precision gas sensor compensation method for collaborative compensation of multiple environmental factors according to claim 1, characterized in that, The construction of the temperature and humidity bivariate joint nonlinear response surface model and the first-order transient dynamic compensation model specifically includes: Perform steady-state cross-grid data acquisition for temperature and humidity: The calibration system is set as multiple temperature and humidity cross-grid nodes covering the entire range. Under standard gas input, steady-state response data of the measurement sensor under different temperature and humidity combined effects are collected synchronously. The temperature and humidity bivariate joint nonlinear response surface model is constructed using a surface fitting algorithm to characterize the cross-sensitive abrupt change region. Perform non-steady-state dynamic transient characteristic data acquisition: A step temperature or humidity excitation is applied to the calibration system, and the real-time temperature and humidity gradients and the differential signals between the measurement sensor and the reference sensor are continuously recorded. The differential compensation coefficients are solved based on the system identification algorithm to construct the first-order transient dynamic compensation model.

4. The high-precision gas sensor compensation method for coordinated compensation of multiple environmental factors according to claim 3, characterized in that, The specific forms of the temperature and humidity bivariate joint nonlinear response surface model and the first-order transient dynamic compensation model are as follows: In the temperature and humidity bivariate joint nonlinear response surface model, the steady-state joint voltage drift is obtained by calculating the difference between the real-time ambient temperature, real-time relative humidity and the calibrated reference value, and combining the fitting order of the temperature variable, the fitting order of the humidity variable and the matrix polynomial interpolation that characterizes the joint weight coefficient of the cross term. The first-order transient dynamic compensation model includes the product of the time first derivative of the current real-time ambient temperature and the transient temperature differential compensation coefficient, as well as the product of the time first derivative of the current real-time ambient relative humidity and the transient humidity differential compensation coefficient.

5. The high-precision gas sensor compensation method for coordinated compensation of multiple environmental factors according to claim 1, characterized in that, Before the hardware platform is built, a signal conditioning circuit including a preliminary hardware compensation network is also included for configuring the measurement sensor, specifically: A negative temperature coefficient thermistor or humidity-sensitive resistor is integrated into the feedback network of the amplifier circuit. The gain is dynamically adjusted to perform preliminary compensation by utilizing the characteristic that the resistance of the negative temperature coefficient thermistor or humidity-sensitive resistor changes with the environment. The microprocessor monitors the gain status of the hardware preliminary compensation network in real time. When it detects that the resistance change rate of the resistor element is lower than the preset saturation threshold, it generates and triggers a hardware saturation status flag. When the adaptive weight allocation algorithm detects the hardware saturation state flag, it automatically reduces the hardware compensation weight and dynamically amplifies the calculation weight of the temperature and humidity bivariate joint nonlinear response surface model.

6. The high-precision gas sensor compensation method for coordinated compensation of multiple environmental factors according to claim 1, characterized in that, The construction of the hardware platform also includes the design of a multi-channel data synchronization acquisition link, specifically: In each measurement cycle, the microprocessor sequentially triggers the analog-to-digital converter to synchronously sample the analog signals from the measurement sensor, the reference sensor, and each environmental sensor; By using the high-frequency sliding window differential calculation module built into the microprocessor, after completing synchronous data acquisition, the first derivative is calculated in real time for multiple consecutive cycles to obtain the gradient of the current environmental parameters.

7. A high-precision gas sensor compensation method for coordinated compensation of multiple environmental factors according to claim 2, characterized in that, The establishment of the first-order transient dynamic compensation model also includes the extraction of the time first derivative of the reference sensor signal, specifically: The dynamic voltage drift compensation, which characterizes the physical heat transfer hysteresis effect, is defined as a comprehensive functional expression that includes the product of the real-time output voltage of the reference sensor and the first static coupling coefficient, and the product of the first derivative of the output voltage of the reference sensor with time and the second differential coupling coefficient.

8. The high-precision gas sensor compensation method for collaborative compensation of multiple environmental factors according to claim 1, characterized in that, Before deriving the air pressure compensation amount, a digital preprocessing step is also included, specifically: The microprocessor uses a moving average filtering algorithm to smooth the raw output signal of the measurement sensor acquired in real time; The high-frequency sliding window differential calculation module is synchronously invoked to obtain the real-time temperature change gradient and real-time humidity change gradient at the current moment, which serve as the core input for the calculation of the transient dynamic compensation quantity.

Citation Information

Patent Citations

  • Real-time parameter detection and calibration method and device for gas sensor

    CN121522108A

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

    CN121898535A