A gas sensor temperature and humidity compensation method, device, equipment and medium

By generating an equivalent detection circuit and determining the target compensation term, the temperature and humidity compensation of the gas sensor is compensated, which solves the problem of low compensation accuracy of measurement results caused by temperature and humidity changes in the prior art, and achieves higher measurement data accuracy and more accurate gas detection.

CN119757468APending Publication Date: 2025-04-04天津新智感知科技有限公司
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411971097.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In the existing gas detection technology, temperature and humidity changes lead to low compensation accuracy of gas sensor measurement results, making it difficult to effectively eliminate the interference of ambient temperature and humidity on gas detection.

Method used

By obtaining the basic circuit structure of the gas sensor, an equivalent detection circuit is generated, a state change curve is generated based on the preset temperature and humidity setting conditions and the equivalent detection circuit, a target compensation term is determined, and the current environmental value is offset based on these terms to generate a compensation voltage value.

Benefits of technology

It improves the compensation accuracy of gas measurement data, effectively eliminates the interference of ambient temperature and humidity on gas detection, and improves the accuracy of measurement data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119757468A_ABST
    Figure CN119757468A_ABST
Patent Text Reader

Abstract

The present invention discloses a temperature and humidity compensation method, device, equipment and medium for a gas sensor. The method includes: obtaining a basic circuit structure corresponding to a target gas sensor, and generating an equivalent detection circuit corresponding to the target gas sensor based on the basic circuit structure; generating a target state change curve based on preset temperature and humidity setting conditions and the equivalent detection circuit, and determining a target compensation item corresponding to the target gas sensor based on the offset direction of the target state change curve and preset fitting conditions; performing an offset calculation on the current environmental value corresponding to the target gas sensor based on the target compensation item to obtain a state offset result corresponding to the target gas sensor, and performing compensation processing on the current voltage value corresponding to the target gas sensor based on the preset compensation strategy and the state offset result to generate a target compensated voltage value. Through the technical solution of the present invention, the interference of ambient temperature and humidity on gas detection can be eliminated, and the compensation accuracy of the measurement data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of gas detection technology, and in particular to a temperature and humidity compensation method, device, equipment and medium for a gas sensor. Background Art

[0002] In the field of gas detection technology, since the response characteristics of gas sensors may change with changes in temperature and humidity, the measurement results of gas concentration will be affected by the ambient temperature and humidity. Therefore, in order to improve the accuracy of gas concentration measurement results, it is very important to perform temperature and humidity compensation on gas concentration measurement data under different environments.

[0003] The existing technology usually uses linear regression and polynomial regression to perform temperature and humidity compensation. Among them, linear regression draws a curve through the actual measured temperature or humidity and the actual concentration value of the detected gas, and fits the curve into a linear relationship approximately, transforming it into a straight line graph with a fixed slope, and then, the measured data is compensated for temperature and humidity through a straight line formula. Polynomial regression draws a curve through the actual measured temperature or humidity and the actual concentration value of the detected gas, and then fits a curve that is almost consistent with the test data through software, and then compensates the measured data for temperature and humidity through the generated curve formula.

[0004] However, since most gas detection sensors are affected by temperature and humidity, which leads to the offset of measurement results, and the change trend of semiconductor devices rarely conforms to the linear law, it is difficult to obtain ideal compensation results using linear regression. Polynomial regression relies on the curve fitting ability of software tools, which will be affected by some noise data and have a certain gap with the actual offset change, which reduces the compensation accuracy of the measurement data. Therefore, how to eliminate the interference of environmental temperature and humidity on gas detection and improve the compensation accuracy of measurement data is a problem that needs to be solved urgently. Summary of the invention

[0005] The present invention provides a temperature and humidity compensation method, device, equipment and medium for a gas sensor, which can solve the problem of low compensation accuracy of gas measurement data under the interference of environmental temperature and humidity.

[0006] According to one aspect of the present invention, a temperature and humidity compensation method for a gas sensor is provided, comprising:

[0007] Acquire a basic circuit structure corresponding to the target gas sensor, and generate an equivalent detection circuit corresponding to the target gas sensor based on the basic circuit structure;

[0008] Generate a target state change curve based on preset temperature and humidity setting conditions and the equivalent detection circuit, and determine a target compensation item corresponding to the target gas sensor based on the offset direction of the target state change curve and preset fitting conditions;

[0009] Based on the target compensation item, an offset calculation is performed on the current environmental value corresponding to the target gas sensor to obtain a state offset result corresponding to the target gas sensor, and based on a preset compensation strategy and the state offset result, a compensation processing is performed on the current voltage value corresponding to the target gas sensor to generate a target compensated voltage value.

[0010] According to another aspect of the present invention, a temperature and humidity compensation device for a gas sensor is provided, comprising:

[0011] A circuit construction module, used to obtain a basic circuit structure corresponding to the target gas sensor, and generate an equivalent detection circuit corresponding to the target gas sensor based on the basic circuit structure;

