Sensor gas response curve adjusting method and system

By building a pre-trained BP neural network model in the gas sensor, the problems of multi-calibration point calibration and temperature and humidity compensation are solved, and high-precision gas response curve calibration and temperature and humidity compensation are achieved.

CN119886234APending Publication Date: 2025-04-25HENAN HANWEI ELECTRONICS
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411817496.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

Existing gas sensors are difficult to meet the accuracy requirements under multi-calibration point calibration mode, and temperature and humidity compensation are difficult to achieve batch operation.

Method used

By pre-constructing the BP neural network model, the model is trained using the training data set, and the trained model is built into the sensor's control chip to achieve rapid calibration of the gas response curve and temperature and humidity compensation.

Benefits of technology

It realizes high-precision calibration of the entire gas range by the sensor within different temperature and humidity ranges, simplifies the calibration process, improves the calibration speed, and realizes temperature and humidity compensation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119886234A_ABST
    Figure CN119886234A_ABST
Patent Text Reader

Abstract

The invention provides a sensor gas response curve adjusting method and system, and the method comprises the steps: building a BP neural network model in advance, and training the BP neural network model through a training data set; the trained BP neural network model is built in a control chip of the sensor; when the sensor is calibrated, after a concentration calculation value output by the sensor is compared with a real environment gas concentration value, calibration information of the sensor is written in, and a gas response curve of the sensor is generated; after the trained BP neural network model is built in a control chip of the sensor, the sensor performs sensor sensitivity calibration and gas response curve adjustment on a test concentration value downloaded by a test tool according to the characteristics of the sensor; therefore, the deviation between the output concentration value of the sensor and the concentration value of the environment meets the precision requirement. According to the invention, rapid calibration of the gas sensor and introduction of compensation parameters are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of sensor technology, and in particular to a method and system for adjusting a gas response curve of a sensor. Background Art

[0002] With the progress of society, the industrial manufacturing industry has flourished, and a large number of new industrial applications have emerged. In most manufacturing industries, a large amount of flammable, explosive, toxic and harmful gases will be produced. Therefore, in these operating plants, gas sensors corresponding to the gases to be detected must be used. In order to ensure the accuracy of gas detection in various concentration ranges, in the sensor production process, manufacturers generally use a variety of standard concentration gases to calibrate the detector, and perform built-in curve fitting according to the linear relationship between multiple concentration points; for sensors with poor linearity of the response curve, manufacturers generally increase the number of calibration concentration points. This method increases the difficulty of sensor calibration, and it is impossible to determine whether such calibration meets the accuracy requirements of the site. Moreover, for certain types of sensors, it is impossible to correctly select the calibration points, and accurate calibration cannot be performed.

[0003] For sensors that are sensitive to the temperature and humidity of the working environment, temperature and humidity compensation is required before the sensors leave the factory. However, due to the wide temperature and humidity range of the sensor application environment and the differences between sensors, it is difficult to complete temperature and humidity compensation for all sensors, resulting in problems such as abnormal equipment alarms on site or accuracy that cannot meet requirements.

[0004] In order to solve the above problems, people have been seeking an ideal technical solution. Summary of the invention

[0005] Based on this, it is necessary to provide a sensor gas response curve adjustment method and system to address the above-mentioned technical problems, so as to solve the calibration method of multiple calibration points of gas sensors and the temperature compensation method that cannot be operated in batches, and to realize the rapid calibration of gas sensors and the introduction of compensation parameters.

[0006] In order to achieve the above object, the present invention provides a method for adjusting a gas response curve of a sensor in a first aspect, comprising: Pre-construct a BP neural network model, and train the BP neural network model using a training data set; wherein the training data set is: the collected AD values ​​of the responses of N1 sensors of the same model at N2 different temperatures, N3 different humidities, N4 sensors in a clean air environment, and the AD values ​​of the responses of N6 sensors of the same model under N5 different gas concentrations to be measured, and after data pre-processing, a multi-dimensional array (N1, N2, N3, N4, N5, N6) is established; The trained BP neural network model is built into the control chip of the sensor; When calibrating the sensor, after comparing the calculated value of the ambient concentration output by the sensor with the actual ambient gas concentration value, the calibration information of the sensor is written to generate the gas response curve of the sensor; Perform sensor gas response curve correction: After the trained BP neural network model is built into the sensor's control chip, the sensor performs sensor sensitivity calibration and gas response curve adjustment based on the test concentration value transmitted by the test tooling according to the sensor characteristics to ensure that the deviation between the sensor output concentration value and the ambient concentration value meets the accuracy requirements.

