Oxygen sensor deviation compensation method, device, electronic device and storage medium
By acquiring and comparing the oxygen content data under pure air and atmospheric pressure, setting error thresholds and periodic compensation corrections are performed, the data deviation problem of oxygen sensors due to changes in production processes and environments is solved, and the deviation compensation efficiency and accuracy of oxygen sensors are improved. sex.
Patent Information
- Application Number
- CN202211071489.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-02
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2042-09-02
AI Technical Summary
Due to differences in production processes and different operating environment and working conditions, existing oxygen sensors have deviations in data collection. Existing compensation methods such as the attenuation curve and atmospheric pressure reference method provided by the manufacturer have problems with inaccuracy.
By obtaining the oxygen content data of the measured environment under pure air and atmospheric pressure, setting an error threshold, periodically obtaining the oxygen value of the oxygen sensor, and compensating and correcting the abnormal data based on the oxygen content data and error thresholds in different environments, including The temperature difference and partial pressure ratio are calculated to adjust the oxygen content.
It improves the accuracy and efficiency of the deviation compensation of oxygen sensors, reduces data deviations due to changes in production processes and environments, and ensures the accuracy of the output of oxygen sensors.
Smart Images

Figure CN115420787B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of oxygen sensor deviation compensation, and in particular to an oxygen sensor deviation compensation method, device, electronic equipment and storage medium. Background Art
[0002] The structure of the electrochemical cell oxygen sensor consists of a cathode, an anode and an electrolyte. Its two electrodes, the cathode is a piece of PTFE (polytetrafluoroethylene) coated with an active catalyst, and the anode is a lead block. Oxygen enters the working electrode through the permeable membrane. When oxygen reaches the working electrode, it is immediately reduced to release hydroxide ions: O2+2H2O+4e→4OH - These hydroxide ions pass through the electrolyte to the anode (lead), where they react with lead to form the corresponding metal oxide. 2Pb+4OH→2PbO+2H2O+4e - The above two reactions generate current, and the magnitude of the current depends on the oxygen reaction rate (Faraday's law). By connecting an external load resistor to measure the potential difference, the oxygen concentration can be accurately measured. However, since the lead electrode participates in the oxidation reaction in the chemical reaction, the lead in the sensor is continuously oxidized and consumed. The gradual decrease in the amount of lead means that the electrochemical reaction gradually decays, the oxygen reaction rate of the sensor will gradually slow down, and the oxygen concentration fed back by the sensor will have a gradually lower deviation from the oxygen concentration in the environment.
[0003] In the application process, compensation and calibration are usually performed for this deviation. The general method is to perform time axis attenuation compensation based on the attenuation curve provided by the sensor manufacturer to eliminate the deviation caused by sensor attenuation. This method is effective and accurate for the compensation correction of sensors in the same batch and the initial use of sensors. However, due to differences in production processes for different batches, the compensation revision of sensors will deviate. Especially for sensors that have been used for 1 year, different attenuation will occur due to the use environment and working conditions. Since the attenuation curve provided by the manufacturer is an ideal curve for the test environment, compensation based on this curve cannot correctly correct the deviation of the sensor. In addition to this method, the atmospheric pressure reference method is also used, which is to calculate the oxygen content in the air based on the atmospheric pressure at a certain moment, and use this as a reference to correct the deviation of the sensor. Although this method can compensate for the shortcomings of the curve to a certain extent, the atmospheric pressure cannot truly reflect the oxygen content in the air. The SF6 gas leakage online monitoring and alarm device mainly monitors SF6 gas. The mass of SF6 gas is about 5.1 times that of air. When exposed to the air, it will sink rapidly and squeeze out the air, causing local hypoxia. When it reaches 10 or 100 times the dangerous value, the impact on the ambient atmospheric pressure is negligible. If the oxygen content calculated based on the atmospheric pressure is compensated at this time, it will be seriously inaccurate.
[0004] Therefore, in order to improve the deviation compensation efficiency of oxygen sensors and solve the technical problem that the existing oxygen sensors have deviations in collected data due to differences in production processes and different operating environments and working conditions, it is urgent to construct an oxygen sensor deviation compensation method. Summary of the invention
[0005] The present invention provides an oxygen sensor deviation compensation method, device, electronic equipment and storage medium, which solve the technical problem that the existing oxygen sensors have deviations in collected data due to differences in production processes and different operating environments and working conditions.
[0006] In a first aspect, the present invention provides an oxygen sensor deviation compensation method, comprising:
[0007] Step S1, obtaining first oxygen content data of a measured environment in a pure air environment, and second oxygen content data of the measured environment in an atmospheric pressure environment;
[0008] Step S2, setting the difference between the first oxygen content data and the second oxygen content data as an error threshold;
[0009] Step S3, obtaining the oxygen value of the oxygen sensor according to the preset first cycle;
[0010] Step S4, based on the oxygen content data under different environments and the error threshold, the abnormal data in the oxygen value is compensated and corrected to obtain a corrected oxygen value.
[0011] Optionally, after step S3, the method further includes:
[0012] When the temperature of the measured environment in a pure air environment is different from the temperature of the current environment, temperature difference compensation is performed on the oxygen value.
[0013] Optionally, step S4 includes:
[0014] Step S41, according to the preset first cycle, calculating the difference between the oxygen value currently obtained and the oxygen value obtained in the previous cycle to obtain the oxygen value deviation;
[0015] Step S42, determining whether the oxygen value deviation is greater than the error threshold; if not, determining that the currently obtained oxygen value is not abnormal data, and setting the oxygen value obtained in the previous cycle as deviation comparison data; the deviation comparison data is used to calculate the oxygen value deviation with the oxygen value obtained in the next cycle; if yes, determining that the currently obtained oxygen value is abnormal data;
[0016] Step S43, based on the oxygen content data under the different environments and the error threshold, the oxygen value determined as abnormal data is compensated and corrected to obtain a corrected oxygen value.
[0017] Optionally, the step S43 includes:
[0018] Step S431, calculating the oxygen content of the current environment according to the partial pressure ratio of each gas in the current environment;
[0019] Step S432, adjusting the current environment to an atmospheric pressure environment, and calculating the oxygen content in the atmospheric pressure environment;
[0020] Step S433, determine whether the difference between the oxygen content in the current environment and the oxygen content in the atmospheric pressure environment is greater than the error threshold; if not, set the average value of the oxygen content in the current environment and the oxygen content in the atmospheric pressure environment as the corrected oxygen value, and set the corrected oxygen value as the deviation comparison data; if so, return to execute step S43 after the second cycle.
[0021] In a second aspect, the present invention provides an oxygen sensor deviation compensation device, comprising:
[0022] An acquisition module, used to acquire first oxygen content data of the measured environment in a pure air environment, and second oxygen content data of the measured environment in an atmospheric pressure environment;
[0023] A setting module, configured to set a difference between the first oxygen content data and the second oxygen content data as an error threshold;
[0024] A cycle module, used to obtain the oxygen value of the oxygen sensor according to a preset first cycle;
[0025] The compensation module is used to compensate and correct the abnormal data in the oxygen value based on the oxygen content data under different environments and the error threshold to obtain a corrected oxygen value.
[0026] Optionally, the device further comprises:
[0027] The temperature difference module is used to perform temperature difference compensation on the oxygen value when there is a difference between the temperature of the measured environment in a pure air environment and the temperature of the current environment.
[0028] Optionally, the compensation module includes:
[0029] A deviation submodule, used for calculating the difference between the oxygen value currently obtained and the oxygen value obtained in the previous cycle according to the preset first cycle, to obtain the oxygen value deviation;
[0030] A judgment submodule is used to judge whether the oxygen value deviation is greater than the error threshold; if not, it is determined that the currently obtained oxygen value is not abnormal data, and the oxygen value obtained in the previous cycle is set as the deviation comparison data; the deviation comparison data is used to calculate the oxygen value deviation with the oxygen value obtained in the next cycle; if so, it is determined that the currently obtained oxygen value is abnormal data;
[0031] The correction submodule is used to compensate and correct the oxygen value determined as abnormal data based on the oxygen content data under the different environments and the error threshold to obtain a corrected oxygen value.
[0032] Optionally, the correction submodule includes:
[0033] A calculation unit, used to calculate the oxygen content of the current environment according to the partial pressure ratio of each gas in the current environment;
[0034] an adjusting unit, used for adjusting the current environment to an atmospheric pressure environment, and calculating the oxygen content in the atmospheric pressure environment;
[0035] A judgment unit is used to judge whether the difference between the oxygen content in the current environment and the oxygen content in the atmospheric pressure environment is greater than the error threshold; if not, setting the average value of the oxygen content in the current environment and the oxygen content in the atmospheric pressure environment as the corrected oxygen value, and setting the corrected oxygen value as the deviation comparison data; if so, returning to execute the correction submodule after the second cycle.
[0036] In a third aspect, the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the method provided in the first aspect are performed.
[0037] In a fourth aspect, the present application provides a storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps in the method provided in the first aspect are performed.
[0038] It can be seen from the above technical solutions that the present invention has the following advantages: the present invention provides an oxygen sensor deviation compensation method, through step S101, obtaining first oxygen content data of a measured environment in a pure air environment, and second oxygen content data of the measured environment in an atmospheric pressure environment, step S102, setting the difference between the first oxygen content data and the second oxygen content data as an error threshold, step S103, obtaining an oxygen value of the oxygen sensor according to a preset first cycle, step S104, based on the oxygen content data under different environments and the error threshold, compensating and correcting abnormal data in the oxygen value to obtain a corrected oxygen value, through an oxygen sensor deviation compensation method, solves the technical problem that the existing oxygen sensor currently has deviations in collected data due to differences in production processes and different operating environments and working conditions, and improves the deviation compensation efficiency of the oxygen sensor. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 paying creative labor.
[0040] Figure 1 This is a flow chart of a first embodiment of a method for compensating for deviation of an oxygen sensor according to the present invention;
[0041] Figure 2 This is a flow chart of a second embodiment of a method for compensating for deviation of an oxygen sensor according to the present invention;
[0042] Figure 3 A line graph showing the oxygen content value after compensation and correction of an oxygen sensor of the present invention;
[0043] Figure 4 A line graph showing the comparison results of the oxygen value after each compensation and the value measured by a standard oxygen content meter according to the present invention;
[0044] Figure 5 The figure is a structural block diagram of an embodiment of an oxygen sensor deviation compensation device of the present invention. DETAILED DESCRIPTION
[0045] The embodiments of the present invention provide an oxygen sensor deviation compensation method, device, electronic device and storage medium, which are used to solve the technical problem that the existing oxygen sensors have deviations in collected data due to differences in production processes and different operating environments and working conditions.
[0046] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions 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 embodiments described below 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 are within the scope of protection of the present invention.
[0047] For example, see Figure 1 , Figure 1 This is a flow chart of a first embodiment of an oxygen sensor deviation compensation method of the present invention, comprising:
[0048] Step S101, obtaining first oxygen content data of a measured environment in a pure air environment, and second oxygen content data of the measured environment in an atmospheric pressure environment;
[0049] Step S102, setting the difference between the first oxygen content data and the second oxygen content data as an error threshold;
[0050] In the embodiment of the present invention, a difference between the first oxygen content data and the second oxygen content data is calculated, and the difference is set as an error threshold.
[0051] Step S103, obtaining the oxygen value of the oxygen sensor according to the preset first cycle;
[0052] In an embodiment of the present invention, the oxygen value of the oxygen sensor is periodically acquired according to the preset first period, and when the temperature of the measured environment in a pure air environment is different from the temperature of the current environment, the oxygen value is compensated for the temperature difference.
[0053] Step S104, based on the oxygen content data under different environments and the error threshold, compensating and correcting the abnormal data in the oxygen value to obtain a corrected oxygen value;
[0054] In an embodiment of the present invention, according to the preset first cycle, the difference between the currently obtained oxygen value and the oxygen value obtained in the previous cycle is calculated to obtain the oxygen value deviation, and it is determined whether the oxygen value deviation is greater than the error threshold. If not, it is determined that the currently obtained oxygen value is not abnormal data. If so, it is determined that the currently obtained oxygen value is abnormal data. Based on the oxygen content data under the different environments and the error threshold, the oxygen value determined as abnormal data is compensated and corrected to obtain a corrected oxygen value.
[0055] In an oxygen sensor deviation compensation method provided in an embodiment of the present invention, through step S101, first oxygen content data of a measured environment in a pure air environment and second oxygen content data of the measured environment in an atmospheric pressure environment are obtained; in step S102, a difference between the first oxygen content data and the second oxygen content data is set as an error threshold; in step S103, an oxygen value of the oxygen sensor is obtained according to a preset first cycle; in step S104, based on the oxygen content data in different environments and the error threshold, abnormal data in the oxygen value is compensated and corrected to obtain a corrected oxygen value. Through an oxygen sensor deviation compensation method, the technical problem that the existing oxygen sensor currently has deviations in collected data due to differences in production processes and different operating environments and working conditions is solved, and the deviation compensation efficiency of the oxygen sensor is improved.
[0056] For example 2, please refer to Figure 2 , Figure 2 The present invention is a flow chart of an oxygen sensor deviation compensation method, comprising:
[0057] Step S201, obtaining first oxygen content data of a measured environment in a pure air environment, and second oxygen content data of the measured environment in an atmospheric pressure environment;
[0058] In the embodiment of the present invention, the air components in the environment are monitored and analyzed to obtain the oxygen content value O when the ambient air is pure. z , monitor the atmospheric pressure of the measured environment and calculate the oxygen content value O q .
[0059] Step S202, setting the difference between the first oxygen content data and the second oxygen content data as an error threshold;
[0060] In the embodiment of the present invention, the first oxygen content data O z and the second oxygen content data O q A difference operation is performed to obtain an error E1 between the two as one of the compensation conditions during operation, and the error E1 is set as the error threshold.
[0061] Step S203, obtaining the oxygen value of the oxygen sensor according to the preset first cycle;
[0062] In an optional embodiment, after step S203, the method further includes:
[0063] When the temperature of the measured environment in a pure air environment is different from the temperature of the current environment, temperature difference compensation is performed on the oxygen value.
[0064] In an embodiment of the present invention, the oxygen value of the oxygen sensor is periodically acquired with the preset first period as the period, and when the temperature of the measured environment in the pure air environment is different from the temperature of the current environment, the oxygen value is compensated for the temperature difference.
[0065] In the specific implementation, the oxygen value of the oxygen sensor is obtained in the same time period every week. When the sensor is online, the real-time collection of the oxygen sensor value needs to be compensated for the temperature difference according to the temperature difference of the environment.
[0066] Step S204, according to the preset first cycle, calculating the difference between the oxygen value currently obtained and the oxygen value obtained in the previous cycle to obtain the oxygen value deviation;
[0067] Step S205, determining whether the oxygen value deviation is greater than the error threshold; if not, determining that the currently obtained oxygen value is not abnormal data, and setting the oxygen value obtained in the previous cycle as deviation comparison data; the deviation comparison data is used to calculate the oxygen value deviation with the oxygen value obtained in the next cycle; if yes, determining that the currently obtained oxygen value is abnormal data;
[0068] In an embodiment of the present invention, when the oxygen value deviation is less than or equal to the error threshold, it is determined that the currently obtained oxygen value is not abnormal data, and when the oxygen value deviation is greater than the error threshold, it is determined that the currently obtained oxygen value is abnormal data.
[0069] In the specific implementation, the oxygen value deviation is compared with the error threshold. When the oxygen value deviation is less than or equal to the error threshold, it is determined that the currently obtained oxygen value is not abnormal data, and the sensor will not be compensated and corrected. The data of the previous cycle will continue to be retained as deviation comparison data, and compared with the data of the next cycle, and the oxygen value deviation from the oxygen value obtained in the next cycle will be calculated. When the oxygen value deviation is greater than the error threshold, compensation correction will be performed.
[0070] Step S206, based on the oxygen content data under different environments and the error threshold, compensating and correcting the oxygen value determined as abnormal data to obtain a corrected oxygen value;
[0071] In an optional embodiment, the step S206 includes:
[0072] Step S2061, calculating the oxygen content of the current environment according to the partial pressure ratio of each gas in the current environment;
[0073] Step S2062, adjusting the current environment to an atmospheric pressure environment, and calculating the oxygen content in the atmospheric pressure environment;
[0074] Step S2063, determine whether the difference between the oxygen content in the current environment and the oxygen content in the atmospheric pressure environment is greater than the error threshold; if not, set the average value of the oxygen content in the current environment and the oxygen content in the atmospheric pressure environment as the corrected oxygen value, and set the corrected oxygen value as the deviation comparison data; if so, return to execute step S206 after the second cycle.
[0075] In an embodiment of the present invention, the oxygen content of the current environment is calculated according to the partial pressure ratio of each gas in the current environment, the current environment is adjusted to an atmospheric pressure environment, and the oxygen content in the atmospheric pressure environment is calculated, and it is determined whether the difference between the oxygen content of the current environment and the oxygen content in the atmospheric pressure environment is greater than the error threshold. If not, the average value of the oxygen content of the current environment and the oxygen content in the atmospheric pressure environment is set as the corrected oxygen value, and the corrected oxygen value is set as the deviation comparison data. If yes, step S206 is re-executed after the second cycle.
[0076] In the specific implementation, the correction process is to first use the automatic ventilation system of the SF6 gas leakage online monitoring and alarm device to ventilate the measured environment to ensure that the air in the monitored environment is fresh. After 30 minutes of ventilation, the value of the oxygen sensor is continuously read while maintaining ventilation, and then compared with the error threshold. When the deviation is less than or equal to the error threshold E1, this change indicates a slight change in the oxygen content in the environment, and the sensor will not be compensated. If the deviation is still greater than the error threshold E1, the nitrogen, carbon dioxide, ozone, and VOC gases in the environment will be sampled, and the oxygen content in the current environment will be calculated based on the partial pressure ratio of each gas in the environment. z Stop ventilation in the environment to stabilize the air pressure in the environment. After continuous ventilation, the distribution of air components in the environment is basically consistent. At this time, the air pressure in the environment is tested. The relationship between the atmospheric pressure data and oxygen is relatively consistent, and the oxygen value O in the environment is calculated. q Relatively accurate. Calculate O z With O q Whether the difference is within the error threshold E1 range, within the error range, the oxygen content calculated by the component is compared with the oxygen content at atmospheric pressure to obtain the average value for compensation correction, and the current data of the oxygen sensor is recorded as the reference data for the next comparison cycle. If it exceeds the error threshold E1 range, the compensation will be abandoned and the compensation process will be repeated after 24 hours.
[0077] Please participate Figure 3 , Figure 3This is a line graph of oxygen content values after compensation and correction of an oxygen sensor of the present invention, wherein X is cycle / week, Y is oxygen content%, 301 is oxygen value estimated by atmospheric pressure, 302 is oxygen value estimated by air composition, 303 is oxygen value after compensation and correction, and 304 is oxygen value of oxygen sensor after temperature compensation. The oxygen sensor in the figure is an oxygen sensor that has been online for more than 1 year. It can be seen from the curve that the oxygen sensor has shown obvious nonlinear attenuation, and the final output values of the oxygen sensor after comprehensive compensation are all within the standard oxygen content range.
[0078] Please participate Figure 4 , Figure 4 It is a line graph of the comparison results of the oxygen value after each compensation and the measured value of the standard oxygen content meter of the present invention, wherein X is cycle / week, Y is the oxygen content%, 401 is the oxygen value after compensation, and 402 is the reference standard oxygen content meter. The oxygen value after each compensation is compared with the measured value of the standard oxygen content meter. The data results are basically consistent, and the error is controlled at <±1%, which has fully met the use requirements of the SF6 gas leakage online monitoring and alarm device.
[0079] In an oxygen sensor deviation compensation method provided in an embodiment of the present invention, through step S101, first oxygen content data of a measured environment in a pure air environment and second oxygen content data of the measured environment in an atmospheric pressure environment are obtained; in step S102, a difference between the first oxygen content data and the second oxygen content data is set as an error threshold; in step S103, an oxygen value of the oxygen sensor is obtained according to a preset first cycle; in step S104, based on the oxygen content data in different environments and the error threshold, abnormal data in the oxygen value is compensated and corrected to obtain a corrected oxygen value. Through an oxygen sensor deviation compensation method, the technical problem that the existing oxygen sensor currently has deviations in collected data due to differences in production processes and different operating environments and working conditions is solved, and the deviation compensation efficiency of the oxygen sensor is improved.
[0080] See also Figure 5 , Figure 5 This is a structural block diagram of an embodiment of an oxygen sensor deviation compensation device of the present invention, comprising:
[0081] An acquisition module 501 is used to acquire first oxygen content data of a measured environment in a pure air environment and second oxygen content data of the measured environment in an atmospheric pressure environment;
[0082] A setting module 502, configured to set a difference between the first oxygen content data and the second oxygen content data as an error threshold;
[0083] The cycle module 503 is used to obtain the oxygen value of the oxygen sensor according to a preset first cycle;
[0084] The compensation module 504 is used to compensate and correct the abnormal data in the oxygen value based on the oxygen content data under different environments and the error threshold to obtain a corrected oxygen value.
[0085] In an optional embodiment, the device further comprises:
[0086] The temperature difference module is used to perform temperature difference compensation on the oxygen value when there is a difference between the temperature of the measured environment in a pure air environment and the temperature of the current environment.
[0087] In an optional embodiment, the compensation module 504 includes:
[0088] A deviation submodule, used for calculating the difference between the oxygen value currently obtained and the oxygen value obtained in the previous cycle according to the preset first cycle, to obtain the oxygen value deviation;
[0089] A judgment submodule is used to judge whether the oxygen value deviation is greater than the error threshold; if not, it is determined that the currently obtained oxygen value is not abnormal data, and the oxygen value obtained in the previous cycle is set as the deviation comparison data; the deviation comparison data is used to calculate the oxygen value deviation with the oxygen value obtained in the next cycle; if so, it is determined that the currently obtained oxygen value is abnormal data;
[0090] The correction submodule is used to compensate and correct the oxygen value determined as abnormal data based on the oxygen content data under the different environments and the error threshold to obtain a corrected oxygen value.
[0091] In an optional embodiment, the correction submodule includes:
[0092] A calculation unit, used to calculate the oxygen content of the current environment according to the partial pressure ratio of each gas in the current environment;
[0093] an adjusting unit, used for adjusting the current environment to an atmospheric pressure environment, and calculating the oxygen content in the atmospheric pressure environment;
[0094] A judgment unit is used to judge whether the difference between the oxygen content in the current environment and the oxygen content in the atmospheric pressure environment is greater than the error threshold; if not, setting the average value of the oxygen content in the current environment and the oxygen content in the atmospheric pressure environment as the corrected oxygen value, and setting the corrected oxygen value as the deviation comparison data; if so, returning to execute the correction submodule after the second cycle.
[0095] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the oxygen sensor deviation compensation method as described in any of the above embodiments.
[0096] An embodiment of the present invention further provides a computer storage medium on which a computer program is stored. When the computer program is executed by the processor, the steps of the oxygen sensor deviation compensation method as described in any of the above embodiments are implemented.
[0097] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0098] In the several embodiments provided in the present application, it should be understood that the methods, devices, electronic devices and storage media disclosed in the present invention can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0099] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0100] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0101] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a readable storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned readable storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0102] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for compensating an oxygen sensor deviation, characterized in that: include: Step S1, obtaining first oxygen content data of a measured environment in a pure air environment, and second oxygen content data of the measured environment in an atmospheric pressure environment; Step S2, setting the difference between the first oxygen content data and the second oxygen content data as an error threshold; Step S3, obtaining the oxygen value of the oxygen sensor according to the preset first cycle; Step S4, based on the oxygen content data under different environments and the error threshold, compensating and correcting the abnormal data in the oxygen value to obtain a corrected oxygen value; The step S4 comprises: Step S41, according to the preset first cycle, calculating the difference between the oxygen value currently obtained and the oxygen value obtained in the previous cycle to obtain the oxygen value deviation; Step S42, determining whether the oxygen value deviation is greater than the error threshold; if not, determining that the currently obtained oxygen value is not abnormal data, and setting the oxygen value obtained in the previous cycle as deviation comparison data; the deviation comparison data is used to calculate the oxygen value deviation with the oxygen value obtained in the next cycle; if yes, determining that the currently obtained oxygen value is abnormal data; Step S43, based on the oxygen content data under the different environments and the error threshold, compensating and correcting the oxygen value determined as abnormal data to obtain a corrected oxygen value; The step S43 comprises: Step S431, calculating the oxygen content of the current environment according to the partial pressure ratio of each gas in the current environment; Step S432, adjusting the current environment to an atmospheric pressure environment, and calculating the oxygen content in the atmospheric pressure environment; Step S433, determine whether the difference between the oxygen content in the current environment and the oxygen content in the atmospheric pressure environment is greater than the error threshold; if not, set the average value of the oxygen content in the current environment and the oxygen content in the atmospheric pressure environment as the corrected oxygen value, and set the corrected oxygen value as the deviation comparison data; if so, return to execute step S43 after the second cycle.
2. The oxygen sensor deviation compensation method according to claim 1, characterized in that: After step S3, the method further includes: When the temperature of the measured environment in a pure air environment is different from the temperature of the current environment, temperature difference compensation is performed on the oxygen value.
3. An oxygen sensor deviation compensation device, characterized in that: include: An acquisition module, used to acquire first oxygen content data of the measured environment in a pure air environment, and second oxygen content data of the measured environment in an atmospheric pressure environment; A setting module, configured to set a difference between the first oxygen content data and the second oxygen content data as an error threshold; A cycle module, used to obtain the oxygen value of the oxygen sensor according to a preset first cycle; A compensation module, used to compensate and correct abnormal data in the oxygen value based on oxygen content data under different environments and the error threshold, so as to obtain a corrected oxygen value; The compensation module comprises: A deviation submodule, used for calculating the difference between the oxygen value currently obtained and the oxygen value obtained in the previous cycle according to the preset first cycle, to obtain the oxygen value deviation; A judgment submodule is used to judge whether the oxygen value deviation is greater than the error threshold; if not, it is determined that the currently obtained oxygen value is not abnormal data, and the oxygen value obtained in the previous cycle is set as the deviation comparison data; the deviation comparison data is used to calculate the oxygen value deviation with the oxygen value obtained in the next cycle; if so, it is determined that the currently obtained oxygen value is abnormal data; A correction submodule, configured to compensate and correct the oxygen value determined as abnormal data based on the oxygen content data under the different environments and the error threshold, so as to obtain a corrected oxygen value; The correction submodule comprises: A calculation unit, used to calculate the oxygen content of the current environment according to the partial pressure ratio of each gas in the current environment; an adjusting unit, used for adjusting the current environment to an atmospheric pressure environment, and calculating the oxygen content in the atmospheric pressure environment; A judgment unit is used to judge whether the difference between the oxygen content in the current environment and the oxygen content in the atmospheric pressure environment is greater than the error threshold; if not, setting the average value of the oxygen content in the current environment and the oxygen content in the atmospheric pressure environment as the corrected oxygen value, and setting the corrected oxygen value as the deviation comparison data; if so, returning to execute the correction submodule after the second cycle.
4. The oxygen sensor deviation compensation device according to claim 3, characterized in that: The device also includes: The temperature difference module is used to perform temperature difference compensation on the oxygen value when there is a difference between the temperature of the measured environment in a pure air environment and the temperature of the current environment.
5. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 2 is executed.
6. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 2 is performed.
Citation Information
Patent Citations
Intelligent power distribution room sensor multi-dimensional data fusion abnormal event detection method and system and computer readable storage medium
CN114328075A
SF6 gas leakage monitoring alarm system
CN204287036U