[0012] A compensation term construction module, used to generate a target state change curve based on preset temperature and humidity setting conditions and the equivalent detection circuit, and determine a target compensation term corresponding to the target gas sensor based on an offset direction of the target state change curve and preset fitting conditions;

[0013] The compensation value generation module is used to perform an offset calculation on the current environmental value corresponding to the target gas sensor based on the target compensation item, obtain a state offset result corresponding to the target gas sensor, and perform compensation processing on the current voltage value corresponding to the target gas sensor based on a preset compensation strategy and the state offset result to generate a target compensated voltage value.

[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0015] at least one processor; and

[0016] a memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the temperature and humidity compensation method for the gas sensor described in any embodiment of the present invention.

[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the temperature and humidity compensation method for a gas sensor described in any embodiment of the present invention when executed.

[0019] According to another aspect of the present invention, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the temperature and humidity compensation method for a gas sensor according to any embodiment of the present invention is implemented.

[0020] The technical solution of the embodiment of the present invention generates an equivalent detection circuit corresponding to the target gas sensor through the basic circuit structure corresponding to the target gas sensor. Furthermore, a target state change curve is generated based on preset temperature and humidity setting conditions and the equivalent detection circuit, and the target compensation item corresponding to the target gas sensor is determined based on the offset direction of the target state change curve and the preset fitting conditions. Further, the current environmental value corresponding to the target gas sensor is offset calculated based on the target compensation item to obtain the state offset result corresponding to the target gas sensor, and the current voltage value corresponding to the target gas sensor is compensated based on the preset compensation strategy and the state offset result to generate a target compensated voltage value. Since an equivalent detection circuit that is independent of gas concentration is used to pre-fit a curve formula as a basis for temperature and humidity compensation, the interference of redundant variables can be reduced in the process of fitting the curve, which solves the problem of low compensation accuracy of gas measurement data under environmental temperature and humidity interference, can eliminate the interference of environmental temperature and humidity on gas detection, and improve the compensation accuracy of measurement data.

[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0023] Figure 1 is a flow chart of a temperature and humidity compensation method for a gas sensor provided according to Embodiment 1 of the present invention;

[0024] Figure 2 is a schematic diagram of a basic circuit structure provided according to Embodiment 1 of the present invention;

[0025] Figure 3 is a schematic diagram of an equivalent detection circuit provided according to Embodiment 1 of the present invention;

[0026] Figure 4 is a flow chart of a temperature and humidity compensation method for a gas sensor provided according to Embodiment 2 of the present invention;

[0027] Figure 5 is a schematic structural diagram of a temperature and humidity compensation device for a gas sensor provided in accordance with a third embodiment of the present invention;

[0028] Figure 6 It is a structural schematic diagram of an electronic device for implementing the temperature and humidity compensation method for a gas sensor according to an embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0030] It should be noted that the terms "objective", "basis", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0031] In the field of gas detection technology, since the response characteristics of gas sensors may change with changes in temperature and humidity, the voltage value collected by the analog-to-digital converter (ADC) will be affected by the ambient temperature and humidity. Therefore, when the temperature and humidity are normal, that is, 25°C and 65%RH, the sensor measurement value is the true value and does not need to be compensated. When the temperature and humidity are unconventional, the sensor measurement value needs to be compensated.

[0032] In the prior art, when using linear regression to compensate the measured gas concentration according to the current temperature and humidity, it is usually assumed that temperature has an offset effect on the gas sensor. When it is a linear relationship: K t =K a *T+C t , V s '=V s / K t ; Among them, when T = 25℃, K t=1; Similarly, assuming that humidity has an offset effect on the gas sensor, when it is a linear relationship: K h =K a *H+C h , V s '=V s / K h ; Among them, when H = 65% RH, K h = 1. When using polynomial regression to compensate the measured gas concentration according to the current temperature and humidity, assuming that temperature has an offset effect on the gas sensor, the calculation method is approximately: K t =K a *T 3 +K b *T 2 +K c *T+C t , V s '=V s / K t ; Among them, when T = 25℃, K t =1; Similarly, assuming that humidity has an offset effect on the gas sensor, the calculation method is approximately: K h =K a *H 3 +K b *H 2 +K c *H+C h , V s '=V s / K h ; Among them, when H = 65% RH, K h =1. Among them, V s Indicates the voltage value measured by the sensor; V s ' represents the voltage value after compensation; K t Indicates the influence coefficient of temperature on the sensor; K h Indicates the influence coefficient of humidity on the sensor; T indicates the current temperature value; H indicates the current humidity value; C t A fixed offset representing the effect of temperature; C h A fixed offset representing the effect of humidity; K a , K b and K c Indicates the slope of the curve obtained from the curve.