[0007] In order to achieve the above object, the second aspect of the present invention provides a sensor gas response curve adjustment system, comprising: A model training unit is used to pre-build a BP neural network model and train the BP neural network model using a training data set; wherein the training data set is: the collected AD values ​​of the responses of N1 sensors of the same model at N2 different temperatures, N3 different humidities, N4 sensors in a clean air environment, and the AD values ​​of the responses of N6 sensors of the same model under N5 different gas concentrations to be measured, and after data pre-processing, a multi-dimensional array (N1, N2, N3, N4, N5, N6) is established; A model implantation unit is used to embed the trained BP neural network model into the control chip of the sensor; The test tool is used to compare the calculated value of the ambient concentration output by the sensor with the actual ambient gas concentration value when calibrating the sensor, write the calibration information of the sensor, and generate the gas response curve of the sensor; It is also used to correct the gas response curve of the sensor: after the trained BP neural network model is built into the control chip of the sensor, the sensor performs sensor sensitivity calibration and gas response curve adjustment based on the test concentration value transmitted by the test tooling according to the sensor characteristics to ensure that the deviation between the sensor output concentration value and the ambient concentration value meets the accuracy requirements.

[0008] In order to achieve the above-mentioned purpose, the third aspect of the present invention provides a computer device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; the memory is used to store computer programs; the processor is used to implement the steps of the sensor gas response curve adjustment method as described above when executing the program stored in the memory.

[0009] In order to achieve the above-mentioned object, the fourth aspect of the present invention provides a readable storage medium having instructions stored thereon, which, when executed by one or more processors, enables the processors to perform the steps of the sensor gas response curve adjustment method as described above.

[0010] The beneficial effects of the present invention are: By implanting a pre-trained BP neural network model in the sensor, the present invention can calibrate only for a single specified gas concentration value during the sensor calibration process, thereby satisfying the high-precision calibration of the entire gas range within the temperature and humidity range of the sensor, achieving the use of less-used gases to be detected in the calibration process, accelerating the calibration speed, and realizing temperature and humidity compensation for the gas sensor. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 It is a training block diagram of the BP neural network model of the present invention.

[0012] Figure 2 This is a framework diagram for uploading sensor data and downloading model key data in the method of the present invention. DETAILED DESCRIPTION

[0013] The technical solution of the present invention is further described in detail below through specific implementation methods.

[0014] Example 1 This embodiment provides a method for adjusting a gas response curve of a sensor, comprising: Pre-construct a BP neural network model, and train the BP neural network model using a training data set; wherein the training data set is: the collected AD values ​​of the responses of N1 sensors of the same model at N2 different temperatures, N3 different humidities, N4 sensors in a clean air environment, and the AD values ​​of the responses of N6 sensors of the same model under N5 different gas concentrations to be measured, and after data pre-processing, a multi-dimensional array (N1, N2, N3, N4, N5, N6) is established; The trained BP neural network model is built into the control chip of the sensor; When calibrating the sensor, after comparing the calculated value of the ambient concentration output by the sensor with the actual ambient gas concentration value, the calibration information of the sensor is written to generate the gas response curve of the sensor; Perform sensor gas response curve correction: After the trained BP neural network model is built into the sensor's control chip, the sensor performs sensor sensitivity calibration and gas response curve adjustment based on the test concentration value transmitted by the test tooling according to the sensor characteristics to ensure that the deviation between the sensor output concentration value and the ambient concentration value meets the accuracy requirements.

[0015] Specifically, Figure 1 As shown, the BP neural network model includes 4 input layers, 3 hidden layers and 1 output layer; When training the BP neural network model using the training data set, execute: Assign a random number within the interval (-1, 1) to each connection weight of the BP neural network model, set the error function, and specify the calculation target value and the maximum number of iterations; Take the sensor response AD value of the sensor in a clean air environment, the sensor response AD value of the sensor in the gas environment to be measured, the temperature of the environment where the sensor is located, and the humidity of the environment where the sensor is located as inputs, and the output concentration of the sensor in the gas environment to be measured as the output, and input them into the BP neural network model for model training to calculate the inputs and outputs of each neuron in the hidden layer; Obtain the actual output Oi through training, compare it with the expected output value Bi, calculate the model error D = Bi - Oi, and use the partial derivatives of the error function of each neuron in the output layer and the outputs of each neuron in the hidden layer to correct the connection weights; Judge whether the model error meets the requirements. When the model error reaches the preset accuracy or the number of learning times is greater than the set maximum number, end the training; otherwise, select the next set of temperature and humidity numerical samples for the next round of learning; The transfer function adopted by the BP neural network model is a bipolar sigmoid function.

