A method, system, device, and medium for calibrating a gas sensor
By dividing the gas sensor into sub-regions within a confined space and establishing concentration correlation coefficients, a two-step calibration strategy is adopted to calibrate the gas sensor, solving the problem of low sensor calibration efficiency, achieving efficient and accurate multi-sensor calibration, and reducing costs.
Patent Information
- Application Number
- CN202511527207.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-24
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-10-24
AI Technical Summary
Existing gas sensor calibration methods are inefficient, especially when calibrating multiple sensors simultaneously, resulting in high costs and difficulty in guaranteeing accuracy, particularly due to the high cost of standard gas configuration and usage.
By dividing the enclosed space into multiple sub-regions according to the concentration level of the target gas, establishing the concentration correlation coefficient between the sub-regions, adopting a two-step correction strategy to identify and correct abnormal sensors, and combining historical data of normal sensors to generate a second correction coefficient, the overall optimization of the sensor is achieved.
This technology enables efficient calibration of multiple sensors, reduces costs, improves calibration efficiency and accuracy, and ensures measurement consistency and reliability of sensors in real-world application environments.
Smart Images

Figure CN120992872B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of gas sensor calibration technology, specifically to a gas sensor calibration method, system, device, and medium. Background Technology
[0002] In the field of gas concentration monitoring, the accuracy and reliability of sensors directly affect the validity of monitoring results. Because sensors are subject to various factors during the manufacturing process, leading to deviations in measurement results, it is necessary to calibrate gas sensors before they leave the factory to ensure their measurement accuracy.
[0003] When calibrating multiple gas sensors manufactured at the factory, standard gases are typically used. This involves introducing a standard gas of known concentration into the gas sensor and calculating calibration parameters based on the deviation between the sensor's output value and the standard value. However, in practical applications, the preparation and use of standard gases are costly, and calibrating multiple gas sensors individually using standard gases is inefficient when multiple sensors need to be calibrated simultaneously. Summary of the Invention
[0004] This application provides a calibration method, system, device, and medium for gas sensors, which improves the efficiency of calibrating multiple gas sensors manufactured at the factory.
[0005] In a first aspect, this application provides a method for calibrating a gas sensor. The method includes: acquiring the concentration level of a target gas at various locations within a confined space; dividing the confined space into regions according to the concentration levels to generate multiple sub-regions, each sub-region containing a sensor to be calibrated; generating a concentration correlation coefficient between the target gases in each sub-region based on the concentration levels of the target gases in each sub-region, the concentration correlation coefficient being used to characterize the relationship between the target gas concentrations in the sub-regions; acquiring a first concentration of the target gas measured by each sensor to be calibrated; determining, based on the concentration correlation coefficient and the first concentration, an abnormal sensor among the multiple sensors to be calibrated, and a first correction parameter for the abnormal sensor; calibrating the abnormal sensor according to the first correction parameter to obtain a calibrated target sensor; acquiring a second concentration of the target gas measured by each target sensor; generating a second correction coefficient for each target sensor based on the concentration correlation coefficient and combining the first and second concentrations of the target gas measured by other sensors among the multiple sensors to be calibrated (excluding the abnormal sensor); calibrating the target sensor according to the second correction coefficient to obtain a calibrated target sensor.
[0006] By adopting the above technical solution, a theoretical benchmark for sensor calibration is provided by dividing the confined space into multiple sub-regions according to the concentration level of the target gas and establishing concentration correlation coefficients between the sub-regions. Based on this, a two-step calibration strategy is employed: first, abnormal sensors are identified and calibrated using the concentration correlation coefficients to ensure the basic measurement capabilities of all sensors; then, historical data from normal sensors are combined to generate a second calibration coefficient for precise calibration, achieving overall sensor optimization. This calibration method can calibrate multiple sensors simultaneously and acquire abnormal sensor data in a timely manner, reducing calibration costs. Furthermore, by considering the gas distribution characteristics in actual application environments, it improves the efficiency of calibrating multiple manufactured gas sensors.
[0007] Optionally, the step of determining, based on the concentration correlation coefficient and the first concentration, the abnormal sensors among the plurality of sensors to be calibrated, and the first calibration parameter of the abnormal sensors, includes: determining, based on the concentration correlation coefficient, the theoretical ratio between the first concentration of the target gas measured by each of the sensors to be calibrated and the first concentration of the target gas measured by other sensors to be calibrated; calculating, based on the first concentration of the target gas measured by each of the sensors to be calibrated, the actual ratio between the first concentrations of the target gas measured by each of the sensors to be calibrated; combining the standard ratio and the actual ratio, determining the abnormal sensors among the plurality of sensors to be calibrated, and calculating the first calibration parameter of the abnormal sensors based on the ratio difference between the theoretical ratio and the actual ratio, wherein the first calibration parameter is used to adjust the output characteristics of the abnormal sensors so that the measurement results of the abnormal sensors conform to the concentration relationship reflected by the theoretical ratio.
[0008] By employing the above technical solution, and through calculating and comparing the theoretical and actual ratios between the sensors to be calibrated, abnormal sensors can be accurately identified, avoiding the limitations of traditional methods that require pre-setting fixed thresholds to determine sensor abnormalities. Simultaneously, calculating the first correction parameter using the difference between the theoretical and actual ratios makes the calibration process more targeted, precisely adjusting the output characteristics of abnormal sensors to ensure their measurement results conform to the theoretical concentration relationship determined by the concentration correlation coefficient, thereby improving the accuracy and reliability of sensor calibration.
[0009] Optionally, the step of combining the standard ratio and the actual ratio to determine the abnormal sensor among the plurality of sensors to be calibrated includes: calculating the deviation between the actual ratio and the corresponding theoretical ratio between the first concentration of each sensor to be calibrated and other sensors to be calibrated, obtaining a plurality of deviation values; for each sensor to be calibrated, counting the number of deviation values between each sensor to be calibrated and other sensors to be calibrated that exceed a first preset threshold; when the number of deviation values between any sensor to be calibrated and other sensors to be calibrated that exceed the first preset threshold is greater than a first preset number, the sensor to be calibrated is determined to be an abnormal sensor.
[0010] By adopting the above technical solution, and by calculating the deviation between the actual ratio and the theoretical ratio of each sensor to be calibrated and other sensors, and counting the number of deviations exceeding a first preset threshold, a dual judgment mechanism is introduced (the deviation value must exceed the first preset threshold, and the number of deviations must be greater than the first preset number). This enables more reliable identification of abnormal sensors. This judgment method based on multi-dimensional comparison avoids misjudgments caused by individual accidental factors, improves the accuracy and stability of abnormal sensor identification, and provides a reliable prerequisite for subsequent sensor calibration.
[0011] Optionally, the step of combining the first concentration and second concentration of the target gas measured by other sensors (excluding the abnormal sensor) among the multiple sensors to be calibrated to generate a second correction coefficient for each target sensor includes: determining the theoretical ratio between the first concentration and the second concentration of the target gas measured by each of the other sensors according to the concentration correlation coefficient, thereby obtaining multiple theoretical ratios; obtaining the actual ratio between the first concentration and the second concentration of the target gas measured by each of the other sensors, thereby obtaining multiple actual ratios; counting the number of deviations between each actual ratio and the corresponding theoretical ratio that are less than a second preset threshold; and generating a second correction coefficient for each target sensor based on the second concentration when the number of deviations less than the second preset threshold exceeds a second preset number.
[0012] By employing the above technical solution, and through analysis and comparison of the first and second concentration data from sensors other than the abnormal sensor, the deviation between the actual ratio and the theoretical ratio is calculated. A quantity threshold judgment condition is set to ensure that the basic data for generating the second correction coefficient has sufficient reliability. This cross-validation mechanism based on data from multiple normal sensors avoids the influence of individual sensor data anomalies on the correction results, improves the accuracy of the second correction coefficient, and thus guarantees the reliability of the final calibration result.
[0013] Optionally, generating a second correction coefficient for each of the target sensors based on the second concentration includes: determining a theoretical concentration ratio between the second concentrations of the target gas measured by each of the target sensors based on the concentration correlation coefficient; calculating an actual concentration ratio between the second concentrations of the target gas measured by each of the target sensors; and generating a second correction coefficient for each of the target sensors by combining the theoretical concentration ratio and the actual concentration ratio.
[0014] By employing the above technical solution, and by calculating the theoretical and actual concentration ratios of the second concentration between target sensors, and combining these two ratios to generate a second correction coefficient, precise adjustment of the sensor output characteristics is achieved. This correction method, based on actual measurement data and theoretical relationships, not only considers the relative relationships between sensors but also maintains consistency with the theoretical model. This allows the corrected sensors to better reflect the gas concentration distribution characteristics in the actual environment, improving the measurement accuracy and consistency of the entire sensor network.
[0015] Optionally, generating a second correction coefficient for each target sensor by combining the theoretical concentration ratio and the actual concentration ratio includes: calculating the ratio difference between the actual concentration ratio and the corresponding theoretical concentration ratio between the second concentrations of the target gas measured by each target sensor; generating multiple original correction factors for each target sensor based on the ratio difference; performing a weighted average processing on the multiple original correction factors to obtain a weighted correction factor for each target sensor; and calculating a second correction coefficient for each target sensor based on the weighted correction factor, wherein the second correction coefficient includes a gain correction coefficient and an offset correction coefficient, the gain correction coefficient being used to perform multiplicative correction on the measurement results of each target sensor, and the offset correction coefficient being used to perform additive correction on the measurement results of each target sensor, so that the target gas concentration measured by each target sensor under different measurement environments conforms to the theoretical concentration relationship between each sub-region.
[0016] By employing the above technical solution, an initial correction factor is generated by calculating the difference between the actual concentration ratio and the theoretical concentration ratio. This initial factor is then weighted and averaged to obtain a weighted correction factor, avoiding potential biases caused by a single correction factor. Simultaneously, a dual correction mechanism, including gain correction and offset correction coefficients, is generated based on the weighted correction factor. This mechanism adjusts the linearity of the sensor and compensates for zero-point drift, achieving comprehensive optimization of the sensor's measurement characteristics. This integrated correction method ensures that the target sensor maintains consistency with the theoretical concentration relationship under different measurement environments, significantly improving the measurement accuracy and stability of the sensor network.
[0017] Optionally, after obtaining the calibrated target sensor, the method further includes: acquiring the operating status data of the calibrated target sensor; acquiring the measurement data of the calibrated target sensor using a preset communication method; determining whether the calibrated target sensor is abnormal based on the measurement data; and providing an abnormality warning through audible and visual indication when an abnormality is detected; wherein the audible and visual indication includes at least one of LED indicator display, buzzer alarm, and text prompt.
[0018] By adopting the above technical solution, a sensor operation monitoring mechanism is established by acquiring the real-time operating status and measurement data of the calibrated target sensors, enabling timely detection of sensor anomalies. Multiple audible and visual indication methods, such as LED indicator lights, buzzer alarms, and text prompts, are used to provide intuitive and diverse alarm methods, helping staff quickly identify and handle sensor anomalies, ensuring the continuous and reliable operation of the sensor network, and improving the system's operation and maintenance efficiency.
[0019] Secondly, this application provides a calibration system for a gas sensor, the system comprising: a first acquisition module, a generation module, a second acquisition module, a first calibration module, and a second calibration module; wherein,
[0020] The first acquisition module is used to acquire the concentration level of the target gas at various locations within a confined space, and divide the confined space into multiple sub-regions according to the concentration levels, with a sensor to be calibrated located in each sub-region. The generation module is used to generate a concentration correlation coefficient between the target gas in each sub-region based on the concentration level of the target gas in each sub-region, the concentration correlation coefficient being used to characterize the relationship between the target gas concentrations in the sub-regions. The second acquisition module is used to acquire the first concentration of the target gas measured by each sensor to be calibrated, and based on the concentration correlation coefficient and the first concentration, determine multiple sensors to be calibrated. The system identifies an abnormal sensor among the calibrated sensors and provides a first calibration parameter for the abnormal sensor. A first calibration module is used to calibrate the abnormal sensor according to the first calibration parameter to obtain a calibrated target sensor. A second calibration module is used to obtain the second concentration of the target gas measured by each target sensor, and based on the concentration correlation coefficient, combine the first and second concentrations of the target gas measured by other sensors (excluding the abnormal sensor) among the multiple sensors to be calibrated to generate a second calibration coefficient for each target sensor. The target sensor is then calibrated according to the second calibration coefficient to obtain a calibrated target sensor.
[0021] Thirdly, this application provides an electronic device that adopts the following technical solution: including a processor, a memory, a user interface, and a network interface, wherein the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to execute a computer program of any of the above-described gas sensor calibration methods.
[0022] Fourthly, this application provides a computer-readable storage medium that stores a computer program capable of being loaded by a processor and executing any of the above-mentioned calibration methods for gas sensors.
[0023] In summary, this application includes at least one of the following beneficial technical effects:
[0024] By dividing the confined space into multiple sub-regions according to the concentration level of the target gas and establishing concentration correlation coefficients between the sub-regions, a theoretical benchmark is provided for sensor calibration. Based on this, a two-step calibration strategy is adopted: first, abnormal sensors are identified and calibrated using the concentration correlation coefficients to ensure the basic measurement capabilities of all sensors; then, combined with historical data from normal sensors, a second calibration coefficient is generated for precise calibration, achieving overall sensor optimization. This calibration method can calibrate multiple sensors simultaneously and acquire abnormal sensor data in a timely manner, reducing calibration costs and improving the efficiency of calibrating multiple gas sensors manufactured at the factory. Attached Figure Description
[0025] Figure 1 This is a schematic diagram of a system structure provided in an embodiment of this application;
[0026] Figure 2 This is a detailed flowchart of the key interlock mechanism of a gas sensor calibration system provided in this application embodiment;
[0027] Figure 3 This is a schematic flowchart of a gas sensor calibration method provided in an embodiment of this application;
[0028] Figure 4 This is a schematic diagram of the structure of a gas sensor calibration system provided in an embodiment of this application;
[0029] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0030] Explanation of reference numerals in the attached figures: 1000, electronic device; 1001, processor; 1002, communication bus; 1003, user interface; 1004, network interface; 1005, memory. Detailed Implementation
[0031] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0032] In the description of the embodiments in this application, words such as "illustrative," "for example," or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "illustrative," "for example," or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Rather, the use of words such as "illustrative," "for example," or "for example" is intended to present the relevant concepts in a specific manner.
[0033] like Figure 1 As shown, Figure 1 This is a schematic diagram of a system structure provided in an embodiment of this application. The calibration system of this invention includes an MCU main controller, an AP20 core control board, a communication interface module, and a peripheral circuit module. The communication interface module includes two CAN interfaces (CAN1, CAN2), two RS232 interfaces, one RS485 interface, a digital I / O interface, a USB interface, and two 100Mbps network interfaces. The peripheral circuit module includes a normally open relay output circuit, a 12V-24V adjustable power supply output circuit, an LED indicator circuit, a buzzer circuit, a rotary encoder switch circuit, and a four-way keypad input circuit. The MCU main controller and the AP20 core control board work together; the MCU is responsible for basic data acquisition and control functions, while the AP20 is responsible for complex data processing and network communication functions.
[0034] The specific working process of this invention is as follows: First, the system divides the standard test chamber into multiple sub-regions according to a preset gas concentration gradient, typically 3-5 test regions, with the sensor to be calibrated placed in each region. By strictly controlling the air intake and ventilation conditions, a stable concentration distribution can be formed within the test chamber, maintaining the gas concentration in each sub-region at a preset ratio. For example, by adjusting the air intake flow rate and exhaust port opening at different locations, the concentration ratio between adjacent regions can be manually set, thereby establishing a concentration correlation coefficient between sub-regions. This active control-based method can create a predictable and repeatable test environment, providing a reliable reference benchmark for sensor calibration. For example, for two adjacent regions A and B, if the concentration in region A is 1.5 times that in region B, then the concentration correlation coefficient between them is 1.5.
[0035] To prevent accidental operation, the system incorporates a button interlock mechanism based on a rotary encoder switch. For example... Figure 2 As shown, Figure 2This is a detailed flowchart of the button interlock mechanism of a gas sensor calibration system provided in this application embodiment. After system startup, it first performs program initialization, completing basic parameter configuration and memory allocation, and then checks the external power supply status to ensure the system operating voltage is within the normal range. The system determines the current operating mode by judging the position of the DIP switch, corresponding to three different operating scenarios: when the DIP switch position is 1, the cleaning button function is activated, the system executes the cleaning sampling program, and judges in real time whether the cleaning sampling data is normal; when the DIP switch position is 2, the standard sampling button is activated, the system executes the calibration sampling program, and monitors the normality of the sampling data; when the DIP switch position is 3, another standard sampling button is activated, the system executes the calibration sampling program, and monitors the normality of the sampling data. Different DIP switch positions correspond to different calibration concentration levels. In each operating mode, the system will judge in real time whether the corresponding button is pressed. If the button is triggered, the corresponding sampling program is executed. The sampling data is judged by the system. If the data is abnormal, the system will provide an abnormality prompt through LED indicator flashing, buzzer alarm, etc.; if the data is normal, the system will display a normal status and upload and store the data. Regardless of whether the data is normal or not, the system will eventually return to the state of continuing the next round of operations, maintaining continuous monitoring. The entire process ensures the accuracy of operations and the reliability of data through a strict key interlock mechanism.
[0036] This design not only enables automatic switching and data acquisition across multiple concentration levels, but also effectively prevents misoperation through a combination of hardware interlocks and software control, improving the efficiency and accuracy of calibration. During execution, the system employs multiple judgment and real-time monitoring mechanisms to ensure the reliability of calibration data, providing a reliable guarantee for obtaining accurate calibration parameters. This process design fully considers various situations that may be encountered in actual production environments, and through standardized operating procedures and a robust anomaly handling mechanism, it significantly improves the reliability and efficiency of calibration work.
[0037] This invention is not only applicable to smoke detectors, but also to various sensor products requiring multi-point calibration, such as combustible gas detectors, toxic gas detectors, and industrial gas transmitters. By modifying the software configuration, it can quickly adapt to the calibration needs of different types of sensors without altering the hardware, demonstrating strong versatility and practical value. The system employs a dual-processor architecture, providing powerful processing capabilities, combined with a comprehensive anomaly detection and alert mechanism, ensuring the reliability and accuracy of the calibration process. Furthermore, through software reuse and a universal hardware platform design, development and production costs are significantly reduced.
[0038] Figure 3 This is a schematic flowchart illustrating a gas sensor calibration method provided in an embodiment of this application. Figure 3 As shown, the method includes S101-S105:
[0039] S101: Obtain the concentration level of the target gas at various locations within the confined space, divide the confined space into regions according to the concentration level, and generate multiple sub-regions. Each sub-region is equipped with a sensor to be calibrated.
[0040] In order to achieve unified calibration of multiple sensors to be calibrated, this embodiment introduces a standard gas into a closed space to form a concentration gradient distribution, that is, there are multiple sub-regions, each with a different gas concentration, and there is a fixed concentration ratio between different sub-regions.
[0041] Based on the acquired concentration level distribution, the confined space can be divided into multiple sub-regions. Specifically, areas with similar concentrations can be grouped into the same sub-region, ensuring that the target gas concentration within the same sub-region is essentially consistent. For example, areas with concentration differences within a preset range (e.g., ±5%) can be grouped into the same sub-region. In this way, the confined space can be divided into multiple sub-regions, such as high-concentration sub-regions, medium-concentration sub-regions, and low-concentration sub-regions. Sensors to be calibrated are placed within each sub-region, ensuring that the target gas concentrations in the environments of different sensors vary.
[0042] This spatial partitioning method based on concentration gradients avoids the problem of needing to configure multiple standard gases of different concentrations, which is required in traditional methods. By introducing the standard gas all at once, multiple sensors to be calibrated can be calibrated simultaneously. Furthermore, since the target gas concentration is basically stable within each sub-region, the sensors to be calibrated within the same sub-region are kept in the same measurement environment, providing a reliable basis for subsequent comparative analysis based on sensor measurements. In addition, the target gas concentrations between different sub-regions exhibit a definite correlation, which can be used to verify the measurement accuracy of the sensors to be calibrated.
[0043] S102, based on the concentration level of the target gas in each sub-region, generate the concentration correlation coefficient between the target gases in each sub-region. The concentration correlation coefficient is used to characterize the relationship between the target gas concentrations in the sub-regions.
[0044] After dividing the confined space into sub-regions, it is necessary to determine the quantitative relationship of the target gas concentration between each sub-region. This relationship can be characterized by the concentration correlation coefficient. The concentration correlation coefficient reflects the proportional relationship of the target gas concentration between different sub-regions. This proportional relationship has relative stability after the gas diffusion reaches a steady state and can serve as an important basis for evaluating the measurement accuracy of the sensor to be calibrated.
[0045] When gas diffusion reaches a steady state, the gas concentration ratio between different sub-regions remains relatively stable. This stable ratio relationship can be characterized by the concentration correlation coefficient. Specifically, for any two sub-regions A and B, the concentration correlation coefficient can be expressed as: KAB = CA / CB, where CA and CB represent the target gas concentrations in sub-regions A and B, respectively. For example, according to the gas diffusion law, when the distance ratio between a high-concentration sub-region and a medium-concentration sub-region is 2:1, the concentration ratio between these two sub-regions may be approximately 2:1. In this way, a concentration correlation coefficient matrix can be established between all sub-regions.
[0046] The concentration correlation coefficient is a relative value and is not affected by specific concentration values, which can reduce the influence of absolute errors during the measurement process. Secondly, when gas diffusion reaches a steady state, the concentration correlation coefficient has relative stability, which can be used to determine whether the measurement of the sensor to be calibrated is abnormal. In addition, by comparing the actual concentration ratio between different sub-regions measured by the sensor to be calibrated with the theoretical concentration correlation coefficient, sensors with measurement abnormalities can be quickly identified.
[0047] The concentration correlation coefficient matrix is an n×n matrix (where n is the number of sub-regions). Each element Kij in the matrix represents the concentration ratio between the i-th and j-th sub-regions. Since the concentration ratio has an inverse property, Kij = 1 / Kji, and Kij = 1 when i = j. This matrix form facilitates subsequent computer processing and automated calibration. A steady state refers to a state where the diffusion of the target gas in a confined space reaches dynamic equilibrium, and the gas concentration in each sub-region remains relatively constant.
[0048] S103, obtain the first concentration of the target gas measured by each sensor to be calibrated, and based on the concentration correlation coefficient, determine the abnormal sensor among the multiple sensors to be calibrated, and the first correction parameter of the abnormal sensor.
[0049] After establishing the concentration correlation coefficient matrix, preliminary measurements need to be performed on each sensor to be calibrated to identify potentially abnormal sensors and perform preliminary corrections. When the gas concentration distribution reaches a stable state, all sensors to be calibrated are controlled to simultaneously perform their first concentration measurement to obtain the first concentration value. Since the theoretical relationship between the target gas concentrations in each sub-region is known, abnormal sensors can be identified by comparing the consistency between the actual measurement results of the sensors to be calibrated and the theoretical relationship.
[0050] Specifically, for two sensors to be calibrated located in sub-regions A and B, their measured first concentrations are MA and MB, respectively. Based on the previously established concentration correlation coefficient KAB, the theoretical ratio between the measurements of these two sensors should be KAB. By calculating the ratio of the actual measured values RAB = MA / MB and comparing it with the theoretical ratio KAB, the degree of deviation between the measurement results of the two sensors can be obtained. When the difference between the actual ratio and the theoretical ratio exceeds a preset threshold, it indicates that at least one sensor is abnormal. For example, if |RAB-KAB| / KAB > 10%, an abnormality is considered to exist.
[0051] To accurately identify which specific sensor is malfunctioning, each sensor to be calibrated needs to be compared pairwise with all other sensors. If a sensor shows abnormalities in comparisons with multiple other sensors, then that sensor can be determined as malfunctioning. Specifically, the number of times each sensor exceeds a preset threshold during comparisons with other sensors can be counted. When the number of times the threshold is exceeded exceeds a preset number (e.g., 50% of the total number of comparisons), the sensor is identified as malfunctioning.
[0052] For identified anomalous sensors, a first calibration parameter needs to be calculated for preliminary calibration. This first calibration parameter can be determined by comparing the measured values of the anomalous sensor with those of normal sensors. Let δ be the average deviation between the actual ratio of the anomalous sensor and the theoretical ratio of all normal sensors; then 1 / (1+δ) can be used as the first calibration parameter for the anomalous sensor. By multiplying the measured value of the anomalous sensor by this calibration parameter, its measurement results can be preliminarily made to conform to the theoretical relationship reflected by the concentration correlation coefficient.
[0053] The preset threshold is the allowable deviation range determined based on the performance indicators of the sensor to be calibrated and the requirements of the actual application. The preset quantity is a statistical threshold used to determine sensor abnormalities; its setting needs to balance the sensitivity and reliability of the detection. The first calibration parameter is a preliminary correction coefficient used to coarsely calibrate the measurement results of abnormal sensors, making them basically conform to the theoretical relationship of concentration distribution.
[0054] Based on the above embodiments, as an optional implementation, in S103, based on the concentration correlation coefficient and according to the first concentration, the abnormal sensor among the multiple sensors to be calibrated is determined, and the first calibration parameter of the abnormal sensor specifically includes S31-S33:
[0055] S31, based on the concentration correlation coefficient, determine the theoretical ratio between the first concentration of the target gas measured by each sensor to be calibrated and the first concentration of the target gas measured by other sensors to be calibrated.
[0056] First, based on the established concentration correlation coefficients, the theoretical concentration ratio between any two sensors to be calibrated can be determined. For sensors located in sub-regions i and j, the theoretical ratio between their measured values should be equal to the corresponding concentration correlation coefficient Kij. For example, if the concentration correlation coefficient between two sub-regions is 2:1, then the theoretical ratio of the measured values of sensors located in these two sub-regions should also be 2:1. In this way, a matrix of theoretical ratio relationships between all sensors to be calibrated can be established.
[0057] S32, calculate the actual ratio between the first concentrations of the target gas measured by each sensor to be calibrated, based on the first concentration of the target gas measured by each sensor to be calibrated.
[0058] Next, based on the first concentration values actually measured by each sensor to be calibrated, the actual ratio between the sensors is calculated. Let the first concentration values measured by sensors i and j be Mi and Mj, respectively, then the actual ratio between them is Rij = Mi / Mj. By calculating all possible sensor pairings, a complete actual ratio matrix can be obtained. This matrix reflects the relative relationships of the sensor group in actual measurements.
[0059] S33, combining the standard ratio and the actual ratio, identify the abnormal sensor among the multiple sensors to be calibrated, and calculate the first correction parameter of the abnormal sensor based on the ratio difference between the theoretical ratio and the actual ratio. The first correction parameter is used to adjust the output characteristics of the abnormal sensor so that the measurement result of the abnormal sensor conforms to the concentration relationship reflected by the theoretical ratio.
[0060] By comparing the theoretical ratio with the actual ratio, abnormal sensors can be identified. For each identified abnormal sensor, the ratio between it and a normal sensor needs to be calculated to obtain its respective first correction parameter. Suppose there are m abnormal sensors (numbered i=1,2,...,m) and n normal sensors (numbered j=1,2,...,n). For each abnormal sensor i: when the measured value Mi of abnormal sensor i is multiplied by its correction parameter Ki, it should satisfy: (Ki×Mi) / Mj=Kij, where Mi / Mj=Rij is the actual ratio between abnormal sensor i and normal sensor j, and Kij is the corresponding theoretical ratio.
[0061] Therefore, for abnormal sensor i, its calibration parameter when paired with normal sensor j is calculated as: Ki = Kij / Rij. Then, the average value of Ki values when abnormal sensor i is paired with all normal sensors is taken as the first calibration parameter of the abnormal sensor: Ki = (∑(Kij / Rij)) / n, where j ranges from 1 to n.
[0062] For example, assuming 3 abnormal sensors (numbered 1, 2, and 3) are identified, and there are 4 normal sensors (numbered 4, 5, 6, and 7), then: the first calibration parameter of abnormal sensor 1 is: K1 = (K14 / R14 + K15 / R15 + K16 / R16 + K17 / R17) / 4; the first calibration parameter of abnormal sensor 2 is: K2 = (K24 / R24 + K25 / R25 + K26 / R26 + K27 / R27) / 4; the first calibration parameter of abnormal sensor 3 is: K3 = (K34 / R34 + K35 / R35 + K36 / R36 + K37 / R37) / 4.
[0063] Based on the above embodiments, as an optional implementation, in S33, combining the standard ratio and the actual ratio, determining the abnormal sensors among the multiple sensors to be calibrated specifically includes S331-S333:
[0064] S331, calculate the deviation between the actual ratio and the corresponding theoretical ratio between the first concentration of each sensor to be calibrated and other sensors to be calibrated, and obtain multiple deviation values.
[0065] First, the measurement deviation between each pair of sensors to be calibrated needs to be calculated. Suppose there are n sensors to be calibrated. For any two sensors i and j, their measured first concentrations are Mi and Mj, respectively. The actual ratio between them is Rij = Mi / Mj. Simultaneously, the theoretical ratio Kij can be obtained based on the concentration correlation coefficient of the sub-regions where sensors i and j are located. Comparing the actual ratio with the theoretical ratio, the relative deviation can be calculated: δij = |Rij / Kij⁻¹|. In this way, an n×n deviation matrix can be established, where each element δij represents the measurement deviation between the corresponding sensor pair.
[0066] S332, For each sensor to be calibrated, count the number of deviation values between each sensor to be calibrated and other sensors to be calibrated that exceed a first preset threshold.
[0067] After obtaining the deviation matrix, a statistical analysis of the degree of anomaly needs to be performed on each sensor to be calibrated. A first preset threshold (e.g., 5%) is set as the criterion for judging a single comparison. For sensor i to be calibrated, the deviation values δij (j=1,2,...,n, j≠i) when it is paired with all other sensors are examined. The number of times the deviation exceeds the first preset threshold is counted and recorded as the abnormal pairing count Ni of that sensor. The abnormal pairing count reflects the degree of inconsistency between that sensor and other sensors.
[0068] S333, when the number of deviation values between any sensor to be calibrated and other sensors to be calibrated exceeds the first preset threshold is greater than the first preset number, the sensor to be calibrated is determined to be an abnormal sensor.
[0069] To determine whether a sensor is malfunctioning, a first preset number is introduced as a criterion. When the number of abnormal pairings Ni of the sensor i to be calibrated is greater than the first preset number, it is determined to be an abnormal sensor. The setting of the first preset number needs to take into account the total number of sensors and the system's fault tolerance requirements. For example, when there are a total of 10 sensors, the first preset number can be set to 3, that is, when the measurement deviation between a sensor and more than 3 other sensors exceeds the first preset threshold, the sensor is considered malfunctioning.
[0070] S104, The abnormal sensor is calibrated according to the first calibration parameter to obtain the calibrated target sensor.
[0071] Specifically, for each identified anomalous sensor, its measured first concentration value is multiplied by the corresponding first correction parameter. Let the first concentration value of the anomalous sensor be M, and the first correction parameter be K, then the corrected concentration value M' = M × K. For example, if an anomalous sensor measures a first concentration value of 100 ppm and its first correction parameter is 0.8, then the corrected concentration value is 80 ppm. This correction makes the ratio between the measurement results of the anomalous sensor and the measurement results of other normal sensors closer to the theoretical concentration correlation coefficient.
[0072] The calibrated sensor needs to be validated to ensure the calibration effect. This can be done by recalculating the ratios of measurements from the calibrated sensor to those from other sensors to verify that these ratios fall within the expected range. If significant deviations still exist after calibration, multiple iterative calibrations or more complex calibration methods may be required. This validation process ensures the effectiveness of the calibration and also provides a basis for further optimization if necessary.
[0073] S105: Obtain the second concentration of the target gas measured by each target sensor. Based on the concentration correlation coefficient, combine the first and second concentrations of the target gas measured by other sensors (excluding abnormal sensors) among the multiple sensors to be calibrated to generate the second correction coefficient of each target sensor. Correct the target sensor according to the second correction coefficient to obtain the calibrated target sensor.
[0074] After the initial calibration of the faulty sensor, a second measurement and precise calibration are required to ensure that the measurement results across all sensors meet the expected concentration correlation. Specifically, all sensors (including the calibrated faulty sensor and the normal sensor) are controlled to simultaneously perform a second concentration measurement to obtain a second concentration value.
[0075] First, verify whether the second concentration value measured by the calibrated abnormal sensor satisfies the concentration correlation relationship with that of the normal sensor. Suppose the calibrated abnormal sensor is located in sub-region A, and the normal sensor is located in sub-region B. Their measured second concentration values are MA2 and MB2, respectively. Then, the ratio MA2 / MB2 should be close to the theoretical concentration correlation coefficient KAB. If this ratio falls within the allowable error range of the theoretical value (e.g., ±5%), it indicates that the first calibration has achieved good results.
[0076] Next, the calibrated abnormal sensors are paired and compared. Suppose two calibrated abnormal sensors are located in sub-regions A and B, and their measured second concentration values are MA2 and MB2, respectively. The ratio MA2 / MB2 should be close to the theoretical concentration correlation coefficient KAB. If this ratio deviates from the theoretical value beyond the allowable error range (e.g., ±5%), a second calibration is required.
[0077] Based on the pairwise comparison results between abnormal sensors, a second correction coefficient is calculated for each abnormal sensor. Specifically, for abnormal sensor i, the concentration ratio deviation when paired with all other abnormal sensors is statistically analyzed. Let Kij be the theoretical concentration correlation coefficient between sensor i and abnormal sensor j, and let Rij2 = Mi2 / Mj2 be the actual measured second concentration ratio. Then, the relative deviation coefficient δij = (Kij - Rij2) / Kij can be calculated. The average value of the deviation coefficients for all paired cases is taken as the second correction coefficient Ki for that abnormal sensor.
[0078] Applying the second correction coefficient to each anomalous sensor yields the final calibrated sensor. For the measured value M of anomalous sensor i, its calibrated value M' = M × Ki. This method ensures that the measurement results across all anomalous sensors meet the expected concentration correlation.
[0079] This precise calibration method among abnormal sensors has significant advantages: by optimizing the overall relationship of the abnormal sensor group, the consistency of measurement results among abnormal sensors can be further improved while ensuring the relationship with normal sensors, making the calibration results more reliable.
[0080] The second correction coefficient is a correction parameter obtained by pairwise comparison of abnormal sensors, used for the final precise calibration of the abnormal sensors. A calibrated sensor, after two calibrations, is one whose measurement results simultaneously satisfy the expected concentration correlation with normal sensors and other abnormal sensors. This method enables the precise calibration of a group of abnormal sensors, ensuring stable and reliable measurement results in practical applications.
[0081] Based on the above embodiments, as an optional implementation, in S105, the generation of the second correction coefficient for each target sensor by combining the first and second concentrations of the target gas measured by the other sensors (excluding the faulty sensor) among the multiple sensors to be calibrated specifically includes S51-S54:
[0082] S51, based on the concentration correlation coefficient, determine the theoretical ratio between the first and second concentrations of the target gas measured by other sensors, and obtain multiple theoretical ratios.
[0083] First, a theoretical relationship model between the two measurements needs to be established. Based on the stability characteristics of the concentration correlation coefficient, under the same measurement conditions, the ratio of concentration values measured by the same sensor at different times should be consistent with the concentration correlation coefficient of its respective sub-region. Let the concentration values obtained by normal sensor i in the first and second measurements be Mi1 and Mi2, respectively. Then, based on the concentration correlation coefficient, the theoretical ratio Ti = Mi1 / Mi2 can be determined. Performing this theoretical ratio calculation for all non-abnormal sensors yields a set of theoretical reference values reflecting the stability of the measurement environment.
[0084] S52, obtain the actual ratio between the first concentration and the second concentration of the target gas measured by other sensors, and obtain multiple actual ratios.
[0085] Next, the actual ratios of the two measurements taken by each non-abnormal sensor are obtained. For a normal sensor i, the actual ratio is calculated as Ri = Mi1 / Mi2. These actual ratios reflect the actual response characteristics of the sensor during the two measurements. By comparing the actual ratios with the theoretical ratios, the stability of the measurement environment can be evaluated.
[0086] S53, count the number of actual ratios whose deviations from the corresponding theoretical ratios are less than the second preset threshold.
[0087] To quantify the stability of measurement conditions, it is necessary to count the number of sensors that meet the stability requirements. For each non-abnormal sensor, calculate the relative deviation between its actual ratio and the theoretical ratio: δi = |Ri / Ti⁻¹|. Set a second preset threshold (e.g., 3%) as the stability judgment standard, and count the number N of sensors with a deviation less than this threshold. The selection of the second preset threshold needs to consider the system's measurement accuracy requirements and the allowable range of environmental fluctuations.
[0088] S54, when the number of deviations less than the second preset threshold exceeds the second preset number, then a second correction coefficient for each target sensor is generated based on the second concentration.
[0089] When the number N of sensors meeting the stability requirements exceeds the second preset number, it indicates that the measurement environment has sufficient stability, and a second calibration can be performed. The setting of the second preset number should take into account the total number of non-abnormal sensors and the system's reliability requirements. For example, when there are 8 non-abnormal sensors, the second preset number can be set to 6, which requires at least 75% of the non-abnormal sensors to exhibit stable measurement characteristics.
[0090] Based on the above embodiments, as an optional implementation, in S54, generating the second correction coefficient for each target sensor according to the second concentration specifically includes S541-S543:
[0091] S541, based on the concentration correlation coefficient, determine the theoretical concentration ratio between the second concentrations of the target gas measured by each target sensor.
[0092] First, a theoretical concentration relationship model between the sensors needs to be established based on the concentration correlation coefficient. For any two target sensors i and j, the theoretical concentration ratio Kij can be determined based on the concentration correlation coefficient of their respective sub-regions. This theoretical ratio reflects the numerical relationship that the measurements of the two sensors should satisfy under ideal conditions. For example, if sensors i and j are located in different sub-regions, and their concentration correlation coefficient indicates that the concentration at sensor i should be 1.2 times the concentration at sensor j, then the theoretical ratio Kij = 1.2.
[0093] S542, calculate the actual concentration ratio between the second concentrations of the target gas measured by each target sensor.
[0094] Next, we need to analyze the relationship between the actual measured values of the sensors. Let the concentration values obtained by target sensors i and j in the second measurement be Mi2 and Mj2, respectively. Then, the actual concentration ratio between them is Rij = Mi2 / Mj2. This actual ratio reflects the actual response characteristics of the sensor under the current measurement conditions. By performing this analysis on all target sensor pairs, a complete matrix of actual concentration ratios can be established.
[0095] S543, combining the theoretical concentration ratio and the actual concentration ratio, generates the second correction coefficient for each target sensor.
[0096] Based on the theoretical and actual ratios, a second correction coefficient can be calculated for each target sensor. For target sensor i, its correction coefficient when paired with other sensors j can be expressed as: Kij² = Kij / Rij. When the sensor is paired with multiple other sensors, the average of the correction coefficients in all pairing cases is taken as the final second correction coefficient.
[0097] Based on the above embodiments, as an optional implementation, in S543, the generation of the second correction coefficient for each target sensor by combining the theoretical concentration ratio and the actual concentration ratio specifically includes S5431-S5434:
[0098] S5431, calculate the difference between the actual concentration ratio and the corresponding theoretical concentration ratio between the second concentrations of the target gas measured by each target sensor.
[0099] First, it is necessary to quantify the degree of deviation between sensor measurements. For any two target sensors i and j, the actual concentration ratio of their second measurements is Rij = Mi² / Mj² (where Mi² and Mj² are the second concentration values measured by sensors i and j, respectively), and the theoretical concentration ratio is Kij (determined by the concentration correlation coefficient). By calculating the ratio difference Bij = Rij / Kij, the degree of deviation between the actual measurement and the theoretical expectation can be reflected. When Bij is not equal to 1, it indicates that the sensor needs to be calibrated.
[0100] S5432 generates multiple raw correction factors for each target sensor based on the ratio difference.
[0101] Based on the ratio difference, an initial correction factor can be generated for each target sensor. For sensor i, its initial correction factor when paired with sensor j can be expressed as Fij = 1 / Bij. These initial correction factors reflect the direction and magnitude that the sensor needs to be adjusted for. However, since the measurement reliability may vary between different sensor pairs, a weighted processing mechanism is required.
[0102] S5433 performs a weighted average of multiple original correction factors to obtain the weighted correction factor for each target sensor.
[0103] To improve calibration accuracy, the original calibration factors are weighted and averaged. The weighting coefficients can be determined based on factors such as the sensor's historical performance and measurement stability. Let Wij be the weight when sensor i is paired with sensor j. Then, the weighted calibration factor for sensor i can be expressed as: Fi = ∑(Wij × Fij) / ∑Wij, where j represents the numbers of all target sensors other than i. Weighting can highlight the influence of highly reliable measurement results and reduce interference from unstable measurements.
[0104] S5434, calculate the second correction coefficient for each target sensor based on the weighted correction factor. The second correction coefficient includes a gain correction coefficient and an offset correction coefficient. The gain correction coefficient is used to perform multiplicative correction on the measurement results of each target sensor, and the offset correction coefficient is used to perform additive correction on the measurement results of each target sensor, so that the target gas concentration measured by each target sensor under different measurement environments conforms to the theoretical concentration relationship between each sub-region.
[0105] The final calibration process combines gain correction and offset correction. The gain correction coefficient Gi is used to correct the sensor's measurement sensitivity and can be directly obtained through a weighted correction factor: Gi = Fi. The offset correction coefficient Oi is used to compensate for the sensor's zero-point drift and can be determined by analyzing the sensor's measurement characteristics in the low concentration range. For the measured value Mi of sensor i, the corrected concentration value Ci can be expressed as: Ci = Gi × Mi + Oi.
[0106] After obtaining the calibrated target sensor, the process further includes: acquiring the operating status data of the calibrated target sensor; acquiring the measurement data of the calibrated target sensor using a preset communication method; determining whether the calibrated target sensor is abnormal based on the measurement data; and providing an abnormality warning through audible and visual indication when an abnormality is detected. The audible and visual indication includes at least one of LED indicator display, buzzer alarm, and text prompt.
[0107] To ensure the continuous and stable operation of the calibrated sensor network, a real-time monitoring and anomaly early warning mechanism needs to be established. By continuously monitoring the sensor's operating status and measurement data, combined with diverse anomaly alert methods, sensor faults can be detected and addressed promptly, ensuring the reliability of gas concentration monitoring.
[0108] After sensor calibration, the system needs to continuously acquire sensor operating status data, including parameters such as sensor operating voltage, ambient temperature, and humidity. This status data reflects the sensor's working environment and hardware condition, and is an important basis for determining whether the sensor is in normal working condition. For example, when the sensor's operating voltage is lower than the specified threshold or environmental parameters are outside the normal range, it may lead to inaccurate measurement results.
[0109] The measurement data is acquired using a preset communication method, such as RS485 bus, wireless communication (e.g., ZigBee, LoRa), or other industrial communication protocols. The system acquires real-time measurement values from each sensor according to a preset sampling period and transmits the data to the central processing unit for analysis. This networked data acquisition method ensures the real-time performance and scalability of the monitoring system.
[0110] When judging anomalies in the collected measurement data, the analysis mainly focuses on the following aspects: First, check whether the data is within a reasonable range; data exceeding the measurement range will be judged as abnormal. Second, analyze the trend of data changes; sudden changes or unreasonable fluctuations in data may also indicate sensor abnormalities. In addition, it is necessary to compare the measurement results of adjacent sensors to check whether they conform to the expected concentration distribution relationship.
[0111] When the system detects a sensor malfunction, it will issue alarms through various audible and visual indicators. LED indicator lights can use different colors and flashing patterns to represent different types of malfunctions: for example, a solid red light indicates a serious fault, while a flashing yellow light indicates a minor malfunction. A buzzer provides audible cues through different alarm tones and frequencies, enabling on-site personnel to promptly notice the anomaly. Simultaneously, the system can also display text prompts on the display terminal, detailing the type and location of the malfunction and providing handling suggestions.
[0112] Based on the above method, this application also discloses a calibration system for a gas sensor, such as... Figure 4 As shown, Figure 4 This is a schematic diagram of a gas sensor calibration system provided in an embodiment of this application. The system includes: a first acquisition module, a generation module, a second acquisition module, a first calibration module, and a second calibration module. The first acquisition module acquires the concentration levels of the target gas at various locations within a confined space, divides the confined space into multiple sub-regions according to the concentration levels, and provides a sensor to be calibrated in each sub-region. The generation module generates a concentration correlation coefficient between the target gases in each sub-region based on the concentration levels of the target gas in each sub-region. The concentration correlation coefficient characterizes the relationship between the target gas concentrations in the sub-regions. The second acquisition module acquires the target gas concentration measured by each sensor to be calibrated. The system firstly determines the abnormal sensors among multiple sensors to be calibrated based on the first concentration of the gas, using the concentration correlation coefficient as a basis, and identifies the first calibration parameters for these abnormal sensors. A first calibration module calibrates the abnormal sensors according to the first calibration parameters to obtain the calibrated target sensors. A second calibration module acquires the second concentration of the target gas measured by each target sensor, and based on the concentration correlation coefficient, combines the first and second concentrations of the target gas measured by the other sensors (excluding the abnormal sensors) to generate second calibration coefficients for each target sensor. The target sensors are then calibrated according to these second calibration coefficients to obtain the calibrated target sensors.
[0113] It should be noted that the system provided in the above embodiments is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the system and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0114] Please see Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 5As shown, the electronic device 1000 may include: at least one processor 1001, at least one network interface 1004, a user interface 1003, a memory 1005, and at least one communication bus 1002.
[0115] The communication bus 1002 is used to realize the connection and communication between these components.
[0116] The user interface 1003 may include a display screen and a camera. Optionally, the user interface 1003 may also include a standard wired interface and a wireless interface.
[0117] The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0118] The processor 1001 may include one or more processing cores. The processor 1001 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1005, and by calling data stored in the memory 1005. Optionally, the processor 1001 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 1001 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed on the screen; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 1001 and may be implemented as a separate chip.
[0119] The memory 1005 may include random access memory (RAM) or read-only memory. Optionally, the memory 1005 may include a non-transitory computer-readable storage medium. The memory 1005 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 1005 may also be at least one storage device located remotely from the aforementioned processor 1001. Figure 5 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for a gas sensor calibration method.
[0120] exist Figure 5 In the electronic device 1000 shown, the user interface 1003 is mainly used to provide an input interface for the user and to obtain the user input data; while the processor 1001 can be used to call an application program stored in the memory 1005 for a calibration method of a gas sensor. When executed by one or more processors, the electronic device performs one or more of the methods described in the above embodiments.
[0121] An electronic device readable storage medium stores instructions that, when executed by one or more processors, cause the electronic device to perform one or more of the methods described in the above embodiments.
[0122] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0123] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0124] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some service interfaces; indirect couplings or communication connections between devices or units may be electrical or other forms.
[0125] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0126] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0127] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks, or optical disks.
[0128] The foregoing description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Other embodiments of this disclosure will be readily apparent to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described herein. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.
Claims
1. A calibration method for a gas sensor, characterized in that, The method includes: The concentration levels of the target gas at various locations within a confined space are obtained. The confined space is then divided into regions according to the concentration levels, generating multiple sub-regions. Each sub-region is equipped with a sensor to be calibrated. Based on the concentration level of the target gas in each sub-region, a concentration correlation coefficient is generated between the target gases in each sub-region, and the concentration correlation coefficient is used to characterize the relationship between the target gas concentrations in the sub-regions; The first concentration of the target gas measured by each of the sensors to be calibrated is obtained. Based on the concentration correlation coefficient, the abnormal sensors among the multiple sensors to be calibrated are determined according to the first concentration, and the first correction parameters of the abnormal sensors are determined. The abnormal sensor is calibrated according to the first calibration parameter to obtain the calibrated target sensor; The second concentration of the target gas measured by each of the target sensors is obtained. Based on the concentration correlation coefficient, the first concentration and the second concentration of the target gas measured by other sensors (excluding the abnormal sensor) among the multiple sensors to be calibrated are combined to generate a second correction coefficient for each of the target sensors. The target sensors are then calibrated according to the second correction coefficient to obtain the calibrated target sensors.
2. The calibration method for a gas sensor according to claim 1, characterized in that, Based on the concentration correlation coefficient, and according to the first concentration, the method for determining the abnormal sensors among the plurality of sensors to be calibrated, and the first calibration parameters of the abnormal sensors, includes: Based on the concentration correlation coefficient, determine the theoretical ratio between the first concentration of the target gas measured by each of the sensors to be calibrated and the first concentration of the target gas measured by other sensors to be calibrated; Based on the first concentration of the target gas measured by each of the sensors to be calibrated, calculate the actual ratio between the first concentrations of the target gas measured by each of the sensors to be calibrated; By combining the standard ratio and the actual ratio, an abnormal sensor is identified among the multiple sensors to be calibrated. Based on the ratio difference between the theoretical ratio and the actual ratio, a first correction parameter for the abnormal sensor is calculated. The first correction parameter is used to adjust the output characteristics of the abnormal sensor so that the measurement results of the abnormal sensor conform to the concentration relationship reflected by the theoretical ratio.
3. The calibration method for a gas sensor according to claim 2, characterized in that, The method of combining the standard ratio and the actual ratio to identify abnormal sensors among the multiple sensors to be calibrated includes: The deviation between the actual ratio and the corresponding theoretical ratio between the first concentration of each of the sensors to be calibrated and the other sensors to be calibrated is calculated to obtain multiple deviation values; For each of the sensors to be calibrated, count the number of times the deviation value between each sensor to be calibrated and other sensors to be calibrated exceeds a first preset threshold; When the number of deviation values between any sensor to be calibrated and other sensors to be calibrated exceeds a first preset threshold is greater than a first preset number, the sensor to be calibrated is identified as an abnormal sensor.
4. The calibration method for a gas sensor according to claim 1, characterized in that, The step of combining the first concentration and the second concentration of the target gas measured by other sensors (excluding the faulty sensor) among the multiple sensors to be calibrated to generate a second correction coefficient for each target sensor includes: Based on the concentration correlation coefficient, the theoretical ratio between the first concentration and the second concentration of the target gas measured by each of the other sensors is determined, resulting in multiple theoretical ratios; The actual ratio between the first concentration and the second concentration of the target gas measured by each of the other sensors is obtained, resulting in multiple actual ratios; The number of actual ratios whose deviations from the corresponding theoretical ratios are less than a second preset threshold is counted. When the number of deviations less than the second preset threshold exceeds the second preset number, a second correction coefficient is generated for each of the target sensors based on the second concentration.
5. The calibration method for a gas sensor according to claim 4, characterized in that, The step of generating a second correction coefficient for each of the target sensors based on the second concentration includes: Based on the concentration correlation coefficient, the theoretical concentration ratio between the second concentrations of the target gas measured by each of the target sensors is determined; Calculate the actual concentration ratio between the second concentrations of the target gas measured by each of the target sensors; By combining the theoretical concentration ratio and the actual concentration ratio, a second correction coefficient is generated for each of the target sensors.
6. The calibration method for a gas sensor according to claim 5, characterized in that, The step of combining the theoretical concentration ratio and the actual concentration ratio to generate a second correction coefficient for each of the target sensors includes: Calculate the difference between the actual concentration ratio and the corresponding theoretical concentration ratio between the second concentrations of the target gas measured by each of the target sensors; For each of the target sensors, multiple original correction factors are generated based on the ratio difference; The weighted average of the multiple original correction factors is performed to obtain the weighted correction factor for each of the target sensors; Based on the weighted correction factor, a second correction coefficient is calculated for each of the target sensors, wherein the second correction coefficient includes a gain correction coefficient and an offset correction coefficient. The gain correction coefficient is used to perform multiplicative correction on the measurement results of each of the target sensors, and the offset correction coefficient is used to perform additive correction on the measurement results of each of the target sensors, so that the target gas concentration measured by each of the target sensors under different measurement environments conforms to the theoretical concentration relationship between each sub-region.
7. The calibration method for a gas sensor according to claim 1, characterized in that, After obtaining the calibrated target sensor, the process further includes: Obtain the operating status data of the calibrated target sensor; The measurement data of the calibrated target sensor are acquired using a preset communication method; Based on the measurement data, it is determined whether the calibrated target sensor is abnormal. When an abnormality is detected, an abnormality is indicated by sound and light; wherein, the sound and light indication includes at least one of LED indicator display, buzzer alarm and text prompt.
8. A calibration system for a gas sensor, characterized in that, The system includes: a first acquisition module, a generation module, a second acquisition module, a first correction module, and a second correction module; wherein, The first acquisition module is used to acquire the concentration level of the target gas at various locations in the closed space, divide the closed space into regions according to the concentration level, generate multiple sub-regions, and each sub-region is equipped with a sensor to be calibrated. The generation module is used to generate a concentration correlation coefficient between the target gases in each of the sub-regions based on the concentration level of the target gases in each of the sub-regions. The concentration correlation coefficient is used to characterize the relationship between the concentrations of the target gases in the sub-regions. The second acquisition module is used to acquire the first concentration of the target gas measured by each of the sensors to be calibrated, and based on the concentration correlation coefficient, determine the abnormal sensor among the multiple sensors to be calibrated, and the first correction parameter of the abnormal sensor according to the first concentration. The first calibration module is used to calibrate the abnormal sensor according to the first calibration parameters to obtain the calibrated target sensor; The second calibration module is used to obtain the second concentration of the target gas measured by each of the target sensors, and based on the concentration correlation coefficient, combine the first concentration and the second concentration of the target gas measured by other sensors among the multiple sensors to be calibrated, excluding the abnormal sensor, to generate a second calibration coefficient for each of the target sensors, and calibrate the target sensors according to the second calibration coefficient to obtain the calibrated target sensors.
9. An electronic device, characterized in that, The device includes a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer program is stored that can be loaded by a processor and executed as described in any one of claims 1-7.
Citation Information
Patent Citations
Calibration and calibration method and system of gas sensor
CN113533641A
Oxygen sensor data calibration method and device, electronic equipment and storage medium
CN115856059A