[0033] However, since the linear regression method requires a linear relationship between the measured data, it is difficult to have an ideal linear relationship in practical applications. The polynomial regression method fits a nonlinear relationship of the measured data, but in practical applications, the noise and overfitting in the measured data may lead to over-compensation of the measured data in the actual measurement. If the linear regression method or the polynomial regression method in the prior art is used to compensate for the measured gas concentration, the compensation accuracy of the gas measurement data will be low. Therefore, in order to solve the problem of low compensation accuracy of gas measurement data under the interference of environmental temperature and humidity, an embodiment of the present invention proposes a temperature and humidity compensation method for a gas sensor.

[0034] Embodiment 1

[0035] Figure 1 This is a flow chart of a gas sensor temperature and humidity compensation method provided in the first embodiment of the present invention. This embodiment is applicable to the case where the temperature and humidity compensation of the collected value of the gas sensor is performed. The method can be performed by a temperature and humidity compensation device of the gas sensor. The temperature and humidity compensation device of the gas sensor can be implemented in the form of hardware and / or software. The temperature and humidity compensation device of the gas sensor can be configured in an electronic device. Figure 1 As shown, the method includes:

[0036] S110, acquiring a basic circuit structure corresponding to the target gas sensor, and generating an equivalent detection circuit corresponding to the target gas sensor based on the basic circuit structure.

[0037] The gas sensor may refer to a sensor for detecting gas concentration. For example, the gas sensor may be a methane sensor. The target gas sensor may refer to a gas sensor selected for temperature and humidity compensation. The basic circuit structure may refer to an internal circuit structure corresponding to the target gas sensor. Figure 2 The figure shows a schematic diagram of a basic circuit structure provided by an embodiment of the present invention. Specifically, taking the target gas sensor as a methane sensor as an example, the corresponding basic circuit structure may include a voltage controlled oscillator (VCC), a sensor gas sensitive element, a load resistor, a wire ground terminal (Ground, GND) and an analog-to-digital converter. When the methane gas concentration in the environment increases, the resistance of the sensor gas sensitive element decreases, and the corresponding voltage value collected by the ADC decreases.

[0038] The equivalent detection circuit may refer to a temperature and humidity detection circuit similar to the basic circuit structure. Generally, the sensor gas sensitive element in the basic circuit structure can be replaced by a temperature and humidity sensitive element. Thus, a temperature and humidity equivalent detection circuit that is independent of gas concentration is obtained. Figure 3FIG. 1 is a schematic diagram of an equivalent detection circuit provided by an embodiment of the present invention. Figure 2 As shown in the figure, the corresponding equivalent detection circuit may include VCC, temperature and humidity sensitive components, load resistors, GND and analog-to-digital converters. When the ADC value of the voltage to be measured is inconsistent with the value under normal temperature and humidity conditions due to changes in temperature and humidity in the equivalent detection circuit, it is considered that there is a temperature and humidity influence.

[0039] S120, generating a target state change curve based on preset temperature and humidity setting conditions and the equivalent detection circuit, and determining a target compensation item corresponding to the target gas sensor based on an offset direction of the target state change curve and preset fitting conditions.

[0040] Among them, the preset temperature and humidity setting conditions may refer to a preset ambient temperature and humidity adjustment range. Exemplarily, the preset temperature and humidity setting conditions may be an ambient temperature of 17-28°C and an ambient humidity of 45%-85% RH. The corresponding temperature value and humidity value may be determined for the current test environment by presetting the temperature and humidity setting conditions. The state change curve may refer to a curve constructed by the voltage value generated under different temperature and humidity environments and the corresponding temperature and humidity values. The target state change curve may refer to a state change curve constructed by the voltage value generated by the equivalent detection circuit and the corresponding temperature and humidity values. Exemplarily, the target state change curve may be a curve constructed by the voltage value and the corresponding temperature value, or a curve constructed by the voltage value and the corresponding humidity value. The curve constructed by the voltage value and the corresponding temperature value, and the curve constructed by the voltage value and the corresponding humidity value may be statistically plotted in the same curve drawing, and the embodiment of the present invention does not specifically limit this.

[0041] The offset direction may refer to the offset state of the target state change curve relative to the zero degree Celsius environment. For example, if the temperature value corresponding to the target state change curve is 25°C, the corresponding offset direction may be positive; similarly, if the temperature value corresponding to the target state change curve is -5°C, the corresponding offset direction may be negative. Since the temperature value is positive, the compensation item constructed is different from the compensation item constructed when the temperature value is negative. Therefore, in the embodiment of the present invention, the compensation item is constructed based on the offset direction of the temperature value.

[0042] Among them, the preset fitting condition may refer to a preset curve fitting strategy. Exemplarily, the preset fitting condition may be curve fitting using simulation software or using statistical tools. The preset fitting condition may be used to perform parameter fitting on the target state change curve to obtain the influence coefficient of each compensation item. The compensation item may refer to a measure taken to compensate for the influence of ambient temperature and humidity on the data collected by the gas sensor. The target compensation item may refer to a combination of compensation items corresponding to the target gas sensor.