[0016] The data preprocessing includes outlier processing and normalized data processing; among them, outlier processing includes the judgment and supplementation of outliers, and the specific operation is: If AD(i) > AD(i - 1) and AD(i) < AD(i + 1), then AD(i) = AD(i); Otherwise, AD(i) = 1 / 2(AD(i + 1) + AD(i - 1)); Among them, AD(i) is the sensor response AD value during the outlier judgment polling process, and i is the serial number of the AD value during the outlier judgment polling process; The method for normalized data processing is: AD(i) = (AD(i) - AD(min)) / (AD(max) - AD(i)) Among them, AD(i) is the sensor output signal value collected this time, AD(min) is the minimum value of the sensor response AD value collected, and AD(max) is the maximum value of the sensor response AD value collected.

[0017] Embedding the trained BP neural network model into the control chip of the sensor includes: The connection weights from the input layer to the hidden layer and from the hidden layer to the output layer of the BP neural network model are preset in the control chip of the sensor, and the output value is obtained through the forward calculation logic, that is, the operation of presetting the model fitting parameters and the concentration calculation logic in the sensor control chip is completed. Among them, the output value obtained through the forward calculation logic is: output value = Σ (hidden layer * connection weight); hidden value = Σ (input layer * connection weight).

[0018] like Figure 2 As shown, the method for calibrating the sensor is: Place the sensors with the trained BP neural network model in batches in the calibration air box. After aging, set the calibration air box to the specified temperature and humidity, and record the output response AD value of the sensor in clean air. Then, introduce the gas of specified concentration to be measured into the calibration gas box. After stabilization, collect the concentration value calculated and output by the sensor; The calibration tool compares the concentration value calculated by the sensor and the concentration value of the specified gas. If the difference between the concentration value calculated by the sensor and the concentration value of the specified gas is within the precision requirement of the sensor manufacturing, it is a qualified product and is retained. Otherwise, it is an unqualified product and is rejected, thereby realizing the screening of sensors. The calibration tool transmits the concentration value of the specified gas to the sensor to complete the writing of the sensor calibration information.

[0019] The method for calibrating the sensor gas response curve is: The sensor sensitivity calibration formula is: K=Cit / Cot; Sensor output value Co=K*Ci; Wherein, K is the sensitivity calibration coefficient, which is calculated as the ratio of the standard gas concentration Cit in the calibration gas box to the sensor output concentration value Cot; After the sensor completes the sensitivity calibration, the AD value of the sensor in clean air and the detected temperature, humidity and the current AD value of the sensor are input into the preset BP neural network model. The sensor outputs the concentration value Ci, which is then multiplied by the sensitivity calibration value coefficient K to complete the adaptation of the sensor gas response model.

[0020] The sensor is a gas sensor that has an obvious response to a specified gas, or is greatly affected by temperature and humidity, such as a catalytic combustion gas sensor, an infrared gas sensor, a semiconductor gas sensor, a laser gas sensor, etc.

[0021] Example 2 This embodiment provides a specific method for constructing a training data set.

[0022] Six catalytic combustion gas sensors were placed in the calibration gas box. The target gas was methane. After the sensors were powered on and aged, the ambient temperature range was set to -40°C to 70°C, the temperature interval was 10°C, the humidity range was 0%RH to 100%RH, the humidity interval was 10%RH, and the concentration of the gas to be tested in the environment was 0%LEL to 80%LEL, the concentration interval was 10%LEL. The first catalytic combustion sensor is under -40℃ temperature environment, different humidity and different methane gas concentration, the sensor output signal value is shown in the following table:

[0023] The first catalytic combustion sensor is under -30℃ temperature environment, different humidity and different methane gas concentration, the sensor output signal value is shown in the following table:

[0024] The first catalytic combustion sensor is under 70℃ temperature environment, different humidity and different methane gas concentration, the sensor output signal value is shown in the following table:

[0025] It should be noted that the sensor output signal values ​​of the second to sixth catalytic combustion sensors under different temperatures, different humidity environments and different methane gas concentration environments are as shown in the above table and will not be described in detail here.

[0026] After data preprocessing, all output signal values ​​of the six catalytic combustion sensors were established as a training data set. The training data set was divided into a training set and a test set at 70% and 30%, and imported into the BP neural network model for model training.