[0043] S130. Based on the target compensation item, an offset calculation is performed on the current environmental value corresponding to the target gas sensor to obtain a state offset result corresponding to the target gas sensor, and based on a preset compensation strategy and the state offset result, a compensation process is performed on the current voltage value corresponding to the target gas sensor to generate a target compensated voltage value.

[0044] Among them, the current environmental value may refer to the environmental value of the environment in which the target gas sensor is currently located. Exemplarily, the current environmental value may include the temperature value and humidity value of the environment in which the target gas sensor is currently located. Offset calculation may refer to the operation of performing numerical calculation based on the target compensation item and the current environmental value. Exemplarily, the offset calculation may be to substitute the current environmental value into the corresponding target compensation item for numerical calculation. The state offset result may refer to the calculation result obtained after performing offset calculation based on the target compensation item and the current environmental value.

[0045] The current voltage value may refer to the voltage value collected in real time by the target gas sensor at the current moment. The preset compensation strategy may refer to a preset compensation rule for the collected voltage value. Exemplarily, the preset compensation strategy may be to add the state offset result to the current voltage value. The target compensated voltage value may refer to the voltage value obtained after compensating the current voltage value based on the state offset result.

[0046] In an optional embodiment, after compensating the current voltage value corresponding to the target gas sensor based on the preset compensation strategy and the state offset result to generate the target compensated voltage value, it may also include: obtaining the gas generation standard corresponding to the target gas sensor; determining the current gas concentration corresponding to the target gas sensor based on the gas generation standard and the target compensated voltage value. Among them, the gas generation standard may refer to the gas concentration calculation rule. Generally, the voltage value corresponding to the gas sensor can be converted into the gas concentration according to the gas generation standard. The current gas concentration may refer to the gas concentration of the environment in which the target gas sensor is currently located. Specifically, after determining the target compensated voltage value corresponding to the target gas sensor, the target compensated voltage value can be substituted into the gas generation standard corresponding to the target gas sensor. Thus, the current gas concentration corresponding to the target gas sensor is obtained, which provides an effective basis for subsequent work and ensures the accuracy of the gas concentration.

[0047] The technical solution of the embodiment of the present invention generates an equivalent detection circuit corresponding to the target gas sensor through the basic circuit structure corresponding to the target gas sensor. Furthermore, a target state change curve is generated based on preset temperature and humidity setting conditions and the equivalent detection circuit, and the target compensation item corresponding to the target gas sensor is determined based on the offset direction of the target state change curve and the preset fitting conditions. Further, the current environmental value corresponding to the target gas sensor is offset calculated based on the target compensation item to obtain the state offset result corresponding to the target gas sensor, and the current voltage value corresponding to the target gas sensor is compensated based on the preset compensation strategy and the state offset result to generate a target compensated voltage value. Since an equivalent detection circuit that is independent of gas concentration is used to pre-fit a curve formula as a basis for temperature and humidity compensation, the interference of redundant variables can be reduced in the process of fitting the curve, which solves the problem of low compensation accuracy of gas measurement data under environmental temperature and humidity interference, can eliminate the interference of environmental temperature and humidity on gas detection, and improve the compensation accuracy of measurement data.

[0048] Embodiment 2

[0049] Figure 4 This is a flow chart of a temperature and humidity compensation method for a gas sensor provided in the second embodiment of the present invention. This embodiment is refined based on the above embodiment. In this embodiment, the operation of generating a target state change curve based on preset temperature and humidity setting conditions and the equivalent detection circuit is specifically refined, which may include: determining a preset environmental value set based on preset temperature and humidity setting conditions; wherein the preset environmental value set includes each preset environmental value pair; obtaining the test voltage value of the equivalent detection circuit under the target environmental value pair, and statistically processing the target environmental value pair and the corresponding test voltage value to generate a target state change curve. Figure 4 As shown, the method includes:

[0050] S210, acquiring a basic circuit structure corresponding to the target gas sensor, and generating an equivalent detection circuit corresponding to the target gas sensor based on the basic circuit structure.

[0051] S220. Determine a preset environmental value set based on preset temperature and humidity setting conditions; wherein the preset environmental value set includes various preset environmental value pairs.

[0052] Among them, the preset environmental value pair may refer to a preset temperature and humidity combination pair. For example, if the preset temperature and humidity setting conditions are that the ambient temperature is 17-28°C and the ambient humidity is 45%-85%RH. Then the preset environmental value pair may be an ambient temperature of 17°C and an ambient humidity of 45%RH, an ambient temperature of 18°C ​​and an ambient humidity of 45%RH, and an ambient temperature of 18°C ​​and an ambient humidity of 47%RH, etc. The preset environmental value set may refer to an array set consisting of each preset environmental value pair.

[0053] Specifically, after determining the preset temperature and humidity setting conditions, random numerical values ​​can be determined according to the numerical range in the preset temperature and humidity setting conditions to obtain various temperature values ​​and humidity values, and the temperature values ​​and humidity values ​​are randomly paired to generate various preset environmental value pairs. Afterwards, the preset environmental value pairs are combined and processed to generate a preset environmental value set, providing an effective basis for subsequent operations.

[0054] S230, obtaining a test voltage value of the equivalent detection circuit under a target environment value pair, and statistically processing the target environment value pair and the corresponding test voltage value to generate a target state change curve.

[0055] The target environment value pair may refer to a preset environment value pair selected for testing. The test voltage value may refer to an actual voltage value output by the equivalent detection circuit under the target environment value pair. Statistical processing may refer to the operation of integrating the target environment value pair and the corresponding test voltage value.

[0056] Specifically, after constructing the preset environment value set, each preset environment value pair in the preset environment value set can be selected as the target environment value pair, and the test voltage value of the equivalent detection circuit under the target environment value pair can be obtained. Then, the target environment value pair and the corresponding test voltage value are statistically processed, for example, the temperature environment value and the test voltage value are statistically processed, and the humidity environment value and the test voltage value are statistically processed, thereby obtaining the target state change curve corresponding to the equivalent detection circuit, providing a basis for subsequent operations.

[0057] S240. Determine a target change coefficient corresponding to the target environment type based on a preset fitting condition and the target state change curve.

[0058] The target environment type may refer to an environment type selected for coefficient determination. In an optional implementation, the target environment type includes: a humidity environment type and a temperature environment type.

[0059] The target change coefficient may refer to a polynomial coefficient corresponding to the target environment type. For example, the target change coefficient may include a curve constant and an environment coefficient. Specifically, if the target environment type is a temperature environment type, the corresponding target change coefficient may be: temperature change curve constant C t 、The first temperature variation coefficient K t_1 And the second temperature variation coefficient K t_2 Similarly, if the target environment type is a humidity environment type, the corresponding target change coefficient can be: humidity change curve constant C h 、The first coefficient of humidity variation K h_1 And the second coefficient of humidity variation K h_2 .

[0060] Specifically, after the target state change curve is generated, the target state change curve may be fitted using a preset fitting condition, thereby obtaining a target change coefficient corresponding to each target environment type.

[0061] S250: Generate a basic compensation item corresponding to the target environment type based on the offset direction of the target state change curve and the target change coefficient corresponding to the target environment type.

[0062] The basic compensation item may refer to a compensation item polynomial corresponding to each target environment type.

[0063] Specifically, if the target environment type is a temperature environment type, and the offset direction of the target state change curve is positive, then the basic compensation item corresponding to the target environment type may be: Vol_T_1 = C t -K t_1 *Temp_Temp*Temp_Temp-K t_2 *Temp_Temp; Temp_Temp represents the current temperature value, C t Represents the temperature change curve constant, K t_1 Indicates the first temperature variation coefficient, K t_2 Represents the second temperature change coefficient; if the target environment type is the temperature environment type and the offset direction of the target state change curve is negative, the corresponding basic compensation term can be: Vol_T_2=C t -K t_1 *Temp_Temp*Temp_Temp+K t_2 *Temp_Temp. If the target environment type is a humidity environment type, the corresponding basic compensation item can be: Vol_H=K h_1 *Hum_Temp*Hum_Temp+K h_2 *Hum_Temp+C h Among them, Hum_Temp represents the current humidity value, C h Represents the humidity change curve constant, K h_1 Indicates the first coefficient of humidity variation, K h_2 Represents the second coefficient of variation of humidity.

[0064] It is worth noting that, in the embodiment of the present invention, the offset direction of the target state change curve can also be determined according to the positive or negative situation of the current temperature value. For example, if the current temperature value is less than "0x8000", that is, the current temperature value is between 0X0000-0X7FFF, it means that the current temperature value is positive, and the offset direction of the target state change curve is positive. On the contrary, if the current temperature value is greater than "0x8000", that is, the current temperature value is between 0X8000-0XFFFF, it means that the current temperature value is negative, and the offset direction of the target state change curve is negative. The embodiment of the present invention does not specifically limit this.

[0065] S260 , combining and processing basic compensation items corresponding to each target environment type to obtain a target compensation item corresponding to the target gas sensor.

[0066] Specifically, after generating the basic compensation items corresponding to the target environment types, the basic compensation items corresponding to the target environment types can be combined and processed, thereby obtaining the target compensation items corresponding to the target gas sensor, providing an effective basis for subsequent operations.

[0067] It is worth noting that in the embodiment of the present invention, the target compensation item corresponding to the same target gas sensor only needs to be pre-built when the temperature and humidity compensation is performed for the first time, so that the pre-built target compensation item can be directly used in the subsequent temperature and humidity compensation process. There is no need to construct the target compensation item again during the subsequent use process, and the embodiment of the present invention does not provide additional details on this.

[0068] S270. Obtain a current environmental value corresponding to the target gas sensor, and determine an environmental type of the current environmental value.

[0069] Specifically, when performing actual temperature and humidity compensation, the current environmental value corresponding to the target gas sensor can be collected through an external temperature and humidity sensor, and then the environmental type of the current environmental value can be determined according to the numerical value and category of the current environmental value.