[0027] Example 2 Based on the same inventive concept, the embodiment of the present application also provides a sensor gas response curve adjustment system for implementing the sensor gas response curve adjustment method involved in embodiment 1. The implementation solution provided by the system to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more sensor gas response curve adjustment system embodiments provided below can refer to the limitations of the sensor gas response curve adjustment method above, and will not be repeated here.

[0028] In one embodiment, a sensor gas response curve adjustment system includes: A model training unit is used to pre-build a BP neural network model and train the BP neural network model using a training data set; wherein the training data set is: the collected AD values ​​of the responses of N1 sensors of the same model at N2 different temperatures, N3 different humidities, N4 sensors in a clean air environment, and the AD values ​​of the responses of N6 sensors of the same model under N5 different gas concentrations to be measured, and after data pre-processing, a multi-dimensional array (N1, N2, N3, N4, N5, N6) is established; A model implantation unit is used to embed the trained BP neural network model into the control chip of the sensor; The test tool is used to compare the calculated value of the ambient concentration output by the sensor with the actual ambient gas concentration value when calibrating the sensor, write the calibration information of the sensor, and generate the gas response curve of the sensor; It is also used to correct the gas response curve of the sensor: after the trained BP neural network model is built into the control chip of the sensor, the sensor performs sensor sensitivity calibration and gas response curve adjustment based on the test concentration value transmitted by the test tooling according to the sensor characteristics to ensure that the deviation between the sensor output concentration value and the ambient concentration value meets the accuracy requirements.

[0029] Example 3 On the basis of the above embodiments, this embodiment provides a computer device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; the memory is used to store computer programs; the processor is used to implement the steps of the sensor gas response curve adjustment method as described in Example 1 when executing the program stored in the memory.

[0030] Example 4 Based on the above embodiments, this embodiment provides a readable storage medium having instructions stored thereon, which, when executed by one or more processors, enables the processors to perform the steps of the sensor gas response curve adjustment method as described in Embodiment 1.

[0031] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0032] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0033] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for adjusting a sensor gas response curve, characterized in that: Including: Pre - construct a BP neural network model and train the BP neural network model using a training data set; wherein, the training data set is a multi - dimensional array of (N1, N2, N3, N4, N5, N6) established after data pre - processing of the sensor response AD values of N1 sensors of the same model collected at N2 different temperatures, N3 different humidities, N4 sensor response AD values in a clean air environment, and the sensor response AD values of N6 sensors of the same model in N5 different environments of待测 gas concentrations (Note: "待测气体" can be translated as "test gas"). Embed the trained BP neural network model into the control chip of the sensor; When calibrating the sensor, after comparing the calculated value of the ambient concentration output by the sensor with the true ambient gas concentration value, write the calibration information of the sensor to generate the gas response curve of the sensor; Perform sensor gas response curve correction: After embedding the trained BP neural network model into the control chip of the sensor, according to the sensor characteristics, the sensor calibrates the sensitivity and adjusts the gas response curve for the test concentration value transmitted by the test fixture to ensure that the deviation between the output concentration value of the sensor and the ambient concentration value meets the accuracy requirements.

2. The sensor gas response curve adjustment method according to claim 1, characterized in that: The BP neural network model includes 4 input layers, 3 hidden layers, and 1 output layer; When training the BP neural network model using the training data set, execute: Assign a random number within the interval (-1, 1) to each connection weight of the BP neural network model, set the error function, and specify the calculation target value and the maximum number of iterations; Take the sensor response AD value of the sensor in the clean air environment, the sensor response AD value of the sensor in the test gas environment, the temperature of the environment where the sensor is located, and the humidity of the environment where the sensor is located as inputs, and the output concentration of the sensor in the test gas environment as the output, and input them into the BP neural network model for model training to calculate the inputs and outputs of each neuron in the hidden layer; Obtain the actual output Oi through training, compare it with the expected output value Bi, calculate the model error D = Bi - Oi, and use the partial derivatives of the error function of each neuron in the output layer and the outputs of each neuron in the hidden layer to correct the connection weights; Judge whether the model error meets the requirements. When the model error reaches the preset accuracy or the number of learning times is greater than the set maximum number, end the training; otherwise, select the next set of temperature and humidity numerical samples for the next round of learning; The transfer function adopted by the BP neural network model is the bipolar sigmoid function.