[0070] S280. Determine a corresponding target compensation sub-item in the target compensation item based on the environment type of the current environment value, and perform an offset calculation on the current environment value based on the target compensation sub-item to obtain a state offset result corresponding to the target gas sensor.

[0071] Among them, the target compensation sub-item may refer to the compensation item selected in the target compensation item for temperature and humidity compensation. Exemplarily, if the environment type of the current environment value is the temperature environment type and the numerical value is positive, Vol_T_1 in the target compensation item may be used as the target compensation sub-item. If the environment type of the current environment value is the temperature environment type and the numerical value is negative, Vol_T_2 in the target compensation item may be used as the target compensation sub-item. If the environment type of the current environment value is the humidity environment type, Vol_H in the target compensation item may be used as the target compensation sub-item.

[0072] Specifically, after determining the environmental type of the current environmental value, the corresponding target compensation sub-item can be determined in the target compensation item based on the environmental type of the current environmental value, and then the current environmental value is substituted into the corresponding target compensation sub-item for offset calculation, thereby obtaining the corresponding state offset result of the target gas sensor.

[0073] S290. Obtain the current voltage value corresponding to the target gas sensor.

[0074] S2100 , combining the state shift result and the current voltage value based on a preset compensation strategy to generate a target compensation voltage value.

[0075] Specifically, after obtaining the current voltage value corresponding to the target gas sensor, the state offset result and the current voltage value can be combined and processed according to the preset compensation strategy to generate the target compensation voltage value. Exemplarily, if the state offset result is Vol_T+Vol_H, where Vol_T represents the state offset result corresponding to the temperature environment type, Vol_T can be Vol_T_1 or Vol_T_2; the current voltage value is Vol_Sensor, then the generated target compensation voltage value Vol_Sensor' can be: Vol_Sensor'=Vol_Sensor+Vol_T+Vol_H.

[0076] The technical solution of the embodiment of the present invention generates an equivalent detection circuit corresponding to the target gas sensor through the basic circuit structure corresponding to the target gas sensor. Further, a preset environmental value set is determined based on the preset temperature and humidity setting conditions, the test voltage value of the equivalent detection circuit under the target environmental value pair is obtained, and the target environmental value pair and the corresponding test voltage value are statistically processed to generate a target state change curve. Further, the target change coefficient corresponding to the target environment type is determined based on the preset fitting conditions and the target state change curve, and the basic compensation item corresponding to the target environment type is generated based on the offset direction of the target state change curve and the target change coefficient corresponding to the target environment type, and the basic compensation items corresponding to each target environment type are combined and processed to obtain the target compensation item corresponding to the target gas sensor. Further, the current environmental value corresponding to the target gas sensor is obtained, and the environmental type of the current environmental value is determined. Based on the environmental type of the current environmental value, the corresponding target compensation sub-item is determined in the target compensation item, and the current environmental value is offset calculated based on the target compensation sub-item to obtain the state offset result corresponding to the target gas sensor. Finally, the current voltage value corresponding to the target gas sensor is obtained, and the state offset result and the current voltage value are combined and processed based on the preset compensation strategy to generate the target compensation voltage value. By using an equivalent detection circuit that is independent of gas concentration and pre-fitting a curve formula as the basis for temperature and humidity compensation, the interference of redundant variables can be reduced in the curve fitting process, solving the problem of low compensation accuracy of gas measurement data under the interference of ambient temperature and humidity. The interference of ambient temperature and humidity on gas detection can be eliminated, and the compensation accuracy of measurement data is improved.

[0077] Embodiment 3

[0078] Figure 5 This is a schematic diagram of the structure of a temperature and humidity compensation device for a gas sensor provided in Embodiment 3 of the present invention. Figure 5 As shown, the device includes: a circuit construction module 310, a compensation item construction module 320 and a compensation value generation module 330;

[0079] The circuit construction module 310 is used to obtain a basic circuit structure corresponding to the target gas sensor, and generate an equivalent detection circuit corresponding to the target gas sensor based on the basic circuit structure;

[0080] A compensation term construction module 320, for generating a target state change curve based on preset temperature and humidity setting conditions and the equivalent detection circuit, and determining a target compensation term corresponding to the target gas sensor based on an offset direction of the target state change curve and preset fitting conditions;

[0081] The compensation value generation module 330 is used to perform an offset calculation on the current environmental value corresponding to the target gas sensor based on the target compensation item, obtain a state offset result corresponding to the target gas sensor, and perform compensation processing on the current voltage value corresponding to the target gas sensor based on a preset compensation strategy and the state offset result to generate a target compensated voltage value.

[0082] The technical solution of the embodiment of the present invention generates an equivalent detection circuit corresponding to the target gas sensor through the basic circuit structure corresponding to the target gas sensor. Furthermore, a target state change curve is generated based on preset temperature and humidity setting conditions and the equivalent detection circuit, and the target compensation item corresponding to the target gas sensor is determined based on the offset direction of the target state change curve and the preset fitting conditions. Further, the current environmental value corresponding to the target gas sensor is offset calculated based on the target compensation item to obtain the state offset result corresponding to the target gas sensor, and the current voltage value corresponding to the target gas sensor is compensated based on the preset compensation strategy and the state offset result to generate a target compensated voltage value. Since an equivalent detection circuit that is independent of gas concentration is used to pre-fit a curve formula as a basis for temperature and humidity compensation, the interference of redundant variables can be reduced in the process of fitting the curve, which solves the problem of low compensation accuracy of gas measurement data under environmental temperature and humidity interference, can eliminate the interference of environmental temperature and humidity on gas detection, and improve the compensation accuracy of measurement data.

[0083] Optionally, the compensation item construction module 320 may be specifically used for:

[0084] Determine a preset environmental value set based on preset temperature and humidity setting conditions; wherein the preset environmental value set includes each preset environmental value pair;

[0085] The test voltage value of the equivalent detection circuit under the target environmental value pair is obtained, and the target environmental value pair and the corresponding test voltage value are statistically processed to generate a target state change curve.

[0086] Optionally, the compensation item construction module 320 may be specifically used for:

[0087] Determine a target change coefficient corresponding to the target environment type based on a preset fitting condition and the target state change curve;

[0088] Generate a basic compensation item corresponding to the target environment type based on the offset direction of the target state change curve and the target change coefficient corresponding to the target environment type;

[0089] The basic compensation items corresponding to each target environment type are combined and processed to obtain the target compensation item corresponding to the target gas sensor.

[0090] Optionally, the target environment type includes: a humidity environment type and a temperature environment type.

[0091] Optionally, the compensation value generating module 330 may be specifically used for:

[0092] Obtaining a current environmental value corresponding to a target gas sensor, and determining an environmental type of the current environmental value;

[0093] Based on the environment type of the current environment value, a corresponding target compensation sub-item is determined in the target compensation item, and an offset calculation is performed on the current environment value based on the target compensation sub-item to obtain a state offset result corresponding to the target gas sensor.

[0094] Optionally, the compensation value generating module 330 may be specifically used for:

[0095] Get the current voltage value corresponding to the target gas sensor;

[0096] The state shift result and the current voltage value are combined and processed based on a preset compensation strategy to generate a target compensation voltage value.

[0097] Optionally, the temperature and humidity compensation device of the gas sensor may further include: a post-processing module, which is used to perform compensation processing on the current voltage value corresponding to the target gas sensor based on the preset compensation strategy and the state offset result, and after generating the target compensation voltage value, obtain the gas generation standard corresponding to the target gas sensor; based on the gas generation standard and the target compensation voltage value, determine the current gas concentration corresponding to the target gas sensor.

[0098] The temperature and humidity compensation device for a gas sensor provided in an embodiment of the present invention can execute the temperature and humidity compensation method for a gas sensor provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.

[0099] Embodiment 4

[0100] Figure 6 A schematic diagram of an electronic device 410 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0101] like Figure 6As shown, the electronic device 410 includes at least one processor 420, and a memory connected to the at least one processor 420 in communication, such as a read-only memory (ROM) 430, a random access memory (RAM) 440, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 420 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 430 or the computer program loaded from the storage unit 490 to the random access memory (RAM) 440. In the RAM 440, various programs and data required for the operation of the electronic device 410 can also be stored. The processor 420, the ROM 430, and the RAM 440 are connected to each other via a bus 450. An input / output (I / O) interface 460 is also connected to the bus 450.

[0102] Multiple components in the electronic device 410 are connected to the I / O interface 460, including: an input unit 470, such as a keyboard, a mouse, etc.; an output unit 480, such as various types of displays, speakers, etc.; a storage unit 490, such as a disk, an optical disk, etc.; and a communication unit 4100, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 4100 allows the electronic device 410 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0103] The processor 420 may be a variety of general and / or dedicated processing components with processing and computing capabilities. Some examples of the processor 420 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 420 performs the various methods and processes described above, such as a temperature and humidity compensation method for a gas sensor.

[0104] The method includes:

[0105] Acquire a basic circuit structure corresponding to the target gas sensor, and generate an equivalent detection circuit corresponding to the target gas sensor based on the basic circuit structure;

[0106] Generate a target state change curve based on preset temperature and humidity setting conditions and the equivalent detection circuit, and determine a target compensation item corresponding to the target gas sensor based on the offset direction of the target state change curve and preset fitting conditions;

[0107] Based on the target compensation item, an offset calculation is performed on the current environmental value corresponding to the target gas sensor to obtain a state offset result corresponding to the target gas sensor, and based on a preset compensation strategy and the state offset result, a compensation processing is performed on the current voltage value corresponding to the target gas sensor to generate a target compensated voltage value.