3. The sensor gas response curve adjustment method according to claim 1, characterized in that: The data pre - processing includes outlier processing and normalized data processing; wherein, outlier processing includes the judgment and supplementation of outliers. The specific operation is: If AD(i)>AD(i - 1) and AD(i)<AD(i + 1), then AD(i)=AD(i); Otherwise, AD(i)=1 / 2(AD(i + 1)+AD(i - 1)); Wherein, AD(i) is the sensor response AD value during the outlier judgment polling process, and i is the serial number of the AD value during the outlier judgment polling process; The method of normalized data processing is: AD(i)=(AD(i)-AD(min)) / (AD(max)-AD(i)) Among them, AD(i) is the sensor output signal value collected this time, AD(min) is the minimum AD value of the sensor response collected, and AD(max) is the maximum AD value of the sensor response collected.

4. The sensor gas response curve adjustment method according to claim 1, characterized in that: The trained BP neural network model is built into the sensor's control chip, including: The connection weights from the input layer to the hidden layer and from the hidden layer to the output layer of the BP neural network model are preset in the control chip of the sensor, and the output value is calculated through the forward calculation logic, that is, the operation of presetting the model fitting parameters and concentration calculation logic in the sensor control chip is completed.

5. The sensor gas response curve adjustment method according to claim 1, characterized in that: The method to calibrate the sensor is: Place the sensors with the trained BP neural network model in batches in the calibration air box. After aging, set the calibration air box to the specified temperature and humidity, and record the output response AD value of the sensor in clean air. Then, introduce the gas of specified concentration to be measured into the calibration gas box. After stabilization, collect the concentration value calculated and output by the sensor; The calibration tool compares the concentration value calculated by the sensor and the concentration value of the specified gas to screen the sensor; The calibration tool transmits the concentration value of the specified gas to the sensor to complete the writing of the sensor calibration information.

6. The sensor gas response curve adjustment method according to claim 1, characterized in that: The method for calibrating the sensor gas response curve is: The sensor sensitivity calibration formula is: K=Cit / Cot; Sensor output value Co=K*Ci; Wherein, K is the sensitivity calibration coefficient, which is calculated as the ratio of the standard gas concentration Cit in the calibration gas box to the sensor output concentration value Cot; After the sensor completes the sensitivity calibration, the AD value of the sensor in clean air and the detected temperature, humidity and the current AD value of the sensor are input into the preset BP neural network model. The sensor outputs the concentration value Ci, which is then multiplied by the sensitivity calibration value coefficient K to complete the adaptation of the sensor gas response model.

7. The sensor gas response curve adjustment method according to claim 1, characterized in that: The sensor is a gas sensor that has an obvious response to a specified gas, or is greatly affected by temperature and humidity.

8. A sensor gas response curve adjustment system, characterized in that: include: A model training unit is used to pre-build a BP neural network model and train the BP neural network model using a training data set; wherein the training data set is: the collected AD values ​​of the responses of N1 sensors of the same model at N2 different temperatures, N3 different humidities, N4 sensors in a clean air environment, and the AD values ​​of the responses of N6 sensors of the same model under N5 different gas concentrations to be measured, and after data pre-processing, a multi-dimensional array (N1, N2, N3, N4, N5, N6) is established; A model implantation unit is used to embed the trained BP neural network model into the control chip of the sensor; The test tool is used to compare the calculated value of the ambient concentration output by the sensor with the actual ambient gas concentration value when calibrating the sensor, write the calibration information of the sensor, and generate the gas response curve of the sensor; It is also used to correct the gas response curve of the sensor: after the trained BP neural network model is built into the control chip of the sensor, the sensor performs sensor sensitivity calibration and gas response curve adjustment based on the test concentration value transmitted by the test tooling according to the sensor characteristics to ensure that the deviation between the sensor output concentration value and the ambient concentration value meets the accuracy requirements.

9. A computer device comprising a processor, a communication interface, a memory and a communication bus, wherein: The processor, the communication interface and the memory communicate with each other via a communication bus; the memory is used to store computer programs; the processor is used to implement the steps of the sensor gas response curve adjustment method as described in any one of claims 1 to 7 when executing the program stored in the memory.

10. A readable storage medium, characterized in that: Instructions are stored thereon, which, when executed by one or more processors, enable the processors to perform the steps of the sensor gas response curve adjustment method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Temperature and humidity compensation method and device based on BP neural network

    CN111272216A

  • Gas sensor temperature compensation model establishment method and device and gas concentration measurement method and device

    CN111948273A

  • Response model and concentration compensation method based on sensor characteristic curve

    CN112798738A