[0108] In some embodiments, the temperature and humidity compensation method of the gas sensor may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 490. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 410 via the ROM 430 and / or the communication unit 4100. When the computer program is loaded into the RAM 440 and executed by the processor 420, one or more steps of the temperature and humidity compensation method of the gas sensor described above may be performed. Alternatively, in other embodiments, the processor 420 may be configured to execute the temperature and humidity compensation method of the gas sensor by any other appropriate means (e.g., by means of firmware).

[0109] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0110] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0111] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0112] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0113] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0114] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0115] The embodiment of the present application also discloses a computer program product, which includes a computer program. When the computer program is executed by a processor, the temperature and humidity compensation method of the gas sensor provided in any embodiment of the present application is implemented. The program product and the temperature and humidity compensation method of the gas sensor disclosed in each embodiment of the present application belong to the same inventive concept, so it is not repeated here.

[0116] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0117] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A temperature and humidity compensation method for a gas sensor, characterized in that: include: Acquire a basic circuit structure corresponding to the target gas sensor, and generate an equivalent detection circuit corresponding to the target gas sensor based on the basic circuit structure; Generate a target state change curve based on preset temperature and humidity setting conditions and the equivalent detection circuit, and determine a target compensation item corresponding to the target gas sensor based on the offset direction of the target state change curve and preset fitting conditions; Based on the target compensation item, an offset calculation is performed on the current environmental value corresponding to the target gas sensor to obtain a state offset result corresponding to the target gas sensor, and based on a preset compensation strategy and the state offset result, a compensation processing is performed on the current voltage value corresponding to the target gas sensor to generate a target compensated voltage value.

2. The method according to claim 1, characterized in that The generating of the target state change curve based on the preset temperature and humidity setting conditions and the equivalent detection circuit includes: Determine a preset environmental value set based on preset temperature and humidity setting conditions; wherein the preset environmental value set includes each preset environmental value pair; The test voltage value of the equivalent detection circuit under the target environmental value pair is obtained, and the target environmental value pair and the corresponding test voltage value are statistically processed to generate a target state change curve.

3. The method according to claim 1, characterized in that: The determining of the target compensation item corresponding to the target gas sensor based on the offset direction of the target state change curve and the preset fitting condition includes: Determine a target change coefficient corresponding to the target environment type based on a preset fitting condition and the target state change curve; Generate a basic compensation item corresponding to the target environment type based on the offset direction of the target state change curve and the target change coefficient corresponding to the target environment type; The basic compensation items corresponding to each target environment type are combined and processed to obtain the target compensation item corresponding to the target gas sensor.

4. The method according to claim 3, characterized in that The target environment type includes: a humidity environment type and a temperature environment type.

5. The method according to claim 1, characterized in that The performing offset calculation on the current environment value corresponding to the target gas sensor based on the target compensation item to obtain a state offset result corresponding to the target gas sensor includes: Obtaining a current environmental value corresponding to a target gas sensor, and determining an environmental type of the current environmental value; Based on the environment type of the current environment value, a corresponding target compensation sub-item is determined in the target compensation item, and an offset calculation is performed on the current environment value based on the target compensation sub-item to obtain a state offset result corresponding to the target gas sensor.

6. The method according to claim 1, characterized in that The method of compensating the current voltage value corresponding to the target gas sensor based on the preset compensation strategy and the state offset result to generate a target compensated voltage value includes: Get the current voltage value corresponding to the target gas sensor; The state shift result and the current voltage value are combined and processed based on a preset compensation strategy to generate a target compensation voltage value.

7. The method according to claim 1, characterized in that After compensating the current voltage value corresponding to the target gas sensor based on the preset compensation strategy and the state offset result to generate the target compensated voltage value, the method further includes: Obtain the gas generation standard corresponding to the target gas sensor; Based on the gas generation standard and the target compensation voltage value, a current gas concentration corresponding to the target gas sensor is determined.

8. A temperature and humidity compensation device for a gas sensor, characterized in that: include: A circuit construction module, used to obtain a basic circuit structure corresponding to the target gas sensor, and generate an equivalent detection circuit corresponding to the target gas sensor based on the basic circuit structure; A compensation term construction module, used to generate a target state change curve based on preset temperature and humidity setting conditions and the equivalent detection circuit, and determine a target compensation term corresponding to the target gas sensor based on an offset direction of the target state change curve and preset fitting conditions; The compensation value generation module is used to perform an offset calculation on the current environmental value corresponding to the target gas sensor based on the target compensation item, obtain a state offset result corresponding to the target gas sensor, and perform compensation processing on the current voltage value corresponding to the target gas sensor based on a preset compensation strategy and the state offset result to generate a target compensated voltage value.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the temperature and humidity compensation method for the gas sensor according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the temperature and humidity compensation method for a gas sensor according to any one of claims 1 to 7 when executed.

Citation Information

Cited By

  • Wavelength correction method, correction device and detection device of gas detection optical module

    CN120446049A

  • Linear closed-loop optimization method for semiconductor gas sensor with adjustable voltage dynamic compensation

    CN120